From: Jakub Kicinski <kuba@kernel.org>
To: David Wei <dw@davidwei.uk>
Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>
Subject: Re: [PATCH v1 2/2] net: selftest: add test for netdev netlink queue-get API
Date: Tue, 16 Apr 2024 17:31:59 -0700 [thread overview]
Message-ID: <20240416173159.38a7818e@kernel.org> (raw)
In-Reply-To: <20240416051527.1657233-3-dw@davidwei.uk>
On Mon, 15 Apr 2024 22:15:27 -0700 David Wei wrote:
> Add a selftest for Netdev Netlink queue-get API. The ground truth is
> determined by sysfs.
>
> The test works with netdevsim by default or with a real device by
> setting NETIF.
Nice!
> + def dev_up(self):
> + ip(f"link set dev {self.dev['ifname']} up")
> +
> + def dev_down(self):
> + ip(f"link set dev {self.dev['ifname']} down")
Let's ifup the device as part of env setup instead?
> diff --git a/tools/testing/selftests/drivers/net/queues.py b/tools/testing/selftests/drivers/net/queues.py
> new file mode 100755
> index 000000000000..de2820f2759a
> --- /dev/null
> +++ b/tools/testing/selftests/drivers/net/queues.py
> @@ -0,0 +1,67 @@
> +#!/usr/bin/env python3
> +# SPDX-License-Identifier: GPL-2.0
> +
> +from lib.py import ksft_run, ksft_in, ksft_true, ksft_eq, KsftSkipEx, KsftXfailEx
> +from lib.py import NetdevFamily, NlError
> +from lib.py import NetDrvEnv
> +from lib.py import cmd
> +import glob
> +
> +netnl = NetdevFamily()
Would it be cleaner to pass this as an argument to the tests instead of
using a global?
--
pw-bot: cr
prev parent reply other threads:[~2024-04-17 0:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-16 5:15 [PATCH v1 0/2] netdevsim: add NAPI support David Wei
2024-04-16 5:15 ` [PATCH v1 1/2] " David Wei
2024-04-17 0:27 ` Jakub Kicinski
2024-04-19 16:08 ` David Wei
2024-04-16 5:15 ` [PATCH v1 2/2] net: selftest: add test for netdev netlink queue-get API David Wei
2024-04-17 0:31 ` Jakub Kicinski [this message]
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=20240416173159.38a7818e@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 \
/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).