diff options
| author | Jakub Kicinski <[email protected]> | 2025-03-27 22:23:13 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2025-03-31 23:44:25 +0000 |
| commit | e514d77334a63f1dcb9a3b47d5aee8f51d66cb1d (patch) | |
| tree | 4cba27bfdfddac445d386ca459df3c039788252b /tools/testing/selftests/drivers/net/hds.py | |
| parent | net: lapbether: use netdev_lockdep_set_classes() helper (diff) | |
| download | kernel-e514d77334a63f1dcb9a3b47d5aee8f51d66cb1d.tar.gz kernel-e514d77334a63f1dcb9a3b47d5aee8f51d66cb1d.zip | |
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 <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'tools/testing/selftests/drivers/net/hds.py')
| -rwxr-xr-x | tools/testing/selftests/drivers/net/hds.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/drivers/net/hds.py b/tools/testing/selftests/drivers/net/hds.py index 7cc74faed743..8b7f6acad15f 100755 --- a/tools/testing/selftests/drivers/net/hds.py +++ b/tools/testing/selftests/drivers/net/hds.py @@ -20,7 +20,7 @@ def _get_hds_mode(cfg, netnl) -> str: def _xdp_onoff(cfg): - prog = cfg.rpath("../../net/lib/xdp_dummy.bpf.o") + prog = cfg.net_lib_dir / "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) |
