On Mon, Sep 07, 2015 at 11:59:41PM +0200, Tobias Pape wrote:
> Hi all
>
> I'm just debugging strange things on a jenkins slave
> (thanks Tony!) and found that some socket tests choke
> because:
> - localhost there is 127.0.0.1
> - BUT the local host name (squeak-debian32, but irrelevant) is 127.0.1.1
> This is documented for debian systems[1].
>
> Yet, in SocketTest, there's a testRemoteAddress, that uses a
> listenerSocket (that on that system will listen on 127.0.1.1) but once it
> accepts a client connection (from 127.0.1.1), the serverSocket (that gets initalized
> via the listenerSocket) reports 127.0.0.1 for its remote address, and hence the test fails.
>
> Similar for testLocalAddress, when connecting to 127.0.1.1, the clients local address
> reports 127.0.0.1. Is primitiveSocketLocalAddress broken?
I don't think that primitiveSocketLocalAddress is broken. It correctly answers
the address associated with the local host name, which is not necessarily the
same as the address associated with the name 'localhost'.
The update that you did in NetworkTests-topa.38 looks like the right thing to
do. It uses the address associated with the name 'localhost', not the address
associated with the local host name, and that would be the intended behavior
for the tests.
Dave
>
> Best regards
> -Tobias
>
>
> [1]:
https://www.debian.org/doc/manuals/debian-reference/ch05.en.html#_the_hostname_resolution