DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ganapati Kundapura <ganapati.kundapura@intel.com>
To: jay.jayatheerthan@intel.com, jerinjacobk@gmail.com
Cc: dev@dpdk.org, ferruh.yigit@intel.com
Subject: [dpdk-dev] [PATCH v5 2/2] test/event: Add rx queue conf get test in rx adapter autotest
Date: Thu, 16 Sep 2021 07:46:45 -0500	[thread overview]
Message-ID: <20210916124645.2021699-2-ganapati.kundapura@intel.com> (raw)
In-Reply-To: <20210916124645.2021699-1-ganapati.kundapura@intel.com>

Add unit tests for rte_event_eth_rx_adapter_queue_conf_get()
in rx adapter autotest

Signed-off-by: Ganapati Kundapura <ganapati.kundapura@intel.com>
---
 app/test/test_event_eth_rx_adapter.c | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/app/test/test_event_eth_rx_adapter.c b/app/test/test_event_eth_rx_adapter.c
index add4d8a..13664a3 100644
--- a/app/test/test_event_eth_rx_adapter.c
+++ b/app/test/test_event_eth_rx_adapter.c
@@ -747,6 +747,27 @@ adapter_stats(void)
 	return TEST_SUCCESS;
 }
 
+static int
+adapter_queue_conf(void)
+{
+	int err;
+	struct rte_event_eth_rx_adapter_queue_conf queue_conf;
+
+	err = rte_event_eth_rx_adapter_queue_conf_get(TEST_INST_ID, TEST_DEV_ID,
+						      0, &queue_conf);
+	TEST_ASSERT(err == 0, "Expected 0 got %d", err);
+
+	err = rte_event_eth_rx_adapter_queue_conf_get(TEST_INST_ID, TEST_DEV_ID,
+						      -1, &queue_conf);
+	TEST_ASSERT(err == -EINVAL, "Expected -EINVAL got %d", err);
+
+	err = rte_event_eth_rx_adapter_queue_conf_get(TEST_INST_ID, TEST_DEV_ID,
+						      0, NULL);
+	TEST_ASSERT(err == -EINVAL, "Expected -EINVAL got %d", err);
+
+	return TEST_SUCCESS;
+}
+
 static struct unit_test_suite event_eth_rx_tests = {
 	.suite_name = "rx event eth adapter test suite",
 	.setup = testsuite_setup,
@@ -759,6 +780,7 @@ static struct unit_test_suite event_eth_rx_tests = {
 					adapter_multi_eth_add_del),
 		TEST_CASE_ST(adapter_create, adapter_free, adapter_start_stop),
 		TEST_CASE_ST(adapter_create, adapter_free, adapter_stats),
+		TEST_CASE_ST(adapter_create, adapter_free, adapter_queue_conf),
 		TEST_CASES_END() /**< NULL terminate unit test array */
 	}
 };
-- 
2.6.4


  reply	other threads:[~2021-09-16 12:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-16 12:46 [dpdk-dev] [PATCH v5 1/2] eventdev: add rx queue conf get api Ganapati Kundapura
2021-09-16 12:46 ` Ganapati Kundapura [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-09-12 15:58 [dpdk-dev] [PATCH v4 " Ganapati Kundapura
2021-09-16 11:56 ` [dpdk-dev] [PATCH v5 " Ganapati Kundapura
2021-09-16 11:56   ` [dpdk-dev] [PATCH v5 2/2] test/event: Add rx queue conf get test in rx adapter autotest Ganapati Kundapura
2021-09-16 12:51 ` [dpdk-dev] [PATCH v5 1/2] eventdev: add rx queue conf get api Ganapati Kundapura
2021-09-16 12:51   ` [dpdk-dev] [PATCH v5 2/2] test/event: Add rx queue conf get test in rx adapter autotest Ganapati Kundapura
2021-09-28  9:35     ` Jayatheerthan, Jay

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=20210916124645.2021699-2-ganapati.kundapura@intel.com \
    --to=ganapati.kundapura@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=jay.jayatheerthan@intel.com \
    --cc=jerinjacobk@gmail.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).