Skip to content

Commit 6d74f64

Browse files
yonghong-songAlexei Starovoitov
authored andcommitted
selftests/bpf: Enforce returning 0 for fentry/fexit programs
There are a few fentry/fexit programs returning non-0. The tests with these programs will break with the previous patch which enfoced return-0 rules. Fix them properly. Fixes: ac06587 ("selftests/bpf: Add BPF_PROG, BPF_KPROBE, and BPF_KRETPROBE macros") Signed-off-by: Yonghong Song <[email protected]> Signed-off-by: Alexei Starovoitov <[email protected]> Acked-by: Andrii Nakryiko <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
1 parent e92888c commit 6d74f64

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/testing/selftests/bpf/progs/test_overhead.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ int prog3(struct bpf_raw_tracepoint_args *ctx)
3030
SEC("fentry/__set_task_comm")
3131
int BPF_PROG(prog4, struct task_struct *tsk, const char *buf, bool exec)
3232
{
33-
return !tsk;
33+
return 0;
3434
}
3535

3636
SEC("fexit/__set_task_comm")
3737
int BPF_PROG(prog5, struct task_struct *tsk, const char *buf, bool exec)
3838
{
39-
return !tsk;
39+
return 0;
4040
}
4141

4242
char _license[] SEC("license") = "GPL";

0 commit comments

Comments
 (0)