Re: [PATCH v2] common: allow to run all tests on idmapped mounts

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



On Wed, Mar 30, 2022 at 02:10:11PM +0300, Amir Goldstein wrote:
> On Wed, Mar 30, 2022 at 1:26 PM Christian Brauner <brauner@xxxxxxxxxx> wrote:
> >
> > In addition to the generic and filesystem-specific idmapped mount
> > testsuites that already exist upstream today add simple infrastructure
> > so any test can be run on idmapped mounts simply by setting
> > IDMAPPED_MOUNTS=true in the config file or section. The main user for
> > now will be overlay to verify it works correctly on idmapped mounts.
> >
> 
> It is not clear from this message how IDMAPPED_MOUNTS=true affects
> non -overlay runs and the answer is complicated:
> 
> You handled the majority of cases using _test_mount and _scratch_mount
> but there are still many tests that open code _mount and some helpers
> like _dmthin_mount that are used quite often.

I verified that actually for testing overlay. _dmthin_mount is used in 8
tests (btrfs/196, generic/347, generic/405, generic/455, generic/457,
generic/470, generic/482, generic/500). None of them were run in a
regular testrun on the 5.17 base kernel.
Direct _mount calls in the generic/ testsuite are 8 (generic/042,
generic/081, generic/108, generic/361, generic/459, generic/563,
generic/620, geneirc/649).
Again, none of them were run in a regular testrun on the 5.17 base
kernel. Let alone that for most of them conversion to be tested on
idmapped mounts didn't make sense.

> 
> So either document that IDMAPPED_MOUNTS=true will idmapp the
> fs mounts whenever it can as best effort, or restrict the use of
> IDMAPPED_MOUNTS=true with OVERLAY=true for now.

Just to clarify, the test patch will be upstreamed independently. It is
included here so people can run xfstests right away if they are
interested.

The infrastructure is completely generic so every filesystem that
supports idmapped mounts can simply run all of their tests idmapped. But
there will be corner-cases. For example, xfs doesn't allow bulkstat on
idmapped mounts because it is a filesystem wide operation, i.e. you can
retrieve information for any inode in the filesystem so the operation
cannot be scoped reasonably under a single mount. So xfstests testing
bulkstat will fail as it's blocked. Similar for some btrfs ioctl()s.

We could of course restrict this testmode to -overlay for which we know
things work correctly but that I don't like that as this means that
people won't start using it and so we won't see issues unless someone
sits down and goes through all 750+ tests and figures out for each
individual one why it fails the way it fails.

I'd rather not restrict the generic infrastructure so people can run and
report failures and we can fix them up or block them as we detect them.
So I'd rather just point that out in the commit message, I think.

In any case, the tests will be upstreamed in parallel but separate from
this series. :)



[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux