Use the fake Haswell processor definition and augment the list of features to make the test pass. Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- ...u-strict1.args => cpu-strict1.x86_64-latest.args} | 2 +- tests/qemuxml2argvdata/cpu-strict1.xml | 12 +++++++++++- tests/qemuxml2argvtest.c | 2 +- 3 files changed, 13 insertions(+), 3 deletions(-) rename tests/qemuxml2argvdata/{cpu-strict1.args => cpu-strict1.x86_64-latest.args} (84%) diff --git a/tests/qemuxml2argvdata/cpu-strict1.args b/tests/qemuxml2argvdata/cpu-strict1.x86_64-latest.args similarity index 84% rename from tests/qemuxml2argvdata/cpu-strict1.args rename to tests/qemuxml2argvdata/cpu-strict1.x86_64-latest.args index 7e33e9dd62..3f9c3516bb 100644 --- a/tests/qemuxml2argvdata/cpu-strict1.args +++ b/tests/qemuxml2argvdata/cpu-strict1.x86_64-latest.args @@ -12,7 +12,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \ -machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=off \ -accel kvm \ --cpu core2duo,ds=on,acpi=on,ht=on,tm=on,ds-cpl=on,vmx=on,est=on,xtpr=on,3dnowext=on,lahf-lm=on,nx=off,cx16=off,tm2=off,pbe=off,ss=off,sse4a=off,wdt=off \ +-cpu Haswell,ds=on,acpi=on,ht=on,tm=on,ds-cpl=on,vmx=on,est=on,xtpr=on,3dnowext=on,lahf-lm=on,nx=off,cx16=off,tm2=off,pbe=off,ss=off,sse4a=off,wdt=off,vme=off,invtsc=off,abm=off,pdpe1gb=off,rdrand=off,f16c=off,pdcm=off,smx=off,monitor=off,dtes64=off \ -m size=219136k \ -object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \ -overcommit mem-lock=off \ diff --git a/tests/qemuxml2argvdata/cpu-strict1.xml b/tests/qemuxml2argvdata/cpu-strict1.xml index f17c75b6af..63db54ecad 100644 --- a/tests/qemuxml2argvdata/cpu-strict1.xml +++ b/tests/qemuxml2argvdata/cpu-strict1.xml @@ -9,7 +9,7 @@ <boot dev='network'/> </os> <cpu match='strict'> - <model>core2duo</model> + <model>Haswell</model> <feature name='ds' policy='require'/> <feature name='acpi' policy='optional'/> <feature name='ht' policy='require'/> @@ -27,6 +27,16 @@ <feature name='ss' policy='disable'/> <feature name='sse4a' policy='optional'/> <feature name='wdt' policy='forbid'/> + <feature name='vme' policy='disable'/> + <feature name='invtsc' policy='disable'/> + <feature name='abm' policy='disable'/> + <feature name='pdpe1gb' policy='disable'/> + <feature name='rdrand' policy='disable'/> + <feature name='f16c' policy='disable'/> + <feature name='pdcm' policy='disable'/> + <feature name='smx' policy='disable'/> + <feature name='monitor' policy='disable'/> + <feature name='dtes64' policy='disable'/> </cpu> <clock offset='utc'/> <on_poweroff>destroy</on_poweroff> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 7fc564d3ef..e2af688529 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1744,7 +1744,7 @@ mymain(void) DO_TEST("cpu-exact2-nofallback", QEMU_CAPS_KVM); DO_TEST("cpu-fallback", QEMU_CAPS_KVM); DO_TEST_FAILURE("cpu-nofallback", QEMU_CAPS_KVM); - DO_TEST("cpu-strict1", QEMU_CAPS_KVM); + DO_TEST_CAPS_ARCH_LATEST_FULL("cpu-strict1", "x86_64", ARG_CAPS_HOST_CPU_MODEL, QEMU_CPU_DEF_HASWELL); DO_TEST("cpu-no-removed-features", QEMU_CAPS_KVM); DO_TEST_NOCAPS("cpu-numa1"); DO_TEST_NOCAPS("cpu-numa2"); -- 2.41.0