]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
selftests/bpf: Exercise SOCK_STREAM unix_inet_redir_to_connected()
authorMichal Luczaj <mhal@rbox.co>
Wed, 31 Jul 2024 10:01:30 +0000 (12:01 +0200)
committerMartin KaFai Lau <martin.lau@kernel.org>
Mon, 19 Aug 2024 23:43:40 +0000 (16:43 -0700)
Constants got switched reducing the test's coverage. Replace SOCK_DGRAM
with SOCK_STREAM in one of unix_inet_skb_redir_to_connected() tests.

Fixes: 51354f700d40 ("bpf, sockmap: Add af_unix test with both sockets in map")
Reviewed-by: Jakub Sitnicki <jakub@cloudflare.com>
Tested-by: Jakub Sitnicki <jakub@cloudflare.com>
Suggested-by: Jakub Sitnicki <jakub@cloudflare.com>
Signed-off-by: Michal Luczaj <mhal@rbox.co>
Link: https://lore.kernel.org/r/20240731-selftest-sockmap-fixes-v2-5-08a0c73abed2@rbox.co
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
tools/testing/selftests/bpf/prog_tests/sockmap_listen.c

index 7ed223df5f12e744f49f48caafcdbd7f0d1611e2..da5a6fb03b69017b897aba1f80b9ae0161fc6cde 100644 (file)
@@ -1793,7 +1793,7 @@ static void unix_inet_skb_redir_to_connected(struct test_sockmap_listen *skel,
        unix_inet_redir_to_connected(family, SOCK_DGRAM,
                                     sock_map, -1, verdict_map,
                                     REDIR_EGRESS, NO_FLAGS);
-       unix_inet_redir_to_connected(family, SOCK_DGRAM,
+       unix_inet_redir_to_connected(family, SOCK_STREAM,
                                     sock_map, -1, verdict_map,
                                     REDIR_EGRESS, NO_FLAGS);