DPDK patches and discussions
 help / color / mirror / Atom feed
From: Vikash Poddar <vikash.chandrax.poddar@intel.com>
To: Akhil Goyal <gakhil@marvell.com>, Fan Zhang <fanzhang.oss@gmail.com>
Cc: dev@dpdk.org, Vikash Poddar <vikash.chandrax.poddar@intel.com>,
	Ciara Power <ciara.power@intel.com>
Subject: [PATCH v7 3/3] test/crypto: skip asym test for insecure algorithms
Date: Fri, 16 Jun 2023 14:00:53 +0000	[thread overview]
Message-ID: <20230616140054.405194-3-vikash.chandrax.poddar@intel.com> (raw)
In-Reply-To: <20230616140054.405194-1-vikash.chandrax.poddar@intel.com>

Added support to skip the insecure asym algorithms

Signed-off-by: Vikash Poddar <vikash.chandrax.poddar@intel.com>
Acked-by: Ciara Power <ciara.power@intel.com>
---
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.


  parent reply	other threads:[~2023-06-16 14:01 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-20  9:58 [PATCH] crypto/qat: support to enable " Vikash Poddar
2023-05-23  9:14 ` [PATCH v2] " Vikash Poddar
2023-05-23 14:35   ` Ji, Kai
2023-05-25  7:56   ` [EXT] " Akhil Goyal
2023-05-25 16:10   ` [PATCH v3] " Vikash Poddar
2023-05-26  6:48     ` [PATCH v4] " Vikash Poddar
2023-05-29  6:32     ` [PATCH v5] " Vikash Poddar
2023-05-29 10:45       ` [PATCH v6] " Vikash Poddar
2023-06-08 13:14         ` Power, Ciara
2023-06-14 18:30         ` [EXT] " Akhil Goyal
2023-06-16 14:00         ` [PATCH v7 1/3] common/qat: fix qat_dev_cmd_param corruption Vikash Poddar
2023-06-16 14:00           ` [PATCH v7 2/3] crypto/qat: support to enable insecure algorithms Vikash Poddar
2023-06-16 14:00           ` Vikash Poddar [this message]
2023-06-20  7:33           ` [EXT] [PATCH v7 1/3] common/qat: fix qat_dev_cmd_param corruption Akhil Goyal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230616140054.405194-3-vikash.chandrax.poddar@intel.com \
    --to=vikash.chandrax.poddar@intel.com \
    --cc=ciara.power@intel.com \
    --cc=dev@dpdk.org \
    --cc=fanzhang.oss@gmail.com \
    --cc=gakhil@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).