From 90d36d625e04a90272cc3d65e671cdf197bcede2 Mon Sep 17 00:00:00 2001 From: Martin Kletzander Date: Thu, 12 May 2022 09:40:03 +0200 Subject: [PATCH] tests: Adjust for invalid qemu command combinations 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 Reviewed-by: Michal Privoznik --- .../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 d5d42384b1..ca1d3ac4ce 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 b0d69916e2..4fa37d994a 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 f38175a913..80594ebca6 100644 --- a/tests/qemuxml2argvdata/audio-spice-best.xml +++ b/tests/qemuxml2argvdata/audio-spice-best.xml @@ -30,6 +30,9 @@ + + + +