> > > + > > +# Override the default cleanup function. > > +_cleanup() > > +{ > > + cd / > > + rm -r -f $tmp.* > > + _scratch_unmount > /dev/null 2>&1 > > I think the test harness does this for you already, right? Although, it looks like after running the test by default the run_section() in check script, will do _test_unmount and _scratch_unmount. But I still feel it's better if the individual test cleans up whatever it did while running the test in it's cleanup routine, before exiting. > > > +} > > + > > +# Import common functions. > > +. ./common/filter > > +. ./common/punch > > + > > +# real QA test starts here > > + > > +# Modify as appropriate. > > +_supported_fs generic > > +_require_scratch > > +_require_xfs_io_command "fpunch" > > +_require_xfs_io_command "fzero" > > +_require_xfs_io_command "fiemap" > > _require_scratch_shutdown > > > + > > +t1=$SCRATCH_MNT/foo > > +t2=$SCRATCH_MNT/bar > > + > > +_scratch_mkfs > $seqres.full 2>&1 > > + > > +_scratch_mount >> $seqres.full 2>&1 > > + > > +bs=$(_get_block_size $SCRATCH_MNT) > > _get_file_block_size, in case the file allocation unit isn't the same as > the fs blocksize? (e.g. bigalloc, xfs realtime, etc.) Sure. Agreed. Will make the change. Thanks -ritesh