From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id B4C1C239 for ; Wed, 31 Oct 2018 16:51:25 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 5C3022226C; Wed, 31 Oct 2018 11:51:24 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 31 Oct 2018 11:51:24 -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=mesmtp; bh=gLeUzE23g2tLMrZLIV/4ILv1sCvkKp79+FPajFgoW58=; b=EuwjHySgwZQu d3iY5zCKsQQKtLhXGPQVfW+DoZirjp/kuC0X515Scuhl5jnwcLCQauUS7TGtW0YN vo3AIm0u4OGAKoVTtyK/QxCcgeYfqVEQoxMwrskFky/i9+4p/10BVtRPJ5PjPRrP ksA9He8ljWMo6xJILsk3QVo8c4AEiIo= 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=fm1; bh=gLeUzE23g2tLMrZLIV/4ILv1sCvkKp79+FPajFgoW 58=; b=oVLwKasvuyfK4/Ue6gkTIROrNhgQvy2IcbjZpr65hXHwojtnCkWjWIQEh ecNLNPnTNgbF5fYFStuPZ35PfcGExAMRiF6Obj20XOvlDovfKmcOI4JmWs41lczP EGF/gPHbrH4HYQU/D7/Vu5/DkShCpvwJCaq91J8QPr6tRejJWfltS4yvIzsKG+s+ 7KnZPas/z5NMHP2kctwC5h53cJ7s+/Fo68jj4BkxRKX50Ea5VgobGmp+kLez7Ha6 OamwWksKkwJ0Sm0pVKPveJtXXjV7UFb2lrv3dcVe/VJff6o6FfFyMg0l32Y3uCkM 09Rp0LTqJUev9Xd7QAfouoRT4AB0g== X-ME-Sender: 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 D5602E454E; Wed, 31 Oct 2018 11:51:22 -0400 (EDT) From: Thomas Monjalon To: Arnon Warshavsky Cc: dev@dpdk.org, john.mcnamara@intel.com, marko.kovacevic@intel.com Date: Wed, 31 Oct 2018 16:51:28 +0100 Message-ID: <2386985.QZ5W8hjx9Q@xps> In-Reply-To: References: <20181031110548.31184-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] devtools: check wrong svg include in patches 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: Wed, 31 Oct 2018 15:51:26 -0000 Hi Arnon, 31/10/2018 16:46, Arnon Warshavsky: > Hi Thomas > > Glad the function gets to be reused :) > Now that it has more than one consumer apparently the function > check_forbidden_additions() cannot be fed by stdin. > I got it working with 3 changes: Thanks for the help > 1. call the awk script with $tmpinput as a parameter instead of stdin. This > aligns with Neils changes from previous version > 2. Escaped the spaces from the regex , as the awk script uses spaces to > tell multiple forbidden expressions apart (which now I see sucks ...), > and added an extra backslash Are you sure we need an extra backslash? Note that I am using single quotes. I thought we need only 2 backslashes in this case. > 3. call the function with no parameters (not needed anymore) > > awk -v FOLDERS="lib drivers" \ > -v EXPRESSIONS="rte_panic\\\( rte_exit\\\(" \ > -v RET_ON_FAIL=1 \ > - -f $(dirname $(readlink -e $0))/check-forbidden-tokens.awk - > + -f $(dirname $(readlink -e $0))/check-forbidden-tokens.awk > *$tmpinput* > + > + awk -v FOLDERS='doc' \ > + -v EXPRESSIONS='*::[[:space:]]*[^[:space:]]*\\\.svg*' \ > + -v RET_ON_FAIL=1 \ > + -f $(dirname $(readlink -e $0))/check-forbidden-tokens.awk > *$tmpinput* > > ! $verbose || printf '\nChecking forbidden tokens additions:\n' > - report=$(check_forbidden_additions *<"$tmpinput"*) > + report=$(check_forbidden_additions)