changeset 52122:cb8cab787ba2

8209459: TestSHA512MultiBlockIntrinsics failed on AArch64 Summary: Prevent classloading to avoid generation of SHA stubs. Reviewed-by: kvn, thartmann Contributed-by: Joshua Zhu <joshua.zhu@arm.com>
author thartmann
date Wed, 15 Aug 2018 14:35:33 +0200
parents c86627b0bcce
children 4699147a4f91
files test/hotspot/jtreg/compiler/intrinsics/sha/sanity/TestSHA1Intrinsics.java test/hotspot/jtreg/compiler/intrinsics/sha/sanity/TestSHA1MultiBlockIntrinsics.java test/hotspot/jtreg/compiler/intrinsics/sha/sanity/TestSHA256Intrinsics.java test/hotspot/jtreg/compiler/intrinsics/sha/sanity/TestSHA256MultiBlockIntrinsics.java test/hotspot/jtreg/compiler/intrinsics/sha/sanity/TestSHA512Intrinsics.java test/hotspot/jtreg/compiler/intrinsics/sha/sanity/TestSHA512MultiBlockIntrinsics.java test/hotspot/jtreg/compiler/testlibrary/sha/predicate/IntrinsicPredicates.java
diffstat 7 files changed, 18 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/test/hotspot/jtreg/compiler/intrinsics/sha/sanity/TestSHA1Intrinsics.java	Wed Aug 15 14:48:12 2018 +0300
+++ b/test/hotspot/jtreg/compiler/intrinsics/sha/sanity/TestSHA1Intrinsics.java	Wed Aug 15 14:35:33 2018 +0200
@@ -60,7 +60,7 @@
 
 public class TestSHA1Intrinsics {
     public static void main(String args[]) throws Exception {
-        new SHASanityTestBase(IntrinsicPredicates.SHA1_INTRINSICS_AVAILABLE,
+        new SHASanityTestBase(IntrinsicPredicates.isSHA1IntrinsicAvailable(),
                 SHASanityTestBase.SHA1_INTRINSIC_ID).test();
     }
 }
--- a/test/hotspot/jtreg/compiler/intrinsics/sha/sanity/TestSHA1MultiBlockIntrinsics.java	Wed Aug 15 14:48:12 2018 +0300
+++ b/test/hotspot/jtreg/compiler/intrinsics/sha/sanity/TestSHA1MultiBlockIntrinsics.java	Wed Aug 15 14:35:33 2018 +0200
@@ -68,7 +68,7 @@
 
 public class TestSHA1MultiBlockIntrinsics {
     public static void main(String args[]) throws Exception {
-        new SHASanityTestBase(IntrinsicPredicates.SHA1_INTRINSICS_AVAILABLE,
+        new SHASanityTestBase(IntrinsicPredicates.isSHA1IntrinsicAvailable(),
                 SHASanityTestBase.MB_INTRINSIC_ID).test();
     }
 }
--- a/test/hotspot/jtreg/compiler/intrinsics/sha/sanity/TestSHA256Intrinsics.java	Wed Aug 15 14:48:12 2018 +0300
+++ b/test/hotspot/jtreg/compiler/intrinsics/sha/sanity/TestSHA256Intrinsics.java	Wed Aug 15 14:35:33 2018 +0200
@@ -79,7 +79,7 @@
 
 public class TestSHA256Intrinsics {
     public static void main(String args[]) throws Exception {
-        new SHASanityTestBase(IntrinsicPredicates.SHA256_INTRINSICS_AVAILABLE,
+        new SHASanityTestBase(IntrinsicPredicates.isSHA256IntrinsicAvailable(),
                 SHASanityTestBase.SHA256_INTRINSIC_ID).test();
     }
 }
--- a/test/hotspot/jtreg/compiler/intrinsics/sha/sanity/TestSHA256MultiBlockIntrinsics.java	Wed Aug 15 14:48:12 2018 +0300
+++ b/test/hotspot/jtreg/compiler/intrinsics/sha/sanity/TestSHA256MultiBlockIntrinsics.java	Wed Aug 15 14:35:33 2018 +0200
@@ -95,7 +95,7 @@
 
 public class TestSHA256MultiBlockIntrinsics {
     public static void main(String args[]) throws Exception {
-        new SHASanityTestBase(IntrinsicPredicates.SHA256_INTRINSICS_AVAILABLE,
+        new SHASanityTestBase(IntrinsicPredicates.isSHA256IntrinsicAvailable(),
                 SHASanityTestBase.MB_INTRINSIC_ID).test();
     }
 }
--- a/test/hotspot/jtreg/compiler/intrinsics/sha/sanity/TestSHA512Intrinsics.java	Wed Aug 15 14:48:12 2018 +0300
+++ b/test/hotspot/jtreg/compiler/intrinsics/sha/sanity/TestSHA512Intrinsics.java	Wed Aug 15 14:35:33 2018 +0200
@@ -79,7 +79,7 @@
 
 public class TestSHA512Intrinsics {
     public static void main(String args[]) throws Exception {
-        new SHASanityTestBase(IntrinsicPredicates.SHA512_INTRINSICS_AVAILABLE,
+        new SHASanityTestBase(IntrinsicPredicates.isSHA512IntrinsicAvailable(),
                 SHASanityTestBase.SHA512_INTRINSIC_ID).test();
     }
 }
--- a/test/hotspot/jtreg/compiler/intrinsics/sha/sanity/TestSHA512MultiBlockIntrinsics.java	Wed Aug 15 14:48:12 2018 +0300
+++ b/test/hotspot/jtreg/compiler/intrinsics/sha/sanity/TestSHA512MultiBlockIntrinsics.java	Wed Aug 15 14:35:33 2018 +0200
@@ -96,7 +96,7 @@
 
 public class TestSHA512MultiBlockIntrinsics {
     public static void main(String args[]) throws Exception {
-        new SHASanityTestBase(IntrinsicPredicates.SHA512_INTRINSICS_AVAILABLE,
+        new SHASanityTestBase(IntrinsicPredicates.isSHA512IntrinsicAvailable(),
                 SHASanityTestBase.MB_INTRINSIC_ID).test();
     }
 }
--- a/test/hotspot/jtreg/compiler/testlibrary/sha/predicate/IntrinsicPredicates.java	Wed Aug 15 14:48:12 2018 +0300
+++ b/test/hotspot/jtreg/compiler/testlibrary/sha/predicate/IntrinsicPredicates.java	Wed Aug 15 14:35:33 2018 +0200
@@ -100,17 +100,20 @@
                             IntrinsicPredicates.SHA256_INSTRUCTION_AVAILABLE,
                             IntrinsicPredicates.SHA512_INSTRUCTION_AVAILABLE));
 
-    public static final BooleanSupplier SHA1_INTRINSICS_AVAILABLE
-            = new AndPredicate(IntrinsicPredicates.COMPILABLE_BY_C2,
-                               IntrinsicPredicates.isIntrinsicAvailable("sun.security.provider.SHA", "implCompress0"));
+    public static BooleanSupplier isSHA1IntrinsicAvailable() {
+        return new AndPredicate(IntrinsicPredicates.COMPILABLE_BY_C2,
+                                IntrinsicPredicates.isIntrinsicAvailable("sun.security.provider.SHA", "implCompress0"));
+    }
 
-    public static final BooleanSupplier SHA256_INTRINSICS_AVAILABLE
-            = new AndPredicate(IntrinsicPredicates.COMPILABLE_BY_C2,
-                               IntrinsicPredicates.isIntrinsicAvailable("sun.security.provider.SHA2", "implCompress0"));
+    public static BooleanSupplier isSHA256IntrinsicAvailable() {
+        return new AndPredicate(IntrinsicPredicates.COMPILABLE_BY_C2,
+                                IntrinsicPredicates.isIntrinsicAvailable("sun.security.provider.SHA2", "implCompress0"));
+    }
 
-    public static final BooleanSupplier SHA512_INTRINSICS_AVAILABLE
-            = new AndPredicate(IntrinsicPredicates.COMPILABLE_BY_C2,
-                               IntrinsicPredicates.isIntrinsicAvailable("sun.security.provider.SHA5", "implCompress0"));
+    public static BooleanSupplier isSHA512IntrinsicAvailable() {
+        return new AndPredicate(IntrinsicPredicates.COMPILABLE_BY_C2,
+                                IntrinsicPredicates.isIntrinsicAvailable("sun.security.provider.SHA5", "implCompress0"));
+    }
 
     private static BooleanSupplier isIntrinsicAvailable(String klass, String method) {
         try {