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 9593845625; Mon, 15 Jul 2024 15:37:49 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 80E394067A; Mon, 15 Jul 2024 15:37:49 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 811A1402B0; Mon, 15 Jul 2024 15:37:47 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 46F9r0uV015503; Mon, 15 Jul 2024 06:37:46 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h= cc:content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to; s=pfpt0220; bh=oT/rkAT9623cCeFhbkftx+p cOAVsdP8Z/v2gjRQuOQY=; b=D/4ugh17SIDWz2dz0FjgYUHA6i5+G350dYnUJE5 eFF3vhf1KgfEPXendbwpLkUCG6u/S/mXORBPtvTvALjl5bsCWBE1Muk/I6VfbCnb V45UbHk/rBl2tffrJzVuPfPYdsTrq59XxPn6d5PXlVT6WoM0vHjomuOKfu5Zu8T6 8kbzXe7JK/wn5yKC6I+5HjwPkITIOeMOPqabKBNYMj+J3O93RcTtEyehEkujIQWB m3Cep2IBIk5O4CCean1I1a7IWz4HUi0ReK7ieaUxj/BebhIjEBVAZ7RxIQd4Y64Y yTSxoAFSrC6C6+idftl7qfLNSg2LYJO7Jp36dLwWJsNJXVg== Received: from dc5-exch05.marvell.com ([199.233.59.128]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 40c9p5uc66-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 15 Jul 2024 06:37:46 -0700 (PDT) Received: from DC5-EXCH05.marvell.com (10.69.176.209) by DC5-EXCH05.marvell.com (10.69.176.209) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Mon, 15 Jul 2024 06:37:45 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH05.marvell.com (10.69.176.209) with Microsoft SMTP Server id 15.2.1544.4 via Frontend Transport; Mon, 15 Jul 2024 06:37:45 -0700 Received: from BG-LT91401.marvell.com (BG-LT91401.marvell.com [10.28.168.34]) by maili.marvell.com (Postfix) with ESMTP id 73B2B3F7091; Mon, 15 Jul 2024 06:37:40 -0700 (PDT) From: Gowrishankar Muthukrishnan To: , Akhil Goyal , Fan Zhang , Shally Verma , Ashish Gupta <"ashishg@marvell.comashish.gupta"@marvell.com>, Umesh Kartha , Pablo de Lara , Sunila Sahu CC: Anoob Joseph , Gowrishankar Muthukrishnan , Subject: [PATCH v1] test/crypto: fix asymmetric capability test Date: Mon, 15 Jul 2024 19:07:25 +0530 Message-ID: <20240715133728.1519-1-gmuthukrishn@marvell.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: yQza-0gNDxnCI0Gc2IUKDRRTlzLK3Wmq X-Proofpoint-ORIG-GUID: yQza-0gNDxnCI0Gc2IUKDRRTlzLK3Wmq X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-07-15_08,2024-07-11_01,2024-05-17_01 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 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: 2c6dab9cd93 ("test/crypto: add RSA and Mod tests") Cc: stable@dpdk.org Signed-off-by: Gowrishankar Muthukrishnan --- app/test/test_cryptodev_asym.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/test/test_cryptodev_asym.c b/app/test/test_cryptodev_asym.c index 3802cf8022..1d88832146 100644 --- a/app/test/test_cryptodev_asym.c +++ b/app/test/test_cryptodev_asym.c @@ -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 */ @@ -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); } } -- 2.21.0