Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
...ault-unavailable-pseries.ppc64-latest.args | 33 ++++++++++++++++
...fault-unavailable-pseries.ppc64-latest.xml | 38 +++++++++++++++++++
...controller-default-unavailable-pseries.xml | 1 +
tests/qemuxmlconftest.c | 6 +++
4 files changed, 78 insertions(+)
create mode 100644
tests/qemuxmlconfdata/usb-controller-default-unavailable-pseries.ppc64-latest.args
create mode 100644
tests/qemuxmlconfdata/usb-controller-default-unavailable-pseries.ppc64-latest.xml
create mode 120000 tests/qemuxmlconfdata/usb-controller-default-unavailable-pseries.xml
diff --git
a/tests/qemuxmlconfdata/usb-controller-default-unavailable-pseries.ppc64-latest.args
b/tests/qemuxmlconfdata/usb-controller-default-unavailable-pseries.ppc64-latest.args
new file mode 100644
index 0000000000..4d5825032d
--- /dev/null
+++ b/tests/qemuxmlconfdata/usb-controller-default-unavailable-pseries.ppc64-latest.args
@@ -0,0 +1,33 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1 \
+USER=test \
+LOGNAME=test \
+XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.local/share \
+XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.cache \
+XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
+/usr/bin/qemu-system-ppc64 \
+-name guest=QEMUGuest1,debug-threads=on \
+-S \
+-object
'{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}'
\
+-machine pseries,usb=off,dump-guest-core=off,memory-backend=ppc_spapr.ram \
+-accel tcg \
+-cpu POWER9 \
+-m size=262144k \
+-object
'{"qom-type":"memory-backend-ram","id":"ppc_spapr.ram","size":268435456}'
\
+-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 \
+-boot strict=on \
+-usb \
+-audiodev
'{"id":"audio1","driver":"none"}' \
+-device
'{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x6"}'
\
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-msg timestamp=on
diff --git
a/tests/qemuxmlconfdata/usb-controller-default-unavailable-pseries.ppc64-latest.xml
b/tests/qemuxmlconfdata/usb-controller-default-unavailable-pseries.ppc64-latest.xml
new file mode 100644
index 0000000000..b07cc3598b
--- /dev/null
+++ b/tests/qemuxmlconfdata/usb-controller-default-unavailable-pseries.ppc64-latest.xml
@@ -0,0 +1,38 @@
+<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='ppc64' machine='pseries'>hvm</type>
+ <boot dev='hd'/>
+ </os>
+ <features>
+ <acpi/>
+ <apic/>
+ <pae/>
+ </features>
+ <cpu mode='custom' match='exact' check='none'>
+ <model fallback='forbid'>POWER9</model>
+ </cpu>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>restart</on_crash>
+ <devices>
+ <emulator>/usr/bin/qemu-system-ppc64</emulator>
+ <controller type='usb' index='0'>
+ <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>
+ <audio id='1' type='none'/>
+ <memballoon model='virtio'>
+ <address type='pci' domain='0x0000' bus='0x00'
slot='0x06' function='0x0'/>
+ </memballoon>
+ <panic model='pseries'/>
+ </devices>
+</domain>
diff --git a/tests/qemuxmlconfdata/usb-controller-default-unavailable-pseries.xml
b/tests/qemuxmlconfdata/usb-controller-default-unavailable-pseries.xml
new file mode 120000
index 0000000000..cb0a0b40eb
--- /dev/null
+++ b/tests/qemuxmlconfdata/usb-controller-default-unavailable-pseries.xml
@@ -0,0 +1 @@
+usb-controller-default-pseries.xml
\ No newline at end of file
diff --git a/tests/qemuxmlconftest.c b/tests/qemuxmlconftest.c
index f78596c45e..3da1036f02 100644
--- a/tests/qemuxmlconftest.c
+++ b/tests/qemuxmlconftest.c
@@ -1877,6 +1877,12 @@ mymain(void)
ARG_QEMU_CAPS_DEL, QEMU_CAPS_DEVICE_QEMU_XHCI, QEMU_CAPS_NEC_USB_XHCI,
QEMU_CAPS_ICH9_USB_EHCI1, QEMU_CAPS_LAST,
ARG_END);
+ DO_TEST_FULL("usb-controller-default-unavailable-pseries",
".ppc64-latest",
+ ARG_CAPS_ARCH, "ppc64",
+ ARG_CAPS_VER, "latest",
+ ARG_QEMU_CAPS_DEL, QEMU_CAPS_NEC_USB_XHCI, QEMU_CAPS_PCI_OHCI,
QEMU_CAPS_DEVICE_QEMU_XHCI, QEMU_CAPS_LAST,
+ ARG_END);
+
/* controller selection tests for various uncommon machine types */
DO_TEST_CAPS_ARCH_LATEST("usb-controller-default-versatilepb-aarch64",
"aarch64");
DO_TEST_FULL("usb-controller-default-fallback-versatilepb-aarch64",
".aarch64-latest",
--
2.43.0