From: Ganapati Kundapura <ganapati.kundapura@intel.com>
To: jay.jayatheerthan@intel.com, jerinjacobk@gmail.com
Cc: dev@dpdk.org
Subject: [dpdk-dev] [PATCH v3 2/3] test/event: Add rx queue info get test in rx adapter autotest
Date: Tue, 7 Sep 2021 01:39:45 -0500 [thread overview]
Message-ID: <20210907063946.374769-2-ganapati.kundapura@intel.com> (raw)
In-Reply-To: <20210907063946.374769-1-ganapati.kundapura@intel.com>
Add unit tests for rte_event_eth_rx_adapter_queue_info_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 9198767..c642e1b 100644
--- a/app/test/test_event_eth_rx_adapter.c
+++ b/app/test/test_event_eth_rx_adapter.c
@@ -750,6 +750,27 @@ adapter_stats(void)
return TEST_SUCCESS;
}
+static int
+adapter_queue_info(void)
+{
+ int err;
+ struct rte_event_eth_rx_adapter_queue_info queue_info;
+
+ err = rte_event_eth_rx_adapter_queue_info_get(TEST_INST_ID, TEST_DEV_ID,
+ 0, &queue_info);
+ TEST_ASSERT(err == 0, "Expected 0 got %d", err);
+
+ err = rte_event_eth_rx_adapter_queue_info_get(TEST_INST_ID, TEST_DEV_ID,
+ -1, &queue_info);
+ TEST_ASSERT(err == -EINVAL, "Expected -EINVAL got %d", err);
+
+ err = rte_event_eth_rx_adapter_queue_info_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,
@@ -762,6 +783,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_info),
TEST_CASES_END() /**< NULL terminate unit test array */
}
};
--
2.6.4
next prev parent reply other threads:[~2021-09-07 6:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-07 6:39 [dpdk-dev] [PATCH v3 1/3] eventdev: add rx queue info get api Ganapati Kundapura
2021-09-07 6:39 ` Ganapati Kundapura [this message]
2021-09-07 6:39 ` [dpdk-dev] [PATCH v3 3/3] doc: add rx queue get api detail in rx adapter guide Ganapati Kundapura
-- strict thread matches above, loose matches on Subject: below --
2021-09-07 5:36 [dpdk-dev] [PATCH] eventdev: add rx queue info get api Ganapati Kundapura
2021-09-07 6:45 ` [dpdk-dev] [PATCH v3 1/3] " Ganapati Kundapura
2021-09-07 6:45 ` [dpdk-dev] [PATCH v3 2/3] test/event: Add rx queue info get test in rx adapter autotest Ganapati Kundapura
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=20210907063946.374769-2-ganapati.kundapura@intel.com \
--to=ganapati.kundapura@intel.com \
--cc=dev@dpdk.org \
--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).