< prev index next >

test/runtime/CommandLine/OptionsValidation/TestOptionsWithRanges.java

Print this page

        

*** 61,76 **** --- 61,90 ---- private static void excludeTestRange(String optionName) { 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<JVMOption> 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 */ excludeTestMaxRange("CICompilerCount");
*** 80,106 **** * (for default OS size) but other platforms insist it must be greater than 0 */ 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. */ ! excludeTestRange("SharedReadWriteSize"); ! excludeTestRange("SharedReadOnlySize"); ! excludeTestRange("SharedMiscDataSize"); ! excludeTestRange("SharedMiscCodeSize"); /* * Exclude MallocMaxTestWords as it is expected to exit VM at small values (>=0) */ excludeTestMinRange("MallocMaxTestWords"); --- 94,110 ---- * (for default OS size) but other platforms insist it must be greater than 0 */ excludeTestRange("ThreadStackSize"); /* ! * JDK-8143958 ! * Temporarily exclude testing of max range for Shared* flags */ ! excludeTestMaxRange("SharedReadWriteSize"); ! excludeTestMaxRange("SharedReadOnlySize"); ! excludeTestMaxRange("SharedMiscDataSize"); ! excludeTestMaxRange("SharedMiscCodeSize"); /* * Exclude MallocMaxTestWords as it is expected to exit VM at small values (>=0) */ excludeTestMinRange("MallocMaxTestWords");
< prev index next >