These test cases models current situation where there is no way how to specify sound output and that it's based on which graphic device is the last one. Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx> --- .../qemuxml2argv-sound-default-output-sdl.args | 23 ++++++++++++++++++++ .../qemuxml2argv-sound-default-output-sdl.xml | 24 +++++++++++++++++++++ ...emuxml2argv-sound-default-output-spice-vnc.args | 25 ++++++++++++++++++++++ ...qemuxml2argv-sound-default-output-spice-vnc.xml | 25 ++++++++++++++++++++++ .../qemuxml2argv-sound-default-output-spice.args | 24 +++++++++++++++++++++ .../qemuxml2argv-sound-default-output-spice.xml | 24 +++++++++++++++++++++ ...emuxml2argv-sound-default-output-vnc-spice.args | 25 ++++++++++++++++++++++ ...qemuxml2argv-sound-default-output-vnc-spice.xml | 25 ++++++++++++++++++++++ .../qemuxml2argv-sound-default-output-vnc.args | 24 +++++++++++++++++++++ .../qemuxml2argv-sound-default-output-vnc.xml | 24 +++++++++++++++++++++ tests/qemuxml2argvtest.c | 22 +++++++++++++++++++ 11 files changed, 265 insertions(+) create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-sound-default-output-sdl.args create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-sound-default-output-sdl.xml create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-sound-default-output-spice-vnc.args create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-sound-default-output-spice-vnc.xml create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-sound-default-output-spice.args create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-sound-default-output-spice.xml create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-sound-default-output-vnc-spice.args create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-sound-default-output-vnc-spice.xml create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-sound-default-output-vnc.args create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-sound-default-output-vnc.xml diff --git a/tests/qemuxml2argvdata/qemuxml2argv-sound-default-output-sdl.args b/tests/qemuxml2argvdata/qemuxml2argv-sound-default-output-sdl.args new file mode 100644 index 0000000000..3e5982b9af --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-sound-default-output-sdl.args @@ -0,0 +1,23 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/home/test \ +USER=test \ +LOGNAME=test \ +/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 \ +-sdl \ +-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-default-output-sdl.xml b/tests/qemuxml2argvdata/qemuxml2argv-sound-default-output-sdl.xml new file mode 100644 index 0000000000..37750ae924 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-sound-default-output-sdl.xml @@ -0,0 +1,24 @@ +<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'/> + <graphics type='sdl'/> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-sound-default-output-spice-vnc.args b/tests/qemuxml2argvdata/qemuxml2argv-sound-default-output-spice-vnc.args new file mode 100644 index 0000000000..f5460887c4 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-sound-default-output-spice-vnc.args @@ -0,0 +1,25 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/home/test \ +USER=test \ +LOGNAME=test \ +QEMU_AUDIO_DRV=none \ +/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 \ +-vnc 127.0.0.1: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-default-output-spice-vnc.xml b/tests/qemuxml2argvdata/qemuxml2argv-sound-default-output-spice-vnc.xml new file mode 100644 index 0000000000..4e953162e1 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-sound-default-output-spice-vnc.xml @@ -0,0 +1,25 @@ +<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'/> + <graphics type='spice'/> + <graphics type='vnc'/> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-sound-default-output-spice.args b/tests/qemuxml2argvdata/qemuxml2argv-sound-default-output-spice.args new file mode 100644 index 0000000000..596d5d9412 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-sound-default-output-spice.args @@ -0,0 +1,24 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/home/test \ +USER=test \ +LOGNAME=test \ +QEMU_AUDIO_DRV=spice \ +/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-default-output-spice.xml b/tests/qemuxml2argvdata/qemuxml2argv-sound-default-output-spice.xml new file mode 100644 index 0000000000..7f8c15307a --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-sound-default-output-spice.xml @@ -0,0 +1,24 @@ +<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'/> + <graphics type='spice'/> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-sound-default-output-vnc-spice.args b/tests/qemuxml2argvdata/qemuxml2argv-sound-default-output-vnc-spice.args new file mode 100644 index 0000000000..eebdeb081e --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-sound-default-output-vnc-spice.args @@ -0,0 +1,25 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/home/test \ +USER=test \ +LOGNAME=test \ +QEMU_AUDIO_DRV=spice \ +/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 \ +-vnc 127.0.0.1:0 \ +-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-default-output-vnc-spice.xml b/tests/qemuxml2argvdata/qemuxml2argv-sound-default-output-vnc-spice.xml new file mode 100644 index 0000000000..d6d2aa659e --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-sound-default-output-vnc-spice.xml @@ -0,0 +1,25 @@ +<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'/> + <graphics type='vnc'/> + <graphics type='spice'/> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-sound-default-output-vnc.args b/tests/qemuxml2argvdata/qemuxml2argv-sound-default-output-vnc.args new file mode 100644 index 0000000000..d3007a69c2 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-sound-default-output-vnc.args @@ -0,0 +1,24 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/home/test \ +USER=test \ +LOGNAME=test \ +QEMU_AUDIO_DRV=none \ +/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 \ +-vnc 127.0.0.1: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-default-output-vnc.xml b/tests/qemuxml2argvdata/qemuxml2argv-sound-default-output-vnc.xml new file mode 100644 index 0000000000..c6733aaf2a --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-sound-default-output-vnc.xml @@ -0,0 +1,24 @@ +<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'/> + <graphics type='vnc'/> + <memballoon model='none'/> + </devices> +</domain> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 2e07b85aa6..6c80e0bc77 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1551,6 +1551,28 @@ mymain(void) QEMU_CAPS_HDA_DUPLEX, QEMU_CAPS_HDA_MICRO, QEMU_CAPS_DEVICE_ICH9_INTEL_HDA, QEMU_CAPS_OBJECT_USB_AUDIO); + DO_TEST("sound-default-output-spice", + QEMU_CAPS_HDA_DUPLEX, + QEMU_CAPS_SPICE, + QEMU_CAPS_DEVICE_CIRRUS_VGA); + DO_TEST("sound-default-output-vnc", + QEMU_CAPS_HDA_DUPLEX, + QEMU_CAPS_VNC, + QEMU_CAPS_DEVICE_CIRRUS_VGA); + DO_TEST("sound-default-output-sdl", + QEMU_CAPS_HDA_DUPLEX, + QEMU_CAPS_SDL, + QEMU_CAPS_DEVICE_CIRRUS_VGA); + DO_TEST("sound-default-output-spice-vnc", + QEMU_CAPS_HDA_DUPLEX, + QEMU_CAPS_SPICE, + QEMU_CAPS_VNC, + QEMU_CAPS_DEVICE_CIRRUS_VGA); + DO_TEST("sound-default-output-vnc-spice", + QEMU_CAPS_HDA_DUPLEX, + QEMU_CAPS_SPICE, + QEMU_CAPS_VNC, + 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