tests: Add more tests for virConnectBaselineCPU

https://bugzilla.redhat.com/show_bug.cgi?id=1049391

The new tests would fail in various ways without the two previous
commits.
This commit is contained in:
Jiri Denemark 2014-01-27 21:53:51 +01:00
parent 580ddf0d34
commit 7e4dcf3a47
8 changed files with 178 additions and 0 deletions

View File

@ -619,7 +619,12 @@ mymain(void)
DO_TEST_BASELINE("x86", "some-vendors", 0, 0);
DO_TEST_BASELINE("x86", "1", 0, 0);
DO_TEST_BASELINE("x86", "2", 0, 0);
DO_TEST_BASELINE("x86", "3", 0, 0);
DO_TEST_BASELINE("x86", "3", VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES, 0);
DO_TEST_BASELINE("x86", "4", 0, 0);
DO_TEST_BASELINE("x86", "4", VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES, 0);
DO_TEST_BASELINE("x86", "5", 0, 0);
DO_TEST_BASELINE("x86", "5", VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES, 0);
DO_TEST_BASELINE("ppc64", "incompatible-vendors", 0, -1);
DO_TEST_BASELINE("ppc64", "no-vendor", 0, 0);

View File

@ -0,0 +1,3 @@
<cpu mode='custom' match='exact'>
<model fallback='forbid'>Westmere</model>
</cpu>

View File

@ -0,0 +1,46 @@
<cpu mode='custom' match='exact'>
<model fallback='forbid'>Westmere</model>
<vendor>Intel</vendor>
<feature policy='require' name='hypervisor'/>
<feature policy='require' name='avx'/>
<feature policy='require' name='osxsave'/>
<feature policy='require' name='xsave'/>
<feature policy='require' name='tsc-deadline'/>
<feature policy='require' name='x2apic'/>
<feature policy='require' name='pcid'/>
<feature policy='require' name='pclmuldq'/>
<feature policy='require' name='ss'/>
<feature policy='require' name='vme'/>
<feature policy='require' name='lahf_lm'/>
<feature policy='require' name='lm'/>
<feature policy='require' name='nx'/>
<feature policy='require' name='syscall'/>
<feature policy='require' name='aes'/>
<feature policy='require' name='popcnt'/>
<feature policy='require' name='sse4.2'/>
<feature policy='require' name='sse4.1'/>
<feature policy='require' name='cx16'/>
<feature policy='require' name='ssse3'/>
<feature policy='require' name='pni'/>
<feature policy='require' name='sse2'/>
<feature policy='require' name='sse'/>
<feature policy='require' name='fxsr'/>
<feature policy='require' name='mmx'/>
<feature policy='require' name='clflush'/>
<feature policy='require' name='pse36'/>
<feature policy='require' name='pat'/>
<feature policy='require' name='cmov'/>
<feature policy='require' name='mca'/>
<feature policy='require' name='pge'/>
<feature policy='require' name='mtrr'/>
<feature policy='require' name='sep'/>
<feature policy='require' name='apic'/>
<feature policy='require' name='cx8'/>
<feature policy='require' name='mce'/>
<feature policy='require' name='pae'/>
<feature policy='require' name='msr'/>
<feature policy='require' name='tsc'/>
<feature policy='require' name='pse'/>
<feature policy='require' name='de'/>
<feature policy='require' name='fpu'/>
</cpu>

View File

@ -0,0 +1,14 @@
<cpu mode='custom' match='exact'>
<model fallback='forbid'>Westmere</model>
<vendor>Intel</vendor>
<feature policy='require' name='hypervisor'/>
<feature policy='require' name='avx'/>
<feature policy='require' name='osxsave'/>
<feature policy='require' name='xsave'/>
<feature policy='require' name='tsc-deadline'/>
<feature policy='require' name='x2apic'/>
<feature policy='require' name='pcid'/>
<feature policy='require' name='pclmuldq'/>
<feature policy='require' name='ss'/>
<feature policy='require' name='vme'/>
</cpu>

View File

