Skip to content

8306711: Improve diagnosis of IntlTest framework #13655

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

Closed

Conversation

justin-curtis-lu
Copy link
Member

@justin-curtis-lu justin-curtis-lu commented Apr 25, 2023

Please review changes to the IntlTest (test framework) class.

These changes include

  • Logging the actual exception + stack trace. Previously, the test framework would throw InvocationTargetException but hide the actual underlying exception of the failing test unless the test class was ran with -nothrow.
  • Sorting the tests, ensuring for any given run, the tests are ran in the same order. (In JDK-8305853 it was discovered that on Windows, the test framework would execute tests in a random order each time).
  • Improving output.

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

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 13655

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Apr 25, 2023

👋 Welcome back jlu! 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 Apr 25, 2023
@openjdk
Copy link

openjdk bot commented Apr 25, 2023

@justin-curtis-lu The following label will be automatically applied to this pull request:

  • core-libs

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

@openjdk openjdk bot added the core-libs core-libs-dev@openjdk.org label Apr 25, 2023
@mlbridge
Copy link

mlbridge bot commented Apr 25, 2023

Webrevs

@justin-curtis-lu justin-curtis-lu marked this pull request as draft April 25, 2023 21:12
@openjdk openjdk bot removed the rfr Pull request is ready for review label Apr 25, 2023
@justin-curtis-lu justin-curtis-lu marked this pull request as ready for review April 25, 2023 22:03
@openjdk openjdk bot added the rfr Pull request is ready for review label Apr 25, 2023
@naotoj
Copy link
Member

naotoj commented Apr 25, 2023

/label add i18n

@openjdk openjdk bot added the i18n i18n-dev@openjdk.org label Apr 25, 2023
@openjdk
Copy link

openjdk bot commented Apr 25, 2023

@naotoj
The i18n label was successfully added.

Copy link
Member

@naotoj naotoj left a comment

Choose a reason for hiding this comment

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

Looks good, with minor nits:

Comment on lines -133 to -134
writeTestResult(errorCount);

Copy link
Member

Choose a reason for hiding this comment

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

Would this mean the final result is only written with nothrow option?

Comment on lines 226 to 228
protected int getErrorCount() {
return errorCount;
}
Copy link
Member

Choose a reason for hiding this comment

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

No need to move the method

indentLevel++;

// Run the list of tests given in the test arguments
for (Method testMethod : testsToRun) {
int oldCount = errorCount;

writeTestName(testMethod.getName());
Copy link
Member

Choose a reason for hiding this comment

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

Could cache the method name for later uses

}
if (errorCount > 0) {
throw new IllegalArgumentException("encountered " + errorCount + " errors");
if (exitCode) {
Copy link
Member Author

Choose a reason for hiding this comment

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

@naotoj Since I got rid of writeTestResult(errorCount);

I will just have this block execute regardless of nothrow. All tests should now write the final result.

@openjdk
Copy link

openjdk bot commented Apr 26, 2023

@justin-curtis-lu 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:

8306711: Improve diagnosis of `IntlTest` framework

Reviewed-by: naoto, lancea

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

  • 9ebcda2: 8229147: Linux os::create_thread() overcounts guardpage size with newer glibc (>=2.27)
  • 1e4eafb: 8071693: Introspector ignores default interface methods
  • 750bece: 8305771: SA ClassWriter.java fails to skip overpass methods
  • b81c9c8: 8306951: [BACKOUT] JDK-8305252 make_method_handle_intrinsic may call java code under a lock
  • 732179c: 8306409: Open source AWT KeyBoardFocusManger, LightWeightComponent related tests
  • 38cc039: 8306705: com/sun/jdi/PopAndInvokeTest.java fails with NativeMethodException
  • 01b8512: 8302182: Update Public Suffix List to 88467c9
  • 8e36c05: 8305853: java/text/Format/DateFormat/DateFormatRegression.java fails with "Uncaught exception thrown in test method Test4089106"
  • d0e8aec: 8306374: (bf) Improve performance of DirectCharBuffer::append(CharSequence[,int,int])
  • a18191f: 8302328: [s390x] Simplify asm_assert definition
  • ... and 45 more: https://git.openjdk.org/jdk/compare/2ea62c136925299d4b767a0149419e7e9de3629a...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 Apr 26, 2023
Copy link
Contributor

@LanceAndersen LanceAndersen left a comment

Choose a reason for hiding this comment

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

Looks good overall perhaps consider using HexFormat instead of the private method toHexString

@justin-curtis-lu
Copy link
Member Author

@LanceAndersen Thanks for the review. Changed it so that HexFormat methods are used, luckily only one subclass used toHexString.

@justin-curtis-lu
Copy link
Member Author

/integrate

@openjdk
Copy link

openjdk bot commented Apr 28, 2023

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

  • b827ce8: 8298993: (process) java/lang/ProcessBuilder/UnblockSignals.java fails
  • 7871390: 8306952: improve generic signature of internal DCInlineTag class
  • 6983d05: 8306927: Collator treats "v" and "w" as the same letter for Swedish language locale.
  • 80fae51: 8306959: (bf) CharBuffer.append(CharSequence,int,int) throws BufferOverflowException where IndexOutOfBoundsException expected
  • eb35861: 8205592: BigDecimal.doubleValue() is depressingly slow
  • 41ba05e: 8306850: Open source AWT Model related tests
  • fed262a: 8306949: Resolve miscellaneous multiple symbol definition issues when statically linking JDK/VM natives with standard launcher
  • 96cdf93: 8306833: Change CardTable::_covered to static array
  • 1be80a4: 8287087: C2: perform SLP reduction analysis on-demand
  • ba43649: 8306976: UTIL_REQUIRE_SPECIAL warning on grep
  • ... and 62 more: https://git.openjdk.org/jdk/compare/2ea62c136925299d4b767a0149419e7e9de3629a...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Apr 28, 2023

@justin-curtis-lu Pushed as commit f3c90f0.

💡 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
Development

Successfully merging this pull request may close these issues.

3 participants