From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavan Nikhilesh Subject: Re: [PATCH v3 2/2] test: update common auto test Date: Wed, 4 Apr 2018 18:24:11 +0530 Message-ID: <20180404125410.GA12750@ltp-pvn> References: <20180217104934.17291-1-pbhagavatula@caviumnetworks.com> <20180404101606.5156-1-pbhagavatula@caviumnetworks.com> <20180404101606.5156-2-pbhagavatula@caviumnetworks.com> <3820145.m9E1F7985g@xps> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev@dpdk.org To: Thomas Monjalon , jerin.jacob@caviumnetworks.com, matan@mellanox.com, keith.wiles@intel.com Return-path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0075.outbound.protection.outlook.com [104.47.37.75]) by dpdk.org (Postfix) with ESMTP id 9B5011C4AC for ; Wed, 4 Apr 2018 14:54:36 +0200 (CEST) Content-Disposition: inline In-Reply-To: <3820145.m9E1F7985g@xps> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Wed, Apr 04, 2018 at 02:49:28PM +0200, Thomas Monjalon wrote: > 04/04/2018 12:16, Pavan Nikhilesh: > > Update common auto test to include test for previous power of 2 for both > > 32 and 64bit integers. > > This patch can be merged with previous one (related lib change). > > [...] > > + for (i = 1, p = 1; i <= MAX_NUM; i++) { > > + if (rte_align32prevpow2(i) != p) > > + FAIL_ALIGN("rte_align32prevpow2", i, p); > > + if (rte_is_power_of_2(i + 1)) > > + p = i + 1; > > + } > > + > > + for (j = 1, q = 1; j <= MAX_NUM ; j++) { > > + if (rte_align64pow2(j) != q) > > You could create FAIL_ALIGN64 for consistency. > > > + printf("rte_align64pow2() test failed: %lu %lu\n", j, > > %lu does not work on 32-bit machines. > Please use PRIu64. > > See http://dpdk.org/ml/archives/dev/2018-February/090882.html > Thanks for the headsup will send out next version with suggested changes. Pavan. > >