Commit a7c2ca3a authored by Yonghong Song's avatar Yonghong Song Committed by Alexei Starovoitov

selftests/bpf: Use BPF_PROG2 for some fentry programs without struct arguments

Use BPF_PROG2 instead of BPF_PROG for programs in progs/timer.c
to test BPF_PROG2 for cases without struct arguments.
Signed-off-by: default avatarYonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/r/20220831152718.2081091-1-yhs@fb.comSigned-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent 1642a394
...@@ -120,7 +120,7 @@ static int timer_cb1(void *map, int *key, struct bpf_timer *timer) ...@@ -120,7 +120,7 @@ static int timer_cb1(void *map, int *key, struct bpf_timer *timer)
} }
SEC("fentry/bpf_fentry_test1") SEC("fentry/bpf_fentry_test1")
int BPF_PROG(test1, int a) int BPF_PROG2(test1, int, a)
{ {
struct bpf_timer *arr_timer, *lru_timer; struct bpf_timer *arr_timer, *lru_timer;
struct elem init = {}; struct elem init = {};
...@@ -236,7 +236,7 @@ int bpf_timer_test(void) ...@@ -236,7 +236,7 @@ int bpf_timer_test(void)
} }
SEC("fentry/bpf_fentry_test2") SEC("fentry/bpf_fentry_test2")
int BPF_PROG(test2, int a, int b) int BPF_PROG2(test2, int, a, int, b)
{ {
struct hmap_elem init = {}, *val; struct hmap_elem init = {}, *val;
int key = HTAB, key_malloc = HTAB_MALLOC; int key = HTAB, key_malloc = HTAB_MALLOC;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment