summaryrefslogtreecommitdiff
path: root/elf/tst-rtld-load-self.sh
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2012-10-24 21:59:01 +0000
committerJoseph Myers <joseph@codesourcery.com>2012-10-24 21:59:01 +0000
commitcc1290d07e9bb5662642846c50c97c853d1827b5 (patch)
tree3b302e5ce4233344fe3ca28909bcd09fb335e1e6 /elf/tst-rtld-load-self.sh
parent6e6249d0b461b952d0f544792372663feb6d792a (diff)
downloadglibc-cc1290d07e9bb5662642846c50c97c853d1827b5.tar.gz
Support cross-testing.
Diffstat (limited to 'elf/tst-rtld-load-self.sh')
-rwxr-xr-xelf/tst-rtld-load-self.sh11
1 files changed, 7 insertions, 4 deletions
diff --git a/elf/tst-rtld-load-self.sh b/elf/tst-rtld-load-self.sh
index f4c5dea23a..18723a9bad 100755
--- a/elf/tst-rtld-load-self.sh
+++ b/elf/tst-rtld-load-self.sh
@@ -21,25 +21,28 @@
set -e
rtld=$1
+test_wrapper=$2
+test_wrapper_env=$3
result=0
echo '# normal mode'
-$rtld $rtld 2>&1 && rc=0 || rc=$?
+${test_wrapper} $rtld $rtld 2>&1 && rc=0 || rc=$?
echo "# exit status $rc"
test $rc -le 127 || result=1
echo '# list mode'
-$rtld --list $rtld 2>&1 && rc=0 || rc=$?
+${test_wrapper} $rtld --list $rtld 2>&1 && rc=0 || rc=$?
echo "# exit status $rc"
test $rc -eq 0 || result=1
echo '# verify mode'
-$rtld --verify $rtld 2>&1 && rc=0 || rc=$?
+${test_wrapper} $rtld --verify $rtld 2>&1 && rc=0 || rc=$?
echo "# exit status $rc"
test $rc -eq 2 || result=1
echo '# trace mode'
-LD_TRACE_LOADED_OBJECTS=1 $rtld $rtld 2>&1 && rc=0 || rc=$?
+${test_wrapper_env} LD_TRACE_LOADED_OBJECTS=1 \
+ $rtld $rtld 2>&1 && rc=0 || rc=$?
echo "# exit status $rc"
test $rc -eq 0 || result=1