[debian-mysql] Bug#856237: galera-3 testcase failure due to monotonic clock

Helge Deller deller at gmx.de
Thu Apr 27 15:09:31 UTC 2017


Tags: patch

The galera-3 testcase fails on hppa/parisc and alpha with:
gcs/src/unit_tests/gcs_sm_test.cpp:283:F:gcs_sm:gcs_sm_test_pause:0: Failure 'tmp <= paused_ns' occurred

The reason for this failure is, that galera-3 uses 
   clock_gettime (CLOCK_MONOTONIC, &tmp);
in function gu_time_monotonic() in file galerautils/src/gu_time.h
to get the current time.

Many platforms like x86 do have a very fine granularity when getting the monotonic clock, so
the test in ./gcs/src/unit_tests/gcs_sm_test.cpp:
  fail_if (tmp <= paused_ns); 
will succeed.
Other platforms like hppa and alpha don't have such a fine granularity and ensure
that the value returned by CLOCK_MONOTONIC will not go backwards, while it still
may return the last value (without growth). That behaviour is fully standard conform and documented.

So, changing the check like this:
-    fail_if (tmp <= paused_ns); paused_ns = tmp;
+    fail_if (tmp < paused_ns); paused_ns = tmp;

fixes the testcase on parisc/hppa and alpha platforms (and probably others),
while still keeping the test correct for other platforms.

Can you please apply the attached patch for the next upload and report it upstream?

Thanks,
Helge
-------------- next part --------------
A non-text attachment was scrubbed...
Name: galera-3-bug856237.patch
Type: text/x-patch
Size: 674 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-mysql-maint/attachments/20170427/4c6e79b3/attachment.bin>


More information about the pkg-mysql-maint mailing list