[PATCH 01/20] qemuxml2(argv|xml): Modernize 'blkdeviotune' tests

Peter Krempa pkrempa at redhat.com
Wed May 6 12:08:16 UTC 2020


Move the tests to DO_TEST_CAPS_LATEST. Since switch to blockdev stopped
us formatting the tunning parameters on the command line let's also add
version cases for qemu-4.1 data which doesn't enable blockdev.

Signed-off-by: Peter Krempa <pkrempa at redhat.com>
---
 ... blkdeviotune-group-num.x86_64-4.1.0.args} | 26 ++++++----
 .../blkdeviotune-group-num.x86_64-latest.args | 50 +++++++++++++++++++
 .../blkdeviotune-group-num.xml                |  5 +-
 ...blkdeviotune-max-length.x86_64-4.1.0.args} | 26 ++++++----
 ...blkdeviotune-max-length.x86_64-latest.args | 50 +++++++++++++++++++
 .../blkdeviotune-max-length.xml               |  5 +-
 ...rgs => blkdeviotune-max.x86_64-4.1.0.args} | 26 ++++++----
 .../blkdeviotune-max.x86_64-latest.args       | 50 +++++++++++++++++++
 tests/qemuxml2argvdata/blkdeviotune-max.xml   |  5 +-
 tests/qemuxml2argvtest.c                      | 14 +++---
 ... blkdeviotune-group-num.x86_64-latest.xml} |  0
 ...blkdeviotune-max-length.x86_64-latest.xml} |  0
 ...xml => blkdeviotune-max.x86_64-latest.xml} |  0
 ...une.xml => blkdeviotune.x86_64-latest.xml} |  7 ++-
 tests/qemuxml2xmltest.c                       |  8 +--
 15 files changed, 228 insertions(+), 44 deletions(-)
 rename tests/qemuxml2argvdata/{blkdeviotune-group-num.args => blkdeviotune-group-num.x86_64-4.1.0.args} (69%)
 create mode 100644 tests/qemuxml2argvdata/blkdeviotune-group-num.x86_64-latest.args
 rename tests/qemuxml2argvdata/{blkdeviotune-max-length.args => blkdeviotune-max-length.x86_64-4.1.0.args} (71%)
 create mode 100644 tests/qemuxml2argvdata/blkdeviotune-max-length.x86_64-latest.args
 rename tests/qemuxml2argvdata/{blkdeviotune-max.args => blkdeviotune-max.x86_64-4.1.0.args} (67%)
 create mode 100644 tests/qemuxml2argvdata/blkdeviotune-max.x86_64-latest.args
 rename tests/qemuxml2xmloutdata/{blkdeviotune-group-num.xml => blkdeviotune-group-num.x86_64-latest.xml} (100%)
 rename tests/qemuxml2xmloutdata/{blkdeviotune-max-length.xml => blkdeviotune-max-length.x86_64-latest.xml} (100%)
 rename tests/qemuxml2xmloutdata/{blkdeviotune-max.xml => blkdeviotune-max.x86_64-latest.xml} (100%)
 rename tests/qemuxml2xmloutdata/{blkdeviotune.xml => blkdeviotune.x86_64-latest.xml} (88%)

diff --git a/tests/qemuxml2argvdata/blkdeviotune-group-num.args b/tests/qemuxml2argvdata/blkdeviotune-group-num.x86_64-4.1.0.args
similarity index 69%
rename from tests/qemuxml2argvdata/blkdeviotune-group-num.args
rename to tests/qemuxml2argvdata/blkdeviotune-group-num.x86_64-4.1.0.args
index dfa7155b1e..8aa4c2be7d 100644
--- a/tests/qemuxml2argvdata/blkdeviotune-group-num.args
+++ b/tests/qemuxml2argvdata/blkdeviotune-group-num.x86_64-4.1.0.args
@@ -8,33 +8,41 @@ 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 \
--name QEMUGuest1 \
+-name guest=QEMUGuest1,debug-threads=on \
 -S \
--machine pc,accel=tcg,usb=off,dump-guest-core=off \
+-object secret,id=masterKey0,format=raw,\
+file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
+-machine pc-i440fx-4.1,accel=tcg,usb=off,dump-guest-core=off \
+-cpu qemu64 \
 -m 214 \
--realtime mlock=off \
+-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,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\
-server,nowait \
+-chardev socket,id=charmonitor,fd=1729,server,nowait \
 -mon chardev=charmonitor,id=monitor,mode=control \
 -rtc base=utc \
 -no-shutdown \
 -no-acpi \
--usb \
+-boot strict=on \
+-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
 -drive file=/dev/HostVG/QEMUGuest1,format=qcow2,if=none,id=drive-ide0-0-0,\
 cache=none,throttling.bps-total=5000,throttling.iops-total=6000,\
 throttling.bps-total-max=10000,throttling.iops-total-max=11000,\
 throttling.group=libvirt_iotune_group1 \
--device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
+-device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1,\
+write-cache=on \
 -drive file=/dev/HostVG/QEMUGuest2,format=qcow2,if=none,id=drive-ide0-0-1,\
 cache=none,throttling.bps-read=5000,throttling.bps-write=5500,\
 throttling.iops-read=3500,throttling.iops-write=4000,\
 throttling.bps-read-max=6000,throttling.bps-write-max=6500,\
 throttling.iops-read-max=7000,throttling.iops-write-max=7500,\
 throttling.iops-size=2000,throttling.group=libvirt_iotune_group2 \
--device ide-hd,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1 \
--device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
+-device ide-hd,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1,\
+write-cache=on \
+-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
+resourcecontrol=deny \
+-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/blkdeviotune-group-num.x86_64-latest.args b/tests/qemuxml2argvdata/blkdeviotune-group-num.x86_64-latest.args
new file mode 100644
index 0000000000..fe8a845aae
--- /dev/null
+++ b/tests/qemuxml2argvdata/blkdeviotune-group-num.x86_64-latest.args
@@ -0,0 +1,50 @@
+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-i386 \
+-name guest=QEMUGuest1,debug-threads=on \
+-S \
+-object secret,id=masterKey0,format=raw,\
+file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
+-machine pc,accel=tcg,usb=off,dump-guest-core=off \
+-cpu qemu64 \
+-m 214 \
+-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,nowait \
+-mon chardev=charmonitor,id=monitor,mode=control \
+-rtc base=utc \
+-no-shutdown \
+-no-acpi \
+-boot strict=on \
+-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
+-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1",\
+"node-name":"libvirt-2-storage","cache":{"direct":true,"no-flush":false},\
+"auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-2-format","read-only":false,\
+"cache":{"direct":true,"no-flush":false},"driver":"qcow2",\
+"file":"libvirt-2-storage"}' \
+-device ide-hd,bus=ide.0,unit=0,drive=libvirt-2-format,id=ide0-0-0,bootindex=1,\
+write-cache=on \
+-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest2",\
+"node-name":"libvirt-1-storage","cache":{"direct":true,"no-flush":false},\
+"auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-1-format","read-only":false,\
+"cache":{"direct":true,"no-flush":false},"driver":"qcow2",\
+"file":"libvirt-1-storage"}' \
+-device ide-hd,bus=ide.0,unit=1,drive=libvirt-1-format,id=ide0-0-1,\
+write-cache=on \
+-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
+resourcecontrol=deny \
+-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/blkdeviotune-group-num.xml b/tests/qemuxml2argvdata/blkdeviotune-group-num.xml
index c82430a1e9..7b43bfea87 100644
--- a/tests/qemuxml2argvdata/blkdeviotune-group-num.xml
+++ b/tests/qemuxml2argvdata/blkdeviotune-group-num.xml
@@ -8,6 +8,9 @@
     <type arch='i686' machine='pc'>hvm</type>
     <boot dev='hd'/>
   </os>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>qemu64</model>
+  </cpu>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
   <on_reboot>restart</on_reboot>
@@ -45,7 +48,7 @@
       </iotune>
       <address type='drive' controller='0' bus='0' target='0' unit='1'/>
     </disk>
-    <controller type='usb' index='0'>
+    <controller type='usb' index='0' model='piix3-uhci'>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
     </controller>
     <controller type='ide' index='0'>
diff --git a/tests/qemuxml2argvdata/blkdeviotune-max-length.args b/tests/qemuxml2argvdata/blkdeviotune-max-length.x86_64-4.1.0.args
similarity index 71%
rename from tests/qemuxml2argvdata/blkdeviotune-max-length.args
rename to tests/qemuxml2argvdata/blkdeviotune-max-length.x86_64-4.1.0.args
index 5d301a465d..b8416ef3b0 100644
--- a/tests/qemuxml2argvdata/blkdeviotune-max-length.args
+++ b/tests/qemuxml2argvdata/blkdeviotune-max-length.x86_64-4.1.0.args
@@ -8,28 +8,32 @@ 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 \
--name QEMUGuest1 \
+-name guest=QEMUGuest1,debug-threads=on \
 -S \
--machine pc,accel=tcg,usb=off,dump-guest-core=off \
+-object secret,id=masterKey0,format=raw,\
+file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
+-machine pc-i440fx-4.1,accel=tcg,usb=off,dump-guest-core=off \
+-cpu qemu64 \
 -m 214 \
--realtime mlock=off \
+-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,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\
-server,nowait \
+-chardev socket,id=charmonitor,fd=1729,server,nowait \
 -mon chardev=charmonitor,id=monitor,mode=control \
 -rtc base=utc \
 -no-shutdown \
 -no-acpi \
--usb \
+-boot strict=on \
+-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
 -drive file=/dev/HostVG/QEMUGuest1,format=qcow2,if=none,id=drive-ide0-0-0,\
 cache=none,throttling.bps-total=5000,throttling.iops-total=6000,\
 throttling.bps-total-max=10000,throttling.iops-total-max=11000,\
 throttling.bps-total-max-length=3,throttling.iops-total-max-length=5 \
--device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
+-device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1,\
+write-cache=on \
 -drive file=/dev/HostVG/QEMUGuest2,format=qcow2,if=none,id=drive-ide0-0-1,\
 cache=none,throttling.bps-read=5000,throttling.bps-write=5500,\
 throttling.iops-read=3500,throttling.iops-write=4000,\
@@ -38,5 +42,9 @@ throttling.iops-read-max=7000,throttling.iops-write-max=7500,\
 throttling.iops-size=2000,throttling.bps-read-max-length=3,\
 throttling.bps-write-max-length=5,throttling.iops-read-max-length=7,\
 throttling.iops-write-max-length=9 \
