mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 19:32:19 +00:00
tests : Add test for 'ppc64le' architecture.
Signed-off-by: Prerna Saxena <prerna@linux.vnet.ibm.com>
This commit is contained in:
parent
0afa6be815
commit
8672a1e496
7
tests/qemuxml2argvdata/qemuxml2argv-pseries-cpu-le.args
Normal file
7
tests/qemuxml2argvdata/qemuxml2argv-pseries-cpu-le.args
Normal file
@ -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
|
17
tests/qemuxml2argvdata/qemuxml2argv-pseries-cpu-le.xml
Normal file
17
tests/qemuxml2argvdata/qemuxml2argv-pseries-cpu-le.xml
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<domain type='kvm'>
|
||||||
|
<name>QEMUGuest1</name>
|
||||||
|
<uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid>
|
||||||
|
<memory unit='KiB'>524288</memory>
|
||||||
|
<vcpu placement='static'>1</vcpu>
|
||||||
|
<os>
|
||||||
|
<type arch='ppc64le' machine='pseries'>hvm</type>
|
||||||
|
</os>
|
||||||
|
<clock offset='utc'/>
|
||||||
|
<devices>
|
||||||
|
<emulator>/usr/bin/qemu-system-ppc64</emulator>
|
||||||
|
<console type='pty'>
|
||||||
|
<address type="spapr-vio"/>
|
||||||
|
</console>
|
||||||
|
<memballoon model="none"/>
|
||||||
|
</devices>
|
||||||
|
</domain>
|
@ -1335,6 +1335,8 @@ mymain(void)
|
|||||||
QEMU_CAPS_NODEFCONFIG);
|
QEMU_CAPS_NODEFCONFIG);
|
||||||
DO_TEST("pseries-cpu-compat", QEMU_CAPS_KVM, QEMU_CAPS_CPU_HOST,
|
DO_TEST("pseries-cpu-compat", QEMU_CAPS_KVM, QEMU_CAPS_CPU_HOST,
|
||||||
QEMU_CAPS_CHARDEV, QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG);
|
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",
|
DO_TEST("disk-ide-drive-split",
|
||||||
QEMU_CAPS_DRIVE, QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG,
|
QEMU_CAPS_DRIVE, QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG,
|
||||||
QEMU_CAPS_IDE_CD);
|
QEMU_CAPS_IDE_CD);
|
||||||
|
@ -86,6 +86,33 @@ static int testQemuAddPPC64Guest(virCapsPtr caps)
|
|||||||
return -1;
|
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 int testQemuAddPPCGuest(virCapsPtr caps)
|
||||||
{
|
{
|
||||||
static const char *machine[] = { "g3beige",
|
static const char *machine[] = { "g3beige",
|
||||||
@ -328,6 +355,9 @@ virCapsPtr testQemuCapsInit(void)
|
|||||||
if (testQemuAddPPC64Guest(caps))
|
if (testQemuAddPPC64Guest(caps))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
if (testQemuAddPPC64LEGuest(caps))
|
||||||
|
goto cleanup;
|
||||||
|
|
||||||
if (testQemuAddPPCGuest(caps))
|
if (testQemuAddPPCGuest(caps))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user