Skip to content

Commit cc95bc2

Browse files
rsbeckercagitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 24b451e commit cc95bc2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

t/t5562-http-backend-content-length.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,14 +143,14 @@ test_expect_success GZIP 'push gzipped empty' '
143143

144144
test_expect_success 'CONTENT_LENGTH overflow ssite_t' '
145145
NOT_FIT_IN_SSIZE=$(ssize_b100dots) &&
146-
env \
146+
generate_zero_bytes infinity | env \
147147
CONTENT_TYPE=application/x-git-upload-pack-request \
148148
QUERY_STRING=/repo.git/git-upload-pack \
149149
PATH_TRANSLATED="$PWD"/.git/git-upload-pack \
150150
GIT_HTTP_EXPORT_ALL=TRUE \
151151
REQUEST_METHOD=POST \
152152
CONTENT_LENGTH="$NOT_FIT_IN_SSIZE" \
153-
git http-backend </dev/zero >/dev/null 2>err &&
153+
git http-backend >/dev/null 2>err &&
154154
grep "fatal:.*CONTENT_LENGTH" err
155155
'
156156

0 commit comments

Comments
 (0)