From 6fcaf4a54751c2afaf50a83150958aa0ac3c8a16 Mon Sep 17 00:00:00 2001 From: Chunyan Liu Date: Thu, 19 May 2016 16:14:36 +0800 Subject: [PATCH] xlconfigtest: add test for USB config conversion Signed-off-by: Chunyan Liu Signed-off-by: Jim Fehlig --- tests/xlconfigdata/test-usb.cfg | 13 ++++++++++++ tests/xlconfigdata/test-usb.xml | 35 +++++++++++++++++++++++++++++++++ tests/xlconfigtest.c | 1 + 3 files changed, 49 insertions(+) create mode 100644 tests/xlconfigdata/test-usb.cfg create mode 100644 tests/xlconfigdata/test-usb.xml diff --git a/tests/xlconfigdata/test-usb.cfg b/tests/xlconfigdata/test-usb.cfg new file mode 100644 index 0000000000..f0e616c909 --- /dev/null +++ b/tests/xlconfigdata/test-usb.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" ] +usbdev = [ "hostbus=1,hostaddr=3" ] diff --git a/tests/xlconfigdata/test-usb.xml b/tests/xlconfigdata/test-usb.xml new file mode 100644 index 0000000000..7b5853db13 --- /dev/null +++ b/tests/xlconfigdata/test-usb.xml @@ -0,0 +1,35 @@ + + XenGuest1 + 45b60f51-88a9-47a8-a3b3-5e66d71b2283 + 524288 + 524288 + 1 + /usr/bin/pygrub + + linux + + + preserve + restart + preserve + + + + + + + + + + + + + + + + +
+ + + + diff --git a/tests/xlconfigtest.c b/tests/xlconfigtest.c index 55c756cdf6..4248da13e2 100644 --- a/tests/xlconfigtest.c +++ b/tests/xlconfigtest.c @@ -277,6 +277,7 @@ mymain(void) DO_TEST_FORMAT("fullvirt-direct-kernel-boot-bogus-extra", false); #endif DO_TEST("vif-typename"); + DO_TEST("usb"); virObjectUnref(caps); virObjectUnref(xmlopt); -- GitLab