DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] devtools: catch empty symbol maps
@ 2022-11-14 14:16 David Marchand
  2022-11-14 14:31 ` Bruce Richardson
  0 siblings, 1 reply; 4+ messages in thread
From: David Marchand @ 2022-11-14 14:16 UTC (permalink / raw)
  To: dev; +Cc: omer.yamac, Thomas Monjalon

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] devtools: catch empty symbol maps
  2022-11-14 14:16 [PATCH] devtools: catch empty symbol maps David Marchand
@ 2022-11-14 14:31 ` Bruce Richardson
  2022-11-14 15:10   ` Ferruh Yigit
  0 siblings, 1 reply; 4+ messages in thread
From: Bruce Richardson @ 2022-11-14 14:31 UTC (permalink / raw)
  To: David Marchand; +Cc: dev, omer.yamac, Thomas Monjalon

On Mon, Nov 14, 2022 at 03:16:51PM +0100, David Marchand wrote:
> 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>
> ---

Acked-by: Bruce Richardson <bruce.richardson@intel.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] devtools: catch empty symbol maps
  2022-11-14 14:31 ` Bruce Richardson
@ 2022-11-14 15:10   ` Ferruh Yigit
  2022-11-15 17:20     ` Thomas Monjalon
  0 siblings, 1 reply; 4+ messages in thread
From: Ferruh Yigit @ 2022-11-14 15:10 UTC (permalink / raw)
  To: Bruce Richardson, David Marchand; +Cc: dev, omer.yamac, Thomas Monjalon

On 11/14/2022 2:31 PM, Bruce Richardson wrote:
> On Mon, Nov 14, 2022 at 03:16:51PM +0100, David Marchand wrote:
>> 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>
>> ---
> 
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>


+1 to have automated checks,
Tested-by: Ferruh Yigit <ferruh.yigit@amd.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] devtools: catch empty symbol maps
  2022-11-14 15:10   ` Ferruh Yigit
@ 2022-11-15 17:20     ` Thomas Monjalon
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Monjalon @ 2022-11-15 17:20 UTC (permalink / raw)
  To: David Marchand; +Cc: Bruce Richardson, dev, omer.yamac, Ferruh Yigit

14/11/2022 16:10, Ferruh Yigit:
> On 11/14/2022 2:31 PM, Bruce Richardson wrote:
> > On Mon, Nov 14, 2022 at 03:16:51PM +0100, David Marchand wrote:
> >> 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>
> > 
> > Acked-by: Bruce Richardson <bruce.richardson@intel.com>
> 
> +1 to have automated checks,
> Tested-by: Ferruh Yigit <ferruh.yigit@amd.com>

Applied, thanks.




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-11-15 17:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-14 14:16 [PATCH] devtools: catch empty symbol maps David Marchand
2022-11-14 14:31 ` Bruce Richardson
2022-11-14 15:10   ` Ferruh Yigit
2022-11-15 17:20     ` Thomas Monjalon

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).