From: Yi Zhang <yi.zhang@redhat.com>
To: osandov@fb.com
Cc: linux-block@vger.kernel.org, shinichiro.kawasaki@wdc.com
Subject: [PATCH blktests] Fix the failure case which will exit with 0
Date: Tue, 5 Mar 2019 11:33:19 +0800 [thread overview]
Message-ID: <20190305033319.6825-1-yi.zhang@redhat.com> (raw)
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
next reply other threads:[~2019-03-05 3:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-05 3:33 Yi Zhang [this message]
2019-03-06 2:25 ` [PATCH blktests] Fix the failure case which will exit with 0 Shinichiro Kawasaki
2019-03-11 20:22 ` Omar Sandoval
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=20190305033319.6825-1-yi.zhang@redhat.com \
--to=yi.zhang@redhat.com \
--cc=linux-block@vger.kernel.org \
--cc=osandov@fb.com \
--cc=shinichiro.kawasaki@wdc.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;
as well as URLs for NNTP newsgroup(s).