code review request: 7078816: /test/sun/security/pkcs11/KeyStore/SecretKeysBasic.sh failure

Alan Bateman Alan.Bateman at oracle.com
Sat Aug 13 16:42:55 UTC 2011


Weijun Wang wrote:
> CR: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7078816
> webrev: http://cr.openjdk.java.net/~weijun/7078816/webrev.00/
>
> Description:
> The test calls javac to compile a java source file, but the class's 
> parent class is not in the same directory, and compilation fails.
>
> The SecretKeysBasic class is a sub class of PKCS11Test which is in 
> another directory, and javac has not included that directory into 
> classpath.
>
> I also remove the version check of Solaris OS into the initial uname 
> check, otherwise, if token "nss" already fails but token "solaris" 
> finds version not matched, it will exit 0.
>
> I also open up the test to all OSes.
>
> Two questions:
>
> 1. Is it really necessary to define $CP to be /bin/cp on Solaris/Linux 
> and /usr/bin/cp on Cygwin?
>
> 2. For Solaris. there is
>
>     case "${OS_VERSION}" in
>       5.1* )
>         SOFTTOKEN_DIR=${TESTCLASSES}
>         export SOFTTOKEN_DIR
>         TOKENS="nss solaris"
>         ;;
>       * )
>
> Where is this $SOFTTOKEN_DIR used? Is it necessary? I didn't find 
> reference to it in either test or source.
>
> *Alan*: Can you try this fix on your solaris-x64 machine where the 
> original test failed?
I grabbed the patch from your webrev and the tests is now passing for me 
- thanks.

I can't say if SOFTTOKEN_DIR is needed or not but it looks like it is 
used by pkcs11_softtoken.so.

One thing I see in the test is that TESTJAVA is no longer set when 
running interactively. I guess you could default it to "java" so that it 
runs the JDK on the PATH. Alternatively the test could fail if not set 
(there are examples of both approaches in the test tree).

-Alan.






More information about the security-dev mailing list