1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00

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.
This commit is contained in:
Florian Weimer
2016-08-26 19:27:16 +02:00
parent 0ac8ee53e8
commit 7e625f7e85
15 changed files with 293 additions and 101 deletions

View File

@ -21,6 +21,10 @@
#include <stdio.h>
#include <unistd.h>
static int do_test (void);
#define TEST_FUNCTION do_test ()
#include "../test-skeleton.c"
static void *tf (void *a)
{
@ -43,14 +47,10 @@ do_test (void)
_exit (1);
}
pthread_join (th, NULL);
delayed_exit (1);
xpthread_join (th);
puts ("join returned");
return 0;
return 1;
}
#define EXPECTED_SIGNAL SIGALRM
#define TEST_FUNCTION do_test ()
#include "../test-skeleton.c"