diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2020-02-16 14:30:17 +0000 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2020-02-16 14:43:54 +0000 |
commit | a25077a431758b30aa60103945fe70811e8207ef (patch) | |
tree | c4d0fd554de8697c129b937c359f07a0f2a6af28 | |
parent | f640c4231df53aecd5880b4a172981e633de2718 (diff) | |
download | glibc-a25077a431758b30aa60103945fe70811e8207ef.tar.gz glibc-a25077a431758b30aa60103945fe70811e8207ef.tar.xz glibc-a25077a431758b30aa60103945fe70811e8207ef.zip |
pthread: Move robust mutex tests from nptl to sysdeps/pthread
tst-robust8.c prints some mutex internals for nptl debugging, this needed to be made conditioned by getting built with nptl.
-rw-r--r-- | nptl/Makefile | 4 | ||||
-rw-r--r-- | nptl/pthreadP.h | 2 | ||||
-rw-r--r-- | sysdeps/htl/pthreadP.h | 2 | ||||
-rw-r--r-- | sysdeps/mach/hurd/i386/Makefile | 16 | ||||
-rw-r--r-- | sysdeps/pthread/Makefile | 2 | ||||
-rw-r--r-- | sysdeps/pthread/tst-robust1.c (renamed from nptl/tst-robust1.c) | 0 | ||||
-rw-r--r-- | sysdeps/pthread/tst-robust10.c (renamed from nptl/tst-robust10.c) | 0 | ||||
-rw-r--r-- | sysdeps/pthread/tst-robust2.c (renamed from nptl/tst-robust2.c) | 0 | ||||
-rw-r--r-- | sysdeps/pthread/tst-robust3.c (renamed from nptl/tst-robust3.c) | 0 | ||||
-rw-r--r-- | sysdeps/pthread/tst-robust4.c (renamed from nptl/tst-robust4.c) | 0 | ||||
-rw-r--r-- | sysdeps/pthread/tst-robust5.c (renamed from nptl/tst-robust5.c) | 0 | ||||
-rw-r--r-- | sysdeps/pthread/tst-robust6.c (renamed from nptl/tst-robust6.c) | 0 | ||||
-rw-r--r-- | sysdeps/pthread/tst-robust7.c (renamed from nptl/tst-robust7.c) | 0 | ||||
-rw-r--r-- | sysdeps/pthread/tst-robust8.c (renamed from nptl/tst-robust8.c) | 3 | ||||
-rw-r--r-- | sysdeps/pthread/tst-robust9.c (renamed from nptl/tst-robust9.c) | 0 |
15 files changed, 21 insertions, 8 deletions
diff --git a/nptl/Makefile b/nptl/Makefile index fcdc72adfe..b25d34bd71 100644 --- a/nptl/Makefile +++ b/nptl/Makefile @@ -240,8 +240,6 @@ tests = tst-attr2 tst-attr3 tst-default-attr \ tst-mutexpi5 tst-mutexpi5a tst-mutexpi6 tst-mutexpi7 tst-mutexpi7a \ tst-mutexpi9 \ tst-cond11 tst-cond20 tst-cond21 tst-cond22 tst-cond26 tst-cond27 \ - tst-robust1 tst-robust2 tst-robust3 tst-robust4 tst-robust5 \ - tst-robust6 tst-robust7 tst-robust8 tst-robust9 \ tst-robustpi1 tst-robustpi2 tst-robustpi3 tst-robustpi4 tst-robustpi5 \ tst-robustpi6 tst-robustpi7 tst-robustpi8 tst-robustpi9 \ tst-rwlock2 tst-rwlock2a tst-rwlock2b tst-rwlock3 \ @@ -297,7 +295,7 @@ tests = tst-attr2 tst-attr3 tst-default-attr \ tst-initializers1 $(addprefix tst-initializers1-,\ c89 gnu89 c99 gnu99 c11 gnu11) \ tst-bad-schedattr \ - tst-thread_local1 tst-mutex-errorcheck tst-robust10 \ + tst-thread_local1 tst-mutex-errorcheck \ tst-robust-fork tst-create-detached tst-memstream \ tst-thread-exit-clobber tst-minstack-cancel tst-minstack-exit \ tst-minstack-throw \ diff --git a/nptl/pthreadP.h b/nptl/pthreadP.h index 7e0ab8ef42..df4b1a0cda 100644 --- a/nptl/pthreadP.h +++ b/nptl/pthreadP.h @@ -19,6 +19,8 @@ #ifndef _PTHREADP_H #define _PTHREADP_H 1 +#define __PTHREAD_NPTL + #include <pthread.h> #include <setjmp.h> #include <stdbool.h> diff --git a/sysdeps/htl/pthreadP.h b/sysdeps/htl/pthreadP.h index 2bb4baa249..1726ebb122 100644 --- a/sysdeps/htl/pthreadP.h +++ b/sysdeps/htl/pthreadP.h @@ -19,6 +19,8 @@ #ifndef _PTHREADP_H #define _PTHREADP_H 1 +#define __PTHREAD_HTL + #include <pthread.h> /* Attribute to indicate thread creation was issued from C11 thrd_create. */ diff --git a/sysdeps/mach/hurd/i386/Makefile b/sysdeps/mach/hurd/i386/Makefile index e6e665b5fe..068f7d0419 100644 --- a/sysdeps/mach/hurd/i386/Makefile +++ b/sysdeps/mach/hurd/i386/Makefile @@ -97,8 +97,8 @@ ifeq ($(subdir),mach) test-xfail-check-abi-libmachuser = yes endif -# For bug 25521 ifeq ($(subdir),htl) +# For bug 25521 test-xfail-tst-mutex4 = yes test-xfail-tst-cond4 = yes test-xfail-tst-cond6 = yes @@ -109,20 +109,26 @@ test-xfail-tst-rwlock4 = yes test-xfail-tst-rwlock12 = yes test-xfail-tst-sem3 = yes test-xfail-tst-barrier2 = yes -endif # For bug 25522 -ifeq ($(subdir),htl) test-xfail-tst-cond24 = yes test-xfail-tst-cond25 = yes -endif # For bug 25524 -ifeq ($(subdir),htl) test-xfail-tst-sem4 = yes test-xfail-tst-sem7 = yes test-xfail-tst-sem8 = yes test-xfail-tst-sem9 = yes + +# For bug 25563 +test-xfail-tst-robust1 = yes +test-xfail-tst-robust2 = yes +test-xfail-tst-robust3 = yes +test-xfail-tst-robust4 = yes +test-xfail-tst-robust5 = yes +test-xfail-tst-robust6 = yes +test-xfail-tst-robust7 = yes +test-xfail-tst-robust9 = yes endif ifeq ($(subdir),elf) diff --git a/sysdeps/pthread/Makefile b/sysdeps/pthread/Makefile index 396f2b18bf..b6491d6309 100644 --- a/sysdeps/pthread/Makefile +++ b/sysdeps/pthread/Makefile @@ -55,6 +55,8 @@ tests += tst-cnd-basic tst-mtx-trylock tst-cnd-broadcast \ tst-key1 tst-key2 tst-key3 tst-key4 \ tst-mutex1 tst-mutex2 tst-mutex3 tst-mutex4 tst-mutex6 tst-mutex10 \ tst-once1 tst-once2 tst-once3 tst-once4 \ + tst-robust1 tst-robust2 tst-robust3 tst-robust4 tst-robust5 \ + tst-robust6 tst-robust7 tst-robust8 tst-robust9 tst-robust10 \ tst-rwlock1 tst-rwlock4 tst-rwlock5 tst-rwlock13 tst-rwlock16 \ tst-rwlock-tryrdlock-stall tst-rwlock-trywrlock-stall \ tst-sem1 tst-sem2 tst-sem3 tst-sem4 tst-sem6 tst-sem7 \ diff --git a/nptl/tst-robust1.c b/sysdeps/pthread/tst-robust1.c index fc21b4f52c..fc21b4f52c 100644 --- a/nptl/tst-robust1.c +++ b/sysdeps/pthread/tst-robust1.c diff --git a/nptl/tst-robust10.c b/sysdeps/pthread/tst-robust10.c index db8b7e30f6..db8b7e30f6 100644 --- a/nptl/tst-robust10.c +++ b/sysdeps/pthread/tst-robust10.c diff --git a/nptl/tst-robust2.c b/sysdeps/pthread/tst-robust2.c index cf603feb4d..cf603feb4d 100644 --- a/nptl/tst-robust2.c +++ b/sysdeps/pthread/tst-robust2.c diff --git a/nptl/tst-robust3.c b/sysdeps/pthread/tst-robust3.c index e56f2762c7..e56f2762c7 100644 --- a/nptl/tst-robust3.c +++ b/sysdeps/pthread/tst-robust3.c diff --git a/nptl/tst-robust4.c b/sysdeps/pthread/tst-robust4.c index b9c42b85b9..b9c42b85b9 100644 --- a/nptl/tst-robust4.c +++ b/sysdeps/pthread/tst-robust4.c diff --git a/nptl/tst-robust5.c b/sysdeps/pthread/tst-robust5.c index b83d3d66cb..b83d3d66cb 100644 --- a/nptl/tst-robust5.c +++ b/sysdeps/pthread/tst-robust5.c diff --git a/nptl/tst-robust6.c b/sysdeps/pthread/tst-robust6.c index 6713396de1..6713396de1 100644 --- a/nptl/tst-robust6.c +++ b/sysdeps/pthread/tst-robust6.c diff --git a/nptl/tst-robust7.c b/sysdeps/pthread/tst-robust7.c index be8e7492df..be8e7492df 100644 --- a/nptl/tst-robust7.c +++ b/sysdeps/pthread/tst-robust7.c diff --git a/nptl/tst-robust8.c b/sysdeps/pthread/tst-robust8.c index f6969a4b84..27dd53d2c3 100644 --- a/nptl/tst-robust8.c +++ b/sysdeps/pthread/tst-robust8.c @@ -8,6 +8,7 @@ #include <sys/mman.h> #include <sys/wait.h> +#include <pthreadP.h> @@ -252,7 +253,9 @@ do_test (void) { printf ("mutex_destroy %d in round %d failed with %d\n", n + 1, round, e); +#ifdef __PTHREAD_NPTL printf("nusers = %d\n", (int) map[n].__data.__nusers); +#endif return 1; } } diff --git a/nptl/tst-robust9.c b/sysdeps/pthread/tst-robust9.c index befc14f2d8..befc14f2d8 100644 --- a/nptl/tst-robust9.c +++ b/sysdeps/pthread/tst-robust9.c |