On 27-May 22:33, Alexei Starovoitov wrote: > From: Alexei Starovoitov <ast@xxxxxxxxxx> > > Modify few tests to sanity test sleepable bpf functionality. > > Signed-off-by: Alexei Starovoitov <ast@xxxxxxxxxx> Acked-by: KP Singh <kpsingh@xxxxxxxxxx> > --- > tools/testing/selftests/bpf/bench.c | 2 ++ > .../selftests/bpf/benchs/bench_trigger.c | 17 +++++++++++++++++ > tools/testing/selftests/bpf/progs/lsm.c | 4 ++-- > .../testing/selftests/bpf/progs/trigger_bench.c | 7 +++++++ > 4 files changed, 28 insertions(+), 2 deletions(-) > > diff --git a/tools/testing/selftests/bpf/bench.c b/tools/testing/selftests/bpf/bench.c > [...] > -SEC("lsm/bprm_committed_creds") > +SEC("lsm.s/bprm_committed_creds") > int BPF_PROG(test_void_hook, struct linux_binprm *bprm) > { > __u32 pid = bpf_get_current_pid_tgid() >> 32; > diff --git a/tools/testing/selftests/bpf/progs/trigger_bench.c b/tools/testing/selftests/bpf/progs/trigger_bench.c > index 8b36b6640e7e..9a4d09590b3d 100644 > --- a/tools/testing/selftests/bpf/progs/trigger_bench.c > +++ b/tools/testing/selftests/bpf/progs/trigger_bench.c > @@ -39,6 +39,13 @@ int bench_trigger_fentry(void *ctx) > return 0; > } > > +SEC("fentry.s/__x64_sys_getpgid") > +int bench_trigger_fentry_sleep(void *ctx) > +{ > + __sync_add_and_fetch(&hits, 1); > + return 0; > +} > + > SEC("fmod_ret/__x64_sys_getpgid") > int bench_trigger_fmodret(void *ctx) > { > -- > 2.23.0 >