From patchwork Tue Aug 22 13:16:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aakash Sasidharan X-Patchwork-Id: 130636 X-Patchwork-Delegate: jerinj@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0C23A430D0; Tue, 22 Aug 2023 15:17:03 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C5B9F42BC9; Tue, 22 Aug 2023 15:16:59 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 23A0042B8B for ; Tue, 22 Aug 2023 15:16:59 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 37M8ZlOK021211; Tue, 22 Aug 2023 06:16:58 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=d/NSypj8TqyeaTvf9OtDVWg6CHsGemQVs5wrW/cliSs=; b=Dnbg+EnoI0buRRO0pZk8YaVucnH2VEYlinQB3JozGOfi8LfJUYqG2S+iR1IpUFTK8ZfW hWgOHevhOcpqPXZQo5K/2iewneKEU5ZqZCelkR/A/2E+/FGtqmDyYRZy7Ab9wySbAWIl LINUIXYBmAwKydFpclVriY5lqpxvpZUdt9L39pLytDu9ehNdIP5eXOI0wuUnjISb+Kfj HsH6ydRo0+XaXAigKjyJvLb7HmhgIwE8RxZfkva3d5y5qFuEvsTgC7S6E9ebNIpQighS y7IGrgZCw+wahuw48dxwxS9XQF8Tmay0YDIPyCZqHfyRuTaNwiEx66OROEJgwrOMSyjQ dA== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3sjw8jgxnf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 22 Aug 2023 06:16:58 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Tue, 22 Aug 2023 06:16:56 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Tue, 22 Aug 2023 06:16:56 -0700 Received: from localhost.localdomain (unknown [10.28.36.177]) by maili.marvell.com (Postfix) with ESMTP id E21683F70A7; Tue, 22 Aug 2023 06:16:53 -0700 (PDT) From: Aakash Sasidharan To: Abhinandan Gujjar CC: , , , , Subject: [PATCH 2/3] test/event_crypto_adapter: skip unsupported test Date: Tue, 22 Aug 2023 18:46:48 +0530 Message-ID: <20230822131649.3509986-2-asasidharan@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230822131649.3509986-1-asasidharan@marvell.com> References: <20230822131649.3509986-1-asasidharan@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: tsGmy7I4BTCOeq8eVFITB3BLpC0-rzmN X-Proofpoint-GUID: tsGmy7I4BTCOeq8eVFITB3BLpC0-rzmN X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.601,FMLib:17.11.176.26 definitions=2023-08-22_13,2023-08-22_01,2023-05-22_02 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 Skip the test if rte_event_crypto_adapter_caps_get() returns -ENOTSUP. Signed-off-by: Aakash Sasidharan Acked-by: Anoob Joseph Acked-by: Abhinandan Gujjar --- app/test/test_event_crypto_adapter.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/app/test/test_event_crypto_adapter.c b/app/test/test_event_crypto_adapter.c index 24f66be69f..00b20fa443 100644 --- a/app/test/test_event_crypto_adapter.c +++ b/app/test/test_event_crypto_adapter.c @@ -284,6 +284,9 @@ test_crypto_adapter_params(void) }; err = rte_event_crypto_adapter_caps_get(evdev, TEST_CDEV_ID, &cap); + if (err == -ENOTSUP) + return TEST_SKIPPED; + TEST_ASSERT_SUCCESS(err, "Failed to get adapter capabilities\n"); if (cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_QP_EV_BIND) { @@ -1252,8 +1255,13 @@ test_crypto_adapter_create(void) .enqueue_depth = 8, .new_event_threshold = 1200, }; + uint32_t cap; int ret; + ret = rte_event_crypto_adapter_caps_get(evdev, TEST_CDEV_ID, &cap); + if (ret == -ENOTSUP) + return ret; + /* Create adapter with default port creation callback */ ret = rte_event_crypto_adapter_create(TEST_ADAPTER_ID, evdev, @@ -1274,6 +1282,9 @@ test_crypto_adapter_qp_add_del(void) int ret; ret = rte_event_crypto_adapter_caps_get(evdev, TEST_CDEV_ID, &cap); + if (ret == -ENOTSUP) + return TEST_SKIPPED; + TEST_ASSERT_SUCCESS(ret, "Failed to get adapter capabilities\n"); if (cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_QP_EV_BIND) { @@ -1309,6 +1320,9 @@ configure_event_crypto_adapter(enum rte_event_crypto_adapter_mode mode) int ret; ret = rte_event_crypto_adapter_caps_get(evdev, TEST_CDEV_ID, &cap); + if (ret == -ENOTSUP) + return ret; + TEST_ASSERT_SUCCESS(ret, "Failed to get adapter capabilities\n"); /* Skip mode and capability mismatch check for SW eventdev */ @@ -1475,6 +1489,9 @@ crypto_adapter_teardown(void) { int ret; + if (!crypto_adapter_setup_done) + return; + ret = rte_event_crypto_adapter_stop(TEST_ADAPTER_ID); if (ret < 0) RTE_LOG(ERR, USER1, "Failed to stop adapter!");