On Thu, May 26, 2022 at 11:04:17PM +0800, Zorro Lang wrote: > On Wed, May 25, 2022 at 01:13:36AM +0800, Zorro Lang wrote: > > On Tue, May 24, 2022 at 01:42:15PM +0300, Amir Goldstein wrote: > > > On Tue, May 24, 2022 at 12:41 PM Dave Chinner <david@xxxxxxxxxxxxx> wrote: > > > > > > > > From: Dave Chinner <dchinner@xxxxxxxxxx> > > > > > > > > Use a local cleanup function and _register_cleanup properly. > > > > > > > > Remove local cleanups that just do what the standard _cleanup and > > > > test exist does. > > > > > > > > Remove local cleanups that just remove test files and then do > > > > standard _cleanup functionality. > > > > > > As I mentioned in response to the cover letter, the call to _cleanup() > > > can and I think should be chained implicitly, but I am still waiting > > > for your response regarding the tests where generic _cleanup is not > > > desired. > > > > > > > > > > > Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx> > > > > --- > > > > tests/xfs/004 | 7 ------- > > > > tests/xfs/006 | 7 ++++--- > > > > [snap] > > > > > > diff --git a/tests/xfs/006 b/tests/xfs/006 > > > > index cecceaa3..fd8d8071 100755 > > > > --- a/tests/xfs/006 > > > > +++ b/tests/xfs/006 > > > > @@ -11,11 +11,10 @@ > > > > _begin_fstest auto quick mount eio > > > > > > > > # Override the default cleanup function. > > > > -_cleanup() > > > > +_dmerror_cleanup() > > > > { > > > > - cd / > > > > - rm -f $tmp.* > > > > _dmerror_cleanup > > > > > > That looks recursive. > > > > Yes, but this _dmerror_cleanup() won't be run. This function will be covered by > > the _dmerror_cleanup() in common/dmerror, when this case ". ./common/dmerror" > > several lines later. So the later _cleanup won't be run. So this place and other > > places similar with this need to change. > > Hi Dave, > > Are you going to fix this issue or making more changes on this patchset? > If not, I'll merge this patchset tomorrow (Friday) by changing above > _dmerror_cleanup to _dm_error_cleanup. Then give merged patches a regression > on Saturday. What do you think? I posted this patchset as an RFC, not as a candidate for merging. It's not ready for merging yet. Cheers, Dave. -- Dave Chinner david@xxxxxxxxxxxxx