< prev index next >

test/hotspot/jtreg/gc/shenandoah/options/TestWrongBarrierEnable.java

Print this page
*** 35,18 ***
  import jdk.test.lib.process.OutputAnalyzer;
  
  public class TestWrongBarrierEnable {
  
      public static void main(String[] args) throws Exception {
!         String[] concurrent = {
!                 "ShenandoahSATBBarrier",
!         };
          shouldPassAll("-XX:ShenandoahGCHeuristics=adaptive",   concurrent);
          shouldPassAll("-XX:ShenandoahGCHeuristics=static",     concurrent);
          shouldPassAll("-XX:ShenandoahGCHeuristics=compact",    concurrent);
          shouldPassAll("-XX:ShenandoahGCHeuristics=aggressive", concurrent);
          shouldPassAll("-XX:ShenandoahGCMode=passive",          concurrent);
      }
  
      private static void shouldFailAll(String h, String[] barriers) throws Exception {
          for (String b : barriers) {
              OutputAnalyzer output = ProcessTools.executeLimitedTestJava(
--- 35,22 ---
  import jdk.test.lib.process.OutputAnalyzer;
  
  public class TestWrongBarrierEnable {
  
      public static void main(String[] args) throws Exception {
!         String[] concurrent = { "ShenandoahSATBBarrier" };
!         String[] generational = { "ShenandoahCardBarrier" };
!         String[] all = { "ShenandoahSATBBarrier", "ShenandoahCardBarrier" };
+ 
          shouldPassAll("-XX:ShenandoahGCHeuristics=adaptive",   concurrent);
          shouldPassAll("-XX:ShenandoahGCHeuristics=static",     concurrent);
          shouldPassAll("-XX:ShenandoahGCHeuristics=compact",    concurrent);
          shouldPassAll("-XX:ShenandoahGCHeuristics=aggressive", concurrent);
          shouldPassAll("-XX:ShenandoahGCMode=passive",          concurrent);
+         shouldPassAll("-XX:ShenandoahGCMode=generational",     all);
+         shouldFailAll("-XX:ShenandoahGCMode=satb",             generational);
+         shouldFailAll("-XX:ShenandoahGCMode=passive",          generational);
      }
  
      private static void shouldFailAll(String h, String[] barriers) throws Exception {
          for (String b : barriers) {
              OutputAnalyzer output = ProcessTools.executeLimitedTestJava(

*** 76,7 ***
                      "-version"
              );
              output.shouldHaveExitValue(0);
          }
      }
- 
  }
--- 80,6 ---
< prev index next >