]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemublocktest: Fix logical bug in TEST_JSON_FORMAT macro
authorPeter Krempa <pkrempa@redhat.com>
Wed, 18 Oct 2023 14:55:41 +0000 (16:55 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 27 Oct 2023 13:04:20 +0000 (15:04 +0200)
Condition handling failure of the first virTestRun was lacking the 'ret
= -1' line thus the subsequent line was taken as it's body rendering the
first invocation useless.

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

index a89dddf002a90f04ea4f8e6f5c194f8ace80d845..161fd84871ef1d4a5cdbf177d9f16e9237b88e9f 100644 (file)
@@ -1015,6 +1015,7 @@ mymain(void)
         xmljsonxmldata.legacy = true; \
         if (virTestRun(virTestCounterNext(), testBackingXMLjsonXML, \
                        &xmljsonxmldata) < 0) \
+            ret = -1; \
         xmljsonxmldata.legacy = false; \
         if (virTestRun(virTestCounterNext(), testBackingXMLjsonXML, \
                        &xmljsonxmldata) < 0) \