diff mbox

[API-NEXT,PATCHv2,4/4] validation: crypto: add unit test for odp_crypto_capability()

Message ID 1455798054-29132-4-git-send-email-bill.fischofer@linaro.org
State New
Headers show

Commit Message

Bill Fischofer Feb. 18, 2016, 12:20 p.m. UTC
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>
---
 test/validation/crypto/crypto.c | 8 ++++++++
 1 file changed, 8 insertions(+)
diff mbox

Patch

diff --git a/test/validation/crypto/crypto.c b/test/validation/crypto/crypto.c
index b6d06b6..8f4ce87 100644
--- a/test/validation/crypto/crypto.c
+++ b/test/validation/crypto/crypto.c
@@ -26,6 +26,8 @@  int crypto_init(void)
 	odp_pool_param_t params;
 	odp_pool_t pool;
 	odp_queue_t out_queue;
+	odp_crypto_capability_t capability;
+	int rc;
 
 	if (0 != odp_init_global(NULL, NULL)) {
 		fprintf(stderr, "error: odp_init_global() failed.\n");
@@ -36,6 +38,12 @@  int crypto_init(void)
 		return -1;
 	}
 
+	rc = odp_crypto_capability(&capability);
+	if (rc != 0) {
+		fprintf(stderr, "error: unable to get crypto capabilities.\n");
+		return -1;
+	}
+
 	odp_pool_param_init(&params);
 	params.pkt.seg_len = SHM_PKT_POOL_BUF_SIZE;
 	params.pkt.len     = SHM_PKT_POOL_BUF_SIZE;