From: Jakub Kicinski <kuba@kernel.org>
To: Paolo Abeni <pabeni@redhat.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org, edumazet@google.com,
andrew+netdev@lunn.ch, horms@kernel.org, shuah@kernel.org,
willemb@google.com, petrm@nvidia.com,
linux-kselftest@vger.kernel.org
Subject: Re: [PATCH net] selftests: drv-net: wait for carrier
Date: Tue, 12 Aug 2025 07:16:00 -0700 [thread overview]
Message-ID: <20250812071600.6714433d@kernel.org> (raw)
In-Reply-To: <7c011a2f-cdd8-4aed-95b9-d8edb31478a7@redhat.com>
On Tue, 12 Aug 2025 13:12:47 +0200 Paolo Abeni wrote:
> On 8/9/25 12:57 AM, Jakub Kicinski wrote:
> > @@ -48,6 +51,19 @@ from .remote import Remote
> > env[pair[0]] = pair[1]
> > return ksft_setup(env)
> >
> > + def __enter__(self):
> > + ip(f"link set dev {self.dev['ifname']} up")
> > + wait_file(f"/sys/class/net/{self.dev['ifname']}/carrier",
> > + lambda x: x.strip() == "1")
> > +
> > + return self
> > +
> > + def __exit__(self, ex_type, ex_value, ex_tb):
> > + """
> > + __exit__ gets called at the end of a "with" block.
> > + """
> > + self.__del__()
> > +
>
> pylint is doing what looks like a reasonable complain to me:
>
> tools/testing/selftests/drivers/net/lib/py/env.py:65:8: E1101: Instance
> of 'NetDrvEnvBase' has no '__del__' member (no-member)
I know, it's an abstract class. The point of having an empty method is
lost on me. But okay, let me obey the static analyzer overlord.
prev parent reply other threads:[~2025-08-12 14:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-08 22:57 [PATCH net] selftests: drv-net: wait for carrier Jakub Kicinski
2025-08-12 11:12 ` Paolo Abeni
2025-08-12 14:16 ` Jakub Kicinski [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=20250812071600.6714433d@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=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.