RIOT icon indicating copy to clipboard operation
RIOT copied to clipboard

tests/shell: add test for preemption

Open benpicco opened this issue 3 years ago • 3 comments

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

benpicco avatar Dec 02 '22 15:12 benpicco

Murdock results

:heavy_check_mark: PASSED

ac383b33ae4bdf704872a15829a7a2f8bbff1b82 tests/shell: add test for preemption

Success Failures Total Runtime
65 0 66 52s

Artifacts

riot-ci avatar Feb 09 '24 15:02 riot-ci

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.

Teufelchen1 avatar Feb 12 '24 10:02 Teufelchen1

I also took the opportunity to simplify the test a bit, so it still fits on tiny MCUs.

benpicco avatar Feb 12 '24 11:02 benpicco

LGTM. Not super happy with the very short comment but 'eh, good enough. Squash?

Teufelchen1 avatar Mar 12 '24 11:03 Teufelchen1

@benpicco murdock is not happy, can you take a look?

Teufelchen1 avatar Mar 26 '24 12:03 Teufelchen1