summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMasami Hiramatsu <mhiramat@kernel.org>2018-01-14 22:50:07 +0900
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-04-26 11:02:04 +0200
commitc45ab4fb384cb3fc05e0949ca3a6ca4d6f7613fb (patch)
treec3a5e9f3a588aa2787c9bad50c96cb8d6dc76996 /tools
parent342d9092a50184b4b6d1c3f1f6bed06321afa88d (diff)
downloadlinux-exynos-c45ab4fb384cb3fc05e0949ca3a6ca4d6f7613fb.tar.gz
linux-exynos-c45ab4fb384cb3fc05e0949ca3a6ca4d6f7613fb.tar.bz2
linux-exynos-c45ab4fb384cb3fc05e0949ca3a6ca4d6f7613fb.zip
selftest: ftrace: Fix to pick text symbols for kprobes
[ Upstream commit 5e46664703b364434a2cbda3e6988fc24ae0ced5 ] Fix to pick text symbols for multiple kprobe testcase. kallsyms shows text symbols with " t " or " T " but current testcase picks all symbols including "t", so it picks data symbols if it includes 't' (e.g. "str"). This fixes it to find symbol lines with " t " or " T " (including spaces). Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Reported-by: Russell King <linux@armlinux.org.uk> Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/testing/selftests/ftrace/test.d/kprobe/multiple_kprobes.tc4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/selftests/ftrace/test.d/kprobe/multiple_kprobes.tc b/tools/testing/selftests/ftrace/test.d/kprobe/multiple_kprobes.tc
index bb16cf91f1b5..e297bd7a2e79 100644
--- a/tools/testing/selftests/ftrace/test.d/kprobe/multiple_kprobes.tc
+++ b/tools/testing/selftests/ftrace/test.d/kprobe/multiple_kprobes.tc
@@ -12,8 +12,8 @@ case `uname -m` in
*) OFFS=0;;
esac
-echo "Setup up to 256 kprobes"
-grep t /proc/kallsyms | cut -f3 -d" " | grep -v .*\\..* | \
+echo "Setup up kprobes on first 256 text symbols"
+grep -i " t " /proc/kallsyms | cut -f3 -d" " | grep -v .*\\..* | \
head -n 256 | while read i; do echo p ${i}+${OFFS} ; done > kprobe_events ||:
echo 1 > events/kprobes/enable