fstests.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eryu Guan <guan@eryu.me>
To: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Cc: fstests@vger.kernel.org, Naohiro Aota <naohiro.aota@wdc.com>,
	Johannes Thumshirn <johannes.thumshirn@wdc.com>,
	Damien Le Moal <Damien.LeMoal@wdc.com>
Subject: Re: [PATCH v2 2/3] btrfs/146: Add _require_scratch_dev_pool before _require_dm_target
Date: Sun, 12 Sep 2021 17:30:08 +0800	[thread overview]
Message-ID: <YT3IoLrI0Kucg//R@desktop> (raw)
In-Reply-To: <20210908083715.1831067-3-shinichiro.kawasaki@wdc.com>

On Wed, Sep 08, 2021 at 05:37:14PM +0900, Shin'ichiro Kawasaki wrote:
> The test case btrfs/146 calls _require_dm_target which depends on
> SCRATCH_DEV. The test case assumes that valid devices are set in
> SCRATCH_DEV_POOL, and one of the devices is propagated to SCRATCH_DEV.
> However, when SCRATCH_DEV_POOL is not set, valid value is not propagated
> to SCRATCH_DEV and _require_dm_target causes unexpected test case
> failure. To avoid the failure, add _require_scratch_dev_pool call before
> _require_dm_target call to detect invalid SCRATCH_DEV_POOL beforehand.
> 
> Of note is that the test case replaces SCRATCH_DEV_POOL value internally
> and calls _require_scratch_dev_pool for the replaced SCRATCH_DEV_POOL.
> With this fix, the test case will call _require_scratch_dev_pool twice
> for the original SCRATCH_DEV_POOL and the replaced SCRATCH_DEV_POOL.
> 
> Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
> ---
>  tests/btrfs/146 | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tests/btrfs/146 b/tests/btrfs/146
> index 64c3513f..eee1a286 100755
> --- a/tests/btrfs/146
> +++ b/tests/btrfs/146
> @@ -26,6 +26,7 @@ _cleanup()
>  
>  # real QA test starts here
>  _supported_fs btrfs
> +_require_scratch_dev_pool

There's no need for the test to call _require_scratch_dev_pool twice, it
doesn't do any setup work, just to make sure there's scratch pool
defined. Move both _require_scratch and _require_scratch_dev_pool up
here should be fine. I've fixed it on commit.

Thanks,
Eryu

>  _require_dm_target error
>  _require_test_program fsync-err
>  _require_test_program dmerror
> -- 
> 2.31.1

  parent reply	other threads:[~2021-09-12  9:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-08  8:37 [PATCH v2 0/3] fstests: Fix order of _require_scratch* and _require_dm_target Shin'ichiro Kawasaki
2021-09-08  8:37 ` [PATCH v2 1/3] generic/{628,629}: " Shin'ichiro Kawasaki
2021-09-08 17:04   ` Johannes Thumshirn
2021-09-08  8:37 ` [PATCH v2 2/3] btrfs/146: Add _require_scratch_dev_pool before _require_dm_target Shin'ichiro Kawasaki
2021-09-08 17:05   ` Johannes Thumshirn
2021-09-12  9:30   ` Eryu Guan [this message]
2021-09-08  8:37 ` [PATCH v2 3/3] common/rc: Check call order of _require_dm_target and _require_scratch* Shin'ichiro Kawasaki
2021-09-10  0:48   ` Dave Chinner
2021-09-10  6:34     ` Shinichiro Kawasaki
2021-09-12  9:17       ` Eryu Guan
2021-09-12 23:28         ` Shinichiro 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=YT3IoLrI0Kucg//R@desktop \
    --to=guan@eryu.me \
    --cc=Damien.LeMoal@wdc.com \
    --cc=fstests@vger.kernel.org \
    --cc=johannes.thumshirn@wdc.com \
    --cc=naohiro.aota@wdc.com \
    --cc=shinichiro.kawasaki@wdc.com \
    --subject='Re: [PATCH v2 2/3] btrfs/146: Add _require_scratch_dev_pool before _require_dm_target' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).