diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-11-16 16:45:32 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-11-19 08:44:23 +0100 |
commit | 6cdd7fd4ae31327c50e0486251ede05c9ac00040 (patch) | |
tree | 83238b938ba93719fcf35d03cb9498a31a80c677 | |
parent | 5e5106f1b5995c2478fb347d94f9bc354e77fe39 (diff) |
testsuites/validation/tc-acfg.c
-rw-r--r-- | testsuites/validation/tc-acfg.c | 62 |
1 files changed, 59 insertions, 3 deletions
diff --git a/testsuites/validation/tc-acfg.c b/testsuites/validation/tc-acfg.c index beca77b909..bb68d7f3c4 100644 --- a/testsuites/validation/tc-acfg.c +++ b/testsuites/validation/tc-acfg.c @@ -71,6 +71,18 @@ * * - Check the effect of application configuration options. * + * - Check the configured CONFIGURE_INIT_TASK_ARGUMENTS. This validates also + * the effect of CONFIGURE_INIT_TASK_ENTRY_POINT and + * CONFIGURE_RTEMS_INIT_TASKS_TABLE. + * + * - Check the configured CONFIGURE_INIT_TASK_INITIAL_MODES. + * + * - Check the configured CONFIGURE_INIT_TASK_NAME. + * + * - Check the configured CONFIGURE_INIT_TASK_PRIORITY. A priority of zero + * can only be set for system tasks. This validates also + * CONFIGURE_INIT_TASK_ATTRIBUTES. + * * - Check that the configured * CONFIGURE_MINIMUM_TASKS_WITH_USER_PROVIDED_STORAGE value reduced the * stack space size. @@ -102,7 +114,16 @@ * - Check the configured CONFIGURE_MICROSECONDS_PER_TICK value in * nanoseconds. * - * - Check the configured CONFIGURE_TASK_STACK_ALLOCATOR hook. + * - Check the configured CONFIGURE_TASK_STACK_ALLOCATOR hook. Using the + * test stack allocator validates also + * /acfg/if/init-task-construct-storage-size, since the + * test_task_stack_allocate() allocate handler only supports + * CONFIGURE_MAXIMUM_TASKS minus one stacks and the validation test for + * /rtems/task/req/create-errors creates for some pre-condition variants + * all tasks until RTEMS_TOO_MANY is returned. In addition, + * test_task_stack_allocate() checks that the allocation size is greater + * than or equal to TEST_MINIMUM_STACK_SIZE which validates + * CONFIGURE_MINIMUM_TASK_STACK_SIZE. * * - Check the configured CONFIGURE_TASK_STACK_ALLOCATOR_AVOIDS_WORK_SPACE * value. @@ -127,7 +148,34 @@ */ static void AcfgValAcfg_Action_0( void ) { - /* Nothing to do */ + rtems_status_code sc; + rtems_id id; + + /* + * Check the configured CONFIGURE_INIT_TASK_ARGUMENTS. This validates also + * the effect of CONFIGURE_INIT_TASK_ENTRY_POINT and + * CONFIGURE_RTEMS_INIT_TASKS_TABLE. + */ + T_eq_ulong( test_runner_argument, TEST_RUNNER_ARGUMENT ); + + /* + * Check the configured CONFIGURE_INIT_TASK_INITIAL_MODES. + */ + T_eq_u32( test_runner_initial_modes, TEST_RUNNER_INITIAL_MODES ); + + /* + * Check the configured CONFIGURE_INIT_TASK_NAME. + */ + sc = rtems_task_ident( TEST_RUNNER_NAME, RTEMS_SEARCH_LOCAL_NODE, &id ); + T_rsc_success( sc ); + T_eq_u32( id, rtems_task_self() ); + + /* + * Check the configured CONFIGURE_INIT_TASK_PRIORITY. A priority of zero can + * only be set for system tasks. This validates also + * CONFIGURE_INIT_TASK_ATTRIBUTES. + */ + T_eq_u32( test_runner_initial_priority, 0 ); /* * Check that the configured @@ -242,7 +290,15 @@ static void AcfgValAcfg_Action_0( void ) ); /* - * Check the configured CONFIGURE_TASK_STACK_ALLOCATOR hook. + * Check the configured CONFIGURE_TASK_STACK_ALLOCATOR hook. Using the test + * stack allocator validates also /acfg/if/init-task-construct-storage-size, + * since the test_task_stack_allocate() allocate handler only supports + * CONFIGURE_MAXIMUM_TASKS minus one stacks and the validation test for + * /rtems/task/req/create-errors creates for some pre-condition variants all + * tasks until RTEMS_TOO_MANY is returned. In addition, + * test_task_stack_allocate() checks that the allocation size is greater than + * or equal to TEST_MINIMUM_STACK_SIZE which validates + * CONFIGURE_MINIMUM_TASK_STACK_SIZE. */ T_eq_ptr( rtems_configuration_get_stack_allocate_hook(), |