[v2,3/5] test/crypto: fix auth op parameter for ZUC256 tests

Message ID 20230303093821.2367309-4-ciara.power@intel.com (mailing list archive)
State Accepted, archived
Delegated to: akhil goyal
Headers
Series test/crypto: add ZUC256 chained tests |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Power, Ciara March 3, 2023, 9:38 a.m. UTC
  The incorrect value was being passed to the ZUC authentication test
function, indicating the opposite of the intended GENERATE/VERIFY op.
This is fixed to use the auth op enum rather than a value.

Fixes: 83397b9f0739 ("test/crypto: add further ZUC test cases")

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Brian Dooley <brian.dooley@intel.com>
---
 app/test/test_cryptodev.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
  

Patch

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 72d359dd91..9b90bae206 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -7568,13 +7568,15 @@  test_zuc256_decryption_test_case_2(void)
 static int
 test_zuc256_hash_generate_4b_tag_test_case_1(void)
 {
-	return test_zuc_authentication(&zuc256_test_case_auth_1, 0);
+	return test_zuc_authentication(&zuc256_test_case_auth_1,
+			RTE_CRYPTO_AUTH_OP_GENERATE);
 }
 
 static int
 test_zuc256_hash_generate_4b_tag_test_case_2(void)
 {
-	return test_zuc_authentication(&zuc256_test_case_auth_2, 0);
+	return test_zuc_authentication(&zuc256_test_case_auth_2,
+			RTE_CRYPTO_AUTH_OP_GENERATE);
 }
 
 static int
@@ -7601,13 +7603,15 @@  test_zuc256_hash_generate_16b_tag_test_case_1(void)
 static int
 test_zuc256_hash_verify_4b_tag_test_case_1(void)
 {
-	return test_zuc_authentication(&zuc256_test_case_auth_1, 1);
+	return test_zuc_authentication(&zuc256_test_case_auth_1,
+			RTE_CRYPTO_AUTH_OP_VERIFY);
 }
 
 static int
 test_zuc256_hash_verify_4b_tag_test_case_2(void)
 {
-	return test_zuc_authentication(&zuc256_test_case_auth_2, 1);
+	return test_zuc_authentication(&zuc256_test_case_auth_2,
+			RTE_CRYPTO_AUTH_OP_VERIFY);
 }
 
 static int