Hi! On Tue, 20 Mar 2012 20:16:20 +0000, "Joseph S. Myers" <joseph@xxxxxxxxxxxxxxxx> wrote: > On Tue, 20 Mar 2012, Thomas Schwinge wrote: > > > I figured out that the following patch is needed to make the new > > elf/tst-unused-dep.out test functional in a cross-testing environment, to > > avoid to (try to) execute it on the build system: > Normally you'd use run-with-env.sh (and set the variables outside the call > to $(cross-test-wrapper) - this may require adding extra EGLIBC_* variable > handling to run-with-env.sh). That is, <env settings> > $(cross-test-wrapper) $(..)scripts/run-with-env.sh <command>. Thanks; for preserving consistency, I have now tested the following patch: * elf/Makefile ($(objpfx)tst-unused-dep.out): Run through the cross-test-wrapper. * scripts/run-with-env.sh: Handle EGLIBC_TEST_LD_TRACE_LOADED_OBJECTS and EGLIBC_TEST_LD_DEBUG. Index: elf/Makefile =================================================================== --- elf/Makefile (revision 17601) +++ elf/Makefile (working copy) @@ -1142,9 +1142,11 @@ tests: $(objpfx)tst-unused-dep.out $(objpfx)tst-unused-dep.out: $(objpfx)testobj1.so - LD_TRACE_LOADED_OBJECTS=1 \ - LD_DEBUG=unused \ - LD_PRELOAD= \ + EGLIBC_TEST_LD_TRACE_LOADED_OBJECTS=1 \ + EGLIBC_TEST_LD_DEBUG=unused \ + EGLIBC_TEST_LD_PRELOAD= \ + $(cross-test-wrapper) \ + $(..)scripts/run-with-env.sh \ $(elf-objpfx)${rtld-installed-name} \ --library-path $(rpath-link)$(patsubst %,:%,$(sysdep-library-path)) \ $< > $@ Index: scripts/run-with-env.sh =================================================================== --- scripts/run-with-env.sh (revision 17601) +++ scripts/run-with-env.sh (working copy) @@ -21,4 +21,12 @@ export LD_LIBRARY_PATH="${EGLIBC_TEST_LD_LIBRARY_PATH}" fi +if [ "${EGLIBC_TEST_LD_TRACE_LOADED_OBJECTS+set}" ]; then + export LD_TRACE_LOADED_OBJECTS="${EGLIBC_TEST_LD_TRACE_LOADED_OBJECTS}" +fi + +if [ "${EGLIBC_TEST_LD_DEBUG+set}" ]; then + export LD_DEBUG="${EGLIBC_TEST_LD_DEBUG}" +fi + exec "$@" Snippet of before/after diff for cross-testing sh-linux-gnu: -LD_TRACE_LOADED_OBJECTS=1 \ - LD_DEBUG=unused \ - LD_PRELOAD= \ +EGLIBC_TEST_LD_TRACE_LOADED_OBJECTS=1 \ + EGLIBC_TEST_LD_DEBUG=unused \ + EGLIBC_TEST_LD_PRELOAD= \ + [...]/wrapper/run \ + ../scripts/run-with-env.sh \ [glibc build]/elf/ld-linux.so.2 \ --library-path [...] \ [glibc build]/elf/testobj1.so > [glibc build]/elf/tst-unused-dep.out -/bin/sh: [glibc build]/elf/ld-linux.so.2: cannot execute binary file -make[3]: *** [[glibc build]/elf/tst-unused-dep.out] Error 126 +cmp [glibc build]/elf/tst-unused-dep.out /dev/null > /dev/null GrÃÃe, Thomas
Attachment:
pgpFh_sCK8ZNN.pgp
Description: PGP signature
_______________________________________________ Patches mailing list Patches@xxxxxxxxxx http://eglibc.org/cgi-bin/mailman/listinfo/patches