On Fri, 7 Jun 2024 00:51:15 + Mina Almasry wrote:
> Abstrace the memory type from the page_pool so we can later add support
> for new memory types. Convert the page_pool to use the new netmem type
> abstraction, rather than use struct page directly.
>
> As of this patch the netmem type is a
On Wed, 12 Jun 2024 17:19:03 +0800 Geliang Tang wrote:
> tls_sw doesn't work for sk_redirect in nonblock mode, sk_msg_recvmsg()
> returns 0 in that case in tls_sw_recvmsg(). This patch fixes this by using
> "continue" to receive msg again instead of ending it if strp isn't ready
> and rx_list is
On Tue, 11 Jun 2024 17:13:34 +0800 Geliang Tang wrote:
> tls_sw_recvmsg() doesn't work in nonblock mode, it returns -EAGAIN in
> that case. This patch fixes it, always wait for receiving the next skb
> for sk_redirect.
Is this commit message basically saying "block in nonblock mode" or am
I
On Mon, 3 Jun 2024 11:33:22 +0200 Lukasz Majewski wrote:
> Fixed MAC addresses help with debugging as last four bytes identify the
> network namespace.
>
> Moreover, it allows to mimic the real life setup with for example bridge
> having the same MAC address on each port.
Doesn't seem like a
On Mon, 03 Jun 2024 15:00:03 -0400 Aaron Conole wrote:
> I agree, this is an issue. BUT I think it might be better to just
> filter by field type up front. See:
>
>
On Wed, 22 May 2024 10:19:33 -0600 Shuah Khan wrote:
> On 5/21/24 18:56, Edward Liaw wrote:
> > Centralizes the definition of _GNU_SOURCE into KHDR_INCLUDES and removes
> > redefinitions of _GNU_SOURCE from source code.
> >
> > 809216233555 ("selftests/harness: remove use of LINE_MAX") introduced
On Fri, 17 May 2024 10:14:02 +0100 Simon Horman wrote:
> Jakub, is there a way to tell how long a test took to execute?
> Perhaps it's obvious, but I couldn't see it.
It's not obvious, and it was broken. There's an 'info' file with
extra metadata in the directory with results:
On Tue, 14 May 2024 15:11:30 +0800 Hangbin Liu wrote:
> Hi Jakub, would you please help check if this fix the
> arp_ndisc_untracked_subnets flake issue on debug kernel?
It didn't get ingested by the CI because there's a conflict with
something else that got merged into lib.sh. Could you rebase /
test which
always fails prevents us from catching regressions. Report
the cases we know may fail as XFAIL.
Signed-off-by: Jakub Kicinski
---
CC: liuhang...@gmail.com
CC: sh...@kernel.org
CC: linux-kselftest@vger.kernel.org
CC: Petr Machata
CC: vladimir.olt...@nxp.com
v3:
- use xfail_on_veth
on, cause these construct will not filter
either.
If I'm not making sense - I'm probably confused, I can code up what you
suggested, it will work, just more LoC :)
--->8--
From 7a645eb425530f647e88590ba7ba01681e73812e Mon Sep 17 00:00:00 2001
From: Jakub Kicinski
Date: Thu, 9 May 2024 16:28:4
On Mon, 13 May 2024 15:25:38 +0200 Petr Machata wrote:
> For veth specifically there is xfail_on_veth:
>
> xfail_on_veth $rcv_if_name \
> check_rcv $rcv_if_name "Unicast IPv4 to unknown MAC address" \
> "$smac > $UNKNOWN_UC_ADDR1, ethertype IPv4 (0x0800)" \
>
On Tue, 14 May 2024 17:56:44 +0200 Richard Gobert wrote:
> > Hi Richard, any chance of getting this fixed within the next 2 hours?
> > I can't send the net-next PR if it doesn't build on one of the arches..
>
> Hi Jakub and Geert,
> I'm only seeing this mail now, sorry for the late response.
>
On Tue, 14 May 2024 14:13:21 +0200 Geert Uytterhoeven wrote:
> On Thu, May 9, 2024 at 9:09 PM Richard Gobert
> wrote:
> > {inet,ipv6}_gro_receive functions perform flush checks (ttl, flags,
> > iph->id, ...) against all packets in a loop. These flush checks are used in
> > all merging UDP and
On Fri, 10 May 2024 16:21:11 -0700 Mina Almasry wrote:
> Device Memory TCP
Sorry Mina, this is too big to apply during the merge window :(
--
pw-bot: defer
test which
always fails prevents us from catching regressions. Report
the cases we know may fail as XFAIL.
Reviewed-by: Vladimir Oltean
Tested-by: Vladimir Oltean
Signed-off-by: Jakub Kicinski
---
CC: liuhang...@gmail.com
CC: sh...@kernel.org
CC: linux-kselftest@vger.kernel.org
v2:
- remove
On Thu, 09 May 2024 22:49:50 -0400 Willem de Bruijn wrote:
> > struct sock_extended_err *see;
> > struct scm_timestamping *ts;
> > + unsigned int ts_seen = 0;
>
> nit: mixing unsigned long and unsigned int
Fixed when applying, thanks!
On Fri, 10 May 2024 14:28:56 +0300 Vladimir Oltean wrote:
> Check that the deployed mtools version is 3.0 or above. Note that the
> version check breaks compatibility with my fork
And Joachim's tree from before the tag, the PR was merged a while back
;)
> where I didn't bump the version, but I
On Fri, 10 May 2024 11:15:58 +0800 Hangbin Liu wrote:
> I may missed something, I saw there is already a log_test_xfail() in lib.sh
>
> log_test_skip()
> {
> RET=$ksft_skip retmsg= log_test "$@"
> }
>
> log_test_xfail()
> {
> RET=$ksft_xfail retmsg= log_test "$@"
> }
>
>
l returned '', expected 'OK'
Signed-off-by: Jakub Kicinski
---
CC: sh...@kernel.org
CC: linux-kselftest@vger.kernel.org
---
tools/testing/selftests/net/cmsg_sender.c | 32 +--
tools/testing/selftests/net/cmsg_time.sh | 7 +++--
2 files changed, 23 insertions(+), 16 deletion
the "TXTIME abs" failures on debug kernels, like:
Case ICMPv4 - TXTIME abs returned '', expected 'OK'
Signed-off-by: Jakub Kicinski
---
CC: sh...@kernel.org
CC: linux-kselftest@vger.kernel.org
---
tools/testing/selftests/net/cmsg_sender.c | 20 +++-
1 file changed, 15
test which
always fails prevents us from catching regressions. Report
the cases we know may fail as XFAIL.
Signed-off-by: Jakub Kicinski
---
CC: vladimir.olt...@nxp.com
CC: sh...@kernel.org
CC: pe...@nvidia.com
CC: liuhang...@gmail.com
CC: bpoir...@nvidia.com
CC: linux-kselftest@vger.kernel.org
On Thu, 09 May 2024 19:39:36 +0200 Paolo Abeni wrote:
> Acked-by: Paolo Abeni
Thanks!
> As a minor note, shell variable expansion should already trim all the
> trailing/leading spaces from the socat command output, so it should not
> be necessary replace the string comparison with the grep
On Thu, 9 May 2024 13:08:36 +0800 Tao Su wrote:
> > SGTM, FWIW. The print is printing a test summary line, printing more
> > than 1k seems rather unreasonable. Other facilities, like TH_LOG(),
> > should be used for displaying longer info.
>
> Thanks, do you think 1k is enough for test_name?
On Wed, 8 May 2024 04:06:43 + Taehee Yoo wrote:
> In the forwarding testcase, it opens a server and a client with the nc.
> The server receives the correct message from NC, it prints OK.
> The server prints FAIL if it receives the wrong message from the client.
>
> But If the server can't
don't set exit code
(|| true) and print the pass / fail rather then silently
moving over the test and just setting non-zero exit code
with no output indicating what failed.
Fixes: c08e8baea78e ("selftests: add amt interface selftest script")
Signed-off-by: Jakub Kicinski
---
CC: sh...@ker
Test needs IPv6 multicast. smcroute currently crashes when trying
to install a route in a kernel without IPv6 multicast.
Fixes: c08e8baea78e ("selftests: add amt interface selftest script")
Signed-off-by: Jakub Kicinski
---
CC: sh...@kernel.org
CC: ap420...@gmail.com
CC: linux
On Tue, 7 May 2024 19:21:50 -0700 Joe Damato wrote:
> On Wed, May 08, 2024 at 12:43:26AM +, Joe Damato wrote:
> > Add a simple test for the epoll busy poll ioctls, using the kernel
> > selftest harness.
> >
> > This test ensures that the ioctls have the expected return codes and
> > that the
On Wed, 8 May 2024 10:55:05 +0800 Tao Su wrote:
> Back to commit 38c957f07038, I don't see any advantage in using LINE_MAX.
> Can we use a fixed value instead of LINE_MAX? E.g., 1024, 2048. Then we
> just need to revert commit 809216233555.
SGTM, FWIW. The print is printing a test summary line,
On Tue, 7 May 2024 18:23:45 +0200 Richard Gobert wrote:
> The cb fields network_offset and inner_network_offset are used instead of
> skb->network_header throughout GRO.
>
> These fields are then leveraged in the next commit to remove flush_id state
> from napi_gro_cb, and stateful code in
On Mon, 6 May 2024 18:40:00 -0700 Joe Damato wrote:
> Ah, sorry -- this is because I had assumed the test would run without
> CAP_NET_ADMIN, but since:
>
> epoll_busy_poll.c:204:test_set_invalid:Expected -1 (-1) == ret (0)
>
> succeeds (ret = 0), clearly I am mistaken. Sorry about that.
>
> I
On Mon, 6 May 2024 20:53:22 + Joe Damato wrote:
> Add a simple test for the epoll busy poll ioctls, using the kernel
> selftest harness.
>
> This test ensures that the ioctls have the expected return codes and
> that the kernel properly gets and sets epoll busy poll parameters.
>
> The test
On Mon, 6 May 2024 17:37:54 +0200 Antony Antony wrote:
> This appears to be an error from the v2 run, which was sent yesterday.
> The v3 patch should have superseded it.
>
> The branch net-dev-testing/net-next-2024-05-06--12-00 contains the v2 patch.
> I wonder if net-dev testing recognized v3
On Mon, 6 May 2024 10:05:54 +0200 Antony Antony wrote:
> Add IPsec tunnel, aka xfrm state, tests with ICMP flags enabled.
> IPv4 and IPv6, unreachable tests over xfrm/IPsec tunnels,
> xfrm SA with "flag icmp" set.
Doesn't seem to work:
# selftests: net: xfrm_state.sh
# ./xfrm_state.sh: line 91:
On Fri, 3 May 2024 16:09:45 -0700 Joe Damato wrote:
> > "GEN" is for files which are built for other tests to use.
> > IOW unless there's also a wrapper script under TEST_PROGS
> > (or the C code is itself under TEST_PROGS) this test won't
> > be executed by most CIs.
>
> Ah, I see. OK.
>
> If
On Thu, 2 May 2024 21:20:11 + Joe Damato wrote:
> --- a/tools/testing/selftests/net/Makefile
> +++ b/tools/testing/selftests/net/Makefile
> @@ -84,6 +84,7 @@ TEST_GEN_FILES += sctp_hello
> TEST_GEN_FILES += csum
> TEST_GEN_FILES += ip_local_port_range
> TEST_GEN_FILES += bind_wildcard
>
On Wed, 01 May 2024 21:38:24 -0400 Willem de Bruijn wrote:
> A few more may be in scope eventually: toeplitz, udpgso_bench, gro,
> so_txtime. Move them on a case-by-case basis?
If you plan to use them all in hw tests - no preference,
you can move them all in one fell swoop if you prefer.
> >
Great! I run it on a couple of older machines.
mlx5:
TAP version 13
1..1
# timeout set to 0
# selftests: drivers/net/hw: csum.py
# KTAP version 1
# 1..12
# ok 1 csum.ipv4_rx_tcp # SKIP Test requires IPv4 connectivity
# ok 2 csum.ipv4_rx_tcp_invalid # SKIP Test requires IPv4 connectivity
# ok 3
On Tue, 30 Apr 2024 15:54:38 +0200 Mickaël Salaün wrote:
> Jakub, can you please review it?
I looked thru it. I don't have the cycles to investigate and suggest
a better approach but the sprinkling of mmaps(), if nothing else, feels
a bit band-aid-y 路️
On Mon, 29 Apr 2024 08:52:36 -0700 Kees Cook wrote:
> > +/* Wait for the child process to end but without sharing memory mapping. */
> > +static pid_t __attribute__((__unused__)) clone3_vfork(void)
>
> Why "unused"?
Right, static inline is enough
On Mon, 29 Apr 2024 11:02:51 -0400 Willem de Bruijn wrote:
> The only interesting points so far are the use of deploy (which I
> assume you have on some internal patch already)
Yup, they need a touch more cleaning up but the PSP tests use it.
> and that with bkg would not fail the test if the
On Mon, 29 Apr 2024 17:01:55 +0200 Andrew Lunn wrote:
> > I'm not super happy with the traffic generation using iperf3,
> > my initial approach was to use mausezahn. But it turned out to be
> > 5x slower in terms of PPS. Hopefully this is good enough for now.
>
> How important is PPS? In order
On Mon, 29 Apr 2024 17:12:29 +0200 Andrew Lunn wrote:
> > # ./drivers/net/hw/pp_alloc_fail.py
> > KTAP version 1
> > 1..1
> > # ethtool -G change retval: success
> > ok 1 pp_alloc_fail.test_pp_alloc
> > # Totals: pass:1 fail:0 xfail:0 xpass:0 skip:0 error:0
>
> If i'm reading the
On Sat, 27 Apr 2024 09:49:28 -0400 Willem de Bruijn wrote:
> Eventually probably want a more generic fault injection class.
>
> And for both fault injection and background traffic the with object
> construct to ensure cleanup in all cases.
>
> Maybe even the same for ethtool, as ip and ethtool
blem fixed in commit 730117730709 ("eth: bnxt: fix counting
packets discarded due to OOM and netpoll").
Reviewed-by: Willem de Bruijn
Signed-off-by: Jakub Kicinski
---
.../testing/selftests/drivers/net/hw/Makefile | 1 +
.../selftests/drivers/net/hw/pp_alloc_fail.py | 129 +
While we are not very interested in testing performance
it's useful to be able to generate a lot of traffic.
iperf is the simplest way of getting relatively high PPS.
Reviewed-by: Willem de Bruijn
Signed-off-by: Jakub Kicinski
---
v2:
- fix import order in __init__.py
---
.../selftests
When picking TCP ports to use, avoid all below 10k.
This should lower the chance of collision or running
afoul whatever random policies may be on the host.
Reviewed-by: Willem de Bruijn
Signed-off-by: Jakub Kicinski
---
tools/testing/selftests/net/lib/py/utils.py | 2 +-
1 file changed, 1
rt the --json switch.
To avoid having to wrap all of them individually create a tool()
helper.
Switch from -j to --json (for ethtool).
While at it consume the netns attribute at the ip() level.
Reviewed-by: Willem de Bruijn
Signed-off-by: Jakub Kicinski
---
v2:
- use consistent quote type
de Bruijn
Signed-off-by: Jakub Kicinski
---
tools/testing/selftests/Makefile | 2 +-
tools/testing/selftests/drivers/net/hw/Makefile | 1 +
.../selftests/drivers/net/hw/lib/py/__init__.py | 16
.../testing/selftests/drivers/net/lib/py/env.py | 10 -
Because of caching / recycling using the general page allocation
failures to induce errors in page pool allocation is very hard.
Add direct error injection support to page_pool_alloc_pages().
Reviewed-by: Willem de Bruijn
Signed-off-by: Jakub Kicinski
---
CC: h...@kernel.org
CC: ilias.apalodi
t to be
5x slower in terms of PPS. Hopefully this is good enough for now.
v2:
- fix the string formatting for tool wrapper change (patch 3)
- fix import order for load.py
v1: https://lore.kernel.org/all/20240426232400.624864-1-k...@kernel.org/
Jakub Kicinski (6):
net: page_pool: support error
On Sat, 27 Apr 2024 09:51:01 -0400 Willem de Bruijn wrote:
> > +def ip(args, json=None, ns=None, host=None):
> > +if ns:
> > +args = '-netns ' + ns + " " + args
>
> Minor: inconsistent use of single and double comma strings. Maybe
> there's a reasoning that I'm just missing.
I also
blem fixed in commit 730117730709 ("eth: bnxt: fix counting
packets discarded due to OOM and netpoll").
Signed-off-by: Jakub Kicinski
---
.../testing/selftests/drivers/net/hw/Makefile | 1 +
.../selftests/drivers/net/hw/pp_alloc_fail.py | 129 ++
tools/testing/selftests/net/lib
While we are not very interested in testing performance
it's useful to be able to generate a lot of traffic.
iperf is the simplest way of getting relatively high PPS.
Signed-off-by: Jakub Kicinski
---
.../selftests/drivers/net/lib/py/__init__.py | 1 +
.../selftests/drivers/net/lib/py/load.py
When picking TCP ports to use, avoid all below 10k.
This should lower the chance of collision or running
afoul whatever random policies may be on the host.
Signed-off-by: Jakub Kicinski
---
tools/testing/selftests/net/lib/py/utils.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff
rt the --json switch.
To avoid having to wrap all of them individually create a tool()
helper.
Switch from -j to --json (for ethtool).
While at it consume the netns attribute at the ip() level.
Signed-off-by: Jakub Kicinski
---
tools/testing/selftests/net/lib/py/utils.py | 12 +---
1 file c
We created a separate directory for HW-only tests, recently.
Glue in the Python test library there, Python is a bit annoying
when it comes to using library code located "lower"
in the directory structure.
Reuse the Env class, but let tests require non-nsim setup.
Signed-off-by: Jaku
t to be
5x slower in terms of PPS. Hopefully this is good enough for now.
Jakub Kicinski (6):
net: page_pool: support error injection
selftests: drv-net-hw: support using Python from net hw tests
selftests: net: py: extract tool logic
selftests: net: py: avoid all ports < 10k
selft
Because of caching / recycling using the general page allocation
failures to induce errors in page pool allocation is very hard.
Add direct error injection support to page_pool_alloc_pages().
Signed-off-by: Jakub Kicinski
---
CC: h...@kernel.org
CC: ilias.apalodi...@linaro.org
---
net/core
Throw a slightly more helpful exception when env variables
are partially populated. Prior to this change we'd get
a dictionary key exception somewhere later on.
Reviewed-by: Willem de Bruijn
Signed-off-by: Jakub Kicinski
---
v2:
- check "both or none" for addresses
---
.../selftes
Add more info to the README. It's also now copied to GitHub for
increased visibility:
https://github.com/linux-netdev/nipa/wiki/Running-driver-tests
Reviewed-by: Willem de Bruijn
Signed-off-by: Jakub Kicinski
---
.../testing/selftests/drivers/net/README.rst | 97 ---
1 file
The shell lexer is not helping much, do very basic parsing
manually.
Reviewed-by: Willem de Bruijn
Signed-off-by: Jakub Kicinski
---
v2:
- use split() to split the line on =
---
.../selftests/drivers/net/lib/py/env.py | 26 ++-
1 file changed, 14 insertions(+), 12
I had to explain how to run the driver tests twice already.
Improve the README so we can just point to it.
Improve the config validation.
v2:
- use split() in patch 2
- more validation in last patch
v1: https://lore.kernel.org/r/20240424221444.4194069-1-k...@kernel.org/
Jakub Kicinski (3
On Wed, 24 Apr 2024 21:45:49 -0400 Willem de Bruijn wrote:
> Left two minor points comments inline, but nothing important.
I'll respin, apply your suggestions and drop the unfortunate patch.
On Thu, 25 Apr 2024 19:57:19 +0100 Simon Horman wrote:
> openvswitch.sh does not appear to have any dependencies on Open vSwitch
> user-space. My understanding is that, rather, it makes use of
> tools/testing/selftests/net/openvswitch/ovs-dpctl.py to talk to the Kernel
> using Netlink (which is
On Wed, 24 Apr 2024 17:44:05 +0100 Simon Horman wrote:
> I have recently been exercising the Open vSwitch kernel selftests,
> using vng,
Speaking of ovs tests, we currently don't run them in CI (and suffer
related skips in pmtu.sh) because Amazon Linux doesn't have ovs
packaged and building it
On Wed, 24 Apr 2024 16:19:49 -0700 Joe Damato wrote:
> I'm not sure whether:
>
> 1. tools/net/ynl/lib/ynl.py should be raising NlError when there is an
>extack in this case (I think this is probably the way to go?), or
>
> 2. the tests should be changed so that they don't expect an exception
On Wed, 24 Apr 2024 15:14:41 -0700 Jakub Kicinski wrote:
> This is not yet needed, because we don't terminate remote background
> commands. But once we do, if we run ssh without -t the ssh session
> may close and the program may carry on happily running.
>
> I have hit this proble
The shell lexer is not helping much, do very basic parsing
manually.
Signed-off-by: Jakub Kicinski
---
.../selftests/drivers/net/lib/py/env.py | 26 ++-
1 file changed, 14 insertions(+), 12 deletions(-)
diff --git a/tools/testing/selftests/drivers/net/lib/py/env.py
b
Throw a slightly more helpful exception when env variables
are partially populated. Prior to this change we'd get
a dictionary key exception somewhere later on.
Signed-off-by: Jakub Kicinski
---
.../selftests/drivers/net/lib/py/env.py | 20 +++
1 file changed, 20
Add more info to the README. It's also now copied to GitHub for
increased visibility:
https://github.com/linux-netdev/nipa/wiki/Running-driver-tests
Signed-off-by: Jakub Kicinski
---
.../testing/selftests/drivers/net/README.rst | 97 ---
1 file changed, 85 insertions(+), 12
time debugging it.
Signed-off-by: Jakub Kicinski
---
tools/testing/selftests/drivers/net/lib/py/remote_ssh.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/drivers/net/lib/py/remote_ssh.py
b/tools/testing/selftests/drivers/net/lib/py/remote_ssh.py
I had to explain how to run the driver tests twice already.
Improve the README so we can just point to it.
Also fix a potential problem with the SSH remote sessions.
Jakub Kicinski (4):
selftests: drv-net: force pseudo-terminal allocation in ssh
selftests: drv-net: extend the README with more
On Wed, 24 Apr 2024 10:13:41 -0400 Willem de Bruijn wrote:
> > I haven't thought about this part much, TBH. I'm not aware of any
> > scheme used in other tests.
> > IIUC the problem is that we need root locally, and then try to SSH
> > over to remote. But normally the SSH keys belong to the
On Tue, 23 Apr 2024 13:57:45 -0400 Willem de Bruijn wrote:
> Only possible non-obvious observation is that some kselftests expect
> as root, and the ssh remote logic extends that to expecting ssh
> root access to the remote host.
>
> Would it make sense to explicitly add sudo for all privileged
>
On Sun, 21 Apr 2024 13:32:24 -0600 David Ahern wrote:
> On 4/21/24 1:17 PM, Eric Dumazet wrote:
> > I wonder if NLM_F_DUMP_FILTERED should not be reported to user space ?
>
> good point. We do set that flag for other dumps when a filter has been
> used to limit data returned.
That flag appears
Wrap typical checks like whether given command used by the test
is available in helpers.
Signed-off-by: Jakub Kicinski
---
.../selftests/drivers/net/lib/py/env.py | 29 ++-
tools/testing/selftests/drivers/net/ping.py | 6
2 files changed, 34 insertions(+), 1
resses
being wrapped in [], it's not the only command which requires
this format, so add the wrapped address to env. The hope
is to save test code from checking if address is v6.
Signed-off-by: Jakub Kicinski
---
.../selftests/drivers/net/lib/py/env.py | 5 +++
tools/testing/selftests/driver
(). Let the author list the desired
prefixes. globals() need to be passed explicitly, IDK how to work
around that.
Signed-off-by: Jakub Kicinski
---
v4:
- spell the code out a little to make it clearer
---
tools/testing/selftests/drivers/net/ping.py | 3 +--
tools/testing/selftests/net/lib/py
ping.test_v4
# ok 2 ping.test_v6 # SKIP Test requires IPv6 connectivity
# # Totals: pass:1 fail:0 xfail:1 xpass:0 skip:0 error:0
Signed-off-by: Jakub Kicinski
---
v4:
- move adding the "require_XYZ()" checks to last patch
---
tools/testing/selftests/drivers/net/Makefile | 5 +++-
tools
Nothing surprising here, hopefully. Wrap the variables from
the environment into a class or spawn a netdevsim based env
and pass it to the tests.
Signed-off-by: Jakub Kicinski
---
.../testing/selftests/drivers/net/README.rst | 33 +++
.../selftests/drivers/net/lib/py/env.py | 98
The tests with a remote end will use a different class,
for clarity, but will also need to parse the env.
So factor parsing the env out to a function.
Signed-off-by: Jakub Kicinski
---
.../selftests/drivers/net/lib/py/env.py | 43 +++
1 file changed, 26 insertions(+), 17
tion
methods without bothering upstream code base.
Stick to the "simple" / "no unnecessary abstractions" model for
referring to the remote endpoints. The host / remote object are
passed as an argument to the usual cmd() or ip() invocation.
For example:
ip("link show&qu
6004556.1618804-1-k...@kernel.org
- rename endpoint -> remote
- use 2001:db8:: v6 prefix
- add a note about persistent SSH connections
- add the kernel config
v1: https://lore.kernel.org/all/20240412233705.1066444-1-k...@kernel.org
Jakub Kicinski (7):
selftests: drv-net: define endpoi
Add a test for dumping qstats device by device.
ksft framework grows a ksft_raises() helper, to be used
under with, which should be familiar to unittest users.
Signed-off-by: Jakub Kicinski
---
tools/testing/selftests/drivers/net/stats.py | 62 +++-
tools/testing/selftests/net
with NL_SET_BAD_ATTR() than type
an English message saying "attribute XYZ is $reason-why-bad".
Support all of extack. The fact that extack only gets added if
it fits remains unaddressed.
Signed-off-by: Jakub Kicinski
---
net/netlink/af_netlink.c | 15 ++-
1 file changed,
Next change will need them in netlink_dump_done(), pure move.
Signed-off-by: Jakub Kicinski
---
net/netlink/af_netlink.c | 126 +++
1 file changed, 63 insertions(+), 63 deletions(-)
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index
Having to filter the right ifindex in the tests is a bit tedious.
Add support for dumping qstats for a single ifindex.
Signed-off-by: Jakub Kicinski
---
Documentation/netlink/specs/netdev.yaml | 1 +
net/core/netdev-genl-gen.c | 1 +
net/core/netdev-genl.c | 52
to the net tree).
Jakub Kicinski (4):
netdev: support dumping a single netdev in qstats
netlink: move extack writing helpers
netlink: support all extack types in dumps
selftests: drv-net: test dumping qstats per device
Documentation/netlink/specs/netdev.yaml | 1 +
net/core/netdev-genl
Wrap typical checks like whether given command used by the test
is available in helpers.
Signed-off-by: Jakub Kicinski
---
.../selftests/drivers/net/lib/py/env.py | 29 ++-
tools/testing/selftests/drivers/net/ping.py | 6
2 files changed, 34 insertions(+), 1
resses
being wrapped in [], it's not the only command which requires
this format, so add the wrapped address to env. The hope
is to save test code from checking if address is v6.
Signed-off-by: Jakub Kicinski
---
.../selftests/drivers/net/lib/py/env.py | 4 +++
tools/testing/selftests/driver
(). Let the author list the desired
prefixes. globals() need to be passed explicitly, IDK how to work
around that.
Signed-off-by: Jakub Kicinski
---
v4:
- spell the code out a little to make it clearer
---
tools/testing/selftests/drivers/net/ping.py | 3 +--
tools/testing/selftests/net/lib/py
ping.test_v4
# ok 2 ping.test_v6 # SKIP Test requires IPv6 connectivity
# # Totals: pass:1 fail:0 xfail:1 xpass:0 skip:0 error:0
Signed-off-by: Jakub Kicinski
---
v4:
- move adding the "require_XYZ()" checks to last patch
---
tools/testing/selftests/drivers/net/Makefile | 5 +++-
tools
Nothing surprising here, hopefully. Wrap the variables from
the environment into a class or spawn a netdevsim based env
and pass it to the tests.
Signed-off-by: Jakub Kicinski
---
.../testing/selftests/drivers/net/README.rst | 33 +++
.../selftests/drivers/net/lib/py/env.py | 98
The tests with a remote end will use a different class,
for clarity, but will also need to parse the env.
So factor parsing the env out to a function.
Signed-off-by: Jakub Kicinski
---
.../selftests/drivers/net/lib/py/env.py | 43 +++
1 file changed, 26 insertions(+), 17
tion
methods without bothering upstream code base.
Stick to the "simple" / "no unnecessary abstractions" model for
referring to the remote endpoints. The host / remote object are
passed as an argument to the usual cmd() or ip() invocation.
For example:
ip("link show&qu
hs (patch 3)
- last two patches are new
v2: https://lore.kernel.org/all/20240416004556.1618804-1-k...@kernel.org
- rename endpoint -> remote
- use 2001:db8:: v6 prefix
- add a note about persistent SSH connections
- add the kernel config
v1: https://lore.kernel.org/all/20240412233705.1066444-1-k.
On Thu, 18 Apr 2024 10:44:39 -0400 Willem de Bruijn wrote:
> > +def test_tcp(cfg) -> None:
> > +port = random.randrange(1024 + (1 << 15))
> > +with bkg(f"nc -l {cfg.addr} {port}") as nc:
> > +wait_port_listen(port)
> > +
> > +cmd(f"echo ping | nc {cfg.addr} {port}",
> > +
On Thu, 18 Apr 2024 10:26:19 -0400 Willem de Bruijn wrote:
> > -def ksft_run(cases, args=()):
> > +def ksft_run(cases=None, globs=None, case_pfx=None, args=()):
> > +cases = cases or []
> > +
> > +if globs and case_pfx:
> > +for key, value in globs.items():
> > +
is support to cmd() directly
but it runs the command in the constructor, so by the time
we __enter__ it's too late to make sure we used "background=True".
Second useful helper transplanted from net_helper.sh is
wait_port_listen().
Signed-off-by: Jakub Kicinski
---
tools/testing/selftests
(). Let the author list the desired
prefixes. globals() need to be passed explicitly, IDK how to work
around that.
Signed-off-by: Jakub Kicinski
---
tools/testing/selftests/drivers/net/ping.py | 3 +--
tools/testing/selftests/net/lib/py/ksft.py | 10 +-
2 files changed, 10 insertions(+), 3
1 - 100 of 342 matches
Mail list logo