[1/2] devtools: unify configuration for ABI check

Message ID 20221103154717.22368-2-david.marchand@redhat.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series ABI check updates |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

David Marchand Nov. 3, 2022, 3:47 p.m. UTC
  We have been skipping removed libraries in the ABI check by updating the
check-abi.sh script itself.
See, for example, commit 33584c19ddc2 ("raw/dpaa2_qdma: remove driver").

Having two places for exception is a bit confusing, and those exceptions
are best placed in a single configuration file out of the check script.

Besides, a next patch will switch the check from comparing ABI xml files
to directly comparing .so files. In this mode, libabigail does not
support the soname_regexp syntax used for the mlx glue libraries.

Let's handle these special cases in libabigail.abignore using comments.

Taking the raw/dpaa2_qdma driver as an example, it would be possible to
skip it by adding:

 ; SKIP_LIBRARY=librte_net_mlx4_glue
+; SKIP_LIBRARY=librte_raw_dpaa2_qdma

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 devtools/check-abi.sh        |  4 ++++
 devtools/libabigail.abignore | 12 +++++++++---
 2 files changed, 13 insertions(+), 3 deletions(-)
  

Patch

diff --git a/devtools/check-abi.sh b/devtools/check-abi.sh
index c583eae2fd..b1bf633f2a 100755
--- a/devtools/check-abi.sh
+++ b/devtools/check-abi.sh
@@ -37,6 +37,10 @@  fi
 error=
 for dump in $(find $refdir -name "*.dump"); do
 	name=$(basename $dump)
+	if grep -q "; SKIP_LIBRARY=${name%.dump}\>" $(dirname $0)/libabigail.abignore; then
+		echo "Skipped $name" >&2
+		continue
+	fi
 	dump2=$(find $newdir -name $name)
 	if [ -z "$dump2" ] || [ ! -e "$dump2" ]; then
 		echo "Error: cannot find $name in $newdir" >&2
diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore
index 7a93de3ba1..3ff51509de 100644
--- a/devtools/libabigail.abignore
+++ b/devtools/libabigail.abignore
@@ -16,9 +16,15 @@ 
 [suppress_variable]
         name_regexp = _pmd_info$
 
-; Ignore changes on soname for mlx glue internal drivers
-[suppress_file]
-        soname_regexp = ^librte_.*mlx.*glue\.
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+; Special rules to skip libraries ;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;
+; This is not a libabigail rule (see check-abi.sh).
+; This is used for driver removal and other special cases like mlx glue libs.
+;
+; SKIP_LIBRARY=librte_common_mlx5_glue
+; SKIP_LIBRARY=librte_net_mlx4_glue
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ; Experimental APIs exceptions ;