All tests should be SMP-safe #14639
Labels
area: SMP
Symmetric multiprocessing
area: Tests
Issues related to a particular existing or missing test
Enhancement
Changes/Updates/Additions to existing features
Milestone
Traditionally, Zephyr was a uniprocessor system. But it now has a SMP platform in CI.
Lots and lots of code in our tests was written to assume uniprocessor behavior, for example that lower priority threads will never run if a higher priority thread is runnable (now it can run on another CPU), or that a given thread mode event will never happen until after the return of a interrupt context event like a timeout (the other CPU can wake up before the ISR returns).
So lots and lots of our test code doesn't run correctly or reliably in SMP right now. It should.
Obviously it won't be possible in all cases to change the designs of the tests (for example: sched/preempt is 100% predicated on the idea of testing two threads against each other on one CPU) but they should be isolated/understood and treated with a code-level workaround (e.g. put a known high priority thread on the other CPU and have it spin during a single-CPU test, or use the thread affinity API, or add extra synchronization layers to prevent events from getting ahead of themselves, etc...).
For 1.15, all test code should be running with default SMP settings unless it is explicitly testing for CONFIG_SMP-specific behavior.
The text was updated successfully, but these errors were encountered: