mirror of git://sourceware.org/git/glibc.git
nptl: Convert tst-sem11 and tst-sem12 tests to use the test driver
Fix an issue with commit 2af4e3e566 ("Test of semaphores.") by making
the tst-sem11 and tst-sem12 tests use the test driver, preventing them
from ever causing testing to hang forever and never complete, such as
currently happening with the 'mips-linux-gnu' (o32 ABI) target. Adjust
the name of the PREPARE macro, which clashes with the interpretation of
its presence by the test driver, by using a TF_ prefix in reference to
the name of the 'tf' function.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
This commit is contained in:
parent
9d8995833e
commit
4b2a1b602f
|
|
@ -29,15 +29,15 @@
|
||||||
static void *
|
static void *
|
||||||
tf (void *arg)
|
tf (void *arg)
|
||||||
{
|
{
|
||||||
#ifdef PREPARE
|
#ifdef TF_PREPARE
|
||||||
PREPARE
|
TF_PREPARE
|
||||||
#endif
|
#endif
|
||||||
SEM_WAIT (arg);
|
SEM_WAIT (arg);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
main (void)
|
do_test (void)
|
||||||
{
|
{
|
||||||
int tries = 5;
|
int tries = 5;
|
||||||
pthread_t th;
|
pthread_t th;
|
||||||
|
|
@ -101,3 +101,5 @@ main (void)
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#include <support/test-driver.c>
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
|
||||||
|
|
||||||
#define PREPARE \
|
#define TF_PREPARE \
|
||||||
struct timespec ts; \
|
struct timespec ts; \
|
||||||
struct timeval tv; \
|
struct timeval tv; \
|
||||||
gettimeofday (&tv, NULL); \
|
gettimeofday (&tv, NULL); \
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue