[PATCH mptcp-next v6 7/7] selftests: mptcp: sockopt: check app_limited
Geliang Tang <[email protected]>
| Newsgroups | dev.linux.lists.mptcp |
|---|---|
| Message-ID | <39b2a50221fdd8aea820d7b5ad9359cc40dff108.1787446274.git.tanggeliang@kylinos.cn> |
From: Geliang Tang <[email protected]> connect_one_server() in mptcp_sockopt exchanges only a few packets between the client and server, then closes the socket. After such a small transfer the application has nothing further to send, so the connection is, by definition, application-limited. Extend the TCP_INFO readback at the end of the function to assert s.tcp_info.tcpi_delivery_rate_app_limited == 1. Without the preceding commit, mptcp_sendmsg() never updates the per-subflow app-limited state, and this field stays at 0 - the assertion would fail. With it in place, the value is forced to 1, turning this into a regression guard for the subflow-side application-limited accounting. Signed-off-by: Geliang Tang <[email protected]> --- tools/testing/selftests/net/mptcp/mptcp_sockopt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/net/mptcp/mptcp_sockopt.c b/tools/testing/selftests/net/mptcp/mptcp_sockopt.c index d68515b7903b..8d712bdb4325 100644 --- a/tools/testing/selftests/net/mptcp/mptcp_sockopt.c +++ b/tools/testing/selftests/net/mptcp/mptcp_sockopt.c @@ -640,6 +640,7 @@ static void connect_one_server(int fd, int pipefd) total += 1; /* sequence advances due to FIN */ assert(s.mptcpi_rcv_delta == (uint64_t)total); + assert(s.tcp_info.tcpi_delivery_rate_app_limited == 1); close(fd); } -- 2.53.0