netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: David Wei <dw@davidwei.uk>
Cc: netdev@vger.kernel.org,
	Willem de Bruijn <willemdebruijn.kernel@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>
Subject: Re: [PATCH net-next v3 2/2] net: selftest: add test for netdev netlink queue-get API
Date: Thu, 25 Apr 2024 18:51:24 -0700	[thread overview]
Message-ID: <20240425185124.7d9456e1@kernel.org> (raw)
In-Reply-To: <20240424023624.2320033-3-dw@davidwei.uk>

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

  reply	other threads:[~2024-04-26  1:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-24  2:36 [PATCH net-next v3 0/2] netdevsim: add NAPI support David Wei
2024-04-24  2:36 ` [PATCH net-next v3 1/2] " David Wei
2024-04-26  1:56   ` Jakub Kicinski
2024-04-24  2:36 ` [PATCH net-next v3 2/2] net: selftest: add test for netdev netlink queue-get API David Wei
2024-04-26  1:51   ` Jakub Kicinski [this message]
2024-05-02  5:04     ` David Wei

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240425185124.7d9456e1@kernel.org \
    --to=kuba@kernel.org \
    --cc=davem@davemloft.net \
    --cc=dw@davidwei.uk \
    --cc=edumazet@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=willemdebruijn.kernel@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).