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:
parent
e6fcc0105e
commit
2596daa4ae
1 changed files with 6 additions and 2 deletions
|
@ -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");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue