diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pseries-cpu-le.args b/tests/qemuxml2argvdata/qemuxml2argv-pseries-cpu-le.args new file mode 100644 index 0000000000000000000000000000000000000000..f4f8d5e0bf0e2d7d5cb664e34cab347f42d600a4 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-pseries-cpu-le.args @@ -0,0 +1,7 @@ +LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test \ +QEMU_AUDIO_DRV=none /usr/bin/qemu-system-ppc64 -S -M pseries \ +-m 512 -smp 1 -nographic -nodefconfig -nodefaults \ +-chardev socket,id=charmonitor,path=/tmp/test-monitor,server,nowait \ +-mon chardev=charmonitor,id=monitor,mode=readline -no-acpi -boot c -usb \ +-chardev pty,id=charserial0 \ +-device spapr-vty,chardev=charserial0,reg=0x30000000 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pseries-cpu-le.xml b/tests/qemuxml2argvdata/qemuxml2argv-pseries-cpu-le.xml new file mode 100644 index 0000000000000000000000000000000000000000..b791a73d85f22cfebcabe2815544173b486eff8a --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-pseries-cpu-le.xml @@ -0,0 +1,17 @@ + + QEMUGuest1 + 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 + 524288 + 1 + + hvm + + + + /usr/bin/qemu-system-ppc64 + +
+ + + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 582671ed475c25d7bbee2b8e4377acda8c8cb5b9..681f8fe64c4e6dc57a597158cd7f53868983109d 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1335,6 +1335,8 @@ mymain(void) QEMU_CAPS_NODEFCONFIG); DO_TEST("pseries-cpu-compat", QEMU_CAPS_KVM, QEMU_CAPS_CPU_HOST, QEMU_CAPS_CHARDEV, QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG); + DO_TEST("pseries-cpu-le", QEMU_CAPS_KVM, QEMU_CAPS_CPU_HOST, + QEMU_CAPS_CHARDEV, QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG); DO_TEST("disk-ide-drive-split", QEMU_CAPS_DRIVE, QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_IDE_CD); diff --git a/tests/testutilsqemu.c b/tests/testutilsqemu.c index e3d4503079f12adf5bd1a39b963b299aa7384998..d72e7d8479802f6c70a5390e88330052842313c5 100644 --- a/tests/testutilsqemu.c +++ b/tests/testutilsqemu.c @@ -86,6 +86,33 @@ static int testQemuAddPPC64Guest(virCapsPtr caps) return -1; } +static int testQemuAddPPC64LEGuest(virCapsPtr caps) +{ + static const char *machine[] = { "pseries" }; + virCapsGuestMachinePtr *machines = NULL; + virCapsGuestPtr guest; + + machines = virCapabilitiesAllocMachines(machine, 1); + if (!machines) + goto error; + + guest = virCapabilitiesAddGuest(caps, "hvm", VIR_ARCH_PPC64LE, + "/usr/bin/qemu-system-ppc64", NULL, + 1, machines); + if (!guest) + goto error; + + if (!virCapabilitiesAddGuestDomain(guest, "qemu", NULL, NULL, 0, NULL)) + goto error; + + return 0; + + error: + /* No way to free a guest? */ + virCapabilitiesFreeMachines(machines, 1); + return -1; +} + static int testQemuAddPPCGuest(virCapsPtr caps) { static const char *machine[] = { "g3beige", @@ -328,6 +355,9 @@ virCapsPtr testQemuCapsInit(void) if (testQemuAddPPC64Guest(caps)) goto cleanup; + if (testQemuAddPPC64LEGuest(caps)) + goto cleanup; + if (testQemuAddPPCGuest(caps)) goto cleanup;