Skip to content
Permalink
Browse files

tests: kernel: mem_protect: use correct define for MEM_REGION_ALLOC

For ARM architecture, use Z_THREAD_MIN_STACK_ALIGN to define
MEM_REGION_ALLOC in tests/kernel/mem_protect/mem_protect/.
STACK_ALIGN takes into account MPU stack guard alignment
requirements. However, application memory partitions do not
require MPU stack guards, therefore, the alignment requirements
are not applicable here.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
  • Loading branch information...
ioannisg authored and andrewboie committed May 27, 2019
1 parent 518bfa3 commit 723aae950306c79ae4a29cf8d305ea310cd2237c
Showing with 3 additions and 1 deletion.
  1. +3 −1 tests/kernel/mem_protect/mem_protect/src/mem_protect.h
@@ -27,8 +27,10 @@ extern bool valid_fault;

#if defined(CONFIG_X86)
#define MEM_REGION_ALLOC (4096)
#elif defined(CONFIG_ARC) || defined(CONFIG_ARM)
#elif defined(CONFIG_ARC)
#define MEM_REGION_ALLOC (STACK_ALIGN)
#elif defined(CONFIG_ARM)
#define MEM_REGION_ALLOC (Z_THREAD_MIN_STACK_ALIGN)
#else
#error "Test suite not compatible for the given architecture"
#endif

0 comments on commit 723aae9

Please sign in to comment.
You can’t perform that action at this time.