diff mbox

[03/13] validation: crypto: using _CU_TEST_INFO()

Message ID 1438001035-21900-4-git-send-email-christophe.milard@linaro.org
State New
Headers show

Commit Message

Christophe Milard July 27, 2015, 12:43 p.m. UTC
Signed-off-by: Christophe Milard <christophe.milard@linaro.org>
---
 test/validation/crypto/odp_crypto_test_inp.c | 18 ++++++------------
 1 file changed, 6 insertions(+), 12 deletions(-)
diff mbox

Patch

diff --git a/test/validation/crypto/odp_crypto_test_inp.c b/test/validation/crypto/odp_crypto_test_inp.c
index c1c08af..eecbeaf 100644
--- a/test/validation/crypto/odp_crypto_test_inp.c
+++ b/test/validation/crypto/odp_crypto_test_inp.c
@@ -6,6 +6,7 @@ 
 
 #include <odp.h>
 #include <CUnit/Basic.h>
+#include <odp_cunit_common.h>
 #include "test_vectors.h"
 #include "odp_crypto_test_inp.h"
 
@@ -131,7 +132,6 @@  cleanup:
  * operation for 3DES_CBC algorithm. IV for the operation is the session IV.
  * 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)
 {
 	odp_crypto_key_t cipher_key = { .data = NULL, .length = 0 },
@@ -164,7 +164,6 @@  static void crypto_test_enc_alg_3des_cbc(void)
 /* This test verifies the correctness of encode (plaintext -> ciphertext)
  * 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)
 {
 	odp_crypto_key_t cipher_key = { .data = NULL, .length = 0 },
@@ -198,7 +197,6 @@  static void crypto_test_enc_alg_3des_cbc_ovr_iv(void)
  * In addition the test verifies if the implementation can use the
  * 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)
 {
 	odp_crypto_key_t cipher_key = { .data = NULL, .length = 0 },
@@ -233,7 +231,6 @@  static void crypto_test_dec_alg_3des_cbc(void)
  * In addition the test verifies if the implementation can use the
  * 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)
 {
 	odp_crypto_key_t cipher_key = { .data = NULL, .length = 0 },
@@ -269,7 +266,6 @@  static void crypto_test_dec_alg_3des_cbc_ovr_iv(void)
  * In addition the test verifies if the implementation can use the
  * packet buffer as completion event buffer.
  * */
-#define ASYNC_INP_ALG_HMAC_MD5	"ALG_HMAC_MD5"
 static void crypto_test_alg_hmac_md5(void)
 {
 	odp_crypto_key_t cipher_key = { .data = NULL, .length = 0 },
@@ -323,12 +319,10 @@  int crypto_suite_async_init(void)
 }
 
 CU_TestInfo crypto_suite[] = {
-	{ASYNC_INP_ENC_ALG_3DES_CBC, crypto_test_enc_alg_3des_cbc },
-	{ASYNC_INP_DEC_ALG_3DES_CBC, crypto_test_dec_alg_3des_cbc },
-	{ASYNC_INP_ENC_ALG_3DES_CBC_OVR_IV,
-		crypto_test_enc_alg_3des_cbc_ovr_iv },
-	{ASYNC_INP_DEC_ALG_3DES_CBC_OVR_IV,
-		crypto_test_dec_alg_3des_cbc_ovr_iv },
-	{ASYNC_INP_ALG_HMAC_MD5, crypto_test_alg_hmac_md5 },
+	_CU_TEST_INFO(crypto_test_enc_alg_3des_cbc),
+	_CU_TEST_INFO(crypto_test_dec_alg_3des_cbc),
+	_CU_TEST_INFO(crypto_test_enc_alg_3des_cbc_ovr_iv),
+	_CU_TEST_INFO(crypto_test_dec_alg_3des_cbc_ovr_iv),
+	_CU_TEST_INFO(crypto_test_alg_hmac_md5),
 	CU_TEST_INFO_NULL,
 };