RFR: JDK-8280498: [aix]: jdk/java/net/Inet4Address/PingThis.java fails

Michael Felt duke at openjdk.java.net
Fri Jan 28 15:46:14 UTC 2022


On Mon, 10 Jan 2022 15:56:07 GMT, Michael Felt <duke at openjdk.java.net> wrote:

> with IP "0.0.0.0"
> 
> - it either does nothing and ping fails, or, in some virtual environments
> is treated as the default route address.
> - IPv6 support for ::1 is available since 1977; however, ::0 is not accepted
> as a vaild psuedo IPv6 address. '::1' must be used instead.
> 
> ping: bind: The socket name is not available on this system.
> ping: bind: The socket name is not available on this system.
> PING ::1: (::1): 56 data bytes
> 64 bytes from ::1: icmp_seq=0 ttl=255 time=0.037 ms
> 64 bytes from ::1: icmp_seq=1 ttl=255 time=0.045 ms
> 
> --- ::1 ping statistics ---
> 2 packets transmitted, 2 packets received, 0% packet loss
> round-trip min/avg/max = 0/0/0 ms
> PING ::1: (::1): 56 data bytes
> 64 bytes from ::1: icmp_seq=0 ttl=255 time=0.052 ms
> 64 bytes from ::1: icmp_seq=1 ttl=255 time=0.047 ms
> 
> --- ::1 ping statistics ---
> 2 packets transmitted, 2 packets received, 0% packet loss
> 
> 
> A long commit message. 
> 
> This came to light because some systems failed with IPv4 (those that passed
> replaced 0.0.0.0 with the default router. but most just fail - not substituting
> 0.0.0.0 with 127.0.0.1. However, InetAddress.getByName("") returns 127.0.0.1
> which compares well with other platform's behavior.

From: Daniel Fuchs ***@***.***> 
Sent: Friday, 28 January 2022 16:15
To: openjdk/jdk ***@***.***>
Cc: Michael Felt ***@***.***>; Mention ***@***.***>
Subject: Re: [openjdk/jdk] JDK-8280498: [aix]: jdk/java/net/Inet4Address/PingThis.java fails (PR #7013)

 

@dfuch commented on this pull request.

  _____  

In test/jdk/java/net/Inet4Address/PingThis.java <https://github.com/openjdk/jdk/pull/7013#discussion_r794593032> :

>          IPSupport.throwSkippedExceptionIfNonOperational();
 
         List<String> addrs = new ArrayList<String>();
 
         if (IPSupport.hasIPv4()) {
-            addrs.add("0.0.0.0");
+            if (isAIX) {
+                addrs.add("");
+            }
+            else {
+                addrs.add("0.0.0.0");
+            }

>From the description and evaluation of JDK-7163874 <https://bugs.openjdk.java.net/browse/JDK-7163874>  it seems that skipping this test on AIX would be reasonable.

Some operating systems seem to accept 0.0.0.0 as input - and reply with 127.0.0.1. The changes made for JDK-7163874 simply makes sure that such a reply is not rejected as invalid on the ground that the received address is not the same as the input address. If 0.0.0.0 is not a valid input for the underlying operating system, then the test has no object and should probably be skipped.

I had read these comments – an important comment was:
https://bugs.openjdk.java.net/browse/JDK-7163874?focusedCommentId=12164566 <https://bugs.openjdk.java.net/browse/JDK-7163874?focusedCommentId=12164566&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-12164566> &page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-12164566,

 <https://bugs.openjdk.java.net/secure/ViewProfile.jspa?name=alanb> Alan Bateman added a comment - 2012-04-24 08:31 

BT2:EVALUATION

This isn't really a bug and highly platform specific if the native ping command can ping this address. 

 

*	So – personally, I am fine with skipping the test – if it is not doing what it was designed to do. However, I would also consider changing the name of the test.
*	Again, head spinning again: the ticket mentioned says InetAddress.isReachable should support ping 0.0.0.0. IMHO: if that is an architectural (design) issue – that is true – THEN – the code for isReachable() needs to account for platform differences.
*	However, if the architecture (design) states that isReachable() (not the test) is platform specific then there is a argument for simply excluding the test (as a known issue for future queries) in, e.g., ci-pipelines such as: https://github.com/adoptium/ci-jenkins-pipelines
*	I am also happy with that – I just did not want to take a ‘flight’ reaction and skip it because it was not convenient to include it.

—
Reply to this email directly, view it on GitHub <https://github.com/openjdk/jdk/pull/7013#discussion_r794593032> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/ACSZR5NVULKYXHZTT6CVH7LUYKXI7ANCNFSM5LUAHSPA> .
You are receiving this because you were mentioned.Message ID: ***@***.***>

-------------

PR: https://git.openjdk.java.net/jdk/pull/7013


More information about the net-dev mailing list