netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stanislav Fomichev <stfomichev@gmail.com>
To: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Cc: Jakub Kicinski <kuba@kernel.org>,
	davem@davemloft.net, netdev@vger.kernel.org, edumazet@google.com,
	pabeni@redhat.com, andrew+netdev@lunn.ch, horms@kernel.org,
	petrm@nvidia.com
Subject: Re: [PATCH net-next v3 3/4] selftests: drv-net: store addresses in dict indexed by ipver
Date: Mon, 17 Feb 2025 20:21:56 -0800	[thread overview]
Message-ID: <Z7QK5BBo-ufND1yB@mini-arch> (raw)
In-Reply-To: <67b3df4f8d88a_c0e2529493@willemb.c.googlers.com.notmuch>

On 02/17, Willem de Bruijn wrote:
> Jakub Kicinski wrote:
> > Looks like more and more tests want to iterate over IP version,
> > run the same test over ipv4 and ipv6. The current naming of
> > members in the env class makes it a bit awkward, we have
> > separate members for ipv4 and ipv6 parameters.
> > 
> > Store the parameters inside dicts, so that tests can easily
> > index them with ip version.
> > 
> > Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> 
> > +++ b/tools/testing/selftests/drivers/net/ping.py
> > @@ -8,17 +8,17 @@ from lib.py import bkg, cmd, wait_port_listen, rand_port
> >  
> >  
> >  def test_v4(cfg) -> None:
> > -    cfg.require_v4()
> > +    cfg.require_ipver("4")
> >  
> > -    cmd(f"ping -c 1 -W0.5 {cfg.remote_v4}")
> > -    cmd(f"ping -c 1 -W0.5 {cfg.v4}", host=cfg.remote)
> > +    cmd(f"ping -c 1 -W0.5 {cfg.remote_addr_v["4"]}")
> > +    cmd(f"ping -c 1 -W0.5 {cfg.addr_v["4"]}", host=cfg.remote)
> 
> Here and below, intended to use single quote around constant?

Let's kick it off the testing queue as well..

# overriding timeout to 90
# selftests: drivers/net: ping.py
#   File "/home/virtme/testing-18/tools/testing/selftests/drivers/net/./ping.py", line 13
#     cmd(f"ping -c 1 -W0.5 {cfg.remote_addr_v["4"]}")
#                                               ^
# SyntaxError: f-string: unmatched '['

---
pw-bot: cr

  reply	other threads:[~2025-02-18  4:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-17 19:41 [PATCH net-next v3 0/4] selftests: drv-net: add a simple TSO test Jakub Kicinski
2025-02-17 19:41 ` [PATCH net-next v3 1/4] selftests: drv-net: resolve remote interface name Jakub Kicinski
2025-02-17 19:41 ` [PATCH net-next v3 2/4] selftests: drv-net: get detailed interface info Jakub Kicinski
2025-02-17 19:41 ` [PATCH net-next v3 3/4] selftests: drv-net: store addresses in dict indexed by ipver Jakub Kicinski
2025-02-18  1:15   ` Willem de Bruijn
2025-02-18  4:21     ` Stanislav Fomichev [this message]
2025-02-18 14:48       ` Jakub Kicinski
2025-02-18 15:03         ` Willem de Bruijn
2025-02-17 19:42 ` [PATCH net-next v3 4/4] selftests: drv-net: add a simple TSO test Jakub Kicinski
2025-02-18  1:21   ` Willem de Bruijn

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=Z7QK5BBo-ufND1yB@mini-arch \
    --to=stfomichev@gmail.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=petrm@nvidia.com \
    --cc=willemdebruijn.kernel@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).