t5562: replace /dev/zero with a pipe from generate_zero_bytes

To help platforms that lack /dev/zero (e.g. NonStop), replace use of /dev/zero to feed "git http-backend" with a pipe of output from the generate_zero_bytes helper. Signed-off-by: Randall S. Becker <rsbecker@nexbridge.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Randall S. Becker committed Feb 9, 2019 at 13:59 UTC cc95bc20255e5782d2133f6173609efb1f9129c7
1 file changed +2 -2
t/t5562-http-backend-content-length.sh
+2 -2
@@ -143,14 +143,14 @@ test_expect_success GZIP 'push gzipped empty' '
143
144 test_expect_success 'CONTENT_LENGTH overflow ssite_t' '
145 NOT_FIT_IN_SSIZE=$(ssize_b100dots) &&
146 - env \
146 + generate_zero_bytes infinity | env \
147 CONTENT_TYPE=application/x-git-upload-pack-request \
148 QUERY_STRING=/repo.git/git-upload-pack \
149 PATH_TRANSLATED="$PWD"/.git/git-upload-pack \
150 GIT_HTTP_EXPORT_ALL=TRUE \
151 REQUEST_METHOD=POST \
152 CONTENT_LENGTH="$NOT_FIT_IN_SSIZE" \
153 - git http-backend </dev/zero >/dev/null 2>err &&
153 + git http-backend >/dev/null 2>err &&
154 grep "fatal:.*CONTENT_LENGTH" err
155 '
156