mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 11:35:19 +00:00
tests: Try different usable GIC versions
The only case where the hardware capabilities influence the result is when no <gic/> element was provided. The test programs now ensure both that the correct GIC version is picked in that case, and that hardware capabilities are not taken into account when the user has already picked a GIC version.
This commit is contained in:
parent
63bc91eea0
commit
f6ececa68d
1
tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-none-both.args
Symbolic link
1
tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-none-both.args
Symbolic link
@ -0,0 +1 @@
|
||||
qemuxml2argv-aarch64-gic-v3.args
|
1
tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-none-both.xml
Symbolic link
1
tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-none-both.xml
Symbolic link
@ -0,0 +1 @@
|
||||
qemuxml2argv-aarch64-gic-none.xml
|
1
tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-none-v2.args
Symbolic link
1
tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-none-v2.args
Symbolic link
@ -0,0 +1 @@
|
||||
qemuxml2argv-aarch64-gic-v2.args
|
1
tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-none-v2.xml
Symbolic link
1
tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-none-v2.xml
Symbolic link
@ -0,0 +1 @@
|
||||
qemuxml2argv-aarch64-gic-none.xml
|
1
tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-none-v3.args
Symbolic link
1
tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-none-v3.args
Symbolic link
@ -0,0 +1 @@
|
||||
qemuxml2argv-aarch64-gic-v3.args
|
1
tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-none-v3.xml
Symbolic link
1
tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-none-v3.xml
Symbolic link
@ -0,0 +1 @@
|
||||
qemuxml2argv-aarch64-gic-none-v2.xml
|
@ -540,6 +540,9 @@ mymain(void)
|
||||
# define DO_TEST(name, ...) \
|
||||
DO_TEST_FULL(name, NULL, -1, 0, 0, GIC_NONE, __VA_ARGS__)
|
||||
|
||||
# define DO_TEST_GIC(name, gic, ...) \
|
||||
DO_TEST_FULL(name, NULL, -1, 0, 0, gic, __VA_ARGS__)
|
||||
|
||||
# define DO_TEST_FAILURE(name, ...) \
|
||||
DO_TEST_FULL(name, NULL, -1, FLAG_EXPECT_FAILURE, \
|
||||
0, GIC_NONE, __VA_ARGS__)
|
||||
@ -1737,38 +1740,83 @@ mymain(void)
|
||||
DO_TEST("aarch64-cpu-passthrough",
|
||||
QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_DEVICE_VIRTIO_MMIO,
|
||||
QEMU_CAPS_KVM);
|
||||
DO_TEST("aarch64-gic-none",
|
||||
QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT,
|
||||
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
|
||||
DO_TEST("aarch64-gic-none",
|
||||
DO_TEST_GIC("aarch64-gic-none", GIC_NONE,
|
||||
QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT);
|
||||
DO_TEST("aarch64-gic-default",
|
||||
DO_TEST_GIC("aarch64-gic-none", GIC_NONE,
|
||||
QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT,
|
||||
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
|
||||
DO_TEST("aarch64-gic-default",
|
||||
DO_TEST_GIC("aarch64-gic-none-v2", GIC_V2,
|
||||
QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT,
|
||||
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
|
||||
DO_TEST_GIC("aarch64-gic-none-v3", GIC_V3,
|
||||
QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT,
|
||||
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
|
||||
DO_TEST_GIC("aarch64-gic-none-both", GIC_BOTH,
|
||||
QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT,
|
||||
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
|
||||
DO_TEST_GIC("aarch64-gic-default", GIC_NONE,
|
||||
QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT);
|
||||
DO_TEST("aarch64-gic-v2",
|
||||
DO_TEST_GIC("aarch64-gic-default", GIC_NONE,
|
||||
QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT,
|
||||
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
|
||||
DO_TEST("aarch64-gic-v2",
|
||||
DO_TEST_GIC("aarch64-gic-default", GIC_V2,
|
||||
QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT,
|
||||
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
|
||||
DO_TEST_GIC("aarch64-gic-default", GIC_V3,
|
||||
QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT,
|
||||
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
|
||||
DO_TEST_GIC("aarch64-gic-default", GIC_BOTH,
|
||||
QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT,
|
||||
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
|
||||
DO_TEST_GIC("aarch64-gic-v2", GIC_NONE,
|
||||
QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT);
|
||||
DO_TEST("aarch64-gic-v3",
|
||||
DO_TEST_GIC("aarch64-gic-v2", GIC_NONE,
|
||||
QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT,
|
||||
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
|
||||
DO_TEST_FAILURE("aarch64-gic-v3",
|
||||
DO_TEST_GIC("aarch64-gic-v2", GIC_V2,
|
||||
QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT,
|
||||
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
|
||||
DO_TEST_GIC("aarch64-gic-v2", GIC_V3,
|
||||
QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT,
|
||||
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
|
||||
DO_TEST_GIC("aarch64-gic-v2", GIC_BOTH,
|
||||
QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT,
|
||||
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
|
||||
DO_TEST_FAILURE("aarch64-gic-v3", GIC_NONE,
|
||||
QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT);
|
||||
DO_TEST("aarch64-gic-host",
|
||||
DO_TEST_GIC("aarch64-gic-v3", GIC_NONE,
|
||||
QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT,
|
||||
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
|
||||
DO_TEST_FAILURE("aarch64-gic-host",
|
||||
DO_TEST_GIC("aarch64-gic-v3", GIC_V2,
|
||||
QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT,
|
||||
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
|
||||
DO_TEST_GIC("aarch64-gic-v3", GIC_V3,
|
||||
QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT,
|
||||
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
|
||||
DO_TEST_GIC("aarch64-gic-v3", GIC_BOTH,
|
||||
QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT,
|
||||
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
|
||||
DO_TEST_FAILURE("aarch64-gic-host", GIC_NONE,
|
||||
QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT);
|
||||
DO_TEST_PARSE_ERROR("aarch64-gic-invalid",
|
||||
DO_TEST_GIC("aarch64-gic-host", GIC_NONE,
|
||||
QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT,
|
||||
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
|
||||
DO_TEST_FAILURE("aarch64-gic-not-virt",
|
||||
DO_TEST_GIC("aarch64-gic-host", GIC_V2,
|
||||
QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT,
|
||||
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
|
||||
DO_TEST_FAILURE("aarch64-gic-not-arm",
|
||||
DO_TEST_GIC("aarch64-gic-host", GIC_V3,
|
||||
QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT,
|
||||
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
|
||||
DO_TEST_GIC("aarch64-gic-host", GIC_BOTH,
|
||||
QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT,
|
||||
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
|
||||
DO_TEST_PARSE_ERROR("aarch64-gic-invalid", GIC_NONE,
|
||||
QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT,
|
||||
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
|
||||
DO_TEST_FAILURE("aarch64-gic-not-virt", GIC_NONE,
|
||||
QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT,
|
||||
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
|
||||
DO_TEST_FAILURE("aarch64-gic-not-arm", GIC_NONE,
|
||||
QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT,
|
||||
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
|
||||
|
||||
|
@ -0,0 +1 @@
|
||||
../qemuxml2argvdata/qemuxml2argv-aarch64-gic-v3.xml
|
1
tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-gic-none-v2.xml
Symbolic link
1
tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-gic-none-v2.xml
Symbolic link
@ -0,0 +1 @@
|
||||
../qemuxml2argvdata/qemuxml2argv-aarch64-gic-v2.xml
|
1
tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-gic-none-v3.xml
Symbolic link
1
tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-gic-none-v3.xml
Symbolic link
@ -0,0 +1 @@
|
||||
../qemuxml2argvdata/qemuxml2argv-aarch64-gic-v3.xml
|
@ -775,11 +775,26 @@ mymain(void)
|
||||
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_FULL("aarch64-gic-none", WHEN_BOTH, GIC_NONE, NONE);
|
||||
DO_TEST_FULL("aarch64-gic-none-v2", WHEN_BOTH, GIC_V2, NONE);
|
||||
DO_TEST_FULL("aarch64-gic-none-v3", WHEN_BOTH, GIC_V3, NONE);
|
||||
DO_TEST_FULL("aarch64-gic-none-both", WHEN_BOTH, GIC_BOTH, NONE);
|
||||
DO_TEST_FULL("aarch64-gic-default", WHEN_BOTH, GIC_NONE, NONE);
|
||||
DO_TEST_FULL("aarch64-gic-default", WHEN_BOTH, GIC_V2, NONE);
|
||||
DO_TEST_FULL("aarch64-gic-default", WHEN_BOTH, GIC_V3, NONE);
|
||||
DO_TEST_FULL("aarch64-gic-default", WHEN_BOTH, GIC_BOTH, NONE);
|
||||
DO_TEST_FULL("aarch64-gic-v2", WHEN_BOTH, GIC_NONE, NONE);
|
||||
DO_TEST_FULL("aarch64-gic-v2", WHEN_BOTH, GIC_V2, NONE);
|
||||
DO_TEST_FULL("aarch64-gic-v2", WHEN_BOTH, GIC_V3, NONE);
|
||||
DO_TEST_FULL("aarch64-gic-v2", WHEN_BOTH, GIC_BOTH, NONE);
|
||||
DO_TEST_FULL("aarch64-gic-v3", WHEN_BOTH, GIC_NONE, NONE);
|
||||
DO_TEST_FULL("aarch64-gic-v3", WHEN_BOTH, GIC_V2, NONE);
|
||||
DO_TEST_FULL("aarch64-gic-v3", WHEN_BOTH, GIC_V3, NONE);
|
||||
DO_TEST_FULL("aarch64-gic-v3", WHEN_BOTH, GIC_BOTH, NONE);
|
||||
DO_TEST_FULL("aarch64-gic-host", WHEN_BOTH, GIC_NONE, NONE);
|
||||
DO_TEST_FULL("aarch64-gic-host", WHEN_BOTH, GIC_V2, NONE);
|
||||
DO_TEST_FULL("aarch64-gic-host", WHEN_BOTH, GIC_V3, NONE);
|
||||
DO_TEST_FULL("aarch64-gic-host", WHEN_BOTH, GIC_BOTH, NONE);
|
||||
|
||||
DO_TEST("memory-hotplug");
|
||||
DO_TEST("memory-hotplug-nonuma");
|
||||
|
Loading…
Reference in New Issue
Block a user