From: Jakub Kicinski Date: Fri, 28 Feb 2025 21:29:55 +0000 (-0800) Subject: selftests: drv-net: use env.rpath in the HDS test X-Git-Tag: v6.15-rc1~160^2~176 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ea4342739df3da79a2d1a994fb42971d14dd015b;p=thirdparty%2Flinux.git 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. Acked-by: Stanislav Fomichev Link: https://patch.msgid.link/20250228212956.25399-1-kuba@kernel.org Signed-off-by: Jakub Kicinski --- diff --git a/tools/testing/selftests/drivers/net/hds.py b/tools/testing/selftests/drivers/net/hds.py index 873f5219e41d7..7cc74faed7430 100755 --- a/tools/testing/selftests/drivers/net/hds.py +++ b/tools/testing/selftests/drivers/net/hds.py @@ -20,8 +20,7 @@ def _get_hds_mode(cfg, netnl) -> str: 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)