* [PATCH] xfs: fix check of whether the mkfs fail
@ 2021-05-28 9:40 Sun Ke
2021-05-28 16:30 ` Darrick J. Wong
0 siblings, 1 reply; 3+ messages in thread
From: Sun Ke @ 2021-05-28 9:40 UTC (permalink / raw)
To: fstests, guan, djwong; +Cc: sunke32
The return value ("$?") is always the status of the last command in the pipe.
Signed-off-by: Sun Ke <sunke32@huawei.com>
---
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] xfs: fix check of whether the mkfs fail
2021-05-28 9:40 [PATCH] xfs: fix check of whether the mkfs fail Sun Ke
@ 2021-05-28 16:30 ` Darrick J. Wong
2021-05-29 3:44 ` Sun Ke
0 siblings, 1 reply; 3+ messages in thread
From: Darrick J. Wong @ 2021-05-28 16:30 UTC (permalink / raw)
To: Sun Ke; +Cc: fstests, guan
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
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] xfs: fix check of whether the mkfs fail
2021-05-28 16:30 ` Darrick J. Wong
@ 2021-05-29 3:44 ` Sun Ke
0 siblings, 0 replies; 3+ messages in thread
From: Sun Ke @ 2021-05-29 3:44 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: fstests, guan
在 2021/5/29 0:30, Darrick J. Wong 写道:
> 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
Thanks for your review.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-05-29 3:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-28 9:40 [PATCH] xfs: fix check of whether the mkfs fail Sun Ke
2021-05-28 16:30 ` Darrick J. Wong
2021-05-29 3:44 ` Sun Ke
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.