]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests/bpf: test_xsk: Don't exit immediately when xsk_attach fails
authorBastien Curutchet (eBPF Foundation) <bastien.curutchet@bootlin.com>
Fri, 31 Oct 2025 08:04:45 +0000 (09:04 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 31 Oct 2025 16:24:38 +0000 (09:24 -0700)
commitf12f1b5d14b0a433a4fa4e1a710ea68d7d15d56b
treeb511da1cbae9e996036248f6e2517115cf121c5e
parente645bcfb16ea5d63fab177d5b5adde2431c91e53
selftests/bpf: test_xsk: Don't exit immediately when xsk_attach fails

xsk_reattach_xdp calls exit_with_error() on failures. This exits the
program immediately. It prevents the following tests from being run and
isn't compliant with the CI.

Add a return value to the functions handling XDP attachments to handle
errors more smoothly.

Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Signed-off-by: Bastien Curutchet (eBPF Foundation) <bastien.curutchet@bootlin.com>
Link: https://lore.kernel.org/r/20251031-xsk-v7-9-39fe486593a3@bootlin.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/test_xsk.c