@Override protected void verifyWarnings() throws Throwable { String shouldPassMessage = String.format( "JVM startup should pass with" + "option '-XX:-%s' without any warnings", optionName); // Verify that option could be disabled without any warnings. CommandLineOptionTest.verifySameJVMStartup( null, new String[] {SHAOptionsBase.getWarningForUnsupportedCPU(optionName)}, shouldPassMessage, shouldPassMessage, ExitCode.OK, SHAOptionsBase.UNLOCK_DIAGNOSTIC_VM_OPTIONS, CommandLineOptionTest.prepareBooleanFlag(optionName, false)); shouldPassMessage = String.format( "If JVM is started with '-XX:-" + "%s' '-XX:+%s', output should contain warning.", SHAOptionsBase.USE_SHA_OPTION, optionName); // Verify that when the tested option is enabled, then // a warning will occur in VM output if UseSHA is disabled. if (!optionName.equals(SHAOptionsBase.USE_SHA_OPTION)) { CommandLineOptionTest.verifySameJVMStartup( new String[] {SHAOptionsBase.getWarningForUnsupportedCPU(optionName)}, null, shouldPassMessage, shouldPassMessage, ExitCode.OK, SHAOptionsBase.UNLOCK_DIAGNOSTIC_VM_OPTIONS, CommandLineOptionTest.prepareBooleanFlag(SHAOptionsBase.USE_SHA_OPTION, false), CommandLineOptionTest.prepareBooleanFlag(optionName, true)); } }
public GenericTestCaseForUnsupportedAArch64CPU(String optionName) { super( optionName, new AndPredicate( Platform::isAArch64, new NotPredicate(SHAOptionsBase.getPredicateForOption(optionName)))); }