JDK-8142874 : [TESTBUG] OptionsValidation testing framework needs to handle VM error codes in some cases
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 9
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2015-11-12
  • Updated: 2016-01-28
  • Resolved: 2015-12-12
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9 b103Fixed
Related Reports
Relates :  
Relates :  
Description
SharedReadWriteSize, SharedReadOnlySize, SharedMiscDataSize and SharedMiscCodeSize have default sizes, such that when one of them is set to the MAX, then the VM will exit with error code 2. This registers as a failure in the current framework, but in fact needs to be accepted as success in the cases of these particular flags (ie. failure is defined by a crash that produces error log, not by VM exit with error code)

TestOptionsWithRanges allows flags to be opted out using:

        allOptionsAsMap.remove("SharedReadWriteSize");

but it also needs a mechanism that defines allowable exit codes. For most flags that exit code would be implicitly set to 0, but for Shared* it would be 0,2. Perhaps something like:

        allOptionsAsMap.setAllowedExitCodes("SharedReadWriteSize", 0, 2, ...);

If we had such enhancement, then we could still test the Shared* flags, which at the moment must be disabled.