From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.tuxdriver.com (charlotte.tuxdriver.com [70.61.120.58]) by dpdk.org (Postfix) with ESMTP id DBC9F235 for ; Thu, 19 Jul 2018 13:15:12 +0200 (CEST) Received: from cpe-2606-a000-111b-6075-6b03-d099-2fb0-21be.dyn6.twc.com ([2606:a000:111b:6075:6b03:d099:2fb0:21be] helo=localhost) by smtp.tuxdriver.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1fg6tg-0003bx-GU; Thu, 19 Jul 2018 07:15:11 -0400 Date: Thu, 19 Jul 2018 07:14:27 -0400 From: Neil Horman To: Thomas Monjalon Cc: dev@dpdk.org Message-ID: <20180719111427.GA20362@hmswarspite.think-freely.org> References: <20180718210609.32547-1-thomas@monjalon.net> <20180718212658.24756-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180718212658.24756-1-thomas@monjalon.net> User-Agent: Mutt/1.10.0 (2018-05-17) X-Spam-Score: -2.9 (--) X-Spam-Status: No Subject: Re: [dpdk-dev] [PATCH v2] devtools: fix symbol check for filename with space 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: Thu, 19 Jul 2018 11:15:13 -0000 On Wed, Jul 18, 2018 at 11:26:58PM +0200, Thomas Monjalon wrote: > If the patch filename or the temporary file path have a space > in their name, the script check-symbol-change.sh does not work. > The variables for the filenames must be enclosed in quotes > in order to preserve spaces. > > Fixes: 4bec48184e33 ("devtools: add checks for ABI symbol addition") > Cc: nhorman@tuxdriver.com > > Signed-off-by: Thomas Monjalon > --- > v2: one occurence of "$mapfile" was missed in v1 I don't have any issue with this change, but the only way I see to introduce a space into the tempfile name is to set $TMPDIR to '/path/with silly spaces' or something simmilar. I think we discussed this before, but it would alsmot make sense to, instead of quoting everything, instead specify -p ./ to ensure the tempfile has no spaces. Neil > --- > devtools/check-symbol-change.sh | 20 ++++++++++---------- > 1 file changed, 10 insertions(+), 10 deletions(-) > > diff --git a/devtools/check-symbol-change.sh b/devtools/check-symbol-change.sh > index 9952a8d66..40b72073a 100755 > --- a/devtools/check-symbol-change.sh > +++ b/devtools/check-symbol-change.sh > @@ -7,7 +7,7 @@ build_map_changes() > local fname=$1 > local mapdb=$2 > > - cat $fname | awk ' > + cat "$fname" | awk ' > # Initialize our variables > BEGIN {map="";sym="";ar="";sec=""; in_sec=0; in_map=0} > > @@ -71,10 +71,10 @@ build_map_changes() > print map " " sym " unknown del" > } > } > - }' > ./$mapdb > + }' > "$mapdb" > > - sort -u $mapdb > ./$mapdb.2 > - mv -f $mapdb.2 $mapdb > + sort -u "$mapdb" > "$mapdb.2" > + mv -f "$mapdb.2" "$mapdb" > > } > > @@ -111,7 +111,7 @@ check_for_rule_violations() > # to be moving from an already supported > # section or its a violation > grep -q \ > - "$mname $symname [^EXPERIMENTAL] del" $mapdb > + "$mname $symname [^EXPERIMENTAL] del" "$mapdb" > if [ $? -ne 0 ] > then > echo -n "ERROR: symbol $symname " > @@ -133,7 +133,7 @@ check_for_rule_violations() > echo "gone through the deprecation process" > fi > fi > - done < $mapdb > + done < "$mapdb" > > return $ret > } > @@ -146,14 +146,14 @@ exit_code=1 > > clean_and_exit_on_sig() > { > - rm -f $mapfile > + rm -f "$mapfile" > exit $exit_code > } > > -build_map_changes $patch $mapfile > -check_for_rule_violations $mapfile > +build_map_changes "$patch" "$mapfile" > +check_for_rule_violations "$mapfile" > exit_code=$? > > -rm -f $mapfile > +rm -f "$mapfile" > > exit $exit_code > -- > 2.17.1 > >