Re: [PATCH 2/4] xfstests: Add first statx test

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



On Mon, Apr 3, 2017 at 2:18 PM, David Howells <dhowells@xxxxxxxxxx> wrote:
> Amir Goldstein <amir73il@xxxxxxxxx> 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?
--
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