diff options
| author | David Marchand <[email protected]> | 2023-08-09 09:43:48 +0200 |
|---|---|---|
| committer | David Marchand <[email protected]> | 2023-11-27 08:30:33 +0100 |
| commit | af59c9c1077db8f545caa35c22de8ab82d4d210b (patch) | |
| tree | fc408e081898bb6da485c224ad03d3c230372575 /devtools | |
| parent | aa01d1e46aa16a6d615b9d7bbd362aee1fd73f05 (diff) | |
devtools: add check on symbol maps format
Add a check on symbol maps format.
This will be required by a next commit.
Signed-off-by: David Marchand <[email protected]>
Diffstat (limited to 'devtools')
| -rwxr-xr-x | devtools/check-symbol-maps.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/devtools/check-symbol-maps.sh b/devtools/check-symbol-maps.sh index 8c116bfa9c..ba2f892f56 100755 --- a/devtools/check-symbol-maps.sh +++ b/devtools/check-symbol-maps.sh @@ -74,4 +74,27 @@ if [ -n "$empty_maps" ] ; then ret=1 fi +find_bad_format_maps () +{ + abi_version=$(cut -d'.' -f 1 ABI_VERSION) + next_abi_version=$((abi_version + 1)) + for map in $@ ; do + cat $map | awk ' + /^(DPDK_('$abi_version'|'$next_abi_version')|EXPERIMENTAL|INTERNAL) \{$/ { next; } # start of a section + /^}( DPDK_'$abi_version')?;$/ { next; } # end of a section + /^$/ { next; } # empty line + /^\t(global:|local: \*;)$/ { next; } # qualifiers + /^\t[a-zA-Z_0-9]*;( # WINDOWS_NO_EXPORT)?$/ { next; } # symbols + /^\t# added in [0-9]*\.[0-9]*$/ { next; } # version comments + { print $0; }' || echo $map + done +} + +bad_format_maps=$(find_bad_format_maps $@) +if [ -n "$bad_format_maps" ] ; then + echo "Found badly formatted maps:" + echo "$bad_format_maps" + ret=1 +fi + exit $ret |
