From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 40BBEA0597; Wed, 8 Apr 2020 19:48:10 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D69E81C1A8; Wed, 8 Apr 2020 19:48:08 +0200 (CEST) Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) by dpdk.org (Postfix) with ESMTP id B04721C199; Wed, 8 Apr 2020 19:48:06 +0200 (CEST) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id 765B4690; Wed, 8 Apr 2020 13:48:05 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Wed, 08 Apr 2020 13:48:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=KxUE7aFbEujOAJshHIlo0t95AJD8wj0ayC8iGWz5Iyc=; b=Tv+KkWLfSLbv /68JaCtgJT7G+KxQhVKKsngbKNrFN9aMMW1A/w1Cf/QtdjUwM6XwIaKWGRk6DBHk DvD0b0BinGYyX85Gqk+8xTcR3DtNVB9/nU4nxHUsohE8iTRibXGYTw01VXEoWOJR XrWRoRaG9SQfnIwnJcvIW0+wfTbNghs= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=KxUE7aFbEujOAJshHIlo0t95AJD8wj0ayC8iGWz5I yc=; b=fckfqXjeWhJfAXzR9/rmyuwIaVBHHZlExz/M8wwHM9pHJUOBYKLGosErb /tDT++TUT2Mdejdg4hUYtNscfwJb9ZqpPCImi1zvzn1gD+dHwJwAdZOQ3xxqDM8k r7U7q0FOVTj81zcEF9PEAeXTFYOhHmFxi7/MWleH6r4j+Xkwm7DQ/75h3pmGyvM5 ETND1DKxv+zJ1Ow74S6RZygvjhZclYthJggXRfWPraD9ozo4BnLmI/PcFESbzX/W joQwe74fyCuv6tlgfHLEtmTucRVMOA6faL2xnhiFJyqpXTsgrE39D/XASAOfaC+N RQEYNm42e29IlsCtR6RqXS1ywHMXA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudejgdduudeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecukf hppeejjedrudefgedrvddtfedrudekgeenucevlhhushhtvghrufhiiigvpedtnecurfgr rhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 5F154306005B; Wed, 8 Apr 2020 13:47:58 -0400 (EDT) From: Thomas Monjalon To: Lukasz Wojciechowski Cc: Pavan Nikhilesh , Jerin Jacob , dev@dpdk.org, stable@dpdk.org Date: Wed, 08 Apr 2020 19:47:56 +0200 Message-ID: <1777512.atdPhlSkOF@thomas> In-Reply-To: References: <20200312151654.7218-1-l.wojciechow@partner.samsung.com> <9733532.nUPlyArG6x@thomas> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v2 04/13] app/test: fix macro definition 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 08/04/2020 18:15, Lukasz Wojciechowski: > Hi Thomas, > > Before my patch there was just a definition: > #define RTE_TEST_TRACE_FAILURE TEST_TRACE_FAILURE > without #ifndef condition. > > It caused a build problem to me when working on security test, which > uses both rte_test.h and test.h > As libraries should go first on the include list before local files I used: > > #include > #include "test.h" > > sequence, which cause obvious build error as RTE_TEST_TRACE_FAILURE was > first defined as an empty macro inside rte_test.h, and redefinition in > test.h caused a problem. > > > So I had two ways to solve the issue: > 1) to wrap it with #ifndef condition and leave the definition there > 2) to remove the redefinition from test.h > > I've chosen the 1) solution because: > * Author of the former patch had placed the definition there for some > purpose Because rte_test.h is more recent and its addition was not complete enough. rte_test.h should be included in test.h, and overlaps removed. > * In my opinion it is better to have the definition present and pointing > to the same macro for both RTE_TEST_TRACE_FAILURE and TEST_TRACE_FAILURE > as it would make logs look more consistent when printing information the > same way. I think solution 2 is better. PS: please avoid top-posting > W dniu 08.04.2020 o 14:53, Thomas Monjalon pisze: > > 08/04/2020 05:13, Lukasz Wojciechowski: > >> Wrap RTE_TEST_TRACE_FAILURE macro definition into #ifndef clause > >> as it might be already defined. > > I think it should not be defined at all. > > Why not including rte_test.h? > > > > > > >