[jdk17] RFR: 8268612: a few runtime/memory tests don't check exit code

David Holmes dholmes at openjdk.java.net
Mon Jun 21 04:22:30 UTC 2021


On Fri, 18 Jun 2021 10:55:08 GMT, Igor Ignatyev <iignatyev at openjdk.org> wrote:

> Hi all,
> 
> could you please review this small patch that adds checks of exit code to a few `runtime/memory` tests?
> from JBS:
>> `ReserveMemory.java`, `ReadFromNoaccessArea.java` and `TestLargePagesFlags.java` tests spawn new JVMs but don't check their exit code which might lead to both type-I and type-II errors
> 
> in `ReadFromNoaccessArea.java`, the patch removes throwing of an exception in `DummyClassWithMainTryingToReadFromNoaccessArea` (child process), so we will get 0 as an exit code if/when we don't crash.
> 
> testing: `runtime/memory` tests on `{linux,windows,macosx}-x64`
> 
> Thanks,
> -- Igor

Hi Igor,

Apologies for my previous review it was a bit brash.

A small change suggested in ReserveMemoryTest - you should also remove the throwing of the exception on a successful read as you did for  ReadFromNoAccess.

Thanks,
David

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

Marked as reviewed by dholmes (Reviewer).

PR: https://git.openjdk.java.net/jdk17/pull/97


More information about the hotspot-runtime-dev mailing list