DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Cc: Thomas Monjalon <thomas@monjalon.net>
Subject: [PATCH v2 1/2] devtools: unify configuration for ABI check
Date: Thu, 23 Mar 2023 18:15:01 +0100	[thread overview]
Message-ID: <20230323171502.3124049-2-david.marchand@redhat.com> (raw)
In-Reply-To: <20230323171502.3124049-1-david.marchand@redhat.com>

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        |  9 +++++++--
 devtools/libabigail.abignore | 12 +++++++++---
 2 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/devtools/check-abi.sh b/devtools/check-abi.sh
index d253a12768..f74432be5d 100755
--- a/devtools/check-abi.sh
+++ b/devtools/check-abi.sh
@@ -10,7 +10,8 @@ fi
 refdir=$1
 newdir=$2
 warnonly=${3:-}
-ABIDIFF_OPTIONS="--suppr $(dirname $0)/libabigail.abignore --no-added-syms"
+ABIDIFF_SUPPRESSIONS=$(dirname $(readlink -f $0))/libabigail.abignore
+ABIDIFF_OPTIONS="--suppr $ABIDIFF_SUPPRESSIONS --no-added-syms"
 
 if [ ! -d $refdir ]; then
 	echo "Error: reference directory '$refdir' does not exist." >&2
@@ -34,10 +35,14 @@ else
 	ABIDIFF_OPTIONS="$ABIDIFF_OPTIONS --headers-dir2 $incdir2"
 fi
 
-export newdir ABIDIFF_OPTIONS
+export newdir ABIDIFF_OPTIONS ABIDIFF_SUPPRESSIONS
 export diff_func='run_diff() {
 	dump=$1
 	name=$(basename $dump)
+	if grep -q "; SKIP_LIBRARY=${name%.dump}\>" $ABIDIFF_SUPPRESSIONS; then
+		echo "Skipped $name" >&2
+		return 0
+	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 ;
-- 
2.39.2


  reply	other threads:[~2023-03-23 17:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-03 15:47 [PATCH 0/2] ABI check updates David Marchand
2022-11-03 15:47 ` [PATCH 1/2] devtools: unify configuration for ABI check David Marchand
2022-11-03 15:47 ` [PATCH 2/2] devtools: stop depending on libabigail xml format David Marchand
2023-03-23 17:15 ` [PATCH v2 0/2] ABI check updates David Marchand
2023-03-23 17:15   ` David Marchand [this message]
2023-03-23 17:15   ` [PATCH v2 2/2] devtools: stop depending on libabigail xml format David Marchand
2023-03-28 18:38   ` [PATCH v2 0/2] ABI check updates Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230323171502.3124049-2-david.marchand@redhat.com \
    --to=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).