From: Johannes Schindelin <johannes.schindelin@gmx.de>
To: git@vger.kernel.org
Cc: Johannes Schindelin <johannes.schindelin@gmx.de>,
Junio C Hamano <gitster@pobox.com>, Jeff King <peff@peff.net>
Subject: [PATCH 1/6] test_must_fail: support ok=sigabrt
Date: Mon, 30 Apr 2018 00:17:39 +0200 [thread overview]
Message-ID: <97894dd28d752ffce30312650c775d9e1b891cb8.1525040253.git.johannes.schindelin@gmx.de> (raw)
In-Reply-To: <cover.1525040253.git.johannes.schindelin@gmx.de>
In the upcoming patch, we will prepare t1406 to handle the conversion of
refs/files-backend.c to call BUG() instead of die("BUG: ..."). This will
require handling SIGABRT as valid failure case.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
t/test-lib-functions.sh | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh
index 7d620bf2a9a..926aefd1551 100644
--- a/t/test-lib-functions.sh
+++ b/t/test-lib-functions.sh
@@ -616,7 +616,7 @@ list_contains () {
# ok=<signal-name>[,<...>]:
# Don't treat an exit caused by the given signal as error.
# Multiple signals can be specified as a comma separated list.
-# Currently recognized signal names are: sigpipe, success.
+# Currently recognized signal names are: sigabrt, sigpipe, success.
# (Don't use 'success', use 'test_might_fail' instead.)
test_must_fail () {
@@ -636,6 +636,9 @@ test_must_fail () {
echo >&4 "test_must_fail: command succeeded: $*"
return 1
elif test_match_signal 13 $exit_code && list_contains "$_test_ok" sigpipe
+ then
+ return 0
+ elif test_match_signal 6 $exit_code && list_contains "$_test_ok" sigabrt
then
return 0
elif test $exit_code -gt 129 && test $exit_code -le 192
--
2.17.0.windows.1.36.gdf4ca5fb72a
next prev parent reply other threads:[~2018-04-29 22:18 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-29 22:17 [PATCH 0/6] Finish the conversion from die("BUG: ...") to BUG() Johannes Schindelin
2018-04-29 22:17 ` Johannes Schindelin [this message]
2018-04-29 22:17 ` [PATCH 2/6] t1406: prepare for the refs code to fail with BUG() Johannes Schindelin
2018-04-30 19:32 ` Johannes Sixt
2018-05-01 11:04 ` Johannes Schindelin
2018-05-01 11:22 ` Duy Nguyen
2018-05-01 11:26 ` Duy Nguyen
2018-05-02 3:40 ` Junio C Hamano
2018-05-02 7:41 ` Johannes Schindelin
2018-05-02 10:41 ` Junio C Hamano
2018-04-29 22:18 ` [PATCH 3/6] refs/*: report bugs using the BUG() macro Johannes Schindelin
2018-04-29 22:18 ` [PATCH 4/6] run-command: use BUG() to report bugs, not die() Johannes Schindelin
2018-04-29 22:19 ` [PATCH 5/6] Replace all die("BUG: ...") calls by BUG() ones Johannes Schindelin
2018-04-29 22:19 ` [PATCH 6/6] Convert remaining die*(BUG) messages Johannes Schindelin
2018-04-30 2:53 ` Eric Sunshine
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=97894dd28d752ffce30312650c775d9e1b891cb8.1525040253.git.johannes.schindelin@gmx.de \
--to=johannes.schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
/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).