test/compiler/rtm/cli/TestUseRTMLockingOptionOnUnsupportedCPU.java

changeset 6999
cabe05c85665
parent 0
f90c822e73f8
equal deleted inserted replaced
6998:dac61d838654 6999:cabe05c85665
61 // verify that we get an error when use +UseRTMLocking 61 // verify that we get an error when use +UseRTMLocking
62 // on unsupported CPU 62 // on unsupported CPU
63 CommandLineOptionTest.verifySameJVMStartup( 63 CommandLineOptionTest.verifySameJVMStartup(
64 new String[] { errorMessage }, 64 new String[] { errorMessage },
65 new String[] { unrecongnizedOption }, 65 new String[] { unrecongnizedOption },
66 ExitCode.FAIL, 66 ExitCode.FAIL, "-XX:+UseRTMLocking");
67 CommandLineOptionTest.UNLOCK_EXPERIMENTAL_VM_OPTIONS,
68 "-XX:+UseRTMLocking");
69 // verify that we can pass -UseRTMLocking without 67 // verify that we can pass -UseRTMLocking without
70 // getting any error messages 68 // getting any error messages
71 CommandLineOptionTest.verifySameJVMStartup( 69 CommandLineOptionTest.verifySameJVMStartup(
72 null, 70 null,
73 new String[]{ 71 new String[]{
74 errorMessage, 72 errorMessage,
75 unrecongnizedOption 73 unrecongnizedOption
76 }, ExitCode.OK, 74 }, ExitCode.OK, "-XX:-UseRTMLocking");
77 CommandLineOptionTest.UNLOCK_EXPERIMENTAL_VM_OPTIONS,
78 "-XX:-UseRTMLocking");
79 75
80 // verify that UseRTMLocking is false by default 76 // verify that UseRTMLocking is false by default
81 CommandLineOptionTest.verifyOptionValueForSameVM("UseRTMLocking", 77 CommandLineOptionTest.verifyOptionValueForSameVM("UseRTMLocking",
82 TestUseRTMLockingOptionOnUnsupportedCPU.DEFAULT_VALUE, 78 TestUseRTMLockingOptionOnUnsupportedCPU.DEFAULT_VALUE);
83 CommandLineOptionTest.UNLOCK_EXPERIMENTAL_VM_OPTIONS);
84 } else { 79 } else {
85 // verify that on non-x86 CPUs RTMLocking could not be used 80 // verify that on non-x86 CPUs RTMLocking could not be used
86 CommandLineOptionTest.verifySameJVMStartup( 81 CommandLineOptionTest.verifySameJVMStartup(
87 new String[] { unrecongnizedOption }, 82 new String[] { unrecongnizedOption },
88 null, ExitCode.FAIL, 83 null, ExitCode.FAIL, "-XX:+UseRTMLocking");
89 CommandLineOptionTest.UNLOCK_EXPERIMENTAL_VM_OPTIONS,
90 "-XX:+UseRTMLocking");
91 84
92 CommandLineOptionTest.verifySameJVMStartup( 85 CommandLineOptionTest.verifySameJVMStartup(
93 new String[] { unrecongnizedOption }, 86 new String[] { unrecongnizedOption },
94 null, ExitCode.FAIL, 87 null, ExitCode.FAIL, "-XX:-UseRTMLocking");
95 CommandLineOptionTest.UNLOCK_EXPERIMENTAL_VM_OPTIONS,
96 "-XX:-UseRTMLocking");
97 } 88 }
98 } 89 }
99 90
100 public static void main(String args[]) throws Throwable { 91 public static void main(String args[]) throws Throwable {
101 new TestUseRTMLockingOptionOnUnsupportedCPU().test(); 92 new TestUseRTMLockingOptionOnUnsupportedCPU().test();

mercurial