Skip to content

Commit

Permalink
selftests: mptcp: improve 'fair usage on close' stability
Browse files Browse the repository at this point in the history
The mentioned tests has to wait for a subflow creation failure.
The current code looks for TCP sockets in TW state and sometimes
misses the relevant event. Switch to a more stable check, looking
for the associated mib counter.

Fixes: 46e967d ("selftests: mptcp: add tests for subflow creation failure")
Closes: #257
Reported-and-tested-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
  • Loading branch information
Paolo Abeni authored and matttbe committed Feb 23, 2022
1 parent 8e4845e commit 59edf4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/testing/selftests/net/mptcp/mptcp_join.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1100,7 +1100,7 @@ wait_for_tw()
local ns=$1

while [ $time -lt $timeout_ms ]; do
local cnt=$(ip netns exec $ns ss -t state time-wait |wc -l)
local cnt=$(ip netns exec $ns nstat -as TcpAttemptFails | grep TcpAttemptFails | awk '{print $2}')

[ "$cnt" = 1 ] && return 1
time=$((time + 100))
Expand Down

0 comments on commit 59edf4f

Please sign in to comment.