about summary refs log tree commit diff
path: root/posix/tst-getconf.sh
diff options
context:
space:
mode:
Diffstat (limited to 'posix/tst-getconf.sh')
-rw-r--r--posix/tst-getconf.sh19
1 files changed, 14 insertions, 5 deletions
diff --git a/posix/tst-getconf.sh b/posix/tst-getconf.sh
index 6b5c433b8a..9630ebf4ef 100644
--- a/posix/tst-getconf.sh
+++ b/posix/tst-getconf.sh
@@ -2,7 +2,18 @@
 
 common_objpfx=$1; shift
 elf_objpfx=$1; shift
-rtld_installed_name=$1; shift
+if [ $# -eq 0 ]; then
+  # Static case.
+  runit() {
+    "$@"
+  }
+else
+  rtld_installed_name=$1; shift
+  runit() {
+    ${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} "$@"
+  }
+fi
+
 logfile=$common_objpfx/posix/tst-getconf.out
 
 # Since we use `sort' we must make sure to use the same locale everywhere.
@@ -15,8 +26,7 @@ rm -f $logfile
 result=0
 while read name; do
   echo -n "getconf $name: " >> $logfile
-  ${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} \
-  ${common_objpfx}posix/getconf "$name" 2>> $logfile >> $logfile
+  runit ${common_objpfx}posix/getconf "$name" 2>> $logfile >> $logfile
   if test $? -ne 0; then
     echo "*** $name FAILED" >> $logfile
     result=1
@@ -194,8 +204,7 @@ EOF
 
 while read name; do
   echo -n "getconf $name /: " >> $logfile
-  ${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} \
-  ${common_objpfx}posix/getconf "$name" / 2>> $logfile >> $logfile
+  runit ${common_objpfx}posix/getconf "$name" / 2>> $logfile >> $logfile
   if test $? -ne 0; then
     echo "*** $name FAILED" >> $logfile
     result=1