]> git.ipfire.org Git - thirdparty/libvirt.git/commit
cputest: Don't test cpuGuestData
authorJiri Denemark <jdenemar@redhat.com>
Thu, 10 Nov 2016 08:41:17 +0000 (09:41 +0100)
committerJiri Denemark <jdenemar@redhat.com>
Tue, 15 Nov 2016 14:49:16 +0000 (15:49 +0100)
commit509a4a40f96926e95e809f563e1cfed06d9f2cee
tree976bf6d30e9176a66b1b2d1a0e8e1a88d11f650e
parent2a2ce08a6d0efa6fbf0163bb2ffe4452168a0df9
cputest: Don't test cpuGuestData

The API is no longer used anywhere else since it was replaced by a much
saner work flow utilizing new APIs that work on virCPUDefPtr directly:
virCPUCompare, virCPUUpdate, and virCPUTranslate.

Not testing the new work flow caused some bugs to be hidden. This patch
reveals them, but doesn't attempt to fix them. To make sure all test
still pass after this patch, all affected test results are modified to
pretend the tests succeeded. All of the bugs will be fixed in the
following commits and the artificial modifications will be reverted.

The following is the list of bugs in the new CPU model work flow:

- a guest CPU with mode='custom' and missing <vendor/> gets the vendor
  copied from host's CPU (the vendor should only be copied to host-model
  CPUs):
    DO_TEST_UPDATE("x86", "host", "min", VIR_CPU_COMPARE_IDENTICAL)
    DO_TEST_UPDATE("x86", "host", "pentium3", VIR_CPU_COMPARE_IDENTICAL)
    DO_TEST_GUESTCPU("x86", "host-better", "pentium3", NULL, 0)

- when a guest CPU with mode='custom' needs to be translated into
  another model because the original model is not supported by a
  hypervisor, the result will have its vendor set to the vendor of the
  original CPU model as specified in cpu_map.xml even if the original
  guest CPU XML didn't contain <vendor/>:
    DO_TEST_GUESTCPU("x86", "host", "guest", model486, 0)
    DO_TEST_GUESTCPU("x86", "host", "guest", models, 0)
    DO_TEST_GUESTCPU("x86", "host-Haswell-noTSX", "Haswell-noTSX",
                     haswell, 0)

- legacy POWERx_v* model names are not recognized:
    DO_TEST_GUESTCPU("ppc64", "host", "guest-legacy", ppc_models, 0)

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
14 files changed:
tests/cputest.c
tests/cputestdata/ppc64-host+guest,ppc_models-result.xml
tests/cputestdata/ppc64-host+guest-legacy,ppc_models-result.xml
tests/cputestdata/x86-host+guest,model486-result.xml
tests/cputestdata/x86-host+guest,models-result.xml
tests/cputestdata/x86-host+guest-result.xml
tests/cputestdata/x86-host+host+host-model,models-result.xml
tests/cputestdata/x86-host+penryn-force-result.xml
tests/cputestdata/x86-host+strict-force-extra-result.xml
tests/cputestdata/x86-host-Haswell-noTSX+Haswell,haswell-result.xml
tests/cputestdata/x86-host-Haswell-noTSX+Haswell-noTSX,haswell-result.xml
tests/cputestdata/x86-host-Haswell-noTSX+Haswell-noTSX-result.xml
tests/cputestdata/x86-host-better+pentium3-result.xml
tests/cputestdata/x86-host-worse+guest-result.xml