From patchwork Thu Mar 23 17:15:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Marchand X-Patchwork-Id: 125465 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C9FC342824; Thu, 23 Mar 2023 18:15:14 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 69E384111C; Thu, 23 Mar 2023 18:15:13 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 4FE4F4111C for ; Thu, 23 Mar 2023 18:15:10 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1679591710; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5itaAo97rceHknvwpgS4KMpZIkjkQEGbYtJqHyaJD9M=; b=al2AOhT0SXYkIKV1Rkbysr8yfKQiDN6xTFd/Joxq1cg0bDwNQld21gnww5wR61/uixq9R8 Y1Sk9gyUanoFqrnAoZfm4VMktUjbj4bhoknb9zYfr6vwHZBqbBEIlK0SgmlEqujLjQ+JR7 j5FY+O6JD6ElT3FSrPLincIps+/m2rM= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-524-R2333QZ_NoG4-YJKf6HuSQ-1; Thu, 23 Mar 2023 13:15:08 -0400 X-MC-Unique: R2333QZ_NoG4-YJKf6HuSQ-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 45D0C886468; Thu, 23 Mar 2023 17:15:08 +0000 (UTC) Received: from dmarchan.redhat.com (unknown [10.45.224.63]) by smtp.corp.redhat.com (Postfix) with ESMTP id 96DD4140E950; Thu, 23 Mar 2023 17:15:07 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: Thomas Monjalon Subject: [PATCH v2 1/2] devtools: unify configuration for ABI check Date: Thu, 23 Mar 2023 18:15:01 +0100 Message-Id: <20230323171502.3124049-2-david.marchand@redhat.com> In-Reply-To: <20230323171502.3124049-1-david.marchand@redhat.com> References: <20221103154717.22368-1-david.marchand@redhat.com> <20230323171502.3124049-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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 --- 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 ;