hotspot/test/compiler/rtm/cli/TestUseRTMLockingOptionWithBiasedLocking.java
changeset 28200 38d3bf236c31
parent 28190 5a6b07edeb21
child 29678 dd2f3932c21e
--- a/hotspot/test/compiler/rtm/cli/TestUseRTMLockingOptionWithBiasedLocking.java	Tue Dec 16 17:56:24 2014 +0300
+++ b/hotspot/test/compiler/rtm/cli/TestUseRTMLockingOptionWithBiasedLocking.java	Tue Dec 16 14:52:57 2014 +0300
@@ -51,25 +51,44 @@
     public void runTestCases() throws Throwable {
         String warningMessage
                 = RTMGenericCommandLineOptionTest.RTM_BIASED_LOCKING_WARNING;
+        String shouldPassMessage = "JVM startup should pass with both "
+                + "-XX:+UseRTMLocking and "
+                + "-XX:-UseBiasedLocking flags set without any warnings";
         // verify that we will not get a warning
         CommandLineOptionTest.verifySameJVMStartup(null,
-                new String[] { warningMessage }, ExitCode.OK,
+                new String[] { warningMessage }, shouldPassMessage,
+                shouldPassMessage, 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,
+                new String[] { warningMessage }, null,
+                "JVM startup should pass when both -XX:+UseRTMLocking and "
+                        + "-XX:+UseBiasedLocking flags set",
+                "Flags -XX:+UseRTMLocking"
+                        + " and -XX:+UseBiasedLocking conflicts. "
+                        + "Warning should be shown.", 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,
+                "false",
+                "Value of option 'UseBiasedLocking' should be false if"
+                        + "-XX:+UseRTMLocking flag set.",
+                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");
+        CommandLineOptionTest
+                .verifyOptionValueForSameVM(
+                        "UseBiasedLocking",
+                        "false",
+                        "Value of option 'UseBiasedLocking' should be false if"
+                                + "both -XX:+UseRTMLocking and "
+                                + "-XX:+UseBiasedLocking flags set.",
+                        CommandLineOptionTest.UNLOCK_EXPERIMENTAL_VM_OPTIONS,
+                        "-XX:+UseRTMLocking", "-XX:+UseBiasedLocking");
     }
 
     public static void main(String args[]) throws Throwable {