fstests: disable quotas before running test
authorDarrick J. Wong <darrick.wong@oracle.com>
Wed, 24 Jul 2019 15:56:10 +0000 (08:56 -0700)
committerEryu Guan <guaneryu@gmail.com>
Sun, 28 Jul 2019 11:52:22 +0000 (19:52 +0800)
For all the tests which require that quotas be disabled, remove the
quota mount options before mounting the scratch filesystem.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/generic/384
tests/xfs/030
tests/xfs/033
tests/xfs/065

index b7c940d77bae247313cdb64027db2465f4e41ec4..33098a380e36ed83c6e0280fc6d209b07b72bcb5 100755 (executable)
@@ -37,8 +37,8 @@ _require_quota
 _require_xfs_quota_foreign
 _require_xfs_io_command "chproj"
 
-# we can't run with group quotas
-_exclude_scratch_mount_option "gquota" "grpquota"
+# we can't run with group quotas (on v4 xfs); the mount options for group
+# quotas will be filtered out by _qmount_option below.
 
 dir=$SCRATCH_MNT/project
 
index 5ed9962838ec4cd3ac8c956f9f33c79f1e0a20fc..10854c8aa7f3058391aa47f55c7f2fa3c0e0041b 100755 (executable)
@@ -28,6 +28,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 . ./common/rc
 . ./common/filter
 . ./common/repair
+. ./common/quota
 
 # nuke the superblock, AGI, AGF, AGFL; then try repair the damage
 #
@@ -65,6 +66,7 @@ if [ $? -ne 0 ]               # probably don't have a big enough scratch
 then
        _notrun "SCRATCH_DEV too small, results would be non-deterministic"
 else
+       _qmount_option noquota
        _scratch_mount
        src/feature -U $SCRATCH_DEV && \
                _notrun "UQuota are enabled, test needs controlled sb recovery"
index 5af0aefc1d3bb21da22c9292c1abc18423955ea9..75b44f38df1e3b0ca12e95b6b7e836b4101b31fa 100755 (executable)
@@ -28,6 +28,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 . ./common/rc
 . ./common/filter
 . ./common/repair
+. ./common/quota
 
 # nuke the root, rt bitmap, and rt summary inodes
 # 
@@ -80,6 +81,7 @@ _link_out_file_named $seqfull.out "$FEATURES"
        sed -e 's/ //g' -e 's/^/export /'`
 
 # check we won't get any quota inodes setup on mount
+_qmount_option noquota
 _scratch_mount
 src/feature -U $SCRATCH_DEV && \
        _notrun "UQuota are enabled, test needs controlled sb recovery"
index f09bd9473557f61633d37d08413445c4fbd14320..b153366669efa2bafb415114d4bf7f987a47a731 100755 (executable)
@@ -29,6 +29,7 @@ _cleanup()
 . ./common/rc
 . ./common/filter
 . ./common/dump
+. ./common/quota
 
 #
 # list recursively the directory
@@ -57,6 +58,7 @@ _require_scratch
 # so don't run it
 #
 _scratch_mkfs_xfs >> $seqres.full
+_qmount_option noquota
 _scratch_mount
 $here/src/feature -U $SCRATCH_DEV && \
        _notrun "UQuota enabled, test needs controlled xfsdump output"