[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e3ea5234-c196-4cb7-a0c6-4859c9c2931f@davidwei.uk>
Date: Wed, 1 May 2024 22:04:00 -0700
From: David Wei <dw@...idwei.uk>
To: Jakub Kicinski <kuba@...nel.org>
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 2024-04-25 6:51 pm, Jakub Kicinski wrote:
> 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?
I wanted to separate ethtool -L failures from test failures, but looking
at this code I'm swalling all exceptions here, sorry.
>
>> +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
Ah, I didn't know. Will address in next version.
Powered by blists - more mailing lists