tests: fifo: extend cancel timeout limit

A non-tickless system with 10ms granularity was occasionally
taking up to 70ms for the cancellation to be propagated back.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
Andrew Boie 2017-05-15 14:27:23 -07:00 committed by Anas Nashif
commit 2596daa4ae

View file

@ -40,8 +40,12 @@ static void tfifo_thread_thread(struct k_fifo *pfifo)
k_thread_abort(tid);
zassert_is_null(ret,
"k_fifo_get didn't get 'timeout expired' status");
/* 61 includes fuzz factor */
zassert_true(dur < 61,
/* 80 includes generous fuzz factor as k_sleep() will add an extra
* tick for non-tickless systems, and we may cross another tick
* boundary while doing this. We just want to ensure we didn't
* hit the timeout anyway.
*/
zassert_true(dur < 80,
"k_fifo_get didn't get cancelled in expected timeframe");
}