d8307d
commit 95da14dac04b494149290d85bc5306226e30839e
d8307d
Author: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
d8307d
Date:   Mon Jul 22 16:30:45 2019 -0300
d8307d
d8307d
    test-container: Avoid copying unintended system libraries
d8307d
    
d8307d
    Some DSOs are distributed in hardware capability directories, e.g.
d8307d
    /usr/lib64/power7/libc.so.6
d8307d
    Whenever the processor is able to use one of these hardware-enabled
d8307d
    DSOs, testroot.pristine ends up with copies of glibc-provided libraries
d8307d
    from the system because it can't overwrite or remove them.
d8307d
    
d8307d
    This patch avoids the unintended copies by executing ld.so with the same
d8307d
    arguments passed to each glibc test.
d8307d
    
d8307d
    	* Makefile (testroot.pristine/install.stamp): Execute ld.so with
d8307d
    	the same arguments used in all tests.
d8307d
d8307d
diff --git a/Makefile b/Makefile
d8307d
index dc5de7a..a4ed747 100644
d8307d
--- a/Makefile
d8307d
+++ b/Makefile
d8307d
@@ -383,7 +383,7 @@ $(objpfx)testroot.pristine/install.stamp :
d8307d
 ifeq ($(run-built-tests),yes)
d8307d
 	# Copy these DSOs first so we can overwrite them with our own.
d8307d
 	for dso in `$(test-wrapper-env) LD_TRACE_LOADED_OBJECTS=1  \
d8307d
-		$(objpfx)elf/$(rtld-installed-name) \
d8307d
+		$(rtld-prefix) \
d8307d
 		$(objpfx)testroot.pristine/bin/sh \
d8307d
 	        | grep / | sed 's/^[^/]*//' | sed 's/ .*//'` ;\
d8307d
 	  do \
d8307d
@@ -392,7 +392,7 @@ ifeq ($(run-built-tests),yes)
d8307d
 	    $(test-wrapper) cp $$dso $(objpfx)testroot.pristine$$dso ;\
d8307d
 	  done
d8307d
 	for dso in `$(test-wrapper-env) LD_TRACE_LOADED_OBJECTS=1  \
d8307d
-		$(objpfx)elf/$(rtld-installed-name) \
d8307d
+		$(rtld-prefix) \
d8307d
 		$(objpfx)support/$(LINKS_DSO_PROGRAM) \
d8307d
 	        | grep / | sed 's/^[^/]*//' | sed 's/ .*//'` ;\
d8307d
 	  do \