Fix test isolation for elf/tst-ifunc-fault-lazy, elf/tst-ifunc-fault-bindnow
authorFlorian Weimer <fweimer@redhat.com>
Thu, 19 Dec 2019 13:45:50 +0000 (14:45 +0100)
committerFlorian Weimer <fweimer@redhat.com>
Thu, 19 Dec 2019 15:06:50 +0000 (16:06 +0100)
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

index 72a5aa88b1025e76c95126832a8049b354759dec..f861126b2f07004ef4967ad29c241a00240782ff 100644 (file)
@@ -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