< prev index next >
test/compiler/rtm/cli/TestUseRTMLockingOptionOnUnsupportedCPU.java
Print this page
@@ -27,39 +27,28 @@
* @summary Verify UseRTMLocking option processing on CPU without
* rtm support.
* @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
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI
* compiler.rtm.cli.TestUseRTMLockingOptionOnUnsupportedCPU
*/
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(
"UseRTMLocking");
String errorMessage = RTMGenericCommandLineOptionTest.RTM_INSTR_ERROR;
@@ -105,8 +94,8 @@
ExitCode.FAIL, "-XX:-UseRTMLocking");
}
}
public static void main(String args[]) throws Throwable {
- new TestUseRTMLockingOptionOnUnsupportedCPU().test();
+ new TestUseRTMLockingOptionOnUnsupportedCPU().runTestCases();
}
}
< prev index next >