From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vk1-f176.google.com (mail-vk1-f176.google.com [209.85.221.176]) by dpdk.org (Postfix) with ESMTP id 298341B127 for ; Tue, 18 Dec 2018 15:13:00 +0100 (CET) Received: by mail-vk1-f176.google.com with SMTP id w72so3695713vkd.5 for ; Tue, 18 Dec 2018 06:13:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=biR+MJ0vCkjdT6kNI97uX6ucvF+BQfHO351Xa0hur5Y=; b=I/LqETMS7z3npDRJeXz7DDtHdyH4XXo+b016ZRcandZZSpFVCdynjDED2vHS6pe29+ B377AduxViMixuaWTxV1LLL2Igrjw5AMhGTmCij46LZZuhfBtmOzgieK5hDZe63LOIdF M0LzNulCIH0O4uqJVTcY52C/yVEEKQbqH/frKXUVPy14M4iKC3voHHG79Zmlo87ZkB4b PKHa4ZuyGX7drb/6upDoAV32QB6snRK8470C5lZOTVrOhqA6q9n4YZLX0V/1lMQMOCTP RV4Tbfd7aUDqh+mISpH2HLUpo/dInxgRLGqH5XL6ilJ2plheMlTnB2CY67HY0Jestez0 x6Zw== X-Gm-Message-State: AA+aEWaneyuHM9fM8QPGN0Gdu+4EY5NL95MENESgcSwEJqKfFI+Qr5C4 qp681tvIe/H4i13bdeYKI5ed7GucKK3mFwT8q/LZvQ== X-Google-Smtp-Source: AFSGD/XyUeHetSZbGSZU7//CcwAAlMRdwHPZ4rk2LBVMGAEHplqRcS0niYa4MKazvQDx0qW9aQXdz60kHrwiwNidsog= X-Received: by 2002:a1f:ac4:: with SMTP id 187mr7592345vkk.31.1545142379218; Tue, 18 Dec 2018 06:12:59 -0800 (PST) MIME-Version: 1.0 References: <1545141782-31841-1-git-send-email-arnon@qwilt.com> In-Reply-To: <1545141782-31841-1-git-send-email-arnon@qwilt.com> From: David Marchand Date: Tue, 18 Dec 2018 15:12:48 +0100 Message-ID: To: Arnon Warshavsky Cc: "Yigit, Ferruh" , ajit.khaparde@broadcom.com, thomasm@mellanox.com, dev@dpdk.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH v1] devtools: fix error propagation from check-forbidden-tokens.awk 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: , X-List-Received-Date: Tue, 18 Dec 2018 14:13:00 -0000 On Tue, Dec 18, 2018 at 3:03 PM Arnon Warshavsky wrote: > Bugzilla ID: 165 > Fixes: 4d4c612e6a30 ("devtools: check wrong svg include in guides") > Signed-off-by: Arnon Warshavsky > > Explicitly collect the output and result of the > multiple awk script calls, print and return error > if any of them fails > --- > devtools/checkpatches.sh | 21 +++++++++++++++++---- > 1 file changed, 17 insertions(+), 4 deletions(-) > > diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh > index ee8debe..df4336c 100755 > --- a/devtools/checkpatches.sh > +++ b/devtools/checkpatches.sh > @@ -44,22 +44,35 @@ print_usage () { > } > > check_forbidden_additions() { # > + res=0 > + > # refrain from new additions of rte_panic() and rte_exit() > # multiple folders and expressions are separated by spaces > - awk -v FOLDERS="lib drivers" \ > + result=$(awk -v FOLDERS="lib drivers" \ > -v EXPRESSIONS="rte_panic\\\( rte_exit\\\(" \ > -v RET_ON_FAIL=1 \ > -v MESSAGE='Using rte_panic/rte_exit' \ > -f $(dirname $(readlink -e $0))/check-forbidden-tokens.awk > \ > - "$1" > + "$1") > + if [ $? -ne 0 ] ; then > + echo $result > + res=1 > + fi > + > # svg figures must be included with wildcard extension > # because of png conversion for pdf docs > - awk -v FOLDERS='doc' \ > + result=$(awk -v FOLDERS='doc' \ > -v EXPRESSIONS='::[[:space:]]*[^[:space:]]*\\.svg' \ > -v RET_ON_FAIL=1 \ > -v MESSAGE='Using explicit .svg extension instead of .*' \ > -f $(dirname $(readlink -e $0))/check-forbidden-tokens.awk > \ > - "$1" > + "$1") > + if [ $? -ne 0 ] ; then > + echo $result > + res=1 > + fi > + > + return $res > } > > number=0 > -- > 1.8.3.1 > How about just this change ? diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh index ee8debe..8385384 100755 --- a/devtools/checkpatches.sh +++ b/devtools/checkpatches.sh @@ -51,7 +51,7 @@ check_forbidden_additions() { # -v RET_ON_FAIL=1 \ -v MESSAGE='Using rte_panic/rte_exit' \ -f $(dirname $(readlink -e $0))/check-forbidden-tokens.awk \ - "$1" + "$1" && # svg figures must be included with wildcard extension # because of png conversion for pdf docs awk -v FOLDERS='doc' \ -- David Marchand