From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0050.outbound.protection.outlook.com [104.47.32.50]) by dpdk.org (Postfix) with ESMTP id 253EE9FE for ; Fri, 15 Dec 2017 12:33:01 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=wBIT3iKPeo97yCBYvXjlp5o98vLQXJ+wSIbS7kkLYXk=; b=aY6sLMoTG+uAqW3aSIlgpg9j3mfnhTc8ou/k4sxp3B/phELYBfQJYUT9Rs8H88xDQamogy6vJIm+33inHherwGcI1+e632VB7K5iKP0T4bU880VfqVrlsiWcFLm/vFFEogzLzDMwREYzjPQ/h7vfbfjPqsFhMxu++4CW1v7ytj8= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from Pavan-LT (111.93.218.67) by CY4PR07MB3461.namprd07.prod.outlook.com (10.171.252.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.323.15; Fri, 15 Dec 2017 11:32:55 +0000 Date: Fri, 15 Dec 2017 17:02:42 +0530 From: Pavan Nikhilesh Bhagavatula To: "Ananyev, Konstantin" , "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" Cc: dev@dpdk.org Message-ID: <20171215113241.donmary6yesyssle@Pavan-LT> References: <20171212192713.17620-1-pbhagavatula@caviumnetworks.com> <20171214150138.25667-1-pbhagavatula@caviumnetworks.com> <20171214150138.25667-2-pbhagavatula@caviumnetworks.com> <2601191342CEEE43887BDE71AB9772585FAC9A88@irsmsx105.ger.corp.intel.com> <20171215090445.huivudbztoxknb3j@Pavan-LT> <2601191342CEEE43887BDE71AB9772585FAC9DFF@irsmsx105.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2601191342CEEE43887BDE71AB9772585FAC9DFF@irsmsx105.ger.corp.intel.com> User-Agent: NeoMutt/20170609 (1.8.3) X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: YQXPR0101CA0061.CANPRD01.PROD.OUTLOOK.COM (52.132.74.38) To CY4PR07MB3461.namprd07.prod.outlook.com (10.171.252.142) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 60f31e95-2199-4870-4940-08d543af982f X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603307); SRVR:CY4PR07MB3461; X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB3461; 3:jOgIYV664OY6hdEnZY52sQ6npQOCD9HWmLYGmJxVyPV0fuFPGR1dKJU2qLaRHbVRptVjUfI778I5Xxxs2IMepvIeBiLreEtguk+8TcTax6RnIB+MyQ/D6lIszn90ReMFEfoDK3IU1bP/kf2uoHIlQom1xzOGdk6Lpfzxe1T94Lxbgw3Hq9HLVfhc0DCWsZiu7e8Wc9Ta/ecT/tFnhef6JBfXW8bl1ZEkCrhXs7Poj5DbHD+fMYa6K4aovpYjq+OS; 25:2MdXTMvcUDoLurt9bGLeOOQWsQK/FyZNNVz7LliWZnqL+ZmsZwX9NbKliexu0ql9c9nTwfC1plhrqbSEsWUeEjEsubxFyKL4Dntn1PJm1mxCdxMjMuyAB25vpw3mpYW7CJjs8sW4Wl3DWxlEJnKxXzSbEUqlg4XvaiZJUKF+tCa/j6hWLFWVX+J8AKXi9ugF2kiKpUyfDq0t3QvtJhG5tVQ4hiK1thJY+eSL+Tojp5zXPoEMHfGIdtoSjQZ5GPRj053wnZGjOBB9LVK6yPkl6/aHGEmHveMq4+zbPxCgkzmSWAnDdYM7F3212aS5P9J/PAhRhzDlkG5O5UmZSKBPzg==; 31:YnqmDUod43oEKqVGTxim/XsESkBhSpqSoF3RK8HgN0+cQlVzI7bAuvyWW9Cc3AwnCl8WudLQzNWtRBgndQBkjbk3MLhwCjD5R1FPTH4IeX9y+BcHVa2t8lZIQ9HLv3XnCXo9WAvwjCXHMbaJB1c0vV/Rq8MoQIXNKUa42/nUTdQX11s0j79f/FJApEx73G8tNeY1HdfUgazzdY3YYBZRMXox2hEcZqgKdpX0wbK69+E= X-MS-TrafficTypeDiagnostic: CY4PR07MB3461: X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB3461; 20:nlhZL0hzX2v93gdRgPi+dzYevF2cczw7KpGVBWsJmIthR3eQ0QBCZdTa15N4HogMrR/eGDIKx+c57IU2yRhOFW9JStH8Bhqjy51mXrQZeG2USL0pM1yLAYBtQptW8tfoMLDaMcbfM+p+qiPzuUyOHcQQnYAGeNy9Z9Yjse9hJ/H1tHaP6XrtIurmQYNRJqezjEHfstE8Su6m1vNm8ifcx1KGWeztUvWFK7jVZu1LCavtFkuiUb8aaa/9HvBLaGFbMcYbSq8ROLD+jdMpho5gUbHvOlgXvtmrELPYXdvuj0WhbZFcmwWBsp9u1DF8joeF7GQ8kzwSft9FYv5iaPdJqpV5Gilw0Kgqw0DGdjOyGYr1EhZVzj3OqY8BqeavMSAJot59G6K+BgwHWPrFFQy1SDFkSqQTPR4gVNWlS3XzbjmTUXVO9eAwBmeL5VEVLMTTdwfY/Wn6b1npPiMcnKWlhIRN4N6wq/BragSnrdKVi+uppvi13pnVZb1xV5+8brplIEfEs1HaM9C2BfzD/gjdVi8TmFSN3H1jMXxbo54jgYscJ10+IQbb1exTJnUbFw9Owtr0m4qW9DaXA6U4WRhZb6O6O+rw/7N5MMyBlmVNmaU= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(2401047)(5005006)(8121501046)(3231023)(3002001)(10201501046)(93006095)(6041248)(20161123564025)(20161123562025)(20161123555025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(6072148)(201708071742011); SRVR:CY4PR07MB3461; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:CY4PR07MB3461; X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB3461; 4:sey6XJ8o1lCrhiub2dyxRRVBZF0+/WfkYr6EAl9ug+pzU55dqu9OMYZNrMZStnSTFY9OVWmMUGzskM/CtYksYDs/iIAPlsLublyDXJg9kjpj7Yea5BN+HUKWnxPOluIfKvToTmzIw96gWKhNj0vX+GGvTRglQASaKZ8DVlJH934G+hGwXzMDt8cYfXYythM946hj81trtKlOwNC/oDWdv9WrCg1Ob8ra3sXtv/zUZgSEnD0jfvMNK4ICERwYYSUr8Xen04/3UZMgXrAZq5cPo3d3QqpFJ4OYsdcvzBJX02KlWjopWzSW4MxuO377YEWFEubySB2roGDsGiNekN3LG11+fCpZzqzKL5QqhJea+Cg= X-Forefront-PRVS: 05220145DE X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(396003)(39860400002)(346002)(366004)(13464003)(199004)(189003)(24454002)(58126008)(16586007)(110136005)(97736004)(33716001)(50466002)(93886005)(7736002)(305945005)(16526018)(316002)(81166006)(2201001)(8936002)(8676002)(81156014)(575784001)(6116002)(3846002)(2501003)(2906002)(23726003)(68736007)(1076002)(25786009)(47776003)(2950100002)(42882006)(6666003)(66066001)(105586002)(55016002)(229853002)(478600001)(6306002)(53546011)(386003)(966005)(72206003)(52116002)(106356001)(4326008)(5009440100003)(6246003)(53376002)(8656006)(5660300001)(9686003)(59450400001)(76176011)(33896004)(6496006)(83506002)(53936002)(921003)(107986001)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR07MB3461; H:Pavan-LT; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR07MB3461; 23:WElLu5G7BAFIIWq99y6JlM/ctRPAaIeBiTzLWh2gH?= =?us-ascii?Q?+6WtWXxkzuQJXtX895kH1Gn+VbjH9GAVd4SgluPJrI7RFs3OVI1Kw5udKiMa?= =?us-ascii?Q?s93KGDjJML6/CsrdlwP8sCQ3CBWnp0zJfVPQ+QexRn9HtBFLOqz4dnydmYzx?= =?us-ascii?Q?sfvpj9DFA2yjD8NnYllA2hqQac5GmaaG9fQNzd4FTi9Ye/XWCthhH/REfc7I?= =?us-ascii?Q?Atma9L6PKDY5dbFPiDAf5ENvRMDOBEDFPaSwzVI34h2csbfjxsHImRMEAHfc?= =?us-ascii?Q?BYt8ctWQqrN/qW8MJ6udtM/7jHHhMFhDcnCq8W/uX7SznZ3NcgVhgXJ4Z1nd?= =?us-ascii?Q?o2ITh0YDU63aOzO0QxDMzluaf31YlPIEW3g6PxlWZRwAVyNW18BjiWPW9jaP?= =?us-ascii?Q?RGNA8tdvqleZRr6sjyUTPmL+Sh2sl6SmBtwf2nWrKY8NbAoodNDbkCyzLliU?= =?us-ascii?Q?2uxkkxhF5t4Zw0yrxpbsWi3iAv8ntD06ugqDalMpRUiuxGVYf+V8G/OtZxkK?= =?us-ascii?Q?zJ2jBsjl3/n3KjEIe356JtcqronwyFm59SPCyw1ljXNAw4/gpiNBKoVnFqLg?= =?us-ascii?Q?XCHt9tBx3K34yef/eN928rD7xeRz4MsyzDn1DX6gTiztsLbkJhGPgsknnpR+?= =?us-ascii?Q?k7bJ4nyx3L53xGAUzv2No63fT2g86/sFNhAXrrKAU6cKzjMv/3mp8/PnW9SZ?= =?us-ascii?Q?IdbYAlYsSaFuvSFYYrwfpTAo3pdhrpeyP3y94yPo6GPaXehLXzWo4ai0ZIjw?= =?us-ascii?Q?rByF+SZDb47y0mcm11gT27d6AMF5cEusn7zXEA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CRejRs+baHJON9C52Sl4dszS7+eyjzsNbRg2AD5sy/exAFO7/mvL9nW9fNeS2XnZ/C1xY+Pj8J+JCRUdyPYFVRdGscN4Mi3gmjPkhMRiY4aboT7p/nDGK3qU4TaXHuLR1y74ka6GDPLNFqn3rm+60Z6O++42IT7a3dsVnBdLGuAKrtoLpnE4sMiI+8/ErNl78TLlk=; 5:wNN3DwAjy84x8BmWkNgTaKqdUaDdR2zPST2g/MPk4hxeZxxoIVvf+ucEz+FLIr27gVfVDr92GUQx2hcKxc5JxMl7cZuIENxHJiK2+pjp/ECzuxVQ6YNBLIjQSzG1lBgOuKos0RDdzhFAt7ES+8gvyix2QY19JzNeOI+7bToG1rg=; 24:i5WknGPEVioJO8+hUk54U1wv40yf3aiz2YHUG2rOGcADAFRY3wJVJs9MPUESDBmXDvtZQ8/uXnktP/lXcZUAAeDbQhwX5PA+NB0GMt5IiU4=; 7:lQ/lTYCgFySs+wa8C5f721gLHlFuapP4zWTK2DxK2vnQtEpV1v505ygzHd476UuEBzCSMTHSZcoc9GiDvVc8bMYSRj61FEF3N+8TKUYJdgBjO4vysh6/Hjg7lKF3B1I6oP02yXns+/dsPijWSpdWnfNFC9dRVYp1rHDNxZHtyBnz6n2YSvyOU4ymMNsMZV4nUekGIzbs3WQhIFFWXnvQXHoD8XzaAOFNdVLCecwcob+TY+QNBAh9RU1grjUkoyN8 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Dec 2017 11:32:55.3585 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 60f31e95-2199-4870-4940-08d543af982f X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR07MB3461 Subject: Re: [dpdk-dev] [PATCH v2 01/11] eal: add common test assert macros 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: Fri, 15 Dec 2017 11:33:01 -0000 On Fri, Dec 15, 2017 at 10:58:10AM +0000, Ananyev, Konstantin wrote: > > > > -----Original Message----- > > From: Pavan Nikhilesh Bhagavatula [mailto:pbhagavatula@caviumnetworks.com] > > Sent: Friday, December 15, 2017 9:05 AM > > To: Ananyev, Konstantin ; 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 > > Cc: dev@dpdk.org > > Subject: Re: [dpdk-dev] [PATCH v2 01/11] eal: add common test assert macros > > > > On Thu, Dec 14, 2017 at 06:43:24PM +0000, Ananyev, Konstantin wrote: > > > > > > > > > > -----Original Message----- > > > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Pavan Nikhilesh > > > > Sent: Thursday, December 14, 2017 3:01 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 > > > > Cc: dev@dpdk.org; Pavan Nikhilesh > > > > Subject: [dpdk-dev] [PATCH v2 01/11] eal: add common test assert macros > > > > > > > > Adding common test assertion macros for unit testing. > > > > > > Wonder what's wrong with existing RTE_ASSERT() and RTE_VERIFY()? > > > Konstantin > > > > The existing RTE_ASSERT/VERIFY use rte_panic(). > > Yes, and wouldn't you expect that behavior from assert() call? We need to print out the number of successful/failure tests so, we need the test to proceed even if an assert fails. In case of `event_octeontx` we have added a new devargs 'selftest' that can be used to test the driver from any given application. > Seriously where do you plan to use it outside auto test framework? We are moving pmd specific tests to respective pmd folder to reduce clutter in auto test area (event devices for now) [1]. So, we need to access the asserts from driver location instead of using CFLAGS to directly include test.h for all the drivers it would be better to have it in eal/common as rte_test. [1] http://dpdk.org/ml/archives/dev/2017-December/083740.html > Konstantin Regards, Pavan > > > > > Pavan > > > > > > > Taken from test/test.h. > > > > > > > > Signed-off-by: Pavan Nikhilesh > > > > --- > > > > lib/librte_eal/common/Makefile | 2 +- > > > > lib/librte_eal/common/include/rte_test.h | 97 ++++++++++++++++++++++++++++++++ > > > > 2 files changed, 98 insertions(+), 1 deletion(-) > > > > create mode 100644 lib/librte_eal/common/include/rte_test.h > > > > > > > > diff --git a/lib/librte_eal/common/Makefile b/lib/librte_eal/common/Makefile > > > > index 9effd0d45..eba1059f2 100644 > > > > --- a/lib/librte_eal/common/Makefile > > > > +++ b/lib/librte_eal/common/Makefile > > > > @@ -43,7 +43,7 @@ INC += rte_hexdump.h rte_devargs.h rte_bus.h rte_dev.h > > > > INC += rte_pci_dev_feature_defs.h rte_pci_dev_features.h > > > > INC += rte_malloc.h rte_keepalive.h rte_time.h > > > > INC += rte_service.h rte_service_component.h > > > > -INC += rte_bitmap.h rte_vfio.h > > > > +INC += rte_bitmap.h rte_vfio.h rte_test.h > > > > > > > > GENERIC_INC := rte_atomic.h rte_byteorder.h rte_cycles.h rte_prefetch.h > > > > GENERIC_INC += rte_spinlock.h rte_memcpy.h rte_cpuflags.h rte_rwlock.h > > > > diff --git a/lib/librte_eal/common/include/rte_test.h b/lib/librte_eal/common/include/rte_test.h > > > > new file mode 100644 > > > > index 000000000..256117f79 > > > > --- /dev/null > > > > +++ b/lib/librte_eal/common/include/rte_test.h > > > > @@ -0,0 +1,97 @@ > > [...]