Rename the 'usb-controller-explicit-(unavailable-)q35' test case to 'usb-controller-nec-xhci'. Since this also covers what 'usb-controller-xhci' was testing the latter is removed. Other 'usb-xhci' test cases which were using the NEC controller are also renamed to contain the name. In case of 'usb-controller-qemu-xhci' the negative test case is deleted as we don't need two cases for missing explicitly specified controller and the positive case is modernized to use real capabilities. Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- ...sb-controller-explicit-unavailable-q35.xml | 1 - ...ntroller-nec-xhci-limit.x86_64-latest.err} | 0 ....xml => usb-controller-nec-xhci-limit.xml} | 0 ...er-nec-xhci-unavailable.x86_64-latest.err} | 0 .../usb-controller-nec-xhci-unavailable.xml | 1 + ...sb-controller-nec-xhci.x86_64-latest.args} | 0 ...it-q35.xml => usb-controller-nec-xhci.xml} | 0 ...er-nex-xhci-autoassign.x86_64-latest.args} | 0 ...=> usb-controller-nex-xhci-autoassign.xml} | 0 ...troller-qemu-xhci-limit.x86_64-latest.err} | 0 .../usb-controller-qemu-xhci-unavailable.err | 1 - .../usb-controller-qemu-xhci-unavailable.xml | 1 - ...b-controller-qemu-xhci.x86_64-latest.args} | 0 .../qemuxml2argvdata/usb-controller-xhci.args | 32 ----------------- .../qemuxml2argvdata/usb-controller-xhci.xml | 16 --------- tests/qemuxml2argvtest.c | 34 ++++++------------- ...usb-controller-nec-xhci.x86_64-latest.xml} | 0 tests/qemuxml2xmltest.c | 2 +- 18 files changed, 13 insertions(+), 75 deletions(-) delete mode 120000 tests/qemuxml2argvdata/usb-controller-explicit-unavailable-q35.xml rename tests/qemuxml2argvdata/{usb-controller-xhci-limit.err => usb-controller-nec-xhci-limit.x86_64-latest.err} (100%) rename tests/qemuxml2argvdata/{usb-controller-xhci-limit.xml => usb-controller-nec-xhci-limit.xml} (100%) rename tests/qemuxml2argvdata/{usb-controller-explicit-unavailable-q35.err => usb-controller-nec-xhci-unavailable.x86_64-latest.err} (100%) create mode 120000 tests/qemuxml2argvdata/usb-controller-nec-xhci-unavailable.xml rename tests/qemuxml2argvdata/{usb-controller-explicit-q35.args => usb-controller-nec-xhci.x86_64-latest.args} (100%) rename tests/qemuxml2argvdata/{usb-controller-explicit-q35.xml => usb-controller-nec-xhci.xml} (100%) rename tests/qemuxml2argvdata/{usb-xhci-autoassign.args => usb-controller-nex-xhci-autoassign.x86_64-latest.args} (100%) rename tests/qemuxml2argvdata/{usb-xhci-autoassign.xml => usb-controller-nex-xhci-autoassign.xml} (100%) rename tests/qemuxml2argvdata/{usb-controller-qemu-xhci-limit.err => usb-controller-qemu-xhci-limit.x86_64-latest.err} (100%) delete mode 100644 tests/qemuxml2argvdata/usb-controller-qemu-xhci-unavailable.err delete mode 120000 tests/qemuxml2argvdata/usb-controller-qemu-xhci-unavailable.xml rename tests/qemuxml2argvdata/{usb-controller-qemu-xhci.args => usb-controller-qemu-xhci.x86_64-latest.args} (100%) delete mode 100644 tests/qemuxml2argvdata/usb-controller-xhci.args delete mode 100644 tests/qemuxml2argvdata/usb-controller-xhci.xml rename tests/qemuxml2xmloutdata/{usb-controller-explicit-q35.x86_64-latest.xml => usb-controller-nec-xhci.x86_64-latest.xml} (100%) diff --git a/tests/qemuxml2argvdata/usb-controller-explicit-unavailable-q35.xml b/tests/qemuxml2argvdata/usb-controller-explicit-unavailable-q35.xml deleted file mode 120000 index bc747bb653..0000000000 --- a/tests/qemuxml2argvdata/usb-controller-explicit-unavailable-q35.xml +++ /dev/null @@ -1 +0,0 @@ -usb-controller-explicit-q35.xml \ No newline at end of file diff --git a/tests/qemuxml2argvdata/usb-controller-xhci-limit.err b/tests/qemuxml2argvdata/usb-controller-nec-xhci-limit.x86_64-latest.err similarity index 100% rename from tests/qemuxml2argvdata/usb-controller-xhci-limit.err rename to tests/qemuxml2argvdata/usb-controller-nec-xhci-limit.x86_64-latest.err diff --git a/tests/qemuxml2argvdata/usb-controller-xhci-limit.xml b/tests/qemuxml2argvdata/usb-controller-nec-xhci-limit.xml similarity index 100% rename from tests/qemuxml2argvdata/usb-controller-xhci-limit.xml rename to tests/qemuxml2argvdata/usb-controller-nec-xhci-limit.xml diff --git a/tests/qemuxml2argvdata/usb-controller-explicit-unavailable-q35.err b/tests/qemuxml2argvdata/usb-controller-nec-xhci-unavailable.x86_64-latest.err similarity index 100% rename from tests/qemuxml2argvdata/usb-controller-explicit-unavailable-q35.err rename to tests/qemuxml2argvdata/usb-controller-nec-xhci-unavailable.x86_64-latest.err diff --git a/tests/qemuxml2argvdata/usb-controller-nec-xhci-unavailable.xml b/tests/qemuxml2argvdata/usb-controller-nec-xhci-unavailable.xml new file mode 120000 index 0000000000..faad458454 --- /dev/null +++ b/tests/qemuxml2argvdata/usb-controller-nec-xhci-unavailable.xml @@ -0,0 +1 @@ +usb-controller-nec-xhci.xml \ No newline at end of file diff --git a/tests/qemuxml2argvdata/usb-controller-explicit-q35.args b/tests/qemuxml2argvdata/usb-controller-nec-xhci.x86_64-latest.args similarity index 100% rename from tests/qemuxml2argvdata/usb-controller-explicit-q35.args rename to tests/qemuxml2argvdata/usb-controller-nec-xhci.x86_64-latest.args diff --git a/tests/qemuxml2argvdata/usb-controller-explicit-q35.xml b/tests/qemuxml2argvdata/usb-controller-nec-xhci.xml similarity index 100% rename from tests/qemuxml2argvdata/usb-controller-explicit-q35.xml rename to tests/qemuxml2argvdata/usb-controller-nec-xhci.xml diff --git a/tests/qemuxml2argvdata/usb-xhci-autoassign.args b/tests/qemuxml2argvdata/usb-controller-nex-xhci-autoassign.x86_64-latest.args similarity index 100% rename from tests/qemuxml2argvdata/usb-xhci-autoassign.args rename to tests/qemuxml2argvdata/usb-controller-nex-xhci-autoassign.x86_64-latest.args diff --git a/tests/qemuxml2argvdata/usb-xhci-autoassign.xml b/tests/qemuxml2argvdata/usb-controller-nex-xhci-autoassign.xml similarity index 100% rename from tests/qemuxml2argvdata/usb-xhci-autoassign.xml rename to tests/qemuxml2argvdata/usb-controller-nex-xhci-autoassign.xml diff --git a/tests/qemuxml2argvdata/usb-controller-qemu-xhci-limit.err b/tests/qemuxml2argvdata/usb-controller-qemu-xhci-limit.x86_64-latest.err similarity index 100% rename from tests/qemuxml2argvdata/usb-controller-qemu-xhci-limit.err rename to tests/qemuxml2argvdata/usb-controller-qemu-xhci-limit.x86_64-latest.err diff --git a/tests/qemuxml2argvdata/usb-controller-qemu-xhci-unavailable.err b/tests/qemuxml2argvdata/usb-controller-qemu-xhci-unavailable.err deleted file mode 100644 index aec91f7559..0000000000 --- a/tests/qemuxml2argvdata/usb-controller-qemu-xhci-unavailable.err +++ /dev/null @@ -1 +0,0 @@ -unsupported configuration: USB controller model 'qemu-xhci' not supported in this QEMU binary diff --git a/tests/qemuxml2argvdata/usb-controller-qemu-xhci-unavailable.xml b/tests/qemuxml2argvdata/usb-controller-qemu-xhci-unavailable.xml deleted file mode 120000 index f00efadeb9..0000000000 --- a/tests/qemuxml2argvdata/usb-controller-qemu-xhci-unavailable.xml +++ /dev/null @@ -1 +0,0 @@ -usb-controller-qemu-xhci.xml \ No newline at end of file diff --git a/tests/qemuxml2argvdata/usb-controller-qemu-xhci.args b/tests/qemuxml2argvdata/usb-controller-qemu-xhci.x86_64-latest.args similarity index 100% rename from tests/qemuxml2argvdata/usb-controller-qemu-xhci.args rename to tests/qemuxml2argvdata/usb-controller-qemu-xhci.x86_64-latest.args diff --git a/tests/qemuxml2argvdata/usb-controller-xhci.args b/tests/qemuxml2argvdata/usb-controller-xhci.args deleted file mode 100644 index f3eac45c57..0000000000 --- a/tests/qemuxml2argvdata/usb-controller-xhci.args +++ /dev/null @@ -1,32 +0,0 @@ -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-x86_64 \ --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 pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=off \ --accel tcg \ --cpu qemu64 \ --m size=219136k \ --object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \ --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 \ --device '{"driver":"nec-usb-xhci","p2":8,"p3":8,"id":"usb","bus":"pci.0","addr":"0x2"}' \ --audiodev '{"id":"audio1","driver":"none"}' \ --sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ --msg timestamp=on diff --git a/tests/qemuxml2argvdata/usb-controller-xhci.xml b/tests/qemuxml2argvdata/usb-controller-xhci.xml deleted file mode 100644 index 5ee73c9bcf..0000000000 --- a/tests/qemuxml2argvdata/usb-controller-xhci.xml +++ /dev/null @@ -1,16 +0,0 @@ -<domain type='qemu'> - <name>QEMUGuest1</name> - <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> - <memory unit='KiB'>219136</memory> - <currentMemory unit='KiB'>219136</currentMemory> - <vcpu placement='static'>1</vcpu> - <os> - <type arch='x86_64' machine='pc'>hvm</type> - <boot dev='hd'/> - </os> - <devices> - <emulator>/usr/bin/qemu-system-x86_64</emulator> - <controller type='usb' index='0' model='nec-xhci' ports='8'/> - <memballoon model='none'/> - </devices> -</domain> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 6d7c60ba9d..98d07aee66 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1537,29 +1537,17 @@ mymain(void) QEMU_CAPS_USB_HUB, QEMU_CAPS_ICH9_USB_EHCI1); - DO_TEST("usb-controller-explicit-q35", - QEMU_CAPS_DEVICE_IOH3420, - QEMU_CAPS_PCI_OHCI, - QEMU_CAPS_PIIX3_USB_UHCI, - QEMU_CAPS_NEC_USB_XHCI); - DO_TEST_FAILURE("usb-controller-explicit-unavailable-q35", - QEMU_CAPS_DEVICE_IOH3420, - QEMU_CAPS_PCI_OHCI, - QEMU_CAPS_PIIX3_USB_UHCI); - DO_TEST("usb-controller-xhci", - QEMU_CAPS_PIIX3_USB_UHCI, - QEMU_CAPS_NEC_USB_XHCI); - DO_TEST("usb-xhci-autoassign", - QEMU_CAPS_PIIX3_USB_UHCI, - QEMU_CAPS_NEC_USB_XHCI, - QEMU_CAPS_USB_HUB); - DO_TEST_PARSE_ERROR("usb-controller-xhci-limit", - QEMU_CAPS_PIIX3_USB_UHCI, - QEMU_CAPS_NEC_USB_XHCI); - DO_TEST("usb-controller-qemu-xhci", QEMU_CAPS_DEVICE_QEMU_XHCI); - DO_TEST_FAILURE_NOCAPS("usb-controller-qemu-xhci-unavailable"); - DO_TEST_PARSE_ERROR("usb-controller-qemu-xhci-limit", - QEMU_CAPS_DEVICE_QEMU_XHCI); + DO_TEST_CAPS_LATEST("usb-controller-nec-xhci"); + DO_TEST_FULL("usb-controller-nec-xhci-unavailable", ".x86_64-latest", + ARG_CAPS_ARCH, "x86_64", + ARG_CAPS_VER, "latest", + ARG_FLAGS, FLAG_EXPECT_FAILURE, + ARG_QEMU_CAPS_DEL, QEMU_CAPS_NEC_USB_XHCI, QEMU_CAPS_LAST, + ARG_END); + DO_TEST_CAPS_LATEST("usb-controller-nex-xhci-autoassign"); + DO_TEST_CAPS_LATEST_PARSE_ERROR("usb-controller-nec-xhci-limit"); + DO_TEST_CAPS_LATEST("usb-controller-qemu-xhci"); + DO_TEST_CAPS_LATEST_PARSE_ERROR("usb-controller-qemu-xhci-limit"); DO_TEST_NOCAPS("input-usbmouse-addr"); DO_TEST("usb-hub", diff --git a/tests/qemuxml2xmloutdata/usb-controller-explicit-q35.x86_64-latest.xml b/tests/qemuxml2xmloutdata/usb-controller-nec-xhci.x86_64-latest.xml similarity index 100% rename from tests/qemuxml2xmloutdata/usb-controller-explicit-q35.x86_64-latest.xml rename to tests/qemuxml2xmloutdata/usb-controller-nec-xhci.x86_64-latest.xml diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index d65fb1f200..3b8eab6346 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -489,7 +489,7 @@ mymain(void) DO_TEST_CAPS_LATEST("usb-controller-default-q35"); DO_TEST_CAPS_LATEST("usb-controller-piix3"); DO_TEST_CAPS_LATEST("usb-controller-ich9-ehci-addr"); - DO_TEST_CAPS_LATEST("usb-controller-explicit-q35"); + DO_TEST_CAPS_LATEST("usb-controller-nec-xhci"); DO_TEST_CAPS_ARCH_LATEST_FULL("usb-controller-default-unavailable-i440fx", "x86_64", ARG_QEMU_CAPS_DEL, QEMU_CAPS_PIIX3_USB_UHCI, QEMU_CAPS_LAST); DO_TEST_CAPS_ARCH_LATEST("ppc64-usb-controller", "ppc64"); -- 2.41.0