summaryrefslogtreecommitdiffstats
path: root/testsuites
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2022-07-13 08:14:07 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2022-07-14 10:47:36 +0200
commitda016421cdcae2e386c7c64dbf8f0a11f8169dd8 (patch)
tree1b594fb096a4d316122dc2a43682cb8912dab83a /testsuites
parentvalidation: SMP-specific spurious interrupt test (diff)
downloadrtems-da016421cdcae2e386c7c64dbf8f0a11f8169dd8.tar.bz2
spextensions01: Fix assertion
Commit 80090639a62b50d7d66614ca789e4592924a06e5 altered the system state change. Account for this in assert_allocator_protected_thread_context().
Diffstat (limited to 'testsuites')
-rw-r--r--testsuites/sptests/spextensions01/init.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/testsuites/sptests/spextensions01/init.c b/testsuites/sptests/spextensions01/init.c
index 66e8fac260..ceae2d3062 100644
--- a/testsuites/sptests/spextensions01/init.c
+++ b/testsuites/sptests/spextensions01/init.c
@@ -30,6 +30,11 @@ static int active_extensions = 2;
static rtems_id master_task;
+static bool before_initialization(void)
+{
+ return _System_state_Is_before_initialization(_System_state_Get());
+}
+
static bool before_multitasking(void)
{
return _System_state_Is_before_multitasking(_System_state_Get());
@@ -61,9 +66,13 @@ static void assert_life_protected_thread_context(void)
static void assert_allocator_protected_thread_context(void)
{
- assert(_Thread_Dispatch_is_enabled() || before_multitasking());
+ assert(
+ _Thread_Dispatch_is_enabled() ||
+ before_initialization() ||
+ before_multitasking()
+ );
assert(_RTEMS_Allocator_is_owner());
- assert(life_protected() || before_multitasking());
+ assert(life_protected());
}
static void assert_thread_dispatch_disabled_context(void)