From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 1401D1B052 for ; Wed, 20 Dec 2017 12:07:26 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Dec 2017 03:07:25 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,431,1508828400"; d="scan'208";a="4344531" Received: from irsmsx109.ger.corp.intel.com ([163.33.3.23]) by orsmga006.jf.intel.com with ESMTP; 20 Dec 2017 03:07:24 -0800 Received: from irsmsx102.ger.corp.intel.com ([169.254.2.180]) by IRSMSX109.ger.corp.intel.com ([169.254.13.28]) with mapi id 14.03.0319.002; Wed, 20 Dec 2017 11:07:22 +0000 From: "Van Haaren, Harry" To: Pavan Nikhilesh , "jerin.jacob@caviumnetworks.com" CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v2 10/11] test: register eventdev selftest Thread-Index: AQHTdOywDELxalBkJEib/S9wIagAFaNK0KCQgAA4agCAARAhcA== Date: Wed, 20 Dec 2017 11:07:23 +0000 Message-ID: References: <20171212192713.17620-1-pbhagavatula@caviumnetworks.com> <20171214150138.25667-1-pbhagavatula@caviumnetworks.com> <20171214150138.25667-11-pbhagavatula@caviumnetworks.com> <20171219184447.3jsibeino6t5mjd7@Pavan-LT> In-Reply-To: <20171219184447.3jsibeino6t5mjd7@Pavan-LT> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiOTBkNTUxODYtZjlkYy00ZDkyLWJiNzYtNDk1ZTQwMDQyMjE3IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6IlZEQml6Z2w5QytseVRScUhjMlZnVU1lRmg5ZmNnVWxwdlpLd3NRc3U4Wjg9In0= x-ctpclassification: CTP_IC dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2 10/11] test: register eventdev selftest X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Dec 2017 11:07:27 -0000 > From: Pavan Nikhilesh [mailto:pbhagavatula@caviumnetworks.com] > Sent: Tuesday, December 19, 2017 6:45 PM > To: Van Haaren, Harry ; > jerin.jacob@caviumnetworks.com > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH v2 10/11] test: register eventdev selftest >=20 > Hi Harry, >=20 > Thanks for the review, comments below. >=20 > On Tue, Dec 19, 2017 at 03:27:25PM +0000, Van Haaren, Harry wrote: > > > From: Pavan Nikhilesh [mailto:pbhagavatula@caviumnetworks.com] > > > Sent: Thursday, December 14, 2017 3:02 PM > > > To: jerin.jacob@caviumnetworks.com; santosh.shukla@caviumnetworks.com= ; > > > Richardson, Bruce ; Van Haaren, Harry > > > ; Eads, Gage ; > > > hemant.agrawal@nxp.com; nipun.gupta@nxp.com; Ma, Liang J > > > > > > > [Side note: we shouldn't put everybody on CC all the time..] > > > > > Cc: dev@dpdk.org; Pavan Nikhilesh > > > Subject: [dpdk-dev] [PATCH v2 10/11] test: register eventdev selftest > > > > > > Signed-off-by: Pavan Nikhilesh > > > > > > > diff --git a/test/test/test_eventdev.c b/test/test/test_eventdev.c > > > index 1ed2a1ddd..b86efab01 100644 > > > --- a/test/test/test_eventdev.c > > > +++ b/test/test/test_eventdev.c > > > @@ -1009,4 +1009,11 @@ test_eventdev_common(void) > > > return unit_test_suite_runner(&eventdev_common_testsuite); > > > } > > > > > > +static int > > > +test_eventdev_selftest(void) > > > +{ > > > + return rte_event_dev_selftest(TEST_DEV_ID); > > > +} > > > + > > > REGISTER_TEST_COMMAND(eventdev_common_autotest, test_eventdev_common= ); > > > +REGISTER_TEST_COMMAND(eventdev_selftest, test_eventdev_selftest); > > > > > > Currently when running the test app, we don't pass any arguments. Runni= ng > the "eventdev_sw_autotest" command, it will create the required event_sw0 > PMD vdev, and launch the tests then. > > > > Given the selftest is PMD agnostic, does it makes sense to have a singl= e > string "sw" or "octeontx" to run the tests against? Right now it requires > that we pass ./app/test --vdev event_sw0 which I think is a burden, > particularly when automating this with the meson test infrastructure down > the line. > > > > Summary; Please add a string parameter that indicates the PMD to run th= e > self-test on. > > >=20 > We can't pass extra parameter while running test (it will only accept tes= t > name). > So, I will register pmd specific test test_eventdev_sw/octeontx which wil= l > create the eventdev and call the selftest API. Sure that works for me. Its probably best to break out the create/run into a helper function, just to save code-duplication: int eventdev_selftest_impl(const char *pmd, const char *opts) { int id =3D rte_vdev_create(pmd, opts); return rte_eventdev_selftest(id); } int eventdev_selftest_sw() { eventdev_selftest_impl("event_sw", ""); } int eventdev_selftest_octeontx() { eventdev_selftest_impl("event_octeontx", ""); } > Also, I have mistakenly changed the name from event_sw0 to event_sw do yo= u > want > me to revert it? or retain the change. I think it actually makes more sense to use "event_sw" over "event_sw0". The PMD name is constant, while the 0 is an arbitrary instance name. So I think we should keep the change.