Skip to content
Snippets Groups Projects
Commit 0539071b authored by Max Kirillov's avatar Max Kirillov Committed by Junio C Hamano
Browse files

t5562: do not reuse output files


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 using separated output and error file for each test,
apprending the test number to their name.

Reported-by: default avatarCarlo Arenas <carenas@gmail.com>
Helped-by: default avatarCarlo Arenas <carenas@gmail.com>
Helped-by: default avatarJunio C Hamano <gitster@pobox.com>
Signed-off-by: default avatarMax Kirillov <max@max630.net>
Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
parent ca1b4116
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -8,12 +8,12 @@ test_lazy_prereq GZIP 'gzip --version'
verify_http_result() {
# some fatal errors still produce status 200
# so check if there is the error message
if grep 'fatal:' act.err
if grep 'fatal:' act.err.$test_count
then
return 1
fi
 
if ! grep "Status" act.out >act
if ! grep "Status" act.out.$test_count >act
then
printf "Status: 200 OK\r\n" >act
fi
Loading
Loading
@@ -33,7 +33,7 @@ test_http_env() {
REQUEST_METHOD=POST \
"$PERL_PATH" \
"$TEST_DIRECTORY"/t5562/invoke-with-content-length.pl \
"$request_body" git http-backend >act.out 2>act.err
"$request_body" git http-backend >act.out.$test_count 2>act.err.$test_count
}
 
ssize_b100dots() {
Loading
Loading
@@ -161,7 +161,7 @@ test_expect_success 'empty CONTENT_LENGTH' '
GIT_HTTP_EXPORT_ALL=TRUE \
REQUEST_METHOD=GET \
CONTENT_LENGTH="" \
git http-backend <empty_body >act.out 2>act.err &&
git http-backend <empty_body >act.out.$test_count 2>act.err.$test_count &&
verify_http_result "200 OK"
'
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment