mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
tests: Add tests for configuration of HPT resizing
Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
parent
85b2ae96df
commit
5e192a3620
@ -0,0 +1,18 @@
|
||||
<domain type='qemu'>
|
||||
<name>guest</name>
|
||||
<uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid>
|
||||
<memory unit='KiB'>524288</memory>
|
||||
<vcpu placement='static'>1</vcpu>
|
||||
<os>
|
||||
<type arch='x86_64' machine='pc'>hvm</type>
|
||||
</os>
|
||||
<features>
|
||||
<!-- HPT resizing can't be enabled for non-pSeries guests -->
|
||||
<hpt resizing='enabled'/>
|
||||
</features>
|
||||
<devices>
|
||||
<emulator>/usr/bin/qemu-system-x86_64</emulator>
|
||||
<controller type='usb' model='none'/>
|
||||
<memballoon model='none'/>
|
||||
</devices>
|
||||
</domain>
|
@ -0,0 +1,20 @@
|
||||
LC_ALL=C \
|
||||
PATH=/bin \
|
||||
HOME=/home/test \
|
||||
USER=test \
|
||||
LOGNAME=test \
|
||||
QEMU_AUDIO_DRV=none \
|
||||
/usr/bin/qemu-system-ppc64 \
|
||||
-name guest \
|
||||
-S \
|
||||
-machine pseries,accel=tcg,resize-hpt=required \
|
||||
-m 512 \
|
||||
-smp 1,sockets=1,cores=1,threads=1 \
|
||||
-uuid 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 \
|
||||
-nographic \
|
||||
-nodefconfig \
|
||||
-nodefaults \
|
||||
-chardev socket,id=charmonitor,path=/tmp/lib/domain--1-guest/monitor.sock,\
|
||||
server,nowait \
|
||||
-mon chardev=charmonitor,id=monitor,mode=readline \
|
||||
-boot c
|
19
tests/qemuxml2argvdata/qemuxml2argv-pseries-hpt-resizing.xml
Normal file
19
tests/qemuxml2argvdata/qemuxml2argv-pseries-hpt-resizing.xml
Normal file
@ -0,0 +1,19 @@
|
||||
<domain type='qemu'>
|
||||
<name>guest</name>
|
||||
<uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid>
|
||||
<memory unit='KiB'>524288</memory>
|
||||
<vcpu placement='static'>1</vcpu>
|
||||
<os>
|
||||
<type arch='ppc64' machine='pseries'>hvm</type>
|
||||
</os>
|
||||
<features>
|
||||
<!-- Explicitly enable HPT resizing. The guest will not start
|
||||
at all unless HPT resizing can be arranged -->
|
||||
<hpt resizing='required'/>
|
||||
</features>
|
||||
<devices>
|
||||
<emulator>/usr/bin/qemu-system-ppc64</emulator>
|
||||
<controller type='usb' model='none'/>
|
||||
<memballoon model='none'/>
|
||||
</devices>
|
||||
</domain>
|
@ -1848,6 +1848,18 @@ mymain(void)
|
||||
QEMU_CAPS_VIRTIO_SCSI,
|
||||
QEMU_CAPS_DEVICE_VFIO_PCI);
|
||||
|
||||
DO_TEST("pseries-hpt-resizing",
|
||||
QEMU_CAPS_NODEFCONFIG,
|
||||
QEMU_CAPS_MACHINE_OPT,
|
||||
QEMU_CAPS_MACHINE_PSERIES_RESIZE_HPT);
|
||||
DO_TEST_FAILURE("pseries-hpt-resizing",
|
||||
QEMU_CAPS_NODEFCONFIG,
|
||||
QEMU_CAPS_MACHINE_OPT);
|
||||
DO_TEST_PARSE_ERROR("pseries-hpt-resizing-invalid-machine",
|
||||
QEMU_CAPS_NODEFCONFIG,
|
||||
QEMU_CAPS_MACHINE_OPT,
|
||||
QEMU_CAPS_MACHINE_PSERIES_RESIZE_HPT);
|
||||
|
||||
DO_TEST("disk-ide-drive-split",
|
||||
QEMU_CAPS_NODEFCONFIG,
|
||||
QEMU_CAPS_IDE_CD);
|
||||
|
@ -0,0 +1,28 @@
|
||||
<domain type='qemu'>
|
||||
<name>guest</name>
|
||||
<uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid>
|
||||
<memory unit='KiB'>524288</memory>
|
||||
<currentMemory unit='KiB'>524288</currentMemory>
|
||||
<vcpu placement='static'>1</vcpu>
|
||||
<os>
|
||||
<type arch='ppc64' machine='pseries'>hvm</type>
|
||||
<boot dev='hd'/>
|
||||
</os>
|
||||
<features>
|
||||
<hpt resizing='required'/>
|
||||
</features>
|
||||
<clock offset='utc'/>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
<on_reboot>restart</on_reboot>
|
||||
<on_crash>destroy</on_crash>
|
||||
<devices>
|
||||
<emulator>/usr/bin/qemu-system-ppc64</emulator>
|
||||
<controller type='usb' index='0' model='none'/>
|
||||
<controller type='pci' index='0' model='pci-root'>
|
||||
<model name='spapr-pci-host-bridge'/>
|
||||
<target index='0'/>
|
||||
</controller>
|
||||
<memballoon model='none'/>
|
||||
<panic model='pseries'/>
|
||||
</devices>
|
||||
</domain>
|
@ -761,6 +761,11 @@ mymain(void)
|
||||
QEMU_CAPS_VIRTIO_SCSI,
|
||||
QEMU_CAPS_DEVICE_VFIO_PCI);
|
||||
|
||||
DO_TEST("pseries-hpt-resizing",
|
||||
QEMU_CAPS_NODEFCONFIG,
|
||||
QEMU_CAPS_MACHINE_OPT,
|
||||
QEMU_CAPS_MACHINE_PSERIES_RESIZE_HPT);
|
||||
|
||||
DO_TEST("balloon-device-auto", NONE);
|
||||
DO_TEST("balloon-device-period", NONE);
|
||||
DO_TEST("channel-virtio-auto", NONE);
|
||||
|
Loading…
Reference in New Issue
Block a user