zephyr/tests
Vincent Wan 0b12a7b463 tests: timer_api: fix assertion in test_timer_remaining()
This commit fixes the assertion in test_timer_remaining() that checks
whether the remaining ticks on a timer is less than or equal to half of
the timer duration after a busy wait of that time. If the timer
duration corresponds to an odd number of ticks, 1 should be added to
the upper bound given k_timer_remaining_ticks() returns
<ticks til next deadline> - <elapsed ticks>,
and <elapsed ticks> is truncated to closest integer tick count.

For example, if
    dur_ticks = 3277
    <ticks til next deadline> = 3277
    <elapsed ticks> = 1638.5 rounded to 1638

rem_ticks would be 1639, which is 1 greater than dur_ticks/2.

Fixes #25331

Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
2020-05-18 11:08:21 +02:00
..
application_development
arch tests: Rename arch.arm.swap.common.fp_sharing 2020-05-08 10:58:33 +02:00
benchmarks tests: ztest: prefix tests with test_ 2020-05-13 18:16:07 +02:00
bluetooth tests: ztest: prefix tests with test_ 2020-05-13 18:16:07 +02:00
boards flash: Convert DT_FLASH_AREA to FLASH_AREA macros 2020-05-13 21:22:53 +02:00
crypto
deprecated/dts tests: deprecated: dts: Test deprecated DTS functionality 2020-05-13 21:22:53 +02:00
drivers tests: gpio_basic_api: change GPIOs for mec15xxevb_assy6853 2020-05-15 17:18:41 +02:00
kernel tests: timer_api: fix assertion in test_timer_remaining() 2020-05-18 11:08:21 +02:00
lib tests: lib: heap: exclude qemu_riscv32 platform 2020-05-14 13:52:07 +02:00
misc/test_build
net timer: remove QEMU_TICKLESS_WORKAROUND 2020-05-14 13:52:07 +02:00
portability lib/cmsis_rtos_v2: Update to newer timeout API 2020-05-06 06:05:03 -04:00
posix tests: posix: clock: Workaround to align clocks before querying 2020-05-08 17:31:45 +02:00
shell tests: shell: Add test for raw argument option 2020-05-07 23:47:39 -05:00
subsys flash: Convert DT_FLASH_AREA to FLASH_AREA macros 2020-05-13 21:22:53 +02:00
unit sys/util.h: Add IS_EMPTY and LIST_DROP_EMPTY macros 2020-05-08 17:50:25 +02:00
ztest