[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <96ab4322-e27b-452a-8408-d36c3e209714@redhat.com>
Date: Tue, 7 Oct 2025 12:12:08 +0200
From: Paolo Abeni <pabeni@...hat.com>
To: Jakub Kicinski <kuba@...nel.org>, davem@...emloft.net
Cc: netdev@...r.kernel.org, edumazet@...gle.com, andrew+netdev@...n.ch,
horms@...nel.org, petrm@...dia.com, shuah@...nel.org,
daniel.zahka@...il.com, willemb@...gle.com, linux-kselftest@...r.kernel.org
Subject: Re: [PATCH net repost] selftests: drv-net: make linters happy with
our imports
On 10/3/25 6:47 PM, Jakub Kicinski wrote:
> 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@...nel.org>
> ---
> - resend after net-next PR was merged
> v1: https://lore.kernel.org/20251001234308.2895998-1-kuba@kernel.org
>
> Sending a fix for the driver's __init__.py first, if this is okay
> with everyone I'll convert the rest. I'm not super confident 'cause
> my Python isn't properly learned.
>
> Sending for net, even tho its not a real fix. I think that getting
> it applied during the merge window may be okay? No strong prefence.
> I'm slightly worried that merging it in net-next after the MW will
> leave us with a release cycle full of merge conflicts.
AFAICS linters are indeed happy, and I agree this should go via net, to
propagate the correct style ASAP on both trees.
Thanks,
Paolo
Powered by blists - more mailing lists