[PATCH 6/6] xlconfigtest: add test for usb controller conversion

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

 



Signed-off-by: Chunyan Liu <cyliu@xxxxxxxx>
---
 tests/xlconfigdata/test-usbctrl.cfg | 13 +++++++++++++
 tests/xlconfigdata/test-usbctrl.xml | 32 ++++++++++++++++++++++++++++++++
 tests/xlconfigtest.c                |  1 +
 3 files changed, 46 insertions(+)
 create mode 100644 tests/xlconfigdata/test-usbctrl.cfg
 create mode 100644 tests/xlconfigdata/test-usbctrl.xml

diff --git a/tests/xlconfigdata/test-usbctrl.cfg b/tests/xlconfigdata/test-usbctrl.cfg
new file mode 100644
index 0000000..319d493
--- /dev/null
+++ b/tests/xlconfigdata/test-usbctrl.cfg
@@ -0,0 +1,13 @@
+name = "XenGuest1"
+uuid = "45b60f51-88a9-47a8-a3b3-5e66d71b2283"
+maxmem = 512
+memory = 512
+vcpus = 1
+localtime = 0
+on_poweroff = "preserve"
+on_reboot = "restart"
+on_crash = "preserve"
+vif = [ "mac=5a:36:0e:be:00:09" ]
+bootloader = "/usr/bin/pygrub"
+disk = [ "format=qcow2,vdev=xvda,access=rw,backendtype=qdisk,target=/var/lib/xen/images/debian/disk.qcow2" ]
+usbctrl = [ "type=pv,version=1,ports=4", "type=qusb,version=2,ports=6" ]
diff --git a/tests/xlconfigdata/test-usbctrl.xml b/tests/xlconfigdata/test-usbctrl.xml
new file mode 100644
index 0000000..55dd0e0
--- /dev/null
+++ b/tests/xlconfigdata/test-usbctrl.xml
@@ -0,0 +1,32 @@
+<domain type='xen'>
+  <name>XenGuest1</name>
+  <uuid>45b60f51-88a9-47a8-a3b3-5e66d71b2283</uuid>
+  <memory unit='KiB'>524288</memory>
+  <currentMemory unit='KiB'>524288</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <bootloader>/usr/bin/pygrub</bootloader>
+  <os>
+    <type arch='x86_64' machine='xenpv'>linux</type>
+  </os>
+  <clock offset='utc' adjustment='reset'/>
+  <on_poweroff>preserve</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>preserve</on_crash>
+  <devices>
+    <disk type='file' device='disk'>
+      <driver name='qemu' type='qcow2'/>
+      <source file='/var/lib/xen/images/debian/disk.qcow2'/>
+      <target dev='xvda' bus='xen'/>
+    </disk>
+    <controller type='usb' index='0' model='pvusb1' ports='4'/>
+    <controller type='usb' index='1' model='qusb2' ports='6'/>
+    <interface type='ethernet'>
+      <mac address='5a:36:0e:be:00:09'/>
+    </interface>
+    <console type='pty'>
+      <target type='xen' port='0'/>
+    </console>
+    <input type='mouse' bus='xen'/>
+    <input type='keyboard' bus='xen'/>
+  </devices>
+</domain>
diff --git a/tests/xlconfigtest.c b/tests/xlconfigtest.c
index c5e2252..4c4ebf2 100644
--- a/tests/xlconfigtest.c
+++ b/tests/xlconfigtest.c
@@ -230,6 +230,7 @@ mymain(void)
 #endif
     DO_TEST("vif-typename");
     DO_TEST("usb");
+    DO_TEST("usbctrl");
 
     virObjectUnref(caps);
     virObjectUnref(xmlopt);
-- 
2.1.4

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