hotspot/test/compiler/rtm/locking/TestRTMDeoptOnLowAbortRatio.java
changeset 46515 dbb676a40899
parent 41705 332239c052cc
--- 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();
     }
 }