Fix project quota checks
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Thu, 9 Sep 2010 17:47:35 +0000 (19:47 +0200)
committerChristoph Hellwig <hch@lst.de>
Sat, 11 Sep 2010 22:34:47 +0000 (19:34 -0300)
Project quota check in few tests should check SCRATCH_DEV and not
TEST_DEV. Fix that by making possible to pass device to be checked to
_require_prjquota().

Due to the problem tests didn't run with "Installed kernel does not
support project quotas" error.

Signed-off-by: Arkadiusz Miśkiewicz <arekm@maven.pl>
Signed-off-by: Christoph Hellwig <hch@lst.de>
106
107
108
common.quota

diff --git a/106 b/106
index 5bff660610b5ec4e17506650bcdb1a27c4be8cd7..82786917b1f6d6097f336ae2820c5ee89ea73e22 100755 (executable)
--- a/106
+++ b/106
@@ -43,7 +43,6 @@ _supported_fs xfs
 _supported_os Linux #IRIX
 _require_scratch
 _require_xfs_quota
-_require_prjquota
 
 # real QA test starts here
 _scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
@@ -57,8 +56,10 @@ else
        export MOUNT_OPTIONS="$MOUNT_OPTIONS -o sync"
 fi
 
-# initial populate
 _qmount
+_require_prjquota $SCRATCH_DEV
+
+# initial populate
 target=$SCRATCH_MNT/target
 $FSSTRESS_PROG -s 0xdeed -m8 -w -p4 -n1000 $FSSTRESS_AVOID -d $target
 $FSSTRESS_PROG -s 0xdeed -m8 -z -p4 -n1000 -fsetxattr=500 -fchown=500 -d $target
diff --git a/107 b/107
index c270f0e7e3f1709e0f661749bbb3e24ae18c8beb..74403e6bbdc344415909d598d090ea8df3f220d3 100755 (executable)
--- a/107
+++ b/107
@@ -55,7 +55,6 @@ _supported_fs xfs
 _supported_os Linux #IRIX
 _require_scratch
 _require_xfs_quota
-_require_prjquota
 
 # real QA test starts here
 _scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
@@ -70,7 +69,7 @@ else
 fi
 
 _qmount
-src/feature -p $SCRATCH_MNT && _notrun "Cannot run without project quota"
+_require_prjquota $SCRATCH_DEV
 
 echo "### create projects file"
 rm -f $tmp.projects
diff --git a/108 b/108
index b429bc68a16c244e389267bd3eec720f42bf0389..c1fb3d3178816ce1ab30fbf564ad4137c1ead031 100755 (executable)
--- a/108
+++ b/108
@@ -50,7 +50,6 @@ _supported_fs xfs
 _supported_os Linux #IRIX
 _require_scratch
 _require_xfs_quota
-_require_prjquota
 
 test_files()
 {
@@ -86,6 +85,10 @@ test_accounting()
        xfs_quota -c "quota -hnr -$type $id" $QARGS | filter_scratch
 }
 
+export MOUNT_OPTIONS="-opquota"
+_require_prjquota
+_qmount
+
 # real QA test starts here
 rm -f $tmp.projects $seq.full
 umount $SCRATCH_DEV 2>/dev/null
index 868e563927febb5f0f16efd9be74215639922806..1520df1fb420b5c1b599bc261ada7f9f1eca1cf5 100644 (file)
@@ -50,7 +50,8 @@ _require_xfs_quota()
 #
 _require_prjquota()
 {
-    src/feature -p $TEST_DEV
+    [ -n "$1" ] && _dev="$1" || _dev="$TEST_DEV"
+    src/feature -p $_dev
     [ $? -ne 0 ] && _notrun "Installed kernel does not support project quotas"
 }