8181124: Get rid of compiler.testlibrary.rtm.predicate
authorepavlova
Thu, 01 Jun 2017 17:34:01 -0700
changeset 46515 dbb676a40899
parent 46514 38a2f229b094
child 46516 df0767c6c330
8181124: Get rid of compiler.testlibrary.rtm.predicate Reviewed-by: kvn
hotspot/test/TEST.ROOT
hotspot/test/compiler/rtm/cli/RTMGenericCommandLineOptionTest.java
hotspot/test/compiler/rtm/cli/RTMLockingAwareTest.java
hotspot/test/compiler/rtm/cli/TestPrintPreciseRTMLockingStatisticsBase.java
hotspot/test/compiler/rtm/cli/TestPrintPreciseRTMLockingStatisticsOptionOnSupportedConfig.java
hotspot/test/compiler/rtm/cli/TestPrintPreciseRTMLockingStatisticsOptionOnUnsupportedConfig.java
hotspot/test/compiler/rtm/cli/TestRTMAbortRatioOptionOnSupportedConfig.java
hotspot/test/compiler/rtm/cli/TestRTMAbortRatioOptionOnUnsupportedConfig.java
hotspot/test/compiler/rtm/cli/TestRTMAbortThresholdOption.java
hotspot/test/compiler/rtm/cli/TestRTMLockingCalculationDelayOption.java
hotspot/test/compiler/rtm/cli/TestRTMLockingThresholdOption.java
hotspot/test/compiler/rtm/cli/TestRTMRetryCountOption.java
hotspot/test/compiler/rtm/cli/TestRTMSpinLoopCountOption.java
hotspot/test/compiler/rtm/cli/TestRTMTotalCountIncrRateOptionOnSupportedConfig.java
hotspot/test/compiler/rtm/cli/TestRTMTotalCountIncrRateOptionOnUnsupportedConfig.java
hotspot/test/compiler/rtm/cli/TestUseRTMDeoptOptionOnSupportedConfig.java
hotspot/test/compiler/rtm/cli/TestUseRTMDeoptOptionOnUnsupportedConfig.java
hotspot/test/compiler/rtm/cli/TestUseRTMForStackLocksOptionOnSupportedConfig.java
hotspot/test/compiler/rtm/cli/TestUseRTMForStackLocksOptionOnUnsupportedConfig.java
hotspot/test/compiler/rtm/cli/TestUseRTMLockingOptionOnSupportedConfig.java
hotspot/test/compiler/rtm/cli/TestUseRTMLockingOptionOnUnsupportedCPU.java
hotspot/test/compiler/rtm/cli/TestUseRTMLockingOptionOnUnsupportedVM.java
hotspot/test/compiler/rtm/cli/TestUseRTMLockingOptionWithBiasedLocking.java
hotspot/test/compiler/rtm/cli/TestUseRTMXendForLockBusyOption.java
hotspot/test/compiler/rtm/locking/TestRTMAbortRatio.java
hotspot/test/compiler/rtm/locking/TestRTMAbortThreshold.java
hotspot/test/compiler/rtm/locking/TestRTMAfterNonRTMDeopt.java
hotspot/test/compiler/rtm/locking/TestRTMDeoptOnHighAbortRatio.java
hotspot/test/compiler/rtm/locking/TestRTMDeoptOnLowAbortRatio.java
hotspot/test/compiler/rtm/locking/TestRTMLockingCalculationDelay.java
hotspot/test/compiler/rtm/locking/TestRTMLockingThreshold.java
hotspot/test/compiler/rtm/locking/TestRTMRetryCount.java
hotspot/test/compiler/rtm/locking/TestRTMSpinLoopCount.java
hotspot/test/compiler/rtm/locking/TestRTMTotalCountIncrRate.java
hotspot/test/compiler/rtm/locking/TestUseRTMAfterLockInflation.java
hotspot/test/compiler/rtm/locking/TestUseRTMDeopt.java
hotspot/test/compiler/rtm/locking/TestUseRTMForInflatedLocks.java
hotspot/test/compiler/rtm/locking/TestUseRTMForStackLocks.java
hotspot/test/compiler/rtm/locking/TestUseRTMXendForLockBusy.java
hotspot/test/compiler/rtm/method_options/TestNoRTMLockElidingOption.java
hotspot/test/compiler/rtm/method_options/TestUseRTMLockElidingOption.java
hotspot/test/compiler/rtm/print/TestPrintPreciseRTMLockingStatistics.java
hotspot/test/compiler/testlibrary/rtm/predicate/SupportedCPU.java
hotspot/test/compiler/testlibrary/rtm/predicate/SupportedOS.java
hotspot/test/compiler/testlibrary/rtm/predicate/SupportedVM.java
--- a/hotspot/test/TEST.ROOT	Thu Jun 01 17:33:07 2017 -0700
+++ b/hotspot/test/TEST.ROOT	Thu Jun 01 17:34:01 2017 -0700
@@ -35,7 +35,7 @@
 # to determine additional characteristics of the system for use with the @requires tag.
 # Note: compiled bootlibs code will be located in the folder 'bootClasses'
 requires.extraPropDefns = ../../test/jtreg-ext/requires/VMProps.java [../../closed/test/jtreg-ext/requires/VMPropsExt.java]
-requires.extraPropDefns.bootlibs = ../../test/lib/sun
+requires.extraPropDefns.bootlibs = ../../test/lib/sun ../../test/lib/jdk/test/lib/Platform.java
 requires.extraPropDefns.vmOpts = -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:bootClasses
 requires.properties= \
     sun.arch.data.model \
@@ -48,7 +48,9 @@
     vm.jvmci \
     vm.emulatedClient \
     vm.cpu.features \
-    vm.debug
+    vm.debug \
+    vm.rtm.cpu \
+    vm.rtm.os
 
 # Tests using jtreg 4.2 b07 features
 requiredVersion=4.2 b07
--- a/hotspot/test/compiler/rtm/cli/RTMGenericCommandLineOptionTest.java	Thu Jun 01 17:33:07 2017 -0700
+++ b/hotspot/test/compiler/rtm/cli/RTMGenericCommandLineOptionTest.java	Thu Jun 01 17:34:01 2017 -0700
@@ -32,8 +32,8 @@
 /**
  * Base for all RTM-related CLI tests.
  */
