[dpdk-dev] [PATCH v7 5/6] devtools: exempt internal ABI checking

David Marchand david.marchand at redhat.com
Sat Apr 25 16:34:22 CEST 2020


On Sat, Apr 25, 2020 at 1:02 PM Haiyue Wang <haiyue.wang at intel.com> wrote:
>
> No need to restrict the ABI on symbols that are only used by core
> libraries.
>
> Signed-off-by: Haiyue Wang <haiyue.wang at intel.com>

Rather than add a special case for INTERNAL, we can invert the logic
in this script: identify "stable" sections symbol.
I went with the following patch:

diff --git a/devtools/check-symbol-change.sh b/devtools/check-symbol-change.sh
index ed2178e36e..f329d5fa62 100755
--- a/devtools/check-symbol-change.sh
+++ b/devtools/check-symbol-change.sh
@@ -77,6 +77,10 @@ build_map_changes()

 }

+is_stable_section() {
+       [ "$1" != 'EXPERIMENTAL' ] && [ "$1" != 'INTERNAL' ]
+}
+
 check_for_rule_violations()
 {
        local mapdb="$1"
@@ -110,11 +114,11 @@ check_for_rule_violations()
                        # section directly
                        if [ -z "$oldsecname" ]
                        then
-                               if [ "$secname" = 'EXPERIMENTAL' ]
+                               if ! is_stable_section $secname
                                then
                                        echo -n "INFO: symbol $symname has "
                                        echo -n "been added to the "
-                                       echo -n "EXPERIMENTAL section of the "
+                                       echo -n "$secname section of the "
                                        echo "version map"
                                        continue
                                else
@@ -137,7 +141,7 @@ check_for_rule_violations()
                        # This symbol is moving between two sections (the
                        # original section is not experimental).
                        # This can be legit, just warn.
-                       if [ "$oldsecname" != 'EXPERIMENTAL' ]
+                       if is_stable_section $oldsecname
                        then
                                echo -n "INFO: symbol $symname is being "
                                echo -n "moved from $oldsecname to $secname. "
@@ -148,9 +152,9 @@ check_for_rule_violations()
                else

                        if ! grep -q "$mname $symname .* add" "$mapdb" && \
-                          [ "$secname" != "EXPERIMENTAL" ]
+                          is_stable_section $secname
                        then
-                               # Just inform users that non-experimenal
+                               # Just inform users that stable
                                # symbols need to go through a deprecation
                                # process
                                echo -n "INFO: symbol $symname is being "



-- 
David Marchand



More information about the dev mailing list