< prev index next >

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

Print this page
@@ -35,18 +35,22 @@
  import jdk.test.lib.process.OutputAnalyzer;
  
  public class TestWrongBarrierEnable {
  
      public static void main(String[] args) throws Exception {
-         String[] concurrent = {
-                 "ShenandoahSATBBarrier",
-         };
+         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 +80,6 @@
                      "-version"
              );
              output.shouldHaveExitValue(0);
          }
      }
- 
  }
< prev index next >