[2/2] test/crypto: handle return code

Message ID 20230512140946.195-2-anoobj@marvell.com (mailing list archive)
State Not Applicable, archived
Delegated to: akhil goyal
Headers
Series [1/2] test/crypto: free memory in error and skip paths |

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/github-robot: build success github build: passed
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-unit-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-broadcom-Performance success Performance Testing 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/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/intel-Functional success Functional PASS

Commit Message

Anoob Joseph May 12, 2023, 2:09 p.m. UTC
  The sub test case, test_snow3g_decryption, may fail for non-critical
reasons such as lack of support. Handle the return value gracefully to
allow TEST_SKIPPED return value to be propagated correctly.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
---
 app/test/test_cryptodev.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
  

Comments

Akhil Goyal May 16, 2023, 10:12 a.m. UTC | #1
> Subject: [PATCH 2/2] test/crypto: handle return code
> 
> The sub test case, test_snow3g_decryption, may fail for non-critical
> reasons such as lack of support. Handle the return value gracefully to
> allow TEST_SKIPPED return value to be propagated correctly.
> 
> Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
  
Power, Ciara May 16, 2023, 10:45 a.m. UTC | #2
Hi Anoob,

> -----Original Message-----
> From: Akhil Goyal <gakhil@marvell.com>
> Sent: Tuesday 16 May 2023 11:13
> To: Anoob Joseph <anoobj@marvell.com>; Fan Zhang
> <fanzhang.oss@gmail.com>; Power, Ciara <ciara.power@intel.com>
> Cc: Hemant Agrawal <hemant.agrawal@nxp.com>; Jerin Jacob Kollanukkaran
> <jerinj@marvell.com>; Tejasree Kondoj <ktejasree@marvell.com>; Ji, Kai
> <kai.ji@intel.com>; dev@dpdk.org
> Subject: RE: [PATCH 2/2] test/crypto: handle return code
> 
> > Subject: [PATCH 2/2] test/crypto: handle return code
> >
> > The sub test case, test_snow3g_decryption, may fail for non-critical
> > reasons such as lack of support. Handle the return value gracefully to
> > allow TEST_SKIPPED return value to be propagated correctly.
> >
> > Signed-off-by: Anoob Joseph <anoobj@marvell.com>
> Acked-by: Akhil Goyal <gakhil@marvell.com>

This looks like a duplicate of a patch recently merged: https://patches.dpdk.org/project/dpdk/patch/20230414135526.4271-1-saoirse.odonovan@intel.com/

Thanks,
Ciara
  
Anoob Joseph May 16, 2023, 10:53 a.m. UTC | #3
Hi Ciara,

> This looks like a duplicate of a patch recently merged:
Indeed. Missed it.

@Akhil, we can abandon this patch.

Thanks,
Anoob

> -----Original Message-----
> From: Power, Ciara <ciara.power@intel.com>
> Sent: Tuesday, May 16, 2023 4:16 PM
> To: Akhil Goyal <gakhil@marvell.com>; Anoob Joseph
> <anoobj@marvell.com>; Fan Zhang <fanzhang.oss@gmail.com>
> Cc: Hemant Agrawal <hemant.agrawal@nxp.com>; Jerin Jacob Kollanukkaran
> <jerinj@marvell.com>; Tejasree Kondoj <ktejasree@marvell.com>; Ji, Kai
> <kai.ji@intel.com>; dev@dpdk.org
> Subject: [EXT] RE: [PATCH 2/2] test/crypto: handle return code
> 
> External Email
> 
> ----------------------------------------------------------------------
> Hi Anoob,
> 
> > -----Original Message-----
> > From: Akhil Goyal <gakhil@marvell.com>
> > Sent: Tuesday 16 May 2023 11:13
> > To: Anoob Joseph <anoobj@marvell.com>; Fan Zhang
> > <fanzhang.oss@gmail.com>; Power, Ciara <ciara.power@intel.com>
> > Cc: Hemant Agrawal <hemant.agrawal@nxp.com>; Jerin Jacob
> Kollanukkaran
> > <jerinj@marvell.com>; Tejasree Kondoj <ktejasree@marvell.com>; Ji, Kai
> > <kai.ji@intel.com>; dev@dpdk.org
> > Subject: RE: [PATCH 2/2] test/crypto: handle return code
> >
> > > Subject: [PATCH 2/2] test/crypto: handle return code
> > >
> > > The sub test case, test_snow3g_decryption, may fail for non-critical
> > > reasons such as lack of support. Handle the return value gracefully
> > > to allow TEST_SKIPPED return value to be propagated correctly.
> > >
> > > Signed-off-by: Anoob Joseph <anoobj@marvell.com>
> > Acked-by: Akhil Goyal <gakhil@marvell.com>
> 
> This looks like a duplicate of a patch recently merged:
> https://urldefense.proofpoint.com/v2/url?u=https-
> 3A__patches.dpdk.org_project_dpdk_patch_20230414135526.4271-2D1-
> 2Dsaoirse.odonovan-
> 40intel.com_&d=DwIFAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=jPfB8rwwviRSxy
> LWs2n6B-
> WYLn1v9SyTMrT5EQqh2TU&m=O_paIbxHa0g1eO0nnvRRDxs52JIZh_Xteso9I
> wXdLnFAYQyoPk4iryD2h4_uQRdB&s=QG45QCchVqKQyfhL8vENmY-
> JXiwsRS6zrbV3XxJoPTA&e=
> 
> Thanks,
> Ciara
  

Patch

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 86e63a33fc..d212e71ba6 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -6947,6 +6947,7 @@  test_snow3g_decryption_with_digest_test_case_1(void)
 	struct snow3g_hash_test_data snow3g_hash_data;
 	struct rte_cryptodev_info dev_info;
 	struct crypto_testsuite_params *ts_params = &testsuite_params;
+	int ret;
 
 	rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
 	uint64_t feat_flags = dev_info.feature_flags;
@@ -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 != TEST_SUCCESS)
+		return ret;
 
 	return test_snow3g_authentication_verify(&snow3g_hash_data);
 }