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