Skip to content

Commit

Permalink
selftests: mptcp: connect: -f: no reconnect
Browse files Browse the repository at this point in the history
The '-f' parameter is there to force the kernel to emit MPTCP FASTCLOSE
by closing the connection with unread bytes in the receive queue.

The xdisconnect() helper was used to stop the connection, but it does
more than that: it will shut it down, then wait before reconnecting to
the same address. This causes the mptcp_join's "fastclose test" to fail
all the time.

This failure is due to a recent change, with commit 218cc16
("selftests: mptcp: avoid spurious errors on disconnect"), but that went
unnoticed because the test is currently ignored. The recent modification
only shown an existing issue: xdisconnect() doesn't need to be used
here, only the shutdown() part is needed.

Fixes: 6bf4102 ("selftests: mptcp: update and extend fastclose test-cases")
Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
  • Loading branch information
matttbe authored and intel-lab-lkp committed Jan 27, 2025
1 parent ef01570 commit 46d9c12
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/testing/selftests/net/mptcp/mptcp_connect.c
Original file line number Diff line number Diff line change
Expand Up @@ -1302,7 +1302,7 @@ int main_loop(void)
return ret;

if (cfg_truncate > 0) {
xdisconnect(fd);
shutdown(fd, SHUT_WR);
} else if (--cfg_repeat > 0) {
xdisconnect(fd);

Expand Down

0 comments on commit 46d9c12

Please sign in to comment.