equal
deleted
inserted
replaced
26 /* |
26 /* |
27 * @test TestParallelRefProc |
27 * @test TestParallelRefProc |
28 * @key gc |
28 * @key gc |
29 * @summary Test defaults processing for -XX:+ParallelRefProcEnabled. |
29 * @summary Test defaults processing for -XX:+ParallelRefProcEnabled. |
30 * @library /test/lib |
30 * @library /test/lib |
|
31 * @library / |
31 * @build sun.hotspot.WhiteBox |
32 * @build sun.hotspot.WhiteBox |
32 * @run driver ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission |
33 * @run driver ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission |
33 * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI gc.arguments.TestParallelRefProc |
34 * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI gc.arguments.TestParallelRefProc |
34 */ |
35 */ |
35 |
36 |
78 private static void testFlag(String[] args, boolean expectedTrue) throws Exception { |
79 private static void testFlag(String[] args, boolean expectedTrue) throws Exception { |
79 ArrayList<String> result = new ArrayList<String>(); |
80 ArrayList<String> result = new ArrayList<String>(); |
80 result.addAll(Arrays.asList(args)); |
81 result.addAll(Arrays.asList(args)); |
81 result.add("-XX:+PrintFlagsFinal"); |
82 result.add("-XX:+PrintFlagsFinal"); |
82 result.add("-version"); |
83 result.add("-version"); |
83 ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(result.toArray(new String[0])); |
84 ProcessBuilder pb = GCArguments.createJavaProcessBuilder(result.toArray(new String[0])); |
84 |
85 |
85 OutputAnalyzer output = new OutputAnalyzer(pb.start()); |
86 OutputAnalyzer output = new OutputAnalyzer(pb.start()); |
86 |
87 |
87 output.shouldHaveExitValue(0); |
88 output.shouldHaveExitValue(0); |
88 |
89 |