Subject: Re: [PATCH net-next v3 2/2] net: selftest: add test for netdev netlink queue-get API

From: Jakub Kicinski <[email-masked]>
Date: Thu, 25 Apr 2024 18:51:24 -0700

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