Skip to content

Commit

Permalink
test-container: Avoid copying unintended system libraries
Browse files Browse the repository at this point in the history
Some DSOs are distributed in hardware capability directories, e.g.
/usr/lib64/power7/libc.so.6
Whenever the processor is able to use one of these hardware-enabled
DSOs, testroot.pristine ends up with copies of glibc-provided libraries
from the system because it can't overwrite or remove them.

This patch avoids the unintended copies by executing ld.so with the same
arguments passed to each glibc test.

	* Makefile (testroot.pristine/install.stamp): Execute ld.so with
	the same arguments used in all tests.
  • Loading branch information
tuliom committed Jul 23, 2019
1 parent dcf36bc commit 95da14d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2019-07-23 Tulio Magno Quites Machado Filho <[email protected]>

* Makefile (testroot.pristine/install.stamp): Execute ld.so with
the same arguments used in all tests.

2019-07-22 Szabolcs Nagy <[email protected]>

* NEWS: Mention the AArch64 IFUNC resolver ABI change.
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ $(objpfx)testroot.pristine/install.stamp :
ifeq ($(run-built-tests),yes)
# Copy these DSOs first so we can overwrite them with our own.
for dso in `$(test-wrapper-env) LD_TRACE_LOADED_OBJECTS=1 \
$(objpfx)elf/$(rtld-installed-name) \
$(rtld-prefix) \
$(objpfx)testroot.pristine/bin/sh \
| grep / | sed 's/^[^/]*//' | sed 's/ .*//'` ;\
do \
Expand All @@ -392,7 +392,7 @@ ifeq ($(run-built-tests),yes)
$(test-wrapper) cp $$dso $(objpfx)testroot.pristine$$dso ;\
done
for dso in `$(test-wrapper-env) LD_TRACE_LOADED_OBJECTS=1 \
$(objpfx)elf/$(rtld-installed-name) \
$(rtld-prefix) \
$(objpfx)support/$(LINKS_DSO_PROGRAM) \
| grep / | sed 's/^[^/]*//' | sed 's/ .*//'` ;\
do \
Expand Down

0 comments on commit 95da14d

Please sign in to comment.