Re: [PATCH net-next v4 6/8] selftests: drv-net: refactor devmem command builders into lib module

From: Bobby Eshleman

Date: Wed May 13 2026 - 22:29:29 EST


On Wed, May 13, 2026 at 07:21:33PM -0700, Jakub Kicinski wrote:
> On Mon, 11 May 2026 18:18:00 -0700 Bobby Eshleman wrote:
> > tools/testing/selftests/drivers/net/hw/devmem.py | 77 ++------
> > .../selftests/drivers/net/hw/lib/py/devmem.py | 218 +++++++++++++++++++++
>
> If the reuse is in the same dir I think you can create
>
> tools/testing/selftests/drivers/net/hw/devmem_lib.py
>
> and import:
>
> from devmem_lib import bla
>
> I _think_ that should "just work" ?
>
> The lib/ is meant for things shared between targets.

I will give that a try.

>
> Also I think you missed adding the new file to Makefiles ?
> It needs to be under TEST_FILES for building tarballs

Ah okay, I wasn't sure if the already existing `TEST_INCLUDES :=
$(wildcard lib/py/*.py ../lib/py/*.py)` was sufficient or not. Will use
TEST_FILES with the devmem_lib approach above next rev.

Thanks,
Bobby