Skip to contentSkip to conversation

test/ipsec: check for cryptodevs before testing

PATCH Applied Stanislaw Kardach 2 participants 2 messages Jun 1, 2022 – Jun 21, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 test/ipsec: check for cryptodevs before testing

Make sure that ipsec_perf_autotest checks if there are any crypto devices available before it starts performance testing. Same test is performed in the ipsec_autotest so it seems prudent to do it here too to not introduce false failures.

---
 app/test/test_ipsec_perf.c | 6 ++++++
 1 file changed, 6 insertions(+)
app/test/test_ipsec_perf.c +6 -0
index 346a851648..0eca003282 100644
@@ -597,6 +597,12 @@ test_libipsec_perf(void)
 	uint32_t i;
 	int ret;
 
+	ret = rte_cryptodev_count();
+	if (ret < 1) {
+		RTE_LOG(WARNING, USER1, "No crypto devices found?\n");
+		return TEST_SKIPPED;
+	}
+
 	if (testsuite_setup() < 0) {
 		testsuite_teardown();
 		return TEST_FAILED;
Signature · 1 line
2.30.2
Acked-by on v1 1/1 Applied
#1 lore raw
Quoted 8 lines

Make sure that ipsec_perf_autotest checks if there are any crypto devices available before it starts performance testing. Same test is performed in the ipsec_autotest so it seems prudent to do it here too to not introduce false failures.

---

Applied to dpdk-next-crypto

Thanks.