meson: increase "default_test_timeout" to 3 minutes

Obviously, it would be nice if our unit tests are fast. However, with
valgrind and a busy machine, some of the tests can take a relatively
long time. In particular those, that are marked as "slow" (if you want
to skip them during development, do so via "NMTST_DEBUG=quick"
environment, or "CFLAGS=-DNMTST_TEST_QUICK=TRUE", see
"nm-test-utils.h").

Anyway. Our tests almost never hit the timeout, and if they do, the most
likely reason is that something was just slower then expected, and the
timeout is a bogus error.

Timeouts only act as last fail safe. It more important to avoid a false
(premature) timeout failure, than to minimize the wait time when the
test really hangs. Because a real hang is a bug anyway, that we will
discover and need to fix.

Increase the default test timeout for meson tests to 3 minutes.

Also, "test-route-linux" is known to take a long time. Increase that
timeout even further.

(cherry picked from commit 9ee42c0979)
This commit is contained in:
Thomas Haller 2023-01-20 08:12:51 +01:00
parent ae906e42da
commit 108885721e
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728
2 changed files with 2 additions and 2 deletions

View file

@ -96,7 +96,7 @@ set_defines = [
['VERSION', nm_version],
]
default_test_timeout = 90
default_test_timeout = 180
foreach define: set_defines
config_h.set_quoted(define[0], define[1])

View file

@ -13,7 +13,7 @@ test_units = [
['test-nmp-object', 'test-nmp-object.c', test_c_flags, default_test_timeout],
['test-platform-general', 'test-platform-general.c', test_c_flags, default_test_timeout],
['test-route-fake', 'test-route.c', test_fake_c_flags, default_test_timeout],
['test-route-linux', 'test-route.c', test_linux_c_flags, default_test_timeout],
['test-route-linux', 'test-route.c', test_linux_c_flags, 900],
['test-tc-linux', 'test-tc.c', test_linux_c_flags, default_test_timeout],
]