]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemuxml2argvtest: Remove redundant floppy controller tests
authorPeter Krempa <pkrempa@redhat.com>
Wed, 5 Jan 2022 09:07:41 +0000 (10:07 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 7 Jan 2022 08:25:13 +0000 (09:25 +0100)
The two test cases were added to avoid regressions such as fixed in
17dff3584855e9. Nowadays the code is much simpler and any Q35 machine
will trigger the explicit FDC.

Remove the '2.11' machine type version and turn the '2.9' version into a
generic q35 machine.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
tests/qemusecuritytest.c
tests/qemuxml2argvdata/disk-floppy-q35-2_11.x86_64-latest.args [deleted file]
tests/qemuxml2argvdata/disk-floppy-q35-2_11.xml [deleted file]
tests/qemuxml2argvdata/disk-floppy-q35-2_9.x86_64-2.12.0.args [deleted file]
tests/qemuxml2argvdata/disk-floppy-q35.x86_64-2.12.0.args [moved from tests/qemuxml2argvdata/disk-floppy-q35-2_11.x86_64-2.12.0.args with 96% similarity]
tests/qemuxml2argvdata/disk-floppy-q35.x86_64-latest.args [moved from tests/qemuxml2argvdata/disk-floppy-q35-2_9.x86_64-latest.args with 96% similarity]
tests/qemuxml2argvdata/disk-floppy-q35.xml [moved from tests/qemuxml2argvdata/disk-floppy-q35-2_9.xml with 95% similarity]
tests/qemuxml2argvtest.c

index a7e87fdf8f0ca6d7be63bde9545df1af5012c352..924c625a4c62179ad0ab494fb2d2aa657925970d 100644 (file)
@@ -213,8 +213,7 @@ mymain(void)
     DO_TEST_DOMAIN("disk-detect-zeroes");
     DO_TEST_DOMAIN("disk-error-policy");
     DO_TEST_DOMAIN("disk-floppy");
-    DO_TEST_DOMAIN("disk-floppy-q35-2_11");
-    DO_TEST_DOMAIN("disk-floppy-q35-2_9");
+    DO_TEST_DOMAIN("disk-floppy-q35");
     DO_TEST_DOMAIN("disk-network-gluster");
     DO_TEST_DOMAIN("disk-network-iscsi");
     DO_TEST_DOMAIN("disk-network-nbd");
diff --git a/tests/qemuxml2argvdata/disk-floppy-q35-2_11.x86_64-latest.args b/tests/qemuxml2argvdata/disk-floppy-q35-2_11.x86_64-latest.args
deleted file mode 100644 (file)
index 88144f5..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-LC_ALL=C \
-PATH=/bin \
-HOME=/tmp/lib/domain--1-QEMUGuest1 \
-USER=test \
-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 \
-/usr/bin/qemu-system-x86_64 \
--name guest=QEMUGuest1,debug-threads=on \
--S \
--object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-QEMUGuest1/master-key.aes"}' \
--machine pc-q35-2.11,usb=off,dump-guest-core=off,memory-backend=pc.ram \
--accel tcg \
--cpu qemu64 \
--m 214 \
--object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \
--overcommit mem-lock=off \
--smp 1,sockets=1,cores=1,threads=1 \
--uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
--display none \
--no-user-config \
--nodefaults \
--chardev socket,id=charmonitor,fd=1729,server=on,wait=off \
--mon chardev=charmonitor,id=monitor,mode=control \
--rtc base=utc \
--no-shutdown \
--no-acpi \
--boot strict=on \
--device '{"driver":"pcie-root-port","port":8,"chassis":1,"id":"pci.1","bus":"pcie.0","multifunction":true,"addr":"0x1"}' \
--device '{"driver":"pcie-root-port","port":9,"chassis":2,"id":"pci.2","bus":"pcie.0","addr":"0x1.0x1"}' \
--device '{"driver":"qemu-xhci","id":"usb","bus":"pci.1","addr":"0x0"}' \
--device '{"driver":"isa-fdc","bootindexA":1}' \
--blockdev '{"driver":"file","filename":"/tmp/firmware.img","node-name":"libvirt-2-storage","auto-read-only":true,"discard":"unmap"}' \
--blockdev '{"node-name":"libvirt-2-format","read-only":false,"driver":"raw","file":"libvirt-2-storage"}' \
--device '{"driver":"floppy","unit":0,"drive":"libvirt-2-format","id":"fdc0-0-0"}' \
--blockdev '{"driver":"file","filename":"/tmp/data.img","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
--blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"qcow2","file":"libvirt-1-storage"}' \
--device '{"driver":"floppy","unit":1,"drive":"libvirt-1-format","id":"fdc0-0-1"}' \
--audiodev '{"id":"audio1","driver":"none"}' \
--sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
--msg timestamp=on
diff --git a/tests/qemuxml2argvdata/disk-floppy-q35-2_11.xml b/tests/qemuxml2argvdata/disk-floppy-q35-2_11.xml
deleted file mode 100644 (file)
index 6f51691..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-<domain type='qemu'>
-  <name>QEMUGuest1</name>
-  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory unit='KiB'>219100</memory>
-  <currentMemory unit='KiB'>219100</currentMemory>
-  <vcpu placement='static'>1</vcpu>
-  <os>
-    <type arch='x86_64' machine='pc-q35-2.11'>hvm</type>
-    <boot dev='fd'/>
-  </os>
-  <clock offset='utc'/>
-  <on_poweroff>destroy</on_poweroff>
-  <on_reboot>restart</on_reboot>
-  <on_crash>destroy</on_crash>
-  <devices>
-    <emulator>/usr/bin/qemu-system-x86_64</emulator>
-    <disk type='file' device='floppy'>
-      <driver name='qemu' type='raw'/>
-      <source file='/tmp/firmware.img'/>
-      <target dev='fda' bus='fdc'/>
-      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
-    </disk>
-    <disk type='file' device='floppy'>
-      <driver name='qemu' type='qcow2'/>
-      <source file='/tmp/data.img'/>
-      <target dev='fdb' bus='fdc'/>
-      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
-    </disk>
-    <controller type='sata' index='0'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
-    </controller>
-    <controller type='pci' index='0' model='pcie-root'/>
-    <controller type='fdc' index='0'/>
-    <input type='mouse' bus='ps2'/>
-    <input type='keyboard' bus='ps2'/>
-    <memballoon model='none'/>
-  </devices>
-</domain>
diff --git a/tests/qemuxml2argvdata/disk-floppy-q35-2_9.x86_64-2.12.0.args b/tests/qemuxml2argvdata/disk-floppy-q35-2_9.x86_64-2.12.0.args
deleted file mode 100644 (file)
index 528214e..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-LC_ALL=C \
-PATH=/bin \
-HOME=/tmp/lib/domain--1-QEMUGuest1 \
-USER=test \
-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-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-q35-2.9,usb=off,dump-guest-core=off \
--accel tcg \
--m 214 \
--realtime mlock=off \
--smp 1,sockets=1,cores=1,threads=1 \
--uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
--display none \
--no-user-config \
--nodefaults \
--chardev socket,id=charmonitor,fd=1729,server=on,wait=off \
--mon chardev=charmonitor,id=monitor,mode=control \
--rtc base=utc \
--no-shutdown \
--no-acpi \
--boot strict=on \
--device pcie-root-port,port=8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 \
--device pcie-root-port,port=9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \
--device qemu-xhci,id=usb,bus=pci.1,addr=0x0 \
--drive file=/tmp/firmware.img,format=raw,if=none,id=drive-fdc0-0-0 \
--drive file=/tmp/data.img,format=qcow2,if=none,id=drive-fdc0-0-1 \
--device isa-fdc,driveA=drive-fdc0-0-0,bootindexA=1,driveB=drive-fdc0-0-1 \
--sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
--msg timestamp=on
similarity index 96%
rename from tests/qemuxml2argvdata/disk-floppy-q35-2_11.x86_64-2.12.0.args
rename to tests/qemuxml2argvdata/disk-floppy-q35.x86_64-2.12.0.args
index 055661b75b2d4d2ce05abd7c694c9a1115bb856e..efd76d6436ed3b2064deeaaffd5a051c96129306 100644 (file)
@@ -11,7 +11,7 @@ QEMU_AUDIO_DRV=none \
 -name guest=QEMUGuest1,debug-threads=on \
 -S \
 -object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
