From 0aee3966d647af55231db535b61553531f64d02e Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Wed, 25 Nov 2009 15:56:28 +0100 Subject: sync confname, environments with glibc Plus related synch. Add a testcase for the sysconf variables based on the one from glibc Signed-off-by: Bernhard Reutner-Fischer --- test/unistd/tst-getconf.sh | 238 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 238 insertions(+) create mode 100644 test/unistd/tst-getconf.sh (limited to 'test/unistd/tst-getconf.sh') diff --git a/test/unistd/tst-getconf.sh b/test/unistd/tst-getconf.sh new file mode 100644 index 000000000..bad98a007 --- /dev/null +++ b/test/unistd/tst-getconf.sh @@ -0,0 +1,238 @@ +#! /bin/sh + +basedir="." + +# make sure to use the same locale everywhere. +LC_ALL=C +export LC_ALL +LANG=C +export LANG + +for suffix in _glibc '' +do +binary=$basedir/getconf$suffix +logfile=$basedir/tst-getconf$suffix.out +rm -f $logfile + +result=0 +while read name; do + case "$name" in + "#"*) continue;; + esac + echo -n "getconf $name: " >> $logfile + $binary "$name" 2>> $logfile >> $logfile + if test $? -ne 0; then + echo "*** $name FAILED" >> $logfile + result=1 + fi +done <> $logfile + $binary "$name" / 2>> $logfile >> $logfile + if test $? -ne 0; then + echo "*** $name FAILED" >> $logfile + result=1 + fi +done <