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

8310631: test/jdk/sun/nio/cs/TestCharsetMapping.java is spuriously passing #15807

Closed
wants to merge 2 commits into from

Conversation

naotoj
Copy link
Member

@naotoj naotoj commented Sep 19, 2023

Fixed the failing (well, false-positive) test case. Made the following changes to the test:

  • Corrected the path to the mapping files directory
  • Made sure to fail if the directory path is incorrect
  • Took care of GB18030 alias, which is dynamically derived at runtime
  • Provided MS950_HKSCS.map, which is simply a copy of HKSCS2008.map
  • Excluded other failing tests for IBM charsets that do not have map files.

Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8310631: test/jdk/sun/nio/cs/TestCharsetMapping.java is spuriously passing (Bug - P3)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/15807/head:pull/15807
$ git checkout pull/15807

Update a local copy of the PR:
$ git checkout pull/15807
$ git pull https://git.openjdk.org/jdk.git pull/15807/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 15807

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/15807.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 19, 2023

👋 Welcome back naoto! 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.

@openjdk openjdk bot added the rfr Pull request is ready for review label Sep 19, 2023
@openjdk
Copy link

openjdk bot commented Sep 19, 2023

@naotoj The following labels will be automatically applied to this pull request:

  • build
  • i18n

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added build build-dev@openjdk.org i18n i18n-dev@openjdk.org labels Sep 19, 2023
@naotoj
Copy link
Member Author

naotoj commented Sep 19, 2023

/label remove build
/label add nio-dev core-libs-dev

@openjdk openjdk bot removed the build build-dev@openjdk.org label Sep 19, 2023
@openjdk
Copy link

openjdk bot commented Sep 19, 2023

@naotoj
The build label was successfully removed.

@openjdk openjdk bot added nio nio-dev@openjdk.org core-libs core-libs-dev@openjdk.org labels Sep 19, 2023
@openjdk
Copy link

openjdk bot commented Sep 19, 2023

@naotoj
The nio label was successfully added.

The core-libs label was successfully added.

@mlbridge
Copy link

mlbridge bot commented Sep 19, 2023

Webrevs

Copy link
Member

@justin-curtis-lu justin-curtis-lu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually tests 138 charsets now, looks good

// not inside jdk repo, no mappings, exit silently
log.println("Nothing done, not in a jdk repo: ");
return;
throw new Exception("charsetmapping directory cannot be located.");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be helpful to provide directory location in exception message

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. Fixed.

Copy link
Contributor

@AlanBateman AlanBateman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suspect it was setup this way to allow the test tree be zipped up and the tests run without access to the src tree. In any case, the changes look okay, although a bit fragile to be reaching into the make/data tree for mapping data.

@openjdk
Copy link

openjdk bot commented Sep 25, 2023

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

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

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

8310631: test/jdk/sun/nio/cs/TestCharsetMapping.java is spuriously passing

Reviewed-by: jlu, alanb

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 104 new commits pushed to the master branch:

  • 481cfc7: 8287325: AArch64: fix virtual threads with -XX:UseBranchProtection=pac-ret
  • f0ff001: 8315742: Open source several Swing Scroll related tests
  • a2391a9: 8316053: Open some swing tests 3
  • d2d7d9a: 8315882: Open some swing tests 2
  • 68a9c81: 8316711: SEGV in LoaderConstraintTable::find_loader_constraint after JDK-8310874
  • e015e6c: 8315825: Open some swing tests
  • 9aaac2e: 8301639: JDI and JDWP specs should clarify potential deadlock issues with method invocation
  • 6b8261b: 8315464: Uncouple AllClassesIndexWriter from IndexBuilder
  • 9b65b7d: 8316305: Initial buffer size of StackWalker is too small caused by JDK-8285447
  • 53516ae: 8304956: Update KeyStore.getDefaultType​() specification to return pkcs12 as fallback
  • ... and 94 more: https://git.openjdk.org/jdk/compare/f09b7af6851c725b0fc4d63832b52e17c4d24836...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.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Sep 25, 2023
@naotoj
Copy link
Member Author

naotoj commented Sep 25, 2023

/integrate

@openjdk
Copy link

openjdk bot commented Sep 25, 2023

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

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Sep 25, 2023
@openjdk openjdk bot closed this Sep 25, 2023
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Sep 25, 2023
@openjdk
Copy link

openjdk bot commented Sep 25, 2023

@naotoj Pushed as commit e3201d1.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core-libs core-libs-dev@openjdk.org i18n i18n-dev@openjdk.org integrated Pull request has been integrated nio nio-dev@openjdk.org
3 participants