Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests: net: move xdp_helper to net/lib

Move xdp_helper to net/lib to make it easier for other selftests to use
the helper.

Signed-off-by: Bui Quang Minh <minhquangbui99@gmail.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Link: https://patch.msgid.link/20250425071018.36078-2-minhquangbui99@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Bui Quang Minh and committed by
Jakub Kicinski
59dd07db c0b0a360

+5 -5
-1
tools/testing/selftests/drivers/net/.gitignore
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 2 napi_id_helper 3 - xdp_helper
-1
tools/testing/selftests/drivers/net/Makefile
··· 8 8 9 9 TEST_GEN_FILES := \ 10 10 napi_id_helper \ 11 - xdp_helper \ 12 11 # end of TEST_GEN_FILES 13 12 14 13 TEST_PROGS := \
tools/testing/selftests/drivers/net/ksft.h tools/testing/selftests/net/lib/ksft.h
+1 -1
tools/testing/selftests/drivers/net/napi_id_helper.c
··· 8 8 #include <arpa/inet.h> 9 9 #include <sys/socket.h> 10 10 11 - #include "ksft.h" 11 + #include "../../net/lib/ksft.h" 12 12 13 13 int main(int argc, char *argv[]) 14 14 {
+2 -2
tools/testing/selftests/drivers/net/queues.py
··· 26 26 27 27 def check_xsk(cfg, nl, xdp_queue_id=0) -> None: 28 28 # Probe for support 29 - xdp = cmd(f'{cfg.test_dir / "xdp_helper"} - -', fail=False) 29 + xdp = cmd(f'{cfg.net_lib_dir / "xdp_helper"} - -', fail=False) 30 30 if xdp.ret == 255: 31 31 raise KsftSkipEx('AF_XDP unsupported') 32 32 elif xdp.ret > 0: 33 33 raise KsftFailEx('unable to create AF_XDP socket') 34 34 35 - with bkg(f'{cfg.test_dir / "xdp_helper"} {cfg.ifindex} {xdp_queue_id}', 35 + with bkg(f'{cfg.net_lib_dir / "xdp_helper"} {cfg.ifindex} {xdp_queue_id}', 36 36 ksft_wait=3): 37 37 38 38 rx = tx = False
tools/testing/selftests/drivers/net/xdp_helper.c tools/testing/selftests/net/lib/xdp_helper.c
+1
tools/testing/selftests/net/lib/.gitignore
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 2 csum 3 + xdp_helper
+1
tools/testing/selftests/net/lib/Makefile
··· 10 10 11 11 TEST_GEN_FILES += csum 12 12 TEST_GEN_FILES += $(patsubst %.c,%.o,$(wildcard *.bpf.c)) 13 + TEST_GEN_FILES += xdp_helper 13 14 14 15 TEST_INCLUDES := $(wildcard py/*.py sh/*.sh) 15 16