From: Junio C Hamano <gitster@pobox.com>
To: git@vger.kernel.org
Subject: [PATCH] t/lib-git-daemon: ksh portability workaround
Date: Tue, 31 May 2016 16:04:00 -0700 [thread overview]
Message-ID: <xmqq60tt3k4f.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <xmqqinxt3kwq.fsf@gitster.mtv.corp.google.com> (Junio C. Hamano's message of "Tue, 31 May 2016 15:47:01 -0700")
The "git daemon" test checks with what status the daemon exits when
we terminate it, and we expect that we can observe death by SIGTERM.
We forgot that ksh adds 256, unlike 128 that are used by other POSIX
shells, to the signal number that caused the process to die when
coming up with the exit status.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
diff --git a/t/lib-git-daemon.sh b/t/lib-git-daemon.sh
index 340534c..623b3ae 100644
--- a/t/lib-git-daemon.sh
+++ b/t/lib-git-daemon.sh
@@ -83,7 +83,8 @@ stop_git_daemon() {
wait "$GIT_DAEMON_PID" >&3 2>&4
ret=$?
# expect exit with status 143 = 128+15 for signal TERM=15
- if test $ret -ne 143
+ # or 271 = 256+15 on ksh
+ if test $ret -ne 143 && test $ret -ne 271
then
error "git daemon exited with status: $ret"
fi
next prev parent reply other threads:[~2016-05-31 23:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-31 22:47 [PATCH] t0005: ksh93 portability workaround Junio C Hamano
2016-05-31 22:49 ` Eric Sunshine
2016-05-31 23:03 ` Jeff King
2016-05-31 23:17 ` Junio C Hamano
2016-05-31 23:04 ` Junio C Hamano [this message]
2016-05-31 23:05 ` [PATCH] t/lib-git-daemon: ksh " Jeff King
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=xmqq60tt3k4f.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.