Message ID | 58fcd84cd7eae33eb7ff2d87415109c5324a0c4d.1742355162.git.tanggeliang@kylinos.cn (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show |
Series | cleanups for main_loop | expand |
Context | Check | Description |
---|---|---|
matttbe/build | success | Build and static analysis OK |
matttbe/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 36 lines checked |
matttbe/shellcheck | success | MPTCP selftests files have not been modified |
matttbe/KVM_Validation__normal | warning | Unstable: 1 failed test(s): selftest_mptcp_connect |
matttbe/KVM_Validation__debug | warning | Unstable: 1 failed test(s): selftest_mptcp_connect |
matttbe/KVM_Validation__btf-normal__only_bpftest_all_ | success | Success! ✅ |
matttbe/KVM_Validation__btf-debug__only_bpftest_all_ | success | Success! ✅ |
diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.c b/tools/testing/selftests/net/mptcp/mptcp_connect.c index 893dc36b12f6..5301062a5f3b 100644 --- a/tools/testing/selftests/net/mptcp/mptcp_connect.c +++ b/tools/testing/selftests/net/mptcp/mptcp_connect.c @@ -1268,7 +1268,7 @@ int main_loop(void) struct addrinfo *peer; struct wstate winfo; - if (cfg_input && cfg_sockopt_types.mptfo) { + if (cfg_input) { fd_in = open(cfg_input, O_RDONLY); if (fd_in < 0) xerror("can't open %s:%d", cfg_input, errno); @@ -1291,12 +1291,6 @@ int main_loop(void) if (cfg_cmsg_types.cmsg_enabled) apply_cmsg_types(fd, &cfg_cmsg_types); - if (cfg_input && !cfg_sockopt_types.mptfo) { - fd_in = open(cfg_input, O_RDONLY); - if (fd_in < 0) - xerror("can't open %s:%d", cfg_input, errno); - } - ret = copyfd_io(fd_in, fd, 1, 0, &winfo); if (ret) return ret; @@ -1312,14 +1306,14 @@ int main_loop(void) set_nonblock(fd, false); if (connect(fd, peer->ai_addr, peer->ai_addrlen)) xerror("can't reconnect: %d", errno); - if (cfg_input) - close(fd_in); memset(&winfo, 0, sizeof(winfo)); goto again; } else { close(fd); } + if (cfg_input) + close(fd_in); return 0; }