Merge branch 'mk/t5562-no-input-to-too-large-an-input-test'
authorJunio C Hamano <gitster@pobox.com>
Tue, 19 Feb 2019 21:18:08 +0000 (13:18 -0800)
committerJunio C Hamano <gitster@pobox.com>
Tue, 19 Feb 2019 21:18:08 +0000 (13:18 -0800)
* mk/t5562-no-input-to-too-large-an-input-test:
t5562: do not depend on /dev/zero
Revert "t5562: replace /dev/zero with a pipe from generate_zero_bytes"

1  2 
t/t5562-http-backend-content-length.sh
index f36c7f4f9d3fc6ef1f18806920ec4a9af8614f83,436c261c86b0f9b9b0921177614403887f7fa61c..f0f425b2cf5746fb3f7205909cbc93eb25a84874
@@@ -8,12 -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
@@@ -33,7 -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() {
@@@ -143,14 -143,14 +143,14 @@@ test_expect_success GZIP 'push gzipped 
  
  test_expect_success 'CONTENT_LENGTH overflow ssite_t' '
        NOT_FIT_IN_SSIZE=$(ssize_b100dots) &&
-       generate_zero_bytes infinity  | env \
+       env \
                CONTENT_TYPE=application/x-git-upload-pack-request \
                QUERY_STRING=/repo.git/git-upload-pack \
                PATH_TRANSLATED="$PWD"/.git/git-upload-pack \
                GIT_HTTP_EXPORT_ALL=TRUE \
                REQUEST_METHOD=POST \
                CONTENT_LENGTH="$NOT_FIT_IN_SSIZE" \
-               git http-backend >/dev/null 2>err &&
+               git http-backend </dev/null >/dev/null 2>err &&
        grep "fatal:.*CONTENT_LENGTH" err
  '
  
@@@ -161,7 -161,7 +161,7 @@@ test_expect_success 'empty CONTENT_LENG
                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"
  '