ztest: use an aligned stack size

1000 stack size was causing issues on architectures requireing aligned
stacks.

Change-Id: I57c06ef7eb09067d0312c27daad5d1300e6f43c6
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2017-01-24 17:55:08 -05:00 committed by Andrew Boie
parent 2d1fd2c947
commit 1f55c8916d
2 changed files with 5 additions and 2 deletions

View file

@ -14,7 +14,7 @@ config ZTEST
config ZTEST_STACKSIZE
int "Test function thread stack size"
depends on ZTEST
default 1000
default 1024
config ZTEST_FAIL_FAST
bool "Abort on first failing test"

View file

@ -125,7 +125,10 @@ out:
#define FAIL_FAST 0
#endif
static char thread_stack[CONFIG_ZTEST_STACKSIZE];
#if CONFIG_ZTEST_STACKSIZE & (STACK_ALIGN - 1)
#error "CONFIG_ZTEST_STACKSIZE must be a multiple of the stack alignment"
#endif
static char __stack thread_stack[CONFIG_ZTEST_STACKSIZE];
static int test_result;
static struct k_sem mutex;