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 CCED4A052B; Fri, 31 Jul 2020 00:51:01 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1A1882BB8; Fri, 31 Jul 2020 00:51:01 +0200 (CEST) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id 627D111A2 for ; Fri, 31 Jul 2020 00:51:00 +0200 (CEST) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id D8DF55C00F1; Thu, 30 Jul 2020 18:50:59 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Thu, 30 Jul 2020 18:50:59 -0400 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:content-type; s=fm1; bh= lCdQJ72eLJb9TisLnmoNpU66rfa9xBT2LEPLk/wDyEM=; b=YROZZhgVlySoKS/b Dbz3WXrf1pSLpcbqXTdh5uW1BkyzXWQFVDa148J17TTA8Az/I/yebEquxBKhq2SH U8fkFGuCnthEnygbE4mAi9QvAAkK2gmkrH/yh6rg2+q+2W2m8MopfSwu73WEdJ0a u4zU3y89c2Il0eLhTKX6uML0w5e1HtEnKUhI1tWFTMk8wB+NvdsJtPOc2GglKlVB shpgoKshVDNSUFVakHDOw5rxSz8nxBH0oRJRJq6jlzkmWsC1yI44Q+cNgnHAdAeB Ke6s6j3nk/A4lAuO354At6rZPgoEoNU4zq5fa3TzJGNkh0ZJG39dkw4plLx6Hqy7 RWyWkg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :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=fm3; bh=lCdQJ72eLJb9TisLnmoNpU66rfa9xBT2LEPLk/wDy EM=; b=sR2XJ9KtN7AnZlIjbFjGgUITy+OnZjQo2xFiFZiWYK7TVsSybnHCRg3tv xROF+KE2EkgP+ejiOrtk/rgb3QyXGR719RrXfkXauJxbDXU70NJ0d4GOVgv34SDk vlfvDq9NfAY3PGjxVROMs2Aaf/KHCm3UXtIY4BBTcpZZXc9uZuXV4vFv+2YXzWI6 j1h7XsUHPg1M81jhJvQDqstrojEN9xbqDtFf+URiGVFogKcvSsGmo5H3aI8rx4/H y+hzXWp2rTA48UdNWWT+VBGtC2bas8EVauRNHrxbM6c1SWGvo/N9KHmxbS0VFACB 5QN90NNnPV54nYuCRfNTVm21NoLhw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrieejgdduhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucggtf frrghtthgvrhhnpedugefgvdefudfftdefgeelgffhueekgfffhfeujedtteeutdejueei iedvffegheenucfkphepjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhho nhdrnhgvth X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 618BC30600A3; Thu, 30 Jul 2020 18:50:58 -0400 (EDT) From: Thomas Monjalon To: Ciara Power Cc: john.mcnamara@intel.com, marko.kovacevic@intel.com, dev@dpdk.org, ferruh.yigit@intel.com Date: Fri, 31 Jul 2020 00:50:57 +0200 Message-ID: <5517525.32dCRi12KZ@thomas> In-Reply-To: <20200623092935.38459-3-ciara.power@intel.com> References: <20200128150256.14339-1-ciara.power@intel.com> <20200623092935.38459-1-ciara.power@intel.com> <20200623092935.38459-3-ciara.power@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v4 2/2] devtools: added stats print 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" 23/06/2020 11:29, Ciara Power: > When all checks are completed on the specified commit logs, the script > indicates if all are valid, or if there were some failures. > > Signed-off-by: Ciara Power > Acked-by: Ferruh Yigit > > --- > v2: Added appropriate exit codes based on failure status. > --- > devtools/check-git-log.sh | 45 +++++++++++++++++++++++++-------------- > 1 file changed, 29 insertions(+), 16 deletions(-) > > diff --git a/devtools/check-git-log.sh b/devtools/check-git-log.sh > index e5b430268..86746c4ad 100755 > --- a/devtools/check-git-log.sh > +++ b/devtools/check-git-log.sh > -[ -z "$bad" ] || printf "Wrong headline format:\n$bad\n" > +[ -z "$bad" ] || { printf "Wrong headline format:\n$bad\n" && failure=true;} [...] > +total=$(echo "$commits" | wc -l) > +if [ -n "$failure" ] ; then > + printf "\nInvalid patch(es) found - checked $total patch" > +else > + printf "\n$total/$total valid patch" > +fi > +[ $total -le 1 ] || printf 'es' > +printf '\n' > +[ -n "$failure" ] && exit 1 || exit 0 If $failure is initialized to false, it can be used as a real boolean: -if [ -n "$failure" ] ; then +if $failure ; then printf "\nInvalid patch(es) found - checked $total patch" else printf "\n$total/$total valid patch" fi [ $total -le 1 ] || printf 'es' printf '\n' -[ -n "$failure" ] && exit 1 || exit 0 +$failure && exit 1 || exit 0 I take the liberty of doing this small improvement without asking for a v5.