From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vs1-f42.google.com (mail-vs1-f42.google.com [209.85.217.42]) by dpdk.org (Postfix) with ESMTP id 93F3C1BBEE for ; Tue, 18 Dec 2018 15:49:28 +0100 (CET) Received: by mail-vs1-f42.google.com with SMTP id y27so10157951vsi.1 for ; Tue, 18 Dec 2018 06:49:28 -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=0J7hPNi32/JjSfdI4u5xNKpyODu6uCgH6+zgtaGJSKw=; b=aGs687CDBkhD8w+pcr0grkroIPuzXimyQm4ZFmqpMjQIs1pcht0p6xnfM5rXA6lI0c RuJktLOji5Ka5ZEZgqTI7t6R9DlJx4dvp++j+/ztnyXXPL1WNIJJMkKPwljSBB+Np3+4 ZDEok7k0HXNAhIehJENXrqgLe9CkF7PFoJUT4/aO5oNIUeCuuizp3ab0JiY4eBHVIcBW tkbgdfZX/qNIDh8U12lLE58WYN2pkXSSFmWoRXUJq1RKJ2zvhxd84OJ1kpV1UIKpoVBa 4GuNN0blckKBMNQf6zRrN5DDLjko/eUSfnwdu26ssIq9DtHy8lluPvx6ZSbDh/1RgYFm bZ1Q== X-Gm-Message-State: AA+aEWYqohhJ0YyDfNB/1gdVTEVHPs0+U79hijFyZVsgI2JL1uQ9tQce VpaJbAsNSEMb9u3ZbErVnpCUkdzkHZvUnBWdEok7eA== X-Google-Smtp-Source: AFSGD/WNsBpauhbTB3bf9b5NjiscjebgqCP1cVj4sssyOYInyz0otHViQYYLhXVdgyswyWeswFVvhADLMbL69Wk4Vzs= X-Received: by 2002:a67:f085:: with SMTP id i5mr3577858vsl.198.1545144567771; Tue, 18 Dec 2018 06:49:27 -0800 (PST) MIME-Version: 1.0 References: <1545141782-31841-1-git-send-email-arnon@qwilt.com> <20602834.ZYhc1qxlTj@xps> In-Reply-To: From: David Marchand Date: Tue, 18 Dec 2018 15:49:16 +0100 Message-ID: To: Arnon Warshavsky Cc: Thomas Monjalon , dev@dpdk.org, "Yigit, Ferruh" , Ajit Khaparde 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:49:28 -0000 On Tue, Dec 18, 2018 at 3:45 PM Arnon Warshavsky wrote: > The reason I did not use the && approach is that if both checks have > errors, > only the first will be reported and we want all errors to be reported at > once > without discovering them one by one after every fix. > > Ok, then: diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh index ee8debe..7457f01 100755 --- a/devtools/checkpatches.sh +++ b/devtools/checkpatches.sh @@ -46,12 +46,13 @@ print_usage () { check_forbidden_additions() { # # refrain from new additions of rte_panic() and rte_exit() # multiple folders and expressions are separated by spaces + ret=0 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" || ret=1 # svg figures must be included with wildcard extension # because of png conversion for pdf docs awk -v FOLDERS='doc' \ @@ -59,7 +60,9 @@ check_forbidden_additions() { # -v RET_ON_FAIL=1 \ -v MESSAGE='Using explicit .svg extension instead of .*' \ -f $(dirname $(readlink -e $0))/check-forbidden-tokens.awk \ - "$1" + "$1" || ret=1 + + return $ret } number=0 No need for all those checks on $? and the output saving. -- David Marchand