From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 287B7A0A0E; Thu, 4 Feb 2021 05:52:21 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9C146240540; Thu, 4 Feb 2021 05:52:20 +0100 (CET) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by mails.dpdk.org (Postfix) with ESMTP id 374D0240539 for ; Thu, 4 Feb 2021 05:52:19 +0100 (CET) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id DFA551A008D; Thu, 4 Feb 2021 05:52:18 +0100 (CET) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id E5CF11A0038; Thu, 4 Feb 2021 05:52:16 +0100 (CET) Received: from lsv11086.swis.cn-sha01.nxp.com (lsv11086.swis.cn-sha01.nxp.com [92.121.210.87]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id D134E402B7; Thu, 4 Feb 2021 05:52:13 +0100 (CET) From: Gagandeep Singh To: dev@dpdk.org, akhil.goyal@nxp.com Cc: thomas@monjalon.net, Gagandeep Singh Date: Thu, 4 Feb 2021 12:52:10 +0800 Message-Id: <1612414330-18971-1-git-send-email-g.singh@nxp.com> X-Mailer: git-send-email 2.7.4 X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH] test/crypto: add a check in decryption with digest test case X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- app/test/test_cryptodev.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index ae22456..f91debc 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. -- 2.7.4