diff options
author | Paolo Abeni <pabeni@redhat.com> | 2022-02-18 13:35:39 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-02-19 12:28:00 +0000 |
commit | 5b31dda736e31c58d1941c7349569c7452eafb6b (patch) | |
tree | e190b1185dc449bab2cd7e878a31f6ca8987877c /tools | |
parent | 0cd33c5ffec12bd77a1c02db2469fac08f840939 (diff) | |
download | linux-5b31dda736e31c58d1941c7349569c7452eafb6b.tar.gz linux-5b31dda736e31c58d1941c7349569c7452eafb6b.tar.bz2 linux-5b31dda736e31c58d1941c7349569c7452eafb6b.zip |
selftests: mptcp: improve 'fair usage on close' stability
The mentioned test 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: 46e967d187ed ("selftests: mptcp: add tests for subflow creation failure")
Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/257
Reported-and-tested-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/testing/selftests/net/mptcp/mptcp_join.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh index c0801df15f54..10b3bd805ac6 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh @@ -961,7 +961,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)) |