Skip to contentSkip to conversation

test/crypto: fix asymmetric capability test

PATCH Applied Gowrishankar Muthukrishnan 3 participants 3 messages Jul 15, 2024 – Jul 18, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 test/crypto: fix asymmetric capability test

Fix asymmetric capability test for below:
* Skip test if asymmetric crypto feature is not supported by device.
* Assert return value of RTE function to get asymmetric capability.

Coverity issue: 373365

Fixes 2c6dab9cd93 ("test/crypto: add RSA and Mod tests")
---
 app/test/test_cryptodev_asym.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
app/test/test_cryptodev_asym.c +2 -1
index 3802cf8022..1d88832146 100644
@@ -626,7 +626,7 @@ test_capability(void)
 				RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO)) {
 		RTE_LOG(INFO, USER1,
 				"Device doesn't support asymmetric. Test Skipped\n");
-		return TEST_SUCCESS;
+		return TEST_SKIPPED;
 	}
 
 	/* print xform capability */
@@ -641,6 +641,7 @@ test_capability(void)
 			capa = rte_cryptodev_asym_capability_get(dev_id,
 				(const struct
 				rte_cryptodev_asym_capability_idx *) &idx);
+			TEST_ASSERT_NOT_NULL(capa, "Failed to get asymmetric capability");
 			print_asym_capa(capa);
 			}
 	}
Signature · 1 line
2.21.0
Acked-by on v1 1/1
#1 lore raw
Quoted 11 lines

Subject: [PATCH v1] test/crypto: fix asymmetric capability test

Fix asymmetric capability test for below:
* Skip test if asymmetric crypto feature is not supported by device.
* Assert return value of RTE function to get asymmetric capability.

Coverity issue: 373365

Fixes 2c6dab9cd93 ("test/crypto: add RSA and Mod tests")
Applied
#2 lore raw
In reply to Gowrishankar Muthukrishnan
Quoted 11 lines

Subject: [PATCH v1] test/crypto: fix asymmetric capability test

Fix asymmetric capability test for below:
* Skip test if asymmetric crypto feature is not supported by device.
* Assert return value of RTE function to get asymmetric capability.

Coverity issue: 373365

Fixes 2c6dab9cd93 ("test/crypto: add RSA and Mod tests")

Applied to dpdk-next-crypto
Thanks.