< prev index next >

test/hotspot/jtreg/compiler/intrinsics/sha/cli/testcases/GenericTestCaseForOtherCPU.java

Print this page
*** 1,7 ***
  /*
!  * Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   *
   * This code is free software; you can redistribute it and/or modify it
   * under the terms of the GNU General Public License version 2 only, as
   * published by the Free Software Foundation.
--- 1,7 ---
  /*
!  * Copyright (c) 2014, 2021, Oracle and/or its affiliates. All rights reserved.
   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   *
   * This code is free software; you can redistribute it and/or modify it
   * under the terms of the GNU General Public License version 2 only, as
   * published by the Free Software Foundation.

*** 30,11 ***
  import jdk.test.lib.cli.predicate.NotPredicate;
  import jdk.test.lib.cli.predicate.OrPredicate;
  
  /**
   * Generic test case for SHA-related options targeted to any CPU except
!  * AArch64, PPC, S390x, and X86.
   */
  public class GenericTestCaseForOtherCPU extends
          DigestOptionsBase.TestCase {
  
      final private boolean checkUseSHA;
--- 30,11 ---
  import jdk.test.lib.cli.predicate.NotPredicate;
  import jdk.test.lib.cli.predicate.OrPredicate;
  
  /**
   * Generic test case for SHA-related options targeted to any CPU except
!  * AArch64, Riscv64, PPC, S390x, and X86.
   */
  public class GenericTestCaseForOtherCPU extends
          DigestOptionsBase.TestCase {
  
      final private boolean checkUseSHA;

*** 42,26 ***
      public GenericTestCaseForOtherCPU(String optionName) {
          this(optionName, true);
      }
  
      public GenericTestCaseForOtherCPU(String optionName, boolean checkUseSHA) {
!         // Execute the test case on any CPU except AArch64, PPC, S390x, and X86.
          super(optionName, new NotPredicate(
                                new OrPredicate(Platform::isAArch64,
                                new OrPredicate(Platform::isS390x,
                                new OrPredicate(Platform::isPPC,
                                new OrPredicate(Platform::isX64,
!                                               Platform::isX86))))));
  
          this.checkUseSHA = checkUseSHA;
      }
  
      @Override
      protected void verifyWarnings() throws Throwable {
          String shouldPassMessage = String.format("JVM should start with "
                  + "option '%s' without any warnings", optionName);
!         // Verify that on non-x86 and non-AArch64 CPU usage of SHA-related
          // options will not cause any warnings.
          CommandLineOptionTest.verifySameJVMStartup(null,
                  new String[] { ".*" + optionName + ".*" }, shouldPassMessage,
                  shouldPassMessage, ExitCode.OK,
                  DigestOptionsBase.UNLOCK_DIAGNOSTIC_VM_OPTIONS,
--- 42,27 ---
      public GenericTestCaseForOtherCPU(String optionName) {
          this(optionName, true);
      }
  
      public GenericTestCaseForOtherCPU(String optionName, boolean checkUseSHA) {
!         // Execute the test case on any CPU except AArch64, Riscv64, PPC, S390x, and X86.
          super(optionName, new NotPredicate(
                                new OrPredicate(Platform::isAArch64,
+                               new OrPredicate(Platform::isRiscv64,
                                new OrPredicate(Platform::isS390x,
                                new OrPredicate(Platform::isPPC,
                                new OrPredicate(Platform::isX64,
!                                               Platform::isX86)))))));
  
          this.checkUseSHA = checkUseSHA;
      }
  
      @Override
      protected void verifyWarnings() throws Throwable {
          String shouldPassMessage = String.format("JVM should start with "
                  + "option '%s' without any warnings", optionName);
!         // Verify that on non-x86, non-Riscv64 and non-AArch64 CPU usage of SHA-related
          // options will not cause any warnings.
          CommandLineOptionTest.verifySameJVMStartup(null,
                  new String[] { ".*" + optionName + ".*" }, shouldPassMessage,
                  shouldPassMessage, ExitCode.OK,
                  DigestOptionsBase.UNLOCK_DIAGNOSTIC_VM_OPTIONS,
< prev index next >