* [PATCH net-next 1/2] selftests: net: fix error message in bpf_offload
@ 2025-03-04 23:32 Jakub Kicinski
2025-03-04 23:32 ` [PATCH net-next 2/2] selftests: net: bpf_offload: add 'libbpf_global' to ignored maps Jakub Kicinski
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Jakub Kicinski @ 2025-03-04 23:32 UTC (permalink / raw)
To: davem
Cc: netdev, edumazet, pabeni, andrew+netdev, horms, Jakub Kicinski,
shuah, linux-kselftest, bpf
We hit a following exception on timeout, nmaps is never set:
Test bpftool bound info reporting (own ns)...
Traceback (most recent call last):
File "/home/virtme/testing-1/tools/testing/selftests/net/./bpf_offload.py", line 1128, in <module>
check_dev_info(False, "")
File "/home/virtme/testing-1/tools/testing/selftests/net/./bpf_offload.py", line 583, in check_dev_info
maps = bpftool_map_list_wait(expected=2, ns=ns)
File "/home/virtme/testing-1/tools/testing/selftests/net/./bpf_offload.py", line 215, in bpftool_map_list_wait
raise Exception("Time out waiting for map counts to stabilize want %d, have %d" % (expected, nmaps))
NameError: name 'nmaps' is not defined
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
CC: shuah@kernel.org
CC: linux-kselftest@vger.kernel.org
CC: bpf@vger.kernel.org
---
tools/testing/selftests/net/bpf_offload.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/net/bpf_offload.py b/tools/testing/selftests/net/bpf_offload.py
index fd0d959914e4..4a9be8c49561 100755
--- a/tools/testing/selftests/net/bpf_offload.py
+++ b/tools/testing/selftests/net/bpf_offload.py
@@ -207,9 +207,11 @@ netns = [] # net namespaces to be removed
raise Exception("Time out waiting for program counts to stabilize want %d, have %d" % (expected, nprogs))
def bpftool_map_list_wait(expected=0, n_retry=20, ns=""):
+ nmaps = None
for i in range(n_retry):
maps = bpftool_map_list(ns=ns)
- if len(maps) == expected:
+ nmaps = len(maps)
+ if nmaps == expected:
return maps
time.sleep(0.05)
raise Exception("Time out waiting for map counts to stabilize want %d, have %d" % (expected, nmaps))
--
2.48.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH net-next 2/2] selftests: net: bpf_offload: add 'libbpf_global' to ignored maps
2025-03-04 23:32 [PATCH net-next 1/2] selftests: net: fix error message in bpf_offload Jakub Kicinski
@ 2025-03-04 23:32 ` Jakub Kicinski
2025-03-05 0:10 ` Stanislav Fomichev
2025-03-05 0:10 ` [PATCH net-next 1/2] selftests: net: fix error message in bpf_offload Stanislav Fomichev
2025-03-07 0:50 ` patchwork-bot+netdevbpf
2 siblings, 1 reply; 5+ messages in thread
From: Jakub Kicinski @ 2025-03-04 23:32 UTC (permalink / raw)
To: davem
Cc: netdev, edumazet, pabeni, andrew+netdev, horms, Jakub Kicinski,
shuah, linux-kselftest, bpf
After installing pahole on the CI image we have a new map created
by libbpf. Ignore it otherwise we see:
Exception: Time out waiting for map counts to stabilize want 2, have 3
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
CC: shuah@kernel.org
CC: linux-kselftest@vger.kernel.org
CC: bpf@vger.kernel.org
---
tools/testing/selftests/net/bpf_offload.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/net/bpf_offload.py b/tools/testing/selftests/net/bpf_offload.py
index 4a9be8c49561..b2c271b79240 100755
--- a/tools/testing/selftests/net/bpf_offload.py
+++ b/tools/testing/selftests/net/bpf_offload.py
@@ -712,6 +712,7 @@ _, base_maps = bpftool("map")
base_map_names = [
'pid_iter.rodata', # created on each bpftool invocation
'libbpf_det_bind', # created on each bpftool invocation
+ 'libbpf_global',
]
# Check netdevsim
--
2.48.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH net-next 2/2] selftests: net: bpf_offload: add 'libbpf_global' to ignored maps
2025-03-04 23:32 ` [PATCH net-next 2/2] selftests: net: bpf_offload: add 'libbpf_global' to ignored maps Jakub Kicinski
@ 2025-03-05 0:10 ` Stanislav Fomichev
0 siblings, 0 replies; 5+ messages in thread
From: Stanislav Fomichev @ 2025-03-05 0:10 UTC (permalink / raw)
To: Jakub Kicinski
Cc: davem, netdev, edumazet, pabeni, andrew+netdev, horms, shuah,
linux-kselftest, bpf
On 03/04, Jakub Kicinski wrote:
> After installing pahole on the CI image we have a new map created
> by libbpf. Ignore it otherwise we see:
>
> Exception: Time out waiting for map counts to stabilize want 2, have 3
>
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Acked-by: Stanislav Fomichev <sdf@fomichev.me>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next 1/2] selftests: net: fix error message in bpf_offload
2025-03-04 23:32 [PATCH net-next 1/2] selftests: net: fix error message in bpf_offload Jakub Kicinski
2025-03-04 23:32 ` [PATCH net-next 2/2] selftests: net: bpf_offload: add 'libbpf_global' to ignored maps Jakub Kicinski
@ 2025-03-05 0:10 ` Stanislav Fomichev
2025-03-07 0:50 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 5+ messages in thread
From: Stanislav Fomichev @ 2025-03-05 0:10 UTC (permalink / raw)
To: Jakub Kicinski
Cc: davem, netdev, edumazet, pabeni, andrew+netdev, horms, shuah,
linux-kselftest, bpf
On 03/04, Jakub Kicinski wrote:
> We hit a following exception on timeout, nmaps is never set:
>
> Test bpftool bound info reporting (own ns)...
> Traceback (most recent call last):
> File "/home/virtme/testing-1/tools/testing/selftests/net/./bpf_offload.py", line 1128, in <module>
> check_dev_info(False, "")
> File "/home/virtme/testing-1/tools/testing/selftests/net/./bpf_offload.py", line 583, in check_dev_info
> maps = bpftool_map_list_wait(expected=2, ns=ns)
> File "/home/virtme/testing-1/tools/testing/selftests/net/./bpf_offload.py", line 215, in bpftool_map_list_wait
> raise Exception("Time out waiting for map counts to stabilize want %d, have %d" % (expected, nmaps))
> NameError: name 'nmaps' is not defined
>
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Acked-by: Stanislav Fomichev <sdf@fomichev.me>
I've seen this a couple of times myself but was too lazy to send out
a fix :-[
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH net-next 1/2] selftests: net: fix error message in bpf_offload
2025-03-04 23:32 [PATCH net-next 1/2] selftests: net: fix error message in bpf_offload Jakub Kicinski
2025-03-04 23:32 ` [PATCH net-next 2/2] selftests: net: bpf_offload: add 'libbpf_global' to ignored maps Jakub Kicinski
2025-03-05 0:10 ` [PATCH net-next 1/2] selftests: net: fix error message in bpf_offload Stanislav Fomichev
@ 2025-03-07 0:50 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-03-07 0:50 UTC (permalink / raw)
To: Jakub Kicinski
Cc: davem, netdev, edumazet, pabeni, andrew+netdev, horms, shuah,
linux-kselftest, bpf
Hello:
This series was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Tue, 4 Mar 2025 15:32:03 -0800 you wrote:
> We hit a following exception on timeout, nmaps is never set:
>
> Test bpftool bound info reporting (own ns)...
> Traceback (most recent call last):
> File "/home/virtme/testing-1/tools/testing/selftests/net/./bpf_offload.py", line 1128, in <module>
> check_dev_info(False, "")
> File "/home/virtme/testing-1/tools/testing/selftests/net/./bpf_offload.py", line 583, in check_dev_info
> maps = bpftool_map_list_wait(expected=2, ns=ns)
> File "/home/virtme/testing-1/tools/testing/selftests/net/./bpf_offload.py", line 215, in bpftool_map_list_wait
> raise Exception("Time out waiting for map counts to stabilize want %d, have %d" % (expected, nmaps))
> NameError: name 'nmaps' is not defined
>
> [...]
Here is the summary with links:
- [net-next,1/2] selftests: net: fix error message in bpf_offload
https://git.kernel.org/netdev/net-next/c/f9d2f5ddd47c
- [net-next,2/2] selftests: net: bpf_offload: add 'libbpf_global' to ignored maps
https://git.kernel.org/netdev/net-next/c/56a586961bf8
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-03-07 0:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-04 23:32 [PATCH net-next 1/2] selftests: net: fix error message in bpf_offload Jakub Kicinski
2025-03-04 23:32 ` [PATCH net-next 2/2] selftests: net: bpf_offload: add 'libbpf_global' to ignored maps Jakub Kicinski
2025-03-05 0:10 ` Stanislav Fomichev
2025-03-05 0:10 ` [PATCH net-next 1/2] selftests: net: fix error message in bpf_offload Stanislav Fomichev
2025-03-07 0:50 ` patchwork-bot+netdevbpf
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).