Re: [PATCH RFC] fstests: use MOUNT_OPTIONS to populate TEST_FS_MOUNT_OPTS if possible

Zorro Lang <[email protected]>
Newsgroups org.kernel.vger.fstests,org.kernel.vger.linux-btrfs
Message-ID <aiRsmJKtqR23Blox@zlang-mailbox>
On Thu, Jun 04, 2026 at 09:13:30PM -0700, Christoph Hellwig wrote:
> On Fri, Jun 05, 2026 at 12:46:13AM +0800, Zorro Lang wrote:
> > Right now, the biggest inconsistent issue is probably with those feature-probing
> > helpers. They often check TEST_DIR to determine behaviors for SCRATCH_MNT. While
> > this works fine for features unaffected by mount options, but we might should
> > handle mount options related features (for TEST_DEV or SCRATCH_DEV) separately.
> 
> Yes, I've run into a lot of issues when TEST_DIR has more feature than
> SCRATCH_DEV.  The problem is just that feature testing for scratch is
> a bit annoying because we have to create a file system for it first.

Yeah, if we make those _require_*feature or _has_*feature helpers accept a
parameter like "local dev="${TEST_DEV:-$1}" to allow specifying $SCRATCH_DEV,
it would mean we can only call these helpers after running _scratch_mkfs or
even _scratch_mount. I haven't come up with a better idea for now ...

> 
> It might make sense to catch some of the results, but then again we have
> tests that override options for the scratch side so that this won't
> apply.
> 
> I've been wanting to look into splitting the scratch tests up into those
> that "just" format the file systems, and those testing very specific
> corners cases using special options.  Especially as we should not have
> to run the latter multiple times for different configurations.

Hopefully, specifying the same TEST_FS_MOUNT_OPTS and MOUNT_OPTIONS for XFS
can help resolve some of the issues you encountered. But that doesn't help if
your TEST_DEV and SCRATCH_DEV are different devices.

About separating "corner cases using special options", xfstests always welcome
"finer-grained" group tags to better categorize and differentiate these test
cases.

Thanks,
Zorro

> 
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.