Re: [PATCH bpf-next v2 10/16] selftests/bpf: add bpf_wq tests

2024-04-24 Thread Alexei Starovoitov
On Tue, Apr 23, 2024 at 7:56 PM Alexei Starovoitov wrote: > > On Sat, Apr 20, 2024 at 2:10 AM Benjamin Tissoires wrote: > > > > + > > +SEC("tc") > > +/* test that workqueues can be used from an array > > + */ > > +__retval(0) > > +long test_call_array_sleepable(void *ctx) > > +{ > > + int

Re: [PATCH bpf-next v2 10/16] selftests/bpf: add bpf_wq tests

2024-04-23 Thread Alexei Starovoitov
On Sat, Apr 20, 2024 at 2:10 AM Benjamin Tissoires wrote: > > + > +SEC("tc") > +/* test that workqueues can be used from an array > + */ > +__retval(0) > +long test_call_array_sleepable(void *ctx) > +{ > + int key = 0; > + > + return test_elem_callback(, ); > +} > + > +SEC("syscall")

[PATCH bpf-next v2 10/16] selftests/bpf: add bpf_wq tests

2024-04-20 Thread Benjamin Tissoires
We simply try in all supported map types if we can store/load a bpf_wq. Signed-off-by: Benjamin Tissoires --- no changes in v2 --- tools/testing/selftests/bpf/prog_tests/wq.c | 11 +++ tools/testing/selftests/bpf/progs/wq.c | 135 2 files changed, 146