Skip to contentSkip to conversation

app/test: fix of bitwise and operator in return

PATCH Superseded Kai Ji 4 participants 6 messages Nov 11, 2022 – Nov 15, 2022

lore
Share & tools
lore

Kai Ji

author
#0 lore raw

PATCH 1/1 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

---
 app/test/test_cryptodev.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
app/test/test_cryptodev.c +4 -2
index e1122fcd7c..d6ae762df9 100644
@@ -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
Signature · 1 line
2.17.1
Acked-by on v1 1/1
#1 lore raw
Quoted 15 lines · Kai Ji

This patch remove incorrect bitwise and operator used in the return function of sw snow3g testcase

---
  app/test/test_cryptodev.c | 6 ++++--
  1 file changed, 4 insertions(+), 2 deletions(-)
app/test/test_cryptodev.c +0 -0
index e1122fcd7c..d6ae762df9 100644
@@ -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);

app/test/test_cryptodev.c test_snow3g_decryption_with_digest_test_case_1(void) · line 6879

Quoted 10 lines
app/test/test_cryptodev.c +4 -2
 
-	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
#2 lore raw
Quoted 9 lines

Subject: [EXT] Re: [dpdk-dev v1] app/test: fix of bitwise and operator in return

External Email

----------------------------------------------------------------------

Quoted 3 lines · Kai Ji

This patch remove incorrect bitwise and operator used in the return function of sw snow3g testcase

Add fixes tag

Quoted 26 lines

app/test/test_cryptodev.c

Quoted 10 lines
---
  app/test/test_cryptodev.c | 6 ++++--
  1 file changed, 4 insertions(+), 2 deletions(-)
app/test/test_cryptodev.c +0 -0
index e1122fcd7c..d6ae762df9 100644
@@ -6870,8 +6870,10 @@

test_snow3g_decryption_with_digest_test_case_1(void)

app/test/test_cryptodev.c line 6871

Quoted 2 lines
app/test/test_cryptodev.c +0 -0
  	 */
  	snow3g_hash_test_vector_setup(&snow3g_test_case_7,

&snow3g_hash_data);

app/test/test_cryptodev.c line 6873

Quoted 3 lines
app/test/test_cryptodev.c +0 -2
-	return test_snow3g_decryption(&snow3g_test_case_7) &
-
	test_snow3g_authentication_verify(&snow3g_hash_data);

app/test/test_cryptodev.c test_snow3g_decryption_with_digest_test_case_1(void) · line 6879

Quoted 7 lines
app/test/test_cryptodev.c +4 -0
+	if (test_snow3g_decryption(&snow3g_test_case_7))
+		return TEST_FAILED;
+
+	return test_snow3g_authentication_verify(&snow3g_hash_data);
  }
 
  static int
author
#3 lore raw

PATCH v2 1/1 app/test: fix of bitwise and operator in return

In reply to Kai Ji

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")
---
 app/test/test_cryptodev.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
app/test/test_cryptodev.c +4 -2
index e1122fcd7c..d6ae762df9 100644
@@ -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
Signature · 1 line
2.17.1
Acked-by on v2 1/1
#4 lore raw

Hi Kai,

Quoted 8 lines

-----Original Message-----
From: Kai Ji <[email protected]>
Sent: Friday 11 November 2022 16:27
To: [email protected]
Cc: [email protected]; [email protected]; Ji, Kai <[email protected]>; Krakowiak, LukaszX <[email protected]>
Subject: [dpdk-dev v2] app/test: fix of bitwise and operator in return

Quoted 8 lines

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")

---