--- a/test/hotspot/jtreg/runtime/CommandLine/VMDeprecatedOptions.java Wed Nov 15 08:25:28 2017 -0500
+++ b/test/hotspot/jtreg/runtime/CommandLine/VMDeprecatedOptions.java Wed Nov 15 10:34:17 2017 -0500
@@ -88,9 +88,23 @@
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");
testDeprecatedDiagnostic("IgnoreUnverifiableClassesDuringDump", "false");
+ testDeprecatedExperimental("UseCGroupMemoryLimitForHeap", "true");
}
}