Skip to content

Commit

Permalink
Update hbtest3 to use the 32bit iphb wakeup ranges
Browse files Browse the repository at this point in the history
Use iphb_wait2() instead of iphb_wait().

Add a wakeup that is far enough to need 32bit time spans and make the
test case fail if it gets triggered during the test execution.
  • Loading branch information
spiiroin committed Mar 21, 2014
1 parent 2b43bf7 commit a7a7472
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions tests/hbtest3.c
Expand Up @@ -747,7 +747,7 @@ static bool hbtimer_start(hbtimer_t *self)
{
goto cleanup;
}
if( iphb_wait(self->iphb_hnd, self->mintime, self->maxtime, 0) < 0 )
if( iphb_wait2(self->iphb_hnd, self->mintime, self->maxtime, 0, 1) < 0 )
{
goto cleanup;
}
Expand Down Expand Up @@ -1103,8 +1103,16 @@ static void ranges_test(int *xc)
// | |
// group1 group2

/* start extra long timer, we do not expect this to trigger */
{
int d = 24 * 60 * 60;
hbtimer_t *t = hbtimer_create(d*3, d*4, 1);
t->repeats = 0;
timer[timers++] = t;
}

/* fail if tests do not finish in time */
timeout = g_timeout_add_seconds(scale(11) + 10, failure_cb, &timeout);
timeout = g_timeout_add_seconds(scale(11) + 13, failure_cb, &timeout);

if( mainloop_run() )
{
Expand Down

0 comments on commit a7a7472

Please sign in to comment.