Netdev List
 help / color / mirror / Atom feed
From: netdev-bot+sashiko@kernel.org
To: houminxi@gmail.com
Cc: netdev@vger.kernel.org, aconole@redhat.com, echaudro@redhat.com,
	i.maximets@ovn.org, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com, horms@kernel.org,
	shuah@kernel.org, dev@openvswitch.org,
	linux-kselftest@vger.kernel.org
Subject: Re: [PATCH net-next v3 4/4] selftests: openvswitch: suppress pylint complexity warnings
Date: Thu, 10 Sep 2026 17:22:04 +0000	[thread overview]
Message-ID: <178906092420.219967.14313598876360832725@kernel.org> (raw)
In-Reply-To: <20260908171859.1967327-5-houminxi@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue(s) to consider:

Critical: 0 · High: 0 · Medium: 1 · Low: 0 (1)

- [Medium] Commit message mischaracterizes the change: the subject and
  body claim the patch suppresses "complexity and structural warnings"…

Pre-existing issues:
- [Low] Latent inheritance-declaration inconsistency now permanently
  masked: `ovskey.ovs_key_ct_tuple_ipv6` is declared `class…

--

selftests: openvswitch: suppress pylint complexity warnings

This adds a block of module-level pylint disable directives to the top of
tools/testing/selftests/net/openvswitch/ovs-dpctl.py.  The commit message
describes them as complexity and structural suppressions matching the large
netlink message classes in the tool.

> diff --git a/tools/testing/selftests/net/openvswitch/ovs-dpctl.py b/tools/testing/selftests/net/openvswitch/ovs-dpctl.py
> index dc88cb1b20c1..7ea0d5204401 100644
> --- a/tools/testing/selftests/net/openvswitch/ovs-dpctl.py
> +++ b/tools/testing/selftests/net/openvswitch/ovs-dpctl.py
> @@ -1,6 +1,14 @@
>  #!/usr/bin/env python3
>  # SPDX-License-Identifier: GPL-2.0
>  """OVS datapath control utility for kernel selftests."""
> +# pylint: disable=invalid-name,too-many-lines
> +# pylint: disable=too-many-ancestors,too-many-arguments
> +# pylint: disable=too-many-positional-arguments,too-many-branches
> +# pylint: disable=too-many-locals,too-many-statements
> +# pylint: disable=too-many-return-statements,too-many-nested-blocks
> +# pylint: disable=unused-argument,broad-exception-caught
> +# pylint: disable=no-member,not-callable

[Severity: Medium]
Does the commit message match what these lines actually do?  The subject says
"suppress pylint complexity warnings" and the body says the disables "cover
complexity and structural warnings", but only the too-many-* entries are
complexity checks.

no-member (E1101) and not-callable (E1102) are pylint error-category
diagnostics, and invalid-name (C0103), unused-argument (W0613),
broad-exception-caught (W0718), non-parent-init-called (W0233) and
super-init-not-called (W0231) are unrelated convention/warning checks.

Because these are module-scope directives they apply to the whole file
(roughly 3200 lines), so a misspelled attribute access or a call on a
non-callable anywhere in ovs-dpctl.py can no longer be reported.  This lands
alongside other patches that rewrite format strings and control flow in the
same file.

Could the message spell out that error-class checks are being turned off
file-wide, or could no-member/not-callable be narrowed to the specific
classes that need them?

Also, invalid-name is now disabled module-wide, which makes the pre-existing
inline suppression in ovsactions dead code:

    class dec_ttl(nla):  # pylint: disable=invalid-name

Should that inline disable be dropped in the same patch so there is only one
suppression scope in the file?

> +# pylint: disable=non-parent-init-called,super-init-not-called

[Severity: Low]
This isn't a bug introduced by this patch, but disabling
non-parent-init-called module-wide removes the only automated signal for an
existing inconsistency in ovskey.

ovskey.ovs_key_ct_tuple_ipv6 is declared with nla as its base:

    class ovs_key_ct_tuple_ipv6(nla):
        """IPv6 conntrack tuple key (OVS_KEY_ATTR_CT_TUPLE_IPV6)."""

but its __init__ initializes through a class that is not in its ancestry:

            ovskey.ovs_key_proto.__init__(
                self,
                "ct_tuple6",
                ...

Its ABI peer does derive from ovs_key_proto:

    class ovs_key_ct_tuple_ipv4(ovs_key_proto):

Nothing appears to misbehave today: ovs_key_proto.__init__ only sets
self.proto_str and forwards to nla.__init__, which is a real ancestor, and
neither ct_tuple4 nor ct_tuple6 appears in the ovskey.parse() or
ovskey.dpstr() dispatch tables, so the ovs_key_proto.parse()/dpstr() methods
that ovs_key_ct_tuple_ipv6 does not inherit are never called.

Would it be worth fixing the declared base class to ovs_key_proto rather
than silencing the check that flags it?

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260908171859.1967327-1-houminxi%40gmail.com

      reply	other threads:[~2026-09-10 17:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-08 17:18 [PATCH net-next v3 0/4] selftests: openvswitch: pylint cleanup of ovs-dpctl.py Minxi Hou
2026-09-08 17:18 ` [PATCH net-next v3 1/4] selftests: openvswitch: convert %-formatting to f-strings Minxi Hou
2026-09-08 17:18 ` [PATCH net-next v3 2/4] selftests: openvswitch: fix misc pylint warnings in ovs-dpctl.py Minxi Hou
2026-09-08 17:18 ` [PATCH net-next v3 3/4] selftests: openvswitch: add missing docstrings " Minxi Hou
2026-09-10 17:22   ` netdev-bot+sashiko
2026-09-10 17:44     ` Aaron Conole
2026-09-08 17:18 ` [PATCH net-next v3 4/4] selftests: openvswitch: suppress pylint complexity warnings Minxi Hou
2026-09-10 17:22   ` netdev-bot+sashiko [this message]

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=178906092420.219967.14313598876360832725@kernel.org \
    --to=netdev-bot+sashiko@kernel.org \
    --cc=aconole@redhat.com \
    --cc=davem@davemloft.net \
    --cc=dev@openvswitch.org \
    --cc=echaudro@redhat.com \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=houminxi@gmail.com \
    --cc=i.maximets@ovn.org \
    --cc=kuba@kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shuah@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox