I just tried running these tests with -Djava.net.preferIPv4Stack set
to true, but they still fail. I remember working on some of these
failures in networking where ipv6 multicast was buggy,
but absolutely nothing made those tests work.
However, in this case, if we make sure that the address that the sender
is sending the packets to and the address that the listener is binding
to is the same, the tests are passing.
The fix in this webrev is not working for Windows since the tests try to
connect to 0.0.0.0. So we have to think of some other solution.
- Kurchi
On 7/16/2012 3:56 AM, Alan Bateman wrote:
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
--
-Kurchi