[PATCH 8/7] xfs/152: avoid failure when quotaoff is not supported

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



From: Darrick J. Wong <djwong@xxxxxxxxxx>

Switch the test that removes the quota files to just disable enforcement
and then unmount the file system as disabling quota accounting is about
to go away.

Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx>
---
 tests/xfs/152     |   20 +++++++++++++-------
 tests/xfs/152.out |    4 ----
 2 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/tests/xfs/152 b/tests/xfs/152
index de85f48c..129d9c06 100755
--- a/tests/xfs/152
+++ b/tests/xfs/152
@@ -195,8 +195,9 @@ test_enable()
 test_off()
 {
 	echo "checking off command (type=$type)"
-	$XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \
-			-c "off -$type -v" $SCRATCH_MNT | _filter_scratch
+	_scratch_unmount
+	_qmount_option ""
+	_qmount
 }
 
 test_remove()
@@ -257,6 +258,8 @@ qmount_idmapped()
 
 test_xfs_quota()
 {
+	local quota_options="$1"
+
 	# init quota
 	echo "init quota limit and timer, and dump it"
 	if [ "$idmapped" -eq 1 ]; then
@@ -310,7 +313,10 @@ test_xfs_quota()
 	echo ; test_state
 	echo ; test_remove
 	echo ; test_report -N
-	echo "quota remount"; qmount_idmapped
+	echo "quota remount"
+	_qmount_option "$quota_options"
+	_qmount
+	qmount_idmapped
 	echo ; test_report -N
 
 	# restore test
@@ -329,7 +335,7 @@ id=$uqid
 id2=$uqid2
 idmapped=0
 qmount_idmapped
-test_xfs_quota
+test_xfs_quota "uquota,sync"
 
 echo "----------------------- uquota,sync,idmapped ---------------------------"
 wipe_scratch
@@ -339,7 +345,7 @@ id=$uqid
 id2=$uqid2
 idmapped=1
 qmount_idmapped
-test_xfs_quota
+test_xfs_quota "uquota,sync"
 
 echo "----------------------- gquota,sync,unmapped ---------------------------"
 wipe_scratch
@@ -349,7 +355,7 @@ id=$gqid
 id2=$gqid2
 idmapped=0
 qmount_idmapped
-test_xfs_quota
+test_xfs_quota "gquota,sync"
 
 echo "----------------------- gquota,sync,idmapped ---------------------------"
 wipe_scratch
@@ -359,7 +365,7 @@ id=$gqid
 id2=$gqid2
 idmapped=1
 qmount_idmapped
-test_xfs_quota
+test_xfs_quota "gquota,sync"
 
 wipe_mounts
 
diff --git a/tests/xfs/152.out b/tests/xfs/152.out
index 1fc71fb9..b663b096 100644
--- a/tests/xfs/152.out
+++ b/tests/xfs/152.out
@@ -132,7 +132,6 @@ checking quota command (type=u)
 SCRATCH_DEV 1024 102400 102400 00 [--------] 15 100 100 00 [--------] SCRATCH_MNT
 
 checking off command (type=u)
-User quota are not enabled on SCRATCH_DEV
 
 checking state command (type=u)
 
@@ -296,7 +295,6 @@ checking quota command (type=u)
 SCRATCH_DEV 1024 102400 102400 00 [--------] 15 100 100 00 [--------] SCRATCH_MNT
 
 checking off command (type=u)
-User quota are not enabled on SCRATCH_DEV
 
 checking state command (type=u)
 
@@ -460,7 +458,6 @@ checking quota command (type=g)
 SCRATCH_DEV 1024 102400 102400 00 [--------] 15 100 100 00 [--------] SCRATCH_MNT
 
 checking off command (type=g)
-Group quota are not enabled on SCRATCH_DEV
 
 checking state command (type=g)
 
@@ -624,7 +621,6 @@ checking quota command (type=g)
 SCRATCH_DEV 1024 102400 102400 00 [--------] 15 100 100 00 [--------] SCRATCH_MNT
 
 checking off command (type=g)
-Group quota are not enabled on SCRATCH_DEV
 
 checking state command (type=g)
 



[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux