From: "Darrick J. Wong" <djwong@kernel.org>
To: Zorro Lang <zlang@redhat.com>
Cc: Christoph Hellwig <hch@infradead.org>,
Zorro Lang <zlang@kernel.org>,
fstests@vger.kernel.org, linux-xfs@vger.kernel.org
Subject: Re: [PATCH] xfs/157: mkfs does not need a specific fssize
Date: Mon, 4 Nov 2024 15:34:26 -0800 [thread overview]
Message-ID: <20241104233426.GW21840@frogsfrogsfrogs> (raw)
In-Reply-To: <20241104130437.mutcy5mqzcqrbqf2@dell-per750-06-vm-08.rhts.eng.pek2.redhat.com>
On Mon, Nov 04, 2024 at 09:04:37PM +0800, Zorro Lang wrote:
> On Sun, Nov 03, 2024 at 11:50:32PM -0800, Christoph Hellwig wrote:
> > On Fri, Nov 01, 2024 at 02:49:26PM -0700, Darrick J. Wong wrote:
> > > > How about unset the MKFS_OPTIONS for this test? As it already tests rtdev
> > > > and logdev by itself. Or call _notrun if MKFS_OPTIONS has "rmapbt=1"?
> > >
> > > That will exclude quite a few configurations. Also, how many people
> > > actually turn on rmapbt explicitly now?
> > >
> > > > Any better idea?
> > >
> > > I'm afraid not. Maybe I should restructure the test to force the rt
> > > device to be 500MB even when we're not using the fake rtdev?
> >
> > All of this is really just bandaids or the fundamental problem that:
> >
> > - we try to abitrarily mix config and test provided options without
> > checking that they are compatible in general, and with what the test
> > is trying to specifically
> > - some combination of options and devices (size, block size, sequential
> > required zoned) fundamentally can't work
> >
> > I haven't really found an easy solution for them. In the long run I
> > suspect we need to split tests between those that just take the options
> > from the config and are supposed to work with all options (maybe a few
> > notruns that fundamentally can't work). And those that want to test
> > specific mkfs/mount options and hard code them but don't take options
> > from the input.
>
> So how about unset extra MKFS_OPTIONS in this case ? This test has its own
> mkfs options (-L label and logdev and rtdev and fssize).
The trouble with clearing MKFS_OPTIONS is that you then have to adjust
the other _scratch_* calls in check_label(), and then all you're doing
is reducing fs configuration test coverage. If (say) there was a bug
when changing the fs label on a rtgroups filesystem with a rt section,
you'd never see it.
Hang on ... is this a general complaint about _scratch_mkfs_xfs dropping
MKFS_OPTIONS in favor of the specific arguments passed to it by the
test? Or a specific complaint about xfs/157 barfing when the test
runner puts "-L foo" in the MKFS_OPTIONS that it passes to ./check?
If it's the second, then let's do this:
extract_mkfs_label() {
set -- $MKFS_OPTIONS
local in_l
for arg in "$@"; do
if [ "$in_l" = "1" ]; then
echo "$arg"
return 0
elif [ "$arg" = "-L" ]; then
in_l=1
fi
done
return 1
}
check_label() {
local existing_label
local filter
# Handle -L somelabel being set in MKFS_OPTIONS
if existing_label="$(extract_mkfs_label)"; then
filter=(sed -e "s|$existing_label|oldlabel|g")
_scratch_mkfs_sized $fs_size >> $seqres.full
else
filter=(cat)
MKFS_OPTIONS="-L oldlabel $MKFS_OPTIONS" \
_scratch_mkfs_sized $fs_size >> $seqres.full
fi
_scratch_xfs_db -c label | ${filter[@]}
_scratch_xfs_admin -L newlabel "$@" >> $seqres.full
_scratch_xfs_db -c label
_scratch_xfs_repair -n &>> $seqres.full || echo "Check failed?"
}
--D
> Thanks,
> Zorro
>
> >
> >
>
>
next prev parent reply other threads:[~2024-11-04 23:34 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-31 19:35 [PATCH] xfs/157: mkfs does not need a specific fssize Zorro Lang
2024-10-31 22:08 ` Darrick J. Wong
2024-11-01 5:48 ` Zorro Lang
2024-11-01 21:49 ` Darrick J. Wong
2024-11-04 7:50 ` Christoph Hellwig
2024-11-04 13:04 ` Zorro Lang
2024-11-04 23:34 ` Darrick J. Wong [this message]
2024-11-05 6:58 ` Dave Chinner
2024-11-05 15:02 ` Christoph Hellwig
2024-11-05 15:47 ` Darrick J. Wong
2024-11-07 5:40 ` Dave Chinner
2024-11-07 10:10 ` Zorro Lang
2024-11-07 23:53 ` Darrick J. Wong
2024-11-14 23:43 ` Darrick J. Wong
2024-11-05 6:58 ` 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=20241104233426.GW21840@frogsfrogsfrogs \
--to=djwong@kernel.org \
--cc=fstests@vger.kernel.org \
--cc=hch@infradead.org \
--cc=linux-xfs@vger.kernel.org \
--cc=zlang@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox