[PATCH 03/21] qemuxml2argvtest: Remove redundant floppy controller tests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 tests/qemusecuritytest.c                      |  3 +-
 .../disk-floppy-q35-2_11.x86_64-latest.args   | 42 -------------------
 .../qemuxml2argvdata/disk-floppy-q35-2_11.xml | 38 -----------------
 .../disk-floppy-q35-2_9.x86_64-2.12.0.args    | 36 ----------------
 ...rgs => disk-floppy-q35.x86_64-2.12.0.args} |  2 +-
 ...rgs => disk-floppy-q35.x86_64-latest.args} |  2 +-
 ...floppy-q35-2_9.xml => disk-floppy-q35.xml} |  2 +-
 tests/qemuxml2argvtest.c                      |  6 +--
 8 files changed, 6 insertions(+), 125 deletions(-)
 delete mode 100644 tests/qemuxml2argvdata/disk-floppy-q35-2_11.x86_64-latest.args
 delete mode 100644 tests/qemuxml2argvdata/disk-floppy-q35-2_11.xml
 delete mode 100644 tests/qemuxml2argvdata/disk-floppy-q35-2_9.x86_64-2.12.0.args
 rename tests/qemuxml2argvdata/{disk-floppy-q35-2_11.x86_64-2.12.0.args => disk-floppy-q35.x86_64-2.12.0.args} (96%)
 rename tests/qemuxml2argvdata/{disk-floppy-q35-2_9.x86_64-latest.args => disk-floppy-q35.x86_64-latest.args} (96%)
 rename tests/qemuxml2argvdata/{disk-floppy-q35-2_9.xml => disk-floppy-q35.xml} (95%)

diff --git a/tests/qemusecuritytest.c b/tests/qemusecuritytest.c
index a7e87fdf8f..924c625a4c 100644
--- a/tests/qemusecuritytest.c
+++ b/tests/qemusecuritytest.c
@@ -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
index 88144f5f98..0000000000
--- a/tests/qemuxml2argvdata/disk-floppy-q35-2_11.x86_64-latest.args
+++ /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
index 6f51691a5c..0000000000
--- a/tests/qemuxml2argvdata/disk-floppy-q35-2_11.xml
+++ /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
index 528214e73f..0000000000
--- a/tests/qemuxml2argvdata/disk-floppy-q35-2_9.x86_64-2.12.0.args
+++ /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
diff --git a/tests/qemuxml2argvdata/disk-floppy-q35-2_11.x86_64-2.12.0.args b/tests/qemuxml2argvdata/disk-floppy-q35.x86_64-2.12.0.args
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 055661b75b..efd76d6436 100644
--- a/tests/qemuxml2argvdata/disk-floppy-q35-2_11.x86_64-2.12.0.args
+++ b/tests/qemuxml2argvdata/disk-floppy-q35.x86_64-2.12.0.args
@@ -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 \
diff --git a/tests/qemuxml2argvdata/disk-floppy-q35-2_9.x86_64-latest.args b/tests/qemuxml2argvdata/disk-floppy-q35.x86_64-latest.args
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 c04f0e2a2f..810cc0796d 100644
--- a/tests/qemuxml2argvdata/disk-floppy-q35-2_9.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-floppy-q35.x86_64-latest.args
@@ -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 \
diff --git a/tests/qemuxml2argvdata/disk-floppy-q35-2_9.xml b/tests/qemuxml2argvdata/disk-floppy-q35.xml
similarity index 95%
rename from tests/qemuxml2argvdata/disk-floppy-q35-2_9.xml
rename to tests/qemuxml2argvdata/disk-floppy-q35.xml
index 5301759279..6fef3bf8f9 100644
--- a/tests/qemuxml2argvdata/disk-floppy-q35-2_9.xml
+++ b/tests/qemuxml2argvdata/disk-floppy-q35.xml
@@ -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'/>
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 6c67b36d5c..658084ad0c 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -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");
-- 
2.31.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux