[libvirt PATCH 2/4] tests: Adjust for invalid qemu command combinations

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

 



Everything spice is not supported (and does not make sense) without spice
graphics.  For some tests I also added cirrus VGA capability so that the XML
stays simple and libvirt can guess a default video model rather than adding too
much of an irrelevant XML into the individual tests.

Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx>
---
 .../audio-spice-best.x86_64-4.1.0.args        |  3 +-
 .../audio-spice-best.x86_64-latest.args       |  3 +-
 tests/qemuxml2argvdata/audio-spice-best.xml   |  7 +++++
 .../audio-spice-full.x86_64-latest.args       |  3 +-
 tests/qemuxml2argvdata/audio-spice-full.xml   |  7 +++++
 .../audio-spice-minimal.x86_64-4.1.0.args     |  3 +-
 .../audio-spice-minimal.x86_64-latest.args    |  3 +-
 .../qemuxml2argvdata/audio-spice-minimal.xml  |  7 +++++
 .../channel-virtio-default.args               |  9 +++---
 .../channel-virtio-default.xml                |  1 +
 .../smartcard-passthrough-spicevmc.args       |  7 +++--
 .../smartcard-passthrough-spicevmc.xml        |  1 +
 tests/qemuxml2argvdata/usb-redir-boot.args    |  7 +++--
 tests/qemuxml2argvdata/usb-redir-boot.xml     |  1 +
 .../usb-redir-filter-version.args             |  7 +++--
 .../usb-redir-filter-version.xml              |  1 +
 tests/qemuxml2argvdata/usb-redir-filter.args  |  7 +++--
 tests/qemuxml2argvdata/usb-redir-filter.xml   |  1 +
 tests/qemuxml2argvdata/usb-redir.args         |  7 +++--
 tests/qemuxml2argvdata/usb-redir.xml          |  1 +
 tests/qemuxml2argvtest.c                      | 19 ++++++++----
 .../smartcard-passthrough-spicevmc.xml        | 11 +++++--
 .../usb-redir-filter-version.xml              | 11 +++++--
 tests/qemuxml2xmloutdata/usb-redir-filter.xml | 11 +++++--
 tests/qemuxml2xmloutdata/usb-redir.xml        | 11 +++++--
 tests/qemuxml2xmltest.c                       | 30 ++++++++++++++-----
 26 files changed, 134 insertions(+), 45 deletions(-)

diff --git a/tests/qemuxml2argvdata/audio-spice-best.x86_64-4.1.0.args b/tests/qemuxml2argvdata/audio-spice-best.x86_64-4.1.0.args
index d5d42384b1b5..ca1d3ac4cef0 100644
--- a/tests/qemuxml2argvdata/audio-spice-best.x86_64-4.1.0.args
+++ b/tests/qemuxml2argvdata/audio-spice-best.x86_64-4.1.0.args
@@ -28,7 +28,6 @@ QEMU_AUDIO_DAC_FIXED_FMT=f32 \
 -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 \
@@ -40,5 +39,7 @@ QEMU_AUDIO_DAC_FIXED_FMT=f32 \
 -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
 -drive file=/dev/cdrom,format=raw,if=none,id=drive-ide0-1-0,readonly=on \
 -device ide-cd,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0,bootindex=1 \
+-spice port=0,seamless-migration=on \
+-device cirrus-vga,id=video0,bus=pci.0,addr=0x2 \
 -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
 -msg timestamp=on
diff --git a/tests/qemuxml2argvdata/audio-spice-best.x86_64-latest.args b/tests/qemuxml2argvdata/audio-spice-best.x86_64-latest.args
index b0d69916e2cc..4fa37d994afb 100644
--- a/tests/qemuxml2argvdata/audio-spice-best.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/audio-spice-best.x86_64-latest.args
@@ -18,7 +18,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
 -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 \
@@ -32,5 +31,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
 -blockdev '{"node-name":"libvirt-1-format","read-only":true,"driver":"raw","file":"libvirt-1-storage"}' \
 -device '{"driver":"ide-cd","bus":"ide.1","unit":0,"drive":"libvirt-1-format","id":"ide0-1-0","bootindex":1}' \
 -audiodev '{"id":"audio1","driver":"spice","timer-period":50,"in":{"mixing-engine":true,"fixed-settings":true,"voices":1,"frequency":44100,"channels":2,"format":"s16"},"out":{"mixing-engine":true,"fixed-settings":true,"voices":2,"frequency":22050,"channels":4,"format":"f32"}}' \
+-spice port=0,seamless-migration=on \
+-device '{"driver":"cirrus-vga","id":"video0","bus":"pci.0","addr":"0x2"}' \
 -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
 -msg timestamp=on
diff --git a/tests/qemuxml2argvdata/audio-spice-best.xml b/tests/qemuxml2argvdata/audio-spice-best.xml
index f38175a913ee..80594ebca65c 100644
--- a/tests/qemuxml2argvdata/audio-spice-best.xml
+++ b/tests/qemuxml2argvdata/audio-spice-best.xml
@@ -30,6 +30,9 @@
     <controller type='pci' index='0' model='pci-root'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
+    <graphics type='spice'>
+      <listen type='none'/>
+    </graphics>
     <audio id='1' type='spice' timerPeriod='50'>
       <input mixingEngine='yes' fixedSettings='yes' voices='1'>
         <settings frequency='44100' channels='2' format='s16'/>
@@ -38,6 +41,10 @@
         <settings frequency='22050' channels='4' format='f32'/>
       </output>
     </audio>
+    <video>
+      <model type='cirrus' vram='16384' heads='1' primary='yes'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
+    </video>
     <memballoon model='none'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/audio-spice-full.x86_64-latest.args b/tests/qemuxml2argvdata/audio-spice-full.x86_64-latest.args
index 4ceeb99edcb8..f2d060bee789 100644
--- a/tests/qemuxml2argvdata/audio-spice-full.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/audio-spice-full.x86_64-latest.args
@@ -18,7 +18,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
 -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 \
@@ -32,5 +31,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
 -blockdev '{"node-name":"libvirt-1-format","read-only":true,"driver":"raw","file":"libvirt-1-storage"}' \
 -device '{"driver":"ide-cd","bus":"ide.1","unit":0,"drive":"libvirt-1-format","id":"ide0-1-0","bootindex":1}' \
 -audiodev '{"id":"audio1","driver":"spice","in":{"mixing-engine":true,"fixed-settings":true,"voices":1,"buffer-length":100,"frequency":44100,"channels":2,"format":"s16"},"out":{"mixing-engine":true,"fixed-settings":true,"voices":2,"buffer-length":200,"frequency":22050,"channels":4,"format":"f32"}}' \
+-spice port=0,seamless-migration=on \
+-device '{"driver":"cirrus-vga","id":"video0","bus":"pci.0","addr":"0x2"}' \
 -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
 -msg timestamp=on
diff --git a/tests/qemuxml2argvdata/audio-spice-full.xml b/tests/qemuxml2argvdata/audio-spice-full.xml
index c2893ac7feac..c9f00f8c8c32 100644
--- a/tests/qemuxml2argvdata/audio-spice-full.xml
+++ b/tests/qemuxml2argvdata/audio-spice-full.xml
@@ -30,6 +30,9 @@
     <controller type='pci' index='0' model='pci-root'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
+    <graphics type='spice'>
+      <listen type='none'/>
+    </graphics>
     <audio id='1' type='spice'>
       <input mixingEngine='yes' fixedSettings='yes' voices='1' bufferLength='100'>
         <settings frequency='44100' channels='2' format='s16'/>
@@ -38,6 +41,10 @@
         <settings frequency='22050' channels='4' format='f32'/>
       </output>
     </audio>
+    <video>
+      <model type='cirrus' vram='16384' heads='1' primary='yes'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
+    </video>
     <memballoon model='none'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/audio-spice-minimal.x86_64-4.1.0.args b/tests/qemuxml2argvdata/audio-spice-minimal.x86_64-4.1.0.args
index d8f19972f2bb..0a11d70486b6 100644
--- a/tests/qemuxml2argvdata/audio-spice-minimal.x86_64-4.1.0.args
+++ b/tests/qemuxml2argvdata/audio-spice-minimal.x86_64-4.1.0.args
@@ -17,7 +17,6 @@ QEMU_AUDIO_DRV=spice \
 -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 \
@@ -29,5 +28,7 @@ QEMU_AUDIO_DRV=spice \
 -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
 -drive file=/dev/cdrom,format=raw,if=none,id=drive-ide0-1-0,readonly=on \
 -device ide-cd,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0,bootindex=1 \
+-spice port=0,seamless-migration=on \
+-device cirrus-vga,id=video0,bus=pci.0,addr=0x2 \
 -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
 -msg timestamp=on
diff --git a/tests/qemuxml2argvdata/audio-spice-minimal.x86_64-latest.args b/tests/qemuxml2argvdata/audio-spice-minimal.x86_64-latest.args
index a4908c5e0dc6..4774ed0914e5 100644
--- a/tests/qemuxml2argvdata/audio-spice-minimal.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/audio-spice-minimal.x86_64-latest.args
@@ -18,7 +18,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
 -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 \
@@ -32,5 +31,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
 -blockdev '{"node-name":"libvirt-1-format","read-only":true,"driver":"raw","file":"libvirt-1-storage"}' \
 -device '{"driver":"ide-cd","bus":"ide.1","unit":0,"drive":"libvirt-1-format","id":"ide0-1-0","bootindex":1}' \
 -audiodev '{"id":"audio1","driver":"spice"}' \
+-spice port=0,seamless-migration=on \
+-device '{"driver":"cirrus-vga","id":"video0","bus":"pci.0","addr":"0x2"}' \
 -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
 -msg timestamp=on
diff --git a/tests/qemuxml2argvdata/audio-spice-minimal.xml b/tests/qemuxml2argvdata/audio-spice-minimal.xml
index 281a9cd164c8..d5fd97b9ac4b 100644
--- a/tests/qemuxml2argvdata/audio-spice-minimal.xml
+++ b/tests/qemuxml2argvdata/audio-spice-minimal.xml
@@ -30,7 +30,14 @@
     <controller type='pci' index='0' model='pci-root'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
+    <graphics type='spice'>
+      <listen type='none'/>
+    </graphics>
     <audio id='1' type='spice'/>
+    <video>
+      <model type='cirrus' vram='16384' heads='1' primary='yes'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
+    </video>
     <memballoon model='none'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/channel-virtio-default.args b/tests/qemuxml2argvdata/channel-virtio-default.args
index 61640bd5e7bb..b4e22e6c6b56 100644
--- a/tests/qemuxml2argvdata/channel-virtio-default.args
+++ b/tests/qemuxml2argvdata/channel-virtio-default.args
@@ -6,7 +6,7 @@ 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 \
+QEMU_AUDIO_DRV=spice \
 /usr/bin/qemu-system-i386 \
 -name guest=QEMUGuest1,debug-threads=on \
 -S \
@@ -17,7 +17,6 @@ QEMU_AUDIO_DRV=none \
 -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 \
@@ -27,7 +26,7 @@ QEMU_AUDIO_DRV=none \
 -no-acpi \
 -boot strict=on \
 -device virtio-serial-pci,id=virtio-serial1,bus=pci.0,addr=0xa \
--device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x2 \
+-device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x3 \
 -usb \
 -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
 -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
@@ -35,5 +34,7 @@ QEMU_AUDIO_DRV=none \
 -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0 \
 -chardev spicevmc,id=charchannel1,name=vdagent \
 -device virtserialport,bus=virtio-serial0.0,nr=2,chardev=charchannel1,id=channel1,name=com.redhat.spice.0 \
--device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \
+-spice port=0,seamless-migration=on \
+-device cirrus-vga,id=video0,bus=pci.0,addr=0x2 \
+-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 \
 -msg timestamp=on
diff --git a/tests/qemuxml2argvdata/channel-virtio-default.xml b/tests/qemuxml2argvdata/channel-virtio-default.xml
index aab9ce1a976f..28d0b218f8ea 100644
--- a/tests/qemuxml2argvdata/channel-virtio-default.xml
+++ b/tests/qemuxml2argvdata/channel-virtio-default.xml
@@ -31,6 +31,7 @@
     <channel type="spicevmc">
       <target type="virtio"/>
     </channel>
+    <graphics type='spice'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/smartcard-passthrough-spicevmc.args b/tests/qemuxml2argvdata/smartcard-passthrough-spicevmc.args
index 166f1f081be3..0de55f9d7192 100644
--- a/tests/qemuxml2argvdata/smartcard-passthrough-spicevmc.args
+++ b/tests/qemuxml2argvdata/smartcard-passthrough-spicevmc.args
@@ -6,7 +6,7 @@ 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 \
+QEMU_AUDIO_DRV=spice \
 /usr/bin/qemu-system-i386 \
 -name guest=QEMUGuest1,debug-threads=on \
 -S \
@@ -17,7 +17,6 @@ QEMU_AUDIO_DRV=none \
 -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 \
@@ -30,5 +29,7 @@ QEMU_AUDIO_DRV=none \
 -device usb-ccid,id=ccid0,bus=usb.0,port=1 \
 -chardev spicevmc,id=charsmartcard0,name=smartcard \
 -device ccid-card-passthru,chardev=charsmartcard0,id=smartcard0,bus=ccid0.0 \
--device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \
+-spice port=0,seamless-migration=on \
+-device cirrus-vga,id=video0,bus=pci.0,addr=0x2 \
+-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \
 -msg timestamp=on
diff --git a/tests/qemuxml2argvdata/smartcard-passthrough-spicevmc.xml b/tests/qemuxml2argvdata/smartcard-passthrough-spicevmc.xml
index c0baa1e34bc4..76e0597a769e 100644
--- a/tests/qemuxml2argvdata/smartcard-passthrough-spicevmc.xml
+++ b/tests/qemuxml2argvdata/smartcard-passthrough-spicevmc.xml
@@ -12,5 +12,6 @@
     <emulator>/usr/bin/qemu-system-i386</emulator>
     <smartcard mode='passthrough' type='spicevmc'/>
     <memballoon model='virtio'/>
+    <graphics type='spice'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/usb-redir-boot.args b/tests/qemuxml2argvdata/usb-redir-boot.args
index b4646a0cd8fe..59edb9705f2c 100644
--- a/tests/qemuxml2argvdata/usb-redir-boot.args
+++ b/tests/qemuxml2argvdata/usb-redir-boot.args
@@ -6,7 +6,7 @@ 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 \
+QEMU_AUDIO_DRV=spice \
 /usr/bin/qemu-system-i386 \
 -name guest=QEMUGuest1,debug-threads=on \
 -S \
@@ -17,7 +17,6 @@ QEMU_AUDIO_DRV=none \
 -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 \
@@ -30,9 +29,11 @@ QEMU_AUDIO_DRV=none \
 -device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,multifunction=on,addr=0x4 \
 -device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pci.0,addr=0x4.0x1 \
 -device ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pci.0,addr=0x4.0x2 \
+-spice port=0,seamless-migration=on \
+-device cirrus-vga,id=video0,bus=pci.0,addr=0x2 \
 -chardev socket,id=charredir0,host=localhost,port=4000 \
 -device usb-redir,chardev=charredir0,id=redir0,bootindex=1,bus=usb.0,port=1 \
 -chardev spicevmc,id=charredir1,name=usbredir \
 -device usb-redir,chardev=charredir1,id=redir1,bootindex=2,bus=usb.0,port=4 \
--device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \
+-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \
 -msg timestamp=on
diff --git a/tests/qemuxml2argvdata/usb-redir-boot.xml b/tests/qemuxml2argvdata/usb-redir-boot.xml
index 9fbcaa2256e1..f6db55ca8115 100644
--- a/tests/qemuxml2argvdata/usb-redir-boot.xml
+++ b/tests/qemuxml2argvdata/usb-redir-boot.xml
@@ -37,6 +37,7 @@
       <address type='usb' bus='0' port='4'/>
       <boot order='2'/>
     </redirdev>
+    <graphics type='spice'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/usb-redir-filter-version.args b/tests/qemuxml2argvdata/usb-redir-filter-version.args
index d033a639b63b..67e94716946f 100644
--- a/tests/qemuxml2argvdata/usb-redir-filter-version.args
+++ b/tests/qemuxml2argvdata/usb-redir-filter-version.args
@@ -6,7 +6,7 @@ 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 \
+QEMU_AUDIO_DRV=spice \
 /usr/bin/qemu-system-i386 \
 -name guest=QEMUGuest1,debug-threads=on \
 -S \
@@ -17,7 +17,6 @@ QEMU_AUDIO_DRV=none \
 -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 \
@@ -27,9 +26,11 @@ QEMU_AUDIO_DRV=none \
 -no-acpi \
 -boot strict=on \
 -usb \
+-spice port=0,seamless-migration=on \
+-device cirrus-vga,id=video0,bus=pci.0,addr=0x2 \
 -chardev spicevmc,id=charredir0,name=usbredir \
 -device 'usb-redir,chardev=charredir0,id=redir0,filter=0x08:0x15E1:0x2007:0x0109:1|0x08:0x15E1:0x2007:0x0940:1|-1:-1:-1:-1:0,bus=usb.0,port=1' \
 -chardev spicevmc,id=charredir1,name=usbredir \
 -device 'usb-redir,chardev=charredir1,id=redir1,filter=0x08:0x15E1:0x2007:0x0109:1|0x08:0x15E1:0x2007:0x0940:1|-1:-1:-1:-1:0,bus=usb.0,port=2' \
--device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \
+-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \
 -msg timestamp=on
diff --git a/tests/qemuxml2argvdata/usb-redir-filter-version.xml b/tests/qemuxml2argvdata/usb-redir-filter-version.xml
index 2e45517c2f57..35a63d8438c2 100644
--- a/tests/qemuxml2argvdata/usb-redir-filter-version.xml
+++ b/tests/qemuxml2argvdata/usb-redir-filter-version.xml
@@ -27,6 +27,7 @@
       <usbdev class='0x08' vendor='0x15E1' product='0x2007' version='9.4' allow='yes'/>
       <usbdev allow='no'/>
     </redirfilter>
+    <graphics type='spice'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/usb-redir-filter.args b/tests/qemuxml2argvdata/usb-redir-filter.args
index e45906eae0e2..9b00bc2a9fff 100644
--- a/tests/qemuxml2argvdata/usb-redir-filter.args
+++ b/tests/qemuxml2argvdata/usb-redir-filter.args
@@ -6,7 +6,7 @@ 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 \
+QEMU_AUDIO_DRV=spice \
 /usr/bin/qemu-system-i386 \
 -name guest=QEMUGuest1,debug-threads=on \
 -S \
@@ -17,7 +17,6 @@ QEMU_AUDIO_DRV=none \
 -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 \
@@ -30,9 +29,11 @@ QEMU_AUDIO_DRV=none \
 -device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,multifunction=on,addr=0x4 \
 -device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pci.0,addr=0x4.0x1 \
 -device ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pci.0,addr=0x4.0x2 \
+-spice port=0,seamless-migration=on \
+-device cirrus-vga,id=video0,bus=pci.0,addr=0x2 \
 -chardev spicevmc,id=charredir0,name=usbredir \
 -device 'usb-redir,chardev=charredir0,id=redir0,filter=0x08:0x15E1:0x2007:0x0110:1|-1:-1:-1:-1:0,bus=usb.0,port=4' \
 -chardev spicevmc,id=charredir1,name=usbredir \
 -device 'usb-redir,chardev=charredir1,id=redir1,filter=0x08:0x15E1:0x2007:0x0110:1|-1:-1:-1:-1:0,bus=usb.0,port=5' \
--device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \
+-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \
 -msg timestamp=on
diff --git a/tests/qemuxml2argvdata/usb-redir-filter.xml b/tests/qemuxml2argvdata/usb-redir-filter.xml
index 791725efb356..30a1c1d7bbea 100644
--- a/tests/qemuxml2argvdata/usb-redir-filter.xml
+++ b/tests/qemuxml2argvdata/usb-redir-filter.xml
@@ -29,6 +29,7 @@
       <master startport='4'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x2'/>
     </controller>
+    <graphics type='spice'/>
     <redirdev bus='usb' type='spicevmc'>
       <address type='usb' bus='0' port='4'/>
     </redirdev>
diff --git a/tests/qemuxml2argvdata/usb-redir.args b/tests/qemuxml2argvdata/usb-redir.args
index 2607860acb8a..d4eb6e137112 100644
--- a/tests/qemuxml2argvdata/usb-redir.args
+++ b/tests/qemuxml2argvdata/usb-redir.args
@@ -6,7 +6,7 @@ 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 \
+QEMU_AUDIO_DRV=spice \
 /usr/bin/qemu-system-i386 \
 -name guest=QEMUGuest1,debug-threads=on \
 -S \
@@ -17,7 +17,6 @@ QEMU_AUDIO_DRV=none \
 -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 \
@@ -30,9 +29,11 @@ QEMU_AUDIO_DRV=none \
 -device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,multifunction=on,addr=0x4 \
 -device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pci.0,addr=0x4.0x1 \
 -device ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pci.0,addr=0x4.0x2 \
+-spice port=0,seamless-migration=on \
+-device cirrus-vga,id=video0,bus=pci.0,addr=0x2 \
 -chardev socket,id=charredir0,host=localhost,port=4000 \
 -device usb-redir,chardev=charredir0,id=redir0,bus=usb.0,port=1 \
 -chardev spicevmc,id=charredir1,name=usbredir \
 -device usb-redir,chardev=charredir1,id=redir1,bus=usb.0,port=4 \
--device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \
+-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \
 -msg timestamp=on
diff --git a/tests/qemuxml2argvdata/usb-redir.xml b/tests/qemuxml2argvdata/usb-redir.xml
index b2c805dba8c7..c0758e59faaa 100644
--- a/tests/qemuxml2argvdata/usb-redir.xml
+++ b/tests/qemuxml2argvdata/usb-redir.xml
@@ -39,6 +39,7 @@
     <redirdev bus='usb' type='spicevmc'>
       <address type='usb' bus='0' port='4'/>
     </redirdev>
+    <graphics type='spice'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 4ad88f7bd8bb..829550fbfe38 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -1711,7 +1711,8 @@ mymain(void)
     DO_TEST_CAPS_LATEST("channel-qemu-vdagent");
     DO_TEST_CAPS_LATEST("channel-qemu-vdagent-features");
     DO_TEST("channel-virtio-default",
-            QEMU_CAPS_SPICE);
+            QEMU_CAPS_SPICE,
+            QEMU_CAPS_DEVICE_CIRRUS_VGA);
     DO_TEST_NOCAPS("channel-virtio-unix");
 
     DO_TEST("smartcard-host",
@@ -1723,7 +1724,9 @@ mymain(void)
     DO_TEST("smartcard-passthrough-tcp",
             QEMU_CAPS_CCID_PASSTHRU);
     DO_TEST("smartcard-passthrough-spicevmc",
-            QEMU_CAPS_CCID_PASSTHRU);
+            QEMU_CAPS_CCID_PASSTHRU,
+            QEMU_CAPS_SPICE,
+            QEMU_CAPS_DEVICE_CIRRUS_VGA);
     DO_TEST("smartcard-controller",
             QEMU_CAPS_CCID_EMULATED);
     DO_TEST_CAPS_LATEST("smartcard-passthrough-unix");
@@ -1776,22 +1779,26 @@ mymain(void)
             QEMU_CAPS_USB_HUB,
             QEMU_CAPS_ICH9_USB_EHCI1,
             QEMU_CAPS_USB_REDIR,
-            QEMU_CAPS_SPICE);
+            QEMU_CAPS_SPICE,
+            QEMU_CAPS_DEVICE_CIRRUS_VGA);
     DO_TEST("usb-redir-boot",
             QEMU_CAPS_USB_HUB,
             QEMU_CAPS_ICH9_USB_EHCI1,
             QEMU_CAPS_USB_REDIR,
-            QEMU_CAPS_SPICE);
+            QEMU_CAPS_SPICE,
+            QEMU_CAPS_DEVICE_CIRRUS_VGA);
     DO_TEST("usb-redir-filter",
             QEMU_CAPS_USB_HUB,
             QEMU_CAPS_ICH9_USB_EHCI1,
             QEMU_CAPS_USB_REDIR,
             QEMU_CAPS_SPICE,
-            QEMU_CAPS_USB_REDIR_FILTER);
+            QEMU_CAPS_USB_REDIR_FILTER,
+            QEMU_CAPS_DEVICE_CIRRUS_VGA);
     DO_TEST("usb-redir-filter-version",
             QEMU_CAPS_USB_REDIR,
             QEMU_CAPS_SPICE,
-            QEMU_CAPS_USB_REDIR_FILTER);
+            QEMU_CAPS_USB_REDIR_FILTER,
+            QEMU_CAPS_DEVICE_CIRRUS_VGA);
     DO_TEST_CAPS_LATEST("usb-redir-unix");
     DO_TEST("usb1-usb2",
             QEMU_CAPS_PIIX3_USB_UHCI,
diff --git a/tests/qemuxml2xmloutdata/smartcard-passthrough-spicevmc.xml b/tests/qemuxml2xmloutdata/smartcard-passthrough-spicevmc.xml
index 9263d1741b16..f1463f2b0dff 100644
--- a/tests/qemuxml2xmloutdata/smartcard-passthrough-spicevmc.xml
+++ b/tests/qemuxml2xmloutdata/smartcard-passthrough-spicevmc.xml
@@ -24,9 +24,16 @@
     </smartcard>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
-    <audio id='1' type='none'/>
-    <memballoon model='virtio'>
+    <graphics type='spice'>
+      <listen type='none'/>
+    </graphics>
+    <audio id='1' type='spice'/>
+    <video>
+      <model type='cirrus' vram='16384' heads='1' primary='yes'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
+    </video>
+    <memballoon model='virtio'>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
     </memballoon>
   </devices>
 </domain>
diff --git a/tests/qemuxml2xmloutdata/usb-redir-filter-version.xml b/tests/qemuxml2xmloutdata/usb-redir-filter-version.xml
index 19561a1c021b..4e5ebca1897b 100644
--- a/tests/qemuxml2xmloutdata/usb-redir-filter-version.xml
+++ b/tests/qemuxml2xmloutdata/usb-redir-filter-version.xml
@@ -20,7 +20,14 @@
     <controller type='pci' index='0' model='pci-root'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
-    <audio id='1' type='none'/>
+    <graphics type='spice'>
+      <listen type='none'/>
+    </graphics>
+    <audio id='1' type='spice'/>
+    <video>
+      <model type='cirrus' vram='16384' heads='1' primary='yes'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
+    </video>
     <redirdev bus='usb' type='spicevmc'>
       <address type='usb' bus='0' port='1'/>
     </redirdev>
@@ -33,7 +40,7 @@
       <usbdev allow='no'/>
     </redirfilter>
     <memballoon model='virtio'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
     </memballoon>
   </devices>
 </domain>
diff --git a/tests/qemuxml2xmloutdata/usb-redir-filter.xml b/tests/qemuxml2xmloutdata/usb-redir-filter.xml
index ac5a1c509156..d857a89289cc 100644
--- a/tests/qemuxml2xmloutdata/usb-redir-filter.xml
+++ b/tests/qemuxml2xmloutdata/usb-redir-filter.xml
@@ -32,7 +32,14 @@
     <controller type='pci' index='0' model='pci-root'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
-    <audio id='1' type='none'/>
+    <graphics type='spice'>
+      <listen type='none'/>
+    </graphics>
+    <audio id='1' type='spice'/>
+    <video>
+      <model type='cirrus' vram='16384' heads='1' primary='yes'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
+    </video>
     <redirdev bus='usb' type='spicevmc'>
       <address type='usb' bus='0' port='4'/>
     </redirdev>
@@ -44,7 +51,7 @@
       <usbdev allow='no'/>
     </redirfilter>
     <memballoon model='virtio'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
     </memballoon>
   </devices>
 </domain>
diff --git a/tests/qemuxml2xmloutdata/usb-redir.xml b/tests/qemuxml2xmloutdata/usb-redir.xml
index c57ccc8d4730..95f4d6a1df90 100644
--- a/tests/qemuxml2xmloutdata/usb-redir.xml
+++ b/tests/qemuxml2xmloutdata/usb-redir.xml
@@ -32,7 +32,14 @@
     <controller type='pci' index='0' model='pci-root'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
-    <audio id='1' type='none'/>
+    <graphics type='spice'>
+      <listen type='none'/>
+    </graphics>
+    <audio id='1' type='spice'/>
+    <video>
+      <model type='cirrus' vram='16384' heads='1' primary='yes'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
+    </video>
     <redirdev bus='usb' type='tcp'>
       <source mode='connect' host='localhost' service='4000'/>
       <protocol type='raw'/>
@@ -41,7 +48,7 @@
       <address type='usb' bus='0' port='4'/>
     </redirdev>
     <memballoon model='virtio'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
     </memballoon>
   </devices>
 </domain>
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
index dbcbcc21624e..8b655874d130 100644
--- a/tests/qemuxml2xmltest.c
+++ b/tests/qemuxml2xmltest.c
@@ -613,13 +613,19 @@ mymain(void)
             QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
             QEMU_CAPS_PIIX3_USB_UHCI);
     DO_TEST("usb-port-missing", QEMU_CAPS_USB_HUB);
-    DO_TEST("usb-redir", QEMU_CAPS_USB_REDIR);
+    DO_TEST("usb-redir", QEMU_CAPS_USB_REDIR,
+            QEMU_CAPS_SPICE,
+            QEMU_CAPS_DEVICE_CIRRUS_VGA);
     DO_TEST("usb-redir-filter",
             QEMU_CAPS_USB_REDIR,
-            QEMU_CAPS_USB_REDIR_FILTER);
+            QEMU_CAPS_USB_REDIR_FILTER,
+            QEMU_CAPS_SPICE,
+            QEMU_CAPS_DEVICE_CIRRUS_VGA);
     DO_TEST("usb-redir-filter-version",
             QEMU_CAPS_USB_REDIR,
-            QEMU_CAPS_USB_REDIR_FILTER);
+            QEMU_CAPS_USB_REDIR_FILTER,
+            QEMU_CAPS_SPICE,
+            QEMU_CAPS_DEVICE_CIRRUS_VGA);
     DO_TEST_CAPS_LATEST("blkdeviotune");
     DO_TEST_CAPS_LATEST("blkdeviotune-max");
     DO_TEST_CAPS_LATEST("blkdeviotune-group-num");
@@ -1301,7 +1307,10 @@ mymain(void)
     DO_TEST("smartcard-host-certificates-database",
             QEMU_CAPS_CCID_EMULATED);
     DO_TEST("smartcard-passthrough-tcp", QEMU_CAPS_CCID_PASSTHRU);
-    DO_TEST("smartcard-passthrough-spicevmc", QEMU_CAPS_CCID_PASSTHRU);
+    DO_TEST("smartcard-passthrough-spicevmc",
+            QEMU_CAPS_CCID_PASSTHRU,
+            QEMU_CAPS_SPICE,
+            QEMU_CAPS_DEVICE_CIRRUS_VGA);
     DO_TEST("smartcard-controller", QEMU_CAPS_CCID_EMULATED);
 
     DO_TEST("pseries-cpu-compat-power9",
@@ -1402,7 +1411,9 @@ mymain(void)
     DO_TEST_NOCAPS("audio-oss-minimal");
     DO_TEST_NOCAPS("audio-pulseaudio-minimal");
     DO_TEST_NOCAPS("audio-sdl-minimal");
-    DO_TEST_NOCAPS("audio-spice-minimal");
+    DO_TEST("audio-spice-minimal",
+            QEMU_CAPS_SPICE,
+            QEMU_CAPS_DEVICE_CIRRUS_VGA);
     DO_TEST_NOCAPS("audio-file-minimal");
 
     /* Best <audio> still compat with old ENV */
@@ -1412,7 +1423,9 @@ mymain(void)
     DO_TEST_NOCAPS("audio-oss-best");
     DO_TEST_NOCAPS("audio-pulseaudio-best");
     DO_TEST_NOCAPS("audio-sdl-best");
-    DO_TEST_NOCAPS("audio-spice-best");
+    DO_TEST("audio-spice-best",
+            QEMU_CAPS_SPICE,
+            QEMU_CAPS_DEVICE_CIRRUS_VGA);
     DO_TEST_NOCAPS("audio-file-best");
 
     /* Full <audio> only compat with new QEMU -audiodev args */
@@ -1423,7 +1436,10 @@ mymain(void)
     DO_TEST("audio-oss-full", QEMU_CAPS_AUDIODEV);
     DO_TEST("audio-pulseaudio-full", QEMU_CAPS_AUDIODEV);
     DO_TEST("audio-sdl-full", QEMU_CAPS_AUDIODEV);
-    DO_TEST("audio-spice-full", QEMU_CAPS_AUDIODEV);
+    DO_TEST("audio-spice-full",
+            QEMU_CAPS_AUDIODEV,
+            QEMU_CAPS_SPICE,
+            QEMU_CAPS_DEVICE_CIRRUS_VGA);
     DO_TEST("audio-file-full", QEMU_CAPS_AUDIODEV);
 
     DO_TEST_CAPS_LATEST("audio-many-backends");
-- 
2.35.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