< prev index next >

test/compiler/rtm/cli/TestUseRTMLockingOptionWithBiasedLocking.java

Print this page
rev 11916 : 8165235: [TESTBUG] RTM tests must check OS version
Summary: Also change enabling RTM on Aix to OS version 7.2.


  33  *
  34  * @build sun.hotspot.WhiteBox
  35  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  36  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  37  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
  38  *                   -XX:+WhiteBoxAPI
  39  *                   compiler.rtm.cli.TestUseRTMLockingOptionWithBiasedLocking
  40  */
  41 
  42 package compiler.rtm.cli;
  43 
  44 import compiler.testlibrary.rtm.predicate.SupportedCPU;
  45 import compiler.testlibrary.rtm.predicate.SupportedVM;
  46 import jdk.test.lib.process.ExitCode;
  47 import jdk.test.lib.cli.CommandLineOptionTest;
  48 import jdk.test.lib.cli.predicate.AndPredicate;
  49 
  50 public class TestUseRTMLockingOptionWithBiasedLocking
  51         extends CommandLineOptionTest {
  52     private TestUseRTMLockingOptionWithBiasedLocking() {
  53         super(new AndPredicate(new SupportedCPU(), new SupportedVM()));
  54     }
  55 
  56     @Override
  57     public void runTestCases() throws Throwable {
  58         String warningMessage
  59                 = RTMGenericCommandLineOptionTest.RTM_BIASED_LOCKING_WARNING;
  60         String shouldPassMessage = "JVM startup should pass with both "
  61                 + "-XX:+UseRTMLocking and "
  62                 + "-XX:-UseBiasedLocking flags set without any warnings";
  63         // verify that we will not get a warning
  64         CommandLineOptionTest.verifySameJVMStartup(null,
  65                 new String[] { warningMessage }, shouldPassMessage,
  66                 shouldPassMessage, ExitCode.OK,
  67                 CommandLineOptionTest.UNLOCK_EXPERIMENTAL_VM_OPTIONS,
  68                 "-XX:+UseRTMLocking", "-XX:-UseBiasedLocking");
  69 
  70         // verify that we will get a warning
  71         CommandLineOptionTest.verifySameJVMStartup(
  72                 new String[] { warningMessage }, null,
  73                 "JVM startup should pass when both -XX:+UseRTMLocking and "




  33  *
  34  * @build sun.hotspot.WhiteBox
  35  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  36  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  37  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
  38  *                   -XX:+WhiteBoxAPI
  39  *                   compiler.rtm.cli.TestUseRTMLockingOptionWithBiasedLocking
  40  */
  41 
  42 package compiler.rtm.cli;
  43 
  44 import compiler.testlibrary.rtm.predicate.SupportedCPU;
  45 import compiler.testlibrary.rtm.predicate.SupportedVM;
  46 import jdk.test.lib.process.ExitCode;
  47 import jdk.test.lib.cli.CommandLineOptionTest;
  48 import jdk.test.lib.cli.predicate.AndPredicate;
  49 
  50 public class TestUseRTMLockingOptionWithBiasedLocking
  51         extends CommandLineOptionTest {
  52     private TestUseRTMLockingOptionWithBiasedLocking() {
  53         super(new AndPredicate(new SupportedCPU(), new SupportedOS(), new SupportedVM()));
  54     }
  55 
  56     @Override
  57     public void runTestCases() throws Throwable {
  58         String warningMessage
  59                 = RTMGenericCommandLineOptionTest.RTM_BIASED_LOCKING_WARNING;
  60         String shouldPassMessage = "JVM startup should pass with both "
  61                 + "-XX:+UseRTMLocking and "
  62                 + "-XX:-UseBiasedLocking flags set without any warnings";
  63         // verify that we will not get a warning
  64         CommandLineOptionTest.verifySameJVMStartup(null,
  65                 new String[] { warningMessage }, shouldPassMessage,
  66                 shouldPassMessage, ExitCode.OK,
  67                 CommandLineOptionTest.UNLOCK_EXPERIMENTAL_VM_OPTIONS,
  68                 "-XX:+UseRTMLocking", "-XX:-UseBiasedLocking");
  69 
  70         // verify that we will get a warning
  71         CommandLineOptionTest.verifySameJVMStartup(
  72                 new String[] { warningMessage }, null,
  73                 "JVM startup should pass when both -XX:+UseRTMLocking and "


< prev index next >