From: Marc-André Lureau Date: Thu, 2 Apr 2015 16:44:44 +0000 (+0200) Subject: tests: add machine vmport qemu test X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=620655f353a5acf4a1d8890a71abf5fe68dc430d;p=people%2Fliuw%2Flibxenctrl-split%2Flibvirt.git tests: add machine vmport qemu test Check that the vmport feature is correctly used in qemu commande line. --- diff --git a/tests/qemuxml2argvdata/qemuxml2argv-machine-vmport-opt.args b/tests/qemuxml2argvdata/qemuxml2argv-machine-vmport-opt.args new file mode 100644 index 000000000..ea1a11f52 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-machine-vmport-opt.args @@ -0,0 +1,6 @@ +LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \ +/usr/bin/qemu \ +-S -machine pc,accel=tcg,vmport=off -m 214 -smp 1 -nographic \ +-monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -usb \ +-hda /dev/HostVG/QEMUGuest1 -net none -serial \ +none -parallel none diff --git a/tests/qemuxml2argvdata/qemuxml2argv-machine-vmport-opt.xml b/tests/qemuxml2argvdata/qemuxml2argv-machine-vmport-opt.xml new file mode 100644 index 000000000..671d3a991 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-machine-vmport-opt.xml @@ -0,0 +1,28 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219100 + 219100 + 1 + + hvm + + + + + + + destroy + restart + destroy + + /usr/bin/qemu + + + +
+ + + + + diff --git a/tests/qemuxml2argvdata/qemuxml2argv-machine-xen-vmport-opt.xml b/tests/qemuxml2argvdata/qemuxml2argv-machine-xen-vmport-opt.xml new file mode 100644 index 000000000..4466d1a36 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-machine-xen-vmport-opt.xml @@ -0,0 +1,27 @@ + + XenGuest2 + c7a5fdb2-cdaf-9455-926a-d65c16db1809 + 592896 + 403456 + 1 + + hvm + /usr/lib/xen/boot/hvmloader + + + + + + + + + + + + destroy + restart + restart + + /usr/lib/xen/bin/qemu-dm + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 4acaa11b8..4678261bc 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -594,6 +594,10 @@ mymain(void) DO_TEST_FAILURE("machine-core-on", QEMU_CAPS_MACHINE_OPT); DO_TEST("machine-usb-opt", QEMU_CAPS_MACHINE_OPT, QEMU_CAPS_MACHINE_USB_OPT); + DO_TEST("machine-vmport-opt", QEMU_CAPS_MACHINE_OPT, + QEMU_CAPS_MACHINE_VMPORT_OPT); + DO_TEST_FAILURE("machine-xen-vmport-opt", QEMU_CAPS_MACHINE_OPT, + QEMU_CAPS_MACHINE_VMPORT_OPT); DO_TEST("kvm", QEMU_CAPS_MACHINE_OPT); DO_TEST("boot-cdrom", NONE); DO_TEST("boot-network", NONE);