From: Jakub Kicinski <kuba@kernel.org>
To: Willem de Bruijn <willemb@google.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org, edumazet@google.com,
pabeni@redhat.com, andrew+netdev@lunn.ch, horms@kernel.org,
shuah@kernel.org, petrm@nvidia.com, sdf@fomichev.me,
linux-kselftest@vger.kernel.org
Subject: Re: [PATCH net-next v2 1/2] selftests: drv-net: add path helper for net/lib
Date: Thu, 6 Mar 2025 16:00:17 -0800 [thread overview]
Message-ID: <20250306160017.1a385f6e@kernel.org> (raw)
In-Reply-To: <CA+FuTSemTNVZ5MxXkq8T9P=DYm=nSXcJnL7CJBPZNAT_9UFisQ@mail.gmail.com>
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?
next prev parent reply other threads:[~2025-03-07 0:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-06 17:11 [PATCH net-next v2 1/2] selftests: drv-net: add path helper for net/lib Jakub Kicinski
2025-03-06 17:11 ` [PATCH net-next v2 2/2] selftests: net: use the dummy bpf from net/lib Jakub Kicinski
2025-03-06 19:35 ` Willem de Bruijn
2025-03-06 20:56 ` Jakub Kicinski
2025-03-06 22:20 ` Willem de Bruijn
2025-03-06 22:22 ` [PATCH net-next v2 1/2] selftests: drv-net: add path helper for net/lib Willem de Bruijn
2025-03-07 0:00 ` Jakub Kicinski [this message]
2025-03-07 1:31 ` Willem de Bruijn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250306160017.1a385f6e@kernel.org \
--to=kuba@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=petrm@nvidia.com \
--cc=sdf@fomichev.me \
--cc=shuah@kernel.org \
--cc=willemb@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.