8188922: [TESTBUG] runtime/CommandLine/VMDeprecatedOptions.java fails with JDK10 release bits
Add -XX:+UnlockDiagnosticVMOptions to the command line when testing a deprecated diagnostic option. Reviewed-by: coleenp, lfoltan
This commit is contained in:
parent
b5dd6a9a45
commit
d3466f7dce
@ -42,7 +42,6 @@ public class VMDeprecatedOptions {
|
||||
// deprecated non-alias flags:
|
||||
{"MaxGCMinorPauseMillis", "1032"},
|
||||
{"MustCallLoadClassInternal", "false"},
|
||||
{"UnsyncloadClass", "false"},
|
||||
{"MaxRAMFraction", "8"},
|
||||
{"MinRAMFraction", "2"},
|
||||
{"InitialRAMFraction", "64"},
|
||||
@ -76,7 +75,21 @@ public class VMDeprecatedOptions {
|
||||
}
|
||||
}
|
||||
|
||||
// Deprecated diagnostic command line options need to be preceded on the
|
||||
// command line by -XX:+UnlockDiagnosticVMOptions.
|
||||
static void testDeprecatedDiagnostic(String option, String value) throws Throwable {
|
||||
String XXoption = CommandLineOptionTest.prepareFlag(option, value);
|
||||
ProcessBuilder processBuilder = ProcessTools.createJavaProcessBuilder(
|
||||
CommandLineOptionTest.UNLOCK_DIAGNOSTIC_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");
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user