public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] test-container: Avoid copying unintended system libraries
@ 2019-07-22 19:52 Tulio Magno Quites Machado Filho
  2019-07-22 20:19 ` Florian Weimer
  0 siblings, 1 reply; 4+ messages in thread
From: Tulio Magno Quites Machado Filho @ 2019-07-22 19:52 UTC (permalink / raw)
  To: libc-alpha

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.

2019-07-22  Tulio Magno Quites Machado Filho  <tuliom@linux.ibm.com>

	* Makefile (testroot.pristine/install.stamp): Execute ld.so with
	the same arguments used in all tests.
---
 Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index dc5de7aa6b..a4ed747cef 100644
--- a/Makefile
+++ b/Makefile
@@ -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 \
@@ -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 \
-- 
2.14.5

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] test-container: Avoid copying unintended system libraries
  2019-07-22 19:52 [PATCH] test-container: Avoid copying unintended system libraries Tulio Magno Quites Machado Filho
@ 2019-07-22 20:19 ` Florian Weimer
  2019-07-23 16:26   ` Tulio Magno Quites Machado Filho
  0 siblings, 1 reply; 4+ messages in thread
From: Florian Weimer @ 2019-07-22 20:19 UTC (permalink / raw)
  To: Tulio Magno Quites Machado Filho; +Cc: libc-alpha

* Tulio Magno Quites Machado Filho:

> 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.

The patch looks okay to me because $(rtld-prefix) is not affected by
$(build-hardcoded-path-in-tests).  But in that case, the probing
command is definitely not run like a test would run.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] test-container: Avoid copying unintended system libraries
  2019-07-22 20:19 ` Florian Weimer
@ 2019-07-23 16:26   ` Tulio Magno Quites Machado Filho
  2019-07-23 18:51     ` Florian Weimer
  0 siblings, 1 reply; 4+ messages in thread
From: Tulio Magno Quites Machado Filho @ 2019-07-23 16:26 UTC (permalink / raw)
  To: Florian Weimer, libc-alpha

Florian Weimer <fw@deneb.enyo.de> writes:

> * Tulio Magno Quites Machado Filho:
>
>> 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.
>
> The patch looks okay to me because $(rtld-prefix) is not affected by
> $(build-hardcoded-path-in-tests).  But in that case, the probing
> command is definitely not run like a test would run.

Interesting...  Current master has a couple of failures when I configured
with --enable-hardcoded-path-in-tests.
This patch doesn't break nor improve the situation there.

So, I'm pushing it.

Thanks!!

-- 
Tulio Magno

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] test-container: Avoid copying unintended system libraries
  2019-07-23 16:26   ` Tulio Magno Quites Machado Filho
@ 2019-07-23 18:51     ` Florian Weimer
  0 siblings, 0 replies; 4+ messages in thread
From: Florian Weimer @ 2019-07-23 18:51 UTC (permalink / raw)
  To: Tulio Magno Quites Machado Filho; +Cc: libc-alpha

* Tulio Magno Quites Machado Filho:

> Florian Weimer <fw@deneb.enyo.de> writes:
>
>> * Tulio Magno Quites Machado Filho:
>>
>>> 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.
>>
>> The patch looks okay to me because $(rtld-prefix) is not affected by
>> $(build-hardcoded-path-in-tests).  But in that case, the probing
>> command is definitely not run like a test would run.
>
> Interesting...  Current master has a couple of failures when I configured
> with --enable-hardcoded-path-in-tests.
> This patch doesn't break nor improve the situation there.
>
> So, I'm pushing it.

Sorry, I meant this as a suggestion to improve the commit message. 8->
But I guess it doesn't matter know.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-07-23 18:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-22 19:52 [PATCH] test-container: Avoid copying unintended system libraries Tulio Magno Quites Machado Filho
2019-07-22 20:19 ` Florian Weimer
2019-07-23 16:26   ` Tulio Magno Quites Machado Filho
2019-07-23 18:51     ` Florian Weimer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).