[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250306160017.1a385f6e@kernel.org>
Date: Thu, 6 Mar 2025 16:00:17 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Willem de Bruijn <willemb@...gle.com>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
pabeni@...hat.com, andrew+netdev@...n.ch, horms@...nel.org,
shuah@...nel.org, petrm@...dia.com, sdf@...ichev.me,
linux-kselftest@...r.kernel.org
Subject: Re: [PATCH net-next v2 1/2] selftests: drv-net: add path helper for
net/lib
On Thu, 6 Mar 2025 17:22:47 -0500 Willem de Bruijn wrote:
> > + 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
The other option that came to mind was to have one helper called path()
and pass rel=CONST to it. For example:
prog = cfg.path("xdp_dummy.bpf.o", rel=cfg.NET_LIB)
Thinking about it now we could also store dir directly, which is
probably most "Pythonic"?
prog = cfg.net_lib_dir / "xdp_dummy.bpf.o"
Thoughts?
Powered by blists - more mailing lists