linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Eryu Guan <guan@eryu.me>
Cc: guaneryu@gmail.com, linux-xfs@vger.kernel.org, fstests@vger.kernel.org
Subject: Re: [PATCH 3/4] generic/570: fix regression when SCRATCH_DEV is still formatted
Date: Mon, 2 Aug 2021 15:15:13 -0700	[thread overview]
Message-ID: <20210802221513.GJ3601466@magnolia> (raw)
In-Reply-To: <YQac0CPbZrVDEjrT@desktop>

On Sun, Aug 01, 2021 at 09:08:32PM +0800, Eryu Guan wrote:
> On Tue, Jul 27, 2021 at 05:09:54PM -0700, Darrick J. Wong wrote:
> > From: Darrick J. Wong <djwong@kernel.org>
> > 
> > Newer versions of mkswap (or at least the one in util-linux 2.34)
> > complain to stderr when they're formatting over a device that seems to
> > contain existing data:
> > 
> >     mkswap: /dev/sdf: warning: wiping old btrfs signature.
> > 
> > This is harmless (since the swap image does get written!) but the extra
> > golden output is flagged as a regression.  Update the mkswap usage in
> > this test to dump the stderr output to $seqres.full, and complain if the
> > exit code is nonzero.
> > 
> > This fixes a regression that the author noticed when testing btrfs and
> > generic/507 and generic/570 run sequentially.  generic/507 calls
> > _require_scratch_shutdown to see if the shutdown call is supported.
> > btrfs does not support that, so the test is _notrun.  This leaves the
> > scratch filesystem mounted, causing the _try_wipe_scratch_devs between
> > tests to fail.  When g/570 starts up, the scratch device still contains
> 
> Won't your previous patch "check: don't leave the scratch filesystem
> mounted after _notrun" fix this issue as well? As _notrun won't leaves
> scratch dev mounted & unwiped after that patch. Would you please confirm?

Yes.  In the end this patch becomes more about failing the test if
mkswap fails than anything else.

--D

> Thanks,
> Eryu
> 
> > leftovers from the failed attempt to run g/507, which is why the mkswap
> > command outputs the above warning.
> > 
> > Signed-off-by: Darrick J. Wong <djwong@kernel.org>
> > ---
> >  tests/generic/570 |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > 
> > diff --git a/tests/generic/570 b/tests/generic/570
> > index 7d03acfe..02c1d333 100755
> > --- a/tests/generic/570
> > +++ b/tests/generic/570
> > @@ -27,7 +27,7 @@ _require_scratch_nocheck
> >  _require_block_device $SCRATCH_DEV
> >  test -e /dev/snapshot && _notrun "userspace hibernation to swap is enabled"
> >  
> > -$MKSWAP_PROG "$SCRATCH_DEV" >> $seqres.full
> > +$MKSWAP_PROG -f "$SCRATCH_DEV" &>> $seqres.full || echo "mkswap failed?"
> >  
> >  # Can you modify the swap dev via previously open file descriptors?
> >  for verb in 1 2 3 4; do

  reply	other threads:[~2021-08-02 22:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-28  0:09 [PATCHSET 0/4] fstests: random fixes Darrick J. Wong
2021-07-28  0:09 ` [PATCH 1/4] xfs/106: fix golden output regression in quota off test Darrick J. Wong
2021-07-28  0:09 ` [PATCH 2/4] check: don't leave the scratch filesystem mounted after _notrun Darrick J. Wong
2021-08-01 13:02   ` Eryu Guan
2021-08-02 22:13     ` Darrick J. Wong
2021-07-28  0:09 ` [PATCH 3/4] generic/570: fix regression when SCRATCH_DEV is still formatted Darrick J. Wong
2021-08-01 13:08   ` Eryu Guan
2021-08-02 22:15     ` Darrick J. Wong [this message]
2021-07-28  0:09 ` [PATCH 4/4] check: back off the OOM score adjustment to -500 Darrick J. Wong
2021-07-28 20:00 ` [PATCH 5/4] xfs/530: skip test if user MKFS_OPTIONS screw up formatting Darrick J. Wong
2021-07-28 20:00 ` [PATCH 6/4] xfs/007: fix regressions on V4 filesystems Darrick J. Wong
2021-08-01 13:18 ` [PATCHSET 0/4] fstests: random fixes Eryu Guan

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=20210802221513.GJ3601466@magnolia \
    --to=djwong@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=guan@eryu.me \
    --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 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).