From patchwork Thu Sep 16 12:51:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ganapati Kundapura X-Patchwork-Id: 99030 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 6DBE0A0C41; Thu, 16 Sep 2021 14:51:17 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 17322410EA; Thu, 16 Sep 2021 14:51:14 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 3A51D4003F for ; Thu, 16 Sep 2021 14:51:12 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10108"; a="308097929" X-IronPort-AV: E=Sophos;i="5.85,298,1624345200"; d="scan'208";a="308097929" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Sep 2021 05:51:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,298,1624345200"; d="scan'208";a="545691086" Received: from txandevlnx322.an.intel.com ([10.123.117.44]) by FMSMGA003.fm.intel.com with ESMTP; 16 Sep 2021 05:51:11 -0700 From: Ganapati Kundapura To: jay.jayatheerthan@intel.com, jerinjacobk@gmail.com Cc: dev@dpdk.org, ferruh.yigit@intel.com Date: Thu, 16 Sep 2021 07:51:07 -0500 Message-Id: <20210916125107.2024111-2-ganapati.kundapura@intel.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20210916125107.2024111-1-ganapati.kundapura@intel.com> References: <20210912155858.1397453-1-ganapati.kundapura@intel.com> <20210916125107.2024111-1-ganapati.kundapura@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v5 2/2] test/event: Add rx queue conf 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_conf_get() in rx adapter autotest Signed-off-by: Ganapati Kundapura Acked-by: Jay Jayatheerthan --- 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 */ } };