mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-30 00:20:11 +01:00
src/tests: relax assertion for test_nm_utils_monotonic_timestamp_as_boottime()
When running under load (e.g. with parallel make and valgrind
enabled), the checked time interval might be too short. Relax
the assertion
NetworkManager:ERROR:src/tests/test-general-with-expect.c:65:test_nm_utils_monotonic_timestamp_as_boottime: assertion failed (now_boottime_2 - now_boottime <= NM_UTILS_NS_PER_SECOND / 1000): (15156494 <= 1000000)
This commit is contained in:
parent
6df24ee8cc
commit
0846cb98aa
1 changed files with 1 additions and 1 deletions
|
|
@ -62,7 +62,7 @@ test_nm_utils_monotonic_timestamp_as_boottime (void)
|
|||
now_boottime_2 = nm_utils_monotonic_timestamp_as_boottime (now, 1);
|
||||
g_assert_cmpint (now_boottime_2, >=, 0);
|
||||
g_assert_cmpint (now_boottime_2, >=, now_boottime);
|
||||
g_assert_cmpint (now_boottime_2 - now_boottime, <=, NM_UTILS_NS_PER_SECOND / 1000);
|
||||
g_assert_cmpint (now_boottime_2 - now_boottime, <=, NM_UTILS_NS_PER_SECOND / 10);
|
||||
|
||||
for (timestamp_ns_per_tick = 1; timestamp_ns_per_tick <= NM_UTILS_NS_PER_SECOND; timestamp_ns_per_tick *= 10) {
|
||||
now_boottime_3 = nm_utils_monotonic_timestamp_as_boottime (now / timestamp_ns_per_tick, timestamp_ns_per_tick);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue