DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH 0/2] ABI check updates
@ 2022-11-03 15:47 David Marchand
  2022-11-03 15:47 ` [PATCH 1/2] devtools: unify configuration for ABI check David Marchand
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: David Marchand @ 2022-11-03 15:47 UTC (permalink / raw)
  To: dev; +Cc: thomas, ci

This series moves ABI exceptions in a single configuration file and
simplifies the ABI check so that no artefact depending on libabigail
version is stored in the CI.

-- 
David Marchand

David Marchand (2):
  devtools: unify configuration for ABI check
  devtools: stop depending on libabigail xml format

 .ci/linux-build.sh            |  4 ----
 .github/workflows/build.yml   |  2 +-
 MAINTAINERS                   |  1 -
 devtools/check-abi.sh         | 17 +++++++++++------
 devtools/gen-abi.sh           | 26 --------------------------
 devtools/libabigail.abignore  | 12 +++++++++---
 devtools/test-meson-builds.sh |  5 -----
 7 files changed, 21 insertions(+), 46 deletions(-)
 delete mode 100755 devtools/gen-abi.sh

-- 
2.38.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/2] devtools: unify configuration for ABI check
  2022-11-03 15:47 [PATCH 0/2] ABI check updates David Marchand
@ 2022-11-03 15:47 ` 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
  2 siblings, 0 replies; 7+ messages in thread
From: David Marchand @ 2022-11-03 15:47 UTC (permalink / raw)
  To: dev; +Cc: thomas, ci

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(-)

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 ;
-- 
2.38.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 2/2] devtools: stop depending on libabigail xml format
  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 ` David Marchand
  2023-03-23 17:15 ` [PATCH v2 0/2] ABI check updates David Marchand
  2 siblings, 0 replies; 7+ messages in thread
From: David Marchand @ 2022-11-03 15:47 UTC (permalink / raw)
  To: dev; +Cc: thomas, ci, Aaron Conole, Michael Santana, Bruce Richardson

A ABI reference depends on:
- DPDK build options,
- toolchain compiler and versions,
- libabigail version.

The reason for the latter point is that, when the ABI reference was
generated, ABI xml files were dumped in a format depending on the
libabigail version.
Those xml files were then later used to compare against modified
code.

There are a few disadvantages with this method:
- since the xml files are dependent on the libabigail version, when
  updating CI environments, a change in the libabigail package requires
  regenerating the ABI references,
- comparing xml files with abidiff is not well tested, as we (DPDK)
  uncovered bugs in libabigail that were not hit with comparing .so,

Switch to comparing .so directly, remove this dependence and update GHA
script.

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 .ci/linux-build.sh            |  4 ----
 .github/workflows/build.yml   |  2 +-
 MAINTAINERS                   |  1 -
 devtools/check-abi.sh         | 15 ++++++++-------
 devtools/gen-abi.sh           | 26 --------------------------
 devtools/test-meson-builds.sh |  5 -----
 6 files changed, 9 insertions(+), 44 deletions(-)
 delete mode 100755 devtools/gen-abi.sh

diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
index baec65a914..ce91b0af04 100755
--- a/.ci/linux-build.sh
+++ b/.ci/linux-build.sh
@@ -143,8 +143,6 @@ fi
 if [ "$ABI_CHECKS" = "true" ]; then
     if [ "$(cat libabigail/VERSION 2>/dev/null)" != "$LIBABIGAIL_VERSION" ]; then
         rm -rf libabigail
-        # if we change libabigail, invalidate existing abi cache
-        rm -rf reference
     fi
 
     if [ ! -d libabigail ]; then
@@ -166,7 +164,6 @@ if [ "$ABI_CHECKS" = "true" ]; then
         meson $OPTS -Dexamples= $refsrcdir $refsrcdir/build
         ninja -C $refsrcdir/build
         DESTDIR=$(pwd)/reference ninja -C $refsrcdir/build install
-        devtools/gen-abi.sh reference
         find reference/usr/local -name '*.a' -delete
         rm -rf reference/usr/local/bin
         rm -rf reference/usr/local/share
@@ -174,7 +171,6 @@ if [ "$ABI_CHECKS" = "true" ]; then
     fi
 
     DESTDIR=$(pwd)/install ninja -C build install
