From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <stable-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 0A249A0093
	for <public@inbox.dpdk.org>; Tue,  8 Mar 2022 22:05:54 +0100 (CET)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 8139E4069F;
	Tue,  8 Mar 2022 22:05:53 +0100 (CET)
Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com
 [66.111.4.26]) by mails.dpdk.org (Postfix) with ESMTP id 2CE9640141;
 Tue,  8 Mar 2022 22:05:51 +0100 (CET)
Received: from compute3.internal (compute3.nyi.internal [10.202.2.43])
 by mailout.nyi.internal (Postfix) with ESMTP id 7FCA95C0226;
 Tue,  8 Mar 2022 16:05:49 -0500 (EST)
Received: from mailfrontend1 ([10.202.2.162])
 by compute3.internal (MEProxy); Tue, 08 Mar 2022 16:05:49 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h=
 cc:cc:content-transfer-encoding:content-type:date:date:from:from
 :in-reply-to:in-reply-to:message-id:mime-version:references
 :reply-to:sender:subject:subject:to:to; s=fm1; bh=MbAgvvub0XYee6
 Xf16390NndhHOje1WUaZaivLNvh3s=; b=UV0Jfjig9MKeEJvDdze9ze+gRCgk+G
 jeR6jClBvfjv9QmZHrM7qoP1vSkegllXbIpkouLCkYCpTlKRs6ax1G3Bl7A7QPDl
 G/LTbnhhzZ09lUuro9RpjBn0mgbucwnNUuD/bNe6TmpglNn6yhssHn/gBvclnoth
 L/SGvoF1q/q4Qxi3mZsMEVPBFVWhVOxNMzazCj2duIXLKf6bUpZ4QRLMr4mM3lc9
 W/qDUoJz326VVubUsgnRDTis8OlmgyCPygQGc9i/Kedsd/DK0+Dri0AQ00f7rZJD
 k18PRDCQ8xku/RS54+xaNJVX/GId+NprB8H7iZBEkCj8DG4ZpORIqOkA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:date:date:from:from:in-reply-to:in-reply-to
 :message-id:mime-version:references:reply-to:sender:subject
 :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender
 :x-sasl-enc; s=fm2; bh=MbAgvvub0XYee6Xf16390NndhHOje1WUaZaivLNvh
 3s=; b=EDqDm1Gj7elxeLPDWLiX5qKEo8ork8j/5TXzSF8C8iAiraLbg+qfT7m01
 pqX7TSZRmDIGovazxzfFPH5Khub4WcoySb1x2yV4gsQzuc/Q+rXOFBGVvQVp0D9j
 uaRtVrgOPdOxcJ9WZ+t9u2m6H9HnUYRuOR3Xq5WVs46Wts/yMkMm1NUzmRI4PBR5
 HvKzSVlsZ86aWTxx6HoqqJ4qiiVIEpTTNZVJ+8/ap0f4hiNvBuS8of820XCu2zYd
 3xaQEMbu8Cw+tFGkw4Ojtq/vkhLrD9b9LoQpCc2USIkDyDbbSZGj1U5UsBlxzD0/
 j0AC/kFcFkJCIPVNlAg33TmIqIDSQ==
X-ME-Sender: <xms:LMUnYoriefFgl2bHNMS4bOdxiHuFHrjgZKdwx9Hnz6t2eK14lgsQAg>
 <xme:LMUnYuqMmx3MKFN4KXCkb1A-HNoYzBNIivPhbWRCCTzRVta4UFoXbhR_QOmq4KJMT
 sE544Cp19B5ZFn9fQ>
X-ME-Received: <xmr:LMUnYtOT7SZk6e21_O0jW7UDs3CF4vPgrseo89MoGaR6qpDrPn0fP86Kq4wWWszlxTW-qwozNTwN_ktyGcoYBYMT3w>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudduiedgudegvdcutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
 necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd
 enucfjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhm
 rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc
 ggtffrrghtthgvrhhnpedugefgvdefudfftdefgeelgffhueekgfffhfeujedtteeutdej
 ueeiiedvffegheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh
 hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght
X-ME-Proxy: <xmx:LMUnYv7uXovgS6-rxjcZrs1uV-zuHVFMX6evANIcmSxJ8bTQ26t-3A>
 <xmx:LMUnYn66j3Rxn6oeG8xNwnSDoAVTbqLyomxdmiRwT_5mGYrs8ceccQ>
 <xmx:LMUnYvg3znMZ5gWYAJ2MHzzOlxOy4l81WSCJ3CKGof1AhDrc0rk2Kw>
 <xmx:LcUnYq0qv9G0g15jqAC6WdDmnDWpzJ7v-jmxRgvEHhZwqR161XcDVA>
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue,
 8 Mar 2022 16:05:47 -0500 (EST)
From: Thomas Monjalon <thomas@monjalon.net>
To: Usama Arif <usama.arif@bytedance.com>
Cc: dev@dpdk.org, david.marchand@redhat.com, fam.zheng@bytedance.com,
 liangma@bytedance.com, stable@dpdk.org
Subject: Re: [PATCH] build: encapsulate grep for local_miss_maps in a function
Date: Tue, 08 Mar 2022 22:05:45 +0100
Message-ID: <9001533.aoefvbuG5b@thomas>
In-Reply-To: <20220308185243.3629626-1-usama.arif@bytedance.com>
References: <20220308185243.3629626-1-usama.arif@bytedance.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"
X-BeenThere: stable@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: patches for DPDK stable branches <stable.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/stable>,
 <mailto:stable-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/stable/>
List-Post: <mailto:stable@dpdk.org>
List-Help: <mailto:stable-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/stable>,
 <mailto:stable-request@dpdk.org?subject=subscribe>
Errors-To: stable-bounces@dpdk.org

08/03/2022 19:52, Usama Arif:
> check-symbols-maps.sh runs with the -e option to exit as soon as
> there is an error. Currently the build is failing as the search of
> grep -L is empty (which is the case for all version.map files as
> they have the local symbol) which causes the script to return
> with an error.

It depends on the shell I guess because most machines run well.

> This patch encapsulates the grep call in a function, so that only the function
> errors out and the build is successful.

That's a strange workaround. I don't understand why it works.
I am submitting a simpler fix adding " || true"

> -local_miss_maps=$(grep -L 'local: \*;' $@)
> +find_local_miss_maps ()
> +{
> +    local local_miss_maps=$(grep -L 'local: \*;' $@)
> +    echo "$local_miss_maps"
> +
> +}
> +
> +local_miss_maps=$(find_local_miss_maps $@)

Thanks for raising the issue and proposing a solution.