zephyr/tests/kernel/workq/work_queue_api
Piotr Zięcik 285bfa7f62 tests: work_queue_api: Fix k_delayed_work_remaining_get() test
Existing test checking value returned by k_delayed_work_remaining_get()
verified two cases:

1) The k_delayed_work_remaining_get() should return 0 for non-submitted
   work.

2) The k_delayed_work_remaining_get() should return value greater or
   equal to the timeout value of just submitted work.

Unfortunately, the second check is not correct. The value returned
by the k_delayed_work_remaining_get() just after submitting delayed
work should be:

- Equal to timeout of the submitted work if no timer interrupt was
  executed between submitting work and checking remaining time.

  OR

- Less than timeout of the submitted work if a timer interrupt was
  executed between submitting work and checking remaining time.

This commit changes the test accordingly taking under account the
error caused by back and forth conversion between ms and ticks.

Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
2019-07-23 13:54:39 +02:00
..
src tests: work_queue_api: Fix k_delayed_work_remaining_get() test 2019-07-23 13:54:39 +02:00
CMakeLists.txt license: cleanup: add SPDX Apache-2.0 license identifier 2019-04-07 08:45:22 -04:00
prj.conf tests: CONFIG_TEST_USERSPACE now off by default 2019-04-06 14:30:42 -04:00
testcase.yaml