aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2009-12-14 18:16:10 +0000
committerDaniel P. Berrange <berrange@redhat.com>2010-01-18 13:55:56 +0000
commit4886cba76a12d15e0c43813a8e8b796f213b02b5 (patch)
tree5e2c0c095ed065fc06af8c2422e614af25ac90ed /tests
parentConvert watchdog to -device (diff)
downloadlibvirt-4886cba76a12d15e0c43813a8e8b796f213b02b5.tar.gz
libvirt-4886cba76a12d15e0c43813a8e8b796f213b02b5.tar.bz2
libvirt-4886cba76a12d15e0c43813a8e8b796f213b02b5.zip
Convert audio devices over to -device syntax
The current syntax for audio devices is a horrible multiplexed arg -soundhw sb16,pcspk,ac97 The new syntax is -device sb16,id=sound0 or -device AC97,id=sound1,addr=<PCI SLOT> NB, pcspk still uses the old -soundhw syntax
Diffstat (limited to 'tests')
-rw-r--r--tests/qemuxml2argvdata/qemuxml2argv-sound-device.args1
-rw-r--r--tests/qemuxml2argvdata/qemuxml2argv-sound-device.xml26
-rw-r--r--tests/qemuxml2argvtest.c1
3 files changed, 28 insertions, 0 deletions
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-sound-device.args b/tests/qemuxml2argvdata/qemuxml2argv-sound-device.args
new file mode 100644
index 000000000..31ac0ee0e
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-sound-device.args
@@ -0,0 +1 @@
+LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -nodefaults -monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -usb -soundhw pcspk -device ES1370,id=sound1 -device sb16,id=sound2 -device AC97,id=sound3
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-sound-device.xml b/tests/qemuxml2argvdata/qemuxml2argv-sound-device.xml
new file mode 100644
index 000000000..8c33e6c90
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-sound-device.xml
@@ -0,0 +1,26 @@
+<domain type='qemu'>
+ <name>QEMUGuest1</name>
+ <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+ <memory>219200</memory>
+ <currentMemory>219200</currentMemory>
+ <vcpu>1</vcpu>
+ <os>
+ <type arch='i686' machine='pc'>hvm</type>
+ <boot dev='hd'/>
+ </os>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <emulator>/usr/bin/qemu</emulator>
+ <disk type='block' device='disk'>
+ <source dev='/dev/HostVG/QEMUGuest1'/>
+ <target dev='hda' bus='ide'/>
+ </disk>
+ <sound model='pcspk'/>
+ <sound model='es1370'/>
+ <sound model='sb16'/>
+ <sound model='ac97'/>
+ </devices>
+</domain>
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 6bfc2173d..55e7d58bc 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -293,6 +293,7 @@ mymain(int argc, char **argv)
DO_TEST("watchdog", 0);
DO_TEST("watchdog-device", QEMUD_CMD_FLAG_DEVICE);
DO_TEST("sound", 0);
+ DO_TEST("sound-device", QEMUD_CMD_FLAG_DEVICE);
DO_TEST("hostdev-usb-product", 0);
DO_TEST("hostdev-usb-address", 0);