[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <67b4a12e2c118_11781b294a2@willemb.c.googlers.com.notmuch>
Date: Tue, 18 Feb 2025 10:03:10 -0500
From: Willem de Bruijn <willemdebruijn.kernel@...il.com>
To: Jakub Kicinski <kuba@...nel.org>,
Stanislav Fomichev <stfomichev@...il.com>
Cc: Willem de Bruijn <willemdebruijn.kernel@...il.com>,
davem@...emloft.net,
netdev@...r.kernel.org,
edumazet@...gle.com,
pabeni@...hat.com,
andrew+netdev@...n.ch,
horms@...nel.org,
petrm@...dia.com
Subject: Re: [PATCH net-next v3 3/4] selftests: drv-net: store addresses in
dict indexed by ipver
Jakub Kicinski wrote:
> On Mon, 17 Feb 2025 20:21:56 -0800 Stanislav Fomichev wrote:
> > > > 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 '['
>
> Huh, it worked for me locally, must be a python version thing..
>
> Python 3.13.2
>
> >>> a={"a": ' '}
> >>> f"test{a["a"]}test"
> 'test test'
Failed for me on 3.11.
Apparently this was indeed addressed in 3.12:
https://realpython.com/python-f-strings/#using-quotation-marks
Powered by blists - more mailing lists