Re: [PATCH] common/rc: Check SCRATCH_DEV in _require_dm_target()

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



On Sep 07, 2021 / 20:36, Dave Chinner wrote:
> On Tue, Sep 07, 2021 at 09:28:44AM +0000, Shinichiro Kawasaki wrote:
> > On Sep 07, 2021 / 18:15, Dave Chinner wrote:
> > > On Tue, Sep 07, 2021 at 04:41:16PM +0900, Shin'ichiro Kawasaki wrote:
> > > > When SCRATCH_DEV is not set and the test case does not call
> > > > _require_scratch*() before _require_dm_target(), _require_block_device()
> > > 
> > > That is the bug that needs fixing.
> > 
> > Thanks for the comment. Do you mean the test cases (generic/628 and generic/629)
> > need fix to call _require_scratch*() before _require_dm_target()? I think that
> 
> Yes.
> 
> Indeed,  generic/628 does:
> 
> _require_dm_target error
> _require_scratch_reflink
> 
> and g629 does:
> 
> _supported_fs generic
> _require_dm_target error
> _require_xfs_io_command "chattr" "s"
> _require_xfs_io_command "copy_range"
> _require_scratch
> 
> i.e. these two cases are just incorrectly ordered require rules.
> 
> Oh, and a quick check of all the dm_target tests:
> 
> $ git grep -l _require_dm_target tests/ > t.t
> $ git grep -l _require_scratch `cat t.t` > t.tt
> $ diff -u t.t t.tt
> $
> 
> Every test that has require_dm_target rule also has a
> _require_scratch rule in it somewhere...

Thanks for the clarification. I will repost a patch to fix the order of
_require_scratch* and _require_dm_target in generic/{628,629}.

Regarding the future test cases, I think we can improve error check and error
message in _require_dm_target. I will post another patch for it. Comment on it
will be appreciated also.

-- 
Best Regards,
Shin'ichiro Kawasaki



[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