INN commit: trunk/tests/util (inndf.t)
INN Commit
rra at isc.org
Thu Aug 1 18:51:27 UTC 2013
Date: Thursday, August 1, 2013 @ 11:51:26
Author: iulius
Revision: 9522
fix the test suite for inndf
When the filesystem name is lengthy, df may output two lines.
"df -k -P ." and "df -i -P ." (-P for a POSIX result) are
not available on all systems, so we just rewrite the df output
on one line.
$ df -k .
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/gcc12-home
546781616 413506476 133275140 76% /home
Modified:
trunk/tests/util/inndf.t
---------+
inndf.t | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
Modified: inndf.t
===================================================================
--- inndf.t 2013-07-31 17:27:33 UTC (rev 9521)
+++ inndf.t 2013-08-01 18:51:26 UTC (rev 9522)
@@ -34,9 +34,9 @@
# Make sure df -k works, or we have to just skip this test.
if df -k . > /dev/null 2>&1 ; then
if [ -z "${UNAME_SYSTEM##IRIX[[:alnum:]]*}" ] ; then
- real=`df -k . | sed 1d | awk '{ print $5 }'`
+ real=`df -k . | sed 1d | tr -d '\r\n' | awk '{ print $5 }'`
else
- real=`df -k . | sed 1d | awk '{ print $4 }'`
+ real=`df -k . | sed 1d | tr -d '\r\n' | awk '{ print $4 }'`
fi
try=`$inndf .`
diff=`expr "$real" - "$try"`
@@ -55,12 +55,12 @@
# Linux.
if df -i . > /dev/null 2>&1 ; then
if [ -z "${UNAME_SYSTEM##IRIX[[:alnum:]]*}" ] ; then
- real=`df -i . | sed 1d | awk '{ print $8 }'`
+ real=`df -i . | sed 1d | tr -d '\r\n' | awk '{ print $8 }'`
elif [ "${UNAME_SYSTEM}" = "FreeBSD" ] \
|| [ "${UNAME_SYSTEM}" = "NetBSD" ] ; then
- real=`df -i . | sed 1d | awk '{ print $7 }'`
+ real=`df -i . | sed 1d | tr -d '\r\n' | awk '{ print $7 }'`
else
- real=`df -i . | sed 1d | awk '{ print $4 }'`
+ real=`df -i . | sed 1d | tr -d '\r\n' | awk '{ print $4 }'`
fi
try=`$inndf -i .`
if [ "$try" = 4294967295 ] ; then
More information about the inn-committers
mailing list