diff mbox series

[3/4] generic/600: Fix this test on xfs with older quota-tools

Message ID 20211011075552.196688-4-anju@linux.vnet.ibm.com (mailing list archive)
State New, archived
Headers show
Series Random fixes for xfstest | expand

Commit Message

Anju T Sudhakar Oct. 11, 2021, 7:55 a.m. UTC
For xfs, we need quota-tools containing commit be96da2353669d ("quota-tools:
Set FS_DQ_TIMER_MASK for individual xfs grace times"), to run this test.
Otherwise the test fails on xfs. Check the quota-tools before running
the test.

Signed-off-by: Anju T Sudhakar <anju@linux.vnet.ibm.com>
---
 tests/generic/600 | 8 ++++++++
 1 file changed, 8 insertions(+)
diff mbox series

Patch

diff --git a/tests/generic/600 b/tests/generic/600
index a4233ecc..c8dc1bd5 100755
--- a/tests/generic/600
+++ b/tests/generic/600
@@ -10,6 +10,9 @@ 
 # This test only exercises user quota because it's not known whether the
 # filesystem can set individual grace timers for each quota type
 #
+# For xfs, you need a quota-tools containing commit be96da2353669d to
+# run this test properly- 4.06 should do.
+
 . ./common/preamble
 _begin_fstest auto quick quota
 
@@ -24,6 +27,11 @@  _require_quota
 _require_user
 _require_setquota_project
 
+version=$(setquota -V | head -n1 | cut -d" " -f4)
+if [ "$FSTYP" = "xfs" ] && [ "$version" \< "4.06" ];then
+	_notrun "This test requires quota-tools 4.06 or greater"
+fi
+
 _scratch_mkfs >$seqres.full 2>&1
 _qmount_option "usrquota"
 _qmount