]> xenbits.xensource.com Git - libvirt.git/commitdiff
virjsontest: store name in testInfo
authorJán Tomko <jtomko@redhat.com>
Thu, 31 May 2018 17:20:13 +0000 (19:20 +0200)
committerJán Tomko <jtomko@redhat.com>
Tue, 4 Sep 2018 08:19:23 +0000 (10:19 +0200)
Give the testing function access to the test name instead of only
passing it to virTestRun.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
tests/virjsontest.c

index d42413d11d46c8943be8aa8adb97e53f822c96a5..779bf441bdf8162daead19533b1d23c14ae95dbe 100644 (file)
@@ -12,6 +12,7 @@
 #define VIR_FROM_THIS VIR_FROM_NONE
 
 struct testInfo {
+    const char *name;
     const char *doc;
     const char *expect;
     bool pass;
@@ -481,7 +482,7 @@ mymain(void)
 
 #define DO_TEST_FULL(name, cmd, doc, expect, pass) \
     do { \
-        struct testInfo info = { doc, expect, pass }; \
+        struct testInfo info = { name, doc, expect, pass }; \
         if (virTestRun(name, testJSON ## cmd, &info) < 0) \
             ret = -1; \
     } while (0)