This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On Thu, Dec 20, 2012 at 12:57 PM, Joseph S. Myers <joseph@codesourcery.com> wrote: > The $(cross-compiling) conditionals in the patch are suspect (just about > any $(cross-compiling) conditional is suspect). There should be no reason > not to support the new option properly for cross compiling, which would > appear to be the effect of the conditionals on the definitions of > test-program-prefix etc. > > Instead, I think you should just use ifeq (yes,$(build-dynamic-test)) > instead of ifeq (noyes,$(cross-compiling)$(build-dynamic-test)), and all > of the variables you define in that case other than host-test-program-cmd > should start with $(test-wrapper), which also helps for any other use > cases of wrappers. Fixed. > All four of the new variables also need extended comments explaining their > precise semantics, similar to those I put on $(run-via-rtld-prefix), > $(run-program-prefix), $(built-program-cmd) and $(host-built-program-cmd). > Those comments explaining the precise semantics would also help elucidate > whether what I said in the previous paragraph about when to use > $(test-wrapper) is correct. Fixed. > I'm concerned about the change to elf/Makefile for running "order". You > appear to change it unconditionally to run the binary directly rather than > via ld.so --library-path. When the new configure option isn't passed, > won't that try to run it with whatever old dynamic linker might be already > installed on the system? Have you tested without the new configure > option? Likewise, order2. > > If you wish to include any changes that affect how a test is run *without* > the new configure option, please split such changes out and submit them > separately, so that the patch adding the new configure option makes no > difference at all to how anything is built or run when the option isn't > used. I changed "order" tests to simply use $(test-program-prefix) since DSO paths are hardcoded to test programs: gnu-6:pts/3[67]> readelf -d elf/order Dynamic section at offset 0xdd8 contains 29 entries: Tag Type Name/Value 0x0000000000000001 (NEEDED) Shared library: [/export/build/gnu/glibc-test/build-x86_64-linux/elf/dep4.so] 0x0000000000000001 (NEEDED) Shared library: [/export/build/gnu/glibc-test/build-x86_64-linux/elf/dep3.so] 0x0000000000000001 (NEEDED) Shared library: [/export/build/gnu/glibc-test/build-x86_64-linux/elf/dep2.so] 0x0000000000000001 (NEEDED) Shared library: [/export/build/gnu/glibc-test/build-x86_64-linux/elf/dep1.so] 0x0000000000000001 (NEEDED) Shared library: [libc.so.6] > The additions of -static versions of tests look like another thing that > should be split out. Done. > Could you clarify what the bug-setlocale1.c change is for and why it is > safe (in the absence of the new configure option)? > > Note that localedata/ has its own ChangeLog. I sent a separate patch for bug-setlocale1.c. Here is the updated patch to add --enable-dynamic-test configure option. OK for 2.18 with proper configure option name? Thanks. -- H.J. --- 2012-12-08 H.J. Lu <hongjiu.lu@intel.com> * Makeconfig (+link-pie-before-libc): New. (+link-pie-after-libc): Likewise. (+link-pie-tests): Likewise. (+link-pie): Rewritten. (link-before-libc): Remove $(config-LDFLAGS). (+link): Add $(rtld-LDFLAGS) after $(+link-before-libc). (+link-tests): Add $(rtld-tests-LDFLAGS) after $(+link-before-libc). (config-LDFLAGS): Renamed to ... (rtld-LDFLAGS): This. (rtld-tests-LDFLAGS): New macro. (link-libc-rpath-link): Likewise. (link-libc-tests-rpath-link): Likewise. (link-libc-before-gnulib): Remove -Wl,-rpath-link=$(rpath-link). (link-libc): Prepand $(link-libc-rpath-link). (link-libc-tests): Prepand $(link-libc-tests-rpath-link). (test-program-prefix): New macro. (test-via-rtld-prefix): Likewise. (test-program-cmd): Likewise. (host-test-program-cmd): Likewise. * Makefile ($(common-objpfx)testrun.sh): Replace $(run-program-prefix) with $(test-program-prefix). * Makerules ($(LINK.o)): Replace $(config-LDFLAGS) with $(rtld-LDFLAGS). ($(common-objpfx)shlib.lds): Likewise. (build-module-helper): Likewise. ($(common-objpfx)format.lds): Likewise. * Rules (binaries-pie-tests): New. (binaries-pie-notests): Likewise. (binaries-pie): Rewritten. ($(addprefix $(objpfx),$(binaries-pie))): Renamed to ... ($(addprefix $(objpfx),$(binaries-pie-notests))): This. ($(addprefix $(objpfx),$(binaries-pie-tests))): New. (make-test-out): Replace $(host-built-program-cmd) with $(host-test-program-cmd). * config.make.in (build-dynamic-test): New variable. * configure.in (--enable-dynamic-test): New configure option. (dynamic_test): New AC_SUBST. * configure: Regenerated. * catgets/Makefile ($(objpfx)test-gencat.out): Replace $(built-program-cmd) with $(test-program-cmd). * catgets/test-gencat.sh (run_program_cmd): Renamed to ... (test_program_cmd): This. * elf/Makefile ($(objpfx)order.out): Run test with $(test-program-prefix). ($(objpfx)order2.out): Likewise. ($(objpfx)tst-initorder.out): Likewise. ($(objpfx)tst-initorder2.out): Likewise. ($(objpfx)tst-array1.out): Replace $(built-program-cmd) with $(test-program-cmd). ($(objpfx)tst-array1-static.out): Likewise. ($(objpfx)tst-array2.out): Likewise. ($(objpfx)tst-array3.out): Likewise. ($(objpfx)tst-array4.out): Likewise. ($(objpfx)tst-array5.out): Likewise. ($(objpfx)tst-array5-static.out): Likewise. (tst-stackguard1-ARGS): Replace $(built-program-cmd) with $(test-program-cmd). * grp/Makefile ($(objpfx)tst_fgetgrent.out): Replace $(run-program-prefix) with $(test-program-prefix). * grp/tst_fgetgrent.sh (run_program_prefix): Renamed to ... (test_program_prefix): This. * iconvdata/Makefile ($(objpfx)tst-tables.out): Replace $(run-program-prefix) with $(test-program-prefix). * iconvdata/tst-table.sh (run_program_prefix): Renamed to ... (test_program_prefix): This. * iconvdata/tst-tables.sh: Likewise. * intl/Makefile ($(objpfx)tst-gettext.out): Replace $(run-program-prefix) with $(test-program-prefix). ($(objpfx)tst-translit.out): Likewise. ($(objpfx)tst-gettext2.out): Likewise. ($(objpfx)tst-gettext4.out): Likewise. ($(objpfx)tst-gettext6.out): Likewise. * intl/tst-gettext.sh (run_program_prefix): Renamed to ... (test_program_prefix): This. * intl/tst-gettext2.sh: Likewise. * intl/tst-gettext4.sh Likewise. * intl/tst-gettext6.sh: Likewise. * intl/tst-translit.sh: Likewise. * io/Makefile ($(objpfx)ftwtest.out): Replace $(run-program-cmd) with $(test-program-cmd). * libio/Makefile ($(objpfx)test-freopen.out): Replace $(run-program-prefix) with $(test-program-prefix). * libio/test-freopen.sh (run_program_prefix): Renamed to ... (test_program_prefix): This. * malloc/Makefile ($(objpfx)tst-mtrace.out): Replace $(run-program-prefix) with $(test-program-prefix). * malloc/tst-mtrace.sh (run_program_prefix): Renamed to ... (test_program_prefix): This. * posix/Makefile ($(objpfx)globtest.out): Replace $(run-via-rtld-prefix) and $(test-wrapper) with $(test-program-prefix) and $(test-via-rtld-prefix). ($(objpfx)wordexp-tst.out): Replace $(run-program-prefix) with $(test-program-prefix). (tst-exec-ARGS): Replace $(host-built-program-cmd) with $(host-test-program-cmd). (tst-spawn-ARGS): Likewise. ($(objpfx)tst-rxspencer-mem): Replace $(run-program-prefix) with $(test-program-prefix). * posix/globtest.sh (un_via_rtld_prefix): Renamed to ... (test_via_rtld_prefix): This. (test_wrapper): Renamed to ... (test_program_prefix): This. (run_program_prefix): Replaced by test_program_prefix. * posix/wordexp-tst.sh (run_program_prefix): Renamed to ... (test_program_prefix): This. * rt/Makefile (tst-mqueue7-ARGS): Replace $(host-built-program-cmd) with $(host-test-program-cmd). * stdio-common/Makefile ($(objpfx)tst-unbputc.out): Replace $(run-program-prefix) with $(test-program-prefix). ($(objpfx)tst-printf.out): Likewise. ($(objpfx)tst-setvbuf1.out): Replace $(built-program-cmd) with $(test-program-cmd). * stdio-common/tst-printf.sh (run_program_prefix): Renamed to ... (test_program_prefix): This. * stdio-common/tst-unbputc.sh: Likewise. * stdlib/Makefile ($(objpfx)tst-fmtmsg.out): Replace $(run-program-prefix) with $(test-program-prefix). * stdlib/tst-fmtmsg.sh (run_program_prefix): Renamed to ... (test_program_prefix): This. * string/Makefile ($(objpfx)tst-svc.out): Replace $(built-program-cmd) with $(test-program-cmd). localedata/ 2012-12-08 H.J. Lu <hongjiu.lu@intel.com> * Makefile ($(objpfx)sort-test.out): Replace $(run-program-prefix) with $(test-program-prefix). ($(objpfx)tst-numeric.out): Likewise. ($(objpfx)tst-mbswcs.out): Likewise. ($(objpfx)tst-fmon.out): Add $(test-program-prefix). ($(objpfx)tst-trans.out): Likewise. ($(objpfx)tst-rpmatch.out): Replace $(built-program-cmd) with $(test-program-cmd). ($(objpfx)tst-ctype.out): Likewise. ($(objpfx)tst-wctype.out): Likewise. ($(objpfx)tst-langinfo.out): Likewise. (bug-setlocale1-ARGS): Replace $(built-program-cmd) with $(test-program-cmd). * sort-test.sh (run_program_prefix): Renamed to ... (test_program_prefix): This. * tst-mbswcs.sh: Likewise. * tst-numeric.sh: Likewise. * tst-wctype.sh: Likewise. * tst-fmon.sh (test_program_prefix): New. Replace ${run_program_prefix} with ${test_program_prefix} when running. tst-fmon. * tst-trans.sh: (test_program_prefix): New. Replace ${run_program_prefix} with ${test_program_prefix} when running tst-trans. nptl/ 2012-12-08 H.J. Lu <hongjiu.lu@intel.com> * Makefile (tst-cancel7-ARGS: Replace $(host-built-program-cmd) with $(host-test-program-cmd). (tst-exec4-ARGS): Likewise. (tst-stackguard1-ARGS): Likewise. ($(objpfx)tst-tls6.out): Don't pass $(elf-objpfx) to tst-tls6.sh. Replace $(rtld-installed-name) with $(test-via-rtld-prefix). * tst-tls6.sh (elf_objpfx): Removed. (rtld_installed_name): Renamed to ... (test_via_rtld_prefix): This. (tst_tls5): Prepend ${test_via_rtld_prefix}.
Attachment:
0003-Add-enable-dynamic-test-configure-option.patch
Description: Binary data
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |