* [PATCH bpf-next] bpf, selftests: fix test_maps now that sockmap supports UDP
@ 2021-07-20 18:48 John Fastabend
2021-07-20 20:30 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: John Fastabend @ 2021-07-20 18:48 UTC (permalink / raw)
To: ast, daniel, andrii, xiyou.wangcong; +Cc: bpf, netdev, john.fastabend
UDP socket support was added recently so testing UDP insert failure is no
longer correct and causes test_maps failure. The fix is easy though, we
simply need to test that UDP is correctly added instead of blocked.
Reported-by: Andrii Nakryiko <andrii@kernel.org>
Fixes: 122e6c79efe1c ("sock_map: Update sock type checks for UDP")
Signed-off-by: John Fastabend <john.fastabend@gmail.com>
---
tools/testing/selftests/bpf/test_maps.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/bpf/test_maps.c b/tools/testing/selftests/bpf/test_maps.c
index d832d135211c..5a8e069e64fa 100644
--- a/tools/testing/selftests/bpf/test_maps.c
+++ b/tools/testing/selftests/bpf/test_maps.c
@@ -764,8 +764,8 @@ static void test_sockmap(unsigned int tasks, void *data)
udp = socket(AF_INET, SOCK_DGRAM, 0);
i = 0;
err = bpf_map_update_elem(fd, &i, &udp, BPF_ANY);
- if (!err) {
- printf("Failed socket SOCK_DGRAM allowed '%i:%i'\n",
+ if (err) {
+ printf("Failed socket update SOCK_DGRAM '%i:%i'\n",
i, udp);
goto out_sockmap;
}
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH bpf-next] bpf, selftests: fix test_maps now that sockmap supports UDP
2021-07-20 18:48 [PATCH bpf-next] bpf, selftests: fix test_maps now that sockmap supports UDP John Fastabend
@ 2021-07-20 20:30 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-07-20 20:30 UTC (permalink / raw)
To: John Fastabend; +Cc: ast, daniel, andrii, xiyou.wangcong, bpf, netdev
Hello:
This patch was applied to bpf/bpf-next.git (refs/heads/master):
On Tue, 20 Jul 2021 11:48:32 -0700 you wrote:
> UDP socket support was added recently so testing UDP insert failure is no
> longer correct and causes test_maps failure. The fix is easy though, we
> simply need to test that UDP is correctly added instead of blocked.
>
> Reported-by: Andrii Nakryiko <andrii@kernel.org>
> Fixes: 122e6c79efe1c ("sock_map: Update sock type checks for UDP")
> Signed-off-by: John Fastabend <john.fastabend@gmail.com>
>
> [...]
Here is the summary with links:
- [bpf-next] bpf, selftests: fix test_maps now that sockmap supports UDP
https://git.kernel.org/bpf/bpf-next/c/c39aa2159974
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] 2+ messages in thread
end of thread, other threads:[~2021-07-20 20:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-20 18:48 [PATCH bpf-next] bpf, selftests: fix test_maps now that sockmap supports UDP John Fastabend
2021-07-20 20:30 ` 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).