selftests: mptcp: more stable diag tests
authorPaolo Abeni <pabeni@redhat.com>
Tue, 28 Jun 2022 01:02:41 +0000 (18:02 -0700)
committerJakub Kicinski <kuba@kernel.org>
Wed, 29 Jun 2022 03:45:43 +0000 (20:45 -0700)
commit42fb6cddec3b306c9f6ef136b6438e0de1836431
treee3daf7a01933859ab0778078261f74ebcfb6511a
parent6aeed9045071f2252ff4e98fc13d1e304f33e5b0
selftests: mptcp: more stable diag tests

The mentioned test-case still use an hard-coded-len sleep to
wait for a relative large number of connection to be established.

On very slow VM and with debug build such timeout could be exceeded,
causing failures in our CI.

Address the issue polling for the expected condition several times,
up to an unreasonable high amount of time. On reasonably fast system
the self-tests will be faster then before, on very slow one we will
still catch the correct condition.

Fixes: df62f2ec3df6 ("selftests/mptcp: add diag interface tests")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/mptcp/diag.sh