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 44F50A0C41; Tue, 7 Sep 2021 08:40:02 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AB80141104; Tue, 7 Sep 2021 08:40:01 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 24A9740DF8 for ; Tue, 7 Sep 2021 08:39:59 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10099"; a="218251581" X-IronPort-AV: E=Sophos;i="5.85,274,1624345200"; d="scan'208";a="218251581" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Sep 2021 23:39:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,274,1624345200"; d="scan'208";a="537797474" Received: from txandevlnx322.an.intel.com ([10.123.117.44]) by FMSMGA003.fm.intel.com with ESMTP; 06 Sep 2021 23:39:58 -0700 From: Ganapati Kundapura To: jay.jayatheerthan@intel.com, jerinjacobk@gmail.com Cc: dev@dpdk.org Date: Tue, 7 Sep 2021 01:39:45 -0500 Message-Id: <20210907063946.374769-2-ganapati.kundapura@intel.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20210907063946.374769-1-ganapati.kundapura@intel.com> References: <20210907063946.374769-1-ganapati.kundapura@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v3 2/3] test/event: Add rx queue info get test in rx adapter autotest 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 Sender: "dev" Add unit tests for rte_event_eth_rx_adapter_queue_info_get() in rx adapter autotest Signed-off-by: Ganapati Kundapura --- 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