test/crypto: fix return value for snow3g testcase

Message ID 20230414135526.4271-1-saoirse.odonovan@intel.com (mailing list archive)
State Accepted, archived
Delegated to: akhil goyal
Headers
Series test/crypto: fix return value for snow3g testcase |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/github-robot: build success github build: passed
ci/intel-Testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-unit-testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/intel-Functional success Functional PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-testing success Testing PASS
ci/iol-x86_64-unit-testing fail Testing issues

Commit Message

O'Donovan, Saoirse April 14, 2023, 1:55 p.m. UTC
  Unit tests were failing due to the return value of the decryption and
authentication functions not being handled correctly. This has now been
modified to return the expected test status.

Fixes: e23eccfd281e ("test/crypto: fix bitwise operator in a SNOW3G case")
Cc: kai.ji@intel.com
Cc: stable@dpdk.org

Signed-off-by: Saoirse O'Donovan <saoirse.odonovan@intel.com>
---
 app/test/test_cryptodev.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
  

Comments

Power, Ciara April 14, 2023, 2:01 p.m. UTC | #1
Hi Saoirse,

> -----Original Message-----
> From: Saoirse O'Donovan <saoirse.odonovan@intel.com>
> Sent: Friday 14 April 2023 14:55
> To: Akhil Goyal <gakhil@marvell.com>; Fan Zhang
> <fanzhang.oss@gmail.com>
> Cc: dev@dpdk.org; O'Donovan, Saoirse <saoirse.odonovan@intel.com>; Ji,
> Kai <kai.ji@intel.com>; stable@dpdk.org
> Subject: [PATCH] test/crypto: fix return value for snow3g testcase
> 
> Unit tests were failing due to the return value of the decryption and
> authentication functions not being handled correctly. This has now been
> modified to return the expected test status.
> 
> Fixes: e23eccfd281e ("test/crypto: fix bitwise operator in a SNOW3G case")
> Cc: kai.ji@intel.com
> Cc: stable@dpdk.org
> 
> Signed-off-by: Saoirse O'Donovan <saoirse.odonovan@intel.com>
> ---
>  app/test/test_cryptodev.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 

Acked-by: Ciara Power <ciara.power@intel.com>
  
Akhil Goyal May 3, 2023, 7:42 a.m. UTC | #2
> 
> Acked-by: Ciara Power <ciara.power@intel.com>
Applied to dpdk-next-crypto
Thanks.
  

Patch

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 9c670e9a35..0713187d14 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -6944,6 +6944,7 @@  snow3g_hash_test_vector_setup(const struct snow3g_test_data *pattern,
 static int
 test_snow3g_decryption_with_digest_test_case_1(void)
 {
+	int ret;
 	struct snow3g_hash_test_data snow3g_hash_data;
 	struct rte_cryptodev_info dev_info;
 	struct crypto_testsuite_params *ts_params = &testsuite_params;
@@ -6962,8 +6963,9 @@  test_snow3g_decryption_with_digest_test_case_1(void)
 	 */
 	snow3g_hash_test_vector_setup(&snow3g_test_case_7, &snow3g_hash_data);
 
-	if (test_snow3g_decryption(&snow3g_test_case_7))
-		return TEST_FAILED;
+	ret = test_snow3g_decryption(&snow3g_test_case_7);
+	if (ret != 0)
+		return ret;
 
 	return test_snow3g_authentication_verify(&snow3g_hash_data);
 }