Skip to content

Commit 48f624c

Browse files
theihorAlexei Starovoitov
authored andcommitted
selftests/bpf: Adjust selftest due to function rename
do_filp_open() was renamed in commit 541003b ("rename do_filp_open() to do_file_open()") This broke test_profiler, because it uses a kretprobe on that function. Fix it by renaming accordingly. Reported-by: Shung-Hsi Yu <shung-hsi.yu@suse.com> Closes: https://lore.kernel.org/bpf/djwjf2vfb7gro3rfag666bojod6ytcectahnb5z6hx2hawimtj@sx47ghzjg4lw/ Signed-off-by: Ihor Solodrai <ihor.solodrai@linux.dev> Link: https://lore.kernel.org/r/20260210235855.215679-1-ihor.solodrai@linux.dev Signed-off-by: Alexei Starovoitov <ast@kernel.org>
1 parent ccd2d79 commit 48f624c

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

tools/testing/selftests/bpf/progs/profiler.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ enum bpf_function_id {
169169
profiler_bpf_sched_process_exec,
170170
profiler_bpf_sched_process_exit,
171171
profiler_bpf_sys_enter_kill,
172-
profiler_bpf_do_filp_open_ret,
172+
profiler_bpf_do_file_open_ret,
173173
profiler_bpf_sched_process_fork,
174174
profiler_bpf_vfs_link,
175175
profiler_bpf_vfs_symlink,

tools/testing/selftests/bpf/progs/profiler.inc.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -751,11 +751,11 @@ int raw_tracepoint__sched_process_exec(struct bpf_raw_tracepoint_args* ctx)
751751
return 0;
752752
}
753753

754-
SEC("kretprobe/do_filp_open")
755-
int kprobe_ret__do_filp_open(struct pt_regs* ctx)
754+
SEC("kretprobe/do_file_open")
755+
int kprobe_ret__do_file_open(struct pt_regs *ctx)
756756
{
757757
struct bpf_func_stats_ctx stats_ctx;
758-
bpf_stats_enter(&stats_ctx, profiler_bpf_do_filp_open_ret);
758+
bpf_stats_enter(&stats_ctx, profiler_bpf_do_file_open_ret);
759759

760760
struct file* filp = (struct file*)PT_REGS_RC_CORE(ctx);
761761

0 commit comments

Comments
 (0)