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

Test sun/security/pkcs11/PKCS11Test.java shall be updated to run on ARM platforms

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • 8, 9
    • security-libs

      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;

            tidu Tim Du (Inactive)
            dkononenko Denis Kononenko
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: