]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemuxml2argvtest: Convert 'cpu-eoi-(disabled|enabled)' cases to VIR_TEST_CAPS_LATEST
authorPeter Krempa <pkrempa@redhat.com>
Tue, 21 Jun 2022 15:07:51 +0000 (17:07 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 11 Jul 2022 10:48:28 +0000 (12:48 +0200)
The tested feature doesn't change across versions so we can use the
modern testing infrastructure.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
tests/qemuxml2argvdata/cpu-eoi-disabled.x86_64-latest.args [moved from tests/qemuxml2argvdata/cpu-eoi-disabled.args with 53% similarity]
tests/qemuxml2argvdata/cpu-eoi-disabled.xml
tests/qemuxml2argvdata/cpu-eoi-enabled.x86_64-latest.args [moved from tests/qemuxml2argvdata/cpu-eoi-enabled.args with 53% similarity]
tests/qemuxml2argvdata/cpu-eoi-enabled.xml
tests/qemuxml2argvtest.c
tests/qemuxml2xmloutdata/cpu-eoi-disabled.xml
tests/qemuxml2xmloutdata/cpu-eoi-enabled.xml

similarity index 53%
rename from tests/qemuxml2argvdata/cpu-eoi-disabled.args
rename to tests/qemuxml2argvdata/cpu-eoi-disabled.x86_64-latest.args
index b2524464649e083ac5aed01bc6a65d473501d8ba..dfb4a53bfd01b6595c83caa2d048fa27c05d18fa 100644 (file)
@@ -6,15 +6,15 @@ LOGNAME=test \
 XDG_DATA_HOME=/tmp/lib/domain--1-QEMUGuest1/.local/share \
 XDG_CACHE_HOME=/tmp/lib/domain--1-QEMUGuest1/.cache \
 XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
-QEMU_AUDIO_DRV=none \
-/usr/bin/qemu-system-i386 \
+/usr/bin/qemu-system-x86_64 \
 -name guest=QEMUGuest1,debug-threads=on \
 -S \
--object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
--machine pc,usb=off,dump-guest-core=off \
+-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-QEMUGuest1/master-key.aes"}' \
+-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram \
 -accel tcg \
 -cpu qemu32,kvm-pv-eoi=off \
 -m 214 \
+-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \
 -overcommit mem-lock=off \
 -smp 6,sockets=6,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
@@ -26,6 +26,8 @@ QEMU_AUDIO_DRV=none \
 -rtc base=utc \
 -no-shutdown \
 -boot strict=on \
--usb \
--device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \
+-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \
+-audiodev '{"id":"audio1","driver":"none"}' \
+-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x2"}' \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
 -msg timestamp=on
index 657de0482afbfb2b9022347e5fa91a44a53f8df8..c93e75e3e5edf902eae49e4a9350c7089453087b 100644 (file)
@@ -21,7 +21,7 @@
   <on_reboot>restart</on_reboot>
   <on_crash>destroy</on_crash>
   <devices>
-    <emulator>/usr/bin/qemu-system-i386</emulator>
+    <emulator>/usr/bin/qemu-system-x86_64</emulator>
     <controller type='usb' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
     <input type='mouse' bus='ps2'/>
similarity index 53%
rename from tests/qemuxml2argvdata/cpu-eoi-enabled.args
rename to tests/qemuxml2argvdata/cpu-eoi-enabled.x86_64-latest.args
index 849593269d3e79687ca223639c20f4060754e8ba..155d5ecef7927aaf8d5b17ea93c82d6317bc1bc4 100644 (file)
@@ -6,15 +6,15 @@ LOGNAME=test \
 XDG_DATA_HOME=/tmp/lib/domain--1-QEMUGuest1/.local/share \
 XDG_CACHE_HOME=/tmp/lib/domain--1-QEMUGuest1/.cache \
 XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
-QEMU_AUDIO_DRV=none \
-/usr/bin/qemu-system-i386 \
+/usr/bin/qemu-system-x86_64 \
 -name guest=QEMUGuest1,debug-threads=on \
 -S \
--object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
--machine pc,usb=off,dump-guest-core=off \
+-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-QEMUGuest1/master-key.aes"}' \
+-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram \
 -accel tcg \
 -cpu qemu32,kvm-pv-eoi=on \
 -m 214 \
+-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \
 -overcommit mem-lock=off \
 -smp 6,sockets=6,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
@@ -26,6 +26,8 @@ QEMU_AUDIO_DRV=none \
 -rtc base=utc \
 -no-shutdown \
 -boot strict=on \
--usb \
--device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \
+-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \
+-audiodev '{"id":"audio1","driver":"none"}' \
+-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x2"}' \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
 -msg timestamp=on
index bc8934f26022699746d71044601e62db17e6b292..1c24398f42d457fb473d6aa84c1e91624aa85da7 100644 (file)
@@ -21,7 +21,7 @@
   <on_reboot>restart</on_reboot>
   <on_crash>destroy</on_crash>
   <devices>
-    <emulator>/usr/bin/qemu-system-i386</emulator>
+    <emulator>/usr/bin/qemu-system-x86_64</emulator>
     <controller type='usb' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
     <input type='mouse' bus='ps2'/>
index bdfb47f0e5ddeae4ce312e9af31c50793b46a764..17d7ee9ab0b82125246601f98bbf9a4785bc89f6 100644 (file)
@@ -1247,8 +1247,6 @@ mymain(void)
 
     DO_TEST_CAPS_LATEST("controller-usb-order");
 
-    DO_TEST_NOCAPS("cpu-eoi-disabled");
-    DO_TEST_NOCAPS("cpu-eoi-enabled");
     DO_TEST("controller-order",
             QEMU_CAPS_KVM,
             QEMU_CAPS_PIIX3_USB_UHCI,
@@ -1258,6 +1256,10 @@ mymain(void)
             QEMU_CAPS_USB_HUB,
             QEMU_CAPS_DEVICE_ISA_SERIAL,
             QEMU_CAPS_DEVICE_CIRRUS_VGA);
+    /* 'eoi' cpu feature with an explicit CPU defined */
+    DO_TEST_CAPS_LATEST("cpu-eoi-disabled");
+    DO_TEST_CAPS_LATEST("cpu-eoi-enabled");
+    /* 'eoi' cpu feature without an explicit CPU defined */
     DO_TEST_CAPS_VER("eoi-disabled", "4.0.0");
     DO_TEST_CAPS_LATEST("eoi-disabled");
     DO_TEST_CAPS_VER("eoi-enabled", "4.0.0");
index 7ae2c7034b0261a4cc320495b42dc908a1519c97..acd17da598193a40891f1f2bfa2fe6a9e2db489f 100644 (file)
@@ -21,7 +21,7 @@
   <on_reboot>restart</on_reboot>
   <on_crash>destroy</on_crash>
   <devices>
-    <emulator>/usr/bin/qemu-system-i386</emulator>
+    <emulator>/usr/bin/qemu-system-x86_64</emulator>
     <controller type='usb' index='0'>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
     </controller>
index bee4fd0240a5010d2070e9bc7f23fb5ac5a45cde..49900aea9a43a13830141094fdd6c3bff101b1d6 100644 (file)
@@ -21,7 +21,7 @@
   <on_reboot>restart</on_reboot>
   <on_crash>destroy</on_crash>
   <devices>
-    <emulator>/usr/bin/qemu-system-i386</emulator>
+    <emulator>/usr/bin/qemu-system-x86_64</emulator>
     <controller type='usb' index='0'>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
     </controller>