From ba8bced3cf650ff5e47eed31f488e0e501a9c48a 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_PARSE_ERROR_NOCAPS' to replace 'DO_TEST_PARSE_ERROR("blah", NONE);' MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 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 | 186 ++++++++++++++++++++------------------- 1 file changed, 94 insertions(+), 92 deletions(-) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 641bfbb816..0c53d8aec5 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1030,6 +1030,10 @@ mymain(void) DO_TEST_FULL(name, "", \ ARG_FLAGS, FLAG_EXPECT_PARSE_ERROR | FLAG_EXPECT_FAILURE, \ ARG_QEMU_CAPS, __VA_ARGS__, QEMU_CAPS_LAST, ARG_END) +# define DO_TEST_PARSE_ERROR_NOCAPS(name) \ + DO_TEST_FULL(name, "", \ + ARG_FLAGS, FLAG_EXPECT_PARSE_ERROR | FLAG_EXPECT_FAILURE, \ + ARG_END) # define NONE QEMU_CAPS_LAST @@ -1048,7 +1052,7 @@ mymain(void) g_unsetenv("SDL_AUDIODRIVER"); DO_TEST_NOCAPS("minimal"); - DO_TEST_PARSE_ERROR("minimal-no-memory", NONE); + DO_TEST_PARSE_ERROR_NOCAPS("minimal-no-memory"); DO_TEST_CAPS_LATEST("genid"); DO_TEST_CAPS_LATEST("genid-auto"); @@ -1080,7 +1084,7 @@ mymain(void) 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_NOCAPS("boot-menu-enable-with-timeout"); DO_TEST_PARSE_ERROR("boot-menu-enable-with-timeout-invalid", QEMU_CAPS_SPLASH_TIMEOUT); DO_TEST_NOCAPS("boot-menu-disable"); @@ -1099,7 +1103,7 @@ mymain(void) DO_TEST_NOCAPS("audio-none-minimal"); DO_TEST_NOCAPS("audio-alsa-minimal"); DO_TEST_NOCAPS("audio-coreaudio-minimal"); - DO_TEST_PARSE_ERROR("audio-jack-minimal", NONE); + DO_TEST_PARSE_ERROR_NOCAPS("audio-jack-minimal"); DO_TEST_NOCAPS("audio-oss-minimal"); DO_TEST_NOCAPS("audio-pulseaudio-minimal"); DO_TEST_NOCAPS("audio-sdl-minimal"); @@ -1136,15 +1140,15 @@ mymain(void) DO_TEST_CAPS_LATEST("audio-file-best"); /* Full