Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8177929

[TESTBUG] test/compiler/cpuflags/TestAESIntrinsicsOnSupportedConfig.java failed with -XX:TieredStopAtLevel=1

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P5 P5
    • None
    • 9
    • hotspot

      hotspot jtreg test compiler/cpuflags/TestAESIntrinsicsOnSupportedConfig.java under vm option: "-XX:TieredStopAtLevel=1" and "-Xcomp -XX:-TieredCompilation" will report error like:

      java.lang.AssertionError: Expected message not found: 'com\.sun\.crypto\.provider\.CipherBlockChaining::(implEncrypt|implDecrypt) \([0-9]+ bytes\)\s+\(intrinsic[,\)]'.

      If this is a test bug, a patch like below may fix that:

      ----------------------
      diff --git a/test/compiler/cpuflags/TestAESIntrinsicsOnSupportedConfig.java b/test/compiler/cpuflags/TestAESIntrinsicsOnSupportedConfig.java
      index dd8c4aa..dae8105 100644
      --- a/test/compiler/cpuflags/TestAESIntrinsicsOnSupportedConfig.java
      +++ b/test/compiler/cpuflags/TestAESIntrinsicsOnSupportedConfig.java
      @@ -37,9 +37,11 @@
       
       package compiler.cpuflags;
       
      +import compiler.whitebox.CompilerWhiteBoxTest;
       import jdk.test.lib.process.OutputAnalyzer;
       import jdk.test.lib.Platform;
       import jdk.test.lib.process.ProcessTools;
      +import sun.hotspot.WhiteBox;
       
       public class TestAESIntrinsicsOnSupportedConfig extends AESIntrinsicsBase {
       
      @@ -75,10 +77,15 @@ public class TestAESIntrinsicsOnSupportedConfig extends AESIntrinsicsBase {
                       prepareArguments(prepareBooleanFlag(AESIntrinsicsBase
                               .USE_AES, true)));
               final String errorMessage = "Case testUseAES failed";
      + WhiteBox wb = WhiteBox.getWhiteBox();
      + int level = wb.getIntxVMFlag("TieredStopAtLevel").intValue();
               if (Platform.isServer() && !Platform.isEmulatedClient()) {
      - verifyOutput(new String[]{AESIntrinsicsBase.CIPHER_INTRINSIC,
      - AESIntrinsicsBase.AES_INTRINSIC}, null, errorMessage,
      - outputAnalyzer);
      + if (!Platform.isComp()
      + && (level == CompilerWhiteBoxTest.COMP_LEVEL_FULL_OPTIMIZATION)) {
      + verifyOutput(new String[]{AESIntrinsicsBase.CIPHER_INTRINSIC,
      + AESIntrinsicsBase.AES_INTRINSIC}, null, errorMessage,
      + outputAnalyzer);
      + }
               } else {
                   verifyOutput(null, new String[]{AESIntrinsicsBase.CIPHER_INTRINSIC,
                           AESIntrinsicsBase.AES_INTRINSIC}, errorMessage,

      --------------------------

            thartmann Tobias Hartmann
            njian Ningsheng Jian (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: