diff options
author | Andi Kleen <ak@linux.intel.com> | 2013-06-28 05:19:37 -0700 |
---|---|---|
committer | Andi Kleen <ak@linux.intel.com> | 2013-07-02 08:46:54 -0700 |
commit | 68cc29355f3334c7ad18f648ff9a6383a0916d23 (patch) | |
tree | 357381e30be0b3dedfafe7a220714e20aad6ad73 /nptl/tst-mutex5.c | |
parent | b023e4ca99f5e81f90d87d23cd267ef2abd2388c (diff) | |
download | glibc-68cc29355f3334c7ad18f648ff9a6383a0916d23.zip glibc-68cc29355f3334c7ad18f648ff9a6383a0916d23.tar.gz glibc-68cc29355f3334c7ad18f648ff9a6383a0916d23.tar.bz2 |
Add minimal test suite changes for elision enabled kernels
tst-mutex5 and 8 test some behaviour not required by POSIX,
that elision changes. This changes these tests to not check
this when elision is enabled at configure time.
Diffstat (limited to 'nptl/tst-mutex5.c')
-rw-r--r-- | nptl/tst-mutex5.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/nptl/tst-mutex5.c b/nptl/tst-mutex5.c index f19cd8c..c223f67 100644 --- a/nptl/tst-mutex5.c +++ b/nptl/tst-mutex5.c @@ -22,6 +22,7 @@ #include <time.h> #include <unistd.h> #include <sys/time.h> +#include <config.h> #ifndef TYPE @@ -85,6 +86,8 @@ do_test (void) return 1; } + /* Elided locks do not time out. */ +#ifdef ENABLE_LOCK_ELISION if (pthread_mutex_trylock (&m) == 0) { puts ("mutex_trylock succeeded"); @@ -180,6 +183,7 @@ do_test (void) puts ("3rd timedlock didn't return right away"); return 1; } +#endif if (pthread_mutex_unlock (&m) != 0) { |