From patchwork Thu Nov 7 09:01:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 178793 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp723594ilf; Thu, 7 Nov 2019 01:04:46 -0800 (PST) X-Google-Smtp-Source: APXvYqwC2SyJJyX+xoGwIApBXTjCY72ZLNz3eV66ZBXn7oq3UmsQbm+oMChiup1cmLxSLsNhWUhw X-Received: by 2002:a17:906:2e5a:: with SMTP id r26mr1939653eji.283.1573117486193; Thu, 07 Nov 2019 01:04:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573117486; cv=none; d=google.com; s=arc-20160816; b=t/6J9rv+Wf55Bd82xmKDBQQs2KPJJ64/n2yw9JR2UuyhuVMV7fHcurKKl4s1GsU0Hj YgdhlTrYutQFy/CiI257kWBXhH4CXwYCAL1KNIL1d+mrPi64nzKb/cxnaaiPJUG1/bxF a6E4uQ10Dx9na+JwpkvMaMhENETISVfRO5i/zh3XFQ8aQE82UVIANznZJcHiHZ74vSCK ceSKbKCPao5bhnn/kNPR+UTYfoHXRJf5v85HmBFV5IlVS/z/gNoklPgteXwpSmkuskyz lnRiL8ghhfHKHuNYwhmaKgGg/l7VMrQN9d/LRhv6i6S+/sqAzaKlPSfceoc5mlneEZ89 dk7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:cc:to:from; bh=SXk/T0UDmbpu26XVsebwHgDG1iwde7JAnhd9gsspwbQ=; b=Aleq0zooagptFIiGk9AHUvg0KbtfkT3/7FuK7E1b9EyY6hdmUJ7gTvnzcvW7ogcCZn lt3p7TmIpmzcOv7rFgVircM32mVj97Obsn+3vxh7+wGphw0kQ0q52KCenGL08YiOAqzN z2I+RcC0bJaVu0Xk5EwOK7Z6RAYz6izydXqZaeVWVeokluCa/iOHSUXuweI+tGcMk3qW RQAQ94s8AawspENbpoPoWOszg1i8V2UMRys4psxkcen2NBIavpctQUZVtqVbIc5uxqYk gIvwUfWFjuB+/pmmFSRMfXz42kHVu9556ZHCrsbPu0PTURfZq50w3viul7eP+7EmSu3R nQXw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id t17si1012602ejj.144.2019.11.07.01.04.46; Thu, 07 Nov 2019 01:04:46 -0800 (PST) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 49D771E973; Thu, 7 Nov 2019 10:04:36 +0100 (CET) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id 704651E937 for ; Thu, 7 Nov 2019 10:04:32 +0100 (CET) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 31B83200719; Thu, 7 Nov 2019 10:04:32 +0100 (CET) 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 63B392007E2; Thu, 7 Nov 2019 10:04:30 +0100 (CET) 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 B7CDB402B4; Thu, 7 Nov 2019 17:04:27 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org Cc: jerinjacobk@gmail.com, abhinandan.gujjar@intel.com Date: Thu, 7 Nov 2019 14:31:21 +0530 Message-Id: <20191107090121.3246-3-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191107090121.3246-1-hemant.agrawal@nxp.com> References: <20191001113339.21767-1-hemant.agrawal@nxp.com> <20191107090121.3246-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v2 3/3] 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 --- app/test/test_event_crypto_adapter.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) -- 2.17.1 diff --git a/app/test/test_event_crypto_adapter.c b/app/test/test_event_crypto_adapter.c index 6b47a5c01..8d42462d8 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");