Thread View: linux.kernel.netdev
3 messages
3 total messages
Started by "Matthieu Baerts (NGI0)"
Thu, 19 Nov 2026 10:52
[PATCH net-next] selftests: drv-net: netpoll_basic: xfail if no hits
Author: "Matthieu Baerts (NGI0)"
Date: Thu, 19 Nov 2026 10:52
Date: Thu, 19 Nov 2026 10:52
42 lines
10103 bytes
10103 bytes
When netpoll_poll_dev() is not called during the test, bpftrace doesn't
print the '@hits' map, because it is empty. The test then fails instead
of reporting the expected XFAIL:
net.lib.py.ksft.KsftFailEx: bpftrace failed to run!?: {}
This has been observed regularly in the netdev CI with netdevsim, since
a recent switch to Fedora 45: hitting this function depends on timings.
Fixes: b3019343e4bd ("selftests: net: add netpoll basic functionality test")
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
I added the Fixes tag to help people validating this on stable kernel,
but feel free to remove it if you prefer not to.
Note that the test is currently ignored on NIPA.
---
tools/testing/selftests/drivers/net/netpoll_basic.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/drivers/net/netpoll_basic.py b/tools/testing/selftests/drivers/net/netpoll_basic.py
index 408bd54d6779..a4dc68c828cf 100755
--- a/tools/testing/selftests/drivers/net/netpoll_basic.py
+++ b/tools/testing/selftests/drivers/net/netpoll_basic.py
@@ -236,7 +236,8 @@ def bpftrace_call() -> None:
global MAPS # pylint: disable=W0603
# This will be passed to bpftrace as in bpftrace -e "expr"
- expr = "kprobe:netpoll_poll_dev { @hits = count(); }"
+ # Init @hits: bpftrace doesn't print empty maps
+ expr = "BEGIN { @hits = 0; } kprobe:netpoll_poll_dev { @hits++; }"
MAPS = bpftrace(expr, timeout=BPFTRACE_TIMEOUT, json=True)
logging.debug("BPFtrace output: %s", MAPS)
---
base-commit: ac9dfaeb9cd9ab731c14d202a2f00098f0417766
change-id: 20261119-net-next-netpoll-basic-xfail-7da4cdeca5b9
Best regards,
--
Matthieu Baerts (NGI0) <matttbe@kernel.org>
Re: [PATCH net-next] selftests: drv-net: netpoll_basic: xfail if no hits
Author: Breno Leitao
Date: Fri, 20 Nov 2026 18:41
Date: Fri, 20 Nov 2026 18:41
15 lines
9241 bytes
9241 bytes
On Thu, Nov 19, 2026 at 11:52:01AM +0100, Matthieu Baerts (NGI0) wrote:
> When netpoll_poll_dev() is not called during the test, bpftrace doesn't
> print the '@hits' map, because it is empty. The test then fails instead
> of reporting the expected XFAIL:
>
> net.lib.py.ksft.KsftFailEx: bpftrace failed to run!?: {}
>
> This has been observed regularly in the netdev CI with netdevsim, since
> a recent switch to Fedora 45: hitting this function depends on timings.
>
> Fixes: b3019343e4bd ("selftests: net: add netpoll basic functionality test")
> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Reviewed-by: Breno Leitao <leitao@debian.org>
Re: [PATCH net-next] selftests: drv-net: netpoll_basic: xfail if no hits
Author: patchwork-bot+netdevbpf
Date: Sat, 21 Nov 2026 22:50
Date: Sat, 21 Nov 2026 22:50
26 lines
8811 bytes
8811 bytes
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Thu, 19 Nov 2026 11:52:01 +0100 you wrote:
> When netpoll_poll_dev() is not called during the test, bpftrace doesn't
> print the '@hits' map, because it is empty. The test then fails instead
> of reporting the expected XFAIL:
>
> net.lib.py.ksft.KsftFailEx: bpftrace failed to run!?: {}
>
> This has been observed regularly in the netdev CI with netdevsim, since
> a recent switch to Fedora 45: hitting this function depends on timings.
>
> [...]
Here is the summary with links:
- [net-next] selftests: drv-net: netpoll_basic: xfail if no hits
https://git.kernel.org/netdev/net-next/c/fd5f80a8a427
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads