devtools: skip experimental libraries in ABI check

Message ID 20200221161005.18557-1-david.marchand@redhat.com (mailing list archive)
State Accepted, archived
Delegated to: David Marchand
Headers
Series devtools: skip experimental libraries in ABI check |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/Intel-compilation fail apply issues
ci/travis-robot success Travis build: passed

Commit Message

David Marchand Feb. 21, 2020, 4:10 p.m. UTC
  We don't provide ABI compatibility for experimental libraries.
Skip those libraries by catching a soname containing a version starting
with '0.'.

Align the special case for the glue libraries by using the soname too.
Once libabigail has support for it, we will have a single type of rule.

Fixes: 777014e56d07 ("devtools: add ABI checks")

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 devtools/check-abi.sh | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
  

Comments

Ferruh Yigit Feb. 21, 2020, 4:13 p.m. UTC | #1
On 2/21/2020 4:10 PM, David Marchand wrote:
> We don't provide ABI compatibility for experimental libraries.
> Skip those libraries by catching a soname containing a version starting
> with '0.'.

I am not familiar with the script and how libabigail works, but +1 to the idea.

> 
> Align the special case for the glue libraries by using the soname too.
> Once libabigail has support for it, we will have a single type of rule.
> 
> Fixes: 777014e56d07 ("devtools: add ABI checks")
> 
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
>  devtools/check-abi.sh | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/devtools/check-abi.sh b/devtools/check-abi.sh
> index 0b4d1a37e..dd9120e69 100755
> --- a/devtools/check-abi.sh
> +++ b/devtools/check-abi.sh
> @@ -40,8 +40,13 @@ for dump in $(find $refdir -name "*.dump"); do
>  	# skip glue drivers, example librte_pmd_mlx5_glue.dump
>  	# We can't rely on a suppression rule for now:
>  	# https://sourceware.org/bugzilla/show_bug.cgi?id=25480
> -	if [ "$name" != "${name%%_glue.dump}" ]; then
> -		echo "Skipping ${dump}..."
> +	if grep -qE "\<soname='[^']*_glue\.so\.[^']*'" $dump; then
> +		echo "Skipped glue library $name."
> +		continue
> +	fi
> +	# skip experimental libraries, with a sover starting with 0.
> +	if grep -qE "\<soname='[^']*\.so\.0\.[^']*'" $dump; then
> +		echo "Skipped experimental library $name."
>  		continue
>  	fi
>  	dump2=$(find $newdir -name $name)
>
  
Thomas Monjalon Feb. 21, 2020, 4:30 p.m. UTC | #2
21/02/2020 17:13, Ferruh Yigit:
> On 2/21/2020 4:10 PM, David Marchand wrote:
> > We don't provide ABI compatibility for experimental libraries.
> > Skip those libraries by catching a soname containing a version starting
> > with '0.'.
> 
> I am not familiar with the script and how libabigail works, but +1 to the idea.
> 
> > 
> > Align the special case for the glue libraries by using the soname too.
> > Once libabigail has support for it, we will have a single type of rule.
> > 
> > Fixes: 777014e56d07 ("devtools: add ABI checks")
> > 
> > Signed-off-by: David Marchand <david.marchand@redhat.com>

Acked-by: Thomas Monjalon <thomas@monjalon.net>
  
David Marchand Feb. 21, 2020, 4:40 p.m. UTC | #3
On Fri, Feb 21, 2020 at 5:30 PM Thomas Monjalon <thomas@monjalon.net> wrote:
>
> 21/02/2020 17:13, Ferruh Yigit:
> > On 2/21/2020 4:10 PM, David Marchand wrote:
> > > We don't provide ABI compatibility for experimental libraries.
> > > Skip those libraries by catching a soname containing a version starting
> > > with '0.'.
> >
> > I am not familiar with the script and how libabigail works, but +1 to the idea.
> >
> > >
> > > Align the special case for the glue libraries by using the soname too.
> > > Once libabigail has support for it, we will have a single type of rule.
> > >
> > > Fixes: 777014e56d07 ("devtools: add ABI checks")
> > >
> > > Signed-off-by: David Marchand <david.marchand@redhat.com>
>
> Acked-by: Thomas Monjalon <thomas@monjalon.net>

Applied.



--
David Marchand
  

Patch

diff --git a/devtools/check-abi.sh b/devtools/check-abi.sh
index 0b4d1a37e..dd9120e69 100755
--- a/devtools/check-abi.sh
+++ b/devtools/check-abi.sh
@@ -40,8 +40,13 @@  for dump in $(find $refdir -name "*.dump"); do
 	# skip glue drivers, example librte_pmd_mlx5_glue.dump
 	# We can't rely on a suppression rule for now:
 	# https://sourceware.org/bugzilla/show_bug.cgi?id=25480
-	if [ "$name" != "${name%%_glue.dump}" ]; then
-		echo "Skipping ${dump}..."
+	if grep -qE "\<soname='[^']*_glue\.so\.[^']*'" $dump; then
+		echo "Skipped glue library $name."
+		continue
+	fi
+	# skip experimental libraries, with a sover starting with 0.
+	if grep -qE "\<soname='[^']*\.so\.0\.[^']*'" $dump; then
+		echo "Skipped experimental library $name."
 		continue
 	fi
 	dump2=$(find $newdir -name $name)