From 64ddb7fff21e8cfcd197ba31bbb08ee6d3964c54 Mon Sep 17 00:00:00 2001 From: iphydf Date: Sun, 26 Aug 2018 13:18:43 +0000 Subject: Call `abort` instead of `exit` on test failure. This raises a signal, so we can more easily catch it with gdb. --- auto_tests/check_compat.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'auto_tests') diff --git a/auto_tests/check_compat.h b/auto_tests/check_compat.h index 9e174287..2f83577d 100644 --- a/auto_tests/check_compat.h +++ b/auto_tests/check_compat.h @@ -44,7 +44,7 @@ static inline int srunner_ntests_failed(SRunner *r) #define ck_assert(ok) do { \ if (!(ok)) { \ fprintf(stderr, "%s:%d: failed `%s'\n", __FILE__, __LINE__, #ok); \ - exit(EXIT_FAILURE); \ + abort(); \ } \ } while (0) @@ -53,7 +53,7 @@ static inline int srunner_ntests_failed(SRunner *r) fprintf(stderr, "%s:%d: failed `%s': ", __FILE__, __LINE__, #ok); \ fprintf(stderr, __VA_ARGS__); \ fprintf(stderr, "\n"); \ - exit(EXIT_FAILURE); \ + abort(); \ } \ } while (0) @@ -61,7 +61,7 @@ static inline int srunner_ntests_failed(SRunner *r) fprintf(stderr, "%s:%d: ", __FILE__, __LINE__); \ fprintf(stderr, __VA_ARGS__); \ fprintf(stderr, "\n"); \ - exit(EXIT_FAILURE); \ + abort(); \ } while (0) #endif // CHECK_COMPAT_H -- cgit v1.2.3