[LTP] [PATCH v3] vfs: fix readahead(2) on block devices

Christian Brauner brauner@kernel.org
Mon Sep 25 14:47:54 CEST 2023


On Sun, Sep 24, 2023 at 03:35:18PM +0100, Matthew Wilcox wrote:
> On Sun, Sep 24, 2023 at 12:30:30PM +0200, Christian Brauner wrote:
> > > This ad-hoc approach to testing syscalls is probably not the best idea.
> > > Have the LTP considered a more thorough approach where we have a central
> > > iterator that returns a file descriptor of various types (the ones listed
> > > above, plus block devices, and regular files), and individual syscall
> > > testcases can express whether this syscall should pass/fail for each type
> > > of fd?  That would give us one central place to add new fd types, and we
> > > wouldn't be relying on syzbot to try fds at random until something fails.
> > > 
> > > Or something.  I'm not an expert on the LTP or testing in general; it
> > > just feels like we could do better here.
> > 
> > I honestly would love to see such tests all go into xfstests. IOW,
> > general VFS and fs-specific tests should be in one location. That's why
> > I added src/vfs/ under xfstests. Having to run multiple test-suites for
> > one subsystem isn't ideal. I mean, I'm doing it but I don't love it...
> 
> This may well be a subject on which reasonable people can disagree.

Oh it sure is.

> I'm going to lay out what I believe the positions of the various
> parties are here, and plese feel free to speak up if you feel I'm
> mischaracterising anyone.
> 
> The LTP people see it as their mandate to test all syscalls.  They focus
> on getting the correct error code, checking corner cases of the API, etc.
> 
> The xfstests people see it as their mandate to test filesystems.
> They focus on testing the corner cases of the filesystem.
> 
> These are quite different things, and I'm not sure that forcing them

Yes, I agree that they are different things.
But the lines are quite often rather blurry as most vfs changes have an
immediate impact on fs testing and testing them involves validating the
vfs interface and the fses implementing them.

I've mostly just described my ideal world where the two things would be
tightly coupled even during testing.


More information about the ltp mailing list