From 0846cb98aaf82bcdfe7894b7eeecc14a965c50d1 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Mon, 24 Oct 2016 15:26:16 +0200 Subject: [PATCH] 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) --- src/tests/test-general-with-expect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);