diff options
author | Jiang Xin <worldhello.net@gmail.com> | 2020-11-11 11:32:01 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-11-11 20:46:56 (GMT) |
commit | f65003b4c4abea49a00cc9f3d87b9f37db6b48f1 (patch) | |
tree | 9518439d6d8638d14588af6de29ed8490f4f7c42 /t/t5411/test-0026-push-options.sh | |
parent | cf3d868f353c4a5a9ecf4fbc2a44960671ba59cb (diff) | |
download | git-f65003b4c4abea49a00cc9f3d87b9f37db6b48f1.zip git-f65003b4c4abea49a00cc9f3d87b9f37db6b48f1.tar.gz git-f65003b4c4abea49a00cc9f3d87b9f37db6b48f1.tar.bz2 |
receive-pack: gently write messages to proc-receive
Johannes found a flaky hang in `t5411/test-0013-bad-protocol.sh` in the
osx-clang job of the CI/PR builds, and ran into an issue when using
the `--stress` option with the following error messages:
fatal: unable to write flush packet: Broken pipe
send-pack: unexpected disconnect while reading sideband packet
fatal: the remote end hung up unexpectedly
In this test case, the "proc-receive" hook sends an error message and
dies earlier. While "receive-pack" on the other side of the pipe
should forward the error message of the "proc-receive" hook to the
client side, but it fails to do so. This is because "receive-pack"
uses `packet_write_fmt()` and `packet_flush()` to write pkt-line
message to "proc-receive" hook, and these functions die immediately
when pipe is broken. Using "gently" forms for these functions will get
more predicable output.
Add more "--die-*" options to test helper to test different stages of
the protocol between "receive-pack" and "proc-receive" hook.
Reported-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Suggested-by: Jeff King <peff@peff.net>
Signed-off-by: Jiang Xin <zhiyou.jx@alibaba-inc.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5411/test-0026-push-options.sh')
0 files changed, 0 insertions, 0 deletions