INN commit: trunk/tests/util (inndf.t)

INN Commit Russ_Allbery at isc.org
Sat Sep 22 09:52:31 UTC 2007


    Date: Saturday, September 22, 2007 @ 02:52:30
  Author: iulius
Revision: 7693

df has special output on FreeBSD:

    # df -i .
    Filesystem  1K-blocks     Used   Avail Capacity iused   ifree %iused  Mounted on
    /dev/da5s1d  69319818 55460910 8313324    87%  131509 8841801    1%   /

Maybe on other systems too (but, well, let's wait for someone's
complaining about the test suite not working on its system).

Modified:
  trunk/tests/util/inndf.t

---------+
 inndf.t |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

Modified: inndf.t
===================================================================
--- inndf.t	2007-09-22 09:34:13 UTC (rev 7692)
+++ inndf.t	2007-09-22 09:52:30 UTC (rev 7693)
@@ -3,6 +3,8 @@
 #
 # Test suite for inndf.
 
+UNAME_SYSTEM=`(uname -s) 2>/dev/null`
+
 # The count starts at 1 and is updated each time ok is printed.  printcount
 # takes "ok" or "not ok".
 count=1
@@ -48,7 +50,11 @@
 # is what Reiser and some other file systems return in some versions of
 # Linux.
 if df -i . > /dev/null 2>&1 ; then
-    real=`df -i . | sed 1d | awk '{ print $4 }'`
+    if [ "${UNAME_SYSTEM}" = "FreeBSD" ] ; then
+        real=`df -i . | sed 1d | awk '{ print $7 }'`
+    else
+        real=`df -i . | sed 1d | awk '{ print $4 }'`
+    fi
     try=`$inndf -i .`
     if [ "$try" = 4294967295 ] ; then
         printcount "ok"



More information about the inn-committers mailing list