From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 87B54A2EDB for ; Tue, 1 Oct 2019 13:36:14 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 99EAB5B3A; Tue, 1 Oct 2019 13:36:08 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id B0FAC91 for ; Tue, 1 Oct 2019 13:36:05 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 6E560200540; Tue, 1 Oct 2019 13:36:05 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 9FBD5200064; Tue, 1 Oct 2019 13:36:03 +0200 (CEST) Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.133.63]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id BA423402DA; Tue, 1 Oct 2019 19:36:00 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org Cc: jerinj@marvell.com, abhinandan.gujjar@intel.com Date: Tue, 1 Oct 2019 17:03:35 +0530 Message-Id: <20191001113339.21767-2-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191001113339.21767-1-hemant.agrawal@nxp.com> References: <20191001113339.21767-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH 2/6] test/event_crypto: fix check for HW support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" When HW is available but the mode mismatches, it is better to skip the test case. Fixes: cfe599b325e8 ("test/event_crypto: no service core when HW support available") Signed-off-by: Hemant Agrawal --- please squash if possible. app/test/test_event_crypto_adapter.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/app/test/test_event_crypto_adapter.c b/app/test/test_event_crypto_adapter.c index bf83a6357..d3d19b98e 100644 --- a/app/test/test_event_crypto_adapter.c +++ b/app/test/test_event_crypto_adapter.c @@ -302,6 +302,10 @@ test_sessionless_with_op_forward_mode(void) if (!(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD) && !(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_NEW)) map_adapter_service_core(); + else { + if (!(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD)) + return TEST_SKIPPED; + } TEST_ASSERT_SUCCESS(rte_event_crypto_adapter_start(TEST_ADAPTER_ID), "Failed to start event crypto adapter"); @@ -323,6 +327,10 @@ test_session_with_op_forward_mode(void) if (!(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD) && !(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_NEW)) map_adapter_service_core(); + else { + if (!(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD)) + return TEST_SKIPPED; + } TEST_ASSERT_SUCCESS(rte_event_crypto_adapter_start(TEST_ADAPTER_ID ), "Failed to start event crypto adapter"); @@ -458,6 +466,10 @@ test_sessionless_with_op_new_mode(void) if (!(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD) && !(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_NEW)) map_adapter_service_core(); + else { + if (!(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_NEW)) + return TEST_SKIPPED; + } /* start the event crypto adapter */ TEST_ASSERT_SUCCESS(rte_event_crypto_adapter_start(TEST_ADAPTER_ID), @@ -480,6 +492,10 @@ test_session_with_op_new_mode(void) if (!(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD) && !(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_NEW)) map_adapter_service_core(); + else { + if (!(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_NEW)) + return TEST_SKIPPED; + } TEST_ASSERT_SUCCESS(rte_event_crypto_adapter_start(TEST_ADAPTER_ID), "Failed to start event crypto adapter"); -- 2.17.1