diff options
author | Jiang Xin <worldhello.net@gmail.com> | 2020-11-11 19:32:01 +0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-11-11 12:46:56 -0800 |
commit | f65003b4c4abea49a00cc9f3d87b9f37db6b48f1 (patch) | |
tree | 9518439d6d8638d14588af6de29ed8490f4f7c42 /t/t9162-git-svn-dcommit-interactive.sh | |
parent | t5411: new helper filter_out_user_friendly_and_stable_output (diff) | |
download | tgif-f65003b4c4abea49a00cc9f3d87b9f37db6b48f1.tar.xz |
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/t9162-git-svn-dcommit-interactive.sh')
0 files changed, 0 insertions, 0 deletions