Add runtime check if mutex will be elided in tst-mutex8 testcases.
commit8724507385a591a71297c2da0e12001eae6bd88d
authorStefan Liebler <stli@linux.vnet.ibm.com>
Fri, 16 Feb 2018 08:57:30 +0000 (16 09:57 +0100)
committerStefan Liebler <stli@linux.vnet.ibm.com>
Fri, 16 Feb 2018 08:57:30 +0000 (16 09:57 +0100)
treed272a8418d373e7b99a58296ae37c0b672567357
parentdb9881ecd7e7278af3e6bb252a0b3015e275d7bd
Add runtime check if mutex will be elided in tst-mutex8 testcases.

An elided mutex don't fail destroy. Elision was disabled for the
test nptl/tst-mutex8 in nptl/Makefile. Thus we can run tests which
destroy a locked mutex.

As elision is only disabled for tst-mutex8, the variants
tst-mutex8-static, tst-mutexpi8 and tst-mutexpi8-static are still
failing if lock elision is enabled.

This patch adds a runtime check, if the checked type of mutex will
be elided. This check is using TUNABLE_GET_FULL to determine if
elision is enabled via the tunables framework.
The pthread_mutex_destroy tests are only run if we dont't assume an
elided mutex.

This way, we can run the whole glibc testsuite with or without enabled
lock elision.

ChangeLog:

* nptl/Makefile (tst-mutex8-ENV): Delete.
* nptl/tst-mutex8.c (check_type):
Add runtime check if mutex will be elided.
ChangeLog
nptl/Makefile
nptl/tst-mutex8.c