[PATCH 1/2] test/crypto: fix unexpected test abort

Ruifeng Wang ruifeng.wang at arm.com
Mon Sep 26 12:01:19 CEST 2022


rte_cryptodev_sym_session_create now updates rte_errno. So rte_errno
should be reset before executing current test case. This prevents
current case from being aborted due to errno set by previous negative
case.

Signed-off-by: Ruifeng Wang <ruifeng.wang at arm.com>
---
 app/test/test_cryptodev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index b77e14cb06..981db009b8 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -2176,6 +2176,7 @@ test_AES_CBC_HMAC_SHA1_encrypt_digest(void)
 	ut_params->auth_xform.auth.key.data = hmac_sha1_key;
 	ut_params->auth_xform.auth.digest_length = DIGEST_BYTE_LENGTH_SHA1;
 
+	rte_errno = 0;
 	ut_params->sess = rte_cryptodev_sym_session_create(
 			ts_params->valid_devs[0], &ut_params->cipher_xform,
 			ts_params->session_mpool);
-- 
2.25.1



More information about the dev mailing list