mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
tests: Add more GIC test cases
Test all kinds of scenarios, including guests asking for GIC but failing to specify a version, guests specifying an invalid version and guests trying to use GIC with non-virt or even non-ARM machines.
This commit is contained in:
parent
161a341850
commit
998a936c4c
1
tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-default.args
Symbolic link
1
tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-default.args
Symbolic link
@ -0,0 +1 @@
|
||||
qemuxml2argv-aarch64-gic-v2.args
|
22
tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-default.xml
Normal file
22
tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-default.xml
Normal file
@ -0,0 +1,22 @@
|
||||
<domain type='kvm'>
|
||||
<name>aarch64test</name>
|
||||
<uuid>6ba410c5-1e5c-4d57-bee7-2228e7ffa32f</uuid>
|
||||
<memory unit='KiB'>1048576</memory>
|
||||
<currentMemory unit='KiB'>1048576</currentMemory>
|
||||
<vcpu placement='static'>1</vcpu>
|
||||
<os>
|
||||
<type arch='aarch64' machine='virt'>hvm</type>
|
||||
<boot dev='hd'/>
|
||||
</os>
|
||||
<features>
|
||||
<gic/>
|
||||
</features>
|
||||
<cpu mode='host-passthrough'/>
|
||||
<clock offset='utc'/>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
<on_reboot>restart</on_reboot>
|
||||
<on_crash>destroy</on_crash>
|
||||
<devices>
|
||||
<emulator>/usr/bin/qemu-system-aarch64</emulator>
|
||||
</devices>
|
||||
</domain>
|
20
tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-host.args
Normal file
20
tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-host.args
Normal file
@ -0,0 +1,20 @@
|
||||
LC_ALL=C \
|
||||
PATH=/bin \
|
||||
HOME=/home/test \
|
||||
USER=test \
|
||||
LOGNAME=test \
|
||||
QEMU_AUDIO_DRV=none \
|
||||
/usr/bin/qemu-system-aarch64 \
|
||||
-name aarch64test \
|
||||
-S \
|
||||
-machine virt,accel=kvm,gic-version=host \
|
||||
-cpu host \
|
||||
-m 1024 \
|
||||
-smp 1 \
|
||||
-uuid 6ba410c5-1e5c-4d57-bee7-2228e7ffa32f \
|
||||
-nographic \
|
||||
-nodefaults \
|
||||
-monitor unix:/tmp/test-monitor,server,nowait \
|
||||
-no-acpi \
|
||||
-boot c \
|
||||
-usb
|
22
tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-host.xml
Normal file
22
tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-host.xml
Normal file
@ -0,0 +1,22 @@
|
||||
<domain type='kvm'>
|
||||
<name>aarch64test</name>
|
||||
<uuid>6ba410c5-1e5c-4d57-bee7-2228e7ffa32f</uuid>
|
||||
<memory unit='KiB'>1048576</memory>
|
||||
<currentMemory unit='KiB'>1048576</currentMemory>
|
||||
<vcpu placement='static'>1</vcpu>
|
||||
<os>
|
||||
<type arch='aarch64' machine='virt'>hvm</type>
|
||||
<boot dev='hd'/>
|
||||
</os>
|
||||
<features>
|
||||
<gic version='host'/>
|
||||
</features>
|
||||
<cpu mode='host-passthrough'/>
|
||||
<clock offset='utc'/>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
<on_reboot>restart</on_reboot>
|
||||
<on_crash>destroy</on_crash>
|
||||
<devices>
|
||||
<emulator>/usr/bin/qemu-system-aarch64</emulator>
|
||||
</devices>
|
||||
</domain>
|
22
tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-invalid.xml
Normal file
22
tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-invalid.xml
Normal file
@ -0,0 +1,22 @@
|
||||
<domain type='kvm'>
|
||||
<name>aarch64test</name>
|
||||
<uuid>6ba410c5-1e5c-4d57-bee7-2228e7ffa32f</uuid>
|
||||
<memory unit='KiB'>1048576</memory>
|
||||
<currentMemory unit='KiB'>1048576</currentMemory>
|
||||
<vcpu placement='static'>1</vcpu>
|
||||
<os>
|
||||
<type arch='aarch64' machine='virt'>hvm</type>
|
||||
<boot dev='hd'/>
|
||||
</os>
|
||||
<features>
|
||||
<gic version='none'/>
|
||||
</features>
|
||||
<cpu mode='host-passthrough'/>
|
||||
<clock offset='utc'/>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
<on_reboot>restart</on_reboot>
|
||||
<on_crash>destroy</on_crash>
|
||||
<devices>
|
||||
<emulator>/usr/bin/qemu-system-aarch64</emulator>
|
||||
</devices>
|
||||
</domain>
|
1
tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-none.args
Symbolic link
1
tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-none.args
Symbolic link
@ -0,0 +1 @@
|
||||
qemuxml2argv-aarch64-gic-v2.args
|
19
tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-none.xml
Normal file
19
tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-none.xml
Normal file
@ -0,0 +1,19 @@
|
||||
<domain type='kvm'>
|
||||
<name>aarch64test</name>
|
||||
<uuid>6ba410c5-1e5c-4d57-bee7-2228e7ffa32f</uuid>
|
||||
<memory unit='KiB'>1048576</memory>
|
||||
<currentMemory unit='KiB'>1048576</currentMemory>
|
||||
<vcpu placement='static'>1</vcpu>
|
||||
<os>
|
||||
<type arch='aarch64' machine='virt'>hvm</type>
|
||||
<boot dev='hd'/>
|
||||
</os>
|
||||
<cpu mode='host-passthrough'/>
|
||||
<clock offset='utc'/>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
<on_reboot>restart</on_reboot>
|
||||
<on_crash>destroy</on_crash>
|
||||
<devices>
|
||||
<emulator>/usr/bin/qemu-system-aarch64</emulator>
|
||||
</devices>
|
||||
</domain>
|
22
tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-not-arm.xml
Normal file
22
tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-not-arm.xml
Normal file
@ -0,0 +1,22 @@
|
||||
<domain type='kvm'>
|
||||
<name>aarch64test</name>
|
||||
<uuid>6ba410c5-1e5c-4d57-bee7-2228e7ffa32f</uuid>
|
||||
<memory unit='KiB'>1048576</memory>
|
||||
<currentMemory unit='KiB'>1048576</currentMemory>
|
||||
<vcpu placement='static'>1</vcpu>
|
||||
<os>
|
||||
<type arch='ppc64' machine='pseries'>hvm</type>
|
||||
<boot dev='hd'/>
|
||||
</os>
|
||||
<features>
|
||||
<gic/>
|
||||
</features>
|
||||
<cpu mode='host-passthrough'/>
|
||||
<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>
|
||||
</devices>
|
||||
</domain>
|
22
tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-not-virt.xml
Normal file
22
tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-not-virt.xml
Normal file
@ -0,0 +1,22 @@
|
||||
<domain type='kvm'>
|
||||
<name>aarch64test</name>
|
||||
<uuid>6ba410c5-1e5c-4d57-bee7-2228e7ffa32f</uuid>
|
||||
<memory unit='KiB'>1048576</memory>
|
||||
<currentMemory unit='KiB'>1048576</currentMemory>
|
||||
<vcpu placement='static'>1</vcpu>
|
||||
<os>
|
||||
<type arch='aarch64' machine='not-virt'>hvm</type>
|
||||
<boot dev='hd'/>
|
||||
</os>
|
||||
<features>
|
||||
<gic/>
|
||||
</features>
|
||||
<cpu mode='host-passthrough'/>
|
||||
<clock offset='utc'/>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
<on_reboot>restart</on_reboot>
|
||||
<on_crash>destroy</on_crash>
|
||||
<devices>
|
||||
<emulator>/usr/bin/qemu-system-aarch64</emulator>
|
||||
</devices>
|
||||
</domain>
|
@ -1679,14 +1679,40 @@ mymain(void)
|
||||
DO_TEST("aarch64-cpu-passthrough",
|
||||
QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_DEVICE_VIRTIO_MMIO,
|
||||
QEMU_CAPS_CPU_HOST, QEMU_CAPS_KVM);
|
||||
DO_TEST("aarch64-gic-none",
|
||||
QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT, QEMU_CAPS_CPU_HOST,
|
||||
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
|
||||
DO_TEST("aarch64-gic-none",
|
||||
QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT, QEMU_CAPS_CPU_HOST);
|
||||
DO_TEST("aarch64-gic-default",
|
||||
QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT, QEMU_CAPS_CPU_HOST,
|
||||
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
|
||||
DO_TEST("aarch64-gic-default",
|
||||
QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT, QEMU_CAPS_CPU_HOST);
|
||||
DO_TEST("aarch64-gic-v2",
|
||||
QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT, QEMU_CAPS_CPU_HOST,
|
||||
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
|
||||
DO_TEST("aarch64-gic-v2",
|
||||
QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT, QEMU_CAPS_CPU_HOST);
|
||||
DO_TEST("aarch64-gic-v3",
|
||||
QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT, QEMU_CAPS_CPU_HOST,
|
||||
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
|
||||
DO_TEST_FAILURE("aarch64-gic-v3",
|
||||
QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT, QEMU_CAPS_CPU_HOST);
|
||||
DO_TEST("aarch64-gic-host", QEMU_CAPS_DEVICE,
|
||||
QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT, QEMU_CAPS_CPU_HOST,
|
||||
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
|
||||
DO_TEST_FAILURE("aarch64-gic-host", QEMU_CAPS_DEVICE,
|
||||
QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT, QEMU_CAPS_CPU_HOST);
|
||||
DO_TEST_PARSE_ERROR("aarch64-gic-invalid", QEMU_CAPS_DEVICE,
|
||||
QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT, QEMU_CAPS_CPU_HOST,
|
||||
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
|
||||
DO_TEST_FAILURE("aarch64-gic-not-virt", QEMU_CAPS_DEVICE,
|
||||
QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT, QEMU_CAPS_CPU_HOST,
|
||||
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
|
||||
DO_TEST_FAILURE("aarch64-gic-not-arm", QEMU_CAPS_DEVICE,
|
||||
QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT, QEMU_CAPS_CPU_HOST,
|
||||
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
|
||||
|
||||
driver.caps->host.cpu->arch = VIR_ARCH_AARCH64;
|
||||
DO_TEST("aarch64-kvm-32-on-64",
|
||||
|
1
tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-gic-default.xml
Symbolic link
1
tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-gic-default.xml
Symbolic link
@ -0,0 +1 @@
|
||||
../qemuxml2argvdata/qemuxml2argv-aarch64-gic-v2.xml
|
1
tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-gic-host.xml
Symbolic link
1
tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-gic-host.xml
Symbolic link
@ -0,0 +1 @@
|
||||
../qemuxml2argvdata/qemuxml2argv-aarch64-gic-host.xml
|
1
tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-gic-none.xml
Symbolic link
1
tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-gic-none.xml
Symbolic link
@ -0,0 +1 @@
|
||||
../qemuxml2argvdata/qemuxml2argv-aarch64-gic-v2.xml
|
@ -737,8 +737,12 @@ mymain(void)
|
||||
QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_OBJECT_RNG_RANDOM,
|
||||
QEMU_CAPS_OBJECT_GPEX, QEMU_CAPS_DEVICE_PCI_BRIDGE,
|
||||
QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_VIRTIO_SCSI);
|
||||
|
||||
DO_TEST("aarch64-gic-none");
|
||||
DO_TEST("aarch64-gic-default");
|
||||
DO_TEST("aarch64-gic-v2");
|
||||
DO_TEST("aarch64-gic-v3");
|
||||
DO_TEST("aarch64-gic-host");
|
||||
|
||||
DO_TEST("memory-hotplug");
|
||||
DO_TEST("memory-hotplug-nonuma");
|
||||
|
Loading…
x
Reference in New Issue
Block a user