Package: libprelude / 4.1.0-4.2

004-fix_prelude_tests_timer.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Description: Fix Prelude test timer on slow system
Author: Thomas Andrejak <thomas.andrejak@gmail.com>
Last-Update: 2017-02-28
Forwarded: https://www.prelude-siem.org/issues/887

--- libprelude-3.1.0/tests/prelude-timer.c	2016-09-15 08:49:10.810000884 +0200
+++ libprelude-3.1.0/tests/prelude-timer.c	2017-05-16 07:18:40.763829280 +0200
@@ -31,7 +31,8 @@
         test_timer_t *timer = data;
         unsigned int elapsed = time(NULL) - timer->start_time;
 
-        assert(elapsed == prelude_timer_get_expire(&timer->timer));
+        assert(elapsed >= prelude_timer_get_expire(&timer->timer));
+        assert(elapsed <= prelude_timer_get_expire(&timer->timer)+1);
 
         prelude_timer_destroy(&timer->timer);
         free(timer);