summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorTiezhu Yang <yangtiezhu@loongson.cn>2022-05-06 19:02:02 +0800
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>2022-05-12 18:00:33 +0200
commiteab691b1a6841813e84abfc8cef392b67efdaede (patch)
treebb10fa4c3a283c5090a921de23e5bf901a7b9eda /tools
parenta4fa106ee1e146a1955e81337ad95f0cc5c20592 (diff)
downloadlinux-eab691b1a6841813e84abfc8cef392b67efdaede.tar.gz
linux-eab691b1a6841813e84abfc8cef392b67efdaede.tar.bz2
linux-eab691b1a6841813e84abfc8cef392b67efdaede.zip
selftests/ftrace: Save kprobe_events to test log
It may lead to kernel panic when execute the following testcase on mips: # cd tools/testing/selftests/ftrace # ./ftracetest test.d/kprobe/multiple_kprobes.tc A preliminary analysis shows that the issue is related with echo 1 > events/kprobes/enable after add the 256 probe points. In order to find the root cause, I want to verify which probe point has problem, so it is necessary to save kprobe_events to test log. With this patch, we can get the 256 probe points in the test log through the following command: # ./ftracetest test.d/kprobe/multiple_kprobes.tc -vvv -k Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn> Acked-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Diffstat (limited to 'tools')
-rw-r--r--tools/testing/selftests/ftrace/test.d/kprobe/multiple_kprobes.tc2
1 files changed, 2 insertions, 0 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 312d23780096..be754f5bcf79 100644
--- a/tools/testing/selftests/ftrace/test.d/kprobe/multiple_kprobes.tc
+++ b/tools/testing/selftests/ftrace/test.d/kprobe/multiple_kprobes.tc
@@ -25,6 +25,8 @@ if [ $L -ne 256 ]; then
exit_fail
fi
+cat kprobe_events >> $testlog
+
echo 1 > events/kprobes/enable
echo 0 > events/kprobes/enable
echo > kprobe_events