Re: [PATCH 1/2] t5516/t5601: avoid using `localhost` for failing HTTPS requests
- From
Jeff King <peff@peff.net>
- Date
- Nov 1, 2022, 02:03 UTC
- Message-ID
- <Y2B+jn4goN4OIcwL@coredump.intra.peff.net>
- In-Reply-To
- <Y2BYKxxkG57XAV/1@coredump.intra.peff.net>
On Mon, Oct 31, 2022 at 07:20:11PM -0400, Jeff King wrote:
Show 8 quoted lines
> > - The DNS resolver, or the local firewall, might take a substantial > > amount of time (or forever, whichever comes first) to fail to connect, > > slowing down the test cases unnecessarily. > > Right. I think we assume that DNS resolution of localhost is fast-ish, > as we use it in other https tests. But I could certainly imagine a local > firewall causing issues (especially as this is real port 443, whereas > our other tests are usually high ports).
Actually, I am wrong about DNS here. We use a bare 127.0.0.1 in lib-httpd.sh, so DNS may indeed be the source of the issue here. That _might_ mean that using the bare IP would be safe here, but I would not want to bet on it. Using different port numbers, plus not expecting a listener on the other end, might cause different outcomes than we see in the other tests.
I do think moving these tests to use a real http server is a better solution, though. I'll provide a patch in a moment.
-Peff