Skip to content

Commit

Permalink
test/ipsec: skip if no compatible device
Browse files Browse the repository at this point in the history
[ upstream commit 37edccf ]

ipsec_autotest is now skipped if no compatible crypto devices are found.

Fixes issue where if at least one crypto device was found but no
compatible crypto devices for the ipsec_autotest test case are present,
the case would fail with no error message. Now, when this situation is
encountered, the test case will be skipped with an explanation.

Fixes: 59d7353 ("test/ipsec: fix test suite setup")

Signed-off-by: Jeremy Spewock <jspewock@iol.unh.edu>
Signed-off-by: Owen Hilyard <ohilyard@iol.unh.edu>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
  • Loading branch information
JSpewock authored and kevintraynor committed Oct 11, 2022
1 parent a003adf commit 6a5ed8d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/test/test_ipsec.c
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,10 @@ testsuite_setup(void)
}
}

if (ts_params->valid_dev_found == 0)
return TEST_FAILED;
if (ts_params->valid_dev_found == 0) {
RTE_LOG(WARNING, USER1, "No compatible crypto device found.\n");
return TEST_SKIPPED;
}

ts_params->mbuf_pool = rte_pktmbuf_pool_create(
"CRYPTO_MBUFPOOL",
Expand Down

0 comments on commit 6a5ed8d

Please sign in to comment.