Re: [PATCH] generic/076: fixed incorrect fsstress parameters

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



On Thu, Apr 02, 2015 at 10:05:40PM +0100, Filipe David Manana wrote:
> On Thu, Apr 2, 2015 at 4:56 PM, Omer Zilberberg <omzg@xxxxxxxxxxxxx> wrote:
> > Test was not run because directory parameter was omitted.
> > Also return value was not tested, so this problem was not caught.
> >
> > Signed-off-by: Omer Zilberberg <omzg@xxxxxxxxxxxxx>
> 
> Reviewed-by: Filipe Manana <fdmanana@xxxxxxxx>
> Tested-by: Filipe Manana <fdmanana@xxxxxxxx>
> 
> > ---
> >  tests/generic/076 | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/tests/generic/076 b/tests/generic/076
> > index aa0aae0..3e1aa1a 100755
> > --- a/tests/generic/076
> > +++ b/tests/generic/076
> > @@ -74,9 +74,11 @@ echo "*** test concurrent block/fs access"
> >  cat $SCRATCH_DEV >/dev/null &
> >  pid=$!
> >
> > -FSSTRESS_ARGS=`_scale_fsstress_args -p 2 -n 2000 $FSSTRESS_AVOID`
> > +FSSTRESS_ARGS=`_scale_fsstress_args -d $SCRATCH_MNT -p 2 -n 2000 $FSSTRESS_AVOID`
> >  echo "run fsstress with args: $FSSTRESS_ARGS" >>$seqres.full
> >  $FSSTRESS_PROG $FSSTRESS_ARGS >>$seqres.full
> > +rc=$?
> > +[ $rc != 0 ] && echo "fsstress returned $rc - see $seqres.full"
> 
> run_check $FSSTRESS_PROG $FSSTRESS_ARGS
>
> Would also do it (some other tests do this).

Please don't encourage run_check usage - it's cargo-cult programming
at it's worst. It stops people from thinking about what errors they
actually need to care about and capture exactly via other methods
(such as output filtering).

To demonstrate: fsstress only ever returns non-zero when there's a
config or setup problem. This basically never happens once the test
has been written. Further, fsstress does not collect runtime errors
from child processes because it is designed to trigger errors and
still continue onwards. Finally, the output stream is really only
debug information, so that's not useful for anythign other than
debugging, either.

Hence there is never any need to check exit status of fsstress, nor
do anything with the output stream except redirect it to the
debug output file or the bit bucket.

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx
--
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