Validate that we can pass QEMU command line options using a default namespace, instead of a prefixed namespace Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx> --- .../qemuxml2argvdata/qemuxml2argv-qemu-ns-alt.args | 27 +++++++++++++++++++ .../qemuxml2argvdata/qemuxml2argv-qemu-ns-alt.xml | 30 ++++++++++++++++++++++ tests/qemuxml2argvtest.c | 1 + 3 files changed, 58 insertions(+) create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-qemu-ns-alt.args create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-qemu-ns-alt.xml diff --git a/tests/qemuxml2argvdata/qemuxml2argv-qemu-ns-alt.args b/tests/qemuxml2argvdata/qemuxml2argv-qemu-ns-alt.args new file mode 100644 index 000000000..9650e7478 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-qemu-ns-alt.args @@ -0,0 +1,27 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/home/test \ +USER=test \ +LOGNAME=test \ +QEMU_AUDIO_DRV=none \ +NS=ns \ +BAR='' \ +/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 \ +-nographic \ +-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 \ +-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \ +-device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \ +-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \ +-unknown parameter diff --git a/tests/qemuxml2argvdata/qemuxml2argv-qemu-ns-alt.xml b/tests/qemuxml2argvdata/qemuxml2argv-qemu-ns-alt.xml new file mode 100644 index 000000000..491fc2d80 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-qemu-ns-alt.xml @@ -0,0 +1,30 @@ +<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> + <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-system-i686</emulator> + <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='ide' index='0'/> + </devices> + <commandline xmlns='http://libvirt.org/schemas/domain/qemu/1.0'> + <arg value='-unknown'/> + <arg value='parameter'/> + <env name='NS' value='ns'/> + <env name='BAR'/> + </commandline> +</domain> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index aa83013a2..655c89bc3 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1558,6 +1558,7 @@ mymain(void) DO_TEST("qemu-ns", NONE); DO_TEST("qemu-ns-no-env", NONE); + DO_TEST("qemu-ns-alt", NONE); DO_TEST("smp", NONE); -- 2.13.3 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list