[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r1782 - in /branches/eglibc-2_5/libc: ./ elf/ nptl/ scripts/
- To: commits@xxxxxxxxxx
- Subject: [commits] r1782 - in /branches/eglibc-2_5/libc: ./ elf/ nptl/ scripts/
- From: jimb@xxxxxxxxxx
- Date: Fri, 23 Mar 2007 06:18:46 -0000
Author: jimb
Date: Thu Mar 22 23:18:45 2007
New Revision: 1782
Log:
Run tests that set LD_PRELOAD properly, even when
cross-test-wrapper is set.
* scripts/run-with-preload.sh: New script.
* Makeconfig (run-program-prefix, built-program-cmd): If
$*-WRAPPER is set, include it in the command.
* nptl/Makefile: Pass path to run-with-preload.sh script to
tst-tls6.sh.
* nptl/tst-tls6.sh: Pass LD_PRELOAD to test programs in a
cross-test-wrapper-friendly way.
* elf/Makefile (preloadtest-ENV, vismain-ENV): Set
EGLIBC_TEST_LD_PRELOAD, not LD_PRELOAD.
(preloadtest-WRAPPER, vismain-WRAPPER): Set to
run-with-preload.sh.
Added:
branches/eglibc-2_5/libc/scripts/run-with-preload.sh (with props)
Modified:
branches/eglibc-2_5/libc/ChangeLog.eglibc
branches/eglibc-2_5/libc/Makeconfig
branches/eglibc-2_5/libc/elf/Makefile
branches/eglibc-2_5/libc/nptl/Makefile
branches/eglibc-2_5/libc/nptl/tst-tls6.sh
Modified: branches/eglibc-2_5/libc/ChangeLog.eglibc
==============================================================================
--- branches/eglibc-2_5/libc/ChangeLog.eglibc (original)
+++ branches/eglibc-2_5/libc/ChangeLog.eglibc Thu Mar 22 23:18:45 2007
@@ -1,3 +1,19 @@
+2007-03-22 Jim Blandy <jimb@xxxxxxxxxxxxxxxx>
+
+ Run tests that set LD_PRELOAD properly, even when
+ cross-test-wrapper is set.
+ * scripts/run-with-preload.sh: New script.
+ * Makeconfig (run-program-prefix, built-program-cmd): If
+ $*-WRAPPER is set, include it in the command.
+ * nptl/Makefile: Pass path to run-with-preload.sh script to
+ tst-tls6.sh.
+ * nptl/tst-tls6.sh: Pass LD_PRELOAD to test programs in a
+ cross-test-wrapper-friendly way.
+ * elf/Makefile (preloadtest-ENV, vismain-ENV): Set
+ EGLIBC_TEST_LD_PRELOAD, not LD_PRELOAD.
+ (preloadtest-WRAPPER, vismain-WRAPPER): Set to
+ run-with-preload.sh.
+
2007-03-12 Nathan Froyd <froydnj@xxxxxxxxxxxxxxxx>
* elf/dl-profile.c (struct here_cg_arc_record): Declare 'count'
Modified: branches/eglibc-2_5/libc/Makeconfig
==============================================================================
--- branches/eglibc-2_5/libc/Makeconfig (original)
+++ branches/eglibc-2_5/libc/Makeconfig Thu Mar 22 23:18:45 2007
@@ -564,8 +564,10 @@
else
run-via-rtld-prefix =
endif
-run-program-prefix = $(cross-test-wrapper) $(run-via-rtld-prefix)
-built-program-cmd = $(cross-test-wrapper) $(run-via-rtld-prefix) $(built-program-file)
+run-program-prefix = $(cross-test-wrapper) $($*-WRAPPER) \
+ $(run-via-rtld-prefix)
+built-program-cmd = $(cross-test-wrapper) $($*-WRAPPER) \
+ $(run-via-rtld-prefix) $(built-program-file)
# Same as built-program-cmd, but without the cross-test-wrapper. Used
# to run programs from the test machine, as in nptl/tst-cancel7.
Modified: branches/eglibc-2_5/libc/elf/Makefile
==============================================================================
--- branches/eglibc-2_5/libc/elf/Makefile (original)
+++ branches/eglibc-2_5/libc/elf/Makefile Thu Mar 22 23:18:45 2007
@@ -541,7 +541,8 @@
LDFLAGS-preloadtest = -rdynamic
$(objpfx)preloadtest.out: $(preloadtest-preloads:%=$(objpfx)%.so)
preloadtest-ENV = \
- LD_PRELOAD=$(subst $(empty) ,:,$(strip $(preloadtest-preloads:=.so)))
+ EGLIBC_TEST_LD_PRELOAD=$(subst $(empty) ,:,$(strip $(preloadtest-preloads:=.so)))
+preloadtest-WRAPPER = $(..)scripts/run-with-preload.sh
$(objpfx)loadfail: $(libdl)
LDFLAGS-loadfail = -rdynamic
@@ -587,7 +588,8 @@
$(objpfx)vismain: $(addprefix $(objpfx),vismod1.so vismod2.so)
$(objpfx)vismain.out: $(addprefix $(objpfx),vismod3.so)
-vismain-ENV = LD_PRELOAD=$(addprefix $(objpfx),vismod3.so)
+vismain-ENV = EGLIBC_TEST_LD_PRELOAD=$(addprefix $(objpfx),vismod3.so)
+vismain-WRAPPER = $(..)scripts/run-with-preload.sh
$(objpfx)noload: $(objpfx)testobj1.so
LDFLAGS-noload = -rdynamic
Modified: branches/eglibc-2_5/libc/nptl/Makefile
==============================================================================
--- branches/eglibc-2_5/libc/nptl/Makefile (original)
+++ branches/eglibc-2_5/libc/nptl/Makefile Thu Mar 22 23:18:45 2007
@@ -470,7 +470,8 @@
$(objpfx)tst-tls5modc.so $(objpfx)tst-tls5modd.so \
$(objpfx)tst-tls5mode.so $(objpfx)tst-tls5modf.so
$(SHELL) -e tst-tls6.sh $(common-objpfx) $(elf-objpfx) \
- $(rtld-installed-name) '$(cross-test-wrapper)'
+ $(rtld-installed-name) '$(cross-test-wrapper)' \
+ $(..)scripts/run-with-preload.sh
endif
$(objpfx)tst-dlsym1: $(libdl) $(shared-thread-library)
Modified: branches/eglibc-2_5/libc/nptl/tst-tls6.sh
==============================================================================
--- branches/eglibc-2_5/libc/nptl/tst-tls6.sh (original)
+++ branches/eglibc-2_5/libc/nptl/tst-tls6.sh Thu Mar 22 23:18:45 2007
@@ -4,13 +4,14 @@
elf_objpfx=$1; shift
rtld_installed_name=$1; shift
cross_test_wrapper=$1; shift
+run_with_preload=$1; shift
logfile=$common_objpfx/nptl/tst-tls6.out
# We have to find libc and nptl
library_path=${common_objpfx}:${common_objpfx}nptl
tst_tls5="${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
${common_objpfx}/nptl/tst-tls5"
-tst_tls5="$cross_test_wrapper $tst_tls5"
+tst_tls5="$cross_test_wrapper $run_with_preload $tst_tls5"
LC_ALL=C
export LC_ALL
@@ -23,32 +24,32 @@
for aligned in a e f; do
echo "preload tst-tls5mod{$aligned,b,c,d}.so" >> $logfile
echo "===============" >> $logfile
- LD_PRELOAD=`echo ${common_objpfx}nptl/tst-tls5mod{$aligned,b,c,d}.so \
+ EGLIBC_TEST_LD_PRELOAD=`echo ${common_objpfx}nptl/tst-tls5mod{$aligned,b,c,d}.so \
| sed 's/:$//;s/: /:/g'` ${tst_tls5} >> $logfile || fail=1
echo >> $logfile
echo "preload tst-tls5mod{b,$aligned,c,d}.so" >> $logfile
echo "===============" >> $logfile
- LD_PRELOAD=`echo ${common_objpfx}nptl/tst-tls5mod{b,$aligned,c,d}.so \
+ EGLIBC_TEST_LD_PRELOAD=`echo ${common_objpfx}nptl/tst-tls5mod{b,$aligned,c,d}.so \
| sed 's/:$//;s/: /:/g'` ${tst_tls5} >> $logfile || fail=1
echo >> $logfile
echo "preload tst-tls5mod{b,c,d,$aligned}.so" >> $logfile
echo "===============" >> $logfile
- LD_PRELOAD=`echo ${common_objpfx}nptl/tst-tls5mod{b,c,d,$aligned}.so \
+ EGLIBC_TEST_LD_PRELOAD=`echo ${common_objpfx}nptl/tst-tls5mod{b,c,d,$aligned}.so \
| sed 's/:$//;s/: /:/g'` ${tst_tls5} >> $logfile || fail=1
echo >> $logfile
done
echo "preload tst-tls5mod{d,a,b,c,e}" >> $logfile
echo "===============" >> $logfile
-LD_PRELOAD=`echo ${common_objpfx}nptl/tst-tls5mod{d,a,b,c,e}.so \
+EGLIBC_TEST_LD_PRELOAD=`echo ${common_objpfx}nptl/tst-tls5mod{d,a,b,c,e}.so \
| sed 's/:$//;s/: /:/g'` ${tst_tls5} >> $logfile || fail=1
echo >> $logfile
echo "preload tst-tls5mod{d,a,b,e,f}" >> $logfile
echo "===============" >> $logfile
-LD_PRELOAD=`echo ${common_objpfx}nptl/tst-tls5mod{d,a,b,e,f}.so \
+EGLIBC_TEST_LD_PRELOAD=`echo ${common_objpfx}nptl/tst-tls5mod{d,a,b,e,f}.so \
| sed 's/:$//;s/: /:/g'` ${tst_tls5} >> $logfile || fail=1
echo >> $logfile
Added: branches/eglibc-2_5/libc/scripts/run-with-preload.sh
==============================================================================
--- branches/eglibc-2_5/libc/scripts/run-with-preload.sh (added)
+++ branches/eglibc-2_5/libc/scripts/run-with-preload.sh Thu Mar 22 23:18:45 2007
@@ -1,0 +1,20 @@
+#!/bin/sh
+# Usage: run-with-preload.sh CMD ...
+#
+# Set the LD_PRELOAD environment variable to the value of the
+# $EGLIBC_TEST_LD_PRELOAD environment variable, and run CMD ... .
+#
+# The EGLIBC test suite uses this to set LD_PRELOAD for test programs.
+# If we simply say:
+# LD_PRELOAD=smootz \
+# $(cross-test-wrapper) \
+# tst-foo arg1 arg2
+# then the LD_PRELOAD setting inteferes with the execution of
+# $(cross-test-wrapper). If we instead say:
+# EGLIBC_TEST_LD_PRELOAD=smootz \
+# $(cross-test-wrapper) \
+# run-with-preload.sh \
+# tst-foo arg1 arg2
+# then things work fine.
+
+LD_PRELOAD="$EGLIBC_TEST_LD_PRELOAD" exec "$@"
Propchange: branches/eglibc-2_5/libc/scripts/run-with-preload.sh
------------------------------------------------------------------------------
svn:executable = *