Skip to content
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

periph_timer: Test coverage & broken on STM32F767ZI #15072

Open
maribu opened this issue Sep 24, 2020 · 0 comments
Open

periph_timer: Test coverage & broken on STM32F767ZI #15072

maribu opened this issue Sep 24, 2020 · 0 comments
Labels
Area: cpu Area: CPU/MCU ports Area: tests Area: tests and testing framework Platform: ARM Platform: This PR/issue effects ARM-based platforms Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Type: new feature The issue requests / The PR implemements a new feature for RIOT

Comments

@maribu
Copy link
Member

maribu commented Sep 24, 2020

Description

The periph_timer supports operating the hardware timer at different frequencies. It is expected that when timer_init() for a given frequency doesn't report an error, that the timer works as advertised.

Steps to reproduce the issue

make TIMER_SPEED=216000000 BOARD=nucleo-f767zi -C tests/periph_timer flash test

Expected results

Either failing timer initialization (which indicates an unsupported frequency was chosen), or fully functioning timer.

Actual results

READY
s
START
main(): This is RIOT! (Version: 2020.10-devel-1520-gf15a9-ptp-clock)

Test for peripheral TIMERs

Available timers: 1

Testing TIMER_0:
TIMER_0: initialization successful
TIMER_0: stopped
TIMER_0: set channel 0 to 5000
TIMER_0: set channel 1 to 10000
TIMER_0: set channel 2 to 15000
TIMER_0: set channel 3 to 20000
TIMER_0: starting
Timeout in expect script at "child.expect('TEST SUCCEEDED')" (tests/periph_timer/tests/01-run.py:21)

make: *** [/home/maribu/Repos/software/RIOT/tests/periph_timer/../../Makefile.include:761: test] Error 1
make: Leaving directory '/home/maribu/Repos/software/RIOT/tests/periph_timer'

Versions

Current master

Remarks

I think the fundamential issue here is missing test coverage. IMO the test should iterate over all available combinations of timers and supported frequencies. However, there currently is now way to efficiently query supported frequencies. An API extension for that seems to be reasonable.

With that in place, automatic tests would cause bugs and regressions for timer frequencies different from the one xtimer uses.

@maribu maribu added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Type: new feature The issue requests / The PR implemements a new feature for RIOT Area: cpu Area: CPU/MCU ports Area: tests Area: tests and testing framework labels Sep 24, 2020
@aabadie aabadie added the Platform: ARM Platform: This PR/issue effects ARM-based platforms label May 20, 2021
@MrKevinWeiss MrKevinWeiss added this to the Release 2021.07 milestone Jun 21, 2021
@MrKevinWeiss MrKevinWeiss removed this from the Release 2021.07 milestone Jul 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: cpu Area: CPU/MCU ports Area: tests Area: tests and testing framework Platform: ARM Platform: This PR/issue effects ARM-based platforms Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Type: new feature The issue requests / The PR implemements a new feature for RIOT
Projects
None yet
Development

No branches or pull requests

3 participants