]> Gentwo Git Trees - linux/.git/commit
selftests/bpf: test_xsk: Split xskxceiver
authorBastien Curutchet (eBPF Foundation) <bastien.curutchet@bootlin.com>
Fri, 31 Oct 2025 08:04:37 +0000 (09:04 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 31 Oct 2025 16:24:38 +0000 (09:24 -0700)
commit3ab77f35a75eb236956c1e8ba8494ef18a75eae0
tree30faa48868bb63f513e6433d51beccbadb9397c4
parent5701d5aefa19a48c4eb14625a740027ac82657f8
selftests/bpf: test_xsk: Split xskxceiver

AF_XDP features are tested by the test_xsk.sh script but not by the
test_progs framework. The tests used by the script are defined in
xksxceiver.c which can't be integrated in the test_progs framework as is.

Extract these test definitions from xskxceiver{.c/.h} to put them in new
test_xsk{.c/.h} files.
Keep the main() function and its unshared dependencies in xksxceiver to
avoid impacting the test_xsk.sh script which is often used to test real
hardware.
Move ksft_test_result_*() calls to xskxceiver.c to keep the kselftest's
report valid

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-1-39fe486593a3@bootlin.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/Makefile
tools/testing/selftests/bpf/test_xsk.c [new file with mode: 0644]
tools/testing/selftests/bpf/test_xsk.h [new file with mode: 0644]
tools/testing/selftests/bpf/xskxceiver.c
tools/testing/selftests/bpf/xskxceiver.h