git-commit-vandalism/t/t5411
Jiang Xin f65003b4c4 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>
2020-11-11 12:46:56 -08:00
..
common-functions.sh t5411: new helper filter_out_user_friendly_and_stable_output 2020-11-11 12:46:55 -08:00
once-0010-report-status-v1.sh t5411: finish preparing for main being the default branch name 2020-10-31 13:15:17 -07:00
test-0000-standard-git-push.sh t5411: new helper filter_out_user_friendly_and_stable_output 2020-11-11 12:46:55 -08:00
test-0001-standard-git-push--porcelain.sh t5411: new helper filter_out_user_friendly_and_stable_output 2020-11-11 12:46:55 -08:00
test-0002-pre-receive-declined.sh t5411: adjust the remaining support files for init.defaultBranch=main 2020-10-31 13:15:17 -07:00
test-0003-pre-receive-declined--porcelain.sh t5411: adjust the remaining support files for init.defaultBranch=main 2020-10-31 13:15:17 -07:00
test-0010-proc-receive-settings.sh receive-pack: new config receive.procReceiveRefs 2020-08-27 12:47:47 -07:00
test-0011-no-hook-error.sh t5411: adjust the remaining support files for init.defaultBranch=main 2020-10-31 13:15:17 -07:00
test-0012-no-hook-error--porcelain.sh t5411: adjust the remaining support files for init.defaultBranch=main 2020-10-31 13:15:17 -07:00
test-0013-bad-protocol.sh receive-pack: gently write messages to proc-receive 2020-11-11 12:46:56 -08:00
test-0014-bad-protocol--porcelain.sh receive-pack: gently write messages to proc-receive 2020-11-11 12:46:56 -08:00
test-0020-report-ng.sh t5411: adjust the remaining support files for init.defaultBranch=main 2020-10-31 13:15:17 -07:00
test-0021-report-ng--porcelain.sh t5411: adjust the remaining support files for init.defaultBranch=main 2020-10-31 13:15:17 -07:00
test-0022-report-unexpect-ref.sh t5411: adjust the remaining support files for init.defaultBranch=main 2020-10-31 13:15:17 -07:00
test-0023-report-unexpect-ref--porcelain.sh t5411: adjust the remaining support files for init.defaultBranch=main 2020-10-31 13:15:17 -07:00
test-0024-report-unknown-ref.sh t5411: adjust the remaining support files for init.defaultBranch=main 2020-10-31 13:15:17 -07:00
test-0025-report-unknown-ref--porcelain.sh t5411: adjust the remaining support files for init.defaultBranch=main 2020-10-31 13:15:17 -07:00
test-0026-push-options.sh t5411: adjust the remaining support files for init.defaultBranch=main 2020-10-31 13:15:17 -07:00
test-0027-push-options--porcelain.sh t5411: adjust the remaining support files for init.defaultBranch=main 2020-10-31 13:15:17 -07:00
test-0030-report-ok.sh t5411: start adjusting the support files for init.defaultBranch=main 2020-10-31 13:15:17 -07:00
test-0031-report-ok--porcelain.sh t5411: start adjusting the support files for init.defaultBranch=main 2020-10-31 13:15:17 -07:00
test-0032-report-with-options.sh t5411: start adjusting the support files for init.defaultBranch=main 2020-10-31 13:15:17 -07:00
test-0033-report-with-options--porcelain.sh t5411: start adjusting the support files for init.defaultBranch=main 2020-10-31 13:15:17 -07:00
test-0034-report-ft.sh t5411: start adjusting the support files for init.defaultBranch=main 2020-10-31 13:15:17 -07:00
test-0035-report-ft--porcelain.sh t5411: start adjusting the support files for init.defaultBranch=main 2020-10-31 13:15:17 -07:00
test-0036-report-multi-rewrite-for-one-ref.sh t5411: start adjusting the support files for init.defaultBranch=main 2020-10-31 13:15:17 -07:00
test-0037-report-multi-rewrite-for-one-ref--porcelain.sh t5411: start adjusting the support files for init.defaultBranch=main 2020-10-31 13:15:17 -07:00
test-0038-report-mixed-refs.sh t5411: start adjusting the support files for init.defaultBranch=main 2020-10-31 13:15:17 -07:00
test-0039-report-mixed-refs--porcelain.sh t5411: start adjusting the support files for init.defaultBranch=main 2020-10-31 13:15:17 -07:00
test-0040-process-all-refs.sh t5411: start adjusting the support files for init.defaultBranch=main 2020-10-31 13:15:17 -07:00
test-0041-process-all-refs--porcelain.sh t5411: start adjusting the support files for init.defaultBranch=main 2020-10-31 13:15:17 -07:00
test-0050-proc-receive-refs-with-modifiers.sh t5411: start adjusting the support files for init.defaultBranch=main 2020-10-31 13:15:17 -07:00