]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemuxml2(argv|xml)test: Don't exit early when testQemuInfoSetArgs fails
authorPeter Krempa <pkrempa@redhat.com>
Fri, 26 Mar 2021 17:21:34 +0000 (18:21 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 12 Apr 2021 14:09:41 +0000 (16:09 +0200)
Set the return code to failure and continue testing.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
tests/qemuxml2argvtest.c
tests/qemuxml2xmltest.c

index 07cd52269963482138b264dc19a772838be01054..15a14be1bb4e7809841f6ee571399f0a34b35f67 100644 (file)
@@ -904,7 +904,7 @@ mymain(void)
         info.qapiSchemaCache = qapiSchemaCache; \
         if (testQemuInfoSetArgs(&info, capscache, capslatest, \
                                 __VA_ARGS__, ARG_END) < 0) \
-            return EXIT_FAILURE; \
+            ret = -1; \
         testInfoSetPaths(&info, _suffix); \
         if (virTestRun("QEMU XML-2-ARGV " _name _suffix, \
                        testCompareXMLToArgv, &info) < 0) \
index 03cb40512373fe9b98387c1c305489df8c37dd38..2b8fca831629ca24bfa9a48fc311a5bd3b20fa06 100644 (file)
@@ -134,7 +134,7 @@ mymain(void)
                                 ARG_END) < 0 || \
             qemuTestCapsCacheInsert(driver.qemuCapsCache, info.qemuCaps) < 0) { \
             VIR_TEST_DEBUG("Failed to generate test data for '%s'", _name); \
-            return -1; \
+            ret = -1; \
         } \
  \
         if (when & WHEN_INACTIVE) { \