All of lore.kernel.org
 help / color / mirror / Atom feed
From: Amir Goldstein <amir73il@gmail.com>
To: David Howells <dhowells@redhat.com>
Cc: linux-xfs <linux-xfs@vger.kernel.org>,
	Christoph Hellwig <hch@infradead.org>,
	Dave Chinner <david@fromorbit.com>,
	fstests <fstests@vger.kernel.org>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	Eryu Guan <eguan@redhat.com>
Subject: Re: [PATCH 2/4] xfstests: Add first statx test
Date: Mon, 3 Apr 2017 14:32:55 +0300	[thread overview]
Message-ID: <CAOQ4uxg73bQzakiUoQnvLxOztO4z-1ro+LZcDKsMCbOXA0g-3g@mail.gmail.com> (raw)
In-Reply-To: <23054.1491218325@warthog.procyon.org.uk>

On Mon, Apr 3, 2017 at 2:18 PM, David Howells <dhowells@redhat.com> wrote:
> Amir Goldstein <amir73il@gmail.com> wrote:
>
>> I know Eryu told you that you can change the default of status to success,
>> ... what's the benefit of doing that.
>
> Simple: All the tests should be carried out, even if one or more fail.  The
> script should not simply abort at that point, but should rather give the
> cumulative error at the end.
>
> This means the default should be success and this altered to failure on the
> failure of any subtest (ie. we're OR'ing them).
>
> There should needs to be a way to report any subtest that was skipped because
> the kernel or the fs doesn't support it.
>
>> A simple way to deal with this is to do
>>
>> function check_stat () {
>>     $here/src/stat_test $* || exit
>> }
>
> No.  This is the wrong thing to do (see above).  Better would be to either set
> status=1 here (but we're inside a function, so I'm not sure that'll work) or
> to replace the exit above with "|| echo stat_test failed" and let the output
> comparator handle it.
>

Fair enough. Both options will work. Bash variables are global by default.

I am a bit concerned about setting status=0 to begin with because
of 'exit' inside common helpers.

How about handling the errors with "|| echo stat_test failed"
and sticking to standard wrt status?

  reply	other threads:[~2017-04-03 11:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-03 10:27 [PATCH 1/4] xfstests: Add an auxiliary program to create an AF_UNIX socket David Howells
2017-04-03 10:27 ` [PATCH 2/4] xfstests: Add first statx test David Howells
2017-04-03 10:53   ` Amir Goldstein
2017-04-03 11:18   ` David Howells
2017-04-03 11:32     ` Amir Goldstein [this message]
2017-04-03 11:46     ` David Howells
2017-04-03 11:54       ` Amir Goldstein
2017-04-03 10:27 ` [PATCH 3/4] xfstests: Partially expand the documentation David Howells
2017-04-03 10:27 ` [PATCH 4/4] xfstests: Check the stx_attributes settable by chattr David Howells
2017-04-03 11:02   ` Amir Goldstein

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=CAOQ4uxg73bQzakiUoQnvLxOztO4z-1ro+LZcDKsMCbOXA0g-3g@mail.gmail.com \
    --to=amir73il@gmail.com \
    --cc=david@fromorbit.com \
    --cc=dhowells@redhat.com \
    --cc=eguan@redhat.com \
    --cc=fstests@vger.kernel.org \
    --cc=hch@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-xfs@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.