[PATCH v2 2/2] test: add test case for usb controller order

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

 



Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
---
 .../qemuxml2argv-controller-usb-order.xml          | 32 ++++++++++++++++++++
 .../qemuxml2xmlout-controller-usb-order.xml        | 34 ++++++++++++++++++++++
 tests/qemuxml2xmltest.c                            |  1 +
 3 files changed, 67 insertions(+)
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-controller-usb-order.xml
 create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-controller-usb-order.xml

diff --git a/tests/qemuxml2argvdata/qemuxml2argv-controller-usb-order.xml b/tests/qemuxml2argvdata/qemuxml2argv-controller-usb-order.xml
new file mode 100644
index 0000000..68ebbf2
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-controller-usb-order.xml
@@ -0,0 +1,32 @@
+<domain type='kvm'>
+  <name>rhel7</name>
+  <uuid>c9b867fb-7274-4a22-8884-0867d05b38cf</uuid>
+  <memory unit='KiB'>2097152</memory>
+  <currentMemory unit='KiB'>2097152</currentMemory>
+  <vcpu placement='static'>2</vcpu>
+  <os>
+    <type arch='x86_64' machine='pc-i440fx-2.3'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>restart</on_crash>
+  <pm>
+    <suspend-to-mem enabled='no'/>
+    <suspend-to-disk enabled='no'/>
+  </pm>
+  <devices>
+    <emulator>/usr/bin/qemu-system-x86_64</emulator>
+    <controller type='usb' index='0' model='ich9-uhci1'>
+      <master startport='0'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0' multifunction='on'/>
+    </controller>
+    <controller type='usb' index='0' model='ich9-ehci1'>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x7' multifunction='on'/>
+    </controller>
+    <controller type='usb' index='1' model='nec-xhci'>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/>
+    </controller>
+  </devices>
+</domain>
+
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-controller-usb-order.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-controller-usb-order.xml
new file mode 100644
index 0000000..a3c22e8
--- /dev/null
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-controller-usb-order.xml
@@ -0,0 +1,34 @@
+<domain type='kvm'>
+  <name>rhel7</name>
+  <uuid>c9b867fb-7274-4a22-8884-0867d05b38cf</uuid>
+  <memory unit='KiB'>2097152</memory>
+  <currentMemory unit='KiB'>2097152</currentMemory>
+  <vcpu placement='static'>2</vcpu>
+  <os>
+    <type arch='x86_64' machine='pc-i440fx-2.3'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>restart</on_crash>
+  <pm>
+    <suspend-to-mem enabled='no'/>
+    <suspend-to-disk enabled='no'/>
+  </pm>
+  <devices>
+    <emulator>/usr/bin/qemu-system-x86_64</emulator>
+    <controller type='usb' index='0' model='ich9-ehci1'>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x7' multifunction='on'/>
+    </controller>
+    <controller type='usb' index='0' model='ich9-uhci1'>
+      <master startport='0'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0' multifunction='on'/>
+    </controller>
+    <controller type='usb' index='1' model='nec-xhci'>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/>
+    </controller>
+    <controller type='pci' index='0' model='pci-root'/>
+    <memballoon model='virtio'/>
+  </devices>
+</domain>
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
index 5a9c67d..5e6fc9a 100644
--- a/tests/qemuxml2xmltest.c
+++ b/tests/qemuxml2xmltest.c
@@ -515,6 +515,7 @@ mymain(void)
     DO_TEST_DIFFERENT("usb-redir-filter");
     DO_TEST_DIFFERENT("usb-redir-filter-version");
     DO_TEST("blkdeviotune");
+    DO_TEST_DIFFERENT("controller-usb-order");
 
     DO_TEST_FULL("seclabel-dynamic-baselabel", false, WHEN_INACTIVE);
     DO_TEST_FULL("seclabel-dynamic-override", false, WHEN_INACTIVE);
-- 
2.6.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[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]