From 4cdb9708c4fea2dccb2e9d3c08da7c27e8e033e9 Mon Sep 17 00:00:00 2001 From: Aleksey Shipilev Date: Tue, 1 Oct 2019 15:38:26 +0200 Subject: [PATCH] 8231503: [TESTBUG] compiler/{jvmci,aot} tests should not run with GCs that do not support JVMCI/AOT Reviewed-by: kvn, dlong, stefank --- test/jtreg-ext/requires/VMProps.java | 36 ++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/test/jtreg-ext/requires/VMProps.java b/test/jtreg-ext/requires/VMProps.java index 1db892eb43f..0d09a59abda 100644 --- a/test/jtreg-ext/requires/VMProps.java +++ b/test/jtreg-ext/requires/VMProps.java @@ -235,7 +235,22 @@ public class VMProps implements Callable> { */ protected String vmJvmci() { // builds with jvmci have this flag - return "" + (WB.getBooleanVMFlag("EnableJVMCI") != null); + if (WB.getBooleanVMFlag("EnableJVMCI") == null) { + return "false"; + } + + switch (GC.selected()) { + case Serial: + case Parallel: + case G1: + // These GCs are supported with JVMCI + return "true"; + default: + break; + } + + // Every other GC is not supported + return "false"; } /** @@ -356,7 +371,24 @@ public class VMProps implements Callable> { } else { jaotc = bin.resolve("jaotc"); } - return "" + Files.exists(jaotc); + + if (!Files.exists(jaotc)) { + // No jaotc => no AOT + return "false"; + } + + switch (GC.selected()) { + case Serial: + case Parallel: + case G1: + // These GCs are supported with AOT + return "true"; + default: + break; + } + + // Every other GC is not supported + return "false"; } /*