FS/XFS testing framework
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Filipe David Manana <fdmanana@gmail.com>
Cc: Omer Zilberberg <omzg@plexistor.com>, fstests@vger.kernel.org
Subject: Re: [PATCH] generic/076: fixed incorrect fsstress parameters
Date: Tue, 7 Apr 2015 12:29:37 +1000	[thread overview]
Message-ID: <20150407022937.GB13731@dastard> (raw)
In-Reply-To: <CAL3q7H4KPH22AptJaSMFapp1iOECuWHKUjEYznrCwe7mV5SUcg@mail.gmail.com>

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@plexistor.com> 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@plexistor.com>
> 
> Reviewed-by: Filipe Manana <fdmanana@suse.com>
> Tested-by: Filipe Manana <fdmanana@suse.com>
> 
> > ---
> >  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@fromorbit.com

  reply	other threads:[~2015-04-07  2:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-02 15:56 [PATCH] generic/076: fixed incorrect fsstress parameters Omer Zilberberg
2015-04-02 21:05 ` Filipe David Manana
2015-04-07  2:29   ` Dave Chinner [this message]
2015-04-07  6:32     ` Omer Zilberberg
2015-04-13  5:16       ` Dave Chinner
2015-04-07  9:27     ` Filipe David Manana

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150407022937.GB13731@dastard \
    --to=david@fromorbit.com \
    --cc=fdmanana@gmail.com \
    --cc=fstests@vger.kernel.org \
    --cc=omzg@plexistor.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox