Test new codec type element.
---
tests/qemuxml2argvdata/qemuxml2argv-sound-device.args | 7 +++++--
tests/qemuxml2argvdata/qemuxml2argv-sound-device.xml | 7 +++++++
tests/qemuxml2argvtest.c | 3 ++-
tests/qemuxml2xmltest.c | 1 +
4 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-sound-device.args
b/tests/qemuxml2argvdata/qemuxml2argv-sound-device.args
index 0a09c41..4a7129b 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-sound-device.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-sound-device.args
@@ -4,5 +4,8 @@ unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -hda \
/dev/HostVG/QEMUGuest1 -usb -soundhw pcspk -device ES1370,id=sound1,bus=pci.0,\
addr=0x3 -device sb16,id=sound2 -device AC97,id=sound3,bus=pci.0,addr=0x4 \
-device intel-hda,id=sound4,bus=pci.0,addr=0x5 -device hda-duplex,\
-id=sound4-codec0,bus=sound4.0,cad=0 -device virtio-balloon-pci,id=balloon0,\
-bus=pci.0,addr=0x6
+id=sound4-codec0,bus=sound4.0,cad=0 \
+-device intel-hda,id=sound5,bus=pci.0,addr=0x6 \
+-device hda-micro,id=sound5-codec0,bus=sound5.0,cad=0 \
+-device hda-duplex,id=sound5-codec1,bus=sound5.0,cad=1 \
+-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x7
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-sound-device.xml
b/tests/qemuxml2argvdata/qemuxml2argv-sound-device.xml
index 33ec569..c588a24 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-sound-device.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-sound-device.xml
@@ -17,12 +17,19 @@
<disk type='block' device='disk'>
<source dev='/dev/HostVG/QEMUGuest1'/>
<target dev='hda' bus='ide'/>
+ <address type='drive' controller='0' bus='0'
target='0' unit='0'/>
</disk>
+ <controller type='usb' index='0'/>
+ <controller type='ide' index='0'/>
<sound model='pcspk'/>
<sound model='es1370'/>
<sound model='sb16'/>
<sound model='ac97'/>
<sound model='ich6'/>
+ <sound model='ich6'>
+ <codec type='micro'/>
+ <codec type='duplex'/>
+ </sound>
<memballoon model='virtio'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index c073429..617b178 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -680,7 +680,8 @@ mymain(void)
QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG);
DO_TEST("sound", false, NONE);
DO_TEST("sound-device", false,
- QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_HDA_DUPLEX);
+ QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG,
+ QEMU_CAPS_HDA_DUPLEX, QEMU_CAPS_HDA_MICRO);
DO_TEST("fs9p", false,
QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_FSDEV,
QEMU_CAPS_FSDEV_WRITEOUT);
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
index de76064..dcdba4f 100644
--- a/tests/qemuxml2xmltest.c
+++ b/tests/qemuxml2xmltest.c
@@ -179,6 +179,7 @@ mymain(void)
DO_TEST("net-virtio-network-portgroup");
DO_TEST("net-hostdev");
DO_TEST("sound");
+ DO_TEST("sound-device");
DO_TEST("net-bandwidth");
DO_TEST("serial-vc");
--
1.7.10.1