[jdk11u-dev] Integrated: 8251155: HostIdentifier fails to canonicalize hostnames starting with digits
Jie Fu
jiefu at openjdk.java.net
Thu Oct 14 12:27:00 UTC 2021
On Wed, 13 Oct 2021 03:48:07 GMT, Jie Fu <jiefu at openjdk.org> wrote:
> Hi all,
>
> I'd like to backport JDK-8251155 to jdk11u.
>
> Tools like jps in jdk11u still fail on machines when the hostnames starting with digits.
> And this bug can be reproduced by jtreg tests:
>
> sun/tools/jstatd/TestJstatdExternalRegistry.java
> sun/tools/jstatd/TestJstatdPort.java
> sun/tools/jstatd/TestJstatdPortAndServer.java
>
>
> It's worth doing this since quite a lot of cloud hosts are named with digits only.
> Although patch can be applied cleanly, the backported test has been adjusted (see the following diff) to make it successfully compiled with the jdk11 test framework.
>
> diff --git a/test/jdk/sun/tools/jps/TestJpsHostName.java b/test/jdk/sun/tools/jps/TestJpsHostName.java
> index 4ef9d91ac3..9d15399a86 100644
> --- a/test/jdk/sun/tools/jps/TestJpsHostName.java
> +++ b/test/jdk/sun/tools/jps/TestJpsHostName.java
> @@ -21,14 +21,14 @@
> * questions.
> */
>
> -import jdk.test.lib.process.OutputAnalyzer;
> +import jdk.testlibrary.OutputAnalyzer;
>
> /*
> * @test
> * @bug 8251155
> * @summary Test host names starting with digits
> - * @library /test/lib
> - * @build JpsHelper
> + * @library /lib/testlibrary /test/lib
> + * @build jdk.testlibrary.* JpsHelper
> * @run driver TestJpsHostName
> */
> public class TestJpsHostName {
>
>
> Testing:
> - Affected tests passed after this patch
> - tier1~3 on Linux/x64, no regression
>
> Thanks.
> Best regards,
> Jie
This pull request has now been integrated.
Changeset: 596677e8
Author: Jie Fu <jiefu at openjdk.org>
Committer: Goetz Lindenmaier <goetz at openjdk.org>
URL: https://git.openjdk.java.net/jdk11u-dev/commit/596677e816783c08473c7fcee8b92f859f444622
Stats: 52 lines in 2 files changed: 51 ins; 0 del; 1 mod
8251155: HostIdentifier fails to canonicalize hostnames starting with digits
Reviewed-by: goetz
Backport-of: 5585e6f63a56fc1f54dafa066e6520498ba284ac
-------------
PR: https://git.openjdk.java.net/jdk11u-dev/pull/516
More information about the jdk-updates-dev
mailing list