xfstests: add --largefs check option
authorDave Chinner <dchinner@redhat.com>
Fri, 15 Mar 2013 11:53:20 +0000 (11:53 +0000)
committerRich Johnston <rjohnston@sgi.com>
Tue, 19 Mar 2013 20:16:13 +0000 (15:16 -0500)
Make it easier to check large filesystems quickly by adding a
--large-fs option to check to turn on shortcuts for large scratch
device filesystem testing.

Also, reject invalid command line options with a usage message.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Rich Johnston <rjohnston@sgi.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
common

diff --git a/common b/common
index 07232245b1fe6eb5a55d84c11796debc746d0d37..7d13078a5e583eb716be33dde8a097a135105dad 100644 (file)
--- a/common
+++ b/common
@@ -27,6 +27,35 @@ _setenvironment()
     export MSGVERB
 }
 
+usage()
+{
+    echo "Usage: $0 [options] [testlist]"'
+
+common options
+    -v                 verbose
+
+check options
+    -xfs                test XFS (default)
+    -udf                test UDF
+    -nfs                test NFS
+    -l                 line mode diff
+    -xdiff             graphical mode diff
+    -udiff             show unified diff (default)
+    -n                 show me, do not run tests
+    -q                 quick [deprecated]
+    -T                 output timestamps
+    -r                 randomize test order
+    --large-fs         optimise scratch device for large filesystems
+
+testlist options
+    -g group[,group...]        include tests from these groups
+    -x group[,group...]        exclude tests from these groups
+    NNN                        include test NNN
+    NNN-NNN            include test range (eg. 012-021)
+'
+           exit 0
+}
+
 here=`pwd`
 rm -f $here/$iam.out
 _setenvironment
@@ -117,30 +146,7 @@ s/ .*//p
     in
 
        -\? | -h | --help)      # usage
-           echo "Usage: $0 [options] [testlist]"'
-
-common options
-    -v                 verbose
-
-check options
-    -xfs                test XFS (default)
-    -udf                test UDF
-    -nfs                test NFS
-    -l                 line mode diff
-    -xdiff             graphical mode diff
-    -udiff             show unified diff (default)
-    -n                 show me, do not run tests
-    -q                 quick [deprecated]
-    -T                 output timestamps
-    -r                         randomize test order
-    
-testlist options
-    -g group[,group...]        include tests from these groups
-    -x group[,group...]        exclude tests from these groups
-    NNN                        include test NNN
-    NNN-NNN            include test range (eg. 012-021)
-'
-           exit 0
+           usage
            ;;
 
        -udf)   # -udf ... set FSTYP to udf
@@ -232,6 +238,15 @@ testlist options
            fi
            ;;
 
+       --large-fs)
+           export USE_BIG_LOOPFS=yes
+           xpand=false
+           ;;
+
+       -*)
+           usage
+           ;;
+
        *)
            start=$r
            end=$r