Re: [PATCH RFC bpf-next v6 6/6] selftests/bpf: add sleepable timer tests

2024-04-08 Thread Alexei Starovoitov
On Mon, Apr 8, 2024 at 4:01 PM Eduard Zingerman wrote: > > > +SEC("tc") > > +/* check that calling bpf_timer_start() with a delay on a sleepable > > + * callback is returning -EINVAL > > + */ > > +__retval(-22) > > +long test_call_sleepable_delay(void *ctx) > > +{ > > + int key = 2; > > +

Re: [PATCH RFC bpf-next v6 6/6] selftests/bpf: add sleepable timer tests

2024-04-08 Thread Eduard Zingerman
On Mon, 2024-04-08 at 10:09 +0200, Benjamin Tissoires wrote: > bpf_experimental.h and ../bpf_testmod/bpf_testmod_kfunc.h are both > including vmlinux.h, which is not compatible with including time.h > or bpf_tcp_helpers.h. > > So keep sleepable tests in a separate bpf source file. > > The first

[PATCH RFC bpf-next v6 6/6] selftests/bpf: add sleepable timer tests

2024-04-08 Thread Benjamin Tissoires
bpf_experimental.h and ../bpf_testmod/bpf_testmod_kfunc.h are both including vmlinux.h, which is not compatible with including time.h or bpf_tcp_helpers.h. So keep sleepable tests in a separate bpf source file. The first correct test is run twice for convenience: - first through RUN_TESTS - then