-
Notifications
You must be signed in to change notification settings - Fork 3k
Make common tickers test more strict #7598
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The ticker specification requires that the ticker interrupt fires only when the ticker times increments to or past the value set by ticker_set_interrupt. The test for this, ticker_interrupt_test, only asserted that the interrupt to fired within +-TICKER_DELTA of the match value. This patch removes TICKER_DELTA tolerance so the test will fail if the interrupt does not fire at the exact time specified.
@mbed-os-test @kjbracey-arm @mprse Mind taking a look? |
I'll review this soon. @mprse Can you review please? |
Why are we removing the delta (making it more strict) ? Does this change fit all targets? |
I got same question want to ask |
I agree that form of the test which is proposed by @c1728p9 is closer to the requirements, then current version. It should be okay for boards which uses for Ticker one counter and CC registers to generate interrupts (e.g. NRF5x). But we have also boards like K64F which uses 2 counters. One for counting time and another for interrupt generation. I checked that interrupt test case fails on K64F with the fix and passes on NRF51_DK. BTW I checked the implementation for K64F and it looks like there is a bug: mbed-os/targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_MCU_K64F/us_ticker.c Line 118 in 232543a
should be: But even with this |
@c1728p9 @mprse @jamesbeyond @0xc0170 Anything needed to keep this PR moving? |
I think we should run morph and check the results. |
Will run since CI is idle, but the PR still needs to be reviewed. /morph build |
Build : SUCCESSBuild number : 3428 Triggering tests/morph test |
Exporter Build : SUCCESSBuild number : 3050 |
Test : FAILUREBuild number : 3219 |
Interesting. Might have been too strict. Please take a look at the errors. @ARMmbed/mbed-os-test @kjbracey-arm @mprse Please take a look when y'all have a chance. |
Closing this for now since it makes tests too strict for some platforms to pass, similar to #8129. |
Hi Maybe you can keep some extra tests or this delta time definition within a new macro |
Description
The ticker specification requires that the ticker interrupt fires only
when the ticker times increments to or past the value set by
ticker_set_interrupt. The test for this, ticker_interrupt_test,
only asserted that the interrupt to fired within +-TICKER_DELTA of the
match value.
This patch removes TICKER_DELTA tolerance so the test will fail if the
interrupt does not fire at the exact time specified.
Pull request type