mirror_ubuntu-kernels/tools/testing/selftests/ftrace/test.d/kprobe
Steven Rostedt (Google) 23a4b108ac tracing/selftests: Fix kprobe event name test for .isra. functions
The kprobe_eventname.tc test checks if a function with .isra. can have a
kprobe attached to it. It loops through the kallsyms file for all the
functions that have the .isra. name, and checks if it exists in the
available_filter_functions file, and if it does, it uses it to attach a
kprobe to it.

The issue is that kprobes can not attach to functions that are listed more
than once in available_filter_functions. With the latest kernel, the
function that is found is: rapl_event_update.isra.0

  # grep rapl_event_update.isra.0 /sys/kernel/tracing/available_filter_functions
  rapl_event_update.isra.0
  rapl_event_update.isra.0

It is listed twice. This causes the attached kprobe to it to fail which in
turn fails the test. Instead of just picking the function function that is
found in available_filter_functions, pick the first one that is listed
only once in available_filter_functions.

Cc: stable@vger.kernel.org
Fixes: 604e354823 ("selftests/ftrace: Select an existing function in kprobe_eventname test")
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2024-05-29 12:24:31 -06:00
..
add_and_remove.tc selftests/ftrace: Use $FUNCTION_FORK to reference kernel fork function 2020-10-27 16:44:18 -06:00
busy_check.tc selftests/ftrace: Use $FUNCTION_FORK to reference kernel fork function 2020-10-27 16:44:18 -06:00
kprobe_args_char.tc Tracing updates for v6.7: 2023-11-03 07:41:18 -10:00
kprobe_args_comm.tc selftests/ftrace: Use $FUNCTION_FORK to reference kernel fork function 2020-10-27 16:44:18 -06:00
kprobe_args_string.tc Tracing updates for v6.7: 2023-11-03 07:41:18 -10:00
kprobe_args_symbol.tc selftests/ftrace: Use $FUNCTION_FORK to reference kernel fork function 2020-10-27 16:44:18 -06:00
kprobe_args_syntax.tc selftests/ftrace: Add riscv support for kprobe arg tests 2023-10-18 14:33:44 -06:00
kprobe_args_type.tc selftests/ftrace: Use $FUNCTION_FORK to reference kernel fork function 2020-10-27 16:44:18 -06:00
kprobe_args_user.tc selftests/ftrace: check for do_sys_openat2 in user-memory test 2020-10-27 16:45:51 -06:00
kprobe_args_vfs.tc selftests/ftrace: add kprobe test cases for VFS type "%pd" and "%pD" 2024-05-01 23:18:47 +09:00
kprobe_args.tc selftests/ftrace: Use $FUNCTION_FORK to reference kernel fork function 2020-10-27 16:44:18 -06:00
kprobe_eventname.tc tracing/selftests: Fix kprobe event name test for .isra. functions 2024-05-29 12:24:31 -06:00
kprobe_ftrace.tc selftests/ftrace: Use $FUNCTION_FORK to reference kernel fork function 2020-10-27 16:44:18 -06:00
kprobe_insn_boundary.tc selftests/ftrace: Add new test case which adds multiple consecutive probes in a function 2023-06-06 21:39:57 +09:00
kprobe_module.tc selftests/ftrace: Convert required interface checks into requires list 2020-06-16 10:39:20 -06:00
kprobe_multiprobe.tc selftests/ftrace: Use $FUNCTION_FORK to reference kernel fork function 2020-10-27 16:44:18 -06:00
kprobe_non_uniq_symbol.tc selftests/ftrace: Add new test case which checks non unique symbol 2023-10-20 22:11:49 +09:00
kprobe_opt_types.tc selftests/ftrace: Add new test case which checks for optimized probes 2023-06-23 17:35:40 +09:00
kprobe_syntax_errors.tc tracing/probes: Support $argN in return probe (kprobe and fprobe) 2024-03-07 00:27:34 +09:00
kretprobe_args.tc selftests/ftrace: Use $FUNCTION_FORK to reference kernel fork function 2020-10-27 16:44:18 -06:00
kretprobe_entry_arg.tc selftests/ftrace: Fix checkbashisms errors 2024-05-08 16:49:20 -06:00
kretprobe_maxactive.tc selftests/ftrace: Support ":README" suffix for requires 2020-06-16 10:42:47 -06:00
kretprobe_return_suffix.tc selftests/ftrace: Add %return suffix tests 2020-09-21 21:06:03 -04:00
multiple_kprobes.tc selftests/ftrace: Save kprobe_events to test log 2022-05-12 18:00:33 +02:00
probepoint.tc selftests/ftrace: Fix probepoint testcase to ignore __pfx_* symbols 2023-02-21 08:49:16 +09:00
profile.tc selftests/ftrace: make kprobe profile testcase description unique 2021-12-10 16:46:01 -07:00
uprobe_syntax_errors.tc tracing/probes: Reject symbol/symstr type for uprobe 2022-12-15 09:00:20 +09:00