< prev index next >

test/compiler/rtm/cli/TestUseRTMLockingOptionOnUnsupportedVM.java

Print this page

        

*** 27,63 **** * @summary Verify UseRTMLocking option processing on CPU with rtm support * in case when VM should not support this option. * @library /test/lib / * @modules java.base/jdk.internal.misc * java.management ! * * @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.TestUseRTMLockingOptionOnUnsupportedVM */ 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 { 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; String shouldFailMessage = "JVM startup should fail with option " + "-XX:+UseRTMLocking even on unsupported VM. Error message" --- 27,53 ---- * @summary Verify UseRTMLocking option processing on CPU with rtm support * in case when VM should not support this option. * @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.TestUseRTMLockingOptionOnUnsupportedVM */ package compiler.rtm.cli; import jdk.test.lib.process.ExitCode; import jdk.test.lib.cli.CommandLineOptionTest; ! public class TestUseRTMLockingOptionOnUnsupportedVM { private static final String DEFAULT_VALUE = "false"; public void runTestCases() throws Throwable { String errorMessage = RTMGenericCommandLineOptionTest.RTM_UNSUPPORTED_VM_ERROR; String shouldFailMessage = "JVM startup should fail with option " + "-XX:+UseRTMLocking even on unsupported VM. Error message"
*** 80,87 **** String.format("Default value of option 'UseRTMLocking' should" + " be '%s'", DEFAULT_VALUE)); } public static void main(String args[]) throws Throwable { ! new TestUseRTMLockingOptionOnUnsupportedVM().test(); } } --- 70,77 ---- String.format("Default value of option 'UseRTMLocking' should" + " be '%s'", DEFAULT_VALUE)); } public static void main(String args[]) throws Throwable { ! new TestUseRTMLockingOptionOnUnsupportedVM().runTestCases(); } }
< prev index next >