summaryrefslogtreecommitdiff
path: root/libc/io
diff options
context:
space:
mode:
authorjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2007-04-19 21:15:28 +0000
committerjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2007-04-19 21:15:28 +0000
commitd196dd9dcccf1d625941499a94349d2ba7a90810 (patch)
tree4fcf886ea07b5b32f881fce82a306c06140543fb /libc/io
parentbfc7f4198b073b26227ae3722d031e1fa32ec10a (diff)
* 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. git-svn-id: svn://svn.eglibc.org/trunk@2027 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc/io')
-rw-r--r--libc/io/Makefile1
-rw-r--r--libc/io/ftwtest-sh29
2 files changed, 17 insertions, 13 deletions
diff --git a/libc/io/Makefile b/libc/io/Makefile
index b315c4e4e..45518f8d9 100644
--- a/libc/io/Makefile
+++ b/libc/io/Makefile
@@ -108,6 +108,7 @@ $(objpfx)ftwtest.out: $(objpfx)ftwtest
$(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
diff --git a/libc/io/ftwtest-sh b/libc/io/ftwtest-sh
index 275dd7601..2036294df 100644
--- a/libc/io/ftwtest-sh
+++ b/libc/io/ftwtest-sh
@@ -6,6 +6,9 @@ objpfx=$1
# 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:
# --phys use the FTW_PHYS flag
@@ -14,7 +17,7 @@ cross_test_wrapper="$2"
# --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 @@ tmp=`echo ${TMPDIR:-/tmp} | sed 's|\(.\)/*$|\1|'`
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 @@ chmod a-x,a+r $tmpdir/bar
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 @@ base = "$tmp/ftwtest.d/foo/lvl1/lvl2/lvl3/", file = "file@3", flag = FTW_F, leve
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 @@ base = "$tmp/ftwtest.d/foo/lvl1/lvl2/lvl3/", file = "file@3", flag = FTW_F, leve
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 @@ rm $testout
# 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 @@ rm $testout
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 @@ rm $testout
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 @@ rm $testout
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 @@ base = "ftwtest.d/foo/lvl1/", file = "link@1", flag = FTW_SLN, cwd = $tmpreal/ft
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/file@1b
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 @@ base = "$tmp/ftwtest.d/foo/lvl1b/", file = "file@1b", flag = FTW_F, level = 3
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 @@ base = "$tmp/ftwtest.d/foo/lvl1b/", file = "file@1b", flag = FTW_F, level = 3
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.