qemuxml2argvtest: Modernize 'cpu-strict' case

Use the fake Haswell processor definition and augment the list of
features to make the test pass.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2023-09-01 16:18:12 +02:00
parent 457b6ee0c8
commit 36072d873e
3 changed files with 13 additions and 3 deletions

View File

@ -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"}' \ -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 \ -machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=off \
-accel kvm \ -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 \ -m size=219136k \
-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \ -object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \
-overcommit mem-lock=off \ -overcommit mem-lock=off \

View File

@ -9,7 +9,7 @@
<boot dev='network'/> <boot dev='network'/>
</os> </os>
<cpu match='strict'> <cpu match='strict'>
<model>core2duo</model> <model>Haswell</model>
<feature name='ds' policy='require'/> <feature name='ds' policy='require'/>
<feature name='acpi' policy='optional'/> <feature name='acpi' policy='optional'/>
<feature name='ht' policy='require'/> <feature name='ht' policy='require'/>
@ -27,6 +27,16 @@
<feature name='ss' policy='disable'/> <feature name='ss' policy='disable'/>
<feature name='sse4a' policy='optional'/> <feature name='sse4a' policy='optional'/>
<feature name='wdt' policy='forbid'/> <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> </cpu>
<clock offset='utc'/> <clock offset='utc'/>
<on_poweroff>destroy</on_poweroff> <on_poweroff>destroy</on_poweroff>

View File

@ -1744,7 +1744,7 @@ mymain(void)
DO_TEST("cpu-exact2-nofallback", QEMU_CAPS_KVM); DO_TEST("cpu-exact2-nofallback", QEMU_CAPS_KVM);
DO_TEST("cpu-fallback", QEMU_CAPS_KVM); DO_TEST("cpu-fallback", QEMU_CAPS_KVM);
DO_TEST_FAILURE("cpu-nofallback", 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("cpu-no-removed-features", QEMU_CAPS_KVM);
DO_TEST_NOCAPS("cpu-numa1"); DO_TEST_NOCAPS("cpu-numa1");
DO_TEST_NOCAPS("cpu-numa2"); DO_TEST_NOCAPS("cpu-numa2");