-public abstract class RTMGenericCommandLineOptionTest
-        extends CommandLineOptionTest {
+public abstract class RTMGenericCommandLineOptionTest {
+
     protected static final String RTM_INSTR_ERROR
             = "RTM instructions are not available on this CPU";
     protected static final String RTM_UNSUPPORTED_VM_ERROR
@@ -66,17 +66,15 @@
      * Test constructed using this ctor will be started on any cpu regardless
      * it's architecture and supported/unsupported features.
      *
-     * @param predicate predicate responsible for test's preconditions check
      * @param optionName name of option to be tested
      * @param isBoolean {@code true} if option is binary
      * @param isExperimental {@code true} if option is experimental
      * @param defaultValue default value of tested option
      * @param optionValues different option values
      */
-    public RTMGenericCommandLineOptionTest(BooleanSupplier predicate,
+    public RTMGenericCommandLineOptionTest(
             String optionName, boolean isBoolean, boolean isExperimental,
             String defaultValue, String... optionValues) {
-        super(predicate);
         this.optionName = optionName;
         this.isExperimental = isExperimental;
         this.isBoolean = isBoolean;
@@ -88,7 +86,6 @@
                 getExperimentalOptionErrorMessage(optionName);
     }
 
-    @Override
     public void runTestCases() throws Throwable {
         if (Platform.isX86() || Platform.isX64() || Platform.isPPC()) {
             if (Platform.isServer()) {
--- a/hotspot/test/compiler/rtm/cli/RTMLockingAwareTest.java	Thu Jun 01 17:33:07 2017 -0700
+++ b/hotspot/test/compiler/rtm/cli/RTMLockingAwareTest.java	Thu Jun 01 17:34:01 2017 -0700
@@ -23,12 +23,8 @@
 
 package compiler.rtm.cli;
 
-import compiler.testlibrary.rtm.predicate.SupportedCPU;
-import compiler.testlibrary.rtm.predicate.SupportedOS;
-import compiler.testlibrary.rtm.predicate.SupportedVM;
 import jdk.test.lib.process.ExitCode;
 import jdk.test.lib.cli.CommandLineOptionTest;
-import jdk.test.lib.cli.predicate.AndPredicate;
 
 import java.util.LinkedList;
 import java.util.List;
@@ -66,8 +62,7 @@
             boolean isExperimental, String defaultValue,
             String[] correctValues, String[] incorrectValues,
             String warningMessage) {
-        super(new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM()),
-                optionName, isBoolean, isExperimental, defaultValue);
+        super(optionName, isBoolean, isExperimental, defaultValue);
         this.correctValues = correctValues;
         this.incorrectValues = incorrectValues;
         this.warningMessage = warningMessage;
--- a/hotspot/test/compiler/rtm/cli/TestPrintPreciseRTMLockingStatisticsBase.java	Thu Jun 01 17:33:07 2017 -0700
+++ b/hotspot/test/compiler/rtm/cli/TestPrintPreciseRTMLockingStatisticsBase.java	Thu Jun 01 17:34:01 2017 -0700
@@ -27,15 +27,12 @@
 import jdk.test.lib.Platform;
 import jdk.test.lib.cli.CommandLineOptionTest;
 
-import java.util.function.BooleanSupplier;
-
 public abstract class TestPrintPreciseRTMLockingStatisticsBase
         extends RTMGenericCommandLineOptionTest {
     protected static final String DEFAULT_VALUE = "false";
 
-    protected TestPrintPreciseRTMLockingStatisticsBase(
-            BooleanSupplier predicate) {
-        super(predicate, "PrintPreciseRTMLockingStatistics", true, false,
+    protected TestPrintPreciseRTMLockingStatisticsBase() {
+        super("PrintPreciseRTMLockingStatistics", true, false,
                 TestPrintPreciseRTMLockingStatisticsBase.DEFAULT_VALUE);
     }
 
--- a/hotspot/test/compiler/rtm/cli/TestPrintPreciseRTMLockingStatisticsOptionOnSupportedConfig.java	Thu Jun 01 17:33:07 2017 -0700
+++ b/hotspot/test/compiler/rtm/cli/TestPrintPreciseRTMLockingStatisticsOptionOnSupportedConfig.java	Thu Jun 01 17:34:01 2017 -0700
@@ -29,7 +29,7 @@
  * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
- *
+ * @requires vm.flavor == "server" & !vm.emulatedClient & vm.rtm.cpu & vm.rtm.os
  * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
@@ -40,17 +40,10 @@
 
 package compiler.rtm.cli;
 
-import compiler.testlibrary.rtm.predicate.SupportedCPU;
-import compiler.testlibrary.rtm.predicate.SupportedOS;
-import compiler.testlibrary.rtm.predicate.SupportedVM;
 import jdk.test.lib.cli.CommandLineOptionTest;
-import jdk.test.lib.cli.predicate.AndPredicate;
 
 public class TestPrintPreciseRTMLockingStatisticsOptionOnSupportedConfig
         extends TestPrintPreciseRTMLockingStatisticsBase {
-    private TestPrintPreciseRTMLockingStatisticsOptionOnSupportedConfig() {
-        super(new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM()));
-    }
 
     @Override
     protected void verifyOptionValues() throws Throwable {
@@ -87,6 +80,6 @@
 
     public static void main(String args[]) throws Throwable {
         new TestPrintPreciseRTMLockingStatisticsOptionOnSupportedConfig()
-                .test();
+                .runTestCases();
     }
 }
--- a/hotspot/test/compiler/rtm/cli/TestPrintPreciseRTMLockingStatisticsOptionOnUnsupportedConfig.java	Thu Jun 01 17:33:07 2017 -0700
+++ b/hotspot/test/compiler/rtm/cli/TestPrintPreciseRTMLockingStatisticsOptionOnUnsupportedConfig.java	Thu Jun 01 17:34:01 2017 -0700
@@ -29,7 +29,8 @@
  * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
- *
+ * @requires !(vm.flavor == "server" & !vm.emulatedClient & vm.rtm.cpu & vm.rtm.os)
+ * @build sun.hotspot.WhiteBox
  * @build compiler.rtm.cli.TestPrintPreciseRTMLockingStatisticsOptionOnUnsupportedConfig
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
@@ -40,21 +41,11 @@
 
 package compiler.rtm.cli;
 
-import compiler.testlibrary.rtm.predicate.SupportedCPU;
-import compiler.testlibrary.rtm.predicate.SupportedOS;
-import compiler.testlibrary.rtm.predicate.SupportedVM;
-import jdk.test.lib.cli.predicate.AndPredicate;
-import jdk.test.lib.cli.predicate.NotPredicate;
-
 public class TestPrintPreciseRTMLockingStatisticsOptionOnUnsupportedConfig
         extends TestPrintPreciseRTMLockingStatisticsBase {
-    private TestPrintPreciseRTMLockingStatisticsOptionOnUnsupportedConfig() {
-        super(new NotPredicate(
-                new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM())));
-    }
 
     public static void main(String args[]) throws Throwable {
         new TestPrintPreciseRTMLockingStatisticsOptionOnUnsupportedConfig()
-                .test();
+                .runTestCases();
     }
 }
--- a/hotspot/test/compiler/rtm/cli/TestRTMAbortRatioOptionOnSupportedConfig.java	Thu Jun 01 17:33:07 2017 -0700
+++ b/hotspot/test/compiler/rtm/cli/TestRTMAbortRatioOptionOnSupportedConfig.java	Thu Jun 01 17:34:01 2017 -0700
@@ -29,7 +29,7 @@
  * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
- *
+ * @requires vm.flavor == "server" & !vm.emulatedClient & vm.rtm.cpu & vm.rtm.os
  * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
@@ -55,6 +55,6 @@
     }
 
     public static void main(String args[]) throws Throwable {
-        new TestRTMAbortRatioOptionOnSupportedConfig().test();
+        new TestRTMAbortRatioOptionOnSupportedConfig().runTestCases();
     }
 }
--- a/hotspot/test/compiler/rtm/cli/TestRTMAbortRatioOptionOnUnsupportedConfig.java	Thu Jun 01 17:33:07 2017 -0700
+++ b/hotspot/test/compiler/rtm/cli/TestRTMAbortRatioOptionOnUnsupportedConfig.java	Thu Jun 01 17:34:01 2017 -0700
@@ -29,7 +29,7 @@
  * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
- *
+ * @requires !(vm.flavor == "server" & !vm.emulatedClient & vm.rtm.cpu & vm.rtm.os)
  * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
@@ -40,25 +40,17 @@
 
 package compiler.rtm.cli;
 
-import compiler.testlibrary.rtm.predicate.SupportedCPU;
-import compiler.testlibrary.rtm.predicate.SupportedOS;
-import compiler.testlibrary.rtm.predicate.SupportedVM;
-import jdk.test.lib.cli.predicate.AndPredicate;
-import jdk.test.lib.cli.predicate.NotPredicate;
-
 public class TestRTMAbortRatioOptionOnUnsupportedConfig
         extends RTMGenericCommandLineOptionTest {
     private static final String DEFAULT_VALUE = "50";
 
     private TestRTMAbortRatioOptionOnUnsupportedConfig() {
-        super(new NotPredicate(
-                new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM())),
-                "RTMAbortRatio", false, true,
+        super("RTMAbortRatio", false, true,
                 TestRTMAbortRatioOptionOnUnsupportedConfig.DEFAULT_VALUE,
-                "0", "10", "100", "200");
+                "0", "10", "100");
     }
 
     public static void main(String args[]) throws Throwable {
-        new TestRTMAbortRatioOptionOnUnsupportedConfig().test();
+        new TestRTMAbortRatioOptionOnUnsupportedConfig().runTestCases();
     }
 }
--- a/hotspot/test/compiler/rtm/cli/TestRTMAbortThresholdOption.java	Thu Jun 01 17:33:07 2017 -0700
+++ b/hotspot/test/compiler/rtm/cli/TestRTMAbortThresholdOption.java	Thu Jun 01 17:34:01 2017 -0700
@@ -39,12 +39,12 @@
     private static final String DEFAULT_VALUE = "1000";
 
     private TestRTMAbortThresholdOption() {
-        super(Boolean.TRUE::booleanValue, "RTMAbortThreshold", false, true,
+        super("RTMAbortThreshold", false, true,
                 TestRTMAbortThresholdOption.DEFAULT_VALUE,
                 "0", "42", "100", "10000");
     }
 
     public static void main(String args[]) throws Throwable {
-        new TestRTMAbortThresholdOption().test();
+        new TestRTMAbortThresholdOption().runTestCases();
     }
 }
--- a/hotspot/test/compiler/rtm/cli/TestRTMLockingCalculationDelayOption.java	Thu Jun 01 17:33:07 2017 -0700
+++ b/hotspot/test/compiler/rtm/cli/TestRTMLockingCalculationDelayOption.java	Thu Jun 01 17:34:01 2017 -0700
@@ -39,11 +39,11 @@
     private static final String DEFAULT_VALUE = "0";
 
     private TestRTMLockingCalculationDelayOption() {
-        super(Boolean.TRUE::booleanValue, "RTMLockingCalculationDelay", false,
+        super("RTMLockingCalculationDelay", false,
                 true, TestRTMLockingCalculationDelayOption.DEFAULT_VALUE);
     }
 
     public static void main(String agrs[]) throws Throwable {
-        new TestRTMLockingCalculationDelayOption().test();
+        new TestRTMLockingCalculationDelayOption().runTestCases();
     }
 }
--- a/hotspot/test/compiler/rtm/cli/TestRTMLockingThresholdOption.java	Thu Jun 01 17:33:07 2017 -0700
+++ b/hotspot/test/compiler/rtm/cli/TestRTMLockingThresholdOption.java	Thu Jun 01 17:34:01 2017 -0700
@@ -39,11 +39,11 @@
     private static final String DEFAULT_VALUE = "10000";
 
     private TestRTMLockingThresholdOption() {
-        super(Boolean.TRUE::booleanValue, "RTMLockingThreshold", false, true,
+        super("RTMLockingThreshold", false, true,
                 TestRTMLockingThresholdOption.DEFAULT_VALUE);
     }
 
     public static void main(String args[]) throws Throwable {
-        new TestRTMLockingThresholdOption().test();
+        new TestRTMLockingThresholdOption().runTestCases();
     }
 }
--- a/hotspot/test/compiler/rtm/cli/TestRTMRetryCountOption.java	Thu Jun 01 17:33:07 2017 -0700
+++ b/hotspot/test/compiler/rtm/cli/TestRTMRetryCountOption.java	Thu Jun 01 17:34:01 2017 -0700
@@ -38,12 +38,12 @@
     private static final String DEFAULT_VALUE = "5";
 
     private TestRTMRetryCountOption() {
-        super(Boolean.TRUE::booleanValue, "RTMRetryCount", false, false,
+        super("RTMRetryCount", false, false,
                 TestRTMRetryCountOption.DEFAULT_VALUE,
                 "0", "10", "100", "1000");
     }
 
     public static void main(String args[]) throws Throwable {
-        new TestRTMRetryCountOption().test();
+        new TestRTMRetryCountOption().runTestCases();
     }
 }
--- a/hotspot/test/compiler/rtm/cli/TestRTMSpinLoopCountOption.java	Thu Jun 01 17:33:07 2017 -0700
+++ b/hotspot/test/compiler/rtm/cli/TestRTMSpinLoopCountOption.java	Thu Jun 01 17:34:01 2017 -0700
@@ -39,12 +39,12 @@
     private static final String DEFAULT_VALUE = "100";
 
     private TestRTMSpinLoopCountOption() {
-        super(Boolean.TRUE::booleanValue, "RTMSpinLoopCount", false, true,
+        super("RTMSpinLoopCount", false, true,
                 TestRTMSpinLoopCountOption.DEFAULT_VALUE,
                 "0", "10", "42", "1000");
     }
 
     public static void main(String args[]) throws Throwable {
-        new TestRTMSpinLoopCountOption().test();
+        new TestRTMSpinLoopCountOption().runTestCases();
     }
 }
--- a/hotspot/test/compiler/rtm/cli/TestRTMTotalCountIncrRateOptionOnSupportedConfig.java	Thu Jun 01 17:33:07 2017 -0700
+++ b/hotspot/test/compiler/rtm/cli/TestRTMTotalCountIncrRateOptionOnSupportedConfig.java	Thu Jun 01 17:34:01 2017 -0700
@@ -29,7 +29,7 @@
  * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
- *
+ * @requires vm.flavor == "server" & !vm.emulatedClient & vm.rtm.cpu & vm.rtm.os
  * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
@@ -55,6 +55,6 @@
     }
 
     public static void main(String args[]) throws Throwable {
-        new TestRTMTotalCountIncrRateOptionOnSupportedConfig().test();
+        new TestRTMTotalCountIncrRateOptionOnSupportedConfig().runTestCases();
     }
 }
--- a/hotspot/test/compiler/rtm/cli/TestRTMTotalCountIncrRateOptionOnUnsupportedConfig.java	Thu Jun 01 17:33:07 2017 -0700
+++ b/hotspot/test/compiler/rtm/cli/TestRTMTotalCountIncrRateOptionOnUnsupportedConfig.java	Thu Jun 01 17:34:01 2017 -0700
@@ -29,7 +29,7 @@
  * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
- *
+ * @requires !(vm.flavor == "server" & !vm.emulatedClient & vm.rtm.cpu & vm.rtm.os)
  * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
@@ -40,26 +40,18 @@
 
 package compiler.rtm.cli;
 
-import compiler.testlibrary.rtm.predicate.SupportedCPU;
-import compiler.testlibrary.rtm.predicate.SupportedOS;
-import compiler.testlibrary.rtm.predicate.SupportedVM;
-import jdk.test.lib.cli.predicate.AndPredicate;
-import jdk.test.lib.cli.predicate.NotPredicate;
-
 public class TestRTMTotalCountIncrRateOptionOnUnsupportedConfig
         extends RTMGenericCommandLineOptionTest {
     private static final String DEFAULT_VALUE = "64";
 
     private TestRTMTotalCountIncrRateOptionOnUnsupportedConfig() {
-        super(new NotPredicate(
-                new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM())),
-                "RTMTotalCountIncrRate", false, true,
+        super("RTMTotalCountIncrRate", false, true,
                 TestRTMTotalCountIncrRateOptionOnUnsupportedConfig
                         .DEFAULT_VALUE,
-                "-1", "0", "42", "128");
+                "1", "42", "128");
     }
 
     public static void main(String args[]) throws Throwable {
-        new TestRTMTotalCountIncrRateOptionOnUnsupportedConfig().test();
+        new TestRTMTotalCountIncrRateOptionOnUnsupportedConfig().runTestCases();
     }
 }
--- a/hotspot/test/compiler/rtm/cli/TestUseRTMDeoptOptionOnSupportedConfig.java	Thu Jun 01 17:33:07 2017 -0700
+++ b/hotspot/test/compiler/rtm/cli/TestUseRTMDeoptOptionOnSupportedConfig.java	Thu Jun 01 17:34:01 2017 -0700
@@ -29,7 +29,7 @@
  * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
- *
+ * @requires vm.flavor == "server" & !vm.emulatedClient & vm.rtm.cpu & vm.rtm.os
  * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
@@ -40,22 +40,12 @@
 
 package compiler.rtm.cli;
 
-import compiler.testlibrary.rtm.predicate.SupportedCPU;
-import compiler.testlibrary.rtm.predicate.SupportedOS;
-import compiler.testlibrary.rtm.predicate.SupportedVM;
 import jdk.test.lib.process.ExitCode;
 import jdk.test.lib.cli.CommandLineOptionTest;
-import jdk.test.lib.cli.predicate.AndPredicate;
 
-public class TestUseRTMDeoptOptionOnSupportedConfig
-        extends CommandLineOptionTest {
+public class TestUseRTMDeoptOptionOnSupportedConfig {
     private static final String DEFAULT_VALUE = "false";
 
-    private TestUseRTMDeoptOptionOnSupportedConfig() {
-        super(new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM()));
-    }
-
-    @Override
     public void runTestCases() throws Throwable {
         String shouldPassMessage = " JVM should startup with option '"
                 + "-XX:+UseRTMDeopt' without any warnings";
@@ -96,6 +86,6 @@
     }
 
     public static void main(String args[]) throws Throwable {
-        new TestUseRTMDeoptOptionOnSupportedConfig().test();
+        new TestUseRTMDeoptOptionOnSupportedConfig().runTestCases();
     }
 }
--- a/hotspot/test/compiler/rtm/cli/TestUseRTMDeoptOptionOnUnsupportedConfig.java	Thu Jun 01 17:33:07 2017 -0700
+++ b/hotspot/test/compiler/rtm/cli/TestUseRTMDeoptOptionOnUnsupportedConfig.java	Thu Jun 01 17:34:01 2017 -0700
@@ -29,7 +29,7 @@
  * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
- *
+ * @requires !(vm.flavor == "server" & !vm.emulatedClient & vm.rtm.cpu & vm.rtm.os)
  * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
@@ -40,21 +40,14 @@
 
 package compiler.rtm.cli;
 
-import compiler.testlibrary.rtm.predicate.SupportedCPU;
-import compiler.testlibrary.rtm.predicate.SupportedOS;
-import compiler.testlibrary.rtm.predicate.SupportedVM;
 import jdk.test.lib.cli.CommandLineOptionTest;
-import jdk.test.lib.cli.predicate.AndPredicate;
-import jdk.test.lib.cli.predicate.NotPredicate;
 
 public class TestUseRTMDeoptOptionOnUnsupportedConfig
         extends RTMGenericCommandLineOptionTest {
     private static final String DEFAULT_VALUE = "false";
 
     private TestUseRTMDeoptOptionOnUnsupportedConfig() {
-        super(new NotPredicate(
-                new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM())),
-                "UseRTMDeopt", true, false,
+        super("UseRTMDeopt", true, false,
                 TestUseRTMDeoptOptionOnUnsupportedConfig.DEFAULT_VALUE,
                 "true");
     }
@@ -77,6 +70,6 @@
     }
 
     public static void main(String args[]) throws Throwable {
-        new TestUseRTMDeoptOptionOnUnsupportedConfig().test();
+        new TestUseRTMDeoptOptionOnUnsupportedConfig().runTestCases();
     }
 }
--- a/hotspot/test/compiler/rtm/cli/TestUseRTMForStackLocksOptionOnSupportedConfig.java	Thu Jun 01 17:33:07 2017 -0700
+++ b/hotspot/test/compiler/rtm/cli/TestUseRTMForStackLocksOptionOnSupportedConfig.java	Thu Jun 01 17:34:01 2017 -0700
@@ -29,7 +29,7 @@
  * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
- *
+ * @requires vm.flavor == "server" & !vm.emulatedClient & vm.rtm.cpu & vm.rtm.os
  * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
@@ -40,22 +40,12 @@
 
 package compiler.rtm.cli;
 
-import compiler.testlibrary.rtm.predicate.SupportedCPU;
-import compiler.testlibrary.rtm.predicate.SupportedOS;
-import compiler.testlibrary.rtm.predicate.SupportedVM;
 import jdk.test.lib.process.ExitCode;
 import jdk.test.lib.cli.CommandLineOptionTest;
-import jdk.test.lib.cli.predicate.AndPredicate;
 
-public class TestUseRTMForStackLocksOptionOnSupportedConfig
-        extends CommandLineOptionTest {
+public class TestUseRTMForStackLocksOptionOnSupportedConfig {
     private static final String DEFAULT_VALUE = "false";
 
-    private TestUseRTMForStackLocksOptionOnSupportedConfig() {
-        super(new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM()));
-    }
-
-    @Override
     public void runTestCases() throws Throwable {
         String errorMessage
                 = CommandLineOptionTest.getExperimentalOptionErrorMessage(
@@ -127,6 +117,6 @@
     }
 
     public static void main(String args[]) throws Throwable {
-        new TestUseRTMForStackLocksOptionOnSupportedConfig().test();
+        new TestUseRTMForStackLocksOptionOnSupportedConfig().runTestCases();
     }
 }
--- a/hotspot/test/compiler/rtm/cli/TestUseRTMForStackLocksOptionOnUnsupportedConfig.java	Thu Jun 01 17:33:07 2017 -0700
+++ b/hotspot/test/compiler/rtm/cli/TestUseRTMForStackLocksOptionOnUnsupportedConfig.java	Thu Jun 01 17:34:01 2017 -0700
@@ -29,7 +29,7 @@
  * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
- *
+ * @requires !(vm.flavor == "server" & !vm.emulatedClient & vm.rtm.cpu & vm.rtm.os)
  * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
@@ -40,22 +40,15 @@
 
 package compiler.rtm.cli;
 
-import compiler.testlibrary.rtm.predicate.SupportedCPU;
-import compiler.testlibrary.rtm.predicate.SupportedOS;
-import compiler.testlibrary.rtm.predicate.SupportedVM;
 import jdk.test.lib.process.ExitCode;
 import jdk.test.lib.cli.CommandLineOptionTest;
-import jdk.test.lib.cli.predicate.AndPredicate;
-import jdk.test.lib.cli.predicate.NotPredicate;
 
 public class TestUseRTMForStackLocksOptionOnUnsupportedConfig
         extends RTMGenericCommandLineOptionTest {
     private static final String DEFAULT_VALUE = "false";
 
     private TestUseRTMForStackLocksOptionOnUnsupportedConfig() {
-        super(new NotPredicate(
-                new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM())),
-                "UseRTMForStackLocks", true, true,
+        super("UseRTMForStackLocks", true, true,
                 TestUseRTMForStackLocksOptionOnUnsupportedConfig.DEFAULT_VALUE,
                 "true");
     }
@@ -111,6 +104,6 @@
     }
 
     public static void main(String args[]) throws Throwable {
-        new TestUseRTMForStackLocksOptionOnUnsupportedConfig().test();
+        new TestUseRTMForStackLocksOptionOnUnsupportedConfig().runTestCases();
     }
 }
