diff --git a/jdk/test/lib/testlibrary/jdk/testlibrary/Utils.java b/jdk/test/lib/testlibrary/jdk/testlibrary/Utils.java index 954aefcc49d..2795b29f71d 100644 --- a/jdk/test/lib/testlibrary/jdk/testlibrary/Utils.java +++ b/jdk/test/lib/testlibrary/jdk/testlibrary/Utils.java @@ -126,7 +126,10 @@ public final class Utils { * GC specified by the framework must first be removed. * @return A copy of given opts with all GC options removed. */ - private static final Pattern useGcPattern = Pattern.compile("\\-XX\\:[\\+\\-]Use.+GC"); + private static final Pattern useGcPattern = Pattern.compile( + "(?:\\-XX\\:[\\+\\-]Use.+GC)" + + "|(?:\\-Xconcgc)" + + "|(?:\\-Xincgc)"); public static List removeGcOpts(List opts) { List optsWithoutGC = new ArrayList(); for (String opt : opts) {