diff --git a/tests/qemuxml2argvdata/qemuxml2argv-machine-aliases2.args b/tests/qemuxml2argvdata/qemuxml2argv-machine-aliases2.args new file mode 100644 index 0000000000..1a7650d03b --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-machine-aliases2.args @@ -0,0 +1 @@ +LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/kvm -S -M pc -m 214 -smp 1 -nographic -monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb diff --git a/tests/qemuxml2argvdata/qemuxml2argv-machine-aliases2.xml b/tests/qemuxml2argvdata/qemuxml2argv-machine-aliases2.xml new file mode 100644 index 0000000000..6f6224375a --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-machine-aliases2.xml @@ -0,0 +1,22 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219200 + 219200 + 1 + + hvm + + + + destroy + restart + destroy + + /usr/bin/kvm + + + + + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index afaf392258..d0cf71268f 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -191,6 +191,7 @@ mymain(int argc, char **argv) DO_TEST("minimal", QEMUD_CMD_FLAG_NAME); DO_TEST("machine-aliases1", 0); + DO_TEST("machine-aliases2", 0); DO_TEST("boot-cdrom", 0); DO_TEST("boot-network", 0); DO_TEST("boot-floppy", 0); diff --git a/tests/testutilsqemu.c b/tests/testutilsqemu.c index ad58010a13..9269f5cf82 100644 --- a/tests/testutilsqemu.c +++ b/tests/testutilsqemu.c @@ -101,13 +101,18 @@ virCapsPtr testQemuCapsInit(void) { 0, NULL) == NULL) goto cleanup; + + if ((machines = testQemuAllocMachines(&nmachines)) == NULL) + goto cleanup; + if (virCapabilitiesAddGuestDomain(guest, "kvm", "/usr/bin/kvm", NULL, - 0, - NULL) == NULL) + nmachines, + machines) == NULL) goto cleanup; + machines = NULL; nmachines = ARRAY_CARDINALITY(xen_machines); if ((machines = virCapabilitiesAllocMachines(xen_machines, nmachines)) == NULL)