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

David Holmes dholmes at openjdk.java.net
Thu Aug 12 01:02:22 UTC 2021


On Tue, 10 Aug 2021 23:38:39 GMT, Igor Ignatyev <iignatyev at openjdk.org> wrote:

> 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

Hi Igor,

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

Thanks,
David

test/hotspot/jtreg/runtime/modules/IgnoreModulePropertiesTest.java line 61:

> 59:     // the illegal value and then check that its corresponding property is handled
> 60:     // correctly.
> 61:     public static void testOption(boolean positive,

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

test/hotspot/jtreg/runtime/modules/IgnoreModulePropertiesTest.java line 77:

> 75: 
> 76:     public static void main(String[] args) throws Exception {
> 77:         testOption(false, "--add-modules", "java.sqlx", "jdk.module.addmods.0", "java.lang.module.FindException");

It would be a litle more obvious if you did:

`final boolean shouldSucceed = true;`

and then do either:

`testOption(!shouldSucceed, ...);`

or

`testOption(shouldSucceed, ...);`

-------------

Changes requested by dholmes (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/5078


More information about the hotspot-runtime-dev mailing list