--device ide-hd,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1 \
--device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
+-device ide-hd,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1,\
+write-cache=on \
+-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
+resourcecontrol=deny \
+-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/blkdeviotune-max-length.x86_64-latest.args b/tests/qemuxml2argvdata/blkdeviotune-max-length.x86_64-latest.args
new file mode 100644
index 0000000000..fe8a845aae
--- /dev/null
+++ b/tests/qemuxml2argvdata/blkdeviotune-max-length.x86_64-latest.args
@@ -0,0 +1,50 @@
+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-i386 \
+-name guest=QEMUGuest1,debug-threads=on \
+-S \
+-object secret,id=masterKey0,format=raw,\
+file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
+-machine pc,accel=tcg,usb=off,dump-guest-core=off \
+-cpu qemu64 \
+-m 214 \
+-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,nowait \
+-mon chardev=charmonitor,id=monitor,mode=control \
+-rtc base=utc \
+-no-shutdown \
+-no-acpi \
+-boot strict=on \
+-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
+-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1",\
+"node-name":"libvirt-2-storage","cache":{"direct":true,"no-flush":false},\
+"auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-2-format","read-only":false,\
+"cache":{"direct":true,"no-flush":false},"driver":"qcow2",\
+"file":"libvirt-2-storage"}' \
+-device ide-hd,bus=ide.0,unit=0,drive=libvirt-2-format,id=ide0-0-0,bootindex=1,\
+write-cache=on \
+-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest2",\
+"node-name":"libvirt-1-storage","cache":{"direct":true,"no-flush":false},\
+"auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-1-format","read-only":false,\
+"cache":{"direct":true,"no-flush":false},"driver":"qcow2",\
+"file":"libvirt-1-storage"}' \
+-device ide-hd,bus=ide.0,unit=1,drive=libvirt-1-format,id=ide0-0-1,\
+write-cache=on \
+-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
+resourcecontrol=deny \
+-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/blkdeviotune-max-length.xml b/tests/qemuxml2argvdata/blkdeviotune-max-length.xml
index 83fea5c567..f891d15a81 100644
--- a/tests/qemuxml2argvdata/blkdeviotune-max-length.xml
+++ b/tests/qemuxml2argvdata/blkdeviotune-max-length.xml
@@ -8,6 +8,9 @@
     <type arch='i686' machine='pc'>hvm</type>
     <boot dev='hd'/>
   </os>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>qemu64</model>
+  </cpu>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
   <on_reboot>restart</on_reboot>
@@ -49,7 +52,7 @@
       </iotune>
       <address type='drive' controller='0' bus='0' target='0' unit='1'/>
     </disk>
-    <controller type='usb' index='0'>
+    <controller type='usb' index='0' model='piix3-uhci'>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
     </controller>
     <controller type='ide' index='0'>
diff --git a/tests/qemuxml2argvdata/blkdeviotune-max.args b/tests/qemuxml2argvdata/blkdeviotune-max.x86_64-4.1.0.args
similarity index 67%
rename from tests/qemuxml2argvdata/blkdeviotune-max.args
rename to tests/qemuxml2argvdata/blkdeviotune-max.x86_64-4.1.0.args
index 4548443377..b03fe20d30 100644
--- a/tests/qemuxml2argvdata/blkdeviotune-max.args
+++ b/tests/qemuxml2argvdata/blkdeviotune-max.x86_64-4.1.0.args
@@ -8,32 +8,40 @@ 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 \
--name QEMUGuest1 \
+-name guest=QEMUGuest1,debug-threads=on \
 -S \
--machine pc,accel=tcg,usb=off,dump-guest-core=off \
+-object secret,id=masterKey0,format=raw,\
+file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
+-machine pc-i440fx-4.1,accel=tcg,usb=off,dump-guest-core=off \
+-cpu qemu64 \
 -m 214 \
--realtime mlock=off \
+-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,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\
-server,nowait \
+-chardev socket,id=charmonitor,fd=1729,server,nowait \
 -mon chardev=charmonitor,id=monitor,mode=control \
 -rtc base=utc \
 -no-shutdown \
 -no-acpi \
--usb \
+-boot strict=on \
+-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
 -drive file=/dev/HostVG/QEMUGuest1,format=qcow2,if=none,id=drive-ide0-0-0,\
 cache=none,throttling.bps-total=5000,throttling.iops-total=6000,\
 throttling.bps-total-max=10000,throttling.iops-total-max=11000 \
--device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
+-device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1,\
+write-cache=on \
 -drive file=/dev/HostVG/QEMUGuest2,format=qcow2,if=none,id=drive-ide0-0-1,\
 cache=none,throttling.bps-read=5000,throttling.bps-write=5500,\
 throttling.iops-read=3500,throttling.iops-write=4000,\
 throttling.bps-read-max=6000,throttling.bps-write-max=6500,\
 throttling.iops-read-max=7000,throttling.iops-write-max=7500,\
 throttling.iops-size=2000 \
