From patchwork Thu Dec 19 15:08:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 36966 Received: (qmail 57753 invoked by alias); 19 Dec 2019 15:08:36 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 57744 invoked by uid 89); 19 Dec 2019 15:08:36 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-18.6 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: us-smtp-delivery-1.mimecast.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576768114; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=183nq3IWe4bpy7HHYaptBhpDx6ZxOxC+22az1wk+mxE=; b=O8vT5kjmkJA0EABNtR59PyBSmsUjINJiTlp+BHnOi57oMIdV3MszZglGgpSqxcatK9jeYR f+l/bTq1t08W6gmiV/B2aTQKEfs1dT8hVSBKnxY6celIhT6cPT4TXwYqlniG+wkTjo5xTQ L4MuR7ingnVE700HVaCvGmhALQrFRzQ= From: Florian Weimer To: Andreas Schwab Cc: libc-alpha@sourceware.org Subject: Re: [PATCH] Fix test isolation for elf/tst-ifunc-fault-lazy, elf/tst-ifunc-fault-bindnow References: <87pngkwfh9.fsf@oldenburg2.str.redhat.com> Date: Thu, 19 Dec 2019 16:08:29 +0100 In-Reply-To: (Andreas Schwab's message of "Thu, 19 Dec 2019 15:47:28 +0100") Message-ID: <87y2v8jqtu.fsf@oldenburg2.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 * Andreas Schwab: > On Dez 19 2019, Florian Weimer wrote: > >> diff --git a/elf/Makefile b/elf/Makefile >> index 72a5aa88b1..2c52e8ae19 100644 >> --- a/elf/Makefile >> +++ b/elf/Makefile >> @@ -1374,11 +1374,13 @@ $(objpfx)ifuncmain5picstatic: $(addprefix $(objpfx),ifuncdep5pic.o) >> >> LDFLAGS-tst-ifunc-fault-lazy = -Wl,-z,lazy >> LDFLAGS-tst-ifunc-fault-bindnow = -Wl,-z,now >> +tst-ifunc-fault-script-ldso = \ >> + $(objpfx)ld.so --library-path $(common-objpfx):$(objpfx) > > How about using rtld-prefix? Thanks, it seems to work, even --enable-hardcoded-path-in-tets. Florian 8<------------------------------------------------------------------8< Previously, ld.so was invoked only with the elf subdirectory on the library search path. Since the soname link for libc.so only exists in the top-level build directory, this leaked the system libc into the test. --- elf/Makefile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/elf/Makefile b/elf/Makefile index 72a5aa88b1..f861126b2f 100644 --- a/elf/Makefile +++ b/elf/Makefile @@ -1375,10 +1375,9 @@ $(objpfx)ifuncmain5picstatic: $(addprefix $(objpfx),ifuncdep5pic.o) LDFLAGS-tst-ifunc-fault-lazy = -Wl,-z,lazy LDFLAGS-tst-ifunc-fault-bindnow = -Wl,-z,now define tst-ifunc-fault-script -( $(objpfx)ld.so --verify --library-path $(objpfx) $^ \ - && LD_TRACE_LOADED_OBJECTS=1 $(objpfx)ld.so --library-path $(objpfx) $^ \ - && LD_TRACE_LOADED_OBJECTS=1 LD_DEBUG=unused \ - $(objpfx)ld.so --library-path $(objpfx) $^ \ +( $(rtld-prefix) --verify $^ \ + && LD_TRACE_LOADED_OBJECTS=1 $(rtld-prefix) $^ \ + && LD_TRACE_LOADED_OBJECTS=1 LD_DEBUG=unused $(rtld-prefix) $^ \ ) > $@; $(evaluate-test) endef $(objpfx)tst-ifunc-fault-lazy.out: $(objpfx)tst-ifunc-fault-lazy $(objpfx)ld.so