mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] perf test shell: trace+probe_libc_inet_pton.sh: force to use /bin/bash to load this script
@ 2017-10-19  3:53 Li Zhijian
  2017-10-19  5:10 ` Li Zhijian
  0 siblings, 1 reply; 2+ messages in thread
From: Li Zhijian @ 2017-10-19  3:53 UTC (permalink / raw)
  To: linux-kernel, peterz, mingo, acme, alexander.shishkin, kim.phillips
  Cc: philip.li, Li Zhijian

this script contains Array, but not all sh support Array. by default, dash provides sh at ubuntu/debian
which can not support Array. so force to use /bin/bash

it can fix following issue:
lizhijian@localhost:~/lkp/linux/tools/perf/tests/shell$ sudo ./trace+probe_libc_inet_pton.sh
[sudo] password for lizhijian: PING ::1(::1) 56 data bytes
./trace+probe_libc_inet_pton.sh: 30: ./trace+probe_libc_inet_pton.sh: Bad substitution
./trace+probe_libc_inet_pton.sh: 32: ./trace+probe_libc_inet_pton.sh: Bad substitution

Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
---
 tools/perf/tests/shell/trace+probe_libc_inet_pton.sh | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/perf/tests/shell/trace+probe_libc_inet_pton.sh b/tools/perf/tests/shell/trace+probe_libc_inet_pton.sh
index 7a84d73..df04cc1 100755
--- a/tools/perf/tests/shell/trace+probe_libc_inet_pton.sh
+++ b/tools/perf/tests/shell/trace+probe_libc_inet_pton.sh
@@ -1,3 +1,5 @@
+#!/bin/bash
+
 # probe libc's inet_pton & backtrace it with ping
 
 # Installs a probe on libc's inet_pton function, that will use uprobes,
-- 
2.7.4

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] perf test shell: trace+probe_libc_inet_pton.sh: force to use /bin/bash to load this script
  2017-10-19  3:53 [PATCH] perf test shell: trace+probe_libc_inet_pton.sh: force to use /bin/bash to load this script Li Zhijian
@ 2017-10-19  5:10 ` Li Zhijian
  0 siblings, 0 replies; 2+ messages in thread
From: Li Zhijian @ 2017-10-19  5:10 UTC (permalink / raw)
  To: linux-kernel, peterz, mingo, acme, alexander.shishkin, kim.phillips
  Cc: philip.li

ignore this patch please, it will broken the test description which is read from the first line of this script

Thanks


On 10/19/2017 11:53 AM, Li Zhijian wrote:
> this script contains Array, but not all sh support Array. by default, dash provides sh at ubuntu/debian
> which can not support Array. so force to use /bin/bash
>
> it can fix following issue:
> lizhijian@localhost:~/lkp/linux/tools/perf/tests/shell$ sudo ./trace+probe_libc_inet_pton.sh
> [sudo] password for lizhijian: PING ::1(::1) 56 data bytes
> ./trace+probe_libc_inet_pton.sh: 30: ./trace+probe_libc_inet_pton.sh: Bad substitution
> ./trace+probe_libc_inet_pton.sh: 32: ./trace+probe_libc_inet_pton.sh: Bad substitution
>
> Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
> ---
>   tools/perf/tests/shell/trace+probe_libc_inet_pton.sh | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/tools/perf/tests/shell/trace+probe_libc_inet_pton.sh b/tools/perf/tests/shell/trace+probe_libc_inet_pton.sh
> index 7a84d73..df04cc1 100755
> --- a/tools/perf/tests/shell/trace+probe_libc_inet_pton.sh
> +++ b/tools/perf/tests/shell/trace+probe_libc_inet_pton.sh
> @@ -1,3 +1,5 @@
> +#!/bin/bash
> +
>   # probe libc's inet_pton & backtrace it with ping
>   
>   # Installs a probe on libc's inet_pton function, that will use uprobes,

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-10-19  5:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-19  3:53 [PATCH] perf test shell: trace+probe_libc_inet_pton.sh: force to use /bin/bash to load this script Li Zhijian
2017-10-19  5:10 ` Li Zhijian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®