@ -0,0 +1,18 @@
<cpuTest>
<cpu>
<arch>x86_64</arch>
<model>Westmere</model>
<vendor>Intel</vendor>
<topology sockets='4' cores='1' threads='1'/>
<feature name='hypervisor'/>
<feature name='avx'/>
<feature name='osxsave'/>
<feature name='xsave'/>
<feature name='tsc-deadline'/>
<feature name='x2apic'/>
<feature name='pcid'/>
<feature name='pclmuldq'/>
<feature name='ss'/>
<feature name='vme'/>
</cpu>
</cpuTest>

View File

@ -0,0 +1,47 @@
<cpu mode='custom' match='exact'>
<model fallback='allow'>SandyBridge</model>
<vendor>Intel</vendor>
<feature policy='require' name='hypervisor'/>
<feature policy='require' name='osxsave'/>
<feature policy='require' name='pcid'/>
<feature policy='require' name='ss'/>
<feature policy='require' name='vme'/>
<feature policy='disable' name='rdtscp'/>
<feature policy='require' name='lahf_lm'/>
<feature policy='require' name='lm'/>
<feature policy='require' name='nx'/>
<feature policy='require' name='syscall'/>
<feature policy='require' name='avx'/>
<feature policy='require' name='xsave'/>
<feature policy='require' name='aes'/>
<feature policy='require' name='tsc-deadline'/>
<feature policy='require' name='popcnt'/>
<feature policy='require' name='x2apic'/>
<feature policy='require' name='sse4.2'/>
<feature policy='require' name='sse4.1'/>
<feature policy='require' name='cx16'/>
<feature policy='require' name='ssse3'/>
<feature policy='require' name='pclmuldq'/>
<feature policy='require' name='pni'/>
<feature policy='require' name='sse2'/>
<feature policy='require' name='sse'/>
<feature policy='require' name='fxsr'/>
<feature policy='require' name='mmx'/>
<feature policy='require' name='clflush'/>
<feature policy='require' name='pse36'/>
<feature policy='require' name='pat'/>
<feature policy='require' name='cmov'/>
<feature policy='require' name='mca'/>
<feature policy='require' name='pge'/>
<feature policy='require' name='mtrr'/>
<feature policy='require' name='sep'/>
<feature policy='require' name='apic'/>
<feature policy='require' name='cx8'/>
<feature policy='require' name='mce'/>
<feature policy='require' name='pae'/>
<feature policy='require' name='msr'/>
<feature policy='require' name='tsc'/>
<feature policy='require' name='pse'/>
<feature policy='require' name='de'/>
<feature policy='require' name='fpu'/>
</cpu>

View File

@ -0,0 +1,10 @@
<cpu mode='custom' match='exact'>
<model fallback='allow'>SandyBridge</model>
<vendor>Intel</vendor>
<feature policy='require' name='hypervisor'/>
<feature policy='require' name='osxsave'/>
<feature policy='require' name='pcid'/>
<feature policy='require' name='ss'/>
<feature policy='require' name='vme'/>
<feature policy='disable' name='rdtscp'/>
</cpu>

View File

@ -0,0 +1,35 @@
<cpuTest>
<cpu>
<arch>x86_64</arch>
<model>Westmere</model>
<vendor>Intel</vendor>
<topology sockets='4' cores='1' threads='1'/>
<feature name='hypervisor'/>
<feature name='avx'/>
<feature name='osxsave'/>
<feature name='xsave'/>
<feature name='tsc-deadline'/>
<feature name='x2apic'/>
<feature name='pcid'/>
<feature name='pclmuldq'/>
<feature name='ss'/>
<feature name='vme'/>
</cpu>
<cpu>
<arch>x86_64</arch>
<model>Nehalem</model>
<vendor>Intel</vendor>
<topology sockets='4' cores='1' threads='1'/>
<feature name='aes'/>
<feature name='hypervisor'/>
<feature name='avx'/>
<feature name='osxsave'/>
<feature name='xsave'/>
<feature name='tsc-deadline'/>
<feature name='x2apic'/>
<feature name='pcid'/>
<feature name='pclmuldq'/>
<feature name='ss'/>
<feature name='vme'/>
</cpu>
</cpuTest>