summary refs log tree commit diff
path: root/elf/tst-rtld-load-self.sh
diff options
context:
space:
mode:
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