-
Bug
-
Resolution: Fixed
-
P3
-
8, 9
-
b141
-
arm
Currently all tests derived from sun.security.pkcs11.PKCS11Test didn't test anything on ARM platforms due to the following platform check:
osMap = new HashMap<String,String[]>();
osMap.put("SunOS-sparc-32", new String[]{"/usr/lib/mps/"});
osMap.put("SunOS-sparcv9-64", new String[]{"/usr/lib/mps/64/"});
osMap.put("SunOS-x86-32", new String[]{"/usr/lib/mps/"});
osMap.put("SunOS-amd64-64", new String[]{"/usr/lib/mps/64/"});
osMap.put("Linux-i386-32", new String[]{
"/usr/lib/i386-linux-gnu/", "/usr/lib32/", "/usr/lib/"});
osMap.put("Linux-amd64-64", new String[]{
"/usr/lib/x86_64-linux-gnu/", "/usr/lib/x86_64-linux-gnu/nss/",
"/usr/lib64/"});
osMap.put("Windows-x86-32", new String[]{
PKCS11_BASE + "/nss/lib/windows-i586/".replace('/', SEP)});
osMap.put("Windows-amd64-64", new String[]{
PKCS11_BASE + "/nss/lib/windows-amd64/".replace('/', SEP)});
}
[skipped]
String[] nssLibDirs = osMap.get(osid);
if (nssLibDirs == null) {
System.out.println("Unsupported OS, skipping: " + osid);
return null;
}
So, the test always passed with the message:
STDOUT:
Beginning test run TestKeyFactory...
Unsupported OS, skipping: Linux-arm-32
STDERR:
STATUS:Passed.
I'd propose to
1) add missed definitions for all supported ARM platforms;
2) change behaviour of the test, it should fail in case of 'unsupported OS', I'd prefer to fix the environment or exclude the test rather then having a test which silently do nothing;
osMap = new HashMap<String,String[]>();
osMap.put("SunOS-sparc-32", new String[]{"/usr/lib/mps/"});
osMap.put("SunOS-sparcv9-64", new String[]{"/usr/lib/mps/64/"});
osMap.put("SunOS-x86-32", new String[]{"/usr/lib/mps/"});
osMap.put("SunOS-amd64-64", new String[]{"/usr/lib/mps/64/"});
osMap.put("Linux-i386-32", new String[]{
"/usr/lib/i386-linux-gnu/", "/usr/lib32/", "/usr/lib/"});
osMap.put("Linux-amd64-64", new String[]{
"/usr/lib/x86_64-linux-gnu/", "/usr/lib/x86_64-linux-gnu/nss/",
"/usr/lib64/"});
osMap.put("Windows-x86-32", new String[]{
PKCS11_BASE + "/nss/lib/windows-i586/".replace('/', SEP)});
osMap.put("Windows-amd64-64", new String[]{
PKCS11_BASE + "/nss/lib/windows-amd64/".replace('/', SEP)});
}
[skipped]
String[] nssLibDirs = osMap.get(osid);
if (nssLibDirs == null) {
System.out.println("Unsupported OS, skipping: " + osid);
return null;
}
So, the test always passed with the message:
STDOUT:
Beginning test run TestKeyFactory...
Unsupported OS, skipping: Linux-arm-32
STDERR:
STATUS:Passed.
I'd propose to
1) add missed definitions for all supported ARM platforms;
2) change behaviour of the test, it should fail in case of 'unsupported OS', I'd prefer to fix the environment or exclude the test rather then having a test which silently do nothing;
- relates to
-
JDK-8271466 [jdk8u] StackGap test fails on aarch64 due to "-m64"
-
- Resolved
-
-
JDK-8267721 Enable sun/security/pkcs11 tests for Amazon Linux 2 AArch64
-
- Resolved
-