summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2016-10-24 15:26:16 +0200
committerThomas Haller <thaller@redhat.com>2016-10-24 15:27:31 +0200
commit0846cb98aaf82bcdfe7894b7eeecc14a965c50d1 (patch)
tree432b01084251de0aac804c3798b5228375cf3e14
parent6df24ee8cc46d8519436a924453f448e3fc0f4f1 (diff)
downloadNetworkManager-0846cb98aaf82bcdfe7894b7eeecc14a965c50d1.tar.gz
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)
-rw-r--r--src/tests/test-general-with-expect.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tests/test-general-with-expect.c b/src/tests/test-general-with-expect.c
index 3ec21328a3..9338557b41 100644
--- a/src/tests/test-general-with-expect.c
+++ b/src/tests/test-general-with-expect.c
@@ -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);