mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
tests: Add a bunch of cpu test case for ppc64
The test cases cover the cpuCompare(), cpuBaseline() and cpuNodeData() implementation.
This commit is contained in:
parent
049df97504
commit
818e68c5b4
@ -571,6 +571,13 @@ mymain(void)
|
||||
DO_TEST_COMPARE("x86", "host", "host-no-vendor", VIR_CPU_COMPARE_IDENTICAL);
|
||||
DO_TEST_COMPARE("x86", "host-no-vendor", "host", VIR_CPU_COMPARE_INCOMPATIBLE);
|
||||
|
||||
DO_TEST_COMPARE("ppc64", "host", "host", VIR_CPU_COMPARE_IDENTICAL);
|
||||
DO_TEST_COMPARE("ppc64", "host", "host-better", VIR_CPU_COMPARE_INCOMPATIBLE);
|
||||
DO_TEST_COMPARE("ppc64", "host", "host-worse", VIR_CPU_COMPARE_INCOMPATIBLE);
|
||||
DO_TEST_COMPARE("ppc64", "host", "host-incomp-arch", VIR_CPU_COMPARE_INCOMPATIBLE);
|
||||
DO_TEST_COMPARE("ppc64", "host", "host-no-vendor", VIR_CPU_COMPARE_IDENTICAL);
|
||||
DO_TEST_COMPARE("ppc64", "host-no-vendor", "host", VIR_CPU_COMPARE_INCOMPATIBLE);
|
||||
|
||||
/* guest to host comparison */
|
||||
DO_TEST_COMPARE("x86", "host", "bogus-model", VIR_CPU_COMPARE_ERROR);
|
||||
DO_TEST_COMPARE("x86", "host", "bogus-feature", VIR_CPU_COMPARE_ERROR);
|
||||
@ -597,6 +604,9 @@ mymain(void)
|
||||
|
||||
DO_TEST_COMPARE("ppc64", "host", "guest-strict", VIR_CPU_COMPARE_IDENTICAL);
|
||||
DO_TEST_COMPARE("ppc64", "host", "guest-exact", VIR_CPU_COMPARE_INCOMPATIBLE);
|
||||
DO_TEST_COMPARE("ppc64", "host", "guest-legacy", VIR_CPU_COMPARE_IDENTICAL);
|
||||
DO_TEST_COMPARE("ppc64", "host", "guest-legacy-incompatible", VIR_CPU_COMPARE_INCOMPATIBLE);
|
||||
DO_TEST_COMPARE("ppc64", "host", "guest-legacy-invalid", VIR_CPU_COMPARE_ERROR);
|
||||
|
||||
/* guest updates for migration
|
||||
* automatically compares host CPU with the result */
|
||||
@ -627,6 +637,9 @@ mymain(void)
|
||||
|
||||
DO_TEST_BASELINE("ppc64", "incompatible-vendors", 0, -1);
|
||||
DO_TEST_BASELINE("ppc64", "no-vendor", 0, 0);
|
||||
DO_TEST_BASELINE("ppc64", "incompatible-models", 0, -1);
|
||||
DO_TEST_BASELINE("ppc64", "same-model", 0, 0);
|
||||
DO_TEST_BASELINE("ppc64", "legacy", 0, -1);
|
||||
|
||||
/* CPU features */
|
||||
DO_TEST_HASFEATURE("x86", "host", "vmx", YES);
|
||||
@ -664,6 +677,9 @@ mymain(void)
|
||||
|
||||
DO_TEST_GUESTDATA("ppc64", "host", "guest", ppc_models, NULL, 0);
|
||||
DO_TEST_GUESTDATA("ppc64", "host", "guest-nofallback", ppc_models, "POWER8", -1);
|
||||
DO_TEST_GUESTDATA("ppc64", "host", "guest-legacy", ppc_models, NULL, 0);
|
||||
DO_TEST_GUESTDATA("ppc64", "host", "guest-legacy-incompatible", ppc_models, NULL, -1);
|
||||
DO_TEST_GUESTDATA("ppc64", "host", "guest-legacy-invalid", ppc_models, NULL, -1);
|
||||
|
||||
return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
14
tests/cputestdata/ppc64-baseline-incompatible-models.xml
Normal file
14
tests/cputestdata/ppc64-baseline-incompatible-models.xml
Normal file
@ -0,0 +1,14 @@
|
||||
<cpuTest>
|
||||
<cpu>
|
||||
<arch>ppc64</arch>
|
||||
<model>POWER7</model>
|
||||
<vendor>IBM</vendor>
|
||||
<topology sockets='2' cores='4' threads='1'/>
|
||||
</cpu>
|
||||
<cpu>
|
||||
<arch>ppc64</arch>
|
||||
<model>POWER8</model>
|
||||
<vendor>IBM</vendor>
|
||||
<topology sockets='1' cores='1' threads='1'/>
|
||||
</cpu>
|
||||
</cpuTest>
|
14
tests/cputestdata/ppc64-baseline-legacy.xml
Normal file
14
tests/cputestdata/ppc64-baseline-legacy.xml
Normal file
@ -0,0 +1,14 @@
|
||||
<cpuTest>
|
||||
<cpu>
|
||||
<arch>ppc64</arch>
|
||||
<model>POWER8</model>
|
||||
<vendor>IBM</vendor>
|
||||
<topology sockets='2' cores='4' threads='1'/>
|
||||
</cpu>
|
||||
<cpu>
|
||||
<arch>ppc64</arch>
|
||||
<model>power8e</model>
|
||||
<vendor>IBM</vendor>
|
||||
<topology sockets='1' cores='1' threads='1'/>
|
||||
</cpu>
|
||||
</cpuTest>
|
3
tests/cputestdata/ppc64-baseline-same-model-result.xml
Normal file
3
tests/cputestdata/ppc64-baseline-same-model-result.xml
Normal file
@ -0,0 +1,3 @@
|
||||
<cpu mode='custom' match='exact'>
|
||||
<model fallback='forbid'>POWER8</model>
|
||||
</cpu>
|
14
tests/cputestdata/ppc64-baseline-same-model.xml
Normal file
14
tests/cputestdata/ppc64-baseline-same-model.xml
Normal file
@ -0,0 +1,14 @@
|
||||
<cpuTest>
|
||||
<cpu>
|
||||
<arch>ppc64</arch>
|
||||
<model>POWER8</model>
|
||||
<vendor>IBM</vendor>
|
||||
<topology sockets='2' cores='4' threads='1'/>
|
||||
</cpu>
|
||||
<cpu>
|
||||
<arch>ppc64</arch>
|
||||
<model>POWER8</model>
|
||||
<vendor>IBM</vendor>
|
||||
<topology sockets='1' cores='1' threads='1'/>
|
||||
</cpu>
|
||||
</cpuTest>
|
3
tests/cputestdata/ppc64-guest-legacy-incompatible.xml
Normal file
3
tests/cputestdata/ppc64-guest-legacy-incompatible.xml
Normal file
@ -0,0 +1,3 @@
|
||||
<cpu mode='custom' match='exact'>
|
||||
<model fallback='allow'>POWER8_v1.0</model>
|
||||
</cpu>
|
3
tests/cputestdata/ppc64-guest-legacy-invalid.xml
Normal file
3
tests/cputestdata/ppc64-guest-legacy-invalid.xml
Normal file
@ -0,0 +1,3 @@
|
||||
<cpu mode='custom' match='exact'>
|
||||
<model fallback='allow'>POWER8E_v1.0</model>
|
||||
</cpu>
|
3
tests/cputestdata/ppc64-guest-legacy.xml
Normal file
3
tests/cputestdata/ppc64-guest-legacy.xml
Normal file
@ -0,0 +1,3 @@
|
||||
<cpu mode='custom' match='exact'>
|
||||
<model fallback='allow'>POWER7_v2.3</model>
|
||||
</cpu>
|
@ -0,0 +1,5 @@
|
||||
<cpu mode='custom' match='exact'>
|
||||
<arch>ppc64</arch>
|
||||
<model fallback='allow'>POWER7</model>
|
||||
<vendor>IBM</vendor>
|
||||
</cpu>
|
6
tests/cputestdata/ppc64-host-better.xml
Normal file
6
tests/cputestdata/ppc64-host-better.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<cpu>
|
||||
<arch>ppc64</arch>
|
||||
<model>POWER8</model>
|
||||
<vendor>IBM</vendor>
|
||||
<topology sockets='1' cores='64' threads='1'/>
|
||||
</cpu>
|
6
tests/cputestdata/ppc64-host-incomp-arch.xml
Normal file
6
tests/cputestdata/ppc64-host-incomp-arch.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<cpu>
|
||||
<arch>x86_64</arch>
|
||||
<model>POWER7</model>
|
||||
<vendor>IBM</vendor>
|
||||
<topology sockets='1' cores='64' threads='1'/>
|
||||
</cpu>
|
5
tests/cputestdata/ppc64-host-no-vendor.xml
Normal file
5
tests/cputestdata/ppc64-host-no-vendor.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<cpu>
|
||||
<arch>ppc64</arch>
|
||||
<model>POWER7</model>
|
||||
<topology sockets='1' cores='64' threads='1'/>
|
||||
</cpu>
|
6
tests/cputestdata/ppc64-host-worse.xml
Normal file
6
tests/cputestdata/ppc64-host-worse.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<cpu>
|
||||
<arch>ppc64</arch>
|
||||
<model>POWER6</model>
|
||||
<vendor>IBM</vendor>
|
||||
<topology sockets='1' cores='64' threads='1'/>
|
||||
</cpu>
|
Loading…
Reference in New Issue
Block a user