summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/ftrace/test.d/kprobe
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2020-10-02 15:25:01 +0200
committerShuah Khan <skhan@linuxfoundation.org>2020-10-27 23:45:51 +0100
commite3e40312567087fbe6880f316cb2b0e1f3d8a82c (patch)
treef579c3c82f7a1b04358c1674850ae5a5da658c56 /tools/testing/selftests/ftrace/test.d/kprobe
parentselftests/ftrace: Use $FUNCTION_FORK to reference kernel fork function (diff)
downloadlinux-e3e40312567087fbe6880f316cb2b0e1f3d8a82c.tar.xz
linux-e3e40312567087fbe6880f316cb2b0e1f3d8a82c.zip
selftests/ftrace: check for do_sys_openat2 in user-memory test
More recent libc implementations are now using openat/openat2 system calls so also add do_sys_openat2 to the tracing so that the test passes on these systems because do_sys_open may not be called. Thanks to Masami Hiramatsu for the help on getting this fix to work correctly. Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Masami Hiramatsu <mhiramat@kernel.org> Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/testing/selftests/ftrace/test.d/kprobe')
-rw-r--r--tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_user.tc4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_user.tc b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_user.tc
index a30a9c07290d..d25d01a19778 100644
--- a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_user.tc
+++ b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_user.tc
@@ -9,12 +9,16 @@ grep -A10 "fetcharg:" README | grep -q '\[u\]<offset>' || exit_unsupported
:;: "user-memory access syntax and ustring working on user memory";:
echo 'p:myevent do_sys_open path=+0($arg2):ustring path2=+u0($arg2):string' \
> kprobe_events
+echo 'p:myevent2 do_sys_openat2 path=+0($arg2):ustring path2=+u0($arg2):string' \
+ >> kprobe_events
grep myevent kprobe_events | \
grep -q 'path=+0($arg2):ustring path2=+u0($arg2):string'
echo 1 > events/kprobes/myevent/enable
+echo 1 > events/kprobes/myevent2/enable
echo > /dev/null
echo 0 > events/kprobes/myevent/enable
+echo 0 > events/kprobes/myevent2/enable
grep myevent trace | grep -q 'path="/dev/null" path2="/dev/null"'