selftests: drv-net: use env.rpath in the HDS test
Subsystems (3)
Jakub Kicinski
maintainerPATCH 1/2 selftests: drv-net: use env.rpath in the HDS test
Commit 29b036be1b0b ("selftests: drv-net: test XDP, HDS auto and the ioctl path") added a new test case in the net tree, now that this code has made its way to net-next convert it to use the env.rpath() helper instead of manually computing the relative path.
--- tools/testing/selftests/drivers/net/hds.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
tools/testing/selftests/drivers/net/hds.py +1 -2
@@ -20,8 +20,7 @@ from lib.py import defer, ethtool, ip def _xdp_onoff(cfg): - test_dir = os.path.dirname(os.path.realpath(__file__)) - prog = test_dir + "/../../net/lib/xdp_dummy.bpf.o" + prog = cfg.rpath("../../net/lib/xdp_dummy.bpf.o") ip("link set dev %s xdp obj %s sec xdp" % (cfg.ifname, prog)) ip("link set dev %s xdp off" % cfg.ifname)
Signature · 1 line
2.48.1
Jakub Kicinski
maintainerPATCH 2/2 selftests: net: use the dummy bpf from net/lib
Commit 29b036be1b0b ("selftests: drv-net: test XDP, HDS auto and the ioctl path") added an sample XDP_PASS prog in net/lib, so that we can reuse it in various sub-directories. Delete the old sample and use the one from the lib in existing tests.
--- tools/testing/selftests/net/xdp_dummy.bpf.c | 13 ------------- tools/testing/selftests/net/udpgro_bench.sh | 2 +- tools/testing/selftests/net/udpgro_frglist.sh | 2 +- tools/testing/selftests/net/udpgro_fwd.sh | 2 +- tools/testing/selftests/net/veth.sh | 2 +- 5 files changed, 4 insertions(+), 17 deletions(-) delete mode 100644 tools/testing/selftests/net/xdp_dummy.bpf.c
tools/testing/selftests/net/xdp_dummy.bpf.c deleted +0 -13
@@ -1,13 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 - -#define KBUILD_MODNAME "xdp_dummy" -#include <linux/bpf.h> -#include <bpf/bpf_helpers.h> - -SEC("xdp") -int xdp_dummy_prog (struct xdp_md *ctx) -{ -return XDP_PASS ; -} - -char _license[] SEC("license") = "GPL";
tools/testing/selftests/net/udpgro_bench.sh +1 -1
@@ -7,7 +7,7 @@ source net_helper.sh readonly PEER_NS="ns-peer-$(mktemp -u XXXXXX)" -BPF_FILE="xdp_dummy.bpf.o" +BPF_FILE="lib/xdp_dummy.bpf.o" cleanup() { local -r jobs="$(jobs -p)"
tools/testing/selftests/net/udpgro_frglist.sh +1 -1
@@ -7,7 +7,7 @@ source net_helper.sh readonly PEER_NS="ns-peer-$(mktemp -u XXXXXX)" -BPF_FILE="xdp_dummy.bpf.o" +BPF_FILE="lib/xdp_dummy.bpf.o" cleanup() { local -r jobs="$(jobs -p)"
tools/testing/selftests/net/udpgro_fwd.sh +1 -1
@@ -3,7 +3,7 @@ source net_helper.sh -BPF_FILE="xdp_dummy.bpf.o" +BPF_FILE="lib/xdp_dummy.bpf.o" readonly BASE="ns-$(mktemp -u XXXXXX)" readonly SRC=2 readonly DST=1
tools/testing/selftests/net/veth.sh +1 -1
@@ -1,7 +1,7 @@ #!/bin/sh # SPDX-License-Identifier: GPL-2.0 -BPF_FILE="xdp_dummy.bpf.o" +BPF_FILE="lib/xdp_dummy.bpf.o" readonly STATS="$(mktemp -p /tmp ns-XXXXXX)" readonly BASE=`basename $STATS` readonly SRC=2
Signature · 1 line
2.48.1
Re: [PATCH net-next 2/2] selftests: net: use the dummy bpf from net/lib
Quoted 6 lines · Jakub Kicinski
Commit
29b036be1b0b("selftests: drv-net: test XDP, HDS auto and the ioctl path") added an sampleXDP_PASSprog in net/lib, so that we can reuse it in various sub-directories. Delete the old sample and use the one from the lib in existing tests.Signed-off-by Jakub Kicinski <[email protected]>
Quoted 6 lines · Jakub Kicinski
Commit
29b036be1b0b("selftests: drv-net: test XDP, HDS auto and the ioctl path") added a new test case in the net tree, now that this code has made its way to net-next convert it to use theenv.rpath()helper instead of manually computing the relative path.Signed-off-by Jakub Kicinski <[email protected]>
This series was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This series was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 8 lines · On Fri, 28 Feb 2025 13:29:55 -0800 you wrote:
Commit
29b036be1b0b("selftests: drv-net: test XDP, HDS auto and the ioctl path") added a new test case in the net tree, now that this code has made its way to net-next convert it to use theenv.rpath()helper instead of manually computing the relative path.Signed-off-by Jakub Kicinski <[email protected]>[...]
Here is the summary with links:
- [net-next,1/2] selftests: drv-net: use env.rpath in the HDS test
https://git.kernel.org/netdev/net-next/c/ea4342739df3
- [net-next,2/2] selftests: net: use the dummy bpf from net/lib (no matching commit)
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html