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

Shell tests in sun/security/pkcs11/ do not compile PKCS11Test

XMLWordPrintable


        The following tests have dependencies on PKCS11Test.java but do not compile it. Instead they are dependent on other tests in their respective directories to run first. The result is that these tests are failing intermittently, particularly in JPRT recently.

        FAILED: sun/security/pkcs11/KeyStore/Basic.sh
        FAILED: sun/security/pkcs11/KeyStore/ClientAuth.sh
        FAILED: sun/security/pkcs11/KeyStore/Solaris.sh
        FAILED: sun/security/pkcs11/Provider/ConfigQuotedString.sh
        FAILED: sun/security/pkcs11/Provider/Login.sh

        In all cases the tests fail with the error "Error: Could not find or load main class XXX" because the main class extends PKCS11Test.

        For a quick fix then the shell tests can be changed to compile PKCS11Test.java, eg:

        diff --git a/test/sun/security/pkcs11/Provider/Login.sh b/test/sun/security/pkcs11/Provider/Login.sh
        --- a/test/sun/security/pkcs11/Provider/Login.sh
        +++ b/test/sun/security/pkcs11/Provider/Login.sh
        @@ -108,7 +108,7 @@
         ${COMPILEJAVA}${FS}bin${FS}javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} \
                 -classpath ${TESTSRC}${FS}.. \
                 -d ${TESTCLASSES} \
        - ${TESTSRC}${FS}Login.java
        + ${TESTSRC}${FS}Login.java ${TESTSRC}${FS}..${FS}PKCS11Test.java

        but it would be better to just get jtreg to compile the tests by adding a @build tag. Better still would be to eliminate the shell tests completely (at least in a few cases this is trivial to do).

              vinnie Vincent Ryan
              alanb Alan Bateman
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: