From: Gagandeep Singh Date: Thu, 4 Feb 2021 04:52:10 +0000 (+0800) Subject: test/crypto: add check in decryption with digest case X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=f7ea9701109b70ceb49030054532d308c9b12004;p=dpdk.git test/crypto: add check in decryption with digest case Some platforms may not support operations on encrypted digest, So in this patch adding a check for such test cases. Signed-off-by: Gagandeep Singh Acked-by: Akhil Goyal --- diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index ae22456094..f91debc168 100644 --- a/app/test/test_cryptodev.c +++ b/app/test/test_cryptodev.c @@ -6324,6 +6324,16 @@ static int test_snow3g_decryption_with_digest_test_case_1(void) { struct snow3g_hash_test_data snow3g_hash_data; + struct rte_cryptodev_info dev_info; + struct crypto_testsuite_params *ts_params = &testsuite_params; + + rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info); + uint64_t feat_flags = dev_info.feature_flags; + + if (!(feat_flags & RTE_CRYPTODEV_FF_DIGEST_ENCRYPTED)) { + printf("Device doesn't support encrypted digest operations.\n"); + return -ENOTSUP; + } /* * Function prepare data for hash veryfication test case.