]> www.infradead.org Git - users/hch/misc.git/commit
selftests: drv-net: make linters happy with our imports
authorJakub Kicinski <kuba@kernel.org>
Fri, 3 Oct 2025 16:47:48 +0000 (09:47 -0700)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 7 Oct 2025 10:12:44 +0000 (12:12 +0200)
commitb615879dbfea6cf1236acbc3f2fb25ae84e07071
treee952c4015a33c1d6c7a95a825b529c85e6d94f4a
parentc9d1b0b54258ba13b567dd116ead3c7c30cba7d8
selftests: drv-net: make linters happy with our imports

Linters are still not very happy with our __init__ files,
which was pointed out in recent review (see Link).

We have previously started importing things one by one to
make linters happy with the test files (which import from __init__).
But __init__ file itself still makes linters unhappy.

To clean it up I believe we must completely remove the wildcard
imports, and assign the imported modules to __all__.

hds.py needs to be fixed because it seems to be importing
the Python standard random from lib.net.

We can't use ksft_pr() / ktap_result() in case importing
from net.lib fails. Linters complain that those helpers
themselves may not have been imported.

Link: https://lore.kernel.org/9d215979-6c6d-4e9b-9cdd-39cff595866e@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Link: https://patch.msgid.link/20251003164748.860042-1-kuba@kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
tools/testing/selftests/drivers/net/hds.py
tools/testing/selftests/drivers/net/lib/py/__init__.py