Re: [PATCH 2/4] check: don't leave the scratch filesystem mounted after _notrun

Darrick J. Wong
2021-08-02T22:13:57Z

On Sun, Aug 01, 2021 at 09:02:13PM +0800, Eryu Guan wrote:
> On Tue, Jul 27, 2021 at 05:09:48PM -0700, Darrick J. Wong wrote:
> > From: Darrick J. Wong <djwong@kernel.org>
> >
> > Unmount the scratch filesystem if a test decides to _notrun itself
> > because _try_wipe_scratch_devs will not be able to wipe the scratch
> > device prior to the next test run. We don't want to let scratch state
> > from one test leak into subsequent tests if we can help it.
> >
> > Signed-off-by: Darrick J. Wong <djwong@kernel.org>
> > ---
> > check | 5 +++++
> > 1 file changed, 5 insertions(+)
> >
> >
> > diff --git a/check b/check
> > index bb7e030c..5d71b74c 100755
> > --- a/check
> > +++ b/check
> > @@ -871,6 +871,11 @@ function run_section()
> > notrun="$notrun $seqnum"
> > n_notrun=`expr $n_notrun + 1`
> > tc_status="notrun"
> > +
> > + # Unmount the scratch fs so that we can wipe the scratch
> > + # dev state prior to the next test run.
> > + _scratch_unmount 2> /dev/null
> > + rm -f ${RESULT_DIR}/require_scratch*
>
> I think _notrun has removed $RESULT_DIR/require_scratch* already, and we
> could remove above line. I'll remove it on commit.

Ok, thanks!

--D

>
> Thanks,
> Eryu
>
> > continue;
> > fi
> >