summary refs log tree commit diff
path: root/src/core/platform/tests
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2021-08-16 09:51:46 +0200
committerMichael Biebl <biebl@debian.org>2021-08-16 09:51:46 +0200
commitbfe522304da217296e2a61040f58e35ec5d6f3f2 (patch)
tree6c4296644fa59cbfe51d9e8aafebddace5ac6b6f /src/core/platform/tests
parent3a56bce6c0ea7ba0fe269520547740783b342e0d (diff)
New upstream version 1.30.6 upstream/1.30.6
Diffstat (limited to 'src/core/platform/tests')
-rw-r--r--src/core/platform/tests/test-common.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/platform/tests/test-common.c b/src/core/platform/tests/test-common.c
index 4a117d59..1b977145 100644
--- a/src/core/platform/tests/test-common.c
+++ b/src/core/platform/tests/test-common.c
@@ -1542,7 +1542,10 @@ nmtstp_link_bridge_add(NMPlatform *               platform,
 
     ll = NMP_OBJECT_CAST_LNK_BRIDGE(NMP_OBJECT_UP_CAST(pllink)->_link.netlink.lnk);
 
-    g_assert_cmpint(lnk->forward_delay, ==, ll->forward_delay);
+    /* account for roundtrip rounding error with clock_t_to_jiffies()/jiffies_to_clock_t(). */
+    g_assert_cmpint(lnk->forward_delay, >=, ll->forward_delay - 1);
+    g_assert_cmpint(lnk->forward_delay, <=, ll->forward_delay);
+
     g_assert_cmpint(lnk->hello_time, ==, ll->hello_time);
     g_assert_cmpint(lnk->max_age, ==, ll->max_age);
     g_assert_cmpint(lnk->ageing_time, ==, ll->ageing_time);