From 0b5b221300579189e0c9194fb6dd360adc5c3fa1 Mon Sep 17 00:00:00 2001 From: Pavel Hrdina Date: Wed, 6 Mar 2019 19:14:16 +0100 Subject: [PATCH] tests: invert the return logic in storagepoolcapstest This way if the first test "full" fails we will run the second test as well. Signed-off-by: Pavel Hrdina --- tests/storagepoolcapstest.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/storagepoolcapstest.c b/tests/storagepoolcapstest.c index c59069ff7c..f8b560c2f0 100644 --- a/tests/storagepoolcapstest.c +++ b/tests/storagepoolcapstest.c @@ -84,7 +84,7 @@ test_virStoragePoolCapsFormat(const void *opaque) static int mymain(void) { - int ret = -1; + int ret = 0; virCapsPtr fullCaps = NULL; virCapsPtr fsCaps = NULL; @@ -93,12 +93,14 @@ mymain(void) struct test_virStoragePoolCapsFormatData data = \ {.filename = Filename, .driverCaps = DriverCaps }; \ if (virTestRun(Filename, test_virStoragePoolCapsFormat, &data) < 0) \ - goto cleanup; \ + ret = -1; \ } while (0) if (!(fullCaps = virCapabilitiesNew(VIR_ARCH_NONE, false, false)) || - !(fsCaps = virCapabilitiesNew(VIR_ARCH_NONE, false, false))) + !(fsCaps = virCapabilitiesNew(VIR_ARCH_NONE, false, false))) { + ret = -1; goto cleanup; + } test_virCapabilitiesAddFullStoragePool(fullCaps); test_virCapabilitiesAddFSStoragePool(fsCaps); @@ -106,8 +108,6 @@ mymain(void) DO_TEST("full", fullCaps); DO_TEST("fs", fsCaps); - ret = 0; - cleanup: virObjectUnref(fullCaps); virObjectUnref(fsCaps); -- GitLab