-    devtools/gen-abi.sh install
     devtools/check-abi.sh reference install ${ABI_CHECKS_WARN_ONLY:-}
 fi
 
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index a595c12354..b23f8805cb 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -71,7 +71,7 @@ jobs:
         echo -n '::set-output name=libabigail::'
         echo 'libabigail-${{ matrix.config.os }}'
         echo -n '::set-output name=abi::'
-        echo 'abi-${{ matrix.config.os }}-${{ matrix.config.compiler }}-${{ matrix.config.cross }}-${{ env.LIBABIGAIL_VERSION }}-${{ env.REF_GIT_TAG }}'
+        echo 'abi-${{ matrix.config.os }}-${{ matrix.config.compiler }}-${{ matrix.config.cross }}-${{ env.REF_GIT_TAG }}'
     - name: Retrieve ccache cache
       uses: actions/cache@v2
       with:
diff --git a/MAINTAINERS b/MAINTAINERS
index 1c9922123e..9bafec37e7 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -90,7 +90,6 @@ F: devtools/check-spdx-tag.sh
 F: devtools/check-symbol-change.sh
 F: devtools/check-symbol-maps.sh
 F: devtools/checkpatches.sh
-F: devtools/gen-abi.sh
 F: devtools/get-maintainer.sh
 F: devtools/git-log-fixes.sh
 F: devtools/load-devel-config
diff --git a/devtools/check-abi.sh b/devtools/check-abi.sh
index b1bf633f2a..078de43629 100755
--- a/devtools/check-abi.sh
+++ b/devtools/check-abi.sh
@@ -35,21 +35,22 @@ else
 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
+for lib in $(find $refdir -name "*.so.*" -a ! -type l); do
+	name=$(basename $lib)
+	if grep -q "; SKIP_LIBRARY=${name%.so.*}\>" $(dirname $0)/libabigail.abignore; then
 		echo "Skipped $name" >&2
 		continue
 	fi
-	dump2=$(find $newdir -name $name)
-	if [ -z "$dump2" ] || [ ! -e "$dump2" ]; then
+	# Look for a library with the same major ABI version
+	lib2=$(find $newdir -name "${name%.*}.*" -a ! -type l)
+	if [ -z "$lib2" ] || [ ! -e "$lib2" ]; then
 		echo "Error: cannot find $name in $newdir" >&2
 		error=1
 		continue
 	fi
-	abidiff $ABIDIFF_OPTIONS $dump $dump2 || {
+	abidiff $ABIDIFF_OPTIONS $lib $lib2 || {
 		abiret=$?
-		echo "Error: ABI issue reported for 'abidiff $ABIDIFF_OPTIONS $dump $dump2'" >&2
+		echo "Error: ABI issue reported for 'abidiff $ABIDIFF_OPTIONS $lib $lib2'" >&2
 		error=1
 		echo
 		if [ $(($abiret & 3)) -ne 0 ]; then
diff --git a/devtools/gen-abi.sh b/devtools/gen-abi.sh
deleted file mode 100755
index f15a3b9aaf..0000000000
--- a/devtools/gen-abi.sh
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh -e
-# SPDX-License-Identifier: BSD-3-Clause
-# Copyright (c) 2019 Red Hat, Inc.
-
-if [ $# != 1 ]; then
-	echo "Usage: $0 installdir" >&2
-	exit 1
-fi
-
-installdir=$1
-if [ ! -d $installdir ]; then
-	echo "Error: install directory '$installdir' does not exist." >&2
-	exit 1
-fi
-
-dumpdir=$installdir/dump
-rm -rf $dumpdir
-mkdir -p $dumpdir
-for f in $(find $installdir -name "*.so.*"); do
-	if test -L $f; then
-		continue
-	fi
-
-	libname=$(basename $f)
-	abidw --out-file $dumpdir/${libname%.so*}.dump $f
-done
diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh
index 3a308bc9af..971650e621 100755
--- a/devtools/test-meson-builds.sh
+++ b/devtools/test-meson-builds.sh
@@ -188,7 +188,6 @@ build () # <directory> <target cc | cross file> <ABI check> [meson options]
 				-Dexamples= $*
 			compile $abirefdir/build
 			install_target $abirefdir/build $abirefdir/$targetdir
-			$srcdir/devtools/gen-abi.sh $abirefdir/$targetdir
 
 			# save disk space by removing static libs and apps
 			find $abirefdir/$targetdir/usr/local -name '*.a' -delete
@@ -199,10 +198,6 @@ build () # <directory> <target cc | cross file> <ABI check> [meson options]
 		install_target $builds_dir/$targetdir \
 			$(readlink -f $builds_dir/$targetdir/install)
 		echo "Checking ABI compatibility of $targetdir" >&$verbose
-		echo $srcdir/devtools/gen-abi.sh \
-			$(readlink -f $builds_dir/$targetdir/install) >&$veryverbose
-		$srcdir/devtools/gen-abi.sh \
-			$(readlink -f $builds_dir/$targetdir/install) >&$veryverbose
 		echo $srcdir/devtools/check-abi.sh $abirefdir/$targetdir \
 			$(readlink -f $builds_dir/$targetdir/install) >&$veryverbose
 		$srcdir/devtools/check-abi.sh $abirefdir/$targetdir \
-- 
2.38.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v2 0/2] ABI check updates
  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 ` David Marchand
  2023-03-23 17:15   ` [PATCH v2 1/2] devtools: unify configuration for ABI check David Marchand
                     ` (2 more replies)
  2 siblings, 3 replies; 7+ messages in thread
From: David Marchand @ 2023-03-23 17:15 UTC (permalink / raw)
  To: dev

This series moves ABI exceptions in a single configuration file and
simplifies the ABI check so that no artefact depending on libabigail
version is stored in the CI.

-- 
David Marchand

Changes since v1:
- rebased after abi check parallelisation rework,


David Marchand (2):
  devtools: unify configuration for ABI check
  devtools: stop depending on libabigail xml format

 .ci/linux-build.sh            |  4 ----
 .github/workflows/build.yml   |  2 +-
 MAINTAINERS                   |  1 -
 devtools/check-abi.sh         | 24 +++++++++++++++---------
 devtools/gen-abi.sh           | 27 ---------------------------
 devtools/libabigail.abignore  | 12 +++++++++---
 devtools/test-meson-builds.sh |  5 -----
 7 files changed, 25 insertions(+), 50 deletions(-)
 delete mode 100755 devtools/gen-abi.sh

-- 
2.39.2


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v2 1/2] devtools: unify configuration for ABI check
  2023-03-23 17:15 ` [PATCH v2 0/2] ABI check updates David Marchand
@ 2023-03-23 17:15   ` David Marchand
  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
  2 siblings, 0 replies; 7+ messages in thread
From: David Marchand @ 2023-03-23 17:15 UTC (permalink / raw)
  To: dev; +Cc: Thomas Monjalon

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v2 2/2] devtools: stop depending on libabigail xml format
  2023-03-23 17:15 ` [PATCH v2 0/2] ABI check updates David Marchand
  2023-03-23 17:15   ` [PATCH v2 1/2] devtools: unify configuration for ABI check David Marchand
@ 2023-03-23 17:15   ` David Marchand
  2023-03-28 18:38   ` [PATCH v2 0/2] ABI check updates Thomas Monjalon
  2 siblings, 0 replies; 7+ messages in thread
From: David Marchand @ 2023-03-23 17:15 UTC (permalink / raw)
  To: dev; +Cc: Aaron Conole, Michael Santana, Thomas Monjalon, Bruce Richardson

A ABI reference depends on:
- DPDK build options,
- toolchain compiler and versions,
- libabigail version.

The reason for the latter point is that, when the ABI reference was
generated, ABI xml files were dumped in a format depending on the
libabigail version.
Those xml files were then later used to compare against modified
code.

There are a few disadvantages with this method:
- since the xml files are dependent on the libabigail version, when
  updating CI environments, a change in the libabigail package requires
  regenerating the ABI references,
- comparing xml files with abidiff is not well tested, as we (DPDK)
  uncovered bugs in libabigail that were not hit with comparing .so,

Switch to comparing .so directly, remove this dependence and update GHA
script.

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 .ci/linux-build.sh            |  4 ----
 .github/workflows/build.yml   |  2 +-
 MAINTAINERS                   |  1 -
 devtools/check-abi.sh         | 17 +++++++++--------
 devtools/gen-abi.sh           | 27 ---------------------------
 devtools/test-meson-builds.sh |  5 -----
 6 files changed, 10 insertions(+), 46 deletions(-)
 delete mode 100755 devtools/gen-abi.sh

diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
index 150b38bd7a..9631e342b5 100755
--- a/.ci/linux-build.sh
+++ b/.ci/linux-build.sh
@@ -130,8 +130,6 @@ fi
 if [ "$ABI_CHECKS" = "true" ]; then
     if [ "$(cat libabigail/VERSION 2>/dev/null)" != "$LIBABIGAIL_VERSION" ]; then
         rm -rf libabigail
-        # if we change libabigail, invalidate existing abi cache
-        rm -rf reference
     fi
 
     if [ ! -d libabigail ]; then
@@ -153,7 +151,6 @@ if [ "$ABI_CHECKS" = "true" ]; then
         meson setup $OPTS -Dexamples= $refsrcdir $refsrcdir/build
         ninja -C $refsrcdir/build
         DESTDIR=$(pwd)/reference ninja -C $refsrcdir/build install
-        devtools/gen-abi.sh reference
         find reference/usr/local -name '*.a' -delete
         rm -rf reference/usr/local/bin
         rm -rf reference/usr/local/share
@@ -161,7 +158,6 @@ if [ "$ABI_CHECKS" = "true" ]; then
     fi
 
     DESTDIR=$(pwd)/install ninja -C build install
-    devtools/gen-abi.sh install
     devtools/check-abi.sh reference install ${ABI_CHECKS_WARN_ONLY:-}
 fi
 
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index bbcb535afb..e24e47a216 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -70,7 +70,7 @@ jobs:
       run: |
         echo 'ccache=ccache-${{ matrix.config.os }}-${{ matrix.config.compiler }}-${{ matrix.config.cross }}-'$(date -u +%Y-w%W) >> $GITHUB_OUTPUT
         echo 'libabigail=libabigail-${{ matrix.config.os }}' >> $GITHUB_OUTPUT
-        echo 'abi=abi-${{ matrix.config.os }}-${{ matrix.config.compiler }}-${{ matrix.config.cross }}-${{ env.LIBABIGAIL_VERSION }}-${{ env.REF_GIT_TAG }}' >> $GITHUB_OUTPUT
+        echo 'abi=abi-${{ matrix.config.os }}-${{ matrix.config.compiler }}-${{ matrix.config.cross }}-${{ env.REF_GIT_TAG }}' >> $GITHUB_OUTPUT
     - name: Retrieve ccache cache
       uses: actions/cache@v3
       with:
diff --git a/MAINTAINERS b/MAINTAINERS
index 1a33ad8592..280058adfc 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -94,7 +94,6 @@ F: devtools/check-spdx-tag.sh
 F: devtools/check-symbol-change.sh
 F: devtools/check-symbol-maps.sh
 F: devtools/checkpatches.sh
-F: devtools/gen-abi.sh
 F: devtools/get-maintainer.sh
 F: devtools/git-log-fixes.sh
 F: devtools/load-devel-config
diff --git a/devtools/check-abi.sh b/devtools/check-abi.sh
index f74432be5d..39e3798931 100755
--- a/devtools/check-abi.sh
+++ b/devtools/check-abi.sh
@@ -37,20 +37,21 @@ fi
 
 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
+	lib=$1
+	name=$(basename $lib)
+	if grep -q "; SKIP_LIBRARY=${name%.so.*}\>" $ABIDIFF_SUPPRESSIONS; then
 		echo "Skipped $name" >&2
 		return 0
 	fi
-	dump2=$(find $newdir -name $name)
-	if [ -z "$dump2" ] || [ ! -e "$dump2" ]; then
+	# Look for a library with the same major ABI version
+	lib2=$(find $newdir -name "${name%.*}.*" -a ! -type l)
+	if [ -z "$lib2" ] || [ ! -e "$lib2" ]; then
 		echo "Error: cannot find $name in $newdir" >&2
 		return 1
 	fi
-	abidiff $ABIDIFF_OPTIONS $dump $dump2 || {
+	abidiff $ABIDIFF_OPTIONS $lib $lib2 || {
 		abiret=$?
-		echo "Error: ABI issue reported for abidiff $ABIDIFF_OPTIONS $dump $dump2" >&2
+		echo "Error: ABI issue reported for abidiff $ABIDIFF_OPTIONS $lib $lib2" >&2
 		if [ $(($abiret & 3)) -ne 0 ]; then
 			echo "ABIDIFF_ERROR|ABIDIFF_USAGE_ERROR, this could be a script or environment issue." >&2
 		fi
@@ -65,7 +66,7 @@ export diff_func='run_diff() {
 }'
 
 error=
-find $refdir -name "*.dump" |
+find $refdir -name "*.so.*" -a ! -type l |
 xargs -n1 -P0 sh -c 'eval "$diff_func"; run_diff $0' ||
 error=1
 
diff --git a/devtools/gen-abi.sh b/devtools/gen-abi.sh
deleted file mode 100755
index 61f7510ea1..0000000000
--- a/devtools/gen-abi.sh
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh -e
-# SPDX-License-Identifier: BSD-3-Clause
-# Copyright (c) 2019 Red Hat, Inc.
-
-if [ $# != 1 ]; then
-	echo "Usage: $0 installdir" >&2
-	exit 1
-fi
-
-installdir=$1
-if [ ! -d $installdir ]; then
-	echo "Error: install directory '$installdir' does not exist." >&2
-	exit 1
-fi
-
-dumpdir=$installdir/dump
-rm -rf $dumpdir
-mkdir -p $dumpdir
-for f in $(find $installdir -name "*.so.*"); do
-	if test -L $f; then
-		continue
-	fi
-
-	libname=$(basename $f)
-	echo $dumpdir/${libname%.so*}.dump $f
-done |
-xargs -n2 -P0 abidw --out-file
diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh
index 48f4e52df3..9131088c9d 100755
--- a/devtools/test-meson-builds.sh
+++ b/devtools/test-meson-builds.sh
@@ -204,7 +204,6 @@ build () # <directory> <target cc | cross file> <ABI check> [meson options]
 				-Dexamples= $*
 			compile $abirefdir/build
 			install_target $abirefdir/build $abirefdir/$targetdir
-			$srcdir/devtools/gen-abi.sh $abirefdir/$targetdir
 
 			# save disk space by removing static libs and apps
 			find $abirefdir/$targetdir/usr/local -name '*.a' -delete
@@ -215,10 +214,6 @@ build () # <directory> <target cc | cross file> <ABI check> [meson options]
 		install_target $builds_dir/$targetdir \
 			$(readlink -f $builds_dir/$targetdir/install)
 		echo "Checking ABI compatibility of $targetdir" >&$verbose
-		echo $srcdir/devtools/gen-abi.sh \
-			$(readlink -f $builds_dir/$targetdir/install) >&$veryverbose
-		$srcdir/devtools/gen-abi.sh \
-			$(readlink -f $builds_dir/$targetdir/install) >&$veryverbose
 		echo $srcdir/devtools/check-abi.sh $abirefdir/$targetdir \
 			$(readlink -f $builds_dir/$targetdir/install) >&$veryverbose
 		$srcdir/devtools/check-abi.sh $abirefdir/$targetdir \
-- 
2.39.2


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 0/2] ABI check updates
  2023-03-23 17:15 ` [PATCH v2 0/2] ABI check updates David Marchand
  2023-03-23 17:15   ` [PATCH v2 1/2] devtools: unify configuration for ABI check David Marchand
  2023-03-23 17:15   ` [PATCH v2 2/2] devtools: stop depending on libabigail xml format David Marchand
@ 2023-03-28 18:38   ` Thomas Monjalon
  2 siblings, 0 replies; 7+ messages in thread
From: Thomas Monjalon @ 2023-03-28 18:38 UTC (permalink / raw)
  To: David Marchand; +Cc: dev

23/03/2023 18:15, David Marchand:
> This series moves ABI exceptions in a single configuration file and
> simplifies the ABI check so that no artefact depending on libabigail
> version is stored in the CI.

Applied, thanks.



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-03-28 18:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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   ` [PATCH v2 1/2] devtools: unify configuration for ABI check David Marchand
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

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).