From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id 1F354160 for ; Wed, 18 Jul 2018 23:27:07 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 8797E20B1C; Wed, 18 Jul 2018 17:27:06 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 18 Jul 2018 17:27:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=mesmtp; bh=g8mMxjwPbWc62z NhCP4Pd8kx3qSYaMNMbsjLg70hJt4=; b=lbWctPF1NUoCiKFzZMnvRYwyguAZ86 XaLfVG11F50TYyyzs3qPc2u02IMK3vJymboakbEn38YepmbBm7OlHhiPdxOtmkx2 ml/YEssRnFIM+jr8ThEk8U3cnNgj1Kds5+vB9kyHAy6rEShIB9eQ4dSkgVlAC/JS IkhYJUY6bvMcw= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=g8mMxjwPbWc62zNhCP4Pd8kx3qSYaMNMbsjLg70hJt4=; b=AckimzvI ASnRCjvkbl0QJCj5fhoASdurWeLRu+9OI19mtZdOoJYa1vDDdDkBcvq/xaaGFMat OVhQ07npmYGiEmA2aIMx4+E4eUDomj0CroVreH5tFTCh5Us/Yp28Rmpw5OaJijje 5RUuJlCVnjcVOSGzwrglaysvq1Zs83KVtUrb7hZuJuZL3IK0jbVZw5LD26GY+Bk9 3bw5P0PthlmnKwRIRvEd9AeqCd5kwSda9ZJxbrnrcWDfHBqA5cMAdJ4g14vsOvC2 oQiFx4PZlllRlwB1YRFiKHIpwWLfgGUoEmLi1ntNUTKAJyhHiWRyn4gECaOi9RT3 x2sOtA7/Vf/Etg== X-ME-Proxy: X-ME-Sender: Received: from xps.monjalon.net (unknown [37.168.67.16]) by mail.messagingengine.com (Postfix) with ESMTPA id 68AF0E4534; Wed, 18 Jul 2018 17:27:04 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Cc: nhorman@tuxdriver.com Date: Wed, 18 Jul 2018 23:26:58 +0200 Message-Id: <20180718212658.24756-1-thomas@monjalon.net> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180718210609.32547-1-thomas@monjalon.net> References: <20180718210609.32547-1-thomas@monjalon.net> Subject: [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: Wed, 18 Jul 2018 21:27:07 -0000 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 --- 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