mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
xfs: fix check of whether the mkfs fail
The return value ("$?") is always the status of the last command in
the pipe.
Signed-off-by: Sun Ke <sunke32@huawei.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
This commit is contained in:
+2
-1
@@ -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
|
||||
|
||||
|
||||
+2
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user