--machine pc-q35-2.11,usb=off,dump-guest-core=off \
+-machine pc-q35-2.12,usb=off,dump-guest-core=off \
 -accel tcg \
 -m 214 \
 -realtime mlock=off \
similarity index 96%
rename from tests/qemuxml2argvdata/disk-floppy-q35-2_9.x86_64-latest.args
rename to tests/qemuxml2argvdata/disk-floppy-q35.x86_64-latest.args
index c04f0e2a2f7a56b66b536f1e97621d85aed82815..810cc0796d8e5013ce05fdeb4eb774aca261d0f8 100644 (file)
@@ -10,7 +10,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
 -name guest=QEMUGuest1,debug-threads=on \
 -S \
 -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-QEMUGuest1/master-key.aes"}' \
--machine pc-q35-2.9,usb=off,dump-guest-core=off,memory-backend=pc.ram \
+-machine q35,usb=off,dump-guest-core=off,memory-backend=pc.ram \
 -accel tcg \
 -cpu qemu64 \
 -m 214 \
similarity index 95%
rename from tests/qemuxml2argvdata/disk-floppy-q35-2_9.xml
rename to tests/qemuxml2argvdata/disk-floppy-q35.xml
index 530175927967fe06db2d44a62e8e7903be6e5327..6fef3bf8f9ec4bb0f42175003975706025d70ce2 100644 (file)
@@ -5,7 +5,7 @@
   <currentMemory unit='KiB'>219100</currentMemory>
   <vcpu placement='static'>1</vcpu>
   <os>
-    <type arch='x86_64' machine='pc-q35-2.9'>hvm</type>
+    <type arch='x86_64' machine='q35'>hvm</type>
     <boot dev='fd'/>
   </os>
   <clock offset='utc'/>
index 85f28c0ece8c00c2a7dc27ca9a4899eaca5e821a..2a3d3bdb3d8eebfd748cb0380ca1ac8227ede857 100644 (file)
@@ -1380,10 +1380,8 @@ mymain(void)
     DO_TEST_CAPS_LATEST("disk-cdrom-tray");
     DO_TEST_CAPS_VER("disk-floppy", "2.12.0");
     DO_TEST_CAPS_LATEST("disk-floppy");
-    DO_TEST_CAPS_VER("disk-floppy-q35-2_9", "2.12.0");
-    DO_TEST_CAPS_LATEST("disk-floppy-q35-2_9");
-    DO_TEST_CAPS_VER("disk-floppy-q35-2_11", "2.12.0");
-    DO_TEST_CAPS_LATEST("disk-floppy-q35-2_11");
+    DO_TEST_CAPS_VER("disk-floppy-q35", "2.12.0");
+    DO_TEST_CAPS_LATEST("disk-floppy-q35");
     DO_TEST_CAPS_ARCH_LATEST_FAILURE("disk-floppy-pseries", "ppc64");
     DO_TEST_CAPS_LATEST("disk-floppy-tray");
     DO_TEST_CAPS_LATEST("disk-virtio");