< prev index next >

test/gc/TestVerifySilently.java

Print this page

        

@@ -58,11 +58,11 @@
     Collections.addAll(vmOpts, getTestJavaOpts());
     Collections.addAll(vmOpts, new String[] {"-XX:+UnlockDiagnosticVMOptions",
                                              "-XX:+VerifyDuringStartup",
                                              "-XX:+VerifyBeforeGC",
                                              "-XX:+VerifyAfterGC",
-                                             "-XX:" + (verifySilently ? "+":"-") + "VerifySilently",
+                                             (verifySilently ? "-Xlog:gc":"-Xlog:gc+verify=debug"),
                                              RunSystemGC.class.getName()});
     ProcessBuilder pb =
       ProcessTools.createJavaProcessBuilder(vmOpts.toArray(new String[vmOpts.size()]));
     OutputAnalyzer output = new OutputAnalyzer(pb.start());
 

@@ -74,13 +74,13 @@
   public static void main(String args[]) throws Exception {
 
     OutputAnalyzer output;
 
     output = runTest(false);
-    output.shouldContain("[Verifying");
+    output.shouldContain("Verifying");
     output.shouldHaveExitValue(0);
 
     output = runTest(true);
-    output.shouldNotContain("[Verifying");
+    output.shouldNotContain("Verifying");
     output.shouldHaveExitValue(0);
   }
 }
< prev index next >