--- old/test/runtime/CommandLine/OptionsValidation/TestOptionsWithRanges.java 2015-11-25 11:30:14.005471220 +0300 +++ new/test/runtime/CommandLine/OptionsValidation/TestOptionsWithRanges.java 2015-11-25 11:30:13.901419222 +0300 @@ -63,12 +63,26 @@ allOptionsAsMap.remove(optionName); } + private static void setAllowedExitCodes(String optionName, Integer... allowedExitCodes) { + JVMOption option = allOptionsAsMap.get(optionName); + + if (option != null) { + option.setAllowedExitCodes(allowedExitCodes); + } + } + public static void main(String[] args) throws Exception { int failedTests; List allOptions; allOptionsAsMap = JVMOptionsUtils.getOptionsWithRangeAsMap(); + /* Shared flags can cause JVM to exit with 2 error code */ + setAllowedExitCodes("SharedReadWriteSize", 2); + setAllowedExitCodes("SharedReadOnlySize", 2); + setAllowedExitCodes("SharedMiscDataSize", 2); + setAllowedExitCodes("SharedMiscCodeSize", 2); + /* * Remove CICompilerCount from testing because currently it can hang system */ @@ -82,23 +96,13 @@ excludeTestRange("ThreadStackSize"); /* - * JDK-8141650 - * Temporarily exclude SharedMiscDataSize as it will exit the VM with exit code 2 and - * "The shared miscellaneous data space is not large enough to preload requested classes." - * message at min value. - */ - excludeTestRange("SharedMiscDataSize"); - - /* - * JDK-8142874 - * Temporarily exclude Shared* flagse as they will exit the VM with exit code 2 and - * "The shared miscellaneous data space is not large enough to preload requested classes." - * message at max values. + * JDK-8143958 + * Temporarily exclude testing of max range for Shared* flags */ - excludeTestRange("SharedReadWriteSize"); - excludeTestRange("SharedReadOnlySize"); - excludeTestRange("SharedMiscDataSize"); - excludeTestRange("SharedMiscCodeSize"); + excludeTestMaxRange("SharedReadWriteSize"); + excludeTestMaxRange("SharedReadOnlySize"); + excludeTestMaxRange("SharedMiscDataSize"); + excludeTestMaxRange("SharedMiscCodeSize"); /* * Exclude MallocMaxTestWords as it is expected to exit VM at small values (>=0)