Re: [PATCH 1/2] fstests: introduce _scratch_mount_nocheck

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



On Tue, Feb 13, 2018 at 03:11:07PM +0100, Andreas Gruenbacher wrote:
> On 13 February 2018 at 10:12, Eryu Guan <eguan@xxxxxxxxxx> wrote:
> > _fail test by default if _scratch_mount failed and introduce
> > _scratch_mount_nocheck for tests that need to check mount results
> > themselves.
> >
> > Signed-off-by: Eryu Guan <eguan@xxxxxxxxxx>
> > ---

[snip]

> > --- a/common/rc
> > +++ b/common/rc
> > @@ -352,13 +352,18 @@ _supports_filetype()
> >         esac
> >  }
> >
> > +_scratch_mount_nocheck()
> > +{
> > +       if [ "$FSTYP" == "overlay" ]; then
> > +               _overlay_scratch_mount $*
> > +               return $?
> > +       fi
> > +       _mount -t $FSTYP `_scratch_mount_options $*`
> > +}
> > +
> >  _scratch_mount()
> >  {
> > -    if [ "$FSTYP" == "overlay" ]; then
> > -        _overlay_scratch_mount $*
> > -        return $?
> > -    fi
> > -    _mount -t $FSTYP `_scratch_mount_options $*`
> > +       _scratch_mount_nocheck $* || _fail "_scratch_mount failed"
> 
> I'd change that to "mount failed"; the name of the helper function
> isn't very interesting.

I think it'd be easier to know which mount fails, but sure, I have no
strong preference on it.

> 
> >  }
> >
> >  _scratch_unmount()
> > @@ -397,7 +402,7 @@ _scratch_cycle_mount()
> >         opts="-o $opts"
> >      fi
> >      _scratch_unmount
> > -    _scratch_mount "$opts"
> > +    _scratch_mount_nocheck "$opts" || _fail "_scratch_cycle_mount failed"
> 
> Same here, change to "cycle mount failed" or similar.

OK.

And thanks for the testing feedback!

Eryu
--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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