Skip to content

Commit 03c39b3

Browse files
peffgitster
authored andcommitted
t/lib-git-daemon: use test_match_signal
When git-daemon exits, we expect it to be with the SIGTERM we just sent it. If we see anything else, we'll complain. But our check against exit code "143" is not portable. For example: $ ksh93 t5570-git-daemon.sh [...] error: git daemon exited with status: 271 We can fix this by using test_match_signal. Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 2472448 commit 03c39b3

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

t/lib-git-daemon.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,7 @@ stop_git_daemon() {
8282
kill "$GIT_DAEMON_PID"
8383
wait "$GIT_DAEMON_PID" >&3 2>&4
8484
ret=$?
85-
# expect exit with status 143 = 128+15 for signal TERM=15
86-
if test $ret -ne 143
85+
if test_match_signal 15 $?
8786
then
8887
error "git daemon exited with status: $ret"
8988
fi

0 commit comments

Comments
 (0)