Skip to content

Commit 04422c7

Browse files
j6tgitster
authored andcommitted
t0005: skip signal death exit code test on Windows
The test case depends on that test-sigchain can commit suicide by a call to raise(SIGTERM) in a way that run-command.c::wait_or_whine() can detect as death through a signal. There are no POSIX signals on Windows, and a sufficiently close emulation is not available in the Microsoft C runtime (and probably not even possible). The particular deficiency is that when a signal is raise()d whose SIG_DFL action will cause process death (SIGTERM in this case), the implementation of raise() in msvcrt just calls exit(3). We could check for exit code 3 in addition to 143, but that would miss the point of the test entirely. Hence, just skip it on Windows. Signed-off-by: Johannes Sixt <[email protected]> Acked-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent e828908 commit 04422c7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

t/t0005-signals.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ test_expect_success 'sigchain works' '
2020
test_cmp expect actual
2121
'
2222

23-
test_expect_success 'signals are propagated using shell convention' '
23+
test_expect_success !MINGW 'signals are propagated using shell convention' '
2424
# we use exec here to avoid any sub-shell interpretation
2525
# of the exit code
2626
git config alias.sigterm "!exec test-sigchain" &&

0 commit comments

Comments
 (0)