DPDK patches and discussions
 help / color / mirror / Atom feed
From: Aakash Sasidharan <asasidharan@marvell.com>
To: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
Cc: <jerinj@marvell.com>, <sthotton@marvell.com>,
	<anoobj@marvell.com>, <dev@dpdk.org>, <asasidharan@marvell.com>
Subject: [PATCH 2/3] test/event_crypto_adapter: skip unsupported test
Date: Tue, 22 Aug 2023 18:46:48 +0530	[thread overview]
Message-ID: <20230822131649.3509986-2-asasidharan@marvell.com> (raw)
In-Reply-To: <20230822131649.3509986-1-asasidharan@marvell.com>

Skip the test if rte_event_crypto_adapter_caps_get()
returns -ENOTSUP.

Signed-off-by: Aakash Sasidharan <asasidharan@marvell.com>
---
 app/test/test_event_crypto_adapter.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/app/test/test_event_crypto_adapter.c b/app/test/test_event_crypto_adapter.c
index 24f66be69f..00b20fa443 100644
--- a/app/test/test_event_crypto_adapter.c
+++ b/app/test/test_event_crypto_adapter.c
@@ -284,6 +284,9 @@ test_crypto_adapter_params(void)
 	};
 
 	err = rte_event_crypto_adapter_caps_get(evdev, TEST_CDEV_ID, &cap);
+	if (err == -ENOTSUP)
+		return TEST_SKIPPED;
+
 	TEST_ASSERT_SUCCESS(err, "Failed to get adapter capabilities\n");
 
 	if (cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_QP_EV_BIND) {
@@ -1252,8 +1255,13 @@ test_crypto_adapter_create(void)
 		.enqueue_depth = 8,
 		.new_event_threshold = 1200,
 	};
+	uint32_t cap;
 	int ret;
 
+	ret = rte_event_crypto_adapter_caps_get(evdev, TEST_CDEV_ID, &cap);
+	if (ret == -ENOTSUP)
+		return ret;
+
 	/* Create adapter with default port creation callback */
 	ret = rte_event_crypto_adapter_create(TEST_ADAPTER_ID,
 					      evdev,
@@ -1274,6 +1282,9 @@ test_crypto_adapter_qp_add_del(void)
 	int ret;
 
 	ret = rte_event_crypto_adapter_caps_get(evdev, TEST_CDEV_ID, &cap);
+	if (ret == -ENOTSUP)
+		return TEST_SKIPPED;
+
 	TEST_ASSERT_SUCCESS(ret, "Failed to get adapter capabilities\n");
 
 	if (cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_QP_EV_BIND) {
@@ -1309,6 +1320,9 @@ configure_event_crypto_adapter(enum rte_event_crypto_adapter_mode mode)
 	int ret;
 
 	ret = rte_event_crypto_adapter_caps_get(evdev, TEST_CDEV_ID, &cap);
+	if (ret == -ENOTSUP)
+		return ret;
+
 	TEST_ASSERT_SUCCESS(ret, "Failed to get adapter capabilities\n");
 
 	/* Skip mode and capability mismatch check for SW eventdev */
@@ -1475,6 +1489,9 @@ crypto_adapter_teardown(void)
 {
 	int ret;
 
+	if (!crypto_adapter_setup_done)
+		return;
+
 	ret = rte_event_crypto_adapter_stop(TEST_ADAPTER_ID);
 	if (ret < 0)
 		RTE_LOG(ERR, USER1, "Failed to stop adapter!");
-- 
2.25.1


  reply	other threads:[~2023-08-22 13:17 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-22 13:16 [PATCH 1/3] event/cnxk: fix return values for capability API Aakash Sasidharan
2023-08-22 13:16 ` Aakash Sasidharan [this message]
2023-08-23  4:01   ` [PATCH 2/3] test/event_crypto_adapter: skip unsupported test Anoob Joseph
2023-08-23  4:33   ` Gujjar, Abhinandan S
2023-08-23  7:48     ` Aakash Sasidharan
2023-08-23  8:16       ` Aakash Sasidharan
2023-08-23  8:37       ` Gujjar, Abhinandan S
2023-08-22 13:16 ` [PATCH 3/3] test/event_crypto_adapter: fix crypto null dev creation Aakash Sasidharan
2023-08-23  4:00   ` Anoob Joseph
2023-08-23  4:48   ` Gujjar, Abhinandan S
2023-08-23  5:47     ` Anoob Joseph
2023-08-23  6:17       ` Gujjar, Abhinandan S
2023-08-23 14:20         ` Jerin Jacob
2023-08-23  3:59 ` [PATCH 1/3] event/cnxk: fix return values for capability API Anoob Joseph

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=20230822131649.3509986-2-asasidharan@marvell.com \
    --to=asasidharan@marvell.com \
    --cc=abhinandan.gujjar@intel.com \
    --cc=anoobj@marvell.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=sthotton@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).