all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob 1ac364fcc10fa6612dee1cd9c5bf0ab2bdbd1d2a 1060 bytes (raw)
name: packages/patches/glib-tests-timer.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
 
* On i686 floating-point roundoff errors could sometimes cause this check to
  fail depending on the elapsed microseconds.  Improve rounding by adding a
  fractional bit.

* The /timer/stop test fails if compiler optimizations are enabled, which they
  are by default.  Disable that test.

--- glib-2.40.0/glib/tests/timer.c	2014-03-05 08:05:42.000000000 -0600
+++ glib-2.40.0/glib/tests/timer.c	2014-07-10 16:33:12.746862822 -0500
@@ -35,7 +35,7 @@
   elapsed = g_timer_elapsed (timer, &micros);
 
   g_assert_cmpfloat (elapsed, <, 1.0);
-  g_assert_cmpuint (micros, ==, ((guint64)(elapsed * 1e6)) % 1000000);
+  g_assert_cmpuint (micros, ==, ((guint64)(elapsed * 1e6 + 0.5)) % 1000000);
 
   g_timer_destroy (timer);
 }
@@ -204,7 +204,6 @@
   g_test_init (&argc, &argv, NULL);
 
   g_test_add_func ("/timer/basic", test_timer_basic);
-  g_test_add_func ("/timer/stop", test_timer_stop);
   g_test_add_func ("/timer/continue", test_timer_continue);
   g_test_add_func ("/timer/reset", test_timer_reset);
   g_test_add_func ("/timeval/add", test_timeval_add);

debug log:

solving 1ac364fcc10fa6612dee1cd9c5bf0ab2bdbd1d2a ...
found 1ac364fcc10fa6612dee1cd9c5bf0ab2bdbd1d2a in https://git.savannah.gnu.org/cgit/guix.git

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.