diff options
author | Michal Privoznik <mprivozn@redhat.com> | 2021-05-16 18:14:53 +0200 |
---|---|---|
committer | Michal Privoznik <mprivozn@redhat.com> | 2021-05-17 09:25:32 +0200 |
commit | 5d99b157bcae14e7429f4f21f0c841e5b839effb (patch) | |
tree | 9daeaf195aa99e999906e58e34d9a32a4c26b0c4 /tests/virbitmaptest.c | |
parent | 351742e859de2b17b5412ead703f0d200849a96b (diff) | |
download | libvirt-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/virbitmaptest.c')
-rw-r--r-- | tests/virbitmaptest.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/virbitmaptest.c b/tests/virbitmaptest.c index a376a613db..02241c4c20 100644 --- a/tests/virbitmaptest.c +++ b/tests/virbitmaptest.c @@ -784,7 +784,7 @@ mymain(void) if (virTestRun("test16", test16, NULL) < 0) ret = -1; - return ret; + return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE; } VIR_TEST_MAIN(mymain) |