On 06/02/2017 11:38 AM, Tomas Hozza wrote:
> Hi.
> 
> In Fedora 26+ the /etc/hosts lists "localhost" as a domain for both 127.0.0.1 
> and ::1. This makes wget's testsuite to fail during build.
> 
> Failing tests:
> Test--https.py
> Test-pinnedpubkey-der-https.py
> Test-pinnedpubkey-hash-https.py
> Test-pinnedpubkey-pem-https.py

There are systems that are
- IPv6 only
- IPv4 only
- IPv6 + IPv4

each with or without localhost entries in /etc/hosts.

On IPv6 + IPv4 systems there might be none, one or two 'localhost'
entries in /etc/hosts.

With two entries I already experienced a 'round-robin' like resolving of
'localhost'.

To achieve a stable test suite behavior, the test server should open a
listening port on all IPs of 'localhost'. We have two problems here:
1. neither the Perl nor the Python test suite server are ready to handle
more than one port, currently.
2. opening a port on *any* interface might be a security issue on some
systems.

Any idea what the best solution is here ?


Also the clients make some assumptions, some use 'localhost' to contact
the test server, some use 127.0.0.1. Both may fail under certain conditions.

The easiest solution would be when we assume that 'localhost' always
(stable) resolves to either '127.0.0.1' or '::1'. Then we could replace
hard-coded '127.0.0.1' by 'localhost'. But for the 'round-robin' or
'random' resolving scenario we have to change the test suite to open
ports for each 'localhost' IP.

Using 'localhost' instead of 127.0.0.1 in the tests should also fix
possible test certificate problems.

With Best Regards, Tim

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to