summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/drivers/net/hw/csum.py
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2025-03-27 15:23:13 -0700
committerJakub Kicinski <kuba@kernel.org>2025-03-31 16:44:25 -0700
commite514d77334a63f1dcb9a3b47d5aee8f51d66cb1d (patch)
tree4cba27bfdfddac445d386ca459df3c039788252b /tools/testing/selftests/drivers/net/hw/csum.py
parent7220e8f4d4eec0b2f682eef45e2d36c092738413 (diff)
selftests: drv-net: replace the rpath helper with Path objects
The single letter + "path" helpers do not have many fans (see Link). Use a Path object with a better name. test_dir is the replacement for rpath(), net_lib_dir is a new path of the $ksft/net/lib directory. The Path() class overloads the "/" operator and can be cast to string automatically, so to get a path to a file tests can do: path = env.test_dir / "binary" Link: https://lore.kernel.org/CA+FuTSemTNVZ5MxXkq8T9P=DYm=nSXcJnL7CJBPZNAT_9UFisQ@mail.gmail.com Reviewed-by: Willem de Bruijn <willemb@google.com> Link: https://patch.msgid.link/20250327222315.1098596-2-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/testing/selftests/drivers/net/hw/csum.py')
-rwxr-xr-xtools/testing/selftests/drivers/net/hw/csum.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/drivers/net/hw/csum.py b/tools/testing/selftests/drivers/net/hw/csum.py
index 701aca1361e0..cd23af875317 100755
--- a/tools/testing/selftests/drivers/net/hw/csum.py
+++ b/tools/testing/selftests/drivers/net/hw/csum.py
@@ -88,7 +88,7 @@ def main() -> None:
with NetDrvEpEnv(__file__, nsim_test=False) as cfg:
check_nic_features(cfg)
- cfg.bin_local = cfg.rpath("../../../net/lib/csum")
+ cfg.bin_local = cfg.net_lib_dir / "csum"
cfg.bin_remote = cfg.remote.deploy(cfg.bin_local)
cases = []