Patch for JTreg test java/net/MulticastSocket/SetOutgoingIf.java
Christopher Hegarty -Sun Microsystems Ireland
Christopher.Hegarty at Sun.COM
Wed Sep 23 15:04:03 UTC 2009
This change should be integrated into the tl/jdk  repository. You can
plan to integrate after code review, or if you prefer just let me know
and I can take care of it for you.
Pavel Tisnovsky wrote:
> thank you for your answer. I'll update the test and make the webrev.
> FYI: in fact, the test java/net/MulticastSocket/Test.java fails too on
> my machine, but I just not (yet) investigated the issue. It fails with
> exception java.net.SocketException: Cannot assign requested address.
> Christopher Hegarty -Sun Microsystems Ireland wrote:
>> [cc'ing net-dev]
>> Alan Bateman wrote:
>>> Pavel Tisnovsky wrote:
>>>> two-lines patch for regression test
>>>> java/net/MulticastSocket/SetOutgoingIf.java is exposed at
>>>> The test machine (where this test fails) has six network interfaces,
>>>> but only two of them, namely eth2 and virbr0, can be used to send
>>>> multicast packets. But the test does not check interface attributes
>>>> and tries to use _ALL_ network interfaces (excluding loopback
>>>> device, of course) to send and then receive multicast packets.
>>>> It fails, but the failure message depends on current network
>>>> interface order (order is not guaranteed) returned by
>>>> NetworkInterface.getNetworkInterfaces(). Patch check, if the given
>>>> network interface is able to send multicast packets.
>>>> I think, the patch could be applied to OpenJDK6 too.
>>>> Pavel Tisnovsky
>>> Pavel - this looks good me, although I think you should send it to
>>> net-dev. To make it more reliable you could also check isUp as
>>> getNetworkInterface may enumerate network interfaces that are down.
>> I agree with Alan here, it is best to check isUp also.
>> Alan created the following bug for this:
>> 6884837: "test/java/net/MulticastSocket/SetOutgoingIf.java should
>> check if interfaces are up/support multicast"
>> I see you have push access, so if you make the appropriate changes
>> (mentioned above) I can review the webrev and you can use the above
>> bug number and description to push the changeset.
>> P.S. I wonder if we have a similar issue with some of the other
>> multicasting tests?
More information about the core-libs-dev