Fix cross-testing of tst-ifunc-fault-* tests

Message ID alpine.DEB.2.21.2001222332140.11049@digraph.polyomino.org.uk
State Committed
Headers

Commit Message

Joseph Myers Jan. 22, 2020, 11:33 p.m. UTC
  The tests elf/tst-ifunc-fault-bindnow and elf/tst-ifunc-fault-lazy
fail in cross-testing because they run the dynamic linker directly
without using the test wrapper.  This patch fixes them to use the test
wrapper instead.

Tested that this fixes the failure of those two tests for powerpc
soft-float.
  

Comments

Siddhesh Poyarekar Jan. 23, 2020, 2:07 a.m. UTC | #1
On 23/01/20 5:03 am, Joseph Myers wrote:
> The tests elf/tst-ifunc-fault-bindnow and elf/tst-ifunc-fault-lazy
> fail in cross-testing because they run the dynamic linker directly
> without using the test wrapper.  This patch fixes them to use the test
> wrapper instead.
> 
> Tested that this fixes the failure of those two tests for powerpc
> soft-float.
> 

OK for master.

Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
  

Patch

diff --git a/elf/Makefile b/elf/Makefile
index 6c62ed611c..0c6bd926a1 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -1378,9 +1378,10 @@  $(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
-( $(rtld-prefix) --verify $^ \
-  && LD_TRACE_LOADED_OBJECTS=1 $(rtld-prefix) $^ \
-  && LD_TRACE_LOADED_OBJECTS=1 LD_DEBUG=unused $(rtld-prefix) $^ \
+( $(test-wrapper) $(rtld-prefix) --verify $^ \
+  && $(test-wrapper-env) LD_TRACE_LOADED_OBJECTS=1 $(rtld-prefix) $^ \
+  && $(test-wrapper-env) 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