--- old/test/runtime/CommandLine/OptionsValidation/TestOptionsWithRanges.java 2015-06-16 23:14:26.646721272 +0300 +++ new/test/runtime/CommandLine/OptionsValidation/TestOptionsWithRanges.java 2015-06-16 23:14:26.486721272 +0300 @@ -25,6 +25,10 @@ * @test * @summary Test VM Options with ranges * @library /testlibrary /runtime/CommandLine/OptionsValidation/common + * @modules java.base/sun.misc + * java.management + * jdk.attach + * jdk.management/sun.tools.attach * @run main/othervm/timeout=600 TestOptionsWithRanges */ @@ -37,51 +41,23 @@ public class TestOptionsWithRanges { - static List optionsToTest = new ArrayList<>(); - static Map allOptionsAsMap; - - private static void addOptionToTest(String name) { - JVMOption toAdd = allOptionsAsMap.get(name); - if (toAdd != null) { - optionsToTest.add(toAdd); - } else { - System.out.println("Option with name \"" + name + "\" not found in "+ - "the list of options with ranges. Thus not test this option."); - } - } - public static void main(String[] args) throws Exception { int failedTests; - - allOptionsAsMap = JVMOptionsUtils.getOptionsWithRangeAsMap(); + Map allOptionsAsMap = JVMOptionsUtils.getOptionsWithRangeAsMap(); + List allOptions; + + /* + * Remove CICompilerCount from testing because currently it can hang system + */ + allOptionsAsMap.remove("CICompilerCount"); - /* Add several intx options to test */ - addOptionToTest("AllocatePrefetchStyle"); - addOptionToTest("CMSInitiatingOccupancyFraction"); - addOptionToTest("CMSTriggerInterval"); - addOptionToTest("PerBytecodeRecompilationCutoff"); - addOptionToTest("G1RefProcDrainInterval"); - addOptionToTest("BlockLayoutMinDiamondPercentage"); - addOptionToTest("ValueMapInitialSize"); - /* Add several uintx options to test */ - addOptionToTest("StringDeduplicationAgeThreshold"); - addOptionToTest("AdaptiveSizeDecrementScaleFactor"); - addOptionToTest("CMSPrecleanNumerator"); - addOptionToTest("IncreaseFirstTierCompileThresholdAt"); - /* Add several size_t options to test */ - addOptionToTest("CompressedClassSpaceSize"); - addOptionToTest("HeapSizePerGCThread"); - addOptionToTest("G1ConcRSLogCacheSize"); - /* Add double option to test */ - addOptionToTest("G1ConcMarkStepDurationMillis"); - /* Add uint64_t option to test */ - addOptionToTest("MaxRAM"); + allOptions = new ArrayList<>(allOptionsAsMap.values()); - Asserts.assertGT(optionsToTest.size(), 0, "Options with ranges not found!"); + Asserts.assertGT(allOptions.size(), 0, "Options with ranges not found!"); - System.out.println("Test " + optionsToTest.size() + " options with ranges. Start test!"); + System.out.println("Parsed " + allOptions.size() + " options with ranges. Start test!"); - failedTests = JVMOptionsUtils.runCommandLineTests(optionsToTest); + failedTests = JVMOptionsUtils.runCommandLineTests(allOptions); Asserts.assertEQ(failedTests, 0, String.format("%d tests failed! %s", failedTests, JVMOptionsUtils.getMessageWithFailures()));