[PATCH 6/6] tests: add test cases for specific sound output

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

 



Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
---
 ...xml2argv-sound-multi-different-output-spice.xml | 29 ++++++++++++++++++++++
 .../qemuxml2argv-sound-multi-pa-output-spice.args  | 26 +++++++++++++++++++
 .../qemuxml2argv-sound-multi-pa-output-spice.xml   | 27 ++++++++++++++++++++
 .../qemuxml2argv-sound-pa-output-spice.args        | 24 ++++++++++++++++++
 .../qemuxml2argv-sound-pa-output-spice.xml         | 26 +++++++++++++++++++
 tests/qemuxml2argvtest.c                           | 12 +++++++++
 6 files changed, 144 insertions(+)
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-sound-multi-different-output-spice.xml
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-sound-multi-pa-output-spice.args
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-sound-multi-pa-output-spice.xml
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-sound-pa-output-spice.args
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-sound-pa-output-spice.xml

diff --git a/tests/qemuxml2argvdata/qemuxml2argv-sound-multi-different-output-spice.xml b/tests/qemuxml2argvdata/qemuxml2argv-sound-multi-different-output-spice.xml
new file mode 100644
index 0000000000..80751b7e02
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-sound-multi-different-output-spice.xml
@@ -0,0 +1,29 @@
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu-system-i686</emulator>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <input type='mouse' bus='ps2'/>
+    <input type='keyboard' bus='ps2'/>
+    <sound model='ich6'>
+      <output type='pa'/>
+    </sound>
+    <sound model='ich6'>
+      <output type='none'/>
+    </sound>
+    <graphics type='spice'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-sound-multi-pa-output-spice.args b/tests/qemuxml2argvdata/qemuxml2argv-sound-multi-pa-output-spice.args
new file mode 100644
index 0000000000..4a54d50e9f
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-sound-multi-pa-output-spice.args
@@ -0,0 +1,26 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=pa \
+/usr/bin/qemu-system-i686 \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1,sockets=1,cores=1,threads=1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nodefaults \
+-chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\
+server,nowait \
+-mon chardev=charmonitor,id=monitor,mode=readline \
+-no-acpi \
+-boot c \
+-usb \
+-spice port=0 \
+-vga cirrus \
+-device intel-hda,id=sound0,bus=pci.0,addr=0x3 \
+-device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 \
+-device intel-hda,id=sound1,bus=pci.0,addr=0x4 \
+-device hda-duplex,id=sound1-codec0,bus=sound1.0,cad=0
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-sound-multi-pa-output-spice.xml b/tests/qemuxml2argvdata/qemuxml2argv-sound-multi-pa-output-spice.xml
new file mode 100644
index 0000000000..4e76c2c30d
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-sound-multi-pa-output-spice.xml
@@ -0,0 +1,27 @@
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu-system-i686</emulator>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <input type='mouse' bus='ps2'/>
+    <input type='keyboard' bus='ps2'/>
+    <sound model='ich6'>
+      <output type='pa'/>
+    </sound>
+    <sound model='ich6'/>
+    <graphics type='spice'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-sound-pa-output-spice.args b/tests/qemuxml2argvdata/qemuxml2argv-sound-pa-output-spice.args
new file mode 100644
index 0000000000..8d5bb9158e
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-sound-pa-output-spice.args
@@ -0,0 +1,24 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=pa \
+/usr/bin/qemu-system-i686 \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1,sockets=1,cores=1,threads=1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nodefaults \
+-chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\
+server,nowait \
+-mon chardev=charmonitor,id=monitor,mode=readline \
+-no-acpi \
+-boot c \
+-usb \
+-spice port=0 \
+-vga cirrus \
+-device intel-hda,id=sound0,bus=pci.0,addr=0x3 \
+-device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-sound-pa-output-spice.xml b/tests/qemuxml2argvdata/qemuxml2argv-sound-pa-output-spice.xml
new file mode 100644
index 0000000000..2c4de0fe57
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-sound-pa-output-spice.xml
@@ -0,0 +1,26 @@
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu-system-i686</emulator>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <input type='mouse' bus='ps2'/>
+    <input type='keyboard' bus='ps2'/>
+    <sound model='ich6'>
+      <output type='pa'/>
+    </sound>
+    <graphics type='spice'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 6c80e0bc77..ed01979fc8 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -1573,6 +1573,18 @@ mymain(void)
             QEMU_CAPS_SPICE,
             QEMU_CAPS_VNC,
             QEMU_CAPS_DEVICE_CIRRUS_VGA);
+    DO_TEST("sound-pa-output-spice",
+            QEMU_CAPS_HDA_DUPLEX,
+            QEMU_CAPS_SPICE,
+            QEMU_CAPS_DEVICE_CIRRUS_VGA);
+    DO_TEST("sound-multi-pa-output-spice",
+            QEMU_CAPS_HDA_DUPLEX,
+            QEMU_CAPS_SPICE,
+            QEMU_CAPS_DEVICE_CIRRUS_VGA);
+    DO_TEST_PARSE_ERROR("sound-multi-different-output-spice",
+                        QEMU_CAPS_HDA_DUPLEX,
+                        QEMU_CAPS_SPICE,
+                        QEMU_CAPS_DEVICE_CIRRUS_VGA);
     DO_TEST("fs9p",
             QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_FSDEV,
             QEMU_CAPS_FSDEV_WRITEOUT);
-- 
2.13.6

--
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]
  Powered by Linux