# HG changeset patch # User tidu # Date 1476344738 25200 # Node ID 15a87b8ccd064ad2d69e6cd6359710156dcc6286 # Parent 834b7539ada3fe8f5b87e1443abda5be858fb667 8164322: Test sun/security/pkcs11/PKCS11Test.java shall be updated to run on ARM platforms Reviewed-by: xuelei Contributed-by: Tim Du diff -r 834b7539ada3 -r 15a87b8ccd06 jdk/test/sun/security/pkcs11/PKCS11Test.java --- 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();