GNOME Bugzilla – Bug 678959
/mainloop/timeouts race condition: assertion failed (a == 10): (9 == 10)
Last modified: 2012-06-27 13:34:17 UTC
On the Debian builders, glib sometimes fails with ERROR:/build/buildd-glib2.0_2.33.3-1-ia64-P3EWx7/glib2.0-2.33.3/./glib/tests/mainloop.c:182:test_timeouts: assertion failed (a == 10): (9 == 10) /mainloop/timeouts: FAIL It seems that due to the load, particular traits of the architectures (I've seen it on ia64), or other circumstances, it only manages to call the "every 100 ms" timout 9 times in 1050 ms.
Created attachment 217375 [details] [review] /mainloop/timeouts test: Reduce race condition This is an inherent race-condition in the test; allow it some slack and accept 9 times as well.
Comment on attachment 217375 [details] [review] /mainloop/timeouts test: Reduce race condition >- g_assert_cmpint (a, ==, 10); >+ g_assert_cmpint (a, >=, 9); >+ g_assert_cmpint (a, <=, 10); can you add a comment explaining that? ok to commit with that
(In reply to comment #2) > can you add a comment explaining that? ok to commit with that Sure, committed with a comment: http://git.gnome.org/browse/glib/commit/?id=95f29687e14423ca541cac1c00137375b935168d