[PATCH v2 07/23] qemuxml2argvtest: Add QEMU_CAPS_LAST in places where ARG_QEMU_CAPS is used

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The 'DO_TEST_FULL' macro was ending the argument list which was being
started in other macros. Move it so that 'ARG_QEMU_CAPS' and
'QEMU_CAPS_LAST' are always used in the same macro.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 tests/qemuxml2argvtest.c | 40 ++++++++++++++++++----------------------
 1 file changed, 18 insertions(+), 22 deletions(-)

diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 6a3fa4c152..6162ebf3bb 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -1010,29 +1010,29 @@ mymain(void)

 # define DO_TEST_FULL(name, ...) \
     DO_TEST_INTERNAL(name, "", \
-                     __VA_ARGS__, QEMU_CAPS_LAST, ARG_END)
+                     __VA_ARGS__, ARG_END)

 /* All the following macros require an explicit QEMU_CAPS_* list
  * at the end of the argument list, or the NONE placeholder.
  * */
 # define DO_TEST(name, ...) \
     DO_TEST_FULL(name, \
-                 ARG_QEMU_CAPS, __VA_ARGS__)
+                 ARG_QEMU_CAPS, __VA_ARGS__, QEMU_CAPS_LAST)

 # define DO_TEST_GIC(name, gic, ...) \
     DO_TEST_FULL(name, \
                  ARG_GIC, gic, \
-                 ARG_QEMU_CAPS, __VA_ARGS__)
+                 ARG_QEMU_CAPS, __VA_ARGS__, QEMU_CAPS_LAST)

 # define DO_TEST_FAILURE(name, ...) \
     DO_TEST_FULL(name, \
                  ARG_FLAGS, FLAG_EXPECT_FAILURE, \
-                 ARG_QEMU_CAPS, __VA_ARGS__)
+                 ARG_QEMU_CAPS, __VA_ARGS__, QEMU_CAPS_LAST)

 # define DO_TEST_PARSE_ERROR(name, ...) \
     DO_TEST_FULL(name, \
                  ARG_FLAGS, FLAG_EXPECT_PARSE_ERROR | FLAG_EXPECT_FAILURE, \
-                 ARG_QEMU_CAPS, __VA_ARGS__)
+                 ARG_QEMU_CAPS, __VA_ARGS__, QEMU_CAPS_LAST)

 # define NONE QEMU_CAPS_LAST

@@ -2016,26 +2016,23 @@ mymain(void)

     DO_TEST_FULL("restore-v2",
                  ARG_MIGRATE_FROM, "exec:cat",
-                 ARG_MIGRATE_FD, 7,
-                 ARG_QEMU_CAPS, NONE);
+                 ARG_MIGRATE_FD, 7);
     DO_TEST_FULL("restore-v2-fd",
                  ARG_MIGRATE_FROM, "stdio",
-                 ARG_MIGRATE_FD, 7,
-                 ARG_QEMU_CAPS, NONE);
+                 ARG_MIGRATE_FD, 7);
     DO_TEST_FULL("restore-v2-fd",
                  ARG_MIGRATE_FROM, "fd:7",
-                 ARG_MIGRATE_FD, 7,
-                 ARG_QEMU_CAPS, NONE);
+                 ARG_MIGRATE_FD, 7);
     DO_TEST_FULL("migrate",
-                 ARG_MIGRATE_FROM, "tcp:10.0.0.1:5000",
-                 ARG_QEMU_CAPS, NONE);
+                 ARG_MIGRATE_FROM, "tcp:10.0.0.1:5000");

     DO_TEST_FULL("migrate-numa-unaligned",
                  ARG_MIGRATE_FROM, "stdio",
                  ARG_MIGRATE_FD, 7,
                  ARG_QEMU_CAPS,
                  QEMU_CAPS_NUMA,
-                 QEMU_CAPS_OBJECT_MEMORY_RAM);
+                 QEMU_CAPS_OBJECT_MEMORY_RAM,
+                 QEMU_CAPS_LAST);

     DO_TEST_CAPS_VER("qemu-ns", "4.0.0");
     DO_TEST_CAPS_LATEST("qemu-ns");
@@ -2080,11 +2077,9 @@ mymain(void)
     DO_TEST("cpu-host-model", NONE);
     DO_TEST("cpu-host-model-vendor", NONE);
     DO_TEST_FULL("cpu-host-model-fallback",
-                 ARG_FLAGS, FLAG_SKIP_LEGACY_CPUS,
-                 ARG_QEMU_CAPS, NONE);
+                 ARG_FLAGS, FLAG_SKIP_LEGACY_CPUS);
     DO_TEST_FULL("cpu-host-model-nofallback",
-                 ARG_FLAGS, FLAG_SKIP_LEGACY_CPUS | FLAG_EXPECT_FAILURE,
-                 ARG_QEMU_CAPS, NONE);
+                 ARG_FLAGS, FLAG_SKIP_LEGACY_CPUS | FLAG_EXPECT_FAILURE);
     DO_TEST("cpu-host-passthrough", QEMU_CAPS_KVM);
     DO_TEST_FAILURE("cpu-qemu-host-passthrough", QEMU_CAPS_KVM);

@@ -3111,7 +3106,8 @@ mymain(void)
                  QEMU_CAPS_KVM, QEMU_CAPS_DEVICE_PC_DIMM,
                  QEMU_CAPS_NUMA, QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
                  QEMU_CAPS_OBJECT_MEMORY_RAM,
-                 QEMU_CAPS_OBJECT_MEMORY_FILE);
+                 QEMU_CAPS_OBJECT_MEMORY_FILE,
+                 QEMU_CAPS_LAST);
     DO_TEST_CAPS_LATEST("memory-hotplug-nvdimm");
     DO_TEST_CAPS_LATEST("memory-hotplug-nvdimm-access");
     DO_TEST_CAPS_VER("memory-hotplug-nvdimm-label", "5.2.0");
@@ -3248,7 +3244,8 @@ mymain(void)
                  ARG_QEMU_CAPS,
                  QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
                  QEMU_CAPS_NEC_USB_XHCI,
-                 QEMU_CAPS_DEVICE_QEMU_XHCI);
+                 QEMU_CAPS_DEVICE_QEMU_XHCI,
+                 QEMU_CAPS_LAST);

     DO_TEST_PARSE_ERROR("ppc64-tpmproxy-double",
                         QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
@@ -3285,8 +3282,7 @@ mymain(void)
      */
     DO_TEST_FULL("missing-machine",
                  ARG_FLAGS, FLAG_EXPECT_FAILURE,
-                 ARG_PARSEFLAGS, VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE,
-                 ARG_QEMU_CAPS, NONE);
+                 ARG_PARSEFLAGS, VIR_DOMAIN_DEF_PARSE_SKIP_VALIDATE);

     DO_TEST("name-escape",
             QEMU_CAPS_NAME_DEBUG_THREADS,
-- 
2.31.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux