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

From: Alexei Starovoitov
Date: Tue Apr 23 2024 - 22:58:14 EST


On Sat, Apr 20, 2024 at 2:10 AM Benjamin Tissoires <bentiss@xxxxxxxxxx> 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(&array, &key);
> +}
> +
> +SEC("syscall")
> +/* Same test than above but from a sleepable context.
> + */

I adjusted all these comments to be normal single line comments.

The main thing to follow up is to figure out how to wait for wq
to finish.
Since we have this message:
/test_progs -t wq
..
#521 wq:OK
Summary: 2/9 PASSED, 0 SKIPPED, 0 FAILED
Failed to unload bpf_testmod.ko from kernel: -11

and doing manual "rmmod bpf_testmod"
after the test run is quite annoying.

Overall great stuff. Thank you for pushing it through.
Much appreciated!