com.oracle.java.testlibrary.ExitCode Java Examples
The following examples show how to use
com.oracle.java.testlibrary.ExitCode.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: GenericTestCaseForSupportedSparcCPU.java From hottub with GNU General Public License v2.0 | 6 votes |
@Override protected void verifyWarnings() throws Throwable { // Verify that there are no warning when option is explicitly enabled. CommandLineOptionTest.verifySameJVMStartup(null, new String[] { SHAOptionsBase.getWarningForUnsupportedCPU(optionName) }, ExitCode.OK, CommandLineOptionTest.prepareBooleanFlag(optionName, true)); // Verify that option could be disabled even if +UseSHA was passed to // JVM. CommandLineOptionTest.verifySameJVMStartup(null, new String[] { SHAOptionsBase.getWarningForUnsupportedCPU(optionName) }, ExitCode.OK, CommandLineOptionTest.prepareBooleanFlag( SHAOptionsBase.USE_SHA_OPTION, true), CommandLineOptionTest.prepareBooleanFlag(optionName, false)); // Verify that it is possible to enable the tested option and disable // all SHA intrinsics via -UseSHA without any warnings. CommandLineOptionTest.verifySameJVMStartup(null, new String[] { SHAOptionsBase.getWarningForUnsupportedCPU(optionName) }, ExitCode.OK, CommandLineOptionTest.prepareBooleanFlag( SHAOptionsBase.USE_SHA_OPTION, false), CommandLineOptionTest.prepareBooleanFlag(optionName, true)); }
Example #2
Source File: TestUseRTMLockingOptionOnUnsupportedVM.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
@Override public void runTestCases() throws Throwable { String errorMessage = RTMGenericCommandLineOptionTest.RTM_UNSUPPORTED_VM_ERROR; // verify that we can't use +UseRTMLocking CommandLineOptionTest.verifySameJVMStartup( new String[] { errorMessage }, null, ExitCode.FAIL, "-XX:+UseRTMLocking"); // verify that we can turn it off CommandLineOptionTest.verifySameJVMStartup(null, new String[] { errorMessage }, ExitCode.OK, "-XX:-UseRTMLocking"); // verify that it is off by default CommandLineOptionTest.verifyOptionValueForSameVM("UseRTMLocking", TestUseRTMLockingOptionOnUnsupportedVM.DEFAULT_VALUE); }
Example #3
Source File: TestUseRTMDeoptOptionOnSupportedConfig.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
@Override public void runTestCases() throws Throwable { // verify that option could be turned on CommandLineOptionTest.verifySameJVMStartup( null, null, ExitCode.OK, "-XX:+UseRTMDeopt"); // verify that option could be turned off CommandLineOptionTest.verifySameJVMStartup( null, null, ExitCode.OK, "-XX:-UseRTMDeopt"); // verify default value CommandLineOptionTest.verifyOptionValueForSameVM("UseRTMDeopt", TestUseRTMDeoptOptionOnSupportedConfig.DEFAULT_VALUE); // verify default value CommandLineOptionTest.verifyOptionValueForSameVM("UseRTMDeopt", TestUseRTMDeoptOptionOnSupportedConfig.DEFAULT_VALUE, CommandLineOptionTest.UNLOCK_EXPERIMENTAL_VM_OPTIONS, "-XX:+UseRTMLocking"); // verify that option is off when UseRTMLocking is off CommandLineOptionTest.verifyOptionValueForSameVM("UseRTMDeopt", "false", CommandLineOptionTest.UNLOCK_EXPERIMENTAL_VM_OPTIONS, "-XX:-UseRTMLocking", "-XX:+UseRTMDeopt"); // verify that option could be turned on CommandLineOptionTest.verifyOptionValueForSameVM("UseRTMDeopt", "true", CommandLineOptionTest.UNLOCK_EXPERIMENTAL_VM_OPTIONS, "-XX:+UseRTMLocking", "-XX:+UseRTMDeopt"); }
Example #4
Source File: TestUseRTMLockingOptionOnUnsupportedVM.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
@Override public void runTestCases() throws Throwable { String errorMessage = RTMGenericCommandLineOptionTest.RTM_UNSUPPORTED_VM_ERROR; // verify that we can't use +UseRTMLocking CommandLineOptionTest.verifySameJVMStartup( new String[] { errorMessage }, null, ExitCode.FAIL, "-XX:+UseRTMLocking"); // verify that we can turn it off CommandLineOptionTest.verifySameJVMStartup(null, new String[] { errorMessage }, ExitCode.OK, "-XX:-UseRTMLocking"); // verify that it is off by default CommandLineOptionTest.verifyOptionValueForSameVM("UseRTMLocking", TestUseRTMLockingOptionOnUnsupportedVM.DEFAULT_VALUE); }
Example #5
Source File: RTMLockingAwareTest.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
private void verifyStartupWarning(String value, boolean useRTMLocking, boolean isWarningExpected) throws Throwable { String warnings[] = new String[] { warningMessage }; List<String> options = new LinkedList<>(); Collections.addAll(options, CommandLineOptionTest.UNLOCK_EXPERIMENTAL_VM_OPTIONS, CommandLineOptionTest.prepareBooleanFlag("UseRTMLocking", useRTMLocking)); options.add(prepareOptionValue(value)); CommandLineOptionTest.verifySameJVMStartup( (isWarningExpected ? warnings : null), (isWarningExpected ? null : warnings), ExitCode.OK, options.toArray(new String[options.size()])); }
Example #6
Source File: GenericTestCaseForUnsupportedX86CPU.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
@Override protected void verifyWarnings() throws Throwable { // Verify that when the tested option is explicitly enabled, then // a warning will occur in VM output. CommandLineOptionTest.verifySameJVMStartup(new String[] { SHAOptionsBase.getWarningForUnsupportedCPU(optionName) }, null, ExitCode.OK, CommandLineOptionTest.prepareBooleanFlag(optionName, true)); // Verify that the tested option could be explicitly disabled without // a warning. CommandLineOptionTest.verifySameJVMStartup(null, new String[] { SHAOptionsBase.getWarningForUnsupportedCPU(optionName) }, ExitCode.OK, CommandLineOptionTest.prepareBooleanFlag(optionName, false)); }
Example #7
Source File: GenericTestCaseForSupportedSparcCPU.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
@Override protected void verifyWarnings() throws Throwable { // Verify that there are no warning when option is explicitly enabled. CommandLineOptionTest.verifySameJVMStartup(null, new String[] { SHAOptionsBase.getWarningForUnsupportedCPU(optionName) }, ExitCode.OK, CommandLineOptionTest.prepareBooleanFlag(optionName, true)); // Verify that option could be disabled even if +UseSHA was passed to // JVM. CommandLineOptionTest.verifySameJVMStartup(null, new String[] { SHAOptionsBase.getWarningForUnsupportedCPU(optionName) }, ExitCode.OK, CommandLineOptionTest.prepareBooleanFlag( SHAOptionsBase.USE_SHA_OPTION, true), CommandLineOptionTest.prepareBooleanFlag(optionName, false)); // Verify that it is possible to enable the tested option and disable // all SHA intrinsics via -UseSHA without any warnings. CommandLineOptionTest.verifySameJVMStartup(null, new String[] { SHAOptionsBase.getWarningForUnsupportedCPU(optionName) }, ExitCode.OK, CommandLineOptionTest.prepareBooleanFlag( SHAOptionsBase.USE_SHA_OPTION, false), CommandLineOptionTest.prepareBooleanFlag(optionName, true)); }
Example #8
Source File: TestUseRTMDeoptOptionOnSupportedConfig.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
@Override public void runTestCases() throws Throwable { // verify that option could be turned on CommandLineOptionTest.verifySameJVMStartup( null, null, ExitCode.OK, "-XX:+UseRTMDeopt"); // verify that option could be turned off CommandLineOptionTest.verifySameJVMStartup( null, null, ExitCode.OK, "-XX:-UseRTMDeopt"); // verify default value CommandLineOptionTest.verifyOptionValueForSameVM("UseRTMDeopt", TestUseRTMDeoptOptionOnSupportedConfig.DEFAULT_VALUE); // verify default value CommandLineOptionTest.verifyOptionValueForSameVM("UseRTMDeopt", TestUseRTMDeoptOptionOnSupportedConfig.DEFAULT_VALUE, CommandLineOptionTest.UNLOCK_EXPERIMENTAL_VM_OPTIONS, "-XX:+UseRTMLocking"); // verify that option is off when UseRTMLocking is off CommandLineOptionTest.verifyOptionValueForSameVM("UseRTMDeopt", "false", CommandLineOptionTest.UNLOCK_EXPERIMENTAL_VM_OPTIONS, "-XX:-UseRTMLocking", "-XX:+UseRTMDeopt"); // verify that option could be turned on CommandLineOptionTest.verifyOptionValueForSameVM("UseRTMDeopt", "true", CommandLineOptionTest.UNLOCK_EXPERIMENTAL_VM_OPTIONS, "-XX:+UseRTMLocking", "-XX:+UseRTMDeopt"); }
Example #9
Source File: GenericTestCaseForUnsupportedX86CPU.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
@Override protected void verifyWarnings() throws Throwable { // Verify that when the tested option is explicitly enabled, then // a warning will occur in VM output. CommandLineOptionTest.verifySameJVMStartup(new String[] { SHAOptionsBase.getWarningForUnsupportedCPU(optionName) }, null, ExitCode.OK, CommandLineOptionTest.prepareBooleanFlag(optionName, true)); // Verify that the tested option could be explicitly disabled without // a warning. CommandLineOptionTest.verifySameJVMStartup(null, new String[] { SHAOptionsBase.getWarningForUnsupportedCPU(optionName) }, ExitCode.OK, CommandLineOptionTest.prepareBooleanFlag(optionName, false)); }
Example #10
Source File: GenericTestCaseForSupportedSparcCPU.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
@Override protected void verifyWarnings() throws Throwable { // Verify that there are no warning when option is explicitly enabled. CommandLineOptionTest.verifySameJVMStartup(null, new String[] { SHAOptionsBase.getWarningForUnsupportedCPU(optionName) }, ExitCode.OK, CommandLineOptionTest.prepareBooleanFlag(optionName, true)); // Verify that option could be disabled even if +UseSHA was passed to // JVM. CommandLineOptionTest.verifySameJVMStartup(null, new String[] { SHAOptionsBase.getWarningForUnsupportedCPU(optionName) }, ExitCode.OK, CommandLineOptionTest.prepareBooleanFlag( SHAOptionsBase.USE_SHA_OPTION, true), CommandLineOptionTest.prepareBooleanFlag(optionName, false)); // Verify that it is possible to enable the tested option and disable // all SHA intrinsics via -UseSHA without any warnings. CommandLineOptionTest.verifySameJVMStartup(null, new String[] { SHAOptionsBase.getWarningForUnsupportedCPU(optionName) }, ExitCode.OK, CommandLineOptionTest.prepareBooleanFlag( SHAOptionsBase.USE_SHA_OPTION, false), CommandLineOptionTest.prepareBooleanFlag(optionName, true)); }
Example #11
Source File: RTMLockingAwareTest.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
private void verifyStartupWarning(String value, boolean useRTMLocking, boolean isWarningExpected) throws Throwable { String warnings[] = new String[] { warningMessage }; List<String> options = new LinkedList<>(); Collections.addAll(options, CommandLineOptionTest.UNLOCK_EXPERIMENTAL_VM_OPTIONS, CommandLineOptionTest.prepareBooleanFlag("UseRTMLocking", useRTMLocking)); options.add(prepareOptionValue(value)); CommandLineOptionTest.verifySameJVMStartup( (isWarningExpected ? warnings : null), (isWarningExpected ? null : warnings), ExitCode.OK, options.toArray(new String[options.size()])); }
Example #12
Source File: TestUseRTMLockingOptionOnUnsupportedVM.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
@Override public void runTestCases() throws Throwable { String errorMessage = RTMGenericCommandLineOptionTest.RTM_UNSUPPORTED_VM_ERROR; // verify that we can't use +UseRTMLocking CommandLineOptionTest.verifySameJVMStartup( new String[] { errorMessage }, null, ExitCode.FAIL, "-XX:+UseRTMLocking"); // verify that we can turn it off CommandLineOptionTest.verifySameJVMStartup(null, new String[] { errorMessage }, ExitCode.OK, "-XX:-UseRTMLocking"); // verify that it is off by default CommandLineOptionTest.verifyOptionValueForSameVM("UseRTMLocking", TestUseRTMLockingOptionOnUnsupportedVM.DEFAULT_VALUE); }
Example #13
Source File: TestUseRTMDeoptOptionOnSupportedConfig.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
@Override public void runTestCases() throws Throwable { // verify that option could be turned on CommandLineOptionTest.verifySameJVMStartup( null, null, ExitCode.OK, "-XX:+UseRTMDeopt"); // verify that option could be turned off CommandLineOptionTest.verifySameJVMStartup( null, null, ExitCode.OK, "-XX:-UseRTMDeopt"); // verify default value CommandLineOptionTest.verifyOptionValueForSameVM("UseRTMDeopt", TestUseRTMDeoptOptionOnSupportedConfig.DEFAULT_VALUE); // verify default value CommandLineOptionTest.verifyOptionValueForSameVM("UseRTMDeopt", TestUseRTMDeoptOptionOnSupportedConfig.DEFAULT_VALUE, CommandLineOptionTest.UNLOCK_EXPERIMENTAL_VM_OPTIONS, "-XX:+UseRTMLocking"); // verify that option is off when UseRTMLocking is off CommandLineOptionTest.verifyOptionValueForSameVM("UseRTMDeopt", "false", CommandLineOptionTest.UNLOCK_EXPERIMENTAL_VM_OPTIONS, "-XX:-UseRTMLocking", "-XX:+UseRTMDeopt"); // verify that option could be turned on CommandLineOptionTest.verifyOptionValueForSameVM("UseRTMDeopt", "true", CommandLineOptionTest.UNLOCK_EXPERIMENTAL_VM_OPTIONS, "-XX:+UseRTMLocking", "-XX:+UseRTMDeopt"); }
Example #14
Source File: GenericTestCaseForSupportedSparcCPU.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
@Override protected void verifyWarnings() throws Throwable { // Verify that there are no warning when option is explicitly enabled. CommandLineOptionTest.verifySameJVMStartup(null, new String[] { SHAOptionsBase.getWarningForUnsupportedCPU(optionName) }, ExitCode.OK, CommandLineOptionTest.prepareBooleanFlag(optionName, true)); // Verify that option could be disabled even if +UseSHA was passed to // JVM. CommandLineOptionTest.verifySameJVMStartup(null, new String[] { SHAOptionsBase.getWarningForUnsupportedCPU(optionName) }, ExitCode.OK, CommandLineOptionTest.prepareBooleanFlag( SHAOptionsBase.USE_SHA_OPTION, true), CommandLineOptionTest.prepareBooleanFlag(optionName, false)); // Verify that it is possible to enable the tested option and disable // all SHA intrinsics via -UseSHA without any warnings. CommandLineOptionTest.verifySameJVMStartup(null, new String[] { SHAOptionsBase.getWarningForUnsupportedCPU(optionName) }, ExitCode.OK, CommandLineOptionTest.prepareBooleanFlag( SHAOptionsBase.USE_SHA_OPTION, false), CommandLineOptionTest.prepareBooleanFlag(optionName, true)); }
Example #15
Source File: RTMLockingAwareTest.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
private void verifyStartupWarning(String value, boolean useRTMLocking, boolean isWarningExpected) throws Throwable { String warnings[] = new String[] { warningMessage }; List<String> options = new LinkedList<>(); Collections.addAll(options, CommandLineOptionTest.UNLOCK_EXPERIMENTAL_VM_OPTIONS, CommandLineOptionTest.prepareBooleanFlag("UseRTMLocking", useRTMLocking)); options.add(prepareOptionValue(value)); CommandLineOptionTest.verifySameJVMStartup( (isWarningExpected ? warnings : null), (isWarningExpected ? null : warnings), ExitCode.OK, options.toArray(new String[options.size()])); }
Example #16
Source File: GenericTestCaseForUnsupportedX86CPU.java From hottub with GNU General Public License v2.0 | 6 votes |
@Override protected void verifyWarnings() throws Throwable { // Verify that when the tested option is explicitly enabled, then // a warning will occur in VM output. CommandLineOptionTest.verifySameJVMStartup(new String[] { SHAOptionsBase.getWarningForUnsupportedCPU(optionName) }, null, ExitCode.OK, CommandLineOptionTest.prepareBooleanFlag(optionName, true)); // Verify that the tested option could be explicitly disabled without // a warning. CommandLineOptionTest.verifySameJVMStartup(null, new String[] { SHAOptionsBase.getWarningForUnsupportedCPU(optionName) }, ExitCode.OK, CommandLineOptionTest.prepareBooleanFlag(optionName, false)); }
Example #17
Source File: TestUseRTMDeoptOptionOnSupportedConfig.java From hottub with GNU General Public License v2.0 | 6 votes |
@Override public void runTestCases() throws Throwable { // verify that option could be turned on CommandLineOptionTest.verifySameJVMStartup( null, null, ExitCode.OK, "-XX:+UseRTMDeopt"); // verify that option could be turned off CommandLineOptionTest.verifySameJVMStartup( null, null, ExitCode.OK, "-XX:-UseRTMDeopt"); // verify default value CommandLineOptionTest.verifyOptionValueForSameVM("UseRTMDeopt", TestUseRTMDeoptOptionOnSupportedConfig.DEFAULT_VALUE); // verify default value CommandLineOptionTest.verifyOptionValueForSameVM("UseRTMDeopt", TestUseRTMDeoptOptionOnSupportedConfig.DEFAULT_VALUE, CommandLineOptionTest.UNLOCK_EXPERIMENTAL_VM_OPTIONS, "-XX:+UseRTMLocking"); // verify that option is off when UseRTMLocking is off CommandLineOptionTest.verifyOptionValueForSameVM("UseRTMDeopt", "false", CommandLineOptionTest.UNLOCK_EXPERIMENTAL_VM_OPTIONS, "-XX:-UseRTMLocking", "-XX:+UseRTMDeopt"); // verify that option could be turned on CommandLineOptionTest.verifyOptionValueForSameVM("UseRTMDeopt", "true", CommandLineOptionTest.UNLOCK_EXPERIMENTAL_VM_OPTIONS, "-XX:+UseRTMLocking", "-XX:+UseRTMDeopt"); }
Example #18
Source File: TestUseRTMLockingOptionOnUnsupportedVM.java From hottub with GNU General Public License v2.0 | 6 votes |
@Override public void runTestCases() throws Throwable { String errorMessage = RTMGenericCommandLineOptionTest.RTM_UNSUPPORTED_VM_ERROR; // verify that we can't use +UseRTMLocking CommandLineOptionTest.verifySameJVMStartup( new String[] { errorMessage }, null, ExitCode.FAIL, "-XX:+UseRTMLocking"); // verify that we can turn it off CommandLineOptionTest.verifySameJVMStartup(null, new String[] { errorMessage }, ExitCode.OK, "-XX:-UseRTMLocking"); // verify that it is off by default CommandLineOptionTest.verifyOptionValueForSameVM("UseRTMLocking", TestUseRTMLockingOptionOnUnsupportedVM.DEFAULT_VALUE); }
Example #19
Source File: RTMLockingAwareTest.java From hottub with GNU General Public License v2.0 | 6 votes |
private void verifyStartupWarning(String value, boolean useRTMLocking, boolean isWarningExpected) throws Throwable { String warnings[] = new String[] { warningMessage }; List<String> options = new LinkedList<>(); Collections.addAll(options, CommandLineOptionTest.UNLOCK_EXPERIMENTAL_VM_OPTIONS, CommandLineOptionTest.prepareBooleanFlag("UseRTMLocking", useRTMLocking)); options.add(prepareOptionValue(value)); CommandLineOptionTest.verifySameJVMStartup( (isWarningExpected ? warnings : null), (isWarningExpected ? null : warnings), ExitCode.OK, options.toArray(new String[options.size()])); }
Example #20
Source File: GenericTestCaseForSupportedSparcCPU.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
@Override protected void verifyWarnings() throws Throwable { // Verify that there are no warning when option is explicitly enabled. CommandLineOptionTest.verifySameJVMStartup(null, new String[] { SHAOptionsBase.getWarningForUnsupportedCPU(optionName) }, ExitCode.OK, CommandLineOptionTest.prepareBooleanFlag(optionName, true)); // Verify that option could be disabled even if +UseSHA was passed to // JVM. CommandLineOptionTest.verifySameJVMStartup(null, new String[] { SHAOptionsBase.getWarningForUnsupportedCPU(optionName) }, ExitCode.OK, CommandLineOptionTest.prepareBooleanFlag( SHAOptionsBase.USE_SHA_OPTION, true), CommandLineOptionTest.prepareBooleanFlag(optionName, false)); // Verify that it is possible to enable the tested option and disable // all SHA intrinsics via -UseSHA without any warnings. CommandLineOptionTest.verifySameJVMStartup(null, new String[] { SHAOptionsBase.getWarningForUnsupportedCPU(optionName) }, ExitCode.OK, CommandLineOptionTest.prepareBooleanFlag( SHAOptionsBase.USE_SHA_OPTION, false), CommandLineOptionTest.prepareBooleanFlag(optionName, true)); }
Example #21
Source File: GenericTestCaseForUnsupportedX86CPU.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
@Override protected void verifyWarnings() throws Throwable { // Verify that when the tested option is explicitly enabled, then // a warning will occur in VM output. CommandLineOptionTest.verifySameJVMStartup(new String[] { SHAOptionsBase.getWarningForUnsupportedCPU(optionName) }, null, ExitCode.OK, CommandLineOptionTest.prepareBooleanFlag(optionName, true)); // Verify that the tested option could be explicitly disabled without // a warning. CommandLineOptionTest.verifySameJVMStartup(null, new String[] { SHAOptionsBase.getWarningForUnsupportedCPU(optionName) }, ExitCode.OK, CommandLineOptionTest.prepareBooleanFlag(optionName, false)); }
Example #22
Source File: TestUseRTMDeoptOptionOnSupportedConfig.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
@Override public void runTestCases() throws Throwable { // verify that option could be turned on CommandLineOptionTest.verifySameJVMStartup( null, null, ExitCode.OK, "-XX:+UseRTMDeopt"); // verify that option could be turned off CommandLineOptionTest.verifySameJVMStartup( null, null, ExitCode.OK, "-XX:-UseRTMDeopt"); // verify default value CommandLineOptionTest.verifyOptionValueForSameVM("UseRTMDeopt", TestUseRTMDeoptOptionOnSupportedConfig.DEFAULT_VALUE); // verify default value CommandLineOptionTest.verifyOptionValueForSameVM("UseRTMDeopt", TestUseRTMDeoptOptionOnSupportedConfig.DEFAULT_VALUE, CommandLineOptionTest.UNLOCK_EXPERIMENTAL_VM_OPTIONS, "-XX:+UseRTMLocking"); // verify that option is off when UseRTMLocking is off CommandLineOptionTest.verifyOptionValueForSameVM("UseRTMDeopt", "false", CommandLineOptionTest.UNLOCK_EXPERIMENTAL_VM_OPTIONS, "-XX:-UseRTMLocking", "-XX:+UseRTMDeopt"); // verify that option could be turned on CommandLineOptionTest.verifyOptionValueForSameVM("UseRTMDeopt", "true", CommandLineOptionTest.UNLOCK_EXPERIMENTAL_VM_OPTIONS, "-XX:+UseRTMLocking", "-XX:+UseRTMDeopt"); }
Example #23
Source File: TestUseRTMLockingOptionOnUnsupportedVM.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
@Override public void runTestCases() throws Throwable { String errorMessage = RTMGenericCommandLineOptionTest.RTM_UNSUPPORTED_VM_ERROR; // verify that we can't use +UseRTMLocking CommandLineOptionTest.verifySameJVMStartup( new String[] { errorMessage }, null, ExitCode.FAIL, "-XX:+UseRTMLocking"); // verify that we can turn it off CommandLineOptionTest.verifySameJVMStartup(null, new String[] { errorMessage }, ExitCode.OK, "-XX:-UseRTMLocking"); // verify that it is off by default CommandLineOptionTest.verifyOptionValueForSameVM("UseRTMLocking", TestUseRTMLockingOptionOnUnsupportedVM.DEFAULT_VALUE); }
Example #24
Source File: RTMLockingAwareTest.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
private void verifyStartupWarning(String value, boolean useRTMLocking, boolean isWarningExpected) throws Throwable { String warnings[] = new String[] { warningMessage }; List<String> options = new LinkedList<>(); Collections.addAll(options, CommandLineOptionTest.UNLOCK_EXPERIMENTAL_VM_OPTIONS, CommandLineOptionTest.prepareBooleanFlag("UseRTMLocking", useRTMLocking)); options.add(prepareOptionValue(value)); CommandLineOptionTest.verifySameJVMStartup( (isWarningExpected ? warnings : null), (isWarningExpected ? null : warnings), ExitCode.OK, options.toArray(new String[options.size()])); }
Example #25
Source File: GenericTestCaseForUnsupportedX86CPU.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
@Override protected void verifyWarnings() throws Throwable { // Verify that when the tested option is explicitly enabled, then // a warning will occur in VM output. CommandLineOptionTest.verifySameJVMStartup(new String[] { SHAOptionsBase.getWarningForUnsupportedCPU(optionName) }, null, ExitCode.OK, CommandLineOptionTest.prepareBooleanFlag(optionName, true)); // Verify that the tested option could be explicitly disabled without // a warning. CommandLineOptionTest.verifySameJVMStartup(null, new String[] { SHAOptionsBase.getWarningForUnsupportedCPU(optionName) }, ExitCode.OK, CommandLineOptionTest.prepareBooleanFlag(optionName, false)); }
Example #26
Source File: GenericTestCaseForOtherCPU.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
@Override protected void verifyWarnings() throws Throwable { // Verify that on non-x86 and non-SPARC CPU usage of SHA-related // options will not cause any warnings. CommandLineOptionTest.verifySameJVMStartup(null, new String[] { ".*" + optionName + ".*" }, ExitCode.OK, CommandLineOptionTest.prepareBooleanFlag(optionName, true)); CommandLineOptionTest.verifySameJVMStartup(null, new String[] { ".*" + optionName + ".*" }, ExitCode.OK, CommandLineOptionTest.prepareBooleanFlag(optionName, false)); }
Example #27
Source File: UseSHAIntrinsicsSpecificTestCaseForUnsupportedSparcCPU.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
@Override protected void verifyWarnings() throws Throwable { // Verify that attempt to enable the tested option will cause a warning. CommandLineOptionTest.verifySameJVMStartup(new String[] { SHAOptionsBase.getWarningForUnsupportedCPU(optionName) }, null, ExitCode.OK, CommandLineOptionTest.prepareBooleanFlag(optionName, true)); }
Example #28
Source File: TestUseRTMLockingOptionOnSupportedConfig.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
@Override public void runTestCases() throws Throwable { String unrecongnizedOption = CommandLineOptionTest.getUnrecognizedOptionErrorMessage( "UseRTMLocking"); // verify that there are no warning or error in VM output CommandLineOptionTest.verifySameJVMStartup(null, new String[]{ RTMGenericCommandLineOptionTest.RTM_INSTR_ERROR, unrecongnizedOption }, ExitCode.OK, CommandLineOptionTest.UNLOCK_EXPERIMENTAL_VM_OPTIONS, "-XX:+UseRTMLocking" ); CommandLineOptionTest.verifySameJVMStartup(null, new String[]{ RTMGenericCommandLineOptionTest.RTM_INSTR_ERROR, unrecongnizedOption }, ExitCode.OK, CommandLineOptionTest.UNLOCK_EXPERIMENTAL_VM_OPTIONS, "-XX:-UseRTMLocking" ); // verify that UseRTMLocking is of by default CommandLineOptionTest.verifyOptionValueForSameVM("UseRTMLocking", TestUseRTMLockingOptionOnSupportedConfig.DEFAULT_VALUE, CommandLineOptionTest.UNLOCK_EXPERIMENTAL_VM_OPTIONS); // verify that we can change UseRTMLocking value CommandLineOptionTest.verifyOptionValueForSameVM("UseRTMLocking", TestUseRTMLockingOptionOnSupportedConfig.DEFAULT_VALUE, CommandLineOptionTest.UNLOCK_EXPERIMENTAL_VM_OPTIONS, "-XX:-UseRTMLocking"); CommandLineOptionTest.verifyOptionValueForSameVM("UseRTMLocking", "true", CommandLineOptionTest.UNLOCK_EXPERIMENTAL_VM_OPTIONS, "-XX:+UseRTMLocking"); }
Example #29
Source File: UseSHASpecificTestCaseForSupportedSparcCPU.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
@Override protected void verifyWarnings() throws Throwable { // Verify that there will be no warnings when +UseSHA was passed and // all UseSHA*Intrinsics options were disabled. CommandLineOptionTest.verifySameJVMStartup( null, new String[] { ".*UseSHA.*" }, ExitCode.OK, CommandLineOptionTest.prepareBooleanFlag( SHAOptionsBase.USE_SHA_OPTION, true), CommandLineOptionTest.prepareBooleanFlag( SHAOptionsBase.USE_SHA1_INTRINSICS_OPTION, false), CommandLineOptionTest.prepareBooleanFlag( SHAOptionsBase.USE_SHA256_INTRINSICS_OPTION, false), CommandLineOptionTest.prepareBooleanFlag( SHAOptionsBase.USE_SHA512_INTRINSICS_OPTION, false)); }
Example #30
Source File: GenericTestCaseForUnsupportedSparcCPU.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
@Override protected void verifyWarnings() throws Throwable { //Verify that option could be disabled without any warnings. CommandLineOptionTest.verifySameJVMStartup(null, new String[] { SHAOptionsBase.getWarningForUnsupportedCPU(optionName) }, ExitCode.OK, CommandLineOptionTest.prepareBooleanFlag(optionName, false)); }