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: <20240425185124.7d9456e1@kernel.org>
Date: Thu, 25 Apr 2024 18:51:24 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: David Wei <dw@...idwei.uk>
Cc: netdev@...r.kernel.org, Willem de Bruijn
 <willemdebruijn.kernel@...il.com>, "David S. Miller" <davem@...emloft.net>,
 Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>
Subject: Re: [PATCH net-next v3 2/2] net: selftest: add test for netdev
 netlink queue-get API

On Tue, 23 Apr 2024 19:36:24 -0700 David Wei wrote:
> +    try:
> +        expected = curr_queues - 1
> +        cmd(f"ethtool -L {cfg.dev['ifname']} {rx_type} {expected}", timeout=10)
> +        queues = nl_get_queues(cfg, nl)
> +        if not queues:
> +            raise KsftSkipEx('queue-get not supported by device')
> +        ksft_eq(queues, expected)
> +
> +        expected = curr_queues
> +        cmd(f"ethtool -L {cfg.dev['ifname']} {rx_type} {expected}", timeout=10)
> +        queues = nl_get_queues(cfg, nl)
> +        ksft_eq(queues, expected)
> +    except Exception as ex:
> +        raise KsftSkipEx(ex)


Why convert all exceptions to skip? Don't we want the test to go red
if something is off?

> +def main() -> None:
> +    with NetDrvEnv(__file__, queue_count=3) as cfg:
> +        ksft_run([get_queues, addremove_queues], args=(cfg, NetdevFamily()))

gotta call ksft_exit() at the end explicitly. It's a bit annoying, 
I know :S

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