Skip to content

Commit

Permalink
tests: Mass SMP disablement on non-SMP-safe tests
Browse files Browse the repository at this point in the history
(Chunk 1 of 3 - this patch was split across pull requests to address
CI build time limitations)

Zephyr has always been a uniprocessor system, and its kernel tests are
rife with assumptions and outright dependence on single-CPU operation
(for example: "low priority threads will never run until this high
priority thread blocks" -- not true if there's another processor to
run it!)

About 1/3 of our tests fail right now on x86_64 when dual processor
operation is made default.  Most of those can probably be recovered on
a case-by-case basis with simple changes (and a few of them might
represent real bugs in SMP!), but for now let's make sure the full
test suite passes by turning the second CPU off.  There's still plenty
of SMP coverage in the remaining cases.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
  • Loading branch information
Andy Ross authored and galak committed Feb 28, 2019
1 parent 85d895c commit a334ac2
Show file tree
Hide file tree
Showing 16 changed files with 24 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ CONFIG_INIT_STACKS=y
CONFIG_POLL=y
CONFIG_SCHED_SCALABLE=y
CONFIG_THREAD_CUSTOM_DATA=y

CONFIG_SMP=n
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ CONFIG_THREAD_MONITOR=y
CONFIG_INIT_STACKS=y
CONFIG_POLL=y
CONFIG_SCHED_SCALABLE=y
CONFIG_SMP=n
2 changes: 2 additions & 0 deletions tests/benchmarks/timing_info/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ CONFIG_APPLICATION_DEFINED_SYSCALL=y
#Disable Userspace
CONFIG_TEST_USERSPACE=n
CONFIG_TEST_HW_STACK_PROTECTION=n

CONFIG_SMP=n
2 changes: 2 additions & 0 deletions tests/cmsis_rtos_v1/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ CONFIG_POLL=y
CONFIG_CMSIS_RTOS_V1=y
CONFIG_MAX_THREAD_BYTES=4
CONFIG_IRQ_OFFLOAD=y

CONFIG_SMP=n
2 changes: 2 additions & 0 deletions tests/kernel/common/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ CONFIG_POLL=y
CONFIG_QEMU_TICKLESS_WORKAROUND=y
CONFIG_BOOT_DELAY=500
CONFIG_IRQ_OFFLOAD=y

CONFIG_SMP=n
2 changes: 2 additions & 0 deletions tests/kernel/context/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ CONFIG_ZTEST=y
#CONFIG_MAIN_STACK_SIZE=1024
#CONFIG_ZTEST_STACKSIZE=2048
#CONFIG_IDLE_STACK_SIZE=512

CONFIG_SMP=n
2 changes: 2 additions & 0 deletions tests/kernel/critical/prj.conf
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
CONFIG_ZTEST=y

CONFIG_SMP=n
1 change: 1 addition & 0 deletions tests/kernel/early_sleep/prj.conf
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
CONFIG_IRQ_OFFLOAD=y
CONFIG_ZTEST=y
CONFIG_SMP=n
2 changes: 2 additions & 0 deletions tests/kernel/fatal/prj.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
CONFIG_HW_STACK_PROTECTION=y
CONFIG_ZTEST=y
CONFIG_COVERAGE=n

CONFIG_SMP=n
1 change: 1 addition & 0 deletions tests/kernel/fatal/sentinel.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ CONFIG_TEST_HW_STACK_PROTECTION=n
CONFIG_TEST_USERSPACE=n
CONFIG_ZTEST=y
CONFIG_COVERAGE=n
CONFIG_SMP=n
1 change: 1 addition & 0 deletions tests/kernel/fifo/fifo_api/prj.conf
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
CONFIG_ZTEST=y
CONFIG_IRQ_OFFLOAD=y
CONFIG_SMP=n
1 change: 1 addition & 0 deletions tests/kernel/fifo/fifo_api/prj_poll.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
CONFIG_ZTEST=y
CONFIG_IRQ_OFFLOAD=y
CONFIG_POLL=y
CONFIG_SMP=n
2 changes: 2 additions & 0 deletions tests/kernel/fifo/fifo_timeout/prj.conf
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
CONFIG_ZTEST=y
CONFIG_IRQ_OFFLOAD=y

CONFIG_SMP=n
1 change: 1 addition & 0 deletions tests/kernel/fifo/fifo_timeout/prj_poll.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
CONFIG_ZTEST=y
CONFIG_IRQ_OFFLOAD=y
CONFIG_POLL=y
CONFIG_SMP=n
1 change: 1 addition & 0 deletions tests/kernel/lifo/lifo_api/prj.conf
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
CONFIG_ZTEST=y
CONFIG_IRQ_OFFLOAD=y
CONFIG_SMP=n
2 changes: 2 additions & 0 deletions tests/kernel/lifo/lifo_usage/prj.conf
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
CONFIG_ZTEST=y

CONFIG_SMP=n

0 comments on commit a334ac2

Please sign in to comment.