All of lore.kernel.org
 help / color / mirror / Atom feed
From: Omer Zilberberg <omzg@plexistor.com>
To: Dave Chinner <david@fromorbit.com>,
	Filipe David Manana <fdmanana@gmail.com>
Cc: fstests@vger.kernel.org
Subject: Re: [PATCH] generic/076: fixed incorrect fsstress parameters
Date: Tue, 07 Apr 2015 09:32:19 +0300	[thread overview]
Message-ID: <552379F3.9090205@plexistor.com> (raw)
In-Reply-To: <20150407022937.GB13731@dastard>

On 04/07/2015 05:29 AM, Dave Chinner wrote:
> 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.
run_check usage notwithstanding, I would argue that checking the exit 
status of fsstress would have prevented this problem - the dir argument
was omitted during the introduction of load factor into fsstress in b84aade,
and the test has been printing fsstress usage message to the debug output 
file ever since, when IMHO it should have failed.
> 
> Cheers,
> 
> Dave.
> 
Thank you both for your comments.

  reply	other threads:[~2015-04-07  6:32 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
2015-04-07  6:32     ` Omer Zilberberg [this message]
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=552379F3.9090205@plexistor.com \
    --to=omzg@plexistor.com \
    --cc=david@fromorbit.com \
    --cc=fdmanana@gmail.com \
    --cc=fstests@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.