3 test_description
='signals work as we expect'
5 TEST_PASSES_SANITIZE_LEAK
=true
14 test_expect_success
'sigchain works' '
15 { test-tool sigchain >actual; ret=$?; } &&
17 # Signal death by raise() on Windows acts like exit(3),
18 # regardless of the signal number. So we must allow that
19 # as well as the normal signal check.
20 test_match_signal 15 "$ret" ||
23 test_cmp expect actual
26 test_expect_success
!MINGW
'signals are propagated using shell convention' '
27 # we use exec here to avoid any sub-shell interpretation
29 git config alias.sigterm "!exec test-tool sigchain" &&
30 test_expect_code 143 git sigterm
34 for i
in $
(test_seq
1 100)
36 git
diff --cached --binary ||
return
40 test_expect_success
'create blob' '
41 test-tool genrandom foo 16384 >file &&
45 test_expect_success
!MINGW
'a constipated git dies with SIGPIPE' '
46 OUT=$( ((large_git; echo $? 1>&3) | :) 3>&1 ) &&
47 test_match_signal 13 "$OUT"
50 test_expect_success
!MINGW
'a constipated git dies with SIGPIPE even if parent ignores it' '
51 OUT=$( ((trap "" PIPE && large_git; echo $? 1>&3) | :) 3>&1 ) &&
52 test_match_signal 13 "$OUT"