From: Thomas Monjalon <thomas@monjalon.net>
To: dev@dpdk.org
Cc: nhorman@tuxdriver.com
Subject: [dpdk-dev] [PATCH v2] devtools: fix symbol check for filename with space
Date: Wed, 18 Jul 2018 23:26:58 +0200 [thread overview]
Message-ID: <20180718212658.24756-1-thomas@monjalon.net> (raw)
In-Reply-To: <20180718210609.32547-1-thomas@monjalon.net>
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 <thomas@monjalon.net>
---
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
next prev parent reply other threads:[~2018-07-18 21:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-18 21:06 [dpdk-dev] [PATCH] " Thomas Monjalon
2018-07-18 21:26 ` Thomas Monjalon [this message]
2018-07-19 11:14 ` [dpdk-dev] [PATCH v2] " Neil Horman
2018-07-19 12:09 ` Thomas Monjalon
2018-07-19 15:37 ` Neil Horman
2018-07-20 9:37 ` Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180718212658.24756-1-thomas@monjalon.net \
--to=thomas@monjalon.net \
--cc=dev@dpdk.org \
--cc=nhorman@tuxdriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).