From 7e625f7e85b4e88f10dbde35a0641742af581806 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Fri, 26 Aug 2016 19:27:16 +0200 Subject: nptl: Avoid expected SIGALRM in most tests [BZ #20432] Before this change, several tests did not detect early deadlocks because they used SIGALRM as the expected signal, and they ran for the full default TIMEOUT seconds. This commit adds a new delayed_exit function to the test skeleton, along with several error-checking wrappers to pthread functions. Additional error checking is introduced into several tests. --- nptl/tst-exit2.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'nptl/tst-exit2.c') diff --git a/nptl/tst-exit2.c b/nptl/tst-exit2.c index 3f5ff27..0b7a2ca 100644 --- a/nptl/tst-exit2.c +++ b/nptl/tst-exit2.c @@ -4,6 +4,10 @@ #include #include +static int do_test (void); + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" static void * tf (void *arg) @@ -28,13 +32,11 @@ do_test (void) return 1; } + delayed_exit (1); + /* Terminate only this thread. */ pthread_exit (NULL); /* NOTREACHED */ return 1; } - -#define EXPECTED_SIGNAL SIGALRM -#define TEST_FUNCTION do_test () -#include "../test-skeleton.c" -- cgit v1.1