DPDK patches and discussions
 help / color / mirror / Atom feed
From: Usama Arif <usama.arif@bytedance.com>
To: dev@dpdk.org, david.marchand@redhat.com, thomas@monjalon.net
Cc: fam.zheng@bytedance.com, liangma@bytedance.com,
	Usama Arif <usama.arif@bytedance.com>,
	stable@dpdk.org
Subject: [PATCH] build: encapsulate grep for local_miss_maps in a function
Date: Tue,  8 Mar 2022 18:52:43 +0000	[thread overview]
Message-ID: <20220308185243.3629626-1-usama.arif@bytedance.com> (raw)

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.
This patch encapsulates the grep call in a function, so that only the function
errors out and the build is successful.

Fixes: b403498e14 ("build: hide local symbols in shared libraries")
Cc: stable@dpdk.org
Signed-off-by: Usama Arif <usama.arif@bytedance.com>
---
 devtools/check-symbol-maps.sh | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/devtools/check-symbol-maps.sh b/devtools/check-symbol-maps.sh
index 8266fdf9ea..96c479138f 100755
--- a/devtools/check-symbol-maps.sh
+++ b/devtools/check-symbol-maps.sh
@@ -53,7 +53,14 @@ if [ -n "$duplicate_symbols" ] ; then
     ret=1
 fi
 
-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 $@)
 if [ -n "$local_miss_maps" ] ; then
     echo "Found maps without local catch-all:"
     echo "$local_miss_maps"
-- 
2.25.1


             reply	other threads:[~2022-03-08 18:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-08 18:52 Usama Arif [this message]
2022-03-08 21:05 ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220308185243.3629626-1-usama.arif@bytedance.com \
    --to=usama.arif@bytedance.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=fam.zheng@bytedance.com \
    --cc=liangma@bytedance.com \
    --cc=stable@dpdk.org \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).