aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/testing/selftests/drivers/net/hw/csum.py
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2025-02-07 10:41:40 -0800
committerJakub Kicinski <kuba@kernel.org>2025-02-10 19:10:10 -0800
commit3337064f4204572a97f701b936436336e37b99d9 (patch)
tree7e95a8be1416da5dfcf017482bda29cb9ff80aa7 /tools/testing/selftests/drivers/net/hw/csum.py
parentselftests: drv-net: factor out a DrvEnv base class (diff)
downloadwireguard-linux-3337064f4204572a97f701b936436336e37b99d9.tar.xz
wireguard-linux-3337064f4204572a97f701b936436336e37b99d9.zip
selftests: drv-net: add helper for path resolution
Refering to C binaries from Python code is going to be a common need. Add a helper to convert from path in relation to the test. Meaning, if the test is in the same directory as the binary, the call would be simply: cfg.rpath("binary"). The helper name "rpath" is not great. I can't think of a better name that would be accurate yet concise. Reviewed-by: Petr Machata <petrm@nvidia.com> Link: https://patch.msgid.link/20250207184140.1730466-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 cb40497faee4..cd477f3440ca 100755
--- a/tools/testing/selftests/drivers/net/hw/csum.py
+++ b/tools/testing/selftests/drivers/net/hw/csum.py
@@ -100,7 +100,7 @@ def main() -> None:
with NetDrvEpEnv(__file__, nsim_test=False) as cfg:
check_nic_features(cfg)
- cfg.bin_local = path.abspath(path.dirname(__file__) + "/../../../net/lib/csum")
+ cfg.bin_local = cfg.rpath("../../../net/lib/csum")
cfg.bin_remote = cfg.remote.deploy(cfg.bin_local)
cases = []