aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/prog_tests/cgroup_v1v2.c
diff options
context:
space:
mode:
authorAlexei Starovoitov <[email protected]>2024-06-20 20:42:45 -0700
committerAlexei Starovoitov <[email protected]>2024-06-20 20:42:45 -0700
commit1ae7a19e37630d3235bc68cac9da4e032cad8136 (patch)
treecc0e37cedfc96abfb9183b0878d6e782c132349a /tools/testing/selftests/bpf/prog_tests/cgroup_v1v2.c
parentbf977ee4a9e2ad8a41b3a2497aada5e7eb09eaea (diff)
parent8cab7cdcf5aebec354ede98bca28c08dd9df924c (diff)
Merge branch 'use-network-helpers-part-7'
Geliang Tang says: ==================== use network helpers, part 7 From: Geliang Tang <[email protected]> v6: - update ASSERT strings in patch 4 as Eduard suggested. (thanks) v5: - update patch 1, add getsockopt(SO_PROTOCOL) in connect_to_fd() to fix errors reported by CI. v4: - fix errors reported by CI. v3: - rename start_client to client_socket - Use connect_to_addr in connect_to_fd_opt v2: - update patch 2, extract a new helper start_client. - drop patch 3, keep must_fail in network_helper_opts. Drop type and noconnect from network_helper_opts. And use start_server_str in mptcp and test_tcp_check_syncookie_user. Patches 1-4 address Martin's comments in the previous series. ==================== Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/cgroup_v1v2.c')
-rw-r--r--tools/testing/selftests/bpf/prog_tests/cgroup_v1v2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/cgroup_v1v2.c b/tools/testing/selftests/bpf/prog_tests/cgroup_v1v2.c
index addf720428f7..9709c8db7275 100644
--- a/tools/testing/selftests/bpf/prog_tests/cgroup_v1v2.c
+++ b/tools/testing/selftests/bpf/prog_tests/cgroup_v1v2.c
@@ -32,7 +32,7 @@ static int run_test(int cgroup_fd, int server_fd, bool classid)
goto out;
}
- fd = connect_to_fd_opts(server_fd, &opts);
+ fd = connect_to_fd_opts(server_fd, SOCK_STREAM, &opts);
if (fd < 0)
err = -1;
else
@@ -52,7 +52,7 @@ void test_cgroup_v1v2(void)
server_fd = start_server(AF_INET, SOCK_STREAM, NULL, port, 0);
if (!ASSERT_GE(server_fd, 0, "server_fd"))
return;
- client_fd = connect_to_fd_opts(server_fd, &opts);
+ client_fd = connect_to_fd_opts(server_fd, SOCK_STREAM, &opts);
if (!ASSERT_GE(client_fd, 0, "client_fd")) {
close(server_fd);
return;