[WIP] Running tests including timers / callouts (using native mcu) without sleeping
- Dominant language
- C
- Stars
- 891
- Forks
- 381
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 14
Description
We were looking into tests involving semaphores, callouts and timers where addresses are allocated to units and expire after a certain number of seconds. Setting up tests for this works well using the native mcu to include simulation of the os.
However, when making a test that is waiting x number of seconds for each expiry we end up with a test-case that runs for y minutes where it's almost only sleeping. A few of these tests and testing now takes a long time.
Would it make sense to have a mode in which we can run tests as fast as possible? I.e. timers and callouts would look to the next scheduled event and execute that rather than sleeping. We may need to take care of having multiple timers but that can be a stretch / future improvement. The case with a single timer should be fairly straightforward to implement?
@sjanc
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the native MCU test setup and the timer, callout, and semaphore scheduling paths used by the existing tests. Done means tests can advance directly to the next scheduled expiry instead of sleeping for wall-clock time, initially covering the single-timer case described in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- embedded-iot, operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100