For tests that set CONFIG_MP_NUM_CPUS, switch to using
CONFIG_MP_MAX_NUM_CPUS instead as we work to phase out
CONFIG_MP_NUM_CPUS.
Signed-off-by: Kumar Gala <kumar.gala@intel.com>
The stress ('scuse me, "zstress") cases here are all written to
exercise reader/writer threads at different priority combinations.
That's defeated if the threads are allowed to run on different CPUs
(because being "low" priority doesn't matter if you have a spare CPU
to run on).
There is also extensive use of stack buffers to pass data through the
ring buffer zero copy implementation, which runs afoul of the
KERNEL_COHERENCE rules on intel_adsp platforms (where stack memory is
incoherent between CPUs and can't be shared like that).
Fix both issues by just setting CONFIG_MP_NUM_CPUS=1
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Updated test to use stress testing framework instead of implementing
own framework.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Stress test that was validating thread safeness was configured to use
higher sys tick rate and targeting qemu_x86 platform. However, it was
also build for other platforms and was failing. Fixing it by extracting
stress tests to separate configuration that is run only on qemu_x86.
Modified the test to fail when number of preemptions is less than
expected only on qemu_x86.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Added test cases that validates if ring buffer handles
correctly case with single producer single consumer from
different contexts.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>