[PATCH] t0005: skip signal death exit code test on Windows
- From
Johannes Sixt <j.sixt@viscovery.net>
- Date
- Jun 6, 2013, 06:34 UTC
- Message-ID
- <51B02D81.3000700@viscovery.net>
- In-Reply-To
- <20130605071206.GC14427@sigill.intra.peff.net>
From: Johannes Sixt <j6t@kdbg.org>
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() 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 <j6t@kdbg.org> --- t/t0005-signals.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/t/t0005-signals.sh b/t/t0005-signals.sh index ad9e604..981437b 100755 --- a/t/t0005-signals.sh +++ b/t/t0005-signals.sh @@ -20,7 +20,7 @@ test_expect_success 'sigchain works' ' test_cmp expect actual ' -test_expect_success 'signals are propagated using shell convention' ' +test_expect_success !MINGW 'signals are propagated using shell convention' ' # we use exec here to avoid any sub-shell interpretation # of the exit code git config alias.sigterm "!exec test-sigchain" &&
-- 1.8.3.1489.g15123b5