If the regular context switches are triggered too fast, slow MCUs
will be able to spent little time on actually progressing in the
test. This will scale the IRQ rate with the CPU clock as a crude way
too keep load within limits.
- Perform the same computation over and over again. If the results
differ, context switches have an impact on the calculation (e.g.
when the FPU internally uses more bits than a float, but that bits
are not saved / restored on context switch)
- Give the three threads the names "t1", "t2", and "t3" and print them
on console, instead of the process ID. This makes interpretation of
the output easier, as the process IDs depend e.g. on whether a given
platforms requires an idle thread or not.
- Do not use the thread ID in the calculation, but the number at the
end of the thread name. This will result in the number printed only
depending on the precision of the (software) FPU and the printf()
implementation, and not on which threads are created in which order
(including the idle thread)
- Add a script to support running `make test`
Update tests/thread_float/tests/01-run.py
Co-authored-by: Alexandre Abadie <alexandre.abadie@inria.fr>