git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] test-lib.sh: A command dying due to a signal is an unexpected failure.

From
Johannes Sixt <j.sixt@eudaptics.com>
Date
Nov 13, 2006, 13:50 UTC
Message-ID
<11634257784001-git-send-email-j.sixt@eudaptics.com>
From: Johannes Sixt <johannes.sixt@telecom.at>

When test_expect_failure detects that a command failed, it still has to treat a program that crashed from a signal as unexpected failure.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
---
 t/test-lib.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 07cb706..3895f16 100755
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -129,7 +129,7 @@ test_expect_failure () {
 	error "bug in the test script: not 2 parameters to test-expect-failure"
 	say >&3 "expecting failure: $2"
 	test_run_ "$2"
-	if [ "$?" = 0 -a "$eval_ret" != 0 ]
+	if [ "$?" = 0 -a "$eval_ret" != 0 -a "$eval_ret" -lt 129 ]
 	then
 		test_ok_ "$1"
 	else
-- 
1.4.1.rc1.g47e5
Next: Johannes Sixt
Message 1 of 2 in “test-lib.sh: A command dying due to a signal is an unexpected failure.”
  1. test-lib.sh: A command dying due to a signal is an unexpected failure.Johannes Sixt, Nov 13, 2006
  2. Catch errors when writing an index that contains invalid objects.Johannes Sixt, Nov 13, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.