diff mbox

[PATCHv2,05/20] validation: crypto: lib populated

Message ID 1437737259-16953-6-git-send-email-christophe.milard@linaro.org
State New
Headers show

Commit Message

Christophe Milard July 24, 2015, 11:27 a.m. UTC
test symbols are now exported in the module lib.

Signed-off-by: Christophe Milard <christophe.milard@linaro.org>
---
 test/validation/crypto/crypto.c              |  6 +++---
 test/validation/crypto/crypto.h              | 24 ++++++++++++++++++++++++
 test/validation/crypto/odp_crypto_test_inp.c | 11 ++++++-----
 3 files changed, 33 insertions(+), 8 deletions(-)
diff mbox

Patch

diff --git a/test/validation/crypto/crypto.c b/test/validation/crypto/crypto.c
index ca7e740..7a407d9 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..9432338 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 registery: */
+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 };