Code Review Request: 7183800: TEST_BUG: Update tests to run on Ubuntu 12.04 (localhost is 127.0.1.1)

Alan Bateman Alan.Bateman at oracle.com
Mon Jul 16 03:56:39 PDT 2012


On 15/07/2012 19:54, Kurchi Subhra Hazra wrote:
> Hi,
>
>    Some tests in our test repository assume that 
> InetAddress.getLocalHost() will return 127.0.0.1. However, with
> linux systems running Ubuntu 12.04 now returning 127.0.1.1 as 
> localhost, these tests are failing. I have changed two
> of the NIO tests to remove their dependency on 
> InetAddress.getLocalHost(). A third test has been added to
> the ProblemList.txt since the changes required for it are more involved.
>
> Bug: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7183800
> Webrev: http://cr.openjdk.java.net/~khazra/7183800/webrev.00/
>
As Chris pointed out, these tests bind to the wildcard address and you 
need a specific address to setup the address association, otherwise it's 
highly platform/implementation specific as to whether it will do as 
intended. So I think the proposed changes will cause problems where you 
can't connect to 0.0.0.0 and so I think we need to look for another 
solution.

Given that none of the TCP tests fail then it suggests it mean that 
something else is going on, maybe something in the Ubuntu 12 
configuration. Do these tests run if IPv6 is disabled? We've had issues 
with some distributions where multicast tests fail and these have always 
come down to iptables blocking IPv6 multicast packets causing the tests 
to fail. I just wonder if we have something similar here.

-Alan



More information about the nio-dev mailing list