xfs: Add the appropriate _require helper
authorJinhui Huang <huangjh.jy@cn.fujitsu.com>
Mon, 17 May 2021 03:34:13 +0000 (11:34 +0800)
committerEryu Guan <guaneryu@gmail.com>
Sun, 23 May 2021 07:57:03 +0000 (15:57 +0800)
1.xfs/162 uses xfs_db -c 'fuzz' but forgets to check if the feature
is supported. This will cause the case to fail on a system without
fuzz support. so we add _require to check if the fuzz is supported.

2.xfs/495 use _require_scratch_xfs_fuzz_fields to check the features
required by field fuzzing, but some of the features are not used in
this case like xfs_scrub, this will cause the case to skip on a system
without xfs_scrub support, even if the features being uesd are supported.
So we just need to use _require to check the features being used.

Signed-off-by: Jinhui Huang <huangjh.jy@cn.fujitsu.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/xfs/162
tests/xfs/495

index e3257a3ce8c52e6fd91050e8bd584357d2793b09..c7c72d131637146303d4a0a7d73bed44d36e792d 100755 (executable)
@@ -31,6 +31,8 @@ _cleanup()
 # real QA test starts here
 _supported_fs xfs
 _require_scratch_nocheck
+_require_populate_commands
+_require_xfs_db_command "fuzz"
 
 rm -f $seqres.full
 
index 6292b5e1b3ed8ee026cc0e72edfb7aac9c9261b5..a3b4fb2c8630bedb326e804710b228dca579e885 100755 (executable)
@@ -32,7 +32,9 @@ _cleanup()
 
 # real QA test starts here
 _supported_fs xfs
-_require_scratch_xfs_fuzz_fields
+_require_scratch_nocheck
+_require_populate_commands
+_require_xfs_db_command "fuzz"
 
 echo "Format and populate"
 _scratch_populate_cached nofill > $seqres.full 2>&1