Sebb created CRYPTO-175:
---------------------------

             Summary: JNA tests rely on JNI code
                 Key: CRYPTO-175
                 URL: https://issues.apache.org/jira/browse/CRYPTO-175
             Project: Commons Crypto
          Issue Type: Bug
            Reporter: Sebb


The JNA tests rely on being able to use the JNI code.

For example, this JNA test works:

mvn test -Dtest=CbcNoPaddingCipherJnaStreamTest

However the following test fails:

mvn test -Dtest=CbcNoPaddingCipherJnaStreamTest -Djni.library.path=/tmp/

with

Caused by: java.lang.UnsatisfiedLinkError: Cannot load libcrypto.dylib 
(dlopen(/tmp/libcrypto.dylib, 0x0009): tried: '/tmp/libcrypto.dylib' (no such 
file), '/private/tmp/libcrypto.dylib' (no such file))!

I suspect this may be due to re-using some of the jni test classes.

I suppose it is possible that the loading of the JNI classes is incidental, and 
maybe the tests don't actually invoke them, but the tests ought to run even if 
JNI is not available.




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to