test/hotspot/jtreg/runtime/CommandLine/VMDeprecatedOptions.java
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File open Sdiff test/hotspot/jtreg/runtime/CommandLine

test/hotspot/jtreg/runtime/CommandLine/VMDeprecatedOptions.java

Print this page




  71         output.shouldHaveExitValue(0);
  72         for (String[] deprecated : optionInfo) {
  73             String match = getDeprecationString(deprecated[0]);
  74             output.shouldMatch(match);
  75         }
  76     }
  77 
  78     // Deprecated diagnostic command line options need to be preceded on the
  79     // command line by -XX:+UnlockDiagnosticVMOptions.
  80     static void testDeprecatedDiagnostic(String option, String value)  throws Throwable {
  81         String XXoption = CommandLineOptionTest.prepareFlag(option, value);
  82         ProcessBuilder processBuilder = ProcessTools.createJavaProcessBuilder(
  83             CommandLineOptionTest.UNLOCK_DIAGNOSTIC_VM_OPTIONS, XXoption, "-version");
  84         OutputAnalyzer output = new OutputAnalyzer(processBuilder.start());
  85         // check for option deprecation message:
  86         output.shouldHaveExitValue(0);
  87         String match = getDeprecationString(option);
  88         output.shouldMatch(match);
  89     }
  90 













  91     public static void main(String[] args) throws Throwable {
  92         testDeprecated(DEPRECATED_OPTIONS);  // Make sure that each deprecated option is mentioned in the output.
  93         testDeprecatedDiagnostic("UnsyncloadClass", "false");

  94     }
  95 }


  71         output.shouldHaveExitValue(0);
  72         for (String[] deprecated : optionInfo) {
  73             String match = getDeprecationString(deprecated[0]);
  74             output.shouldMatch(match);
  75         }
  76     }
  77 
  78     // Deprecated diagnostic command line options need to be preceded on the
  79     // command line by -XX:+UnlockDiagnosticVMOptions.
  80     static void testDeprecatedDiagnostic(String option, String value)  throws Throwable {
  81         String XXoption = CommandLineOptionTest.prepareFlag(option, value);
  82         ProcessBuilder processBuilder = ProcessTools.createJavaProcessBuilder(
  83             CommandLineOptionTest.UNLOCK_DIAGNOSTIC_VM_OPTIONS, XXoption, "-version");
  84         OutputAnalyzer output = new OutputAnalyzer(processBuilder.start());
  85         // check for option deprecation message:
  86         output.shouldHaveExitValue(0);
  87         String match = getDeprecationString(option);
  88         output.shouldMatch(match);
  89     }
  90 
  91     // Deprecated experimental command line options need to be preceded on the
  92     // command line by -XX:+UnlockExperimentalVMOption.
  93     static void testDeprecatedExperimental(String option, String value)  throws Throwable {
  94         String XXoption = CommandLineOptionTest.prepareFlag(option, value);
  95         ProcessBuilder processBuilder = ProcessTools.createJavaProcessBuilder(
  96             CommandLineOptionTest.UNLOCK_EXPERIMENTAL_VM_OPTIONS, XXoption, "-version");
  97         OutputAnalyzer output = new OutputAnalyzer(processBuilder.start());
  98         // check for option deprecation message:
  99         output.shouldHaveExitValue(0);
 100         String match = getDeprecationString(option);
 101         output.shouldMatch(match);
 102     }
 103 
 104     public static void main(String[] args) throws Throwable {
 105         testDeprecated(DEPRECATED_OPTIONS);  // Make sure that each deprecated option is mentioned in the output.
 106         testDeprecatedDiagnostic("UnsyncloadClass", "false");
 107         testDeprecatedExperimental("UseCGroupMemoryLimitForHeap", "true");
 108     }
 109 }
test/hotspot/jtreg/runtime/CommandLine/VMDeprecatedOptions.java
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File