All of lore.kernel.org
 help / color / mirror / Atom feed
From: Amir Goldstein <amir73il@gmail.com>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: Eryu Guan <guaneryu@gmail.com>,
	linux-xfs <linux-xfs@vger.kernel.org>,
	fstests <fstests@vger.kernel.org>
Subject: Re: [PATCH 11/12] check: wipe scratch devices between tests
Date: Wed, 20 Mar 2019 09:06:08 +0200	[thread overview]
Message-ID: <CAOQ4uxhu52G1hw6h-uc50-n5Bq0OT+4pLZjdnfPxK784F=nG0Q@mail.gmail.com> (raw)
In-Reply-To: <155304275552.31707.6473598082840688691.stgit@magnolia>

On Wed, Mar 20, 2019 at 2:46 AM Darrick J. Wong <darrick.wong@oracle.com> wrote:
>
> From: Darrick J. Wong <darrick.wong@oracle.com>
>
> Wipe the scratch devices in between each test to ensure that tests are
> formatting them and not making assumptions about previous contents.
>
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> ---
>  check      |    1 +
>  common/rc  |    6 ++++++
>  common/xfs |    1 +
>  3 files changed, 8 insertions(+)
>
>
> diff --git a/check b/check
> index a2c5ba21..bcf08dfe 100755
> --- a/check
> +++ b/check
> @@ -737,6 +737,7 @@ for section in $HOST_OPTIONS_SECTIONS; do
>                         # _check_dmesg depends on this log in dmesg
>                         touch ${RESULT_DIR}/check_dmesg
>                 fi
> +               _try_wipe_scratch_devs > /dev/null 2>&1
>                 if [ "$DUMP_OUTPUT" = true ]; then
>                         ./$seq 2>&1 | tee $tmp.out
>                         # Because $? would get tee's return code
> diff --git a/common/rc b/common/rc
> index 1c42515f..40eef80f 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -3942,6 +3942,12 @@ _require_fibmap()
>         rm -f $file
>  }
>
> +_try_wipe_scratch_devs()
> +{
> +       _scratch_unmount

So I find this change strange, not because it doesn't make sense
to start every test with scratch unmounted, but because today scratch *is*
mounted on test start and there is quite a bit of code to make it mounted
on test start, which seems backwards.

IOW, instead of unmounting scratch just before the test runs, seems
better to make sure it is unmounted at the end of each test and before
starting the loop.

Note that for a test with _require_scratch_nocheck, _check_filesystems()
will unmount scratch, but for a test with _require_scratch, _check_scratch_fs()
will unmount+fsck+mount scratch - inconsistent.
Or am I reading this wrong?


> +       test -x "$WIPEFS_PROG" && $WIPEFS_PROG -a $SCRATCH_DEV_POOL $SCRATCH_DEV $SCRATCH_LOGDEV $SCRATCH_RTDEV

Please check that $SCRATCH_DEV is not a network name (nfs|cifs) and that it
is really a blockdev (overlayfs) before trying to wipefs.

Thanks,
Amir.

  reply	other threads:[~2019-03-20  7:06 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-20  0:44 [PATCH 00/12] fstests: various fixes Darrick J. Wong
2019-03-20  0:44 ` [PATCH 01/12] check: improve test list randomization Darrick J. Wong
2019-03-20  0:44 ` [PATCH 02/12] check: really " Darrick J. Wong
2019-03-20  0:44 ` [PATCH 03/12] generic/042: fix stale disk contents check Darrick J. Wong
2019-03-20  0:45 ` [PATCH 04/12] generic/032: fix unwritten extent checks Darrick J. Wong
2019-03-20  0:45 ` [PATCH 05/12] generic/454: stop the test if we run out of space Darrick J. Wong
2019-03-20  0:45 ` [PATCH 06/12] ext4/023: don't require scrub for ext4 populated image creation Darrick J. Wong
2019-03-20  0:45 ` [PATCH 07/12] common/populate: refactor _scratch_populate_cached Darrick J. Wong
2019-03-20  0:45 ` [PATCH 08/12] common/populate: support multiple cached images Darrick J. Wong
2019-03-20  0:45 ` [PATCH 09/12] clonerange: test remapping the rainbow Darrick J. Wong
2019-03-20  0:45 ` [PATCH 10/12] xfs: test xfs_copy and xfs_mdrestore on the populate images Darrick J. Wong
2019-03-24  2:36   ` Eryu Guan
2019-03-24  6:32     ` Darrick J. Wong
2019-03-24  6:48   ` [PATCH v2 " Darrick J. Wong
2019-03-20  0:45 ` [PATCH 11/12] check: wipe scratch devices between tests Darrick J. Wong
2019-03-20  7:06   ` Amir Goldstein [this message]
2019-03-21  4:15     ` Darrick J. Wong
2019-03-23 13:29       ` Eryu Guan
2019-03-25 23:48         ` Darrick J. Wong
2019-03-26 16:24           ` Amir Goldstein
2019-03-20  0:46 ` [PATCH 12/12] misc: fix broken _require_scratch usage Darrick J. Wong

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='CAOQ4uxhu52G1hw6h-uc50-n5Bq0OT+4pLZjdnfPxK784F=nG0Q@mail.gmail.com' \
    --to=amir73il@gmail.com \
    --cc=darrick.wong@oracle.com \
    --cc=fstests@vger.kernel.org \
    --cc=guaneryu@gmail.com \
    --cc=linux-xfs@vger.kernel.org \
    /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.