The tests prefixed default-video* were enabled only for the xml2xml testing and used impossible configurations. Enable them for xml2argv testing fix them: 1) aarch64: remove pointless cpu mode 2) s390x: remove pointless cpu and use existing machine type 3) riscv: remove pointless cpu 4) x86: remove pointless cpu and use existing machine type 5) ppc65: use correct machine type and enable USB Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- ...ult-video-type-aarch64.aarch64-latest.args | 35 +++++++++++++++++++ .../default-video-type-aarch64.xml | 1 - ...default-video-type-ppc64.ppc64-latest.args | 35 +++++++++++++++++++ .../default-video-type-ppc64.xml | 3 +- ...ult-video-type-riscv64.riscv64-latest.args | 34 ++++++++++++++++++ .../default-video-type-riscv64.xml | 1 - ...default-video-type-s390x.s390x-latest.args | 31 ++++++++++++++++ .../default-video-type-s390x.xml | 3 +- .../default-video-type-x86_64-caps-test-0.xml | 3 +- .../default-video-type-x86_64-caps-test-1.xml | 3 +- tests/qemuxml2argvtest.c | 5 +++ ...ault-video-type-aarch64.aarch64-latest.xml | 1 - .../default-video-type-ppc64.ppc64-latest.xml | 14 +++++--- ...ault-video-type-riscv64.riscv64-latest.xml | 1 - .../default-video-type-s390x.s390x-latest.xml | 7 ++-- .../default-video-type-x86_64-caps-test-0.xml | 5 ++- .../default-video-type-x86_64-caps-test-1.xml | 5 ++- 17 files changed, 160 insertions(+), 27 deletions(-) create mode 100644 tests/qemuxml2argvdata/default-video-type-aarch64.aarch64-latest.args create mode 100644 tests/qemuxml2argvdata/default-video-type-ppc64.ppc64-latest.args create mode 100644 tests/qemuxml2argvdata/default-video-type-riscv64.riscv64-latest.args create mode 100644 tests/qemuxml2argvdata/default-video-type-s390x.s390x-latest.args diff --git a/tests/qemuxml2argvdata/default-video-type-aarch64.aarch64-latest.args b/tests/qemuxml2argvdata/default-video-type-aarch64.aarch64-latest.args new file mode 100644 index 0000000000..4eaeaa5436 --- /dev/null +++ b/tests/qemuxml2argvdata/default-video-type-aarch64.aarch64-latest.args @@ -0,0 +1,35 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/tmp/lib/domain--1-default-video-type-a \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/tmp/lib/domain--1-default-video-type-a/.local/share \ +XDG_CACHE_HOME=/tmp/lib/domain--1-default-video-type-a/.cache \ +XDG_CONFIG_HOME=/tmp/lib/domain--1-default-video-type-a/.config \ +QEMU_AUDIO_DRV=none \ +/usr/bin/qemu-system-aarch64 \ +-name guest=default-video-type-aarch64-test,debug-threads=on \ +-S \ +-object secret,id=masterKey0,format=raw,\ +file=/tmp/lib/domain--1-default-video-type-a/master-key.aes \ +-machine virt,accel=kvm,usb=off,dump-guest-core=off,gic-version=3 \ +-m 1024 \ +-overcommit mem-lock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid 6ba410c5-1e5c-4d57-bee7-2228e7ffa32f \ +-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 pcie-root-port,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,\ +addr=0x1 \ +-device pcie-root-port,port=0x9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \ +-vnc 127.0.0.1:0 \ +-device virtio-gpu-pci,id=video0,max_outputs=1,bus=pci.1,addr=0x0 \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\ +resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/default-video-type-aarch64.xml b/tests/qemuxml2argvdata/default-video-type-aarch64.xml index f7d2d5d94a..5c008813cc 100644 --- a/tests/qemuxml2argvdata/default-video-type-aarch64.xml +++ b/tests/qemuxml2argvdata/default-video-type-aarch64.xml @@ -6,7 +6,6 @@ <os> <type arch='aarch64' machine='virt'>hvm</type> </os> - <cpu mode='host-passthrough'/> <devices> <emulator>/usr/bin/qemu-system-aarch64</emulator> <controller type='usb' index='0' model='none'/> diff --git a/tests/qemuxml2argvdata/default-video-type-ppc64.ppc64-latest.args b/tests/qemuxml2argvdata/default-video-type-ppc64.ppc64-latest.args new file mode 100644 index 0000000000..795c5a5c58 --- /dev/null +++ b/tests/qemuxml2argvdata/default-video-type-ppc64.ppc64-latest.args @@ -0,0 +1,35 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/tmp/lib/domain--1-default-video-type-p \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/tmp/lib/domain--1-default-video-type-p/.local/share \ +XDG_CACHE_HOME=/tmp/lib/domain--1-default-video-type-p/.cache \ +XDG_CONFIG_HOME=/tmp/lib/domain--1-default-video-type-p/.config \ +QEMU_AUDIO_DRV=none \ +/usr/bin/qemu-system-ppc64 \ +-name guest=default-video-type-ppc64-test,debug-threads=on \ +-S \ +-object secret,id=masterKey0,format=raw,\ +file=/tmp/lib/domain--1-default-video-type-p/master-key.aes \ +-machine pseries,accel=kvm,usb=off,dump-guest-core=off \ +-cpu host \ +-m 1024 \ +-overcommit mem-lock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid 6ba410c5-1e5c-4d57-bee7-2228e7ffa32f \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,fd=1729,server,nowait \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-boot strict=on \ +-device pci-ohci,id=usb,bus=pci.0,addr=0x1 \ +-device usb-kbd,id=input0,bus=usb.0,port=1 \ +-device usb-mouse,id=input1,bus=usb.0,port=2 \ +-vnc 127.0.0.1:0 \ +-device VGA,id=video0,vgamem_mb=16,bus=pci.0,addr=0x2 \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\ +resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/default-video-type-ppc64.xml b/tests/qemuxml2argvdata/default-video-type-ppc64.xml index ea5b966cfd..6f9ccdbaf1 100644 --- a/tests/qemuxml2argvdata/default-video-type-ppc64.xml +++ b/tests/qemuxml2argvdata/default-video-type-ppc64.xml @@ -4,12 +4,11 @@ <memory unit='KiB'>1048576</memory> <vcpu placement='static'>1</vcpu> <os> - <type arch='ppc64' machine='virt'>hvm</type> + <type arch='ppc64' machine='pseries'>hvm</type> </os> <cpu mode='host-passthrough'/> <devices> <emulator>/usr/bin/qemu-system-ppc64</emulator> - <controller type='usb' index='0' model='none'/> <memballoon model='none'/> <graphics type='vnc'/> </devices> diff --git a/tests/qemuxml2argvdata/default-video-type-riscv64.riscv64-latest.args b/tests/qemuxml2argvdata/default-video-type-riscv64.riscv64-latest.args new file mode 100644 index 0000000000..c4acaaff0f --- /dev/null +++ b/tests/qemuxml2argvdata/default-video-type-riscv64.riscv64-latest.args @@ -0,0 +1,34 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/tmp/lib/domain--1-default-video-type-r \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/tmp/lib/domain--1-default-video-type-r/.local/share \ +XDG_CACHE_HOME=/tmp/lib/domain--1-default-video-type-r/.cache \ +XDG_CONFIG_HOME=/tmp/lib/domain--1-default-video-type-r/.config \ +QEMU_AUDIO_DRV=spice \ +/usr/bin/qemu-system-riscv64 \ +-name guest=default-video-type-riscv64-test,debug-threads=on \ +-S \ +-object secret,id=masterKey0,format=raw,\ +file=/tmp/lib/domain--1-default-video-type-r/master-key.aes \ +-machine virt,accel=tcg,usb=off,dump-guest-core=off \ +-m 1024 \ +-overcommit mem-lock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid 6ba410c5-1e5c-4d57-bee7-2228e7ffa32f \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,fd=1729,server,nowait \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-boot strict=on \ +-device pcie-root-port,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,\ +addr=0x1 \ +-device pcie-root-port,port=0x9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \ +-spice port=0,seamless-migration=on \ +-device virtio-gpu-pci,id=video0,max_outputs=1,bus=pci.1,addr=0x0 \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\ +resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/default-video-type-riscv64.xml b/tests/qemuxml2argvdata/default-video-type-riscv64.xml index 55f6fa9391..97e239f5ea 100644 --- a/tests/qemuxml2argvdata/default-video-type-riscv64.xml +++ b/tests/qemuxml2argvdata/default-video-type-riscv64.xml @@ -6,7 +6,6 @@ <os> <type arch='riscv64' machine='virt'>hvm</type> </os> - <cpu mode='host-passthrough'/> <devices> <emulator>/usr/bin/qemu-system-riscv64</emulator> <controller type='usb' index='0' model='none'/> diff --git a/tests/qemuxml2argvdata/default-video-type-s390x.s390x-latest.args b/tests/qemuxml2argvdata/default-video-type-s390x.s390x-latest.args new file mode 100644 index 0000000000..441270d3d9 --- /dev/null +++ b/tests/qemuxml2argvdata/default-video-type-s390x.s390x-latest.args @@ -0,0 +1,31 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/tmp/lib/domain--1-default-video-type-s \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/tmp/lib/domain--1-default-video-type-s/.local/share \ +XDG_CACHE_HOME=/tmp/lib/domain--1-default-video-type-s/.cache \ +XDG_CONFIG_HOME=/tmp/lib/domain--1-default-video-type-s/.config \ +QEMU_AUDIO_DRV=none \ +/usr/bin/qemu-system-s390x \ +-name guest=default-video-type-s390x-test,debug-threads=on \ +-S \ +-object secret,id=masterKey0,format=raw,\ +file=/tmp/lib/domain--1-default-video-type-s/master-key.aes \ +-machine s390-ccw-virtio,accel=kvm,usb=off,dump-guest-core=off \ +-m 1024 \ +-overcommit mem-lock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid 6ba410c5-1e5c-4d57-bee7-2228e7ffa32f \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,fd=1729,server,nowait \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-boot strict=on \ +-vnc 127.0.0.1:0 \ +-device virtio-gpu-ccw,id=video0,max_outputs=1,devno=fe.0.0000 \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\ +resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/default-video-type-s390x.xml b/tests/qemuxml2argvdata/default-video-type-s390x.xml index fe402d2c7f..275b4c21a3 100644 --- a/tests/qemuxml2argvdata/default-video-type-s390x.xml +++ b/tests/qemuxml2argvdata/default-video-type-s390x.xml @@ -4,9 +4,8 @@ <memory unit='KiB'>1048576</memory> <vcpu placement='static'>1</vcpu> <os> - <type arch='s390x' machine='virt'>hvm</type> + <type arch='s390x' machine='s390-ccw-virtio'>hvm</type> </os> - <cpu mode='host-passthrough'/> <devices> <emulator>/usr/bin/qemu-system-s390x</emulator> <controller type='usb' index='0' model='none'/> diff --git a/tests/qemuxml2argvdata/default-video-type-x86_64-caps-test-0.xml b/tests/qemuxml2argvdata/default-video-type-x86_64-caps-test-0.xml index 2c753fe227..2142db8d1f 100644 --- a/tests/qemuxml2argvdata/default-video-type-x86_64-caps-test-0.xml +++ b/tests/qemuxml2argvdata/default-video-type-x86_64-caps-test-0.xml @@ -4,9 +4,8 @@ <memory unit='KiB'>1048576</memory> <vcpu placement='static'>1</vcpu> <os> - <type arch='x86_64' machine='virt'>hvm</type> + <type arch='x86_64' machine='pc'>hvm</type> </os> - <cpu mode='host-passthrough'/> <devices> <emulator>/usr/bin/qemu-system-x86_64</emulator> <controller type='usb' index='0' model='none'/> diff --git a/tests/qemuxml2argvdata/default-video-type-x86_64-caps-test-1.xml b/tests/qemuxml2argvdata/default-video-type-x86_64-caps-test-1.xml index 2c753fe227..2142db8d1f 100644 --- a/tests/qemuxml2argvdata/default-video-type-x86_64-caps-test-1.xml +++ b/tests/qemuxml2argvdata/default-video-type-x86_64-caps-test-1.xml @@ -4,9 +4,8 @@ <memory unit='KiB'>1048576</memory> <vcpu placement='static'>1</vcpu> <os> - <type arch='x86_64' machine='virt'>hvm</type> + <type arch='x86_64' machine='pc'>hvm</type> </os> - <cpu mode='host-passthrough'/> <devices> <emulator>/usr/bin/qemu-system-x86_64</emulator> <controller type='usb' index='0' model='none'/> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 700f3878e4..4e57a834fc 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2112,6 +2112,11 @@ mymain(void) DO_TEST_PARSE_ERROR("video-invalid-multiple-devices", NONE); DO_TEST_PARSE_ERROR("default-video-type-x86_64-caps-test-0", NONE); + DO_TEST_CAPS_ARCH_LATEST("default-video-type-aarch64", "aarch64"); + DO_TEST_CAPS_ARCH_LATEST("default-video-type-ppc64", "ppc64"); + DO_TEST_CAPS_ARCH_LATEST("default-video-type-riscv64", "riscv64"); + DO_TEST_CAPS_ARCH_LATEST("default-video-type-s390x", "s390x"); + DO_TEST("virtio-rng-default", QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_OBJECT_RNG_RANDOM); diff --git a/tests/qemuxml2xmloutdata/default-video-type-aarch64.aarch64-latest.xml b/tests/qemuxml2xmloutdata/default-video-type-aarch64.aarch64-latest.xml index 1efea62f6f..a47435163f 100644 --- a/tests/qemuxml2xmloutdata/default-video-type-aarch64.aarch64-latest.xml +++ b/tests/qemuxml2xmloutdata/default-video-type-aarch64.aarch64-latest.xml @@ -11,7 +11,6 @@ <features> <gic version='3'/> </features> - <cpu mode='host-passthrough' check='none'/> <clock offset='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> diff --git a/tests/qemuxml2xmloutdata/default-video-type-ppc64.ppc64-latest.xml b/tests/qemuxml2xmloutdata/default-video-type-ppc64.ppc64-latest.xml index 6c4bd5ef8b..52bf8a1590 100644 --- a/tests/qemuxml2xmloutdata/default-video-type-ppc64.ppc64-latest.xml +++ b/tests/qemuxml2xmloutdata/default-video-type-ppc64.ppc64-latest.xml @@ -5,7 +5,7 @@ <currentMemory unit='KiB'>1048576</currentMemory> <vcpu placement='static'>1</vcpu> <os> - <type arch='ppc64' machine='virt'>hvm</type> + <type arch='ppc64' machine='pseries'>hvm</type> <boot dev='hd'/> </os> <cpu mode='host-passthrough' check='none'/> @@ -15,8 +15,13 @@ <on_crash>destroy</on_crash> <devices> <emulator>/usr/bin/qemu-system-ppc64</emulator> - <controller type='usb' index='0' model='none'/> - <controller type='pci' index='0' model='pci-root'/> + <controller type='usb' index='0' model='pci-ohci'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/> + </controller> + <controller type='pci' index='0' model='pci-root'> + <model name='spapr-pci-host-bridge'/> + <target index='0'/> + </controller> <input type='keyboard' bus='usb'/> <input type='mouse' bus='usb'/> <graphics type='vnc' port='-1' autoport='yes'> @@ -24,8 +29,9 @@ </graphics> <video> <model type='vga' vram='16384' heads='1' primary='yes'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> </video> <memballoon model='none'/> + <panic model='pseries'/> </devices> </domain> diff --git a/tests/qemuxml2xmloutdata/default-video-type-riscv64.riscv64-latest.xml b/tests/qemuxml2xmloutdata/default-video-type-riscv64.riscv64-latest.xml index ebb3bfe980..56d4b34ab7 100644 --- a/tests/qemuxml2xmloutdata/default-video-type-riscv64.riscv64-latest.xml +++ b/tests/qemuxml2xmloutdata/default-video-type-riscv64.riscv64-latest.xml @@ -8,7 +8,6 @@ <type arch='riscv64' machine='virt'>hvm</type> <boot dev='hd'/> </os> - <cpu mode='host-passthrough' check='none'/> <clock offset='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> diff --git a/tests/qemuxml2xmloutdata/default-video-type-s390x.s390x-latest.xml b/tests/qemuxml2xmloutdata/default-video-type-s390x.s390x-latest.xml index d4ccf82712..b12d768eab 100644 --- a/tests/qemuxml2xmloutdata/default-video-type-s390x.s390x-latest.xml +++ b/tests/qemuxml2xmloutdata/default-video-type-s390x.s390x-latest.xml @@ -5,10 +5,9 @@ <currentMemory unit='KiB'>1048576</currentMemory> <vcpu placement='static'>1</vcpu> <os> - <type arch='s390x' machine='virt'>hvm</type> + <type arch='s390x' machine='s390-ccw-virtio'>hvm</type> <boot dev='hd'/> </os> - <cpu mode='host-passthrough' check='none'/> <clock offset='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> @@ -22,9 +21,7 @@ </graphics> <video> <model type='virtio' heads='1' primary='yes'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'> - <zpci uid='0x0001' fid='0x00000000'/> - </address> + <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0000'/> </video> <memballoon model='none'/> <panic model='s390'/> diff --git a/tests/qemuxml2xmloutdata/default-video-type-x86_64-caps-test-0.xml b/tests/qemuxml2xmloutdata/default-video-type-x86_64-caps-test-0.xml index 645019c230..47b2c7cbc9 100644 --- a/tests/qemuxml2xmloutdata/default-video-type-x86_64-caps-test-0.xml +++ b/tests/qemuxml2xmloutdata/default-video-type-x86_64-caps-test-0.xml @@ -5,10 +5,9 @@ <currentMemory unit='KiB'>1048576</currentMemory> <vcpu placement='static'>1</vcpu> <os> - <type arch='x86_64' machine='virt'>hvm</type> + <type arch='x86_64' machine='pc'>hvm</type> <boot dev='hd'/> </os> - <cpu mode='host-passthrough' check='none'/> <clock offset='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> @@ -24,7 +23,7 @@ </graphics> <video> <model type='vga' vram='16384' heads='1' primary='yes'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> </video> <memballoon model='none'/> </devices> diff --git a/tests/qemuxml2xmloutdata/default-video-type-x86_64-caps-test-1.xml b/tests/qemuxml2xmloutdata/default-video-type-x86_64-caps-test-1.xml index f763b6902e..340cfef56f 100644 --- a/tests/qemuxml2xmloutdata/default-video-type-x86_64-caps-test-1.xml +++ b/tests/qemuxml2xmloutdata/default-video-type-x86_64-caps-test-1.xml @@ -5,10 +5,9 @@ <currentMemory unit='KiB'>1048576</currentMemory> <vcpu placement='static'>1</vcpu> <os> - <type arch='x86_64' machine='virt'>hvm</type> + <type arch='x86_64' machine='pc'>hvm</type> <boot dev='hd'/> </os> - <cpu mode='host-passthrough' check='none'/> <clock offset='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> @@ -24,7 +23,7 @@ </graphics> <video> <model type='cirrus' vram='16384' heads='1' primary='yes'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> </video> <memballoon model='none'/> </devices> -- 2.24.1