--- old/test/hotspot/jtreg/runtime/CommandLine/VMDeprecatedOptions.java 2017-10-20 09:45:28.312031264 -0400 +++ new/test/hotspot/jtreg/runtime/CommandLine/VMDeprecatedOptions.java 2017-10-20 09:45:27.291973088 -0400 @@ -88,8 +88,22 @@ output.shouldMatch(match); } + // Deprecated experimental command line options need to be preceded on the + // command line by -XX:+UnlockExperimentalVMOption. + static void testDeprecatedExperimental(String option, String value) throws Throwable { + String XXoption = CommandLineOptionTest.prepareFlag(option, value); + ProcessBuilder processBuilder = ProcessTools.createJavaProcessBuilder( + CommandLineOptionTest.UNLOCK_EXPERIMENTAL_VM_OPTIONS, XXoption, "-version"); + OutputAnalyzer output = new OutputAnalyzer(processBuilder.start()); + // check for option deprecation message: + output.shouldHaveExitValue(0); + String match = getDeprecationString(option); + output.shouldMatch(match); + } + public static void main(String[] args) throws Throwable { testDeprecated(DEPRECATED_OPTIONS); // Make sure that each deprecated option is mentioned in the output. testDeprecatedDiagnostic("UnsyncloadClass", "false"); + testDeprecatedExperimental("UseCGroupMemoryLimitForHeap", "true"); } }