--device ide-hd,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1 \
--device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
+-device ide-hd,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1,\
+write-cache=on \
+-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
+resourcecontrol=deny \
+-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/blkdeviotune-max.x86_64-latest.args b/tests/qemuxml2argvdata/blkdeviotune-max.x86_64-latest.args
new file mode 100644
index 0000000000..fe8a845aae
--- /dev/null
+++ b/tests/qemuxml2argvdata/blkdeviotune-max.x86_64-latest.args
@@ -0,0 +1,50 @@
+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-i386 \
+-name guest=QEMUGuest1,debug-threads=on \
+-S \
+-object secret,id=masterKey0,format=raw,\
+file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
+-machine pc,accel=tcg,usb=off,dump-guest-core=off \
+-cpu qemu64 \
+-m 214 \
+-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,nowait \
+-mon chardev=charmonitor,id=monitor,mode=control \
+-rtc base=utc \
+-no-shutdown \
+-no-acpi \
+-boot strict=on \
+-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
+-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1",\
+"node-name":"libvirt-2-storage","cache":{"direct":true,"no-flush":false},\
+"auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-2-format","read-only":false,\
+"cache":{"direct":true,"no-flush":false},"driver":"qcow2",\
+"file":"libvirt-2-storage"}' \
+-device ide-hd,bus=ide.0,unit=0,drive=libvirt-2-format,id=ide0-0-0,bootindex=1,\
+write-cache=on \
+-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest2",\
+"node-name":"libvirt-1-storage","cache":{"direct":true,"no-flush":false},\
+"auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-1-format","read-only":false,\
+"cache":{"direct":true,"no-flush":false},"driver":"qcow2",\
+"file":"libvirt-1-storage"}' \
+-device ide-hd,bus=ide.0,unit=1,drive=libvirt-1-format,id=ide0-0-1,\
+write-cache=on \
+-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
+resourcecontrol=deny \
+-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/blkdeviotune-max.xml b/tests/qemuxml2argvdata/blkdeviotune-max.xml
index 3c604c2837..912f22e6cb 100644
--- a/tests/qemuxml2argvdata/blkdeviotune-max.xml
+++ b/tests/qemuxml2argvdata/blkdeviotune-max.xml
@@ -8,6 +8,9 @@
     <type arch='i686' machine='pc'>hvm</type>
     <boot dev='hd'/>
   </os>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>qemu64</model>
+  </cpu>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
   <on_reboot>restart</on_reboot>
@@ -43,7 +46,7 @@
       </iotune>
       <address type='drive' controller='0' bus='0' target='0' unit='1'/>
     </disk>
-    <controller type='usb' index='0'>
+    <controller type='usb' index='0' model='piix3-uhci'>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
     </controller>
     <controller type='ide' index='0'>
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 04febd1b0c..ff33870581 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -1826,14 +1826,12 @@ mymain(void)
     DO_TEST("numad-auto-memory-vcpu-cpuset", NONE);
     DO_TEST("numad-auto-memory-vcpu-no-cpuset-and-placement", NONE);
     DO_TEST("numad-static-memory-auto-vcpu", NONE);
-    DO_TEST("blkdeviotune-max",
-            QEMU_CAPS_DRIVE_IOTUNE_MAX);
-    DO_TEST("blkdeviotune-group-num",
-            QEMU_CAPS_DRIVE_IOTUNE_MAX,
-            QEMU_CAPS_DRIVE_IOTUNE_GROUP);
-    DO_TEST("blkdeviotune-max-length",
-            QEMU_CAPS_DRIVE_IOTUNE_MAX,
-            QEMU_CAPS_DRIVE_IOTUNE_MAX_LENGTH);
+    DO_TEST_CAPS_VER("blkdeviotune-max", "4.1.0");
+    DO_TEST_CAPS_LATEST("blkdeviotune-max");
+    DO_TEST_CAPS_VER("blkdeviotune-group-num", "4.1.0");
+    DO_TEST_CAPS_LATEST("blkdeviotune-group-num");
+    DO_TEST_CAPS_VER("blkdeviotune-max-length", "4.1.0");
+    DO_TEST_CAPS_LATEST("blkdeviotune-max-length");

     DO_TEST("multifunction-pci-device",
             QEMU_CAPS_SCSI_LSI);
