Skip to content

Commit

Permalink
test/crypto: fix asymmetric capability test
Browse files Browse the repository at this point in the history
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: 2c6dab9 ("test/crypto: add RSA and Mod tests")
Cc: stable@dpdk.org

Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
  • Loading branch information
gmuthukrishn authored and Akhil Goyal committed Jul 18, 2024
1 parent 51941ea commit b016be8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/test/test_cryptodev_asym.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand All @@ -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);
}
}
Expand Down

0 comments on commit b016be8

Please sign in to comment.