After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 678881 - Test failures in /socket/timed_wait in some cases: (99240 >= 100000)
Test failures in /socket/timed_wait in some cases: (99240 >= 100000)
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gio
2.33.x
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2012-06-26 14:08 UTC by Martin Pitt
Modified: 2012-06-26 16:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Allow some negative timespan delta on the socket timeout test (812 bytes, patch)
2012-06-26 14:11 UTC, Martin Pitt
committed Details | Review

Description Martin Pitt 2012-06-26 14:08:38 UTC
Hello,

The /socket/timed_wait test does this assertion:

  g_socket_condition_timed_wait (client, G_IO_IN, 100000 /* 100 ms */,
                                 NULL, &error);
  [...]
  poll_duration = g_get_monotonic_time () - start_time;

  g_assert_cmpint (poll_duration, >=,100000);
  g_assert_cmpint (poll_duration, <, 110000);

However, in our builders this often fails with something like:

ERROR:/build/buildd/glib2.0-2.33.2/./gio/tests/socket.c:619:test_timed_wait: assertion failed (poll_duration >
= 100000): (99240 >= 100000)
FAIL

The test allows some jitter in the upwards direction. Would it be appropriate to also allow some jitter in the other direction, or is that an actual bug here? Our builders run with some slightly older kernels, I don't get this bug on my workstation.
Comment 1 Martin Pitt 2012-06-26 14:11:58 UTC
Created attachment 217294 [details] [review]
Allow some negative timespan delta on the socket timeout test

I applied this patch to the Debian package for now to work around this. This is one of the very few tests that fail during build, and we now want our package build to fail if any of the tests fails. This will allow us to spot regressions on particular architectures a lot easier.

Thanks!
Comment 2 Dan Winship 2012-06-26 16:21:50 UTC
Comment on attachment 217294 [details] [review]
Allow some negative timespan delta on the socket timeout test

it looks like poll() allows for some slack in the timeout, so I guess this is good
Comment 3 Martin Pitt 2012-06-26 16:35:18 UTC
Thanks, committed with a slightly more verbose changelog.