jdk/test/sun/security/pkcs11/PKCS11Test.java
changeset 41485 15a87b8ccd06
parent 40942 7a81fdff5752
child 41556 0c49ded763a8
--- a/jdk/test/sun/security/pkcs11/PKCS11Test.java	Wed Oct 12 15:41:00 2016 -0700
+++ b/jdk/test/sun/security/pkcs11/PKCS11Test.java	Thu Oct 13 00:45:38 2016 -0700
@@ -299,11 +299,12 @@
                 + props.getProperty("os.arch") + "-" + props.getProperty("sun.arch.data.model");
         String[] nssLibDirs = osMap.get(osid);
         if (nssLibDirs == null) {
-            System.out.println("Unsupported OS, skipping: " + osid);
+            System.out.println("Warning: unsupported OS: " + osid
+                    + ", please initialize NSS librarys location firstly, skipping test");
             return null;
         }
         if (nssLibDirs.length == 0) {
-            System.out.println("NSS not supported on this platform, skipping test");
+            System.out.println("Warning: NSS not supported on this platform, skipping test");
             return null;
         }
         String nssLibDir = null;
@@ -315,6 +316,10 @@
                 break;
             }
         }
+        if (nssLibDir == null) {
+            System.out.println("Warning: can't find NSS librarys on this machine, skipping test");
+            return null;
+        }
         return nssLibDir;
     }
 
@@ -624,6 +629,11 @@
             PKCS11_BASE + "/nss/lib/windows-amd64/".replace('/', SEP)});
         osMap.put("MacOSX-x86_64-64", new String[]{
             PKCS11_BASE + "/nss/lib/macosx-x86_64/"});
+        osMap.put("Linux-arm-32", new String[]{
+            "/usr/lib/arm-linux-gnueabi/nss/",
+            "/usr/lib/arm-linux-gnueabihf/nss/"});
+        osMap.put("Linux-aarch64-64", new String[]{
+            "/usr/lib/aarch64-linux-gnu/nss/"});
     }
 
     private final static char[] hexDigits = "0123456789abcdef".toCharArray();