提交 f6ececa6 编写于 作者: A Andrea Bolognani

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.
上级 63bc91ee
qemuxml2argv-aarch64-gic-v3.args
\ No newline at end of file
qemuxml2argv-aarch64-gic-none.xml
\ No newline at end of file
qemuxml2argv-aarch64-gic-v2.args
\ No newline at end of file
qemuxml2argv-aarch64-gic-none.xml
\ No newline at end of file
qemuxml2argv-aarch64-gic-v3.args
\ No newline at end of file
qemuxml2argv-aarch64-gic-none-v2.xml
\ No newline at end of file
......@@ -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",
DO_TEST_GIC("aarch64-gic-none", GIC_NONE,
QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT);
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-none",
QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT);
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("aarch64-gic-default",
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_GIC("aarch64-gic-default", GIC_V2,
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_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_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_FAILURE("aarch64-gic-v3",
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_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",
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_GIC("aarch64-gic-host", GIC_V2,
QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT,
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
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",
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",
DO_TEST_FAILURE("aarch64-gic-not-arm", GIC_NONE,
QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT,
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
......
../qemuxml2argvdata/qemuxml2argv-aarch64-gic-v3.xml
\ No newline at end of file
../qemuxml2argvdata/qemuxml2argv-aarch64-gic-v2.xml
\ No newline at end of file
../qemuxml2argvdata/qemuxml2argv-aarch64-gic-v3.xml
\ No newline at end of file
......@@ -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");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册