From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavan Nikhilesh Subject: Re: [PATCH v3 04/11] event/octeontx: modify octeontx eventdev test Date: Wed, 27 Dec 2017 10:48:46 +0530 Message-ID: <20171227051845.dxmrfk7mszta4epb@Pavan-LT> References: <20171212192713.17620-1-pbhagavatula@caviumnetworks.com> <20171225191738.17151-1-pbhagavatula@caviumnetworks.com> <20171225191738.17151-4-pbhagavatula@caviumnetworks.com> <20171226141156.GB15284@neilslaptop.think-freely.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev@dpdk.org To: Neil Horman , jerin.jacob@caviumnetworks.com, harry.van.haaren@intel.com, gage.eads@intel.com, liang.j.ma@intel.com Return-path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0074.outbound.protection.outlook.com [104.47.42.74]) by dpdk.org (Postfix) with ESMTP id C128B1B2A7 for ; Wed, 27 Dec 2017 06:19:09 +0100 (CET) Content-Disposition: inline In-Reply-To: <20171226141156.GB15284@neilslaptop.think-freely.org> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Neil, On Tue, Dec 26, 2017 at 09:11:56AM -0500, Neil Horman wrote: > On Tue, Dec 26, 2017 at 12:47:31AM +0530, Pavan Nikhilesh wrote: > > Modify test_eventdev_octeontx to be standalone selftest independent of > > test framework. > > > > Signed-off-by: Pavan Nikhilesh > > --- > > drivers/event/octeontx/octeontx_evdev_selftest.c | 427 +++++++++++++---------- > > 1 file changed, 234 insertions(+), 193 deletions(-) > > > > > > static void > > @@ -177,31 +187,34 @@ _eventdev_setup(int mode) > > 512, /* Use very small mbufs */ > > rte_socket_id()); > > if (!eventdev_test_mempool) { > > - printf("ERROR creating mempool\n"); > > - return TEST_FAILED; > > + ssovf_log_dbg("ERROR creating mempool"); > > + return -1; > > } > > > > ret = rte_event_dev_info_get(evdev, &info); > > - TEST_ASSERT_SUCCESS(ret, "Failed to get event dev info"); > > - TEST_ASSERT(info.max_num_events >= (int32_t)MAX_EVENTS, > > - "max_num_events=%d < max_events=%d", > > - info.max_num_events, MAX_EVENTS); > > + RTE_TEST_ASSERT_SUCCESS(ret, "Failed to get event dev info"); > > + if (!(info.max_num_events >= (int32_t)MAX_EVENTS)) { > > + ssovf_log_dbg("ERROR max_num_events=%d < max_events=%d", > > + info.max_num_events, MAX_EVENTS); > > + return -1; > > + } > > > I'm not sure how any of this is particularly adventageous. You've replaced two > ASSERTION macros with one and an additional conditional. The assert macros are > just a flexible as their were previously (which is to say, not overly so). So > i'm not sure what the advantage of renaming them is. This is an unintended artifact while deciding between removing macros and moving them to rte_test, I will clean it up in the next version. Thanks for pointing it out. Pavan > > Neil >