From: Stephan Beyer <s-beyer@gmx.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Stephan Beyer <s-beyer@gmx.net>
Subject: [PATCH 1/2] t/test-lib.sh: Let test_must_fail fail on signals only
Date: Sat, 12 Jul 2008 17:47:51 +0200 [thread overview]
Message-ID: <1215877672-17049-1-git-send-email-s-beyer@gmx.net> (raw)
The test_must_fail function in test-lib.sh has been designed
to distinguish segmentation faults from controlled errors.
But in the current implementation this only works if a git
command does not return a small negative value, like -1, -2
or -3. But some git commands do.
Because any signal (like SIGSEGV) will result in an exit status
less than 193, this patch just adds a further check for the exit
status.
Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
---
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 8e2849b..11c0275 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -379,7 +379,7 @@ test_external_without_stderr () {
test_must_fail () {
"$@"
- test $? -gt 0 -a $? -le 129
+ test $? -gt 0 -a $? -le 129 -o $? -gt 192
}
# test_cmp is a helper function to compare actual and expected output.
--
1.5.6.2.303.g79662
next reply other threads:[~2008-07-12 15:48 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-12 15:47 Stephan Beyer [this message]
2008-07-12 15:47 ` [PATCH 2/2] t/: Use "test_must_fail git" instead of "! git" Stephan Beyer
2008-07-12 16:04 ` Jakub Narebski
2008-07-12 21:43 ` Stephan Beyer
2008-07-12 21:30 ` [SQUASH PATCH] t9001: " Stephan Beyer
2008-07-16 5:18 ` [PATCH 1/2] t/test-lib.sh: Let test_must_fail fail on signals only Jeff King
2008-07-16 5:54 ` Junio C Hamano
2008-07-17 5:18 ` Jeff King
2008-07-17 5:38 ` Junio C Hamano
2008-07-17 6:01 ` Jeff King
2008-07-17 6:31 ` Junio C Hamano
2008-07-17 6:38 ` Jeff King
2008-07-17 7:22 ` Johannes Sixt
2008-07-17 7:25 ` Junio C Hamano
2008-07-16 11:57 ` Stephan Beyer
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=1215877672-17049-1-git-send-email-s-beyer@gmx.net \
--to=s-beyer@gmx.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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).