zephyr/tests/kernel
Andy Ross c782d07a1c tests/kernel/smp: Properly synchronize CPU counters at test start
The idea behind this test is to race two CPUs against each other,
validating that each is truly running simultaneously.  But it just
assumed that the other thread/cpu would start synchronously as soon as
k_thread_create() returned.

Normally, that works fine.  But while debugging I added some code that
was slowing down entry to the other thread (or maybe the return from
k_thread_create() into the main thread) long enough to allow one
thread to get a significant head start.  That breaks the logic in the
test and things were inexplicably "failing".

Put a spin loop around the count so that the main thread can start
counting to within the memory system's ability to inform it of the
change from the other thread.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2018-05-31 14:02:03 -04:00
..
alert/alert_api tests: alert: improve test documentation 2018-05-23 18:58:03 -04:00
arm_irq_vector_table tests: kernel: Add description for test cases 2018-05-18 02:10:35 +03:00
arm_runtime_nmi doc: fix misspellings in test documentation 2018-05-23 15:27:19 -05:00
boot_page_table tests: classify tests 2018-04-09 22:55:20 -04:00
common tests/kernel/common: Add rigorous integer typing test 2018-05-23 19:40:07 -07:00
context tests: kernel context: rewrite test to use ztest correctly 2018-05-28 08:52:46 -04:00
critical tests: critical: fix naming and comments 2018-05-28 08:52:46 -04:00
device doc: process test documentation 2018-05-07 12:27:07 -04:00
early_sleep test: early_sleep: cleanup test 2018-05-28 08:52:46 -04:00
errno tests: errno: document test functions 2018-04-30 17:15:29 -04:00
fatal tests: fixes for ARC 2018-05-30 20:23:35 -04:00
fifo tests: fifo: improve test documentation 2018-05-23 18:58:03 -04:00
fp_sharing tests: fp_sharing: Fix definition of PI_NUM_ITERATIONS 2018-05-03 23:24:57 -04:00
gen_isr_table tests: classify tests 2018-04-09 22:55:20 -04:00
init tests: Remove newline character 2018-05-23 12:59:12 -04:00
irq_offload tests: Remove newline character 2018-05-23 12:59:12 -04:00
lifo tests: lifo: improve test documentation 2018-05-23 18:58:03 -04:00
mbox tests/kernel: Bump stack sizes for a few tests on qemu_x86 2018-05-19 07:00:55 +03:00
mem_heap/mheap_api_concept doc: fix misspellings in test documentation 2018-05-23 15:27:19 -05:00
mem_pool doc: fix misspellings in test documentation 2018-05-23 15:27:19 -05:00
mem_protect tests: fixes for ARC 2018-05-30 20:23:35 -04:00
mem_slab tests: mslab_threadsafe: Check for return value 2018-05-24 10:56:58 -04:00
mp tests: kernel: style, tag, and category fixes 2018-04-25 14:18:15 +05:30
msgq/msgq_api tests: msgq: improve test documentation 2018-05-23 18:58:03 -04:00
mutex tests: Remove newline character 2018-05-23 12:59:12 -04:00
obj_tracing tests: Remove newline character 2018-05-23 12:59:12 -04:00
pending tests kernel pending: unitialized variable 2018-05-10 08:20:15 -07:00
pipe tests: pipe: improve test documentation 2018-05-23 18:58:03 -04:00
poll doc: tests: remove obsolete and bogus test groups 2018-05-18 01:48:31 +03:00
profiling/profiling_api tests: necessary fixes for ARC 2018-05-30 20:23:35 -04:00
queue tests: Remove newline character 2018-05-23 12:59:12 -04:00
sched tests: schedule_api: change category to sched 2018-05-28 08:52:46 -04:00
semaphore tests: semaphore: improve test documentation 2018-05-23 18:58:03 -04:00
sleep tests/kernel: Bump stack sizes for a few tests on qemu_x86 2018-05-19 07:00:55 +03:00
smp tests/kernel/smp: Properly synchronize CPU counters at test start 2018-05-31 14:02:03 -04:00
spinlock tests: Remove newline character 2018-05-23 12:59:12 -04:00
stack tests: stack: improve test documentation 2018-05-23 18:58:03 -04:00
static_idt tests: Remove newline character 2018-05-23 12:59:12 -04:00
threads tests: move schedule_api under sched/ 2018-05-28 08:52:46 -04:00
tickless doc: tests: remove obsolete and bogus test groups 2018-05-18 01:48:31 +03:00
timer tests: kernel: timer: timer_api: Remove nonexistent config option 2018-05-23 17:57:06 -04:00
workq tests: workqueue: add API references and doxygen group 2018-05-28 08:52:46 -04:00
xip tests: rename main test to main.c 2018-05-07 12:27:07 -04:00