From patchwork Tue Oct 1 11:33:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 174835 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp8415632ill; Tue, 1 Oct 2019 04:36:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqy1nvph680FtLlc9yViVSDwvyo19IXy/UOaEF8DHb21PDPpWqjkasr0gATMmcyER3VrWbIS X-Received: by 2002:a17:906:1c05:: with SMTP id k5mr24001977ejg.286.1569929774928; Tue, 01 Oct 2019 04:36:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569929774; cv=none; d=google.com; s=arc-20160816; b=VdC1+uJbVpYwjk6U3BP/FTxqHKuLEIk4cQOyeJ+U+FVDqaFExEORJsmCSzpll20mRw t5swH2pTrnSnac1tLJ3cwomXtakLOx9NAN2mO5PhvI0vTCsAep05V1ONLkKs8jGp/860 VVqOF/GH+MR4nBYnoFhGVhgcxmLC8PN2aoAp/OSrfMQce7Bn7TR3085u723B57emk2tx VARp7Vsgh+qmkpzT1e3vrGoQlfiZixgdL5SSX0IvVAmCVWnAxdoXZt+3PzoTO7MwDGHW 8m4KYtR39ExPBoWU44Oghb2ODY6+xxNHiJwF6dydMNjS+xJedLjxMnIo7G4xZtrP7Pv9 gxzA== 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=8Gq/Lar+72HJf2SlIWzwNhQMviguUZJtL6KzOkJSUL4=; b=d4mJ1nAR437rENTiXi61rCmUGqIlLMYXkDDmiLYKIFWl5Zp0O1QvI+66bsO5aIo/qp PGppC7quSuQInC8TQPiCV93itGUXTHvaXIRPrd1oLQwAcALhsw3om303EraD8kwKyrGc gOubxgj9+VELZihGa6bjm8oS2M8xl3CPz0PrU9f1SE7yznkxPXKwDVe/ujHu5BvmZqw0 1mr/2o1eEmA2EizMPbcxubp7UTTG3QlelNHxK8vWD+cE1P7NbAFus6AAZuQUjvtZnCb/ gFrCvWBurYhbmOsRNhJK+oqLkOqvrfpXacTpQoFvW8pZbF9toK4WmZL1skC1W53IbMUZ DfiA== 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 d26si9382595eda.190.2019.10.01.04.36.14; Tue, 01 Oct 2019 04:36:14 -0700 (PDT) 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 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(+) -- 2.17.1 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");