forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]> Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
- Loading branch information
1 parent
db26984
commit 35435cd
Showing
3 changed files
with
4 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# Arnaldo Carvalho de Melo <[email protected]>, 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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# Arnaldo Carvalho de Melo <[email protected]>, 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 | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters