From: "Darrick J. Wong" <djwong@kernel.org>
To: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Cc: fstests@vger.kernel.org, linux-btrfs@vger.kernel.org,
linux-xfs@vger.kernel.org, linux-ext4@vger.kernel.org,
Naohiro Aota <naohiro.aota@wdc.com>,
Johannes Thumshirn <johannes.thumshirn@wdc.com>,
Damien Le Moal <damien.lemoal@opensource.wdc.com>
Subject: Re: [PATCH 4/7] xfs/015: check _scratch_mkfs_sized return code
Date: Tue, 8 Feb 2022 16:36:04 -0800 [thread overview]
Message-ID: <20220209003604.GD8288@magnolia> (raw)
In-Reply-To: <20220207065541.232685-5-shinichiro.kawasaki@wdc.com>
On Mon, Feb 07, 2022 at 03:55:38PM +0900, Shin'ichiro Kawasaki wrote:
> The test cases xfs/015 calls _scratch_mkfs before _scratch_mkfs_sized,
> and does not check return code of _scratch_mkfs_sized. Even if
> _scratch_mkfs_sized failed, _scratch_mount after it cannot detect the
> sized mkfs failure because _scratch_mkfs already created a file system
> on the device. This results in unexpected test condition.
>
> To avoid the unexpected test condition, check return code of
> _scratch_mkfs_sized.
>
> Suggested-by: Naohiro Aota <naohiro.aota@wdc.com>
> Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Looks good,
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
--D
> ---
> tests/xfs/015 | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/xfs/015 b/tests/xfs/015
> index 86fa6336..2bb7b8d5 100755
> --- a/tests/xfs/015
> +++ b/tests/xfs/015
> @@ -43,7 +43,7 @@ _scratch_mount
> _require_fs_space $SCRATCH_MNT 131072
> _scratch_unmount
>
> -_scratch_mkfs_sized $((32 * 1024 * 1024)) > $tmp.mkfs.raw
> +_scratch_mkfs_sized $((32 * 1024 * 1024)) > $tmp.mkfs.raw || _fail "mkfs failed"
> cat $tmp.mkfs.raw | _filter_mkfs >$seqres.full 2>$tmp.mkfs
> # get original data blocks number and agcount
> . $tmp.mkfs
> --
> 2.34.1
>
next prev parent reply other threads:[~2022-02-09 0:36 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-07 6:55 [PATCH 0/7] fstests: fix _scratch_mkfs_sized failure handling Shin'ichiro Kawasaki
2022-02-07 6:55 ` [PATCH 1/7] common/rc: fix btrfs mixed mode usage in _scratch_mkfs_sized Shin'ichiro Kawasaki
2022-02-07 6:55 ` [PATCH 2/7] generic/{171,172,173,174,204}: check _scratch_mkfs_sized return code Shin'ichiro Kawasaki
2022-02-09 0:35 ` Darrick J. Wong
2022-02-09 8:09 ` Shinichiro Kawasaki
2022-02-07 6:55 ` [PATCH 3/7] ext4/021: " Shin'ichiro Kawasaki
2022-02-07 6:55 ` [PATCH 4/7] xfs/015: " Shin'ichiro Kawasaki
2022-02-09 0:36 ` Darrick J. Wong [this message]
2022-02-07 6:55 ` [PATCH 5/7] common: rename _filter_mkfs to _xfs_filter_mkfs Shin'ichiro Kawasaki
2022-02-09 0:43 ` Darrick J. Wong
2022-02-09 0:53 ` Darrick J. Wong
2022-02-09 8:18 ` Shinichiro Kawasaki
2022-02-07 6:55 ` [PATCH 6/7] common: move _xfs_filter_mkfs from common/filter to common/xfs Shin'ichiro Kawasaki
2022-02-07 6:55 ` [PATCH 7/7] generic/204: do xfs unique preparation only for xfs Shin'ichiro Kawasaki
-- strict thread matches above, loose matches on Subject: below --
2022-02-07 3:09 [PATCH 0/7] fstests: fix _scratch_mkfs_sized failure handling Shin'ichiro Kawasaki
2022-02-07 3:09 ` [PATCH 4/7] xfs/015: check _scratch_mkfs_sized return code Shin'ichiro Kawasaki
2022-01-24 11:10 [PATCH 0/7] fstests: fix _scratch_mkfs_sized failure handling Shin'ichiro Kawasaki
2022-01-24 11:10 ` [PATCH 4/7] xfs/015: check _scratch_mkfs_sized return code Shin'ichiro Kawasaki
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=20220209003604.GD8288@magnolia \
--to=djwong@kernel.org \
--cc=damien.lemoal@opensource.wdc.com \
--cc=fstests@vger.kernel.org \
--cc=johannes.thumshirn@wdc.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=naohiro.aota@wdc.com \
--cc=shinichiro.kawasaki@wdc.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 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.