[v2] app/test: fix of bitwise and operator in return

Message ID 20221111162715.37093-1-kai.ji@intel.com (mailing list archive)
State Accepted, archived
Delegated to: akhil goyal
Headers
Series [v2] app/test: fix of bitwise and operator in return |

Checks

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

Commit Message

Ji, Kai Nov. 11, 2022, 4:27 p.m. UTC
  This patch remove incorrect bitwise and operator used in the
return function of sw snow3g testcase

Fixes: 24342ade2c9d ("test/crypto: check SNOW3G when digest is encrypted")
Cc: lukaszx.krakowiak@intel.com

Signed-off-by: Kai Ji <kai.ji@intel.com>
---
 app/test/test_cryptodev.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
  

Comments

Power, Ciara Nov. 14, 2022, 10:22 a.m. UTC | #1
Hi Kai,

> -----Original Message-----
> From: Kai Ji <kai.ji@intel.com>
> Sent: Friday 11 November 2022 16:27
> To: dev@dpdk.org
> Cc: stable@dpdk.org; gakhil@marvell.com; Ji, Kai <kai.ji@intel.com>;
> Krakowiak, LukaszX <lukaszx.krakowiak@intel.com>
> Subject: [dpdk-dev v2] app/test: fix of bitwise and operator in return
> 
> This patch remove incorrect bitwise and operator used in the return function of
> sw snow3g testcase
> 
> Fixes: 24342ade2c9d ("test/crypto: check SNOW3G when digest is encrypted")
> Cc: lukaszx.krakowiak@intel.com
> 
> Signed-off-by: Kai Ji <kai.ji@intel.com>
> ---

Acked-by: Ciara Power <ciara.power@intel.com>
  
Akhil Goyal Nov. 15, 2022, 9:30 a.m. UTC | #2
> > This patch remove incorrect bitwise and operator used in the return function
> of
> > sw snow3g testcase
> >
> > Fixes: 24342ade2c9d ("test/crypto: check SNOW3G when digest is encrypted")
> > Cc: lukaszx.krakowiak@intel.com
> >
> > Signed-off-by: Kai Ji <kai.ji@intel.com>
> > ---
> 
> 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 e1122fcd7c..d6ae762df9 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -6870,8 +6870,10 @@  test_snow3g_decryption_with_digest_test_case_1(void)
 	 */
 	snow3g_hash_test_vector_setup(&snow3g_test_case_7, &snow3g_hash_data);
 
-	return test_snow3g_decryption(&snow3g_test_case_7) &
-			test_snow3g_authentication_verify(&snow3g_hash_data);
+	if (test_snow3g_decryption(&snow3g_test_case_7))
+		return TEST_FAILED;
+
+	return test_snow3g_authentication_verify(&snow3g_hash_data);
 }
 
 static int