Skip to content

Commit e3e4031

Browse files
Colin Ian Kingshuahkh
authored andcommitted
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>
1 parent dc6bf4d commit e3e4031

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_user.tc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,16 @@ grep -A10 "fetcharg:" README | grep -q '\[u\]<offset>' || exit_unsupported
99
:;: "user-memory access syntax and ustring working on user memory";:
1010
echo 'p:myevent do_sys_open path=+0($arg2):ustring path2=+u0($arg2):string' \
1111
> kprobe_events
12+
echo 'p:myevent2 do_sys_openat2 path=+0($arg2):ustring path2=+u0($arg2):string' \
13+
>> kprobe_events
1214

1315
grep myevent kprobe_events | \
1416
grep -q 'path=+0($arg2):ustring path2=+u0($arg2):string'
1517
echo 1 > events/kprobes/myevent/enable
18+
echo 1 > events/kprobes/myevent2/enable
1619
echo > /dev/null
1720
echo 0 > events/kprobes/myevent/enable
21+
echo 0 > events/kprobes/myevent2/enable
1822

1923
grep myevent trace | grep -q 'path="/dev/null" path2="/dev/null"'
2024

0 commit comments

Comments
 (0)