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

[libvirt] [PATCH 3/3] test: add usb-audio testcase



---
 tests/qemuxml2argvdata/qemuxml2argv-usb-audio.args |  7 +++++
 tests/qemuxml2argvdata/qemuxml2argv-usb-audio.xml  | 31 ++++++++++++++++++++++
 tests/qemuxml2argvtest.c                           |  3 +++
 3 files changed, 41 insertions(+)
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-usb-audio.args
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-usb-audio.xml

diff --git a/tests/qemuxml2argvdata/qemuxml2argv-usb-audio.args b/tests/qemuxml2argvdata/qemuxml2argv-usb-audio.args
new file mode 100644
index 0000000..fe2551f
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-usb-audio.args
@@ -0,0 +1,7 @@
+LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu \
+-S -M pc-0.15 -m 1024 -smp 1 -nographic -nodefaults \
+-monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c \
+-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
+-hda /var/lib/libvirt/images/QEMUGuest1 \
+-device usb-audio,id=sound0,buffer=1536,bus=usb.0,port=1 \
+-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-usb-audio.xml b/tests/qemuxml2argvdata/qemuxml2argv-usb-audio.xml
new file mode 100644
index 0000000..037d71a
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-usb-audio.xml
@@ -0,0 +1,31 @@
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>cdbebdfa-1d6d-65c3-be0f-fd74b978a773</uuid>
+  <memory unit='KiB'>1048576</memory>
+  <currentMemory unit='KiB'>1048576</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='x86_64' machine='pc-0.15'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>restart</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <disk type='file' device='disk'>
+      <driver name='qemu' type='qcow2' cache='none'/>
+      <source file='/var/lib/libvirt/images/QEMUGuest1'/>
+      <target dev='hda' bus='ide'/>
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+    </disk>
+    <controller type='usb' index='0' model='piix3-uhci'/>
+    <controller type='ide' index='0'>
+    </controller>
+    <sound model='usb-audio'>
+      <buffer>1536</buffer>
+      <address type='usb' bus='0' port='1'/>
+    </sound>
+  </devices>
+</domain>
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 9e2c4e4..7405583 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -767,6 +767,9 @@ mymain(void)
     DO_TEST("sound-device",
             QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG,
             QEMU_CAPS_HDA_DUPLEX, QEMU_CAPS_HDA_MICRO);
+    DO_TEST("usb-audio",
+            QEMU_CAPS_DEVICE, QEMU_CAPS_PIIX3_USB_UHCI,
+            QEMU_CAPS_DEVICE_USB_AUDIO, QEMU_CAPS_PCI_MULTIFUNCTION);
     DO_TEST("fs9p",
             QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_FSDEV,
             QEMU_CAPS_FSDEV_WRITEOUT);
-- 
1.7.11.4


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