a2cf7d
commit 279c68ce1336d84d82ce491a4b77086e574ba380
a2cf7d
Author: DJ Delorie <dj@redhat.com>
a2cf7d
Date:   Mon Feb 3 14:57:23 2020 -0500
a2cf7d
a2cf7d
    Run nptl/tst-pthread-getattr in a container
a2cf7d
    
a2cf7d
    See https://bugzilla.redhat.com/show_bug.cgi?id=1653942
a2cf7d
    
a2cf7d
    This test depends on the kernel's assignment of memory regions, but
a2cf7d
    running under ld.so explicitly changes those assignments, sometimes
a2cf7d
    sufficiently to cause the test to fail (esp with address space
a2cf7d
    randomization).
a2cf7d
    
a2cf7d
    The easiest way to "fix" the test, is to run it the way the user would
a2cf7d
    - without ld.so.  Running it in a container does that.
a2cf7d
    
a2cf7d
    Reviewed-by: Carlos O'Donell <carlos@redhat.com>
a2cf7d
a2cf7d
diff --git a/nptl/Makefile b/nptl/Makefile
a2cf7d
index b1003cf56b31ddfa..071c53866d14d2fe 100644
a2cf7d
--- a/nptl/Makefile
a2cf7d
+++ b/nptl/Makefile
a2cf7d
@@ -293,7 +293,7 @@ tests = tst-attr1 tst-attr2 tst-attr3 tst-default-attr \
a2cf7d
 	tst-exec1 tst-exec2 tst-exec3 tst-exec4 tst-exec5 \
a2cf7d
 	tst-exit1 tst-exit2 tst-exit3 \
a2cf7d
 	tst-stdio1 tst-stdio2 \
a2cf7d
-	tst-stack1 tst-stack2 tst-stack3 tst-stack4 tst-pthread-getattr \
a2cf7d
+	tst-stack1 tst-stack2 tst-stack3 tst-stack4 \
a2cf7d
 	tst-pthread-attr-affinity tst-pthread-mutexattr \
a2cf7d
 	tst-unload \
a2cf7d
 	tst-dlsym1 \
a2cf7d
@@ -322,6 +322,8 @@ tests = tst-attr1 tst-attr2 tst-attr3 tst-default-attr \
a2cf7d
 	tst-rwlock-pwn \
a2cf7d
 	tst-rwlock-tryrdlock-stall tst-rwlock-trywrlock-stall
a2cf7d
 
a2cf7d
+tests-container =  tst-pthread-getattr
a2cf7d
+
a2cf7d
 tests-internal := tst-rwlock19 tst-rwlock20 \
a2cf7d
 		  tst-sem11 tst-sem12 tst-sem13 \
a2cf7d
 		  tst-barrier5 tst-signal7 tst-mutex8 tst-mutex8-static \
a2cf7d
@@ -633,7 +635,7 @@ ifeq ($(build-shared),yes)
a2cf7d
 $(addprefix $(objpfx), \
a2cf7d
   $(filter-out $(tests-static) $(xtests-static) $(tests-reverse) \
a2cf7d
     $(tests-nolibpthread), \
a2cf7d
-    $(tests) $(tests-internal) $(xtests) $(test-srcs))): \
a2cf7d
+    $(tests) $(tests-internal) $(xtests) $(test-srcs) $(tests-container))): \
a2cf7d
 	$(objpfx)libpthread.so
a2cf7d
 $(objpfx)tst-unload: $(libdl)
a2cf7d
 # $(objpfx)../libc.so is used instead of $(common-objpfx)libc.so,