On Thu, Mar 6, 2025 at 12:12 PM Jakub Kicinski kuba@kernel.org wrote:
Looks like a lot of users of recently added env.rpath() actually want to access stuff under net/lib. Add another helper.
Signed-off-by: Jakub Kicinski kuba@kernel.org
Reviewed-by: Willem de Bruijn willemb@google.com
diff --git a/tools/testing/selftests/drivers/net/lib/py/env.py b/tools/testing/selftests/drivers/net/lib/py/env.py index fd4d674e6c72..2a1f8bd0ec19 100644 --- a/tools/testing/selftests/drivers/net/lib/py/env.py +++ b/tools/testing/selftests/drivers/net/lib/py/env.py @@ -30,6 +30,13 @@ from .remote import Remote src_dir = Path(self.src_path).parent.resolve() return (src_dir / path).as_posix()
- def lpath(self, path):
"""
Similar to rpath, but for files in net/lib TARGET.
"""
lib_dir = (Path(__file__).parent / "../../../../net/lib").resolve()
return (lib_dir / path).as_posix()
small nit that one letter acronyms are not the most self describing ;) I would initially read this as local path