Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8251155: HostIdentifier fails to canonicalize hostnames starting with digits #516

Closed
wants to merge 1 commit into from

Conversation

@DamonFool
Copy link
Member

@DamonFool DamonFool commented Oct 13, 2021

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


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8251155: HostIdentifier fails to canonicalize hostnames starting with digits

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk11u-dev pull/516/head:pull/516
$ git checkout pull/516

Update a local copy of the PR:
$ git checkout pull/516
$ git pull https://git.openjdk.java.net/jdk11u-dev pull/516/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 516

View PR using the GUI difftool:
$ git pr show -t 516

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk11u-dev/pull/516.diff

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Oct 13, 2021

👋 Welcome back jiefu! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

Loading

@openjdk openjdk bot changed the title Backport 5585e6f63a56fc1f54dafa066e6520498ba284ac 8251155: HostIdentifier fails to canonicalize hostnames starting with digits Oct 13, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Oct 13, 2021

This backport pull request has now been updated with issue from the original commit.

Loading

@mlbridge
Copy link

@mlbridge mlbridge bot commented Oct 13, 2021

Webrevs

Loading

GoeLin
GoeLin approved these changes Oct 14, 2021
Copy link
Member

@GoeLin GoeLin left a comment

LGTM

Loading

@openjdk
Copy link

@openjdk openjdk bot commented Oct 14, 2021

@DamonFool This change now passes all automated pre-integration checks.

After integration, the commit message for the final commit will be:

8251155: HostIdentifier fails to canonicalize hostnames starting with digits

Reviewed-by: goetz

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 11 new commits pushed to the master branch:

  • b3926db: 8233638: [TESTBUG] Swing test ScreenMenuBarInputTwice.java fails on macos
  • 4bdcad5: 8233643: [TESTBUG] JMenu test bug4515762.java fails on macos
  • dfb97b0: 8233642: [TESTBUG] JMenuBar test bug 4750590.java fails on macos
  • 167c9f0: 8169953: JComboBox/8057893: ComboBoxEdited event is not fired! on Windows
  • 968c21e: 8272574: C2: assert(false) failed: Bad graph detected in build_loop_late
  • 90d1bcb: 8261071: AArch64: Refactor interpreter native wrappers
  • 15931e5: 8230228: [TESTBUG] Several runtime/ErrorHandling tests may fail on some platforms
  • 15384ad: 8250888: nsk/jvmti/scenarios/general_functions/GF08/gf08t001/TestDriver.java fails
  • 4557503: 8269656: The test test/langtools/tools/javac/versions/Versions.java has duplicate test cycles
  • 844c504: 8271459: C2: Missing NegativeArraySizeException when creating StringBuilder with negative capacity
  • ... and 1 more: https://git.openjdk.java.net/jdk11u-dev/compare/0a71d8e3f628bf0e3436ed6d33fa95aa9da73a20...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@GoeLin) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

Loading

@openjdk openjdk bot added the ready label Oct 14, 2021
@DamonFool
Copy link
Member Author

@DamonFool DamonFool commented Oct 14, 2021

LGTM

Thanks @GoeLin for your review.

Fix request had been approved.
So integrate it.
And I need a sponsor.
Thanks.

/integrate

Loading

@openjdk openjdk bot added the sponsor label Oct 14, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Oct 14, 2021

@DamonFool
Your change (at version 520126c) is now ready to be sponsored by a Committer.

Loading

@GoeLin
Copy link
Member

@GoeLin GoeLin commented Oct 14, 2021

/sponsor

Loading

@openjdk
Copy link

@openjdk openjdk bot commented Oct 14, 2021

Going to push as commit 596677e.
Since your change was applied there have been 11 commits pushed to the master branch:

  • b3926db: 8233638: [TESTBUG] Swing test ScreenMenuBarInputTwice.java fails on macos
  • 4bdcad5: 8233643: [TESTBUG] JMenu test bug4515762.java fails on macos
  • dfb97b0: 8233642: [TESTBUG] JMenuBar test bug 4750590.java fails on macos
  • 167c9f0: 8169953: JComboBox/8057893: ComboBoxEdited event is not fired! on Windows
  • 968c21e: 8272574: C2: assert(false) failed: Bad graph detected in build_loop_late
  • 90d1bcb: 8261071: AArch64: Refactor interpreter native wrappers
  • 15931e5: 8230228: [TESTBUG] Several runtime/ErrorHandling tests may fail on some platforms
  • 15384ad: 8250888: nsk/jvmti/scenarios/general_functions/GF08/gf08t001/TestDriver.java fails
  • 4557503: 8269656: The test test/langtools/tools/javac/versions/Versions.java has duplicate test cycles
  • 844c504: 8271459: C2: Missing NegativeArraySizeException when creating StringBuilder with negative capacity
  • ... and 1 more: https://git.openjdk.java.net/jdk11u-dev/compare/0a71d8e3f628bf0e3436ed6d33fa95aa9da73a20...master

Your commit was automatically rebased without conflicts.

Loading

@openjdk
Copy link

@openjdk openjdk bot commented Oct 14, 2021

@GoeLin @DamonFool Pushed as commit 596677e.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Loading

@DamonFool DamonFool deleted the Backport-8251155 branch Oct 14, 2021
@DamonFool
Copy link
Member Author

@DamonFool DamonFool commented Oct 14, 2021

/sponsor

Thanks @GoeLin for sponsoring.

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants