summaryrefslogtreecommitdiff
path: root/tests/storagepoolcapstest.c
diff options
context:
space:
mode:
authorMichal Privoznik <mprivozn@redhat.com>2021-05-16 18:14:53 +0200
committerMichal Privoznik <mprivozn@redhat.com>2021-05-17 09:25:32 +0200
commit5d99b157bcae14e7429f4f21f0c841e5b839effb (patch)
tree9daeaf195aa99e999906e58e34d9a32a4c26b0c4 /tests/storagepoolcapstest.c
parent351742e859de2b17b5412ead703f0d200849a96b (diff)
downloadlibvirt-5d99b157bcae14e7429f4f21f0c841e5b839effb.tar.gz
tests: Return EXIT_FAILURE/EXIT_SUCCESS instead of -1/0
When using VIR_TEST_MAIN() or VIR_TEST_MAIN_PRELOAD() macros, the retval of mymain() will become retval of main(). Hence, mymain() should use EXIT_FAILURE and EXIT_SUCCESS return values for greater portability. Another reason is that otherwise our summary printing of failed tests doesn't work (see following commit for more info). Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Diffstat (limited to 'tests/storagepoolcapstest.c')
-rw-r--r--tests/storagepoolcapstest.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/storagepoolcapstest.c b/tests/storagepoolcapstest.c
index f937670aa7..526c9ad045 100644
--- a/tests/storagepoolcapstest.c
+++ b/tests/storagepoolcapstest.c
@@ -101,7 +101,7 @@ mymain(void)
DO_TEST("full", fullCaps);
DO_TEST("fs", fsCaps);
- return ret;
+ return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
}
VIR_TEST_MAIN(mymain)