FS/XFS testing framework
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Zorro Lang <zlang@kernel.org>
Cc: fstests@vger.kernel.org, Luis Chamberlain <mcgrof@kernel.org>
Subject: Re: [PATCH v2] fstests: fix _require_debugfs and call it properly
Date: Fri, 10 May 2024 08:22:13 -0700	[thread overview]
Message-ID: <20240510152213.GI360908@frogsfrogsfrogs> (raw)
In-Reply-To: <20240510042945.1237711-1-zlang@kernel.org>

On Fri, May 10, 2024 at 12:29:45PM +0800, Zorro Lang wrote:
> The old _require_debugfs helper doesn't work now, fix it to check
> a system supports debugfs. And then call this helper in cases which
> need $DEBUGFS_MNT.
> 
> Signed-off-by: Zorro Lang <zlang@kernel.org>

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

--D

> ---
> 
> V2 remove the changes on xfs/499, will do it in another patch.
> 
> Thanks,
> Zorro
> 
>  common/rc       | 10 ++++++++--
>  tests/btrfs/150 |  1 +
>  tests/ceph/001  |  2 +-
>  3 files changed, 10 insertions(+), 3 deletions(-)
> 
> diff --git a/common/rc b/common/rc
> index 56f1afb6..6f0bdf60 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -2978,8 +2978,14 @@ _require_sparse_files()
>  
>  _require_debugfs()
>  {
> -    #boot_params always present in debugfs
> -    [ -d "$DEBUGFS_MNT/boot_params" ] || _notrun "Debugfs not mounted"
> +	local type
> +
> +	if [ -d "$DEBUGFS_MNT" ];then
> +		type=$(findmnt -rncv -T $DEBUGFS_MNT -S debugfs -o FSTYPE)
> +		[ "$type" = "debugfs" ] && return 0
> +	fi
> +
> +	_notrun "Cannot find debugfs on $DEBUGFS_MNT"
>  }
>  
>  #
> diff --git a/tests/btrfs/150 b/tests/btrfs/150
> index a02bdafc..fd386d92 100755
> --- a/tests/btrfs/150
> +++ b/tests/btrfs/150
> @@ -17,6 +17,7 @@ _begin_fstest auto quick dangerous read_repair compress
>  . ./common/fail_make_request
>  
>  _supported_fs btrfs
> +_require_debugfs
>  _require_scratch
>  _require_fail_make_request
>  _require_scratch_dev_pool 2
> diff --git a/tests/ceph/001 b/tests/ceph/001
> index 060c4c45..79a5f58a 100755
> --- a/tests/ceph/001
> +++ b/tests/ceph/001
> @@ -20,7 +20,7 @@ _begin_fstest auto quick copy_range
>  
>  # real QA test starts here
>  _supported_fs ceph
> -
> +_require_debugfs
>  _require_xfs_io_command "copy_range"
>  _exclude_test_mount_option "test_dummy_encryption"
>  _require_attrs
> -- 
> 2.44.0
> 
> 

      reply	other threads:[~2024-05-10 15:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-10  4:29 [PATCH v2] fstests: fix _require_debugfs and call it properly Zorro Lang
2024-05-10 15:22 ` Darrick J. Wong [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240510152213.GI360908@frogsfrogsfrogs \
    --to=djwong@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=mcgrof@kernel.org \
    --cc=zlang@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox