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

8272305: several hotspot runtime/modules don't check exit codes #5078

Closed
wants to merge 3 commits into from

Conversation

iignatev
Copy link
Member

@iignatev iignatev commented Aug 10, 2021

Hi all,

could you please review this patch that adds exit code checks to five runtime/modules tests?

testing: runtime/modules on {linux,windows,macos}-x64

Thanks,
-- Igor


Progress

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

Issue

  • JDK-8272305: several hotspot runtime/modules don't check exit codes

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/5078/head:pull/5078
$ git checkout pull/5078

Update a local copy of the PR:
$ git checkout pull/5078
$ git pull https://git.openjdk.java.net/jdk pull/5078/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 5078

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/5078.diff

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Aug 10, 2021

👋 Welcome back iignatyev! 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 changed the title 8272305 8272305: several hotspot runtime/modules don't check exit codes Aug 10, 2021
@openjdk openjdk bot added the rfr label Aug 10, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Aug 10, 2021

@iignatev The following label will be automatically applied to this pull request:

  • hotspot-runtime

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 hotspot-runtime label Aug 10, 2021
@mlbridge
Copy link

@mlbridge mlbridge bot commented Aug 10, 2021

Webrevs

Copy link
Member

@dholmes-ora dholmes-ora left a comment

Hi Igor,

Generally looks good, but a requested change for one test.

Thanks,
David

@@ -58,21 +58,27 @@ public static void testProperty(String prop, String value) throws Exception {
// For options of the form "option=value", check that an exception gets thrown for
// the illegal value and then check that its corresponding property is handled
// correctly.
public static void testOption(String option, String value,
public static void testOption(boolean positive,
Copy link
Member

@dholmes-ora dholmes-ora Aug 12, 2021

Choose a reason for hiding this comment

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

Can we rename "positive" to "shouldSucceed" please.

Copy link
Member Author

@iignatev iignatev Aug 12, 2021

Choose a reason for hiding this comment

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

I actually started w/ shouldSucceed, but it can be kinda misleading as a test succeeds in both cases, it just in one case, it expects JVM to exit normally and in another to hit an error. how about expectError?

Copy link
Member

@dholmes-ora dholmes-ora Aug 13, 2021

Choose a reason for hiding this comment

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

Both "error" and "succeed" have the same problem if you look at it from the perspective of the test rather than the state of the VM being exec'd. How about shouldExitNormally or expectVMFail, or something that makes it VM specific?

testOption("--limit-modules", "java.sqlx", "jdk.module.limitmods", "java.lang.module.FindException");
testOption("--add-reads", "xyzz=yyzd", "jdk.module.addreads.0", "WARNING: Unknown module: xyzz");
testOption("--add-exports", "java.base/xyzz=yyzd", "jdk.module.addexports.0",
testOption(false, "--add-modules", "java.sqlx", "jdk.module.addmods.0", "java.lang.module.FindException");
Copy link
Member

@dholmes-ora dholmes-ora Aug 12, 2021

Choose a reason for hiding this comment

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

It would be a litle more obvious if you did:

final boolean shouldSucceed = true;

and then do either:

testOption(!shouldSucceed, ...);

or

testOption(shouldSucceed, ...);

Copy link
Member Author

@iignatev iignatev Aug 12, 2021

Choose a reason for hiding this comment

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

not sure if testOption(!shouldSucceed,...) looks/reads nice, I can do testOption(/*shouldSucceed=*/true, ...); instead.

Copy link
Member

@dholmes-ora dholmes-ora Aug 13, 2021

Choose a reason for hiding this comment

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

Okay

reordered test cases
Copy link
Member

@dholmes-ora dholmes-ora left a comment

Looks good.

Thanks,
David

@openjdk
Copy link

@openjdk openjdk bot commented Aug 16, 2021

@iignatev 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:

8272305: several hotspot runtime/modules don't check exit codes

Reviewed-by: dholmes, mseledtsov

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

  • 6a5241c: 8272491: Problem list javax/swing/JFrame/NSTexturedJFrame/NSTexturedJFrame.java on macos
  • 17b9350: 8266079: Lanai: AlphaComposite shows differences on Metal compared to OpenGL
  • 87d2761: 8271883: Math CopySign optimization for x86
  • 6b8b160: 8272396: mismatching debug output streams
  • 0af645a: 8205138: Remove Applet references from Font2DTest
  • bd7f9b4: 8272459: ProblemList compiler/codecache/TestStressCodeBuffers.java on aarch64
  • 717792c: 8263940: NPE when creating default file system when default file system provider is packaged as JAR file on class path
  • d06d0b9: 8272112: Arena code simplifications
  • 0c4be76: 8058704: Nimbus does not honor JTextPane background color
  • 020aec5: 8271366: [REDO] JDK-8266054 VectorAPI rotate operation optimization
  • ... and 42 more: https://git.openjdk.java.net/jdk/compare/abdc1074dcefda9012bb4d84c9f34a2dca5ea560...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 label Aug 16, 2021
@iignatev
Copy link
Member Author

@iignatev iignatev commented Aug 16, 2021

Misha, David,
thank you for your reviews.

/integrate

@openjdk
Copy link

@openjdk openjdk bot commented Aug 16, 2021

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

  • 8268825: 8272297: FileInputStream should override transferTo() for better performance
  • 3677734: 8271471: [IR Framework] Rare occurrence of "" in PrintIdeal/PrintOptoAssembly can let tests fail
  • 0a03481: 8272231: G1: Refactor G1CardSet::get_card_set to return G1CardSetHashTableValue*
  • 83d0e12: 8267833: Improve G1CardSetInlinePtr::add()
  • 69cc588: 8272235: G1: update outdated code root fixup
  • 5db36ce: 8272158: SoftReference related bugs under memory pressure
  • 7a5b37b: 8272439: G1: add documentation to G1CardSetInlinePtr
  • 0209d9f: 8272461: G1: remove empty declaration of cleanup_after_scan_heap_roots
  • 36e2dda: 8272348: Update CDS tests in anticipation of JDK-8270489
  • 3f38a50: 8271203: C2: assert(iff->Opcode() == Op_If || iff->Opcode() == Op_CountedLoopEnd || iff->Opcode() == Op_RangeCheck) failed: Check this code when new subtype is added
  • ... and 52 more: https://git.openjdk.java.net/jdk/compare/abdc1074dcefda9012bb4d84c9f34a2dca5ea560...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Aug 16, 2021
@openjdk openjdk bot added integrated and removed ready labels Aug 16, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Aug 16, 2021

@iignatev Pushed as commit b2c272d.

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

@openjdk openjdk bot removed the rfr label Aug 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-runtime integrated
3 participants