test/compiler/rtm/cli/TestUseRTMLockingOptionWithBiasedLocking.java

Print this page
rev 6420 : 8054805: Update CLI tests on RTM options to reflect changes in JDK-8054376
Reviewed-by:

*** 51,76 **** String warningMessage = RTMGenericCommandLineOptionTest.RTM_BIASED_LOCKING_WARNING; // verify that we will not get a warning CommandLineOptionTest.verifySameJVMStartup(null, new String[] { warningMessage }, ExitCode.OK, - CommandLineOptionTest.UNLOCK_EXPERIMENTAL_VM_OPTIONS, "-XX:+UseRTMLocking", "-XX:-UseBiasedLocking"); // verify that we will get a warning CommandLineOptionTest.verifySameJVMStartup( new String[] { warningMessage }, null, ExitCode.OK, - CommandLineOptionTest.UNLOCK_EXPERIMENTAL_VM_OPTIONS, "-XX:+UseRTMLocking", "-XX:+UseBiasedLocking"); // verify that UseBiasedLocking is false when we use rtm locking CommandLineOptionTest.verifyOptionValueForSameVM("UseBiasedLocking", ! "false", CommandLineOptionTest.UNLOCK_EXPERIMENTAL_VM_OPTIONS, ! "-XX:+UseRTMLocking"); // verify that we can't turn on biased locking when // using rtm locking CommandLineOptionTest.verifyOptionValueForSameVM("UseBiasedLocking", ! "false", CommandLineOptionTest.UNLOCK_EXPERIMENTAL_VM_OPTIONS, ! "-XX:+UseRTMLocking", "-XX:+UseBiasedLocking"); } public static void main(String args[]) throws Throwable { new TestUseRTMLockingOptionWithBiasedLocking().test(); } --- 51,72 ---- String warningMessage = RTMGenericCommandLineOptionTest.RTM_BIASED_LOCKING_WARNING; // verify that we will not get a warning CommandLineOptionTest.verifySameJVMStartup(null, new String[] { warningMessage }, ExitCode.OK, "-XX:+UseRTMLocking", "-XX:-UseBiasedLocking"); // verify that we will get a warning CommandLineOptionTest.verifySameJVMStartup( new String[] { warningMessage }, null, ExitCode.OK, "-XX:+UseRTMLocking", "-XX:+UseBiasedLocking"); // verify that UseBiasedLocking is false when we use rtm locking CommandLineOptionTest.verifyOptionValueForSameVM("UseBiasedLocking", ! "false", "-XX:+UseRTMLocking"); // verify that we can't turn on biased locking when // using rtm locking CommandLineOptionTest.verifyOptionValueForSameVM("UseBiasedLocking", ! "false", "-XX:+UseRTMLocking", "-XX:+UseBiasedLocking"); } public static void main(String args[]) throws Throwable { new TestUseRTMLockingOptionWithBiasedLocking().test(); }