aboutsummaryrefslogtreecommitdiff
path: root/test/validation/crypto
diff options
context:
space:
mode:
Diffstat (limited to 'test/validation/crypto')
-rw-r--r--test/validation/crypto/crypto.c6
-rw-r--r--test/validation/crypto/crypto.h24
-rw-r--r--test/validation/crypto/odp_crypto_test_inp.c11
3 files changed, 33 insertions, 8 deletions
diff --git a/test/validation/crypto/crypto.c b/test/validation/crypto/crypto.c
index 9965432..cad6601 100644
--- a/test/validation/crypto/crypto.c
+++ b/test/validation/crypto/crypto.c
@@ -15,7 +15,7 @@
#define SHM_COMPL_POOL_SIZE (128 * 1024)
#define SHM_COMPL_POOL_BUF_SIZE 128
-static CU_SuiteInfo crypto_suites[] = {
+CU_SuiteInfo crypto_suites[] = {
{ODP_CRYPTO_SYNC_INP, crypto_suite_sync_init, NULL, NULL, NULL,
crypto_suite},
{ODP_CRYPTO_ASYNC_INP, crypto_suite_async_init, NULL, NULL, NULL,
@@ -23,7 +23,7 @@ static CU_SuiteInfo crypto_suites[] = {
CU_SUITE_INFO_NULL,
};
-static int crypto_init(void)
+int crypto_init(void)
{
odp_pool_param_t params;
odp_pool_t pool;
@@ -60,7 +60,7 @@ static int crypto_init(void)
return 0;
}
-static int crypto_term(void)
+int crypto_term(void)
{
odp_pool_t pool;
odp_queue_t out_queue;
diff --git a/test/validation/crypto/crypto.h b/test/validation/crypto/crypto.h
index 9ab641b..41dd4ed 100644
--- a/test/validation/crypto/crypto.h
+++ b/test/validation/crypto/crypto.h
@@ -7,6 +7,30 @@
#ifndef _ODP_TEST_CRYPTO_H_
#define _ODP_TEST_CRYPTO_H_
+#include <CUnit/Basic.h>
+
+/* test functions: */
+void crypto_test_enc_alg_3des_cbc(void);
+void crypto_test_enc_alg_3des_cbc_ovr_iv(void);
+void crypto_test_dec_alg_3des_cbc(void);
+void crypto_test_dec_alg_3des_cbc_ovr_iv(void);
+void crypto_test_alg_hmac_md5(void);
+
+/* test arrays: */
+extern CU_TestInfo crypto_suite[];
+
+/* test array init/term functions: */
+int crypto_suite_sync_init(void);
+int crypto_suite_async_init(void);
+
+/* test registry: */
+extern CU_SuiteInfo crypto_suites[];
+
+/* executable init/term functions: */
+int crypto_init(void);
+int crypto_term(void);
+
+/* main test program: */
int crypto_main(void);
#endif
diff --git a/test/validation/crypto/odp_crypto_test_inp.c b/test/validation/crypto/odp_crypto_test_inp.c
index c1c08af..90fe8d0 100644
--- a/test/validation/crypto/odp_crypto_test_inp.c
+++ b/test/validation/crypto/odp_crypto_test_inp.c
@@ -8,6 +8,7 @@
#include <CUnit/Basic.h>
#include "test_vectors.h"
#include "odp_crypto_test_inp.h"
+#include "crypto.h"
struct suite_context_s {
enum odp_crypto_op_mode pref_mode;
@@ -132,7 +133,7 @@ cleanup:
* In addition the test verifies if the implementation can use the
* packet buffer as completion event buffer.*/
#define ASYNC_INP_ENC_ALG_3DES_CBC "ENC_ALG_3DES_CBC"
-static void crypto_test_enc_alg_3des_cbc(void)
+void crypto_test_enc_alg_3des_cbc(void)
{
odp_crypto_key_t cipher_key = { .data = NULL, .length = 0 },
auth_key = { .data = NULL, .length = 0 };
@@ -165,7 +166,7 @@ static void crypto_test_enc_alg_3des_cbc(void)
* operation for 3DES_CBC algorithm. IV for the operation is the operation IV.
* */
#define ASYNC_INP_ENC_ALG_3DES_CBC_OVR_IV "ENC_ALG_3DES_CBC_OVR_IV"
-static void crypto_test_enc_alg_3des_cbc_ovr_iv(void)
+void crypto_test_enc_alg_3des_cbc_ovr_iv(void)
{
odp_crypto_key_t cipher_key = { .data = NULL, .length = 0 },
auth_key = { .data = NULL, .length = 0 };
@@ -199,7 +200,7 @@ static void crypto_test_enc_alg_3des_cbc_ovr_iv(void)
* packet buffer as completion event buffer.
* */
#define ASYNC_INP_DEC_ALG_3DES_CBC "DEC_ALG_3DES_CBC"
-static void crypto_test_dec_alg_3des_cbc(void)
+void crypto_test_dec_alg_3des_cbc(void)
{
odp_crypto_key_t cipher_key = { .data = NULL, .length = 0 },
auth_key = { .data = NULL, .length = 0 };
@@ -234,7 +235,7 @@ static void crypto_test_dec_alg_3des_cbc(void)
* packet buffer as completion event buffer.
* */
#define ASYNC_INP_DEC_ALG_3DES_CBC_OVR_IV "DEC_ALG_3DES_CBC_OVR_IV"
-static void crypto_test_dec_alg_3des_cbc_ovr_iv(void)
+void crypto_test_dec_alg_3des_cbc_ovr_iv(void)
{
odp_crypto_key_t cipher_key = { .data = NULL, .length = 0 },
auth_key = { .data = NULL, .length = 0 };
@@ -270,7 +271,7 @@ static void crypto_test_dec_alg_3des_cbc_ovr_iv(void)
* packet buffer as completion event buffer.
* */
#define ASYNC_INP_ALG_HMAC_MD5 "ALG_HMAC_MD5"
-static void crypto_test_alg_hmac_md5(void)
+void crypto_test_alg_hmac_md5(void)
{
odp_crypto_key_t cipher_key = { .data = NULL, .length = 0 },
auth_key = { .data = NULL, .length = 0 };