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

Message ID 20221111115941.16232-1-kai.ji@intel.com (mailing list archive)
State Superseded, archived
Delegated to: akhil goyal
Headers
Series [v1] 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/intel-Testing success Testing PASS
ci/github-robot: build success github build: passed
ci/iol-mellanox-Performance success Performance Testing PASS
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-compile-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS

Commit Message

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

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

Comments

Zhang, Fan Nov. 11, 2022, 1:16 p.m. UTC | #1
On 11/11/2022 11:59 AM, Kai Ji wrote:
> This patch remove incorrect bitwise and operator used in the
> return function of sw snow3g testcase
>
> Signed-off-by: Kai Ji <kai.ji@intel.com>
> ---
>   app/test/test_cryptodev.c | 6 ++++--
>   1 file changed, 4 insertions(+), 2 deletions(-)
>
> 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
Acked-by: Fan Zhang <fanzhang.oss@gmail.com>
  
Akhil Goyal Nov. 11, 2022, 1:18 p.m. UTC | #2
> Subject: [EXT] Re: [dpdk-dev v1] app/test: fix of bitwise and operator in return
> 
> External Email
> 
> ----------------------------------------------------------------------
> On 11/11/2022 11:59 AM, Kai Ji wrote:
> > This patch remove incorrect bitwise and operator used in the
> > return function of sw snow3g testcase
> >
Add fixes tag

> > Signed-off-by: Kai Ji <kai.ji@intel.com>
> > ---
> >   app/test/test_cryptodev.c | 6 ++++--
> >   1 file changed, 4 insertions(+), 2 deletions(-)
> >
> > 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
> Acked-by: Fan Zhang <fanzhang.oss@gmail.com>
  

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