[v1,1/2] devtools: add internal ABI version check

Message ID 20200430054606.92715-1-haiyue.wang@intel.com (mailing list archive)
State Accepted, archived
Delegated to: David Marchand
Headers
Series [v1,1/2] devtools: add internal ABI version check |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-nxp-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-testing success Testing PASS

Commit Message

Wang, Haiyue April 30, 2020, 5:46 a.m. UTC
  INTERNAL is new introduced version, update the shell script that checks
whether built libraries are versioned with expected ABI (current ABI,
current ABI + 1, EXPERIMENTAL, or INTERNAL).

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
---
 devtools/check-abi-version.sh | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
  

Comments

David Marchand May 19, 2020, 3:35 p.m. UTC | #1
On Thu, Apr 30, 2020 at 7:54 AM Haiyue Wang <haiyue.wang@intel.com> wrote:
>
> INTERNAL is new introduced version, update the shell script that checks
> whether built libraries are versioned with expected ABI (current ABI,
> current ABI + 1, EXPERIMENTAL, or INTERNAL).
>
> Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
> ---
>  devtools/check-abi-version.sh | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/devtools/check-abi-version.sh b/devtools/check-abi-version.sh
> index 9a3d13546..f0cca42a9 100755
> --- a/devtools/check-abi-version.sh
> +++ b/devtools/check-abi-version.sh
> @@ -4,7 +4,7 @@
>
>  # Check whether library symbols have correct
>  # version (provided ABI number or provided ABI
> -# number + 1 or EXPERIMENTAL).
> +# number + 1 or EXPERIMENTAL or INTERNAL).
>  # Args:
>  #   $1: path of the library .so file
>  #   $2: ABI major version number to check
> @@ -12,7 +12,7 @@
>
>  if [ -z "$1" ]; then
>      echo "Script checks whether library symbols have"
> -    echo "correct version (ABI_VER/ABI_VER+1/EXPERIMENTAL)"
> +    echo "correct version (ABI_VER/ABI_VER+1/EXPERIMENTAL/INTERNAL)"
>      echo "Usage:"
>      echo "  $0 SO_FILE_PATH [ABI_VER]"
>      exit 1
> @@ -41,11 +41,11 @@ for SYM in $(echo "${OBJ_DUMP_OUTPUT}" | awk '{print $(NF-1) "-" $NF}')
>  do
>      version=$(echo $SYM | cut -d'-' -f 1)
>      symbol=$(echo $SYM | cut -d'-' -f 2)
> -    case $version in (*"$ABIVER"*|*"$NEXT_ABIVER"*|"EXPERIMENTAL")
> +    case $version in (*"$ABIVER"*|*"$NEXT_ABIVER"*|"EXPERIMENTAL"|"INTERNAL")
>          ;;
>      (*)
>          echo "Warning: symbol $symbol ($version) should be annotated " \
> -             "as ABI version $ABIVER / $NEXT_ABIVER, or EXPERIMENTAL."
> +             "as ABI version $ABIVER / $NEXT_ABIVER, EXPERIMENTAL, or INTERNAL."
>          ret=1
>      ;;
>      esac
> --
> 2.26.2
>

LGTM + tested current master before and after the patch.

Acked-by: David Marchand <david.marchand@redhat.com>
  
David Marchand May 19, 2020, 4:54 p.m. UTC | #2
On Tue, May 19, 2020 at 5:35 PM David Marchand
<david.marchand@redhat.com> wrote:
>
> On Thu, Apr 30, 2020 at 7:54 AM Haiyue Wang <haiyue.wang@intel.com> wrote:
> >
> > INTERNAL is new introduced version, update the shell script that checks
> > whether built libraries are versioned with expected ABI (current ABI,
> > current ABI + 1, EXPERIMENTAL, or INTERNAL).
> >
> > Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
> Acked-by: David Marchand <david.marchand@redhat.com>

Series applied, thanks.
  

Patch

diff --git a/devtools/check-abi-version.sh b/devtools/check-abi-version.sh
index 9a3d13546..f0cca42a9 100755
--- a/devtools/check-abi-version.sh
+++ b/devtools/check-abi-version.sh
@@ -4,7 +4,7 @@ 
 
 # Check whether library symbols have correct
 # version (provided ABI number or provided ABI
-# number + 1 or EXPERIMENTAL).
+# number + 1 or EXPERIMENTAL or INTERNAL).
 # Args:
 #   $1: path of the library .so file
 #   $2: ABI major version number to check
@@ -12,7 +12,7 @@ 
 
 if [ -z "$1" ]; then
     echo "Script checks whether library symbols have"
-    echo "correct version (ABI_VER/ABI_VER+1/EXPERIMENTAL)"
+    echo "correct version (ABI_VER/ABI_VER+1/EXPERIMENTAL/INTERNAL)"
     echo "Usage:"
     echo "  $0 SO_FILE_PATH [ABI_VER]"
     exit 1
@@ -41,11 +41,11 @@  for SYM in $(echo "${OBJ_DUMP_OUTPUT}" | awk '{print $(NF-1) "-" $NF}')
 do
     version=$(echo $SYM | cut -d'-' -f 1)
     symbol=$(echo $SYM | cut -d'-' -f 2)
-    case $version in (*"$ABIVER"*|*"$NEXT_ABIVER"*|"EXPERIMENTAL")
+    case $version in (*"$ABIVER"*|*"$NEXT_ABIVER"*|"EXPERIMENTAL"|"INTERNAL")
         ;;
     (*)
         echo "Warning: symbol $symbol ($version) should be annotated " \
-             "as ABI version $ABIVER / $NEXT_ABIVER, or EXPERIMENTAL."
+             "as ABI version $ABIVER / $NEXT_ABIVER, EXPERIMENTAL, or INTERNAL."
         ret=1
     ;;
     esac