devtools: check_symbol_change requires bash

Message ID 20180731151416.4868-1-stephen@networkplumber.org (mailing list archive)
State Superseded, archived
Headers
Series devtools: check_symbol_change requires bash |

Checks

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

Commit Message

Stephen Hemminger July 31, 2018, 3:14 p.m. UTC
  The syntax of check_symbol_change uses some bash syntax.
It does not run correctly on Debian where /bin/sh is not the
same as /bin/bash.

Fixes: 4bec48184e33 ("devtools: add checks for ABI symbol addition")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 devtools/check-symbol-change.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

John McNamara July 31, 2018, 4:01 p.m. UTC | #1
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Stephen Hemminger
> Sent: Tuesday, July 31, 2018 4:14 PM
> To: nhorman@tuxdriver.com
> Cc: dev@dpdk.org; Stephen Hemminger <stephen@networkplumber.org>
> Subject: [dpdk-dev] [PATCH] devtools: check_symbol_change requires bash
> 
> The syntax of check_symbol_change uses some bash syntax.
> It does not run correctly on Debian where /bin/sh is not the same as
> /bin/bash.

I think this fix may be required for devtools/checkpatches.sh as well
since it seems to use bash specific call to trap().

I saw this in an internal bug report but didn't have a system to check
the fix on. Could you do a quick check.

John
--
  
Stephen Hemminger July 31, 2018, 4:31 p.m. UTC | #2
On Tue, 31 Jul 2018 16:01:19 +0000
"Mcnamara, John" <john.mcnamara@intel.com> wrote:

> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Stephen Hemminger
> > Sent: Tuesday, July 31, 2018 4:14 PM
> > To: nhorman@tuxdriver.com
> > Cc: dev@dpdk.org; Stephen Hemminger <stephen@networkplumber.org>
> > Subject: [dpdk-dev] [PATCH] devtools: check_symbol_change requires bash
> > 
> > The syntax of check_symbol_change uses some bash syntax.
> > It does not run correctly on Debian where /bin/sh is not the same as
> > /bin/bash.  
> 
> I think this fix may be required for devtools/checkpatches.sh as well
> since it seems to use bash specific call to trap().
> 
> I saw this in an internal bug report but didn't have a system to check
> the fix on. Could you do a quick check.

Yes, checkpatches also needs to be bashifyed.
  
Thomas Monjalon Aug. 1, 2018, 4:06 p.m. UTC | #3
31/07/2018 17:14, Stephen Hemminger:
> The syntax of check_symbol_change uses some bash syntax.
> It does not run correctly on Debian where /bin/sh is not the
> same as /bin/bash.

I would prefer we fix the root cause.
What is the error?

I see there are some == bashisms. Is there something else?
  

Patch

diff --git a/devtools/check-symbol-change.sh b/devtools/check-symbol-change.sh
index 40b72073a975..19035a8d40e4 100755
--- a/devtools/check-symbol-change.sh
+++ b/devtools/check-symbol-change.sh
@@ -1,4 +1,4 @@ 
-#!/bin/sh
+#!/bin/bash
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2018 Neil Horman <nhorman@tuxdriver.com>