mbedtls/tests
Manuel Pégourié-Gonnard 34cbf106f3 Adjust timeout of tests with "no resend" assertions
There are currently 4 tests in ssl-opt.sh with either -C "resend" or -S
"resend", that is, asserting that no retransmission will occur. They sometimes
fail on loaded CI machines as one side doesn't send a message fast enough,
causing the other side to retransmit, causing the test to fail.

(For the "reconnect" test there was an other issue causing random failures,
fixed in a previous commit, but even after that fix the test would still
sometimes randomly fail, even if much more rarely.)

While it's a hard problem to fix in a general and perfect way, in practice the
probability of failures can be drastically reduced by making the timeout
values much larger.

For some tests, where retransmissions are actually expected, this would have
the negative effect of increasing the average running time of the test, as
each side would wait for longer before it starts retransmission, so we have a
trade-off between average running time and probability of spurious failures.

But for tests where retransmission is not expected, there is no such trade-off
as the expected running time of the test (assuming the code is correct most of
the time) is not impacted by the timeout value. So the only negative effect of
increasing the timeout value is on the worst-case running time on the test,
which is much less important, as test should only fail quite rarely.

This commit addresses the easy case of tests that don't expect retransmission
by increasing the value of their timeout range to 10s-20s. This value
corresponds to the value used for tests that assert `-S "autoreduction"` which
are in the same case and where the current value seems acceptable so far.

It also represents an increase, compared to the values before this commit, of
a factor 20 for the "reconnect" tests which were frequently observed to fail
in the CI, and of a factor 10 for the first two "DTLS proxy" tests, which were
observed to fail much less frequently, so hopefully the new values are enough
to reduce the probability of spurious failures to an acceptable level.

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2020-03-31 09:37:31 +02:00
..
.jenkins Add Jenkinsfile for PR job 2018-10-19 15:25:10 +01:00
configs Add a test component with malloc(0) returning NULL 2019-09-30 13:58:12 +02:00
data_files Merge remote-tracking branch 'upstream-restricted/pr/503' into mbedtls-2.16-restricted 2019-08-14 16:39:24 +02:00
git-scripts Add doxygen.sh script to git hooks 2018-06-27 17:41:00 +03:00
scripts Change the use of pylint to optionally use pylint3 2020-03-16 13:53:06 +00:00
suites Bump version to Mbed TLS 2.16.5 2020-02-19 12:03:00 +00:00
.gitignore Move some ignore patterns to subdirectories 2015-01-28 15:33:23 +00:00
CMakeLists.txt Merge remote-tracking branch 'origin/pr/2293' into mbedtls-2.16 2019-03-05 16:31:02 +00:00
compat.sh Exclude DTLS 1.2 only with older OpenSSL 2019-08-13 11:44:04 +02:00
Descriptions.txt Add selftest program to the list of tests 2014-04-04 16:33:01 +02:00
Makefile Merge remote-tracking branch 'origin/pr/2053' into mbedtls-2.16 2019-06-21 15:59:16 +01:00
ssl-opt.sh Adjust timeout of tests with "no resend" assertions 2020-03-31 09:37:31 +02:00