From 5001e2e9e661fe4819a2e253dea05a839caad055 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Tue, 17 Aug 2021 10:35:53 +0200 Subject: [PATCH] qemuxml2argvtest: Add 'DO_TEST_NOCAPS' to replace 'DO_TEST("blah", NONE);' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a explicit version of our test invocation macro for tests which use no capabilities. This reduces the usage of the somewhat anonymous 'NONE' macro and will lead to simplification of the code later. Signed-off-by: Peter Krempa Reviewed-by: Ján Tomko --- tests/qemuxml2argvtest.c | 346 ++++++++++++++++++++------------------- 1 file changed, 174 insertions(+), 172 deletions(-) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index f80e0bce0f..641bfbb816 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1013,6 +1013,8 @@ mymain(void) * */ # define DO_TEST(name, ...) \ DO_TEST_FULL(name, "", ARG_QEMU_CAPS, __VA_ARGS__, QEMU_CAPS_LAST, ARG_END) +# define DO_TEST_NOCAPS(name) \ + DO_TEST_FULL(name, "", ARG_END) # define DO_TEST_GIC(name, gic, ...) \ DO_TEST_FULL(name, "", \ @@ -1045,17 +1047,17 @@ mymain(void) g_unsetenv("QEMU_AUDIO_DRV"); g_unsetenv("SDL_AUDIODRIVER"); - DO_TEST("minimal", NONE); + DO_TEST_NOCAPS("minimal"); DO_TEST_PARSE_ERROR("minimal-no-memory", NONE); DO_TEST_CAPS_LATEST("genid"); DO_TEST_CAPS_LATEST("genid-auto"); - DO_TEST("machine-aliases1", NONE); + DO_TEST_NOCAPS("machine-aliases1"); DO_TEST("machine-aliases2", QEMU_CAPS_KVM); - DO_TEST("machine-core-on", NONE); + DO_TEST_NOCAPS("machine-core-on"); driver.config->dumpGuestCore = true; - DO_TEST("machine-core-off", NONE); + DO_TEST_NOCAPS("machine-core-off"); driver.config->dumpGuestCore = false; DO_TEST("machine-smm-opt", QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, @@ -1065,24 +1067,24 @@ mymain(void) QEMU_CAPS_VIRTIO_SCSI); DO_TEST("machine-vmport-opt", QEMU_CAPS_MACHINE_VMPORT_OPT); - DO_TEST("default-kvm-host-arch", NONE); - DO_TEST("default-qemu-host-arch", NONE); - DO_TEST("x86-kvm-32-on-64", NONE); - DO_TEST("boot-cdrom", NONE); - DO_TEST("boot-network", NONE); - DO_TEST("boot-floppy", NONE); + DO_TEST_NOCAPS("default-kvm-host-arch"); + DO_TEST_NOCAPS("default-qemu-host-arch"); + DO_TEST_NOCAPS("x86-kvm-32-on-64"); + DO_TEST_NOCAPS("boot-cdrom"); + DO_TEST_NOCAPS("boot-network"); + DO_TEST_NOCAPS("boot-floppy"); DO_TEST("boot-floppy-q35", QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_ICH9_AHCI); - DO_TEST("boot-multi", NONE); - DO_TEST("boot-menu-enable", NONE); + DO_TEST_NOCAPS("boot-multi"); + DO_TEST_NOCAPS("boot-menu-enable"); DO_TEST("boot-menu-enable-with-timeout", QEMU_CAPS_SPLASH_TIMEOUT); DO_TEST_PARSE_ERROR("boot-menu-enable-with-timeout", NONE); DO_TEST_PARSE_ERROR("boot-menu-enable-with-timeout-invalid", QEMU_CAPS_SPLASH_TIMEOUT); - DO_TEST("boot-menu-disable", NONE); - DO_TEST("boot-menu-disable-drive", NONE); + DO_TEST_NOCAPS("boot-menu-disable"); + DO_TEST_NOCAPS("boot-menu-disable-drive"); DO_TEST_PARSE_ERROR("boot-dev+order", QEMU_CAPS_VIRTIO_BLK_SCSI); DO_TEST("boot-order", @@ -1094,15 +1096,15 @@ mymain(void) QEMU_CAPS_VIRTIO_BLK_SCSI); /* Simplest possible