diff --git a/tests/tests.h b/tests/tests.h index 7c1b6c0..578d8c1 100644 --- a/tests/tests.h +++ b/tests/tests.h @@ -25,9 +25,6 @@ void test_init(int argc, char *argv[]); #define streq(s1, s2) (strcmp((s1),(s2)) == 0) -/* Each test case must define this function */ -void cleanup(void); - #define verbose_printf(...) \ if (verbose_test) { \ printf(__VA_ARGS__); \ @@ -39,21 +36,18 @@ void cleanup(void); #define PASS() \ do { \ - cleanup(); \ printf("PASS\n"); \ exit(RC_PASS); \ } while (0) #define PASS_INCONCLUSIVE() \ do { \ - cleanup(); \ printf("PASS (inconclusive)\n"); \ exit(RC_PASS); \ } while (0) #define IRRELEVANT() \ do { \ - cleanup(); \ printf("PASS (irrelevant)\n"); \ exit(RC_PASS); \ } while (0) @@ -61,21 +55,18 @@ void cleanup(void); /* Look out, gcc extension below... */ #define FAIL(fmt, ...) \ do { \ - cleanup(); \ printf("FAIL\t" fmt "\n", ##__VA_ARGS__); \ exit(RC_FAIL); \ } while (0) #define CONFIG(fmt, ...) \ do { \ - cleanup(); \ printf("Bad configuration: " fmt "\n", ##__VA_ARGS__); \ exit(RC_CONFIG); \ } while (0) #define TEST_BUG(fmt, ...) \ do { \ - cleanup(); \ printf("BUG in testsuite: " fmt "\n", ##__VA_ARGS__); \ exit(RC_BUG); \ } while (0) diff --git a/tests/testutils.c b/tests/testutils.c index 54da2e4..5ab4324 100644 --- a/tests/testutils.c +++ b/tests/testutils.c @@ -42,13 +42,8 @@ static inline void VALGRIND_MAKE_MEM_DEFINED(void *p, size_t len) int verbose_test = 1; char *test_name; -void __attribute__((weak)) cleanup(void) -{ -} - static void sigint_handler(int signum, siginfo_t *si, void *uc) { - cleanup(); fprintf(stderr, "%s: %s (pid=%d)\n", test_name, strsignal(signum), getpid()); exit(RC_BUG);