Re: [PATCH v12 2/6] generic/632: add fstests for idmapped mounts

Christian Brauner
2021-04-12T07:30:53Z

On Mon, Apr 12, 2021 at 09:22:41AM +0200, Christoph Hellwig wrote:
> On Sun, Apr 11, 2021 at 05:32:23PM +0200, Christian Brauner wrote:
> > > > And it should actually skip the tests on all filesystems that don't
> > > > support idmapped mounts which is every fs apart from xfs and ext4.
> > >
> > > Yeah, looks like that's the case. So it seems the _require idmapped
> >
> > Ah, ok I didn't know this needed to go in there. I thinke the following
> > might be enough. Are you able to simply apply it on top?
>
> No, this is broken. It needs to do feature detection, not some arbitrary
> whitelists. And I'm pretty sure we got that right at some point by

I thought so too.

> doing the _notrun when mounting with the idmap option was not supported.

The thing is we need the fileystem type we're going to be tested on. I
can place this into src/feature.c if this can get access to the fstype
the test is going to be run on. It should be but if not we can do this
in src/idmapped-mounts/idmapped-mounts.c
directly to test whether the underlying fs we're being tested on
supports idmapped mounts and then return an error value from the binary
indicating that it doesn't so we can use _notrun.
I'll post an updated version of this today with the detection logic.

Christian