< prev index next > test/hotspot/jtreg/gc/shenandoah/options/TestWrongBarrierEnable.java
Print this page
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(
"-version"
);
output.shouldHaveExitValue(0);
}
}
-
}
< prev index next >