FluenTech / embedded-time

Time(ing) library (Instant/Duration/Clock/Timer/Period/Frequency) for bare-metal embedded systems
Apache License 2.0
87 stars 17 forks source link

Test suite assumes that tests run one at a time rather than in parallel #128

Open bjorn3 opened 1 year ago

bjorn3 commented 1 year ago

In https://github.com/FluenTech/embedded-time/blob/master/tests/timer.rs a single global static is used and manipulated from multiple tests. This is a race condition resulting in occasional spurious failure like this crater run. Using a thread local should fix this issue.