devtools: fix symbol check for dash

Message ID 20180805093847.12935-1-thomas@monjalon.net (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series devtools: fix symbol check for dash |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Thomas Monjalon Aug. 5, 2018, 9:38 a.m. UTC
  The script check-symbol-change.sh was not running when
/bin/sh redirects to dash.

Fixes: 4bec48184e33 ("devtools: add checks for ABI symbol addition")
Cc: nhorman@tuxdriver.com

Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 devtools/check-symbol-change.sh | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
  

Comments

Ferruh Yigit Aug. 9, 2018, 12:14 p.m. UTC | #1
On 8/5/2018 10:38 AM, Thomas Monjalon wrote:
> The script check-symbol-change.sh was not running when
> /bin/sh redirects to dash.
> 
> Fixes: 4bec48184e33 ("devtools: add checks for ABI symbol addition")
> Cc: nhorman@tuxdriver.com
> 
> Reported-by: Stephen Hemminger <stephen@networkplumber.org>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>

Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
  
Neil Horman Aug. 9, 2018, 3:14 p.m. UTC | #2
On Thu, Aug 09, 2018 at 01:14:23PM +0100, Ferruh Yigit wrote:
> On 8/5/2018 10:38 AM, Thomas Monjalon wrote:
> > The script check-symbol-change.sh was not running when
> > /bin/sh redirects to dash.
> > 
> > Fixes: 4bec48184e33 ("devtools: add checks for ABI symbol addition")
> > Cc: nhorman@tuxdriver.com
> > 
> > Reported-by: Stephen Hemminger <stephen@networkplumber.org>
> > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> 
> Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
> 
Acked-by: Neil Horman <nhorman@tuxdriver.com>
  
Thomas Monjalon Aug. 9, 2018, 4:13 p.m. UTC | #3
09/08/2018 17:14, Neil Horman:
> On Thu, Aug 09, 2018 at 01:14:23PM +0100, Ferruh Yigit wrote:
> > On 8/5/2018 10:38 AM, Thomas Monjalon wrote:
> > > The script check-symbol-change.sh was not running when
> > > /bin/sh redirects to dash.
> > > 
> > > Fixes: 4bec48184e33 ("devtools: add checks for ABI symbol addition")
> > > Cc: nhorman@tuxdriver.com
> > > 
> > > Reported-by: Stephen Hemminger <stephen@networkplumber.org>
> > > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> > 
> > Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
> > 
> Acked-by: Neil Horman <nhorman@tuxdriver.com>

Applied
  

Patch

diff --git a/devtools/check-symbol-change.sh b/devtools/check-symbol-change.sh
index 40b72073a..daaf45e14 100755
--- a/devtools/check-symbol-change.sh
+++ b/devtools/check-symbol-change.sh
@@ -4,8 +4,8 @@ 
 
 build_map_changes()
 {
-	local fname=$1
-	local mapdb=$2
+	local fname="$1"
+	local mapdb="$2"
 
 	cat "$fname" | awk '
 		# Initialize our variables
@@ -80,7 +80,7 @@  build_map_changes()
 
 check_for_rule_violations()
 {
-	local mapdb=$1
+	local mapdb="$1"
 	local mname
 	local symname
 	local secname
@@ -89,10 +89,10 @@  check_for_rule_violations()
 
 	while read mname symname secname ar
 	do
-		if [ "$ar" == "add" ]
+		if [ "$ar" = "add" ]
 		then
 
-			if [ "$secname" == "unknown" ]
+			if [ "$secname" = "unknown" ]
 			then
 				# Just inform the user of this occurrence, but
 				# don't flag it as an error