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