From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 94D18A09F0; Thu, 17 Dec 2020 10:06:10 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D0921C9E7; Thu, 17 Dec 2020 10:06:08 +0100 (CET) Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) by dpdk.org (Postfix) with ESMTP id 8C1B9C9E4 for ; Thu, 17 Dec 2020 10:06:07 +0100 (CET) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id 3723B858; Thu, 17 Dec 2020 04:06:04 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Thu, 17 Dec 2020 04:06:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm3; bh=GBOMd/yGx/tOi xkd5JQ55Mg30wKmqgLQUoT9Z+xZspE=; b=BKap9i8rigSxXqjbsL/fD6Ctirhb7 G6YU3DXjjCAngz/WHSSTDAubjk2gsGmJDg7Oo0X5/+YTAl0CleT3bCWGDpVUetjq KtS8XSjM0gZuTkToW2NJv6bXJ24Hjdzh5oNYz4vI3uYVXBpmnL+99F3hWY0wLt5o IG5HhMwOvG076tL/bcMKAyK91eA52y1ZT5VX+tMGb/RDtGt7S6TFJQW5gg4jRrqB DKxZf87qHcEipfu9vWIAamW3yyKm3RQxk7gRL/tqdEjsHfjjtWFtf88O//lrMwEm +hN6Ci2j16VqcH9dmqLcgvw0XcE0NZ6lz2Tj+8bpWhmR/GYhv18xiu2dQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=GBOMd/yGx/tOixkd5JQ55Mg30wKmqgLQUoT9Z+xZspE=; b=UFb8gxP3 K1xNsARGpRObMUP3o4AmYPEYku8MJNWcUVD5xBz09DjkCo8mojHujOWIpf6PaOos Gd1chx0mwF2kltnrYNl5rXNb4a5Bzj6VXIr1DHFuJHnNC8ew3wIm8CWepSqrR05O BuqmZdQHfYNW7enB7aJvr2uCz0Tz5H5S84cFLVtGYYoXqCrwYm7dvcsuafU0srwh p3cQF8v/qgF1i5xZovtKyRiB6VbBH2f3OjY6G68sNuBEzutGkxXpznZ0/xxo3iL3 3CHnBZ2yEZXKc4xLqxBdAo8aCrOPy/flvOmusHZHL/m/kwp/aaVIOJkfXCwzie6T a6k6fxBzE5Akyg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrudelfedguddvlecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpedvhefgiedvjeegtdevheefhfetleefgfeivefgffevfeejgedt gfeutdehtdegveenucfkphepjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrh fuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgr lhhonhdrnhgvth X-ME-Proxy: Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id D8422240065; Thu, 17 Dec 2020 04:06:01 -0500 (EST) From: Thomas Monjalon To: dev@dpdk.org Cc: david.marchand@redhat.com, bruce.richardson@intel.com, Ray Kinsella , Neil Horman Date: Thu, 17 Dec 2020 10:05:53 +0100 Message-Id: <20201217090553.3503550-1-thomas@monjalon.net> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201207173235.1397351-1-thomas@monjalon.net> References: <20201207173235.1397351-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 1/1] devtools: adjust verbosity of ABI check X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The scripts gen-abi.sh and check-abi.sh are updated to print error messages to stderr so they are likely never ignored. When called from test-meson-builds.sh, the standard messages on stdout can be more quiet depending on the verbosity settings. The beginning of the ABI check is announced in verbose mode. The commands are printed in very verbose mode. The check result details are available in verbose mode. Signed-off-by: Thomas Monjalon --- v2: remove abidiff command from stdout (already printed on error) --- devtools/check-abi.sh | 20 ++++++++++---------- devtools/gen-abi.sh | 4 ++-- devtools/test-meson-builds.sh | 9 +++++++-- 3 files changed, 19 insertions(+), 14 deletions(-) diff --git a/devtools/check-abi.sh b/devtools/check-abi.sh index ab6748cfbc..9835e346da 100755 --- a/devtools/check-abi.sh +++ b/devtools/check-abi.sh @@ -3,7 +3,7 @@ # Copyright (c) 2019 Red Hat, Inc. if [ $# != 2 ] && [ $# != 3 ]; then - echo "Usage: $0 refdir newdir [warnonly]" + echo "Usage: $0 refdir newdir [warnonly]" >&2 exit 1 fi @@ -13,23 +13,23 @@ warnonly=${3:-} ABIDIFF_OPTIONS="--suppr $(dirname $0)/libabigail.abignore --no-added-syms" if [ ! -d $refdir ]; then - echo "Error: reference directory '$refdir' does not exist." + echo "Error: reference directory '$refdir' does not exist." >&2 exit 1 fi incdir=$(find $refdir -type d -a -name include) if [ -z "$incdir" ] || [ ! -e "$incdir" ]; then - echo "WARNING: could not identify a include directory for $refdir, expect false positives..." + echo "WARNING: could not identify an include directory for $refdir, expect false positives..." >&2 else ABIDIFF_OPTIONS="$ABIDIFF_OPTIONS --headers-dir1 $incdir" fi if [ ! -d $newdir ]; then - echo "Error: directory to check '$newdir' does not exist." + echo "Error: directory to check '$newdir' does not exist." >&2 exit 1 fi incdir2=$(find $newdir -type d -a -name include) if [ -z "$incdir2" ] || [ ! -e "$incdir2" ]; then - echo "WARNING: could not identify a include directory for $newdir, expect false positives..." + echo "WARNING: could not identify an include directory for $newdir, expect false positives..." >&2 else ABIDIFF_OPTIONS="$ABIDIFF_OPTIONS --headers-dir2 $incdir2" fi @@ -46,23 +46,23 @@ for dump in $(find $refdir -name "*.dump"); do fi dump2=$(find $newdir -name $name) if [ -z "$dump2" ] || [ ! -e "$dump2" ]; then - echo "Error: can't find $name in $newdir" + echo "Error: cannot find $name in $newdir" >&2 error=1 continue fi abidiff $ABIDIFF_OPTIONS $dump $dump2 || { abiret=$? - echo "Error: ABI issue reported for 'abidiff $ABIDIFF_OPTIONS $dump $dump2'" + echo "Error: ABI issue reported for 'abidiff $ABIDIFF_OPTIONS $dump $dump2'" >&2 error=1 echo if [ $(($abiret & 3)) -ne 0 ]; then - echo "ABIDIFF_ERROR|ABIDIFF_USAGE_ERROR, this could be a script or environment issue." + echo "ABIDIFF_ERROR|ABIDIFF_USAGE_ERROR, this could be a script or environment issue." >&2 fi if [ $(($abiret & 4)) -ne 0 ]; then - echo "ABIDIFF_ABI_CHANGE, this change requires a review (abidiff flagged this as a potential issue)." + echo "ABIDIFF_ABI_CHANGE, this change requires a review (abidiff flagged this as a potential issue)." >&2 fi if [ $(($abiret & 8)) -ne 0 ]; then - echo "ABIDIFF_ABI_INCOMPATIBLE_CHANGE, this change breaks the ABI." + echo "ABIDIFF_ABI_INCOMPATIBLE_CHANGE, this change breaks the ABI." >&2 fi echo } diff --git a/devtools/gen-abi.sh b/devtools/gen-abi.sh index c44b0e228a..f15a3b9aaf 100755 --- a/devtools/gen-abi.sh +++ b/devtools/gen-abi.sh @@ -3,13 +3,13 @@ # Copyright (c) 2019 Red Hat, Inc. if [ $# != 1 ]; then - echo "Usage: $0 installdir" + echo "Usage: $0 installdir" >&2 exit 1 fi installdir=$1 if [ ! -d $installdir ]; then - echo "Error: install directory '$installdir' does not exist." + echo "Error: install directory '$installdir' does not exist." >&2 exit 1 fi diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh index ed44d4ffb1..16a81b6241 100755 --- a/devtools/test-meson-builds.sh +++ b/devtools/test-meson-builds.sh @@ -194,10 +194,15 @@ build () # 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) + $(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 \ - $(readlink -f $builds_dir/$targetdir/install) + $(readlink -f $builds_dir/$targetdir/install) >&$verbose fi } -- 2.29.2