< prev index next >

test/compiler/intrinsics/sha/cli/testcases/UseSHAIntrinsicsSpecificTestCaseForUnsupportedCPU.java

Print this page




  42     public UseSHAIntrinsicsSpecificTestCaseForUnsupportedCPU(
  43             String optionName) {
  44         // execute test case on SPARC CPU that support any sha* instructions,
  45         // but does not support sha* instruction required by the tested option.
  46         super(optionName, new AndPredicate(
  47                 new OrPredicate(Platform::isSparc, Platform::isAArch64),
  48                 new AndPredicate(
  49                         IntrinsicPredicates.ANY_SHA_INSTRUCTION_AVAILABLE,
  50                         new NotPredicate(SHAOptionsBase.getPredicateForOption(
  51                                 optionName)))));
  52     }
  53     @Override
  54     protected void verifyWarnings() throws Throwable {
  55         String shouldPassMessage = String.format("JVM should start with "
  56                 + "'-XX:+%s' flag, but output should contain warning.",
  57                 optionName);
  58         // Verify that attempt to enable the tested option will cause a warning
  59         CommandLineOptionTest.verifySameJVMStartup(new String[] {
  60                         SHAOptionsBase.getWarningForUnsupportedCPU(optionName)
  61                 }, null, shouldPassMessage, shouldPassMessage, ExitCode.OK,

  62                 CommandLineOptionTest.prepareBooleanFlag(optionName, true));
  63     }
  64 }


  42     public UseSHAIntrinsicsSpecificTestCaseForUnsupportedCPU(
  43             String optionName) {
  44         // execute test case on SPARC CPU that support any sha* instructions,
  45         // but does not support sha* instruction required by the tested option.
  46         super(optionName, new AndPredicate(
  47                 new OrPredicate(Platform::isSparc, Platform::isAArch64),
  48                 new AndPredicate(
  49                         IntrinsicPredicates.ANY_SHA_INSTRUCTION_AVAILABLE,
  50                         new NotPredicate(SHAOptionsBase.getPredicateForOption(
  51                                 optionName)))));
  52     }
  53     @Override
  54     protected void verifyWarnings() throws Throwable {
  55         String shouldPassMessage = String.format("JVM should start with "
  56                 + "'-XX:+%s' flag, but output should contain warning.",
  57                 optionName);
  58         // Verify that attempt to enable the tested option will cause a warning
  59         CommandLineOptionTest.verifySameJVMStartup(new String[] {
  60                         SHAOptionsBase.getWarningForUnsupportedCPU(optionName)
  61                 }, null, shouldPassMessage, shouldPassMessage, ExitCode.OK,
  62                 SHAOptionsBase.UNLOCK_DIAGNOSTIC_VM_OPTIONS,
  63                 CommandLineOptionTest.prepareBooleanFlag(optionName, true));
  64     }
  65 }
< prev index next >