Some expected failures of git-http-backend leaves running its children (receive-pack or upload-pack) which still hold opened descriptors to act.err and with some probability they live long enough to write there their failure messages after next test has already truncated the files. This causes occasional failures of the test script. Avoid the issue by unlinking the older files before writing to them. Reported-by: Carlo Arenas <carenas@xxxxxxxxx> Helped-by: Carlo Arenas <carenas@xxxxxxxxx> Helped-by: Junio C Hamano <gitster@xxxxxxxxx> Signed-off-by: Max Kirillov <max@xxxxxxxxxx> --- Thanks. Updated t/t5562-http-backend-content-length.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/t/t5562-http-backend-content-length.sh b/t/t5562-http-backend-content-length.sh index 90d890d02f..3a9f7a14e2 100755 --- a/t/t5562-http-backend-content-length.sh +++ b/t/t5562-http-backend-content-length.sh @@ -25,6 +25,7 @@ test_http_env() { handler_type="$1" request_body="$2" shift + rm -f act.out act.err && env \ CONTENT_TYPE="application/x-git-$handler_type-pack-request" \ QUERY_STRING="/repo.git/git-$handler_type-pack" \ @@ -155,6 +156,7 @@ test_expect_success 'CONTENT_LENGTH overflow ssite_t' ' ' test_expect_success 'empty CONTENT_LENGTH' ' + rm -f act.out act.err && env \ QUERY_STRING="service=git-receive-pack" \ PATH_TRANSLATED="$PWD"/.git/info/refs \ -- 2.19.0.1202.g68e1e8f04e