This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Use $(run-program-prefix) in more shell script tests
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Fri, 19 Oct 2012 23:20:52 -0700
- Subject: Re: Use $(run-program-prefix) in more shell script tests
- References: <Pine.LNX.4.64.1210190137120.19913@digraph.polyomino.org.uk>
On Thu, Oct 18, 2012 at 6:38 PM, Joseph S. Myers
<joseph@codesourcery.com> wrote:
> This is a second piece of changes in support of cross-testing, split
> out / reworked to reduce the size of the main cross-testing patch.
>
> Various tests are run via shell scripts which run ld.so --library-path
> not via $(run-program-prefix) passed to the shell script, but via
> other arguments passed to the script from which a suitable ld.so
> command is constructed. This patch changes such scripts to use
> $(run-program-prefix), passed from the makefiles. (Various other
> shell script used in testing already do this before this patch.)
>
> This is less conservative than the original cross-testing patch - the
> original patch passed $(cross-test-wrapper) down in these cases, so
> leaving the exact command run for native testing unchanged, but this
> patch will change the details of exactly what directories are in the
> --library-path option. However, I think the changes are appropriate
> here - generally, it seems good to have consistency in how test
> binaries are run, and this improves consistency - and this patch
> reduces the number of places that need to be explicitly aware of
> cross-testing.
>
> (I deferred doing anything like this with posix/globtest.sh because of
> one place where the cross-testing changes do something special with a
> test being run with a special value of HOME on the basis that HOME may
> be a problematic environment variable to propagate from the build
> system to the host. This patch deals with those tests for which I
> think the changes are straightforward and unproblematic.)
>
> Tested x86_64.
>
> 2012-10-19 Joseph Myers <joseph@codesourcery.com>
>
> * grp/Makefile ($(objpfx)tst_fgetgrent.out): Pass
> $(run-program-prefix) to tst_fgetgrent.sh, not $(elf-objpfx) and
> $(rtld-installed-name).
> * grp/tst_fgetgrent.sh (elf_objpfx): Remove variable.
> (rtld_installed_name): Likewise.
> (library_path): Likewise.
> (run_program_prefix): New variable. Use it to run tst_fgetgrent.
> * iconvdata/Makefile ($(objpfx)tst-tables.out): Pass
> $(run-program-prefix) to tst-tables.sh.
> * iconvdata/tst-table.sh (run_program_prefix): New variable. Use
> it to run tst-table-from and tst-table-to.
> * iconvdata/tst-tables.sh (run_program_prefix): New variable.
> Pass it to tst-table.sh.
> * intl/Makefile ($(objpfx)tst-gettext.out): Pass
> $(run-program-prefix) to tst-gettext.sh.
> ($(objpfx)tst-translit.out): Pass $(run-program-prefix) to
> tst-translit.sh.
> ($(objpfx)tst-gettext2.out): Pass $(run-program-prefix) to
> tst-gettext2.sh.
> * intl/tst-gettext.sh (run_program_prefix): New variable. Use it
> to run tst-gettext.
> * intl/tst-gettext2.sh (run_program_prefix): New variable. Use it
> to run tst-gettext2.
> * intl/tst-translit.sh (run_program_prefix): New variable. Use it
> to run tst-translit.
> * malloc/Makefile ($(objpfx)tst-mtrace.out): Pass
> $(run-program-prefix) to tst-mtrace.sh.
> * malloc/tst-mtrace.sh (run_program_prefix): New variable. Use it
> to run tst-mtrace.
> * posix/Makefile ($(objpfx)wordexp-tst.out): Pass
> $(run-program-prefix) to wordexp-tst.sh, not $(elf-objpfx) and
> $(rtld-installed-name).
> * posix/wordexp-tst.sh (elf_objpfx): Remove variable.
> (rtld_installed_name): Likewise.
> (run_program_prefix): New variable. Use it to run wordexp-test.
>
On Fedora 17/x86-64, I got
make subdir=iconvdata -C iconvdata ..=../ tests
make[2]: Entering directory `/export/gnu/import/git/sources/glibc/iconvdata'
/bin/sh tst-tables.sh /export/build/gnu/glibc/build-x86_64-linux/
/export/build/gnu/glibc/build-x86_64-linux/iconvdata/ \
' /export/build/gnu/glibc/build-x86_64-linux/elf/ld-linux-x86-64.so.2
--library-path /export/build/gnu/glibc/build-x86_64-linux:/export/build/gnu/glibc/build-x86_64-linux/math:/export/build/gnu/glibc/build-x86_64-linux/elf:/export/build/gnu/glibc/build-x86_64-linux/dlfcn:/export/build/gnu/glibc/build-x86_64-linux/nss:/export/build/gnu/glibc/build-x86_64-linux/nis:/export/build/gnu/glibc/build-x86_64-linux/rt:/export/build/gnu/glibc/build-x86_64-linux/resolv:/export/build/gnu/glibc/build-x86_64-linux/crypt:/export/build/gnu/glibc/build-x86_64-linux/nptl'
> /export/build/gnu/glibc/build-x86_64-linux/iconvdata/tst-tables.out
Testing ASCIItst-table.sh:63: no such file or directory:
/export/build/gnu/glibc/build-x86_64-linux/elf/ld-linux-x86-64.so.2
--library-path /export/build/gnu/glibc/build-x86_64-linux:/export/build/gnu/glibc/build-x86_64-linux/math:/export/build/gnu/glibc/build-x86_64-linux/elf:/export/build/gnu/glibc/build-x86_64-linux/dlfcn:/export/build/gnu/glibc/build-x86_64-linux/nss:/export/build/gnu/glibc/build-x86_64-linux/nis:/export/build/gnu/glibc/build-x86_64-linux/rt:/export/build/gnu/glibc/build-x86_64-linux/resolv:/export/build/gnu/glibc/build-x86_64-linux/crypt:/export/build/gnu/glibc/build-x86_64-linux/nptl
*** FAILED ***
make[2]: *** [/export/build/gnu/glibc/build-x86_64-linux/iconvdata/tst-tables.out]
Error 1
make[2]: Leaving directory `/export/gnu/import/git/sources/glibc/iconvdata'
make[1]: *** [iconvdata/tests] Error 2
make[1]: Leaving directory `/export/gnu/import/git/sources/glibc'
make: *** [check] Error 2
--
H.J.