mirror of
https://github.com/openjdk/jdk.git
synced 2026-08-03 06:35:31 +00:00
Prior to this patch, the test failed if the hostname returned by `startListening()` didn't match either the string "localhost" or the IP addresses associated with "localhost", but this is fragile. On machines where a reverse lookup on 127.0.0.1 returns a string other than localhost, the test fails, like in the following example: ``` >_ jdb -connect com.sun.jdi.SocketListen:port=50000 Listening at address: kubernetes.docker.internal:50000 ... >_ make test TEST=.../startlis001/TestDescription.java ... Test case #1: start listening the address kubernetes.docker.internal:49532 Expected addresses: localhost:null or 127.0.0.1:null or 0:0:0:0:0:0:0:1:null ... ``` As a workaround, this patch uses `InetAddress.isLoopbackAddress()` on the hostname portion of the address that is being listened. Validated this patch on machines where the reverse lookup resolves to either "localhost" or a different string.
Welcome to the JDK!
For build instructions please see the online documentation, or either of these files:
- doc/building.html (html version)
- doc/building.md (markdown version)
See https://openjdk.org/ for more information about the OpenJDK Community and the JDK and see https://bugs.openjdk.org for JDK issue tracking.
Description
Languages
Java
73.9%
C++
14.3%
C
7.8%
Assembly
2.7%
Objective-C
0.4%
Other
0.7%