From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 02E3942CD6; Fri, 16 Jun 2023 16:01:43 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EACA942D0B; Fri, 16 Jun 2023 16:01:42 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id EED3642D0B for ; Fri, 16 Jun 2023 16:01:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1686924102; x=1718460102; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Qy8V/k+5kJ2t8PFHCYb6lpohemim+CkvadShs6R3M+Q=; b=edmpCkHEIaNql9lzY2R4V4pi8fe4nbluJJ5iuvVh4rmX2OmH5P1ULVPS 53OczmTeggxvRhCvmsHDKPJSFRS7GDZLFAW3U97blvPukqjY3/uLkLrxP WOF/TqCN6B7PjWmq87E0b/LHJwvIrgJ6wmhDPaJZbedEIPHpKkcNlZg2A drQClkFVAMRx+Mlr3dIRd3fmV7b/OnlwkaYycqWh00VLtHmgD6h8pwNdU sB3LH23HrH4cLjZJNXktBzCKNFeTbBqu51j+JhIaZ+9WCOExwz7YhgR6h cPqKE5bJhDE6D+lbEqaQ1cRd+oS7ylI4z9mqIwpTaOyetfQmQm2T6hpzQ g==; X-IronPort-AV: E=McAfee;i="6600,9927,10742"; a="362634484" X-IronPort-AV: E=Sophos;i="6.00,247,1681196400"; d="scan'208";a="362634484" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jun 2023 07:01:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10742"; a="712880295" X-IronPort-AV: E=Sophos;i="6.00,247,1681196400"; d="scan'208";a="712880295" Received: from silpixa00400355.ir.intel.com (HELO silpixa00400355.ger.corp.intel.com.) ([10.237.222.80]) by orsmga002.jf.intel.com with ESMTP; 16 Jun 2023 07:01:24 -0700 From: Vikash Poddar To: Akhil Goyal , Fan Zhang Cc: dev@dpdk.org, Vikash Poddar , Ciara Power Subject: [PATCH v7 3/3] test/crypto: skip asym test for insecure algorithms Date: Fri, 16 Jun 2023 14:00:53 +0000 Message-Id: <20230616140054.405194-3-vikash.chandrax.poddar@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230616140054.405194-1-vikash.chandrax.poddar@intel.com> References: <20230529104529.2055773-1-vikash.chandrax.poddar@intel.com> <20230616140054.405194-1-vikash.chandrax.poddar@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 Added support to skip the insecure asym algorithms Signed-off-by: Vikash Poddar Acked-by: Ciara Power --- v7: splitted from "support to enable insecure algorithms" patch --- app/test/test_cryptodev_asym.c | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/app/test/test_cryptodev_asym.c b/app/test/test_cryptodev_asym.c index e884556a2d..15a1f3d638 100644 --- a/app/test/test_cryptodev_asym.c +++ b/app/test/test_cryptodev_asym.c @@ -454,11 +454,14 @@ test_cryptodev_asym_op(struct crypto_testsuite_params_asym *ts_params, ret = rte_cryptodev_asym_session_create(dev_id, &xform_tc, ts_params->session_mpool, &sess); if (ret < 0) { - snprintf(test_msg, ASYM_TEST_MSG_LEN, - "line %u " - "FAILED: %s", __LINE__, - "Session creation failed"); status = (ret == -ENOTSUP) ? TEST_SKIPPED : TEST_FAILED; + if (status == TEST_SKIPPED) + snprintf(test_msg, ASYM_TEST_MSG_LEN, "SKIPPED"); + else + snprintf(test_msg, ASYM_TEST_MSG_LEN, + "line %u " + "FAILED: %s", __LINE__, + "Session creation failed"); goto error_exit; } @@ -490,6 +493,11 @@ test_cryptodev_asym_op(struct crypto_testsuite_params_asym *ts_params, } if (test_cryptodev_asym_ver(op, &xform_tc, data_tc, result_op) != TEST_SUCCESS) { + if (result_op->status == RTE_CRYPTO_OP_STATUS_INVALID_ARGS) { + snprintf(test_msg, ASYM_TEST_MSG_LEN, "SESSIONLESS SKIPPED"); + status = TEST_SKIPPED; + goto error_exit; + } snprintf(test_msg, ASYM_TEST_MSG_LEN, "line %u FAILED: %s", __LINE__, "Verification failed "); @@ -620,13 +628,19 @@ test_one_by_one(void) /* Go through all test cases */ test_index = 0; for (i = 0; i < test_vector.size; i++) { - if (test_one_case(test_vector.address[i], 0) != TEST_SUCCESS) + status = test_one_case(test_vector.address[i], 0); + if (status == TEST_SUCCESS || status == TEST_SKIPPED) + status = TEST_SUCCESS; + else status = TEST_FAILED; } + if (sessionless) { for (i = 0; i < test_vector.size; i++) { - if (test_one_case(test_vector.address[i], 1) - != TEST_SUCCESS) + status = test_one_case(test_vector.address[i], 1); + if (status == TEST_SUCCESS || status == TEST_SKIPPED) + status = TEST_SUCCESS; + else status = TEST_FAILED; } } -- 2.25.1 -------------------------------------------------------------- Intel Research and Development Ireland Limited Registered in Ireland Registered Office: Collinstown Industrial Park, Leixlip, County Kildare Registered Number: 308263 This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.