[dpdk-dev] [PATCH v3 04/11] event/octeontx: modify octeontx eventdev test
Pavan Nikhilesh
pbhagavatula at caviumnetworks.com
Wed Dec 27 06:18:46 CET 2017
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 <pbhagavatula at caviumnetworks.com>
> > ---
> > drivers/event/octeontx/octeontx_evdev_selftest.c | 427 +++++++++++++----------
> > 1 file changed, 234 insertions(+), 193 deletions(-)
> >
<snip>
> >
> > 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
>
More information about the dev
mailing list