* [PATCH blktests] Fix the failure case which will exit with 0
@ 2019-03-05 3:33 Yi Zhang
2019-03-06 2:25 ` Shinichiro Kawasaki
2019-03-11 20:22 ` Omar Sandoval
0 siblings, 2 replies; 3+ messages in thread
From: Yi Zhang @ 2019-03-05 3:33 UTC (permalink / raw)
To: osandov; +Cc: linux-block, shinichiro.kawasaki
The return value of a failing test was masked by the zoned test check.
Make sure to return either the original or zoned run failed value.
Fixes: e840e15 ("config: Introduce RUN_ZONED_TESTS variable and
CAN_BE_ZONED flag")
Signed-off-by: Yi Zhang <yi.zhang@redhat.com>
---
check | 3 +++
1 file changed, 3 insertions(+)
diff --git a/check b/check
index 819d8f3..c65270e 100755
--- a/check
+++ b/check
@@ -431,11 +431,14 @@ _run_test() {
RESULTS_DIR="$OUTPUT/nodev"
_call_test test
+ local ret=$?
if (( RUN_ZONED_TESTS && CAN_BE_ZONED )); then
RESULTS_DIR="$OUTPUT/nodev_zoned"
RUN_FOR_ZONED=1
_call_test test
+ ret=$(( ret || $? ))
fi
+ return $ret
else
if [[ ${#TEST_DEVS[@]} -eq 0 ]] && \
declare -fF fallback_device >/dev/null; then
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH blktests] Fix the failure case which will exit with 0
2019-03-05 3:33 [PATCH blktests] Fix the failure case which will exit with 0 Yi Zhang
@ 2019-03-06 2:25 ` Shinichiro Kawasaki
2019-03-11 20:22 ` Omar Sandoval
1 sibling, 0 replies; 3+ messages in thread
From: Shinichiro Kawasaki @ 2019-03-06 2:25 UTC (permalink / raw)
To: Yi Zhang, osandov@fb.com; +Cc: linux-block@vger.kernel.org
On 3/5/19 12:33 PM, Yi Zhang wrote:
> The return value of a failing test was masked by the zoned test check.
> Make sure to return either the original or zoned run failed value.
>
> Fixes: e840e15 ("config: Introduce RUN_ZONED_TESTS variable and
> CAN_BE_ZONED flag")
> Signed-off-by: Yi Zhang <yi.zhang@redhat.com>
> ---
> check | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/check b/check
> index 819d8f3..c65270e 100755
> --- a/check
> +++ b/check
> @@ -431,11 +431,14 @@ _run_test() {
>
> RESULTS_DIR="$OUTPUT/nodev"
> _call_test test
> + local ret=$?
> if (( RUN_ZONED_TESTS && CAN_BE_ZONED )); then
> RESULTS_DIR="$OUTPUT/nodev_zoned"
> RUN_FOR_ZONED=1
> _call_test test
> + ret=$(( ret || $? ))
> fi
> + return $ret
> else
> if [[ ${#TEST_DEVS[@]} -eq 0 ]] && \
> declare -fF fallback_device >/dev/null; then
Hi Yi Zhang, thank you for the fix for commit e840e15.
The change is required, and looks good to me.
Reviewed-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
--
Best Regards,
Shin'ichiro Kawasaki
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH blktests] Fix the failure case which will exit with 0
2019-03-05 3:33 [PATCH blktests] Fix the failure case which will exit with 0 Yi Zhang
2019-03-06 2:25 ` Shinichiro Kawasaki
@ 2019-03-11 20:22 ` Omar Sandoval
1 sibling, 0 replies; 3+ messages in thread
From: Omar Sandoval @ 2019-03-11 20:22 UTC (permalink / raw)
To: Yi Zhang; +Cc: osandov, linux-block, shinichiro.kawasaki
On Tue, Mar 05, 2019 at 11:33:19AM +0800, Yi Zhang wrote:
> The return value of a failing test was masked by the zoned test check.
> Make sure to return either the original or zoned run failed value.
>
> Fixes: e840e15 ("config: Introduce RUN_ZONED_TESTS variable and
> CAN_BE_ZONED flag")
> Signed-off-by: Yi Zhang <yi.zhang@redhat.com>
Thanks for the fix, applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-03-11 20:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-05 3:33 [PATCH blktests] Fix the failure case which will exit with 0 Yi Zhang
2019-03-06 2:25 ` Shinichiro Kawasaki
2019-03-11 20:22 ` Omar Sandoval
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).