[Vserver] Updates to testfs.sh script

From: micah <micah_at_riseup.net>
Date: Tue 04 Oct 2005 - 19:49:50 BST
Message-ID: <4342CECE.2060002@riseup.net>

Please find attached a diff against testfs.sh-0.09. This diff adds the
-c option to disable color output and also adds the -q option to
mkfs.jfs because without this mkfs.jfs asks if you want to continue
causing the test to fail erroneously.

micah

--- testfs.sh-0.09 2005-09-19 04:27:43.000000000 -0400
+++ testfs.sh-0.10 2005-10-04 14:46:52.000000000 -0400
@@ -1,7 +1,5 @@
 #!/bin/bash
 
-eR='\e[31m';eG='\e[32m';eY='\e[33m';eB='\e[34m';eN='\e[0m'
-
 function eecho () {
     C=$1; shift
     echo -e "$C$*$eN"
@@ -360,7 +358,7 @@
 nfsopt="vers=3,hard,intr,tcp,sync"
 
 
-while getopts ":hlotvxD:F:M:N:O:" option; do
+while getopts ":hlotvxcD:F:M:N:O:" option; do
   case $option in
     h) # help
         cat << EOF
@@ -377,6 +375,7 @@
   -M <mnt> mount point [$MNT]
   -N <src> nfs source [$NFS]
   -O <opt> nfs options [$nfsopt]
+ -c disable color output
 
 examples:
   
@@ -402,6 +401,9 @@
     t) # terse output
         terse=1
         ;;
+ c) # disable color output
+ color="no"
+ ;;
     D) # device
         DEV="$OPTARG"
         ;;
@@ -421,6 +423,10 @@
 done
 shift $(($OPTIND - 1))
 
+if [ "$color" != "no" ]; then
+ eR='\e[31m';eG='\e[32m';eY='\e[33m';eB='\e[34m';eN='\e[0m'
+fi
+
 outdev="/dev/null"
 [ $verbose -gt 1 ] && outdev="/dev/stdout"
 errdev="/dev/null"
@@ -454,7 +460,7 @@
     echo "---"
     eecho $eY "testing $fs filesystem ..."
     case $fs in
- ext2|ext3|xfs|jfs)
+ ext2|ext3|xfs)
         mkfs.$fs $DEV 1>$outdev 2>$errdev
         rc=$?; ececho $rc "[000]"
         [ $rc -gt 0 ] && echo "($fs format failed)" && continue
@@ -466,6 +472,12 @@
         [ $rc -gt 0 ] && echo "(reiser format failed)" && continue
         do_test reiser "attrs,$mntopt"
         ;;
+ jfs*)
+ mkfs.jfs -q $DEV 1>$outdev 2>$errdev
+ rc=$?; ececho $rc "[000]"
+ [ $rc -gt 0 ] && echo "($fs format failed)" && continue
+ do_test "$fs" "$mntopt"
+ ;;
     nfs)
         do_test nfs "$nfsopt,$mntopt"
         ;;

_______________________________________________
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver

Received on Tue Oct 4 19:49:58 2005
[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Tue 04 Oct 2005 - 19:50:02 BST by hypermail 2.1.8