selftests: mptcp: fix diag instability
authorPaolo Abeni <pabeni@redhat.com>
Fri, 18 Feb 2022 21:35:38 +0000 (13:35 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 2 Mar 2022 10:47:53 +0000 (11:47 +0100)
commitf76977643339a1fa3bf04ad1ef9f2361ee1e7126
tree70ece24584cb18266c5ed2c29be8b8786543c1d7
parentf25ae162f4b34b0bd17b1d3e7d096c7cc659ae59
selftests: mptcp: fix diag instability

commit 0cd33c5ffec12bd77a1c02db2469fac08f840939 upstream.

Instead of waiting for an arbitrary amount of time for the MPTCP
MP_CAPABLE handshake to complete, explicitly wait for the relevant
socket to enter into the established status.

Additionally let the data transfer application use the slowest
transfer mode available (-r), to cope with very slow host, or
high jitter caused by hosting VMs.

Fixes: df62f2ec3df6 ("selftests/mptcp: add diag interface tests")
Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/258
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/testing/selftests/net/mptcp/diag.sh