From patchwork Tue Sep 7 06:45:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ganapati Kundapura X-Patchwork-Id: 98111 X-Patchwork-Delegate: jerinj@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E51D5A0C41; Tue, 7 Sep 2021 08:45:28 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D6A0241104; Tue, 7 Sep 2021 08:45:26 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 6BAB340DF8 for ; Tue, 7 Sep 2021 08:45:23 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10099"; a="220143245" X-IronPort-AV: E=Sophos;i="5.85,274,1624345200"; d="scan'208";a="220143245" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Sep 2021 23:45:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,274,1624345200"; d="scan'208";a="537799160" Received: from txandevlnx322.an.intel.com ([10.123.117.44]) by FMSMGA003.fm.intel.com with ESMTP; 06 Sep 2021 23:45:22 -0700 From: Ganapati Kundapura To: jay.jayatheerthan@intel.com, jerinjacobk@gmail.com Cc: dev@dpdk.org Date: Tue, 7 Sep 2021 01:45:17 -0500 Message-Id: <20210907064518.376652-2-ganapati.kundapura@intel.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20210907064518.376652-1-ganapati.kundapura@intel.com> References: <20210907053642.4093569-1-ganapati.kundapura@intel.com> <20210907064518.376652-1-ganapati.kundapura@intel.com> MIME-Version: 1.0 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 */ } };