All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfs: Add the appropriate _require helper
@ 2021-05-17  3:34 Jinhui Huang
  2021-05-17 15:50 ` Darrick J. Wong
  0 siblings, 1 reply; 2+ messages in thread
From: Jinhui Huang @ 2021-05-17  3:34 UTC (permalink / raw)
  To: fstests; +Cc: Jinhui Huang

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>
---
 tests/xfs/162 | 2 ++
 tests/xfs/495 | 4 +++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/tests/xfs/162 b/tests/xfs/162
index e3257a3..c7c72d1 100755
--- a/tests/xfs/162
+++ b/tests/xfs/162
@@ -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
 
diff --git a/tests/xfs/495 b/tests/xfs/495
index 6292b5e..a3b4fb2 100755
--- a/tests/xfs/495
+++ b/tests/xfs/495
@@ -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
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] xfs: Add the appropriate _require helper
  2021-05-17  3:34 [PATCH] xfs: Add the appropriate _require helper Jinhui Huang
@ 2021-05-17 15:50 ` Darrick J. Wong
  0 siblings, 0 replies; 2+ messages in thread
From: Darrick J. Wong @ 2021-05-17 15:50 UTC (permalink / raw)
  To: Jinhui Huang; +Cc: fstests

On Mon, May 17, 2021 at 11:34:13AM +0800, Jinhui Huang wrote:
> 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>

These targeted fixes ought to be in separate patches, but otherwise they
look correct.

Reviewed-by: Darrick J. Wong <djwong@kernel.org>

--D

> ---
>  tests/xfs/162 | 2 ++
>  tests/xfs/495 | 4 +++-
>  2 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/xfs/162 b/tests/xfs/162
> index e3257a3..c7c72d1 100755
> --- a/tests/xfs/162
> +++ b/tests/xfs/162
> @@ -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
>  
> diff --git a/tests/xfs/495 b/tests/xfs/495
> index 6292b5e..a3b4fb2 100755
> --- a/tests/xfs/495
> +++ b/tests/xfs/495
> @@ -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
> -- 
> 1.8.3.1
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-17 15:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-17  3:34 [PATCH] xfs: Add the appropriate _require helper Jinhui Huang
2021-05-17 15:50 ` Darrick J. Wong

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.