[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
wget2 | `test-redirection` fails for HTTP/2 (#597)
From: |
Avinash Sonawane (@rootkea) |
Subject: |
wget2 | `test-redirection` fails for HTTP/2 (#597) |
Date: |
Sun, 24 Apr 2022 19:00:54 +0000 |
Avinash Sonawane created an issue: https://gitlab.com/gnuwget/wget2/-/issues/597
Hello!
test-redirection fails for HTTP/2 because:
```
if (system("if [ \"$(grep -c 'HTTP ERROR response 501'
../test-redirection.log)\" != 2 ]; then exit 1; fi"))
```
this check fails since on environments which has libmicrohttpd-http2 installed
there are two separate tests being run: 1. For HTTP/1.1 and 2. For HTTP/2. Each
run trying 2 tries. And so there are total 4 'HTTP ERROR response 501' in
test-redirection.log if is libmicrohttpd-http2 installed otherwise there are
only 2 'HTTP ERROR response 501' (2 tries with HTTP/1.1)
A quick "fix" is to check `grep -c % 2` being 0 or `grep -c == 2 || grep -c ==
4` (explicit check).
But it feels that this test fail-success check should be moved in
`wget_test()/libtest.c`. Maybe with an extra options like `WGET_TEST_PATTERN`
and `WGET_TEST_PATTERN_COUNT`. This way any test which needs to check the
pattern in .log file to decide success/failure can do so separately for
HTTP/1.1 and HTTP/2.
But then again, this is the only one test in test-suite so far which needs to
check the log file so maybe it's okay to have this test check in
test-redirection.c?
--
Reply to this email directly or view it on GitLab:
https://gitlab.com/gnuwget/wget2/-/issues/597
You're receiving this email because of your account on gitlab.com.
- wget2 | `test-redirection` fails for HTTP/2 (#597),
Avinash Sonawane (@rootkea) <=