generic/506: mount scratch fs before testing for prjquota presence
authorDarrick J. Wong <darrick.wong@oracle.com>
Wed, 24 Jul 2019 15:55:43 +0000 (08:55 -0700)
committerEryu Guan <guaneryu@gmail.com>
Sun, 28 Jul 2019 11:47:49 +0000 (19:47 +0800)
On XFS, the _require_prjquota helper takes a path to a block device,
but (unintuitively) requires the block device to be mounted for the
detection to work properly.  Fix the detection code in generic/506.

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>
common/quota
tests/generic/506

index 3f46eb1942760c61edfb1c3fd1cdc07453312b2c..659c6219541149613e655737a11926bd529f70c2 100644 (file)
@@ -68,7 +68,8 @@ _require_xfs_quota_foreign()
 }
 
 #
-# checks that the project quota support in the kernel is enabled.
+# Checks that the project quota support in the kernel is enabled.
+# The device must be mounted for detection to work properly.
 #
 _require_prjquota()
 {
index 7002c00cc799f5378e85cef72c270b040faef043..e8d0ca241dc35a7ecfe37629a573152ea71e5da9 100755 (executable)
@@ -51,7 +51,9 @@ _require_scratch_shutdown
 
 _scratch_mkfs >/dev/null 2>&1
 _require_metadata_journaling $SCRATCH_DEV
+_scratch_mount
 _require_prjquota $SCRATCH_DEV
+_scratch_unmount
 
 testfile=$SCRATCH_MNT/testfile