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 4/4] xfs: regresion test for fsmap problems with realtime
Date: Mon, 13 Sep 2021 11:26:23 -0700 [thread overview]
Message-ID: <20210913182623.GG638503@magnolia> (raw)
In-Reply-To: <YT3ZUiH7uANwHoRW@desktop>
On Sun, Sep 12, 2021 at 06:41:22PM +0800, Eryu Guan wrote:
> On Tue, Aug 31, 2021 at 05:12:26PM -0700, Darrick J. Wong wrote:
> > From: Darrick J. Wong <djwong@kernel.org>
> >
> > This is a regression test for:
> >
> > xfs: make xfs_rtalloc_query_range input parameters const
> > xfs: fix off-by-one error when the last rt extent is in use
> > xfs: make fsmap backend function key parameters const
> >
> > In which we synthesize an XFS with a realtime volume and a special
> > realtime volume to trip the bugs fixed by all three patches that
> > resulted in incomplete fsmap output.
> >
> > Signed-off-by: Darrick J. Wong <djwong@kernel.org>
> > ---
> > tests/xfs/922 | 183 +++++++++++++++++++++++++++++++++++++++++++++++++++++
> > tests/xfs/922.out | 2 +
> > 2 files changed, 185 insertions(+)
> > create mode 100755 tests/xfs/922
> > create mode 100644 tests/xfs/922.out
> >
> >
> > diff --git a/tests/xfs/922 b/tests/xfs/922
> > new file mode 100755
> > index 00000000..95304d57
> > --- /dev/null
> > +++ b/tests/xfs/922
> > @@ -0,0 +1,183 @@
> > +#! /bin/bash
> > +# SPDX-License-Identifier: GPL-2.0
> > +# Copyright (c) 2021 Oracle. All Rights Reserved.
> > +#
> > +# FS QA Test 922
> > +#
> > +# Regression test for commits:
> > +#
> > +# c02f6529864a ("xfs: make xfs_rtalloc_query_range input parameters const")
> > +# 9ab72f222774 ("xfs: fix off-by-one error when the last rt extent is in use")
> > +# 7e1826e05ba6 ("xfs: make fsmap backend function key parameters const")
> > +#
> > +# These commits fix a bug in fsmap where the data device fsmap function would
> > +# corrupt the high key passed to the rt fsmap function if the data device
> > +# number is smaller than the rt device number and the data device itself is
> > +# smaller than the rt device.
> > +#
> > +. ./common/preamble
> > +_begin_fstest auto fsmap
> > +
> > +_cleanup()
> > +{
> > + cd /
> > + rm -r -f $tmp.*
> > + _scratch_unmount
> > + test -n "$ddloop" && _destroy_loop_device "$ddloop"
> > + test -n "$rtloop" && _destroy_loop_device "$rtloop"
> > + test -n "$ddfile" && rm -f "$ddfile"
> > + test -n "$rtfile" && rm -f "$rtfile"
> > + test -n "$old_use_external" && USE_EXTERNAL="$old_use_external"
> > +}
> > +
> > +# real QA test starts here
> > +
> > +# Modify as appropriate.
> > +_supported_fs generic
>
> _supported_fs xfs
>
> > +_require_test
>
> Also need the following _require rules
>
> _require_loop
> _require_xfs_io_command "falloc"
> _require_xfs_io_command "fpunch"
> _require_xfs_io_command "fsmap"
>
> I've fixed them all on commit.
Thank you!
--D
>
> Thanks,
> Eryu
prev parent reply other threads:[~2021-09-13 18:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-01 0:12 [PATCHSET 0/4] fstests: exercise code changes in 5.15 Darrick J. Wong
2021-09-01 0:12 ` [PATCH 1/4] generic: regression test for a FALLOC_FL_UNSHARE bug in XFS Darrick J. Wong
2021-09-01 0:12 ` [PATCH 2/4] xfs: test DONTCACHE behavior with the inode cache Darrick J. Wong
2021-09-01 0:12 ` [PATCH 3/4] xfs/108: sync filesystem before querying quota Darrick J. Wong
2021-09-01 0:12 ` [PATCH 4/4] xfs: regresion test for fsmap problems with realtime Darrick J. Wong
2021-09-12 10:41 ` Eryu Guan
2021-09-13 18:26 ` Darrick J. Wong [this message]
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=20210913182623.GG638503@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).