[PATCH v2 07/17] tests: Add usb-legacy-multiple

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

 



We have special handling for this configuration, so make sure
that there is some test coverage too.

Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx>
---
 .../usb-legacy-multiple.x86_64-latest.err     |  1 +
 .../usb-legacy-multiple.x86_64-latest.xml     | 32 +++++++++++++++++++
 tests/qemuxmlconfdata/usb-legacy-multiple.xml | 15 +++++++++
 tests/qemuxmlconftest.c                       |  7 ++++
 4 files changed, 55 insertions(+)
 create mode 100644 tests/qemuxmlconfdata/usb-legacy-multiple.x86_64-latest.err
 create mode 100644 tests/qemuxmlconfdata/usb-legacy-multiple.x86_64-latest.xml
 create mode 100644 tests/qemuxmlconfdata/usb-legacy-multiple.xml

diff --git a/tests/qemuxmlconfdata/usb-legacy-multiple.x86_64-latest.err b/tests/qemuxmlconfdata/usb-legacy-multiple.x86_64-latest.err
new file mode 100644
index 0000000000..4cf41f9406
--- /dev/null
+++ b/tests/qemuxmlconfdata/usb-legacy-multiple.x86_64-latest.err
@@ -0,0 +1 @@
+unsupported configuration: Multiple legacy USB controllers are not supported
diff --git a/tests/qemuxmlconfdata/usb-legacy-multiple.x86_64-latest.xml b/tests/qemuxmlconfdata/usb-legacy-multiple.x86_64-latest.xml
new file mode 100644
index 0000000000..431599283d
--- /dev/null
+++ b/tests/qemuxmlconfdata/usb-legacy-multiple.x86_64-latest.xml
@@ -0,0 +1,32 @@
+<domain type='qemu'>
+  <name>guest</name>
+  <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid>
+  <memory unit='KiB'>4194304</memory>
+  <currentMemory unit='KiB'>4194304</currentMemory>
+  <vcpu placement='static'>4</vcpu>
+  <os>
+    <type arch='x86_64' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>qemu64</model>
+  </cpu>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu-system-x86_64</emulator>
+    <controller type='usb' index='0'>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
+    </controller>
+    <controller type='usb' index='1'>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
+    </controller>
+    <controller type='pci' index='0' model='pci-root'/>
+    <input type='mouse' bus='ps2'/>
+    <input type='keyboard' bus='ps2'/>
+    <audio id='1' type='none'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuxmlconfdata/usb-legacy-multiple.xml b/tests/qemuxmlconfdata/usb-legacy-multiple.xml
new file mode 100644
index 0000000000..4b2547f348
--- /dev/null
+++ b/tests/qemuxmlconfdata/usb-legacy-multiple.xml
@@ -0,0 +1,15 @@
+<domain type='qemu'>
+  <name>guest</name>
+  <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid>
+  <memory>4194304</memory>
+  <vcpu>4</vcpu>
+  <os>
+    <type arch='x86_64' machine='pc'>hvm</type>
+  </os>
+  <devices>
+    <emulator>/usr/bin/qemu-system-x86_64</emulator>
+    <controller type='usb'/>
+    <controller type='usb'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuxmlconftest.c b/tests/qemuxmlconftest.c
index c43f4cab67..b9dcdb81b9 100644
--- a/tests/qemuxmlconftest.c
+++ b/tests/qemuxmlconftest.c
@@ -1870,6 +1870,13 @@ 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-legacy-multiple", ".x86_64-latest",
+                 ARG_CAPS_ARCH, "x86_64",
+                 ARG_CAPS_VER, "latest",
+                 ARG_FLAGS, FLAG_EXPECT_FAILURE,
+                 ARG_QEMU_CAPS_DEL, QEMU_CAPS_PIIX3_USB_UHCI, QEMU_CAPS_LAST,
+                 ARG_END);
+
     DO_TEST_CAPS_LATEST("usb-none");
 
     DO_TEST_CAPS_LATEST("usb-controller-piix3");
-- 
2.43.0
_______________________________________________
Devel mailing list -- devel@xxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxx




[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