zephyr/samples/microkernel/test
Benjamin Walsh d3084b41e6 test_task: improve task_sleep test reliability on QEMU
The test was doing some weird dance for computing the time the main task
had slept, context switching between the main task and a helper task.
The tick timestamp that marks the start of the sleep duration, which
should be taken before the main task goes to sleep actually was taken
after it went to sleep, by the helper task. This lead to weird results
sometimes on QEMU, where the main task would report that it had slept
for less time than requested.

Now instead, the main task takes its own tick timestamps, just before it
goes to sleep and right when it awakens.

The helper task takes a timestamp as well, to verify that it did do busy
work while the main task was sleeping. However, some error is allowed
there to compensate for some QEMU weirdness.

Change-Id: I4b642b49de8346be404000698eaa4ded070d4097
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:15:25 -05:00
..
test_bluetooth
test_critical
test_events
test_fifo
test_fifo_priv testcases: use SOURCE_DIR instead of relative #include 2016-02-05 20:15:25 -05:00
test_fp_sharing
test_libs
test_mail
test_mail_priv testcases: use SOURCE_DIR instead of relative #include 2016-02-05 20:15:25 -05:00
test_map
test_map_priv testcases: use SOURCE_DIR instead of relative #include 2016-02-05 20:15:25 -05:00
test_mutex
test_pipe
test_pipe_priv testcases: use SOURCE_DIR instead of relative #include 2016-02-05 20:15:25 -05:00
test_pool
test_rand32
test_sema
test_sema_priv testcases: use SOURCE_DIR instead of relative #include 2016-02-05 20:15:25 -05:00
test_sprintf
test_stackprot
test_static_idt
test_task test_task: improve task_sleep test reliability on QEMU 2016-02-05 20:15:25 -05:00
test_task_irq
test_task_priv testcases: use SOURCE_DIR instead of relative #include 2016-02-05 20:15:25 -05:00
test_tickless
test_timer
test_xip