Mbed-os: New ticker tests are not adapted to variable-width tickers.

Created on 27 Mar 2018  路  8Comments  路  Source: ARMmbed/mbed-os

Description

  • Type: Bug

@0xc0170 What we talked about earlier.
@LMESTM I guess you're having the same issues.


Bug

Target
EFM32

Toolchain:
GCC_ARM

mbed-os sha:
458e726b1

Expected behavior
Unit tests work with all tickers corresponding to the new requirements (width between 16 bits and 32 bits, frequency between 250kHz and 8MHz).

Actual behavior
At various stages in the unit test (https://github.com/ARMmbed/mbed-os/blob/458e726b1e2c32fb2ea6238771190d6fdd78e18d/TESTS/mbed_hal/common_tickers/main.cpp) there are steps that don't account for getting a potential overflow on a fast-running short-width timer.

Examples:

closed_in_jira mirrored bug

Most helpful comment

@mprse @jamesbeyond could you split the test fixes to separate PR please.

All 8 comments

Indeed - same issues faced, now also with sleep tests, for instance here:
https://github.com/ARMmbed/mbed-os/blob/feature-hal-spec-sleep/TESTS/mbed_hal/sleep/main.cpp#L87

Agree also, seems that some tests need few update to ticker_info_t with frequency other than 1MHz and counter different than 32.

This test assumes that each test case (if needed) is executed before overflow occurs. overflow_protect() function should protect against overflow.

I also had some issues with overflows and had to modify this first test version. Final test version is provided here PR https://github.com/ARMmbed/mbed-os/pull/5629 (https://github.com/ARMmbed/mbed-os/pull/5629/commits/80c55e47f85aaeb8137367dbd962cb47b86e4bf6).

Please check if this test version works.

@mprse @jamesbeyond could you split the test fixes to separate PR please.

PR with test fixes only can be found here PR https://github.com/ARMmbed/mbed-os/pull/6472.

PR with test fixes only can be found here PR #6472.

Integrated, shall this issue be closed?

ARM Internal Ref: MBOTRIAGE-205

Closing since this issue appears resolved.
If it isn't, feel free to open a new issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

1domen1 picture 1domen1  路  3Comments

ccchang12 picture ccchang12  路  4Comments

pilotak picture pilotak  路  3Comments

sarahmarshy picture sarahmarshy  路  4Comments

DuyTrandeLion picture DuyTrandeLion  路  3Comments