All of lore.kernel.org
 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 2/2] generic: test shutdowns of a nested filesystem
Date: Sun, 22 Aug 2021 10:23:21 -0700	[thread overview]
Message-ID: <20210822172321.GA12640@magnolia> (raw)
In-Reply-To: <YSIymUFbWA9xNcIK@desktop>

On Sun, Aug 22, 2021 at 07:18:49PM +0800, Eryu Guan wrote:
> On Tue, Aug 17, 2021 at 04:53:25PM -0700, Darrick J. Wong wrote:
> > From: Darrick J. Wong <djwong@kernel.org>
> > 
> > generic/475, but we're running fsstress on a disk image inside the
> > scratch filesystem
> > 
> > Signed-off-by: Darrick J. Wong <djwong@kernel.org>
> > ---
> >  common/rc             |   20 +++++++
> >  tests/generic/725     |  136 +++++++++++++++++++++++++++++++++++++++++++++++++
> >  tests/generic/725.out |    2 +
> >  3 files changed, 158 insertions(+)
> >  create mode 100755 tests/generic/725
> >  create mode 100644 tests/generic/725.out
> > 
> > 
> > diff --git a/common/rc b/common/rc
> > index 84757fc1..473bfb0a 100644
> > --- a/common/rc
> > +++ b/common/rc
> > @@ -631,6 +631,26 @@ _ext4_metadump()
> >  		$DUMP_COMPRESSOR -f "$dumpfile" &>> "$seqres.full"
> >  }
> >  
> > +# Capture the metadata of a filesystem in a dump file for offline analysis
> > +_metadump_dev() {
> > +	local device="$1"
> > +	local dumpfile="$2"
> > +	local compressopt="$3"
> > +
> > +	case "$FSTYP" in
> > +	ext*)
> > +		_ext4_metadump $device $dumpfile $compressopt
> > +		;;
> > +	xfs)
> > +		_xfs_metadump $dumpfile $device none $compressopt
> > +		;;
> > +	*)
> > +		echo "Don't know how to metadump $FSTYP"
> 
> This breaks tests on filesystems other than ext* and xfs. I think it's
> OK if we only want to use it in failure path, but it's better to
> describe the use case in comments.

Ok, I'll make a note of that in the comment.

"Capture the metadata of a filesystem in a dump file for offline
analysis.  Not all filesystems support this, so this function should
only be used to capture information about a previous test failure."

> And Im' wondering if should honor DUMP_CORRUPT_FS, and only do the dump
> when it's set.

Yes.  Will fix that in the next release.

--D

> Thanks,
> Eryu

  reply	other threads:[~2021-08-22 17:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-17 23:53 [PATCHSET v2 0/2] fstests: exercise code refactored in 5.14 Darrick J. Wong
2021-08-17 23:53 ` [PATCH 1/2] generic: fsstress with cpu offlining Darrick J. Wong
2021-08-18  6:07   ` Zorro Lang
2021-08-18  6:32     ` Zorro Lang
2021-08-18 16:01       ` Darrick J. Wong
2021-08-17 23:53 ` [PATCH 2/2] generic: test shutdowns of a nested filesystem Darrick J. Wong
2021-08-18  7:06   ` Zorro Lang
2021-08-18 15:55     ` Darrick J. Wong
2021-08-18 17:18       ` Zorro Lang
2021-08-22 11:18   ` Eryu Guan
2021-08-22 17:23     ` Darrick J. Wong [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-07-20  1:08 [PATCHSET 0/2] fstests: exercise code refactored in 5.14 Darrick J. Wong
2021-07-20  1:08 ` [PATCH 2/2] generic: test shutdowns of a nested filesystem 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=20210822172321.GA12640@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 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.