Thread (12 messages) 12 messages, 4 authors, 2018-05-01
STALE2984d
Revisions (2)
  1. v1 current
  2. v2 [diff vs current]

[PATCH 1/6] test_must_fail: support ok=sigabrt

From: Johannes Schindelin <hidden>
Date: 2018-04-29 22:18:09
Subsystem: the rest · Maintainer: Linus Torvalds

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 <redacted>
---
 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

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help