From: Max Kirillov Date: Fri, 15 Feb 2019 16:42:37 +0000 (+0200) Subject: t5562: do not depend on /dev/zero X-Git-Tag: v2.21.0-rc2~2^2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/709417507567d1423acd06f55fb6256af7ad3847 t5562: do not depend on /dev/zero It was reported [1] that NonStop platform does not have /dev/zero. The test uses /dev/zero as a dummy input. Passing case (http-backed failed because of too big input size) should not be reading anything from it. If http-backend would erroneously try to read any data returning EOF probably would be even safer than providing some meaningless data. Replace /dev/zero with /dev/null to avoid issues with platforms which do not have /dev/zero. [1] https://public-inbox.org/git/20190209185930.5256-4-randall.s.becker@rogers.com/ Reported-by: Randall S. Becker Signed-off-by: Max Kirillov Signed-off-by: Junio C Hamano --- diff --git a/t/t5562-http-backend-content-length.sh b/t/t5562-http-backend-content-length.sh index 90d890d02f..436c261c86 100755 --- a/t/t5562-http-backend-content-length.sh +++ b/t/t5562-http-backend-content-length.sh @@ -150,7 +150,7 @@ test_expect_success 'CONTENT_LENGTH overflow ssite_t' ' 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 2>err && grep "fatal:.*CONTENT_LENGTH" err '