From: Darrick J. Wong Date: Wed, 19 May 2021 23:57:10 +0000 (-0700) Subject: xfs/178: fix mkfs success test X-Git-Tag: v2022.05.01~394 X-Git-Url: http://git.apps.os.sepia.ceph.com/?p=xfstests-dev.git;a=commitdiff_plain;h=993887b25cefe3bfba02abdeab78969fdfe4d447;hp=0049872c9acc28f5df30090346805b47d41b8343 xfs/178: fix mkfs success test Fix the obviously incorrect code here that wants to fail the test if mkfs doesn't succeed. The return value ("$?") is always the status of the /last/ command in the pipe. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Eryu Guan --- diff --git a/tests/xfs/178 b/tests/xfs/178 index a24ef50c..122d63d2 100755 --- a/tests/xfs/178 +++ b/tests/xfs/178 @@ -57,8 +57,8 @@ _supported_fs xfs # fix filesystem, new mkfs.xfs will be fine. _require_scratch -_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs \ - || _fail "mkfs failed!" +_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs +test "${PIPESTATUS[0]}" -eq 0 || _fail "mkfs failed!" # By executing the followint tmp file, will get on the mkfs options stored in # variables