tests/shell: add test for preemption
Contribution description
This tests if a blocking stdio read will allow other threads to be scheduled.
Testing procedure
periodic test 5 should print test 5 times from a separate thread
> periodic test 5
> test
test
test
test
test
Issues/PRs references
requires #19002 to work on native
Murdock results
:heavy_check_mark: PASSED
ac383b33ae4bdf704872a15829a7a2f8bbff1b82 tests/shell: add test for preemption
| Success | Failures | Total | Runtime |
|---|---|---|---|
| 65 | 0 | 66 | 52s |
Artifacts
Looks okay from a first glance. You should add a comment on what that function is testing and how it is doing it. Otherwise it is not clear what is going on / the intentions.
I also took the opportunity to simplify the test a bit, so it still fits on tiny MCUs.
LGTM. Not super happy with the very short comment but 'eh, good enough. Squash?
@benpicco murdock is not happy, can you take a look?