mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
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>
This commit is contained in:
@@ -113,7 +113,7 @@ mymain(void)
|
||||
DO_TEST_FULL("resctrl-skx-twocaches", VIR_ARCH_X86_64, true, true);
|
||||
DO_TEST_FULL("resctrl-fake-feature", VIR_ARCH_X86_64, true, true);
|
||||
|
||||
return ret;
|
||||
return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
||||
VIR_TEST_MAIN_PRELOAD(mymain, VIR_TEST_MOCK("virnuma"))
|
||||
|
||||
Reference in New Issue
Block a user