mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-09 23:00:07 +00:00
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.
This commit is contained in:
parent
f640c4231d
commit
a25077a431
@ -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 \
|
||||
|
@ -19,6 +19,8 @@
|
||||
#ifndef _PTHREADP_H
|
||||
#define _PTHREADP_H 1
|
||||
|
||||
#define __PTHREAD_NPTL
|
||||
|
||||
#include <pthread.h>
|
||||
#include <setjmp.h>
|
||||
#include <stdbool.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. */
|
||||
|
@ -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)
|
||||
|
@ -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 \
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user