lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aC4QSV1OFNtodw9Y@mini-arch>
Date: Wed, 21 May 2025 10:41:29 -0700
From: Stanislav Fomichev <stfomichev@...il.com>
To: Mina Almasry <almasrymina@...gle.com>
Cc: netdev@...r.kernel.org, davem@...emloft.net, edumazet@...gle.com,
	kuba@...nel.org, pabeni@...hat.com, viro@...iv.linux.org.uk,
	horms@...nel.org, andrew+netdev@...n.ch, shuah@...nel.org,
	sagi@...mberg.me, willemb@...gle.com, asml.silence@...il.com,
	jdamato@...tly.com, kaiyuanz@...gle.com,
	linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org
Subject: Re: [PATCH net-next 3/3] selftests: ncdevmem: add tx test with
 multiple IOVs

On 05/21, Mina Almasry wrote:
> On Tue, May 20, 2025 at 1:30 PM Stanislav Fomichev <stfomichev@...il.com> wrote:
> >
> > Use prime 3 for length to make offset slowly drift away.
> >
> > Signed-off-by: Stanislav Fomichev <stfomichev@...il.com>
> > ---
> >  .../testing/selftests/drivers/net/hw/devmem.py  | 17 ++++++++++++++++-
> >  1 file changed, 16 insertions(+), 1 deletion(-)
> >
> > diff --git a/tools/testing/selftests/drivers/net/hw/devmem.py b/tools/testing/selftests/drivers/net/hw/devmem.py
> > index 7fc686cf47a2..d7f6a76eb2b7 100755
> > --- a/tools/testing/selftests/drivers/net/hw/devmem.py
> > +++ b/tools/testing/selftests/drivers/net/hw/devmem.py
> > @@ -49,12 +49,27 @@ from lib.py import ksft_disruptive
> >      ksft_eq(socat.stdout.strip(), "hello\nworld")
> >
> >
> > +@...t_disruptive
> > +def check_tx_chunks(cfg) -> None:
> > +    cfg.require_ipver("6")
> > +    require_devmem(cfg)
> > +
> > +    port = rand_port()
> > +    listen_cmd = f"socat -U - TCP6-LISTEN:{port}"
> > +
> > +    with bkg(listen_cmd, exit_wait=True) as socat:
> > +        wait_port_listen(port)
> > +        cmd(f"echo -e \"hello\\nworld\"| {cfg.bin_remote} -f {cfg.ifname} -s {cfg.addr_v['6']} -p {port} -z 3", host=cfg.remote, shell=True)
> > +
> > +    ksft_eq(socat.stdout.strip(), "hello\nworld")
> > +
> > +
> >  def main() -> None:
> >      with NetDrvEpEnv(__file__) as cfg:
> >          cfg.bin_local = path.abspath(path.dirname(__file__) + "/ncdevmem")
> >          cfg.bin_remote = cfg.remote.deploy(cfg.bin_local)
> >
> > -        ksft_run([check_rx, check_tx],
> > +        ksft_run([check_rx, check_tx, check_tx_chunks],
> >                   args=(cfg, ))
> >      ksft_exit()
> >
> > --
> > 2.49.0
> >
> 
> I was hoping we'd add the test coverage without the need to add test
> cases to the ksft. I was thinking maybe ncdevmem can do rand() each
> sendmsg loop and send a different set of chunks, so that we don't need
> a flag.
> 
> But it may be too hacky to have the test be non-deterministic, so up to you
> 
> Acked-by: Mina Almasry <almasrymina@...gle.com>

Thanks! Let's spell it out explicitly for now. Doing it at random seems
like an option when we start sending more data (after your series
that converts the tests to -v).

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