diff options
author | Kim Phillips <kim.phillips@arm.com> | 2017-08-16 21:20:40 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2017-08-16 21:23:26 +0200 |
commit | 35435cd06081d7db96bc617b65ba556f8e24340e (patch) | |
tree | 58dcd05511e7f7c5fb3f34ea8bee7136edba3693 /tools/perf/tests/shell/lib | |
parent | perf bpf: Fix endianness problem when loading parameters in prologue (diff) | |
download | linux-35435cd06081d7db96bc617b65ba556f8e24340e.tar.xz linux-35435cd06081d7db96bc617b65ba556f8e24340e.zip |
perf test shell: Replace '|&' with '2>&1 |' to work with more shells
Since we do not specify bash (and/or zsh) as a requirement, use the
standard error redirection that is more widely supported.
Signed-off-by: Kim Phillips <kim.phillips@arm.com>
Link: http://lkml.kernel.org/n/tip-ji5mhn3iilgch3eaay6csr6z@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/tests/shell/lib')
-rw-r--r-- | tools/perf/tests/shell/lib/probe.sh | 2 | ||||
-rw-r--r-- | tools/perf/tests/shell/lib/probe_vfs_getname.sh | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/tools/perf/tests/shell/lib/probe.sh b/tools/perf/tests/shell/lib/probe.sh index 61da3b2c9bca..6293cc660947 100644 --- a/tools/perf/tests/shell/lib/probe.sh +++ b/tools/perf/tests/shell/lib/probe.sh @@ -1,6 +1,6 @@ # Arnaldo Carvalho de Melo <acme@kernel.org>, 2017 skip_if_no_perf_probe() { - perf probe |& grep -q 'is not a perf-command' && return 2 + perf probe 2>&1 | grep -q 'is not a perf-command' && return 2 return 0 } diff --git a/tools/perf/tests/shell/lib/probe_vfs_getname.sh b/tools/perf/tests/shell/lib/probe_vfs_getname.sh index f832395daad7..30a950c9d407 100644 --- a/tools/perf/tests/shell/lib/probe_vfs_getname.sh +++ b/tools/perf/tests/shell/lib/probe_vfs_getname.sh @@ -1,6 +1,6 @@ # Arnaldo Carvalho de Melo <acme@kernel.org>, 2017 -perf probe -l |& grep -q probe:vfs_getname +perf probe -l 2>&1 | grep -q probe:vfs_getname had_vfs_getname=$? cleanup_probe_vfs_getname() { @@ -12,7 +12,7 @@ cleanup_probe_vfs_getname() { add_probe_vfs_getname() { local verbose=$1 if [ $had_vfs_getname -eq 1 ] ; then - line=$(perf probe -L getname_flags |& egrep 'result.*=.*filename;' | sed -r 's/[[:space:]]+([[:digit:]]+)[[:space:]]+result->uptr.*/\1/') + line=$(perf probe -L getname_flags 2>&1 | egrep 'result.*=.*filename;' | sed -r 's/[[:space:]]+([[:digit:]]+)[[:space:]]+result->uptr.*/\1/') perf probe $verbose "vfs_getname=getname_flags:${line} pathname=result->name:string" fi } |