diff --git a/tests/qemuxml2xmloutdata/blkdeviotune-group-num.xml b/tests/qemuxml2xmloutdata/blkdeviotune-group-num.x86_64-latest.xml
similarity index 100%
rename from tests/qemuxml2xmloutdata/blkdeviotune-group-num.xml
rename to tests/qemuxml2xmloutdata/blkdeviotune-group-num.x86_64-latest.xml
diff --git a/tests/qemuxml2xmloutdata/blkdeviotune-max-length.xml b/tests/qemuxml2xmloutdata/blkdeviotune-max-length.x86_64-latest.xml
similarity index 100%
rename from tests/qemuxml2xmloutdata/blkdeviotune-max-length.xml
rename to tests/qemuxml2xmloutdata/blkdeviotune-max-length.x86_64-latest.xml
diff --git a/tests/qemuxml2xmloutdata/blkdeviotune-max.xml b/tests/qemuxml2xmloutdata/blkdeviotune-max.x86_64-latest.xml
similarity index 100%
rename from tests/qemuxml2xmloutdata/blkdeviotune-max.xml
rename to tests/qemuxml2xmloutdata/blkdeviotune-max.x86_64-latest.xml
diff --git a/tests/qemuxml2xmloutdata/blkdeviotune.xml b/tests/qemuxml2xmloutdata/blkdeviotune.x86_64-latest.xml
similarity index 88%
rename from tests/qemuxml2xmloutdata/blkdeviotune.xml
rename to tests/qemuxml2xmloutdata/blkdeviotune.x86_64-latest.xml
index ed8c8809db..e27f61f2fd 100644
--- a/tests/qemuxml2xmloutdata/blkdeviotune.xml
+++ b/tests/qemuxml2xmloutdata/blkdeviotune.x86_64-latest.xml
@@ -8,6 +8,9 @@
     <type arch='i686' machine='pc'>hvm</type>
     <boot dev='hd'/>
   </os>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>qemu64</model>
+  </cpu>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
   <on_reboot>restart</on_reboot>
@@ -35,7 +38,7 @@
       </iotune>
       <address type='drive' controller='0' bus='0' target='0' unit='1'/>
     </disk>
-    <controller type='usb' index='0'>
+    <controller type='usb' index='0' model='piix3-uhci'>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
     </controller>
     <controller type='ide' index='0'>
@@ -45,7 +48,7 @@
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <memballoon model='virtio'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
     </memballoon>
   </devices>
 </domain>
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
index 86f3d2c1f3..8bfa23cddf 100644
--- a/tests/qemuxml2xmltest.c
+++ b/tests/qemuxml2xmltest.c
@@ -603,10 +603,10 @@ mymain(void)
     DO_TEST("usb-redir", NONE);
     DO_TEST("usb-redir-filter", NONE);
     DO_TEST("usb-redir-filter-version", NONE);
-    DO_TEST("blkdeviotune", NONE);
-    DO_TEST("blkdeviotune-max", NONE);
-    DO_TEST("blkdeviotune-group-num", NONE);
-    DO_TEST("blkdeviotune-max-length", NONE);
+    DO_TEST_CAPS_LATEST("blkdeviotune");
+    DO_TEST_CAPS_LATEST("blkdeviotune-max");
+    DO_TEST_CAPS_LATEST("blkdeviotune-group-num");
+    DO_TEST_CAPS_LATEST("blkdeviotune-max-length");
     DO_TEST("controller-usb-order",
             QEMU_CAPS_PIIX_DISABLE_S3,
             QEMU_CAPS_PIIX_DISABLE_S4);
-- 
2.26.2




More information about the libvir-list mailing list