From patchwork Wed May 20 15:26:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akhil Goyal X-Patchwork-Id: 70484 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2B000A0093; Wed, 20 May 2020 17:29:00 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8C97D1C246; Wed, 20 May 2020 17:28:59 +0200 (CEST) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by dpdk.org (Postfix) with ESMTP id 408711C038 for ; Wed, 20 May 2020 17:28:58 +0200 (CEST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 84ECA1A03CC; Wed, 20 May 2020 17:28:57 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 4A9981A03B7; Wed, 20 May 2020 17:28:52 +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 07FA740299; Wed, 20 May 2020 23:28:44 +0800 (SGT) From: akhil.goyal@nxp.com To: dev@dpdk.org Cc: Ruifeng.Wang@arm.com, declan.doherty@intel.com, asomalap@amd.com, anoobj@marvell.com, roy.fan.zhang@intel.com, fiona.trahe@intel.com, rnagadheeraj@marvell.com, adwivedi@marvell.com, jianjay.zhou@huawei.com, pablo.de.lara.guarch@intel.com, adamx.dybkowski@intel.com, Akhil Goyal Date: Wed, 20 May 2020 20:56:12 +0530 Message-Id: <20200520152612.2920-1-akhil.goyal@nxp.com> X-Mailer: git-send-email 2.17.1 X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH] test/crypto: skip unsupported cases 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" From: Akhil Goyal blockcipher cases are either returning TEST_SUCCESS or TEST_FAILED as status, but the test may not be supported by the PMD which is also a success case for the PMD. Hence checking for status == TEST_FAILED for setting the overall status as failed. Signed-off-by: Akhil Goyal --- app/test/test_cryptodev_blockcipher.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/app/test/test_cryptodev_blockcipher.c b/app/test/test_cryptodev_blockcipher.c index 642b549717..d033350659 100644 --- a/app/test/test_cryptodev_blockcipher.c +++ b/app/test/test_cryptodev_blockcipher.c @@ -107,7 +107,7 @@ test_blockcipher_one_case(const struct blockcipher_test_case *t, "Test Skipped.\n"); snprintf(test_msg, BLOCKCIPHER_TEST_MSG_LEN, "SKIPPED"); - return 0; + return TEST_SKIPPED; } } if (t->feature_mask & BLOCKCIPHER_TEST_FEATURE_SG) { @@ -120,7 +120,7 @@ test_blockcipher_one_case(const struct blockcipher_test_case *t, "Test Skipped.\n"); snprintf(test_msg, BLOCKCIPHER_TEST_MSG_LEN, "SKIPPED"); - return 0; + return TEST_SKIPPED; } } else { if (!(feat_flags & RTE_CRYPTODEV_FF_IN_PLACE_SGL)) { @@ -129,7 +129,7 @@ test_blockcipher_one_case(const struct blockcipher_test_case *t, "Test Skipped.\n"); snprintf(test_msg, BLOCKCIPHER_TEST_MSG_LEN, "SKIPPED"); - return 0; + return TEST_SKIPPED; } } @@ -146,7 +146,7 @@ test_blockcipher_one_case(const struct blockcipher_test_case *t, "Test Skipped.\n"); snprintf(test_msg, BLOCKCIPHER_TEST_MSG_LEN, "SKIPPED"); - return 0; + return TEST_SKIPPED; } } @@ -163,7 +163,7 @@ test_blockcipher_one_case(const struct blockcipher_test_case *t, "Device does not support this algorithm." "Test Skipped.\n"); snprintf(test_msg, BLOCKCIPHER_TEST_MSG_LEN, "SKIPPED"); - return 0; + return TEST_SKIPPED; } /* preparing data */ @@ -435,6 +435,7 @@ test_blockcipher_one_case(const struct blockcipher_test_case *t, init_xform, sess_priv_mpool); if (status == -ENOTSUP) { snprintf(test_msg, BLOCKCIPHER_TEST_MSG_LEN, "UNSUPPORTED"); + status = TEST_SKIPPED; goto error_exit; } if (!sess || status < 0) { @@ -780,7 +781,7 @@ test_blockcipher_all_tests(struct rte_mempool *mbuf_pool, printf(" %u) TestCase %s %s\n", test_index ++, tc->test_descr, test_msg); - if (status != TEST_SUCCESS) { + if (status == TEST_FAILED) { if (overall_status == TEST_SUCCESS) overall_status = status;