mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-08 11:55:24 +00:00
Relax timing requirements in lazy timer test
The lazy-timer test depends on the faster-timer handler to be executed before the fast timeout occurs, which was pretty hard to achieve on Qemu and a busy host machine. Therefore, I increased the fast-to-faster timeout ratio from 50/25 ms to 200/25 ms and set the test runtime to 4000 ms.
This commit is contained in:
parent
43315444a8
commit
ed0d76552b
@ -37,7 +37,7 @@ struct Lazy_test
|
||||
Signal_handler<Lazy_test> faster_handler { env.ep(), *this,
|
||||
&Lazy_test::handle_faster_timer };
|
||||
|
||||
enum { RUN_TIME_US = 2 * 1000 * 1000, TIMEOUT_US = 50*1000, FACTOR = 2 };
|
||||
enum { RUN_TIME_US = 4*1000*1000, TIMEOUT_US = 200*1000, FACTOR = 8 };
|
||||
unsigned fast = 0;
|
||||
unsigned faster = 0;
|
||||
|
||||
@ -52,7 +52,8 @@ struct Lazy_test
|
||||
done.submit();
|
||||
}
|
||||
|
||||
void handle_fast_timer() {
|
||||
void handle_fast_timer()
|
||||
{
|
||||
fast ++;
|
||||
if (faster <= fast)
|
||||
throw Faster_timer_too_slow();
|
||||
@ -73,7 +74,7 @@ struct Lazy_test
|
||||
fast_timer.sigh(fast_handler);
|
||||
faster_timer.sigh(faster_handler);
|
||||
|
||||
log("register two-seconds timeout...");
|
||||
log("register ", RUN_TIME_US/1000/1000, "-seconds timeout...");
|
||||
slow_timer.trigger_once(RUN_TIME_US);
|
||||
set_fast_timers();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user