mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
tests/net/gnrc_sixlowpan_frag_sfr_congure: work around bug in test
The test following test is flaky: TEST_ASSERT(msg->send_time > 0U); It assumes that 0 as time is indicating the time is invalid. But on `native`, the time will be zero for the first millisecond the test is launched. Before the interactive sync caused seemingly a reliable delay of at least one milli second, but this no longer is the case. This works around the bug by just waiting at the start of the test until the time is no longer zero, possibly spinning for one millisecond.
This commit is contained in:
parent
cedfb63a88
commit
77b6264da1
@ -802,6 +802,10 @@ int main(void)
|
||||
{
|
||||
_tests_init();
|
||||
|
||||
/* work around issue in _check_congure_snd_msg(): the assert for
|
||||
* time > o will not work when the time is 0 */
|
||||
while (xtimer_now_usec() / US_PER_MS == 0) { }
|
||||
|
||||
TESTS_START();
|
||||
TESTS_RUN(tests_gnrc_sixlowpan_frag_sfr_congure_integration());
|
||||
TESTS_END();
|
||||
|
Loading…
Reference in New Issue
Block a user