zephyr/tests/kernel
Daniel Leung 7019baf6ac tests: kernel/smp: don't use stack to pass thread args
Inside test_get_cpu, the current CPU ID is stored in the test
thread's stack. Another thread is spawned with a pointer to
the variable holding this CPU ID, where this thread is supposed
to run on another CPU. On a cache incoherent platform, this
value of this variable may not have been updated on other CPU's
internal cache. Therefore when checking CPU IDs inside the newly
spawned thread, it is not checking the passed in CPU ID, but
actually whatever is on the another CPU's cache. This results in
random failure on the test_get_cpu test. Since for cache
incoherence architectures, CONFIG_KERNEL_COHERENCE is enabled by
default on SMP where shared data is placed in multiprocessor
coherent (generally "uncached") memory. The fix to this is to
simply make this variable as a global variable, as global
variable are consided shared data and will be placed in
multiprocessor coherent memory, and thus the correct value will
be referenced inside the newly spawned thread.

Fixes #49442

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2022-08-31 10:41:16 +02:00
..
common tests: kernel: common: adjust fudge factors 2022-08-08 10:44:41 +02:00
condvar/condvar_api test: fix more legacy #include paths 2022-08-02 16:41:41 +01:00
context tests: kernel: context: move to new ztest API 2022-08-04 13:42:47 +02:00
device test: fix more legacy #include paths 2022-08-02 16:41:41 +01:00
early_sleep tests: kernel: early_sleep: move to new ztest API 2022-08-23 20:57:04 -04:00
events test: fix more legacy #include paths 2022-08-02 16:41:41 +01:00
fatal tests: allow ARC platforms for non-multithread tests 2022-08-26 21:38:56 -04:00
fifo test: fix more legacy #include paths 2022-08-02 16:41:41 +01:00
fpu_sharing tests: fpu_sharing/generic: Remove qemu_leon3 workaround 2022-08-03 12:05:49 +02:00
gen_isr_table test: fix more legacy #include paths 2022-08-02 16:41:41 +01:00
interrupt tests: kernel: interrupt: Disable on ARM64 QEMU targets 2022-08-29 16:57:18 +02:00
lifo test: fix more legacy #include paths 2022-08-02 16:41:41 +01:00
mbox boards: qemu_x86_tiny: enable support for coverage 2022-08-18 17:23:18 +02:00
mem_heap tests: allow ARC platforms for non-multithread tests 2022-08-26 21:38:56 -04:00
mem_protect tests: kernel: move the sys_sem test to new ztest API 2022-08-19 20:44:49 +00:00
mem_slab tests: allow ARC platforms for non-multithread tests 2022-08-26 21:38:56 -04:00
mp tests: kernel: move the multiprocessing test to new ztest 2022-08-11 12:19:59 +02:00
msgq tests: msgq_usage: move to new ztest API 2022-08-12 11:31:11 +02:00
mutex tests: Add CONFIG_PIPES to tests that use pipes 2022-08-17 19:31:25 +02:00
obj_tracking tests: Add CONFIG_PIPES to tests that use pipes 2022-08-17 19:31:25 +02:00
pending test: fix more legacy #include paths 2022-08-02 16:41:41 +01:00
pipe tests: Add CONFIG_PIPES to tests that use pipes 2022-08-17 19:31:25 +02:00
poll tests: kernel: poll: Disable on qemu_arc_hs6x 2022-08-29 16:57:18 +02:00
profiling/profiling_api test: fix more legacy #include paths 2022-08-02 16:41:41 +01:00
queue kernel: queue: move queue testcase to new ztest 2022-08-05 11:46:59 +01:00
sched tests: fix the wrong test config name in schedule_api test 2022-08-19 12:10:14 +02:00
semaphore tests: Add CONFIG_PIPES to tests that use pipes 2022-08-17 19:31:25 +02:00
sleep test: fix more legacy #include paths 2022-08-02 16:41:41 +01:00
smp tests: kernel/smp: don't use stack to pass thread args 2022-08-31 10:41:16 +02:00
smp_boot_delay test: fix more legacy #include paths 2022-08-02 16:41:41 +01:00
spinlock test: fix more legacy #include paths 2022-08-02 16:41:41 +01:00
stack/stack test: fix more legacy #include paths 2022-08-02 16:41:41 +01:00
threads tests: allow ARC platforms for non-multithread tests 2022-08-26 21:38:56 -04:00
tickless/tickless_concept test: fix more legacy #include paths 2022-08-02 16:41:41 +01:00
timer tests: allow ARC platforms for non-multithread tests 2022-08-26 21:38:56 -04:00
usage/thread_runtime_stats test: fix more legacy #include paths 2022-08-02 16:41:41 +01:00
workq tests: kernel: workq: migrate user work testcases 2022-08-24 17:48:26 +00:00
xip test: fix more legacy #include paths 2022-08-02 16:41:41 +01:00