Page MenuHomePhabricator

[lldb] [unittest] Avoid mixing '' and 'localhost'

Authored by mgorny on Feb 12 2019, 8:40 AM.



Fix the tests not to use '' and 'localhost' interchangeably.
More specifically, since tests bind specifically to, connect
to that address as well; using 'localhost' can resolve to IPv6 address
which can cause issues -- for example, if the matching port happens to
be used by some other process, the tests hang forever waiting for
the client to connect.

While technically the case of randomly selected IPv4 port being taken
on IPv6 loopback is not very likely, NetBSD happens to be suffering from
some weird kernel issue where connection to that port succeeds
nevertheless. Until we can really figure out what goes wrong there,
this saves us from the tests hanging randomly.

Diff Detail


Event Timeline

mgorny created this revision.Feb 12 2019, 8:40 AM
clayborg accepted this revision.Feb 12 2019, 8:48 AM
clayborg added a subscriber: clayborg.

Yeah localhost can cause problems if someone has a custom mapping in their network config file.

This revision is now accepted and ready to land.Feb 12 2019, 8:48 AM
krytarowski accepted this revision.Feb 12 2019, 9:22 AM

Short term this looks fine.

This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptFeb 12 2019, 10:08 AM