On Mon, Jul 13, 2026 at 2:35 PM Shung-Hsi Yu <[email protected]> wrote:
>
>
> The raw_tp_writable_reject_nbd_invalid test relies on availability of the
> nbd_send_request tracepoint, which is only present if the selftest kernel is
> built with CONFIG_BLK_DEV_NBD=y and the kernel built from current BPF 
> selftests
> config lacks.
>
> Without it, the bpf_raw_tracepoint_open() call always returns with -2, leaving
> raw_tp_writable_reject_nbd_invalid test always passing without exercising the
> checks bpf_probe_register().
>
> Cc: <[email protected]> # 5.2.0
> Link: https://lore.kernel.org/bpf/alRtilWhKw4zzMkI@u94a
> Signed-off-by: Shung-Hsi Yu <[email protected]>
> ---
> Not sure if fixes tag is the right thing to use here, so use the cc
> stable tag instead to get this config change propogated to other stable
> branches to make stable BPF CI's job easier.
> ---
>  tools/testing/selftests/bpf/config | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/tools/testing/selftests/bpf/config 
> b/tools/testing/selftests/bpf/config
> index adb25146e88c..e1797bd87904 100644
> --- a/tools/testing/selftests/bpf/config
> +++ b/tools/testing/selftests/bpf/config
> @@ -1,4 +1,5 @@
>  CONFIG_BLK_DEV_LOOP=y
> +CONFIG_BLK_DEV_NBD=y
>  CONFIG_BOOTPARAM_HARDLOCKUP_PANIC=y
>  CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=1
>  CONFIG_BPF=y
> --
> 2.54.0
>

I tested this on bpf/master at 7cbd0c4cebe4. With the patch
applied, CONFIG_BLK_DEV_NBD=y and the nbd_send_request
tracepoint was present. raw_tp_writable_reject_nbd_invalid
passed, and strace showed BPF_RAW_TRACEPOINT_OPEN failing
with EINVAL rather than ENOENT.

Tested-by: Sun Jian <[email protected]>

Reply via email to