public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Sun Ke <sunke32@huawei.com>
Cc: fstests@vger.kernel.org, guan@eryu.me
Subject: Re: [PATCH] xfs: fix check of whether the mkfs fail
Date: Fri, 28 May 2021 09:30:33 -0700	[thread overview]
Message-ID: <20210528163033.GO202144@locust> (raw)
In-Reply-To: <20210528094046.1920724-1-sunke32@huawei.com>

On Fri, May 28, 2021 at 05:40:46AM -0400, Sun Ke wrote:
> The return value ("$?") is always the status of the last command in the pipe.
> 
> Signed-off-by: Sun Ke <sunke32@huawei.com>

Heh, whooops.  Thanks for fixing this!
Reviewed-by: Darrick J. Wong <djwong@kernel.org>

--D

> ---
>  tests/xfs/070 | 3 ++-
>  tests/xfs/448 | 3 ++-
>  2 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/xfs/070 b/tests/xfs/070
> index 8249c5c01cfd..9ef1e786a0a5 100755
> --- a/tests/xfs/070
> +++ b/tests/xfs/070
> @@ -84,7 +84,8 @@ _supported_fs xfs
>  _require_scratch_nocheck
>  _require_command "$KILLALL_PROG" killall
>  
> -_scratch_mkfs | _filter_mkfs > /dev/null 2> $tmp.mkfs || _fail "mkfs failed"
> +_scratch_mkfs | _filter_mkfs > /dev/null 2> $tmp.mkfs
> +test "${PIPESTATUS[0]}" -eq 0 || _fail "mkfs failed"
>  
>  . $tmp.mkfs # import agcount
>  
> diff --git a/tests/xfs/448 b/tests/xfs/448
> index 493d303e62cf..a11698fa2d8c 100755
> --- a/tests/xfs/448
> +++ b/tests/xfs/448
> @@ -47,7 +47,8 @@ _require_no_xfs_bug_on_assert
>  rm -f "$seqres.full"
>  
>  # Format and mount
> -_scratch_mkfs | _filter_mkfs > $seqres.full 2> $tmp.mkfs || _fail "mkfs failed"
> +_scratch_mkfs | _filter_mkfs > $seqres.full 2> $tmp.mkfs
> +test "${PIPESTATUS[0]}" -eq 0 || _fail "mkfs failed"
>  _scratch_mount
>  
>  # Get directory block size
> -- 
> 2.25.4
> 

  reply	other threads:[~2021-05-28 16:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-28  9:40 [PATCH] xfs: fix check of whether the mkfs fail Sun Ke
2021-05-28 16:30 ` Darrick J. Wong [this message]
2021-05-29  3:44   ` Sun Ke

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=20210528163033.GO202144@locust \
    --to=djwong@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=guan@eryu.me \
    --cc=sunke32@huawei.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