public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
From: David Disseldorp <ddiss@suse.de>
To: Liu Yiding <liuyd.fnst@fujitsu.com>
Cc: <fstests@vger.kernel.org>
Subject: Re: [PATCH] common/rc: Fix _require_batched_discard to skip test correctly
Date: Wed, 1 Jun 2022 09:49:57 +0200	[thread overview]
Message-ID: <20220601094957.02d94400@suse.de> (raw)
In-Reply-To: <20220531071252.30517-1-liuyd.fnst@fujitsu.com>

On Tue, 31 May 2022 15:12:52 +0800, Liu Yiding wrote:

> xfstest commit ee264b3f ("common/rc: Modify _require_batched_discard to
> improve test coverage") changed the way of determing if discard is
> supported by checking whether fstrim output contains "not supported"
> keywords.
> 
> On RHEL, fstrim output below info when discard is not supported
> "fstrim: /mnt/share0/: FITRIM ioctl failed: Function not implemented"
> 
> Supplyment unsupported keywords to _require_batched_discard.
> 
> Signed-off-by: Liu Yiding <liuyd.fnst@fujitsu.com>
> ---
>  common/rc | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/common/rc b/common/rc
> index 70a15f9c..eae9afc6 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -4008,7 +4008,7 @@ _require_batched_discard()
>  	fi
>  	_require_fstrim
>  
> -	grep -q "not supported" <($FSTRIM_PROG $1 2>&1)
> +	grep -q -E "not supported|not implemented" <($FSTRIM_PROG $1 2>&1)
>  	if [ "$?" = "0" ]
>  	then
>  		_notrun "FITRIM not supported on $1"

Looks fine.
Reviewed-by: David Disseldorp <ddiss@suse.de>

      reply	other threads:[~2022-06-01  7:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-31  7:12 [PATCH] common/rc: Fix _require_batched_discard to skip test correctly Liu Yiding
2022-06-01  7:49 ` David Disseldorp [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=20220601094957.02d94400@suse.de \
    --to=ddiss@suse.de \
    --cc=fstests@vger.kernel.org \
    --cc=liuyd.fnst@fujitsu.com \
    /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