]> git.droids-corp.org - dpdk.git/commitdiff
test/ipsec: check for devices before testing
authorStanislaw Kardach <kda@semihalf.com>
Wed, 1 Jun 2022 11:00:17 +0000 (13:00 +0200)
committerAkhil Goyal <gakhil@marvell.com>
Tue, 21 Jun 2022 18:04:50 +0000 (20:04 +0200)
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.

Signed-off-by: Stanislaw Kardach <kda@semihalf.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
app/test/test_ipsec_perf.c

index 346a8516489b436f1557b3211acd3fe2eb5d2d41..0eca003282e7fae14852c5499b9b5f4452bdcfdd 100644 (file)
@@ -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;