tests/p4wq: Fix impossible sleep interval
The code here was written to "get out of the way just long enough for the trivial context switch and callback to execute". But on a machine with 50 kHz ticks, that's not reliably enough time and this was failing spuriously. Which would have been a reasonably forgivable mistake to make had I not written this code with this very machine in mind... Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This commit is contained in:
parent
2197d46a43
commit
29b83584b0
1 changed files with 1 additions and 1 deletions
|
@ -260,7 +260,7 @@ static void test_p4wq_simple(void)
|
||||||
k_p4wq_submit(&wq, &simple_item);
|
k_p4wq_submit(&wq, &simple_item);
|
||||||
zassert_false(has_run, "ran too early");
|
zassert_false(has_run, "ran too early");
|
||||||
|
|
||||||
k_sleep(K_TICKS(1));
|
k_msleep(10);
|
||||||
zassert_true(has_run, "low-priority item didn't run");
|
zassert_true(has_run, "low-priority item didn't run");
|
||||||
|
|
||||||
/* Higher priority, should preempt us */
|
/* Higher priority, should preempt us */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue