summaryrefslogtreecommitdiffstats
path: root/testsuites/sptests/spcontext01/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'testsuites/sptests/spcontext01/init.c')
-rw-r--r--testsuites/sptests/spcontext01/init.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/testsuites/sptests/spcontext01/init.c b/testsuites/sptests/spcontext01/init.c
index e1af302c7a..49a54d08f6 100644
--- a/testsuites/sptests/spcontext01/init.c
+++ b/testsuites/sptests/spcontext01/init.c
@@ -163,6 +163,12 @@ static void test(test_context *self)
static void test_context_is_executing(void)
{
#if defined(RTEMS_SMP)
+ /*
+ * Provide a stack area, since on some architectures the top/bottom of stack
+ * is initialized by _CPU_Context_Initialize().
+ */
+ static char stack[1024];
+
Context_Control context;
bool is_executing;
@@ -180,7 +186,15 @@ static void test_context_is_executing(void)
rtems_test_assert(!is_executing);
_CPU_Context_Set_is_executing(&context, true);
- _CPU_Context_Initialize(&context, NULL, 0, 0, NULL, false, NULL);
+ _CPU_Context_Initialize(
+ &context,
+ &stack[0],
+ sizeof(stack),
+ 0,
+ NULL,
+ false,
+ NULL
+ );
is_executing = _CPU_Context_Get_is_executing(&context);
rtems_test_assert(is_executing);
#endif