DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Cc: omer.yamac@ceng.metu.edu.tr, Thomas Monjalon <thomas@monjalon.net>
Subject: [PATCH] devtools: catch empty symbol maps
Date: Mon, 14 Nov 2022 15:16:51 +0100	[thread overview]
Message-ID: <20221114141651.1255306-1-david.marchand@redhat.com> (raw)

version.map are now optional for drivers if no symbol is exported.
Having no symbol exported from a library does not make sense.

Catch all empty maps and warn about them.

Example:
$ ./devtools/check-symbol-maps.sh
Found empty maps:
drivers/crypto/uadk/version.map
drivers/net/gve/version.map
drivers/net/idpf/version.map

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 devtools/check-symbol-maps.sh | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/devtools/check-symbol-maps.sh b/devtools/check-symbol-maps.sh
index 32e1fa5c8f..0a6062de26 100755
--- a/devtools/check-symbol-maps.sh
+++ b/devtools/check-symbol-maps.sh
@@ -60,4 +60,18 @@ if [ -n "$local_miss_maps" ] ; then
     ret=1
 fi
 
+find_empty_maps ()
+{
+    for map in $@ ; do
+        [ $(buildtools/map-list-symbol.sh $map | wc -l) != '0' ] || echo $map
+    done
+}
+
+empty_maps=$(find_empty_maps $@)
+if [ -n "$empty_maps" ] ; then
+    echo "Found empty maps:"
+    echo "$empty_maps"
+    ret=1
+fi
+
 exit $ret
-- 
2.38.1


             reply	other threads:[~2022-11-14 14:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-14 14:16 David Marchand [this message]
2022-11-14 14:31 ` Bruce Richardson
2022-11-14 15:10   ` Ferruh Yigit
2022-11-15 17:20     ` 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=20221114141651.1255306-1-david.marchand@redhat.com \
    --to=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=omer.yamac@ceng.metu.edu.tr \
    --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).