Re: [PATCH v2 1/2] shared: move btrfs clone device testcase to the shared group

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



On Tue, Mar 19, 2024 at 01:43:03PM -0700, Christoph Hellwig wrote:
> On Tue, Mar 19, 2024 at 12:16:33PM +0800, Zorro Lang wrote:
> > I didn't suggest to make it a shared case directly, I asked if there's a
> > _require_xxxx helper to make this case notrun on "not proper" fs, not
> > just use "btrfs ext4" to be whitelist :
> > 
> > https://lore.kernel.org/fstests/20240312044629.hpaqdkl24nxaa3dv@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/
> > 
> > In my personal opinion, the "shared" directory is a place to store the cases
> > which are nearly to be generic, but not ready. It's a place to remind us
> > there're still some cases use something likes "supported btrfs ext4" as the
> > hard condition of _notrun, rather than a flexible _require_xxx helper. These
> > cases in shared better to be moved to generic, if we can improve it in one day.
> > 
> > It more likes a "TODO" list of generic. If we just write it in generic/
> > directory, I'm afraid we'll leave it in hundreds of generic cases then forget it.
> > 
> > What do you think?
> 
> I like we're you're going, but I'd like to take it a step further:
> 
> I think we should just kill _supported_fs entirely.
> 
> tests/$FSTYPE is run for $FSTYP only, period.
> tests/generic/ is run for all file systems, and run/notrun deciѕions
> should be based on feature checks.  Where they can't happen without
> fs-sepcific infrastructure we need a _require/_have check that
> switches on $FSTYP like we already have in many places.

This could work, the number of exceptions is short:

tests/generic:
    547 _supported_fs generic
      4 _supported_fs ^nfs
      2 _supported_fs ^overlay
      1 _supported_fs ^xfs
      1 _supported_fs ^btrfs ^nfs
      1 _supported_fs ^btrfs

The example from generic/187:

# btrfs can't fragment free space. This test is unreliable on NFS, as it
# depends on the exported filesystem.
_supported_fs ^btrfs ^nfs

There are different reasons for the exclusion but at least for btrfs
could be transformed to e.g.

_require_can_fragment_free_space

Not sure about the NFS part, it can be either excluding remote
filesystems or mandating a local one.




[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