Test case: out of time window

Discussions and support about ChibiOS/HAL, the MCU Hardware Abstraction Layer.
Post Reply
sdalu
Posts: 35
Joined: Wed Dec 30, 2015 5:31 pm
Has thanked: 1 time
Been thanked: 2 times

Test case: out of time window

Post by sdalu »

I'm working on nrf52 port, I've got one test case failing with "out of time window" (3.2)

Test is starting at time 3337ms, ending at 4337ms, which seems to "nearly" meet the 1000 ms timeout requirerment of the test.
Test is using

Code: Select all

    test_assert_time_window(time + MS2ST(1000),
                            time + MS2ST(1000) + CH_CFG_ST_TIMEDELTA,
                            "out of time window");


I haven't set CH_CFG_ST_TIMEDELTA as i'm not runnning in timeless mode.

test_assert_time_window, is implemented using chVTIsSystemTimeWithinX which translate into

Code: Select all

  (bool)((systime_t)(time - start) < (systime_t)(end - start));


Is the test_assert_time_window too restrictive using " < " or do I have really a problem with the port?

thanks
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: Test case: out of time window

Post by Giovanni »

I see, don't worry, it is a problem with the test, I will change it.

You port is likely OK if other tests pass.

Giovanni
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: Test case: out of time window

Post by Giovanni »

Hi,

I committed a fix for that test case, it should be fine now.

Giovanni
Post Reply