[PATCH 04/21] tests: qemuxml2argv: push ARG_QEMU_CAPS to callers

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

 



This is necessary before we can start adding more optional parameter
implementations to DO_TEST_FULL

Signed-off-by: Cole Robinson <crobinso@xxxxxxxxxx>
---
 tests/qemuxml2argvtest.c | 38 +++++++++++++++++++++++++-------------
 1 file changed, 25 insertions(+), 13 deletions(-)

diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 0dba908c70..393d2399fa 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -842,8 +842,7 @@ mymain(void)
         }; \
         if (testInitQEMUCaps(&info, gic) < 0) \
             return EXIT_FAILURE; \
-        if (testInfoSetArgs(&info, ARG_QEMU_CAPS, \
-                            __VA_ARGS__, QEMU_CAPS_LAST, ARG_END) < 0) \
+        if (testInfoSetArgs(&info, __VA_ARGS__, QEMU_CAPS_LAST, ARG_END) < 0) \
             return EXIT_FAILURE; \
         if (virTestRun("QEMU XML-2-ARGV " name, \
                        testCompareXMLToArgv, &info) < 0) \
@@ -852,24 +851,29 @@ mymain(void)
     } while (0)
 
 # define DO_TEST(name, ...) \
-    DO_TEST_FULL(name, NULL, -1, 0, 0, GIC_NONE, __VA_ARGS__)
+    DO_TEST_FULL(name, NULL, -1, 0, 0, GIC_NONE, \
+                 ARG_QEMU_CAPS, __VA_ARGS__)
 
 # define DO_TEST_GIC(name, gic, ...) \
-    DO_TEST_FULL(name, NULL, -1, 0, 0, gic, __VA_ARGS__)
+    DO_TEST_FULL(name, NULL, -1, 0, 0, gic, \
+                 ARG_QEMU_CAPS, __VA_ARGS__)
 
 # define DO_TEST_FAILURE(name, ...) \
     DO_TEST_FULL(name, NULL, -1, FLAG_EXPECT_FAILURE, \
-                 0, GIC_NONE, __VA_ARGS__)
+                 0, GIC_NONE, \
+                 ARG_QEMU_CAPS, __VA_ARGS__)
 
 # define DO_TEST_PARSE_ERROR(name, ...) \
     DO_TEST_FULL(name, NULL, -1, \
                  FLAG_EXPECT_PARSE_ERROR | FLAG_EXPECT_FAILURE, \
-                 0, GIC_NONE, __VA_ARGS__)
+                 0, GIC_NONE, \
+                 ARG_QEMU_CAPS, __VA_ARGS__)
 
 # define DO_TEST_PARSE_FLAGS_ERROR(name, parseFlags, ...) \
     DO_TEST_FULL(name, NULL, -1, \
                  FLAG_EXPECT_PARSE_ERROR | FLAG_EXPECT_FAILURE, \
-                 parseFlags, GIC_NONE, __VA_ARGS__)
+                 parseFlags, GIC_NONE, \
+                 ARG_QEMU_CAPS, __VA_ARGS__)
 
 # define NONE QEMU_CAPS_LAST
 
@@ -1707,12 +1711,17 @@ mymain(void)
             QEMU_CAPS_CCW_CSSID_UNRESTRICTED,
             QEMU_CAPS_DEVICE_VFIO_CCW);
 
-    DO_TEST_FULL("restore-v2", "exec:cat", 7, 0, 0, GIC_NONE, NONE);
-    DO_TEST_FULL("restore-v2-fd", "stdio", 7, 0, 0, GIC_NONE, NONE);
-    DO_TEST_FULL("restore-v2-fd", "fd:7", 7, 0, 0, GIC_NONE, NONE);
-    DO_TEST_FULL("migrate", "tcp:10.0.0.1:5000", -1, 0, 0, GIC_NONE, NONE);
+    DO_TEST_FULL("restore-v2", "exec:cat", 7, 0, 0, GIC_NONE,
+                 ARG_QEMU_CAPS, NONE);
+    DO_TEST_FULL("restore-v2-fd", "stdio", 7, 0, 0, GIC_NONE,
+                 ARG_QEMU_CAPS, NONE);
+    DO_TEST_FULL("restore-v2-fd", "fd:7", 7, 0, 0, GIC_NONE,
+                 ARG_QEMU_CAPS, NONE);
+    DO_TEST_FULL("migrate", "tcp:10.0.0.1:5000", -1, 0, 0, GIC_NONE,
+                 ARG_QEMU_CAPS, NONE);
 
     DO_TEST_FULL("migrate-numa-unaligned", "stdio", 7, 0, 0, GIC_NONE,
+                 ARG_QEMU_CAPS,
                  QEMU_CAPS_NUMA,
                  QEMU_CAPS_OBJECT_MEMORY_RAM);
 
@@ -1756,10 +1765,12 @@ mymain(void)
     DO_TEST("cpu-host-model-vendor", NONE);
     DO_TEST_FULL("cpu-host-model-fallback", NULL, -1,
                  FLAG_SKIP_LEGACY_CPUS, 0,
-                 GIC_NONE, NONE);
+                 GIC_NONE,
+                 ARG_QEMU_CAPS, NONE);
     DO_TEST_FULL("cpu-host-model-nofallback", NULL, -1,
                  FLAG_SKIP_LEGACY_CPUS | FLAG_EXPECT_FAILURE,
-                 0, GIC_NONE, NONE);
+                 0, GIC_NONE,
+                 ARG_QEMU_CAPS, NONE);
     DO_TEST("cpu-host-passthrough", QEMU_CAPS_KVM);
     DO_TEST_FAILURE("cpu-qemu-host-passthrough", QEMU_CAPS_KVM);
 
@@ -2849,6 +2860,7 @@ mymain(void)
             QEMU_CAPS_PIIX3_USB_UHCI);
     DO_TEST_FULL("ppc64-usb-controller-qemu-xhci", NULL, -1, 0,
                  VIR_DOMAIN_DEF_PARSE_ABI_UPDATE, GIC_NONE,
+                 ARG_QEMU_CAPS,
                  QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
                  QEMU_CAPS_NEC_USB_XHCI,
                  QEMU_CAPS_DEVICE_QEMU_XHCI);
-- 
2.20.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[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