From: "Darrick J. Wong" <djwong@kernel.org>
To: Dave Chinner <david@fromorbit.com>
Cc: Zorro Lang <zlang@redhat.com>, Eryu Guan <guaneryu@gmail.com>,
fstests <fstests@vger.kernel.org>,
xfs <linux-xfs@vger.kernel.org>
Subject: Re: [PATCH] xfs: test mkfs.xfs sizing of internal logs that
Date: Tue, 24 May 2022 16:49:30 -0700 [thread overview]
Message-ID: <Yo1vCizXEK7+AkZi@magnolia> (raw)
In-Reply-To: <20220524234426.GQ2306852@dread.disaster.area>
On Wed, May 25, 2022 at 09:44:26AM +1000, Dave Chinner wrote:
> On Tue, May 24, 2022 at 12:52:57PM -0700, Darrick J. Wong wrote:
> > From: Darrick J. Wong <djwong@kernel.org>
> >
> > This is a regression test that exercises the mkfs.xfs code that creates
> > log sizes that are very close to the AG size when stripe units are in
> > play and/or when the log is forced to be in AG 0.
> >
> > Signed-off-by: Darrick J. Wong <djwong@kernel.org>
> > ---
> > tests/xfs/843 | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++++
> > tests/xfs/843.out | 2 ++
> > 2 files changed, 58 insertions(+)
> > create mode 100755 tests/xfs/843
> > create mode 100644 tests/xfs/843.out
> >
> > diff --git a/tests/xfs/843 b/tests/xfs/843
> > new file mode 100755
> > index 00000000..3384b1aa
> > --- /dev/null
> > +++ b/tests/xfs/843
> > @@ -0,0 +1,56 @@
> > +#! /bin/bash
> > +# SPDX-License-Identifier: GPL-2.0
> > +# Copyright (c) 2022 Oracle. All Rights Reserved.
> > +#
> > +# FS QA Test 843
> > +#
> > +# Now that we've increased the default log size calculation, test mkfs with
> > +# various stripe units and filesystem sizes to see if we can provoke mkfs into
> > +# breaking.
> > +#
> > +. ./common/preamble
> > +_begin_fstest auto mkfs
> > +
> > +_cleanup()
> > +{
> > + cd /
> > + rm -r -f $tmp.* $testfile
> > +}
>
> I'd omit this completely.
>
> > +# real QA test starts here
> > +
> > +# Modify as appropriate.
> > +_supported_fs xfs
> > +_require_test
> > +
> > +testfile=$TEST_DIR/a
> > +rm -f $testfile
> > +
> > +test_format() {
> > + local tag="$1"
> > + shift
> > +
> > + echo "$tag" >> $seqres.full
> > + $MKFS_XFS_PROG $@ -d file,name=$testfile &>> $seqres.full
> > + local res=$?
> > + test $res -eq 0 || echo "$tag FAIL $res" | tee -a $seqres.full
>
> What breakage are you trying to provoke? Just the log size
> calculation? If so, why do we need to actually write the filesystem
> to disk? Won't "-N" still calculate everything and fail if it's
> broken or quit with success without needing to write anything to
> disk?
It will, but...
> > +}
> > +
> > +# First we try various small filesystems and stripe sizes.
> > +for M in `seq 298 302` `seq 490 520`; do
> > + for S in `seq 32 4 64`; do
> > + test_format "M=$M S=$S" -dsu=${S}k,sw=1,size=${M}m
> > + done
> > +done
> > +
> > +# log so large it pushes the root dir into AG 1
> > +test_format "log pushes rootdir into AG 1" -d agcount=3200,size=6366g -lagnum=0
...this particular check in mkfs only happens after we allocate the root
directory, which an -N invocation doesn't do.
> > +
> > +# log end rounded beyond EOAG due to stripe unit
> > +test_format "log end beyond eoag" -d agcount=3200,size=6366g -d su=256k,sw=4
> > +
> > +echo Silence is golden
>
> Put this at the top where the test is being set up (i.e. where you
> define testfile). That tells the reader straight away that no output
> is expected on a successful run before they start reading the test
> code....
Hmm, we probably ought to update the ./new template too.
--D
> Cheers,
>
> Dave.
> --
> Dave Chinner
> david@fromorbit.com
next prev parent reply other threads:[~2022-05-24 23:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-24 19:52 [PATCH] xfs: test mkfs.xfs sizing of internal logs that Darrick J. Wong
2022-05-24 23:44 ` Dave Chinner
2022-05-24 23:49 ` Darrick J. Wong [this message]
2022-05-25 0:24 ` Dave Chinner
2022-05-25 0:32 ` Darrick J. Wong
2022-05-25 0:59 ` Dave Chinner
2022-05-25 23:21 ` Darrick J. Wong
2022-05-26 0:11 ` Dave Chinner
2022-05-26 1:35 ` Darrick J. Wong
2022-05-26 2:27 ` Dave Chinner
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=Yo1vCizXEK7+AkZi@magnolia \
--to=djwong@kernel.org \
--cc=david@fromorbit.com \
--cc=fstests@vger.kernel.org \
--cc=guaneryu@gmail.com \
--cc=linux-xfs@vger.kernel.org \
--cc=zlang@redhat.com \
/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.