--- a/hotspot/test/compiler/rtm/cli/TestUseRTMLockingOptionOnSupportedConfig.java	Thu Jun 01 17:33:07 2017 -0700
+++ b/hotspot/test/compiler/rtm/cli/TestUseRTMLockingOptionOnSupportedConfig.java	Thu Jun 01 17:34:01 2017 -0700
@@ -29,7 +29,7 @@
  * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
- *
+ * @requires vm.flavor == "server" & !vm.emulatedClient & vm.rtm.cpu & vm.rtm.os
  * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
@@ -40,22 +40,12 @@
 
 package compiler.rtm.cli;
 
-import compiler.testlibrary.rtm.predicate.SupportedCPU;
-import compiler.testlibrary.rtm.predicate.SupportedOS;
-import compiler.testlibrary.rtm.predicate.SupportedVM;
 import jdk.test.lib.process.ExitCode;
 import jdk.test.lib.cli.CommandLineOptionTest;
-import jdk.test.lib.cli.predicate.AndPredicate;
 
-public class TestUseRTMLockingOptionOnSupportedConfig
-        extends CommandLineOptionTest {
+public class TestUseRTMLockingOptionOnSupportedConfig {
     private static final String DEFAULT_VALUE = "false";
 
-    private TestUseRTMLockingOptionOnSupportedConfig() {
-        super(new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM()));
-    }
-
-    @Override
     public void runTestCases() throws Throwable {
         String unrecongnizedOption
                 =  CommandLineOptionTest.getUnrecognizedOptionErrorMessage(
@@ -104,6 +94,6 @@
     }
 
     public static void main(String args[]) throws Throwable {
-        new TestUseRTMLockingOptionOnSupportedConfig().test();
+        new TestUseRTMLockingOptionOnSupportedConfig().runTestCases();
     }
 }
--- a/hotspot/test/compiler/rtm/cli/TestUseRTMLockingOptionOnUnsupportedCPU.java	Thu Jun 01 17:33:07 2017 -0700
+++ b/hotspot/test/compiler/rtm/cli/TestUseRTMLockingOptionOnUnsupportedCPU.java	Thu Jun 01 17:34:01 2017 -0700
@@ -29,7 +29,7 @@
  * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
- *
+ * @requires (!vm.rtm.cpu) & (vm.flavor == "server" & !vm.emulatedClient)
  * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
@@ -40,24 +40,13 @@
 
 package compiler.rtm.cli;
 
-import compiler.testlibrary.rtm.predicate.SupportedCPU;
-import compiler.testlibrary.rtm.predicate.SupportedVM;
 import jdk.test.lib.process.ExitCode;
 import jdk.test.lib.Platform;
 import jdk.test.lib.cli.CommandLineOptionTest;
-import jdk.test.lib.cli.predicate.AndPredicate;
-import jdk.test.lib.cli.predicate.NotPredicate;
 
-public class TestUseRTMLockingOptionOnUnsupportedCPU
-        extends CommandLineOptionTest {
+public class TestUseRTMLockingOptionOnUnsupportedCPU {
     private static final String DEFAULT_VALUE = "false";
 
-    private TestUseRTMLockingOptionOnUnsupportedCPU() {
-        super(new AndPredicate(new NotPredicate(new SupportedCPU()),
-                new SupportedVM()));
-    }
-
-    @Override
     public void runTestCases() throws Throwable {
         String unrecongnizedOption
                 = CommandLineOptionTest.getUnrecognizedOptionErrorMessage(
@@ -107,6 +96,6 @@
     }
 
     public static void main(String args[]) throws Throwable {
-        new TestUseRTMLockingOptionOnUnsupportedCPU().test();
+        new TestUseRTMLockingOptionOnUnsupportedCPU().runTestCases();
     }
 }
--- a/hotspot/test/compiler/rtm/cli/TestUseRTMLockingOptionOnUnsupportedVM.java	Thu Jun 01 17:33:07 2017 -0700
+++ b/hotspot/test/compiler/rtm/cli/TestUseRTMLockingOptionOnUnsupportedVM.java	Thu Jun 01 17:34:01 2017 -0700
@@ -29,7 +29,7 @@
  * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
- *
+ * @requires vm.rtm.cpu & !(vm.flavor == "server" & !vm.emulatedClient)
  * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
@@ -40,22 +40,12 @@
 
 package compiler.rtm.cli;
 
-import compiler.testlibrary.rtm.predicate.SupportedCPU;
-import compiler.testlibrary.rtm.predicate.SupportedVM;
 import jdk.test.lib.process.ExitCode;
 import jdk.test.lib.cli.CommandLineOptionTest;
-import jdk.test.lib.cli.predicate.AndPredicate;
-import jdk.test.lib.cli.predicate.NotPredicate;
 
-public class TestUseRTMLockingOptionOnUnsupportedVM
-        extends CommandLineOptionTest {
+public class TestUseRTMLockingOptionOnUnsupportedVM {
     private static final String DEFAULT_VALUE = "false";
 
-    private TestUseRTMLockingOptionOnUnsupportedVM() {
-        super(new AndPredicate(new SupportedCPU(),
-                new NotPredicate(new SupportedVM())));
-    }
-    @Override
     public void runTestCases() throws Throwable {
         String errorMessage
                 = RTMGenericCommandLineOptionTest.RTM_UNSUPPORTED_VM_ERROR;
@@ -82,6 +72,6 @@
     }
 
     public static void main(String args[]) throws Throwable {
-        new TestUseRTMLockingOptionOnUnsupportedVM().test();
+        new TestUseRTMLockingOptionOnUnsupportedVM().runTestCases();
     }
 }
--- a/hotspot/test/compiler/rtm/cli/TestUseRTMLockingOptionWithBiasedLocking.java	Thu Jun 01 17:33:07 2017 -0700
+++ b/hotspot/test/compiler/rtm/cli/TestUseRTMLockingOptionWithBiasedLocking.java	Thu Jun 01 17:34:01 2017 -0700
@@ -29,7 +29,7 @@
  * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
- *
+ * @requires vm.flavor == "server" & !vm.emulatedClient & vm.rtm.cpu & vm.rtm.os
  * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
@@ -40,20 +40,11 @@
 
 package compiler.rtm.cli;
 
-import compiler.testlibrary.rtm.predicate.SupportedCPU;
-import compiler.testlibrary.rtm.predicate.SupportedOS;
-import compiler.testlibrary.rtm.predicate.SupportedVM;
 import jdk.test.lib.process.ExitCode;
 import jdk.test.lib.cli.CommandLineOptionTest;
-import jdk.test.lib.cli.predicate.AndPredicate;
 
-public class TestUseRTMLockingOptionWithBiasedLocking
-        extends CommandLineOptionTest {
-    private TestUseRTMLockingOptionWithBiasedLocking() {
-        super(new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM()));
-    }
+public class TestUseRTMLockingOptionWithBiasedLocking {
 
-    @Override
     public void runTestCases() throws Throwable {
         String warningMessage
                 = RTMGenericCommandLineOptionTest.RTM_BIASED_LOCKING_WARNING;
@@ -98,6 +89,6 @@
     }
 
     public static void main(String args[]) throws Throwable {
-        new TestUseRTMLockingOptionWithBiasedLocking().test();
+        new TestUseRTMLockingOptionWithBiasedLocking().runTestCases();
     }
 }
--- a/hotspot/test/compiler/rtm/cli/TestUseRTMXendForLockBusyOption.java	Thu Jun 01 17:33:07 2017 -0700
+++ b/hotspot/test/compiler/rtm/cli/TestUseRTMXendForLockBusyOption.java	Thu Jun 01 17:34:01 2017 -0700
@@ -39,11 +39,11 @@
     private static final String DEFAULT_VALUE = "true";
 
     public TestUseRTMXendForLockBusyOption() {
-        super(Boolean.TRUE::booleanValue, "UseRTMXendForLockBusy", true, true,
+        super("UseRTMXendForLockBusy", true, true,
                 TestUseRTMXendForLockBusyOption.DEFAULT_VALUE, "true");
     }
 
     public static void main(String agrs[]) throws Throwable {
-        new TestUseRTMXendForLockBusyOption().test();
+        new TestUseRTMXendForLockBusyOption().runTestCases();
     }
 }
--- a/hotspot/test/compiler/rtm/locking/TestRTMAbortRatio.java	Thu Jun 01 17:33:07 2017 -0700
+++ b/hotspot/test/compiler/rtm/locking/TestRTMAbortRatio.java	Thu Jun 01 17:34:01 2017 -0700
@@ -29,6 +29,7 @@
  * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
+ * @requires vm.flavor == "server" & !vm.emulatedClient & vm.rtm.cpu & vm.rtm.os
  * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
@@ -43,14 +44,10 @@
 import compiler.testlibrary.rtm.CompilableTest;
 import compiler.testlibrary.rtm.RTMLockingStatistics;
 import compiler.testlibrary.rtm.RTMTestBase;
-import compiler.testlibrary.rtm.predicate.SupportedCPU;
-import compiler.testlibrary.rtm.predicate.SupportedOS;
-import compiler.testlibrary.rtm.predicate.SupportedVM;
 import jdk.internal.misc.Unsafe;
 import jdk.test.lib.Asserts;
 import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.cli.CommandLineOptionTest;
-import jdk.test.lib.cli.predicate.AndPredicate;
 
 import java.util.List;
 
@@ -58,12 +55,8 @@
  * Test verifies that method will be deoptimized on high abort ratio
  * as soon as abort ratio reaches RTMAbortRatio's value.
  */
-public class TestRTMAbortRatio extends CommandLineOptionTest {
-    private TestRTMAbortRatio() {
-        super(new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM()));
-    }
+public class TestRTMAbortRatio {
 
-    @Override
     protected void runTestCases() throws Throwable {
         verifyAbortRatio(0, false);
         verifyAbortRatio(10, false);
@@ -167,7 +160,7 @@
     }
 
     public static void main(String args[]) throws Throwable {
-        new TestRTMAbortRatio().test();
+        new TestRTMAbortRatio().runTestCases();
     }
 }
 
--- a/hotspot/test/compiler/rtm/locking/TestRTMAbortThreshold.java	Thu Jun 01 17:33:07 2017 -0700
+++ b/hotspot/test/compiler/rtm/locking/TestRTMAbortThreshold.java	Thu Jun 01 17:34:01 2017 -0700
@@ -29,6 +29,7 @@
  * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
+ * @requires vm.flavor == "server" & !vm.emulatedClient & vm.rtm.cpu & vm.rtm.os
  * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
@@ -43,13 +44,9 @@
 import compiler.testlibrary.rtm.AbortType;
 import compiler.testlibrary.rtm.RTMLockingStatistics;
 import compiler.testlibrary.rtm.RTMTestBase;
-import compiler.testlibrary.rtm.predicate.SupportedCPU;
-import compiler.testlibrary.rtm.predicate.SupportedOS;
-import compiler.testlibrary.rtm.predicate.SupportedVM;
 import jdk.test.lib.Asserts;
 import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.cli.CommandLineOptionTest;
-import jdk.test.lib.cli.predicate.AndPredicate;
 
 import java.util.List;
 
@@ -57,12 +54,8 @@
  * Test verifies that on RTMAbortThreshold option actually affects how soon
  * method will be deoptimized on high abort ratio.
  */
-public class TestRTMAbortThreshold extends CommandLineOptionTest {
-    private TestRTMAbortThreshold() {
-        super(new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM()));
-    }
+public class TestRTMAbortThreshold {
 
-    @Override
     protected void runTestCases() throws Throwable {
         verifyAbortThreshold(false, 1);
         verifyAbortThreshold(false, 10);
@@ -107,7 +100,7 @@
     }
 
     public static void main(String args[]) throws Throwable {
-         new TestRTMAbortThreshold().test();
+         new TestRTMAbortThreshold().runTestCases();
     }
 }
 
--- a/hotspot/test/compiler/rtm/locking/TestRTMAfterNonRTMDeopt.java	Thu Jun 01 17:33:07 2017 -0700
+++ b/hotspot/test/compiler/rtm/locking/TestRTMAfterNonRTMDeopt.java	Thu Jun 01 17:34:01 2017 -0700
@@ -31,6 +31,7 @@
  * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
+ * @requires vm.flavor == "server" & !vm.emulatedClient & vm.rtm.cpu & vm.rtm.os
  * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
@@ -45,14 +46,10 @@
 import compiler.testlibrary.rtm.CompilableTest;
 import compiler.testlibrary.rtm.RTMLockingStatistics;
 import compiler.testlibrary.rtm.RTMTestBase;
-import compiler.testlibrary.rtm.predicate.SupportedCPU;
-import compiler.testlibrary.rtm.predicate.SupportedOS;
-import compiler.testlibrary.rtm.predicate.SupportedVM;
 import jdk.internal.misc.Unsafe;
 import jdk.test.lib.Asserts;
 import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.cli.CommandLineOptionTest;
-import jdk.test.lib.cli.predicate.AndPredicate;
 
 import java.util.List;
 
@@ -81,15 +78,10 @@
  * ratio will be below 100% and there should be enough lock
  * attempts to recompile method without RTM profiling.
  */
-public class TestRTMAfterNonRTMDeopt extends CommandLineOptionTest {
+public class TestRTMAfterNonRTMDeopt {
     private static final int ABORT_THRESHOLD = 1000;
     private static final String RANGE_CHECK = "range_check";
 
-    private TestRTMAfterNonRTMDeopt() {
-        super(new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM()));
-    }
-
-    @Override
     protected void runTestCases() throws Throwable {
         verifyRTMAfterDeopt(false, false);
         verifyRTMAfterDeopt(true, false);
@@ -214,7 +206,7 @@
     }
 
     public static void main(String args[]) throws Throwable {
-        new TestRTMAfterNonRTMDeopt().test();
+        new TestRTMAfterNonRTMDeopt().runTestCases();
     }
 }
 
--- a/hotspot/test/compiler/rtm/locking/TestRTMDeoptOnHighAbortRatio.java	Thu Jun 01 17:33:07 2017 -0700
+++ b/hotspot/test/compiler/rtm/locking/TestRTMDeoptOnHighAbortRatio.java	Thu Jun 01 17:34:01 2017 -0700
@@ -29,6 +29,7 @@
  * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
+ * @requires vm.flavor == "server" & !vm.emulatedClient & vm.rtm.cpu & vm.rtm.os
  * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
@@ -43,13 +44,9 @@
 import compiler.testlibrary.rtm.AbortType;
 import compiler.testlibrary.rtm.RTMLockingStatistics;
 import compiler.testlibrary.rtm.RTMTestBase;
-import compiler.testlibrary.rtm.predicate.SupportedCPU;
-import compiler.testlibrary.rtm.predicate.SupportedOS;
-import compiler.testlibrary.rtm.predicate.SupportedVM;
 import jdk.test.lib.Asserts;
 import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.cli.CommandLineOptionTest;
-import jdk.test.lib.cli.predicate.AndPredicate;
 
 import java.util.List;
 
@@ -61,15 +58,10 @@
  * so in order to avoid issue with retriable locks -XX:RTMRetryCount=0 is used.
  * For more details on that issue see {@link TestUseRTMAfterLockInflation}.
  */
-public class TestRTMDeoptOnHighAbortRatio extends CommandLineOptionTest {
+public class TestRTMDeoptOnHighAbortRatio {
     private static final long ABORT_THRESHOLD
             = AbortProvoker.DEFAULT_ITERATIONS / 2L;
 
-    private TestRTMDeoptOnHighAbortRatio() {
-        super(new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM()));
-    }
-
-    @Override
     protected void runTestCases() throws Throwable {
         verifyDeopt(false);
         verifyDeopt(true);
@@ -119,7 +111,7 @@
     }
 
     public static void main(String args[]) throws Throwable {
-        new TestRTMDeoptOnHighAbortRatio().test();
+        new TestRTMDeoptOnHighAbortRatio().runTestCases();
     }
 }
 
--- a/hotspot/test/compiler/rtm/locking/TestRTMDeoptOnLowAbortRatio.java	Thu Jun 01 17:33:07 2017 -0700
+++ b/hotspot/test/compiler/rtm/locking/TestRTMDeoptOnLowAbortRatio.java	Thu Jun 01 17:34:01 2017 -0700
@@ -28,6 +28,7 @@
  * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
+ * @requires vm.flavor == "server" & !vm.emulatedClient & vm.rtm.cpu & vm.rtm.os
  * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
@@ -42,14 +43,10 @@
 import compiler.testlibrary.rtm.CompilableTest;
 import compiler.testlibrary.rtm.RTMLockingStatistics;
 import compiler.testlibrary.rtm.RTMTestBase;
-import compiler.testlibrary.rtm.predicate.SupportedCPU;
-import compiler.testlibrary.rtm.predicate.SupportedOS;
-import compiler.testlibrary.rtm.predicate.SupportedVM;
 import jdk.internal.misc.Unsafe;
 import jdk.test.lib.Asserts;
 import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.cli.CommandLineOptionTest;
-import jdk.test.lib.cli.predicate.AndPredicate;
 
 import java.util.List;
 
@@ -61,15 +58,10 @@
  * so in order to avoid issue with retriable locks -XX:RTMRetryCount=0 is used.
  * For more details on that issue see {@link TestUseRTMAfterLockInflation}.
  */
-public class TestRTMDeoptOnLowAbortRatio extends CommandLineOptionTest {
+public class TestRTMDeoptOnLowAbortRatio {
     private static final long LOCKING_THRESHOLD = 100L;
     private static final long ABORT_THRESHOLD = LOCKING_THRESHOLD / 2L;
 
-    private TestRTMDeoptOnLowAbortRatio() {
-        super(new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM()));
-    }
-
-    @Override
     protected void runTestCases() throws Throwable {
         verifyRTMDeopt(false);
         verifyRTMDeopt(true);
@@ -172,6 +164,6 @@
     }
 
     public static void main(String args[]) throws Throwable {
-        new TestRTMDeoptOnLowAbortRatio().test();
+        new TestRTMDeoptOnLowAbortRatio().runTestCases();
     }
 }
--- a/hotspot/test/compiler/rtm/locking/TestRTMLockingCalculationDelay.java	Thu Jun 01 17:33:07 2017 -0700
+++ b/hotspot/test/compiler/rtm/locking/TestRTMLockingCalculationDelay.java	Thu Jun 01 17:34:01 2017 -0700
@@ -29,6 +29,7 @@
  * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
+ * @requires vm.flavor == "server" & !vm.emulatedClient & vm.rtm.cpu & vm.rtm.os
  * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
@@ -42,26 +43,17 @@
 import compiler.testlibrary.rtm.AbortProvoker;
 import compiler.testlibrary.rtm.AbortType;
 import compiler.testlibrary.rtm.RTMTestBase;
-import compiler.testlibrary.rtm.predicate.SupportedCPU;
-import compiler.testlibrary.rtm.predicate.SupportedOS;
-import compiler.testlibrary.rtm.predicate.SupportedVM;
 import jdk.test.lib.Asserts;
 import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.cli.CommandLineOptionTest;
-import jdk.test.lib.cli.predicate.AndPredicate;
 
 /**
  * Test verifies that abort ratio calculation could be delayed using
  * RTMLockingCalculationDelay option.
  */
-public class TestRTMLockingCalculationDelay extends CommandLineOptionTest {
+public class TestRTMLockingCalculationDelay {
     private static final boolean INFLATE_MONITOR = true;
 
-    private TestRTMLockingCalculationDelay() {
-        super(new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM()));
-    }
-
-    @Override
     protected void runTestCases() throws Throwable {
         // verify that calculation will be started immediately
         verifyLockingCalculationDelay(0, 0, true);
@@ -110,6 +102,6 @@
     }
 
     public static void main(String args[]) throws Throwable {
-        new TestRTMLockingCalculationDelay().test();
+        new TestRTMLockingCalculationDelay().runTestCases();
     }
 }
--- a/hotspot/test/compiler/rtm/locking/TestRTMLockingThreshold.java	Thu Jun 01 17:33:07 2017 -0700
+++ b/hotspot/test/compiler/rtm/locking/TestRTMLockingThreshold.java	Thu Jun 01 17:34:01 2017 -0700
@@ -29,6 +29,7 @@
  * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
+ * @requires vm.flavor == "server" & !vm.emulatedClient & vm.rtm.cpu & vm.rtm.os
  * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
@@ -43,14 +44,10 @@
 import compiler.testlibrary.rtm.CompilableTest;
 import compiler.testlibrary.rtm.RTMLockingStatistics;
 import compiler.testlibrary.rtm.RTMTestBase;
-import compiler.testlibrary.rtm.predicate.SupportedCPU;
-import compiler.testlibrary.rtm.predicate.SupportedOS;
-import compiler.testlibrary.rtm.predicate.SupportedVM;
 import jdk.internal.misc.Unsafe;
 import jdk.test.lib.Asserts;
 import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.cli.CommandLineOptionTest;
-import jdk.test.lib.cli.predicate.AndPredicate;
 
 import java.util.List;
 
@@ -58,10 +55,7 @@
  * Test verifies that RTMLockingThreshold option actually affects how soon
  * method will be deoptimized on low abort ratio.
  */
-public class TestRTMLockingThreshold extends CommandLineOptionTest {
-    private TestRTMLockingThreshold() {
-        super(new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM()));
-    }
+public class TestRTMLockingThreshold {
 
     /**
      * We use non-zero abort threshold to avoid abort related to
@@ -70,7 +64,6 @@
      */
     private static final int MIN_ABORT_THRESHOLD = 10;
 
-    @Override
     protected void runTestCases() throws Throwable {
         verifyLockingThreshold(0, false);
         verifyLockingThreshold(100, false);
@@ -183,6 +176,6 @@
     }
 
     public static void main(String args[]) throws Throwable {
-        new TestRTMLockingThreshold().test();
+        new TestRTMLockingThreshold().runTestCases();
     }
 }
--- a/hotspot/test/compiler/rtm/locking/TestRTMRetryCount.java	Thu Jun 01 17:33:07 2017 -0700
+++ b/hotspot/test/compiler/rtm/locking/TestRTMRetryCount.java	Thu Jun 01 17:34:01 2017 -0700
@@ -28,6 +28,7 @@
  * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
+ * @requires vm.flavor == "server" & !vm.emulatedClient & vm.rtm.cpu & vm.rtm.os
  * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
@@ -42,13 +43,9 @@
 import compiler.testlibrary.rtm.CompilableTest;
 import compiler.testlibrary.rtm.RTMLockingStatistics;
 import compiler.testlibrary.rtm.RTMTestBase;
-import compiler.testlibrary.rtm.predicate.SupportedCPU;
-import compiler.testlibrary.rtm.predicate.SupportedOS;
-import compiler.testlibrary.rtm.predicate.SupportedVM;
 import jdk.test.lib.Asserts;
 import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.cli.CommandLineOptionTest;
-import jdk.test.lib.cli.predicate.AndPredicate;
 
 import java.util.List;
 
@@ -56,18 +53,13 @@
  * Test verifies that RTMRetryCount option actually affects amount of
  * retries on lock busy.
  */
-public class TestRTMRetryCount extends CommandLineOptionTest {
+public class TestRTMRetryCount {
     /**
      * Time in ms, during which busy lock will be locked.
      */
     private static final int LOCKING_TIME = 5000;
     private static final boolean INFLATE_MONITOR = true;
 
-    private TestRTMRetryCount() {
-        super(new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM()));
-    }
-
-    @Override
     protected void runTestCases() throws Throwable {
         verifyRTMRetryCount(0);
         verifyRTMRetryCount(1);
@@ -107,6 +99,6 @@
     }
 
     public static void main(String args[]) throws Throwable {
-        new TestRTMRetryCount().test();
+        new TestRTMRetryCount().runTestCases();
     }
 }
--- a/hotspot/test/compiler/rtm/locking/TestRTMSpinLoopCount.java	Thu Jun 01 17:33:07 2017 -0700
+++ b/hotspot/test/compiler/rtm/locking/TestRTMSpinLoopCount.java	Thu Jun 01 17:34:01 2017 -0700
@@ -29,6 +29,7 @@
  * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
+ * @requires vm.flavor == "server" & !vm.emulatedClient & vm.rtm.cpu & vm.rtm.os
  * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
@@ -43,13 +44,9 @@
 import compiler.testlibrary.rtm.CompilableTest;
 import compiler.testlibrary.rtm.RTMLockingStatistics;
 import compiler.testlibrary.rtm.RTMTestBase;
-import compiler.testlibrary.rtm.predicate.SupportedCPU;
-import compiler.testlibrary.rtm.predicate.SupportedOS;
-import compiler.testlibrary.rtm.predicate.SupportedVM;
 import jdk.test.lib.Asserts;
 import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.cli.CommandLineOptionTest;
-import jdk.test.lib.cli.predicate.AndPredicate;
 
 import java.util.List;
 
@@ -57,7 +54,7 @@
  * Test verifies that RTMSpinLoopCount increase time spent between retries
  * by comparing amount of retries done with different RTMSpinLoopCount's values.
  */
-public class TestRTMSpinLoopCount extends CommandLineOptionTest {
+public class TestRTMSpinLoopCount {
     private static final int LOCKING_TIME = 1000;
     private static final int RTM_RETRY_COUNT = 1000;
     private static final boolean INFLATE_MONITOR = true;
@@ -65,11 +62,6 @@
     private static final int[] SPIN_LOOP_COUNTS
             = new int[] { 0, 100, 1_000, 1_000_000, 10_000_000 };
 
-    private TestRTMSpinLoopCount() {
-        super(new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM()));
-    }
-
-    @Override
     protected void runTestCases() throws Throwable {
         long[] aborts = new long[TestRTMSpinLoopCount.SPIN_LOOP_COUNTS.length];
         for (int i = 0; i < TestRTMSpinLoopCount.SPIN_LOOP_COUNTS.length; i++) {
@@ -121,6 +113,6 @@
     }
 
     public static void main(String args[]) throws Throwable {
-        new TestRTMSpinLoopCount().test();
+        new TestRTMSpinLoopCount().runTestCases();
     }
 }
--- a/hotspot/test/compiler/rtm/locking/TestRTMTotalCountIncrRate.java	Thu Jun 01 17:33:07 2017 -0700
+++ b/hotspot/test/compiler/rtm/locking/TestRTMTotalCountIncrRate.java	Thu Jun 01 17:34:01 2017 -0700
@@ -29,6 +29,7 @@
  * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
+ * @requires vm.flavor == "server" & !vm.emulatedClient & vm.rtm.cpu & vm.rtm.os
  * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
@@ -43,14 +44,10 @@
 import compiler.testlibrary.rtm.CompilableTest;
 import compiler.testlibrary.rtm.RTMLockingStatistics;
 import compiler.testlibrary.rtm.RTMTestBase;
-import compiler.testlibrary.rtm.predicate.SupportedCPU;
-import compiler.testlibrary.rtm.predicate.SupportedOS;
-import compiler.testlibrary.rtm.predicate.SupportedVM;
 import jdk.internal.misc.Unsafe;
 import jdk.test.lib.Asserts;
 import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.cli.CommandLineOptionTest;
-import jdk.test.lib.cli.predicate.AndPredicate;
 
 import java.util.List;
 
@@ -62,12 +59,7 @@
  * -XX:RTMRetryCount=0 to avoid issue with retriable aborts. For more details on
  * that issue see {@link TestUseRTMAfterLockInflation}.
  */
-public class TestRTMTotalCountIncrRate extends CommandLineOptionTest {
-    private TestRTMTotalCountIncrRate() {
-        super(new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM()));
-    }
-
-    @Override
+public class TestRTMTotalCountIncrRate {
     protected void runTestCases() throws Throwable {
         verifyLocksCount(1, false);
         verifyLocksCount(64, false);
@@ -167,6 +159,6 @@
     }
 
     public static void main(String args[]) throws Throwable {
-        new TestRTMTotalCountIncrRate().test();
+        new TestRTMTotalCountIncrRate().runTestCases();
     }
 }
--- a/hotspot/test/compiler/rtm/locking/TestUseRTMAfterLockInflation.java	Thu Jun 01 17:33:07 2017 -0700
+++ b/hotspot/test/compiler/rtm/locking/TestUseRTMAfterLockInflation.java	Thu Jun 01 17:34:01 2017 -0700
@@ -29,6 +29,7 @@
  * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
+ * @requires vm.flavor == "server" & !vm.emulatedClient & vm.rtm.cpu & vm.rtm.os
  * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
@@ -43,13 +44,8 @@
 import compiler.testlibrary.rtm.AbortType;
 import compiler.testlibrary.rtm.RTMLockingStatistics;
 import compiler.testlibrary.rtm.RTMTestBase;
-import compiler.testlibrary.rtm.predicate.SupportedCPU;
-import compiler.testlibrary.rtm.predicate.SupportedOS;
-import compiler.testlibrary.rtm.predicate.SupportedVM;
 import jdk.test.lib.Asserts;
 import jdk.test.lib.process.OutputAnalyzer;
-import jdk.test.lib.cli.CommandLineOptionTest;
-import jdk.test.lib.cli.predicate.AndPredicate;
 
 import java.util.List;
 
@@ -68,15 +64,10 @@
  * reasons simultaneously. In order to avoid false negative failures related
  * to incorrect aborts counting, -XX:RTMRetryCount=0 is used.
  */
-public class TestUseRTMAfterLockInflation extends CommandLineOptionTest {
+public class TestUseRTMAfterLockInflation {
     private static final long EXPECTED_LOCKS
             = 2L * AbortProvoker.DEFAULT_ITERATIONS;
 
-    private TestUseRTMAfterLockInflation() {
-        super(new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM()));
-    }
-
-    @Override
     protected void runTestCases() throws Throwable {
         AbortProvoker provoker = AbortType.XABORT.provoker();
         long totalLocksCount = 0;
@@ -133,6 +124,6 @@
     }
 
     public static void main(String args[]) throws Throwable {
-        new TestUseRTMAfterLockInflation().test();
+        new TestUseRTMAfterLockInflation().runTestCases();
     }
 }
--- a/hotspot/test/compiler/rtm/locking/TestUseRTMDeopt.java	Thu Jun 01 17:33:07 2017 -0700
+++ b/hotspot/test/compiler/rtm/locking/TestUseRTMDeopt.java	Thu Jun 01 17:34:01 2017 -0700
@@ -29,6 +29,7 @@
  * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
+ * @requires vm.flavor == "server" & !vm.emulatedClient & vm.rtm.cpu & vm.rtm.os
  * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
@@ -42,24 +43,16 @@
 import compiler.testlibrary.rtm.AbortProvoker;
 import compiler.testlibrary.rtm.AbortType;
 import compiler.testlibrary.rtm.RTMTestBase;
-import compiler.testlibrary.rtm.predicate.SupportedCPU;
-import compiler.testlibrary.rtm.predicate.SupportedOS;
-import compiler.testlibrary.rtm.predicate.SupportedVM;
 import jdk.test.lib.Asserts;
 import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.cli.CommandLineOptionTest;
-import jdk.test.lib.cli.predicate.AndPredicate;
 
 /**
  * Test verifies that usage of UseRTMDeopt option affects uncommon traps usage
  * for methods that use locking.
  */
-public class TestUseRTMDeopt extends CommandLineOptionTest {
-    private TestUseRTMDeopt() {
-        super(new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM()));
-    }
+public class TestUseRTMDeopt {
 
-    @Override
     protected void runTestCases() throws Throwable {
         verifyUseRTMDeopt(false);
         verifyUseRTMDeopt(true);
@@ -92,6 +85,6 @@
     }
 
     public static void main(String args[]) throws Throwable {
-        new TestUseRTMDeopt().test();
+        new TestUseRTMDeopt().runTestCases();
     }
 }
--- a/hotspot/test/compiler/rtm/locking/TestUseRTMForInflatedLocks.java	Thu Jun 01 17:33:07 2017 -0700
+++ b/hotspot/test/compiler/rtm/locking/TestUseRTMForInflatedLocks.java	Thu Jun 01 17:34:01 2017 -0700
@@ -28,6 +28,7 @@
  * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
+ * @requires vm.flavor == "server" & !vm.emulatedClient & vm.rtm.cpu & vm.rtm.os
  * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
@@ -41,13 +42,8 @@
 import compiler.testlibrary.rtm.AbortType;
 import compiler.testlibrary.rtm.RTMLockingStatistics;
 import compiler.testlibrary.rtm.RTMTestBase;
-import compiler.testlibrary.rtm.predicate.SupportedCPU;
-import compiler.testlibrary.rtm.predicate.SupportedOS;
-import compiler.testlibrary.rtm.predicate.SupportedVM;
 import jdk.test.lib.Asserts;
 import jdk.test.lib.process.OutputAnalyzer;
-import jdk.test.lib.cli.CommandLineOptionTest;
-import jdk.test.lib.cli.predicate.AndPredicate;
 
 import java.util.List;
 
@@ -61,12 +57,8 @@
  * is used. For more information abort that issue see
  * {@link TestUseRTMAfterLockInflation}.
  */
-public class TestUseRTMForInflatedLocks extends CommandLineOptionTest {
-    private TestUseRTMForInflatedLocks() {
-        super(new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM()));
-    }
+public class TestUseRTMForInflatedLocks {
 
-    @Override
     protected void runTestCases() throws Throwable {
         AbortProvoker provoker = AbortType.XABORT.provoker();
         RTMLockingStatistics lock;
@@ -96,6 +88,6 @@
     }
 
     public static void main(String args[]) throws Throwable {
-        new TestUseRTMForInflatedLocks().test();
+        new TestUseRTMForInflatedLocks().runTestCases();
     }
 }
--- a/hotspot/test/compiler/rtm/locking/TestUseRTMForStackLocks.java	Thu Jun 01 17:33:07 2017 -0700
+++ b/hotspot/test/compiler/rtm/locking/TestUseRTMForStackLocks.java	Thu Jun 01 17:34:01 2017 -0700
@@ -28,6 +28,7 @@
  * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
+ * @requires vm.flavor == "server" & !vm.emulatedClient & vm.rtm.cpu & vm.rtm.os
  * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
@@ -42,13 +43,8 @@
 import compiler.testlibrary.rtm.AbortType;
 import compiler.testlibrary.rtm.RTMLockingStatistics;
 import compiler.testlibrary.rtm.RTMTestBase;
-import compiler.testlibrary.rtm.predicate.SupportedCPU;
-import compiler.testlibrary.rtm.predicate.SupportedOS;
-import compiler.testlibrary.rtm.predicate.SupportedVM;
 import jdk.test.lib.Asserts;
 import jdk.test.lib.process.OutputAnalyzer;
-import jdk.test.lib.cli.CommandLineOptionTest;
-import jdk.test.lib.cli.predicate.AndPredicate;
 
 import java.util.List;
 
@@ -62,14 +58,9 @@
  * is used. For more information abort that issue see
  * {@link TestUseRTMAfterLockInflation}.
  */
-public class TestUseRTMForStackLocks extends CommandLineOptionTest {
+public class TestUseRTMForStackLocks {
     private static final boolean INFLATE_MONITOR = false;
 
-    private TestUseRTMForStackLocks() {
-        super(new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM()));
-    }
-
-    @Override
     protected void runTestCases() throws Throwable {
         AbortProvoker provoker = AbortType.XABORT.provoker();
         RTMLockingStatistics lock;
@@ -100,6 +91,6 @@
     }
 
     public static void main(String args[]) throws Throwable {
-        new TestUseRTMForStackLocks().test();
+        new TestUseRTMForStackLocks().runTestCases();
     }
 }
--- a/hotspot/test/compiler/rtm/locking/TestUseRTMXendForLockBusy.java	Thu Jun 01 17:33:07 2017 -0700
+++ b/hotspot/test/compiler/rtm/locking/TestUseRTMXendForLockBusy.java	Thu Jun 01 17:34:01 2017 -0700
@@ -29,6 +29,7 @@
  * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
+ * @requires vm.flavor == "server" & !vm.emulatedClient & vm.rtm.cpu & vm.rtm.os
  * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
@@ -44,13 +45,9 @@
 import compiler.testlibrary.rtm.CompilableTest;
 import compiler.testlibrary.rtm.RTMLockingStatistics;
 import compiler.testlibrary.rtm.RTMTestBase;
-import compiler.testlibrary.rtm.predicate.SupportedCPU;
-import compiler.testlibrary.rtm.predicate.SupportedOS;
-import compiler.testlibrary.rtm.predicate.SupportedVM;
 import jdk.test.lib.Asserts;
 import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.cli.CommandLineOptionTest;
-import jdk.test.lib.cli.predicate.AndPredicate;
 
 import java.util.List;
 
@@ -58,14 +55,9 @@
  * Test verifies that with +UseRTMXendForLockBusy there will be no aborts
  * forced by the test.
  */
-public class TestUseRTMXendForLockBusy extends CommandLineOptionTest {
+public class TestUseRTMXendForLockBusy {
     private final static int LOCKING_TIME = 5000;
 
-    private TestUseRTMXendForLockBusy() {
-        super(new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM()));
-    }
-
-    @Override
     protected void runTestCases() throws Throwable {
         // inflated lock, xabort on lock busy
         verifyXendForLockBusy(true, false);
@@ -117,6 +109,6 @@
     }
 
     public static void main(String args[]) throws Throwable {
-        new TestUseRTMXendForLockBusy().test();
+        new TestUseRTMXendForLockBusy().runTestCases();
     }
 }
--- a/hotspot/test/compiler/rtm/method_options/TestNoRTMLockElidingOption.java	Thu Jun 01 17:33:07 2017 -0700
+++ b/hotspot/test/compiler/rtm/method_options/TestNoRTMLockElidingOption.java	Thu Jun 01 17:34:01 2017 -0700
@@ -29,6 +29,7 @@
  * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
+ * @requires vm.flavor == "server" & !vm.emulatedClient & vm.rtm.cpu & vm.rtm.os
  * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
@@ -43,13 +44,9 @@
 import compiler.testlibrary.rtm.AbortType;
 import compiler.testlibrary.rtm.RTMLockingStatistics;
 import compiler.testlibrary.rtm.RTMTestBase;
-import compiler.testlibrary.rtm.predicate.SupportedCPU;
-import compiler.testlibrary.rtm.predicate.SupportedOS;
-import compiler.testlibrary.rtm.predicate.SupportedVM;
 import jdk.test.lib.Asserts;
 import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.cli.CommandLineOptionTest;
-import jdk.test.lib.cli.predicate.AndPredicate;
 
 import java.util.List;
 
@@ -60,12 +57,8 @@
  * <i>rtm_state_change</i> reason had happened and that that VM output
  * does not contain RTM locking statistics for compiled method.
  */
-public class TestNoRTMLockElidingOption extends CommandLineOptionTest {
-    private TestNoRTMLockElidingOption() {
-        super(new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM()));
-    }
+public class TestNoRTMLockElidingOption {
 
-    @Override
     public void runTestCases() throws Throwable {
         verifyOption(false);
         verifyOption(true);
@@ -108,6 +101,6 @@
     }
 
     public static void main(String args[]) throws Throwable {
-        new TestNoRTMLockElidingOption().test();
+        new TestNoRTMLockElidingOption().runTestCases();
     }
 }
--- a/hotspot/test/compiler/rtm/method_options/TestUseRTMLockElidingOption.java	Thu Jun 01 17:33:07 2017 -0700
+++ b/hotspot/test/compiler/rtm/method_options/TestUseRTMLockElidingOption.java	Thu Jun 01 17:34:01 2017 -0700
@@ -30,6 +30,7 @@
  * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
+ * @requires vm.flavor == "server" & !vm.emulatedClient & vm.rtm.cpu & vm.rtm.os
  * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
@@ -44,13 +45,9 @@
 import compiler.testlibrary.rtm.AbortType;
 import compiler.testlibrary.rtm.RTMLockingStatistics;
 import compiler.testlibrary.rtm.RTMTestBase;
-import compiler.testlibrary.rtm.predicate.SupportedCPU;
-import compiler.testlibrary.rtm.predicate.SupportedOS;
-import compiler.testlibrary.rtm.predicate.SupportedVM;
 import jdk.test.lib.Asserts;
 import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.cli.CommandLineOptionTest;
-import jdk.test.lib.cli.predicate.AndPredicate;
 
 import java.util.List;
 
@@ -66,12 +63,8 @@
  * to avoid issue with retriable aborts described in
  * {@link TestUseRTMAfterLockInflation}.
  */
-public class TestUseRTMLockElidingOption extends CommandLineOptionTest {
-    private TestUseRTMLockElidingOption() {
-        super(new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM()));
-    }
+public class TestUseRTMLockElidingOption {
 
-    @Override
     public void runTestCases() throws Throwable {
         verifyOption(false);
         verifyOption(true);
@@ -122,6 +115,6 @@
     }
 
     public static void main(String args[]) throws Throwable {
-        new TestUseRTMLockElidingOption().test();
+        new TestUseRTMLockElidingOption().runTestCases();
     }
 }
--- a/hotspot/test/compiler/rtm/print/TestPrintPreciseRTMLockingStatistics.java	Thu Jun 01 17:33:07 2017 -0700
+++ b/hotspot/test/compiler/rtm/print/TestPrintPreciseRTMLockingStatistics.java	Thu Jun 01 17:34:01 2017 -0700
@@ -31,6 +31,7 @@
  * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
+ * @requires vm.flavor == "server" & !vm.emulatedClient & vm.rtm.cpu & vm.rtm.os
  * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
@@ -46,13 +47,8 @@
 import compiler.testlibrary.rtm.AbortType;
 import compiler.testlibrary.rtm.RTMLockingStatistics;
 import compiler.testlibrary.rtm.RTMTestBase;
-import compiler.testlibrary.rtm.predicate.SupportedCPU;
-import compiler.testlibrary.rtm.predicate.SupportedOS;
-import compiler.testlibrary.rtm.predicate.SupportedVM;
 import jdk.test.lib.Asserts;
 import jdk.test.lib.process.OutputAnalyzer;
-import jdk.test.lib.cli.CommandLineOptionTest;
-import jdk.test.lib.cli.predicate.AndPredicate;
 
 import java.util.Collections;
 import java.util.LinkedList;
@@ -64,13 +60,8 @@
  * -XX:+PrintPreciseRTMLockingStatistics locking statistics contains sane
  * total locks and aborts count as well as for specific abort types.
  */
-public class TestPrintPreciseRTMLockingStatistics
-        extends CommandLineOptionTest {
-    private TestPrintPreciseRTMLockingStatistics() {
-        super(new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM()));
-    }
+public class TestPrintPreciseRTMLockingStatistics {
 
-    @Override
     public void runTestCases() throws Throwable {
         verifyNoStatistics();
         verifyStatistics();
@@ -147,6 +138,6 @@
     }
 
     public static void main(String args[]) throws Throwable {
-        new TestPrintPreciseRTMLockingStatistics().test();
+        new TestPrintPreciseRTMLockingStatistics().runTestCases();
     }
 }
--- a/hotspot/test/compiler/testlibrary/rtm/predicate/SupportedCPU.java	Thu Jun 01 17:33:07 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package compiler.testlibrary.rtm.predicate;
-
-import jdk.test.lib.Platform;
-import sun.hotspot.cpuinfo.CPUInfo;
-
-import java.util.function.BooleanSupplier;
-
-public class SupportedCPU implements BooleanSupplier {
-    @Override
-    public boolean getAsBoolean() {
-        if (Platform.isPPC()) { return CPUInfo.hasFeature("tcheck"); }
-        return CPUInfo.hasFeature("rtm");
-    }
-}
--- a/hotspot/test/compiler/testlibrary/rtm/predicate/SupportedOS.java	Thu Jun 01 17:33:07 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package compiler.testlibrary.rtm.predicate;
-
-import jdk.test.lib.Platform;
-
-import java.util.function.BooleanSupplier;
-
-public class SupportedOS implements BooleanSupplier {
-    @Override
-    public boolean getAsBoolean() {
-        if (Platform.isAix()) {
-            // Actually, this works since AIX 7.1.3.30, but os.version property
-            // is set to 7.1.
-            return (Platform.getOsVersionMajor()  > 7) ||
-                   (Platform.getOsVersionMajor() == 7 && Platform.getOsVersionMinor() > 1);
-
-        } else if (Platform.isLinux()) {
-            if (Platform.isPPC()) {
-                return (Platform.getOsVersionMajor()  > 4) ||
-                       (Platform.getOsVersionMajor() == 4 && Platform.getOsVersionMinor() > 1);
-            }
-        }
-        return true;
-    }
-}
--- a/hotspot/test/compiler/testlibrary/rtm/predicate/SupportedVM.java	Thu Jun 01 17:33:07 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package compiler.testlibrary.rtm.predicate;
-
-import jdk.test.lib.Platform;
-
-import java.util.function.BooleanSupplier;
-
-public class SupportedVM implements BooleanSupplier {
-    @Override
-    public boolean getAsBoolean() {
-        return Platform.isServer() && !Platform.isEmulatedClient();
-    }
-}