diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-03-27 11:15:43 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-03-27 18:05:05 +0100 |
commit | e0aba8cb9edd3630be3b81e1f1c3e8bdaf728d1e (patch) | |
tree | f2d7d3f04eb1b6cadb8047323a6e319fd8a1a01c /testsuites/psxtests/psxclassic01/init.c | |
parent | pwdgrp.c: Change to simply ignore return value from mkdir(/etc) (diff) | |
download | rtems-e0aba8cb9edd3630be3b81e1f1c3e8bdaf728d1e.tar.bz2 |
score: Fix task stack initialization
Do not adjust the stack area begin address since this may confuse the
stack allocator and result in failed stack frees.
Account for the alignment overhead in the stack space size estimate.
Check that the stack size is in the expected interval.
Diffstat (limited to 'testsuites/psxtests/psxclassic01/init.c')
-rw-r--r-- | testsuites/psxtests/psxclassic01/init.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/testsuites/psxtests/psxclassic01/init.c b/testsuites/psxtests/psxclassic01/init.c index 42ddf10bec..04a77b1c30 100644 --- a/testsuites/psxtests/psxclassic01/init.c +++ b/testsuites/psxtests/psxclassic01/init.c @@ -78,7 +78,11 @@ static rtems_task test_task(rtems_task_argument arg) sc = pthread_attr_getstack( &attr, &addr, &size ); rtems_test_assert( sc == 0 ); rtems_test_assert( addr != NULL ); - rtems_test_assert( size == RTEMS_MINIMUM_STACK_SIZE ); + rtems_test_assert( size >= RTEMS_MINIMUM_STACK_SIZE ); + rtems_test_assert( + size <= RTEMS_MINIMUM_STACK_SIZE + CPU_STACK_ALIGNMENT - + CPU_HEAP_ALIGNMENT + ); value = -1; sc = pthread_attr_getscope( &attr, &value ); |