Skip to contentSkip to conversation

test/crypto: fix flag check

PATCH Applied Pablo de Lara 3 participants 3 messages Apr 16, 2020 – Apr 17, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 test/crypto: fix flag check

An incorrect flag check was done, using "&&" instead of "&".

Fixes 2717246ecd7d ("cryptodev: replace mbuf scatter gather flag")
---
 app/test/test_cryptodev_blockcipher.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
app/test/test_cryptodev_blockcipher.c +1 -1
index 2ff7fc91b..4973c74a9 100644
@@ -93,7 +93,7 @@ test_blockcipher_one_case(const struct blockcipher_test_case *t,
 		uint64_t feat_flags = dev_info.feature_flags;
 		uint64_t oop_flag = RTE_CRYPTODEV_FF_OOP_SGL_IN_LB_OUT;
 
-		if (t->feature_mask && BLOCKCIPHER_TEST_FEATURE_OOP) {
+		if (t->feature_mask & BLOCKCIPHER_TEST_FEATURE_OOP) {
 			if (!(feat_flags & oop_flag)) {
 				printf("Device doesn't support out-of-place "
 					"scatter-gather in input mbuf. "
Signature · 1 line
2.25.2
Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines

-----Original Message-----
From: De Lara Guarch, Pablo <[email protected]>
Sent: Thursday, April 16, 2020 6:13 PM
To: Trahe, Fiona <[email protected]>; Doherty, Declan <[email protected]>
Cc: [email protected]; De Lara Guarch, Pablo <[email protected]>; [email protected]
Subject: [PATCH] test/crypto: fix flag check

Quoted 6 lines

An incorrect flag check was done, using "&&" instead of "&".

Fixes 2717246ecd7d ("cryptodev: replace mbuf scatter gather flag")