]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
XFS Quota tests were unaware of usrquota and grpquota mount options
authorBrad Scarlett <brads@sgi .com>
Tue, 2 Dec 2008 04:56:16 +0000 (04:56 +0000)
committerBrad Scarlett <brads@sgi .com>
Tue, 2 Dec 2008 04:56:16 +0000 (04:56 +0000)
Merge of master-melb:xfs-cmds:32619a by kenmcd.

  Fix 134 so it is notrun if grpquota mount option is detected.

134
common.quota

diff --git a/134 b/134
index 10c16eeb61251e1d5f646b0500641340166805a3..5167ddb55bb717cd1e220000cd547df1e53b73c0 100755 (executable)
--- a/134
+++ b/134
@@ -54,10 +54,13 @@ _require_scratch
 _scratch_mkfs_xfs >/dev/null 2>&1
 
 #if pquota's already in mount options then we dont need to enable
-[ `echo $MOUNT_OPTIONS | grep -c gquota` -eq 0 -a `echo $MOUNT_OPTIONS | grep -c gquota` -eq 0 ] &&\
-    EXTRA_MOUNT_OPTIONS="-o pquota"
-[ `echo $MOUNT_OPTIONS | grep -c gquota` -gt 0 -o `echo $MOUNT_OPTIONS | grep -c gquota` -gt 0 ] &&\
+
+# we can't run with group quotas
+if ( `echo $MOUNT_OPTIONS | grep -q gquota` || `echo $MOUNT_OPTIONS | grep -q grpquota` )
+then
     _notrun "Can't run with group quotas enabled"
+fi
+EXTRA_MOUNT_OPTIONS="-o pquota"
 
 if ! _scratch_mount "$EXTRA_MOUNT_OPTIONS" >$tmp.out 2>&1
 then
index 51d9586d481d8235d220bf2d0301456559d66591..0072a9e20e063634481a33d5ec48c58a10767050 100644 (file)
@@ -167,7 +167,9 @@ _qmount_option()
        # thanks to "quota" which will match with "uquota" and "gquota" etc.
        export MOUNT_OPTIONS=`echo $MOUNT_OPTIONS \
        | sed   -e 's/uquota/QUOTA/g'      \
+               -e 's/usrquota/QUOTA/g'    \
                -e 's/gquota/QUOTA/g'      \
+               -e 's/grpquota/QUOTA/g'    \
                -e 's/pquota/QUOTA/g'      \
                -e 's/quota/QUOTA/g'       \
                -e 's/uqnoenforce/QUOTA/g' \