[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[commits] r2027 - in /trunk/libc: ./ dlfcn/ elf/ io/ scripts/



Author: joseph
Date: Thu Apr 19 14:15:28 2007
New Revision: 2027

Log:
	* scripts/run-with-env.sh: Also handle
	EGLIBC_TEST_LD_LIBRARY_PATH.
	* dlfcn/Makefile (tststatic-ENV, tststatic2-ENV): Use
	EGLIBC_TEST_LD_LIBRARY_PATH.
	(tststatic-WRAPPER, tststatic2-WRAPPER): Define.
	* elf/Makefile (tst-tls9-static-ENV): Use
	EGLIBC_TEST_LD_LIBRARY_PATH.
	(tst-tls9-static-WRAPPER): Define.
	($(objpfx)tst-pathopt.out): Pass run-with-env.sh to
	tst-pathopt.sh.
	* elf/tst-pathopt.sh: Take run_with_env argument.  Use
	EGLIBC_TEST_LD_LIBRARY_PATH.
	* io/Makefile ($(objpfx)ftwtest.out): Pass run-with-env.sh to
	ftwtest-sh.
	* io/ftwtest-sh: Take run_with_env argument.  Use
	EGLIBC_TEST_LD_LIBRARY_PATH.

Modified:
    trunk/libc/ChangeLog.eglibc
    trunk/libc/dlfcn/Makefile
    trunk/libc/elf/Makefile
    trunk/libc/elf/tst-pathopt.sh
    trunk/libc/io/Makefile
    trunk/libc/io/ftwtest-sh
    trunk/libc/scripts/run-with-env.sh

Modified: trunk/libc/ChangeLog.eglibc
==============================================================================
--- trunk/libc/ChangeLog.eglibc (original)
+++ trunk/libc/ChangeLog.eglibc Thu Apr 19 14:15:28 2007
@@ -1,3 +1,22 @@
+2007-04-19  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
+
+	* scripts/run-with-env.sh: Also handle
+	EGLIBC_TEST_LD_LIBRARY_PATH.
+	* dlfcn/Makefile (tststatic-ENV, tststatic2-ENV): Use
+	EGLIBC_TEST_LD_LIBRARY_PATH.
+	(tststatic-WRAPPER, tststatic2-WRAPPER): Define.
+	* elf/Makefile (tst-tls9-static-ENV): Use
+	EGLIBC_TEST_LD_LIBRARY_PATH.
+	(tst-tls9-static-WRAPPER): Define.
+	($(objpfx)tst-pathopt.out): Pass run-with-env.sh to
+	tst-pathopt.sh.
+	* elf/tst-pathopt.sh: Take run_with_env argument.  Use
+	EGLIBC_TEST_LD_LIBRARY_PATH.
+	* io/Makefile ($(objpfx)ftwtest.out): Pass run-with-env.sh to
+	ftwtest-sh.
+	* io/ftwtest-sh: Take run_with_env argument.  Use
+	EGLIBC_TEST_LD_LIBRARY_PATH.
+
 2007-04-18  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
 
 	* scripts/cross-test-ssh.sh: Use printf in place of echo.

Modified: trunk/libc/dlfcn/Makefile
==============================================================================
--- trunk/libc/dlfcn/Makefile (original)
+++ trunk/libc/dlfcn/Makefile Thu Apr 19 14:15:28 2007
@@ -56,8 +56,10 @@
 tests += tststatic tststatic2
 tests-static += tststatic tststatic2
 modules-names += modstatic modstatic2
-tststatic-ENV = LD_LIBRARY_PATH=$(objpfx):$(common-objpfx):$(common-objpfx)elf
-tststatic2-ENV = LD_LIBRARY_PATH=$(objpfx):$(common-objpfx):$(common-objpfx)elf
+tststatic-ENV = EGLIBC_TEST_LD_LIBRARY_PATH=$(objpfx):$(common-objpfx):$(common-objpfx)elf
+tststatic-WRAPPER = $(..)scripts/run-with-env.sh
+tststatic2-ENV = EGLIBC_TEST_LD_LIBRARY_PATH=$(objpfx):$(common-objpfx):$(common-objpfx)elf
+tststatic2-WRAPPER = $(..)scripts/run-with-env.sh
 endif
 
 extra-test-objs += $(modules-names:=.os)

Modified: trunk/libc/elf/Makefile
==============================================================================
--- trunk/libc/elf/Makefile (original)
+++ trunk/libc/elf/Makefile Thu Apr 19 14:15:28 2007
@@ -149,7 +149,8 @@
 ifeq (yesyesyes,$(build-static)$(build-shared)$(elf))
 tests-static += tst-tls9-static
 tst-tls9-static-ENV = \
-       LD_LIBRARY_PATH=$(objpfx):$(common-objpfx):$(common-objpfx)dlfcn
+  EGLIBC_TEST_LD_LIBRARY_PATH=$(objpfx):$(common-objpfx):$(common-objpfx)dlfcn
+tst-tls9-static-WRAPPER = $(..)scripts/run-with-env.sh
 endif
 ifeq (yes,$(have-initfini-array))
 tests-static += tst-array1-static tst-array5-static
@@ -640,7 +641,8 @@
 $(objpfx)tst-pathopt: $(libdl)
 $(objpfx)tst-pathopt.out: tst-pathopt.sh $(objpfx)tst-pathopt \
 			  $(objpfx)pathoptobj.so
-	$(SHELL) -e $< $(common-objpfx) "$(cross-test-wrapper)"
+	$(SHELL) -e $< $(common-objpfx) "$(cross-test-wrapper)" \
+		$(..)scripts/run-with-env.sh
 
 $(objpfx)initfirst: $(libdl)
 $(objpfx)initfirst.out: $(objpfx)firstobj.so

Modified: trunk/libc/elf/tst-pathopt.sh
==============================================================================
--- trunk/libc/elf/tst-pathopt.sh (original)
+++ trunk/libc/elf/tst-pathopt.sh Thu Apr 19 14:15:28 2007
@@ -21,6 +21,7 @@
 
 common_objpfx=$1
 cross_test_wrapper="$2"
+run_with_env="$3"
 
 test -e ${common_objpfx}elf/will-be-empty &&
   rm -fr ${common_objpfx}elf/will-be-empty
@@ -30,8 +31,8 @@
 cp ${common_objpfx}elf/pathoptobj.so ${common_objpfx}elf/for-renamed/renamed.so
 
 LOCPATH=${common_objpfx}localedata GCONV_PATH=${common_objpfx}iconvdata \
-LC_ALL=C LD_LIBRARY_PATH=${common_objpfx}elf/will-be-empty:${common_objpfx}elf/for-renamed:${common_objpfx}.:${common_objpfx}dlfcn \
-  ${cross_test_wrapper} ${common_objpfx}elf/ld.so \
+LC_ALL=C EGLIBC_TEST_LD_LIBRARY_PATH=${common_objpfx}elf/will-be-empty:${common_objpfx}elf/for-renamed:${common_objpfx}.:${common_objpfx}dlfcn \
+  ${cross_test_wrapper} ${run_with_env} ${common_objpfx}elf/ld.so \
     ${common_objpfx}elf/tst-pathopt \
     > ${common_objpfx}elf/tst-pathopt.out
 

Modified: trunk/libc/io/Makefile
==============================================================================
--- trunk/libc/io/Makefile (original)
+++ trunk/libc/io/Makefile Thu Apr 19 14:15:28 2007
@@ -108,6 +108,7 @@
 	$(ftwtest-tmpdir) \
 	$(SHELL) -e ftwtest-sh $(shell cd $(common-objpfx). && pwd)/ \
 		 '$(cross-test-wrapper)' \
+		 $(shell cd $(..)scripts && pwd)/run-with-env.sh \
 		 $(shell cd $(<D) && pwd)/$(<F) > $@
 
 # eglibc: endif

Modified: trunk/libc/io/ftwtest-sh
==============================================================================
--- trunk/libc/io/ftwtest-sh (original)
+++ trunk/libc/io/ftwtest-sh Thu Apr 19 14:15:28 2007
@@ -5,6 +5,9 @@
 
 # The cross-testing wrapper.
 cross_test_wrapper="$2"
+
+# The environment-setting wrapper.
+run_with_env="$3"
 
 # We expect one parameter which is the test program.  This must understand
 # a number options:
@@ -14,7 +17,7 @@
 #   --depth		use the FTW_DEPTH flag
 #   --early-exit 	print file@2 item only and return non-zero from the
 #			callback when it is seen
-testprogram=$3
+testprogram=$4
 
 # We cannot test this as root.
 if test `id | sed "s/uid=\([0-9]*\).*/\1/"` = 0; then
@@ -32,7 +35,7 @@
 tmpdir=$tmp/ftwtest.d
 
 [ -f ${objpfx}elf/ld.so ] && ldso=${objpfx}elf/ld.so
-ldso="${cross_test_wrapper:+$cross_test_wrapper }$ldso"
+ldso="${cross_test_wrapper:+$cross_test_wrapper }$run_with_env $ldso"
 
 trap 'chmod -fR a+x $tmpdir; rm -fr $tmpdir $testout' 1 2 3 15
 
@@ -58,7 +61,7 @@
 
 testout=${TMPDIR:-/tmp}/ftwtest.out
 
-LD_LIBRARY_PATH=$objpfx $ldso $testprogram $tmpdir |
+EGLIBC_TEST_LD_LIBRARY_PATH=$objpfx $ldso $testprogram $tmpdir |
     sort > $testout
 
 cat <<EOF | cmp $testout - || exit 1
@@ -77,7 +80,7 @@
 EOF
 rm $testout
 
-LD_LIBRARY_PATH=$objpfx $ldso $testprogram --depth $tmpdir |
+EGLIBC_TEST_LD_LIBRARY_PATH=$objpfx $ldso $testprogram --depth $tmpdir |
     sort > $testout
 
 cat <<EOF | cmp $testout - || exit 1
@@ -96,7 +99,7 @@
 EOF
 rm $testout
 
-LD_LIBRARY_PATH=$objpfx $ldso $testprogram --phys $tmpdir |
+EGLIBC_TEST_LD_LIBRARY_PATH=$objpfx $ldso $testprogram --phys $tmpdir |
     sort > $testout
 
 cat <<EOF | cmp $testout - || exit 1
@@ -120,7 +123,7 @@
 # For the next test everything must be readable.
 chmod -fR a+x $tmpdir
 
-LD_LIBRARY_PATH=$objpfx $ldso $testprogram --chdir $tmpdir |
+EGLIBC_TEST_LD_LIBRARY_PATH=$objpfx $ldso $testprogram --chdir $tmpdir |
     sort > $testout
 
 # perhaps $tmp involves some symlinks...
@@ -144,7 +147,7 @@
 
 curwd=`/bin/pwd 2>/dev/null || /usr/bin/pwd`
 cd "$tmp"
-LD_LIBRARY_PATH=$objpfx $ldso $testprogram --chdir ftwtest.d |
+EGLIBC_TEST_LD_LIBRARY_PATH=$objpfx $ldso $testprogram --chdir ftwtest.d |
     sort > $testout
 cd "$curwd"
 
@@ -166,7 +169,7 @@
 
 curwd=`/bin/pwd 2>/dev/null || /usr/bin/pwd`
 cd "$tmp"
-LD_LIBRARY_PATH=$objpfx $ldso $testprogram --chdir ftwtest.d/. |
+EGLIBC_TEST_LD_LIBRARY_PATH=$objpfx $ldso $testprogram --chdir ftwtest.d/. |
     sort > $testout
 cd "$curwd"
 
@@ -188,7 +191,7 @@
 
 curwd=`/bin/pwd 2>/dev/null || /usr/bin/pwd`
 cd "$tmp"
-LD_LIBRARY_PATH=$objpfx $ldso $testprogram --chdir ftwtest.d/foo/lvl1/link@1 |
+EGLIBC_TEST_LD_LIBRARY_PATH=$objpfx $ldso $testprogram --chdir ftwtest.d/foo/lvl1/link@1 |
     sort > $testout
 cd "$curwd"
 
@@ -197,7 +200,7 @@
 EOF
 rm $testout
 
-LD_LIBRARY_PATH=$objpfx $ldso $testprogram --early-exit $tmpdir |
+EGLIBC_TEST_LD_LIBRARY_PATH=$objpfx $ldso $testprogram --early-exit $tmpdir |
     sort > $testout
 
 cat <<EOF | cmp $testout - || exit 1
@@ -211,7 +214,7 @@
 echo > $tmpdir/foo/lvl1b/file2@1b
 echo > $tmpdir/foo/lvl1b/file3@1b
 
-LD_LIBRARY_PATH=$objpfx $ldso $testprogram --skip-subtree=lvl1 $tmpdir |
+EGLIBC_TEST_LD_LIBRARY_PATH=$objpfx $ldso $testprogram --skip-subtree=lvl1 $tmpdir |
     sort > $testout
 
 cat <<EOF | diff -u $testout - || exit 1
@@ -228,7 +231,7 @@
 EOF
 rm $testout
 
-LD_LIBRARY_PATH=$objpfx $ldso $testprogram --skip-siblings=lvl1 $tmpdir |
+EGLIBC_TEST_LD_LIBRARY_PATH=$objpfx $ldso $testprogram --skip-siblings=lvl1 $tmpdir |
     sort > $testout
 
 # The filesystem is not required to put lvl1 before lvl1b.
@@ -252,7 +255,7 @@
 EOF
 rm $testout
 
-LD_LIBRARY_PATH=$objpfx $ldso $testprogram --skip-siblings=file@1b $tmpdir |
+EGLIBC_TEST_LD_LIBRARY_PATH=$objpfx $ldso $testprogram --skip-siblings=file@1b $tmpdir |
     sort > $testout
 
 # The filesystem is not required to put file2@1b and file3@1b after file@1b.

Modified: trunk/libc/scripts/run-with-env.sh
==============================================================================
--- trunk/libc/scripts/run-with-env.sh (original)
+++ trunk/libc/scripts/run-with-env.sh Thu Apr 19 14:15:28 2007
@@ -17,4 +17,8 @@
     export LD_AUDIT="${EGLIBC_TEST_LD_AUDIT}"
 fi
 
+if [ "${EGLIBC_TEST_LD_LIBRARY_PATH+set}" ]; then
+    export LD_LIBRARY_PATH="${EGLIBC_TEST_LD_LIBRARY_PATH}"
+fi
+
 exec "$@"