]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Disable lock elision for mutex pretty printer tests.
authorStefan Liebler <stli@linux.vnet.ibm.com>
Thu, 19 Apr 2018 10:38:37 +0000 (12:38 +0200)
committerStefan Liebler <stli@linux.vnet.ibm.com>
Thu, 19 Apr 2018 10:45:11 +0000 (12:45 +0200)
If e.g. the testcase nptl/test-mutex-printers is run
with enabled lock-elision, it fails on s390x with:
Error: Response does not match the expected pattern.
Command: print *mutex
Expected pattern: pthread_mutex_t
Response:  No symbol "mutex" in current context.
(gdb)

See https://www.sourceware.org/ml/libc-alpha/2018-03/msg00583.html
for more details.

In fact the mutex pretty printer tests rely on looking at the
internal details of the lock, thus we disable it by setting up
the GLIB_TUNABLES environment variable inside gdb.

ChangeLog:

* scripts/test_printers_common.py (init_test): Disable lock elision.

ChangeLog
scripts/test_printers_common.py

index df941db962990ef8536dedc31128575bbd7fd9c9..5cc4dc9f635c36c136fbe1751c7f0d96e8b78dcb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2018-04-19  Stefan Liebler  <stli@linux.vnet.ibm.com>
+
+       * scripts/test_printers_common.py (init_test): Disable lock elision.
+
 2018-04-19  Stefan Liebler  <stli@linux.vnet.ibm.com>
 
        * math/test-tgmath.c (count_double, count_float,
index 73ca52555622dc3a95558623a35e57e324150b42..cf4de5ae23aa47da1881282ad81c1752cd3e550c 100644 (file)
@@ -171,6 +171,9 @@ def init_test(test_bin, printer_files, printer_names):
     # Finally, load the test binary.
     test('file {0}'.format(test_bin))
 
+    # Disable lock elision.
+    test('set environment GLIBC_TUNABLES glibc.elision.enable=0')
+
 def go_to_main():
     """Executes a gdb 'start' command, which takes us to main."""