diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-11-18 16:47:21 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-11-19 08:44:24 +0100 |
commit | f5e087319411efc7971a7311e7b59f0c01b34090 (patch) | |
tree | 79037e46d77a84a67cdc20d57c66b6dafaecace1 | |
parent | 535ea775433aed9ac9d8ac578874b07379714f67 (diff) |
testsuites/validation/tc-task.c
-rw-r--r-- | testsuites/validation/tc-task.c | 84 |
1 files changed, 83 insertions, 1 deletions
diff --git a/testsuites/validation/tc-task.c b/testsuites/validation/tc-task.c index 1efe70bf04..4013a82dca 100644 --- a/testsuites/validation/tc-task.c +++ b/testsuites/validation/tc-task.c @@ -93,6 +93,23 @@ * - Assert that RTEMS_TASK_STORAGE_ALIGNMENT is a constant expression which * evaluates to the expected value. * + * - Assert that RTEMS_NO_PRIORITY is a constant expression which evaluates to + * the expected value. + * + * - Assert that RTEMS_MINIMUM_STACK_SIZE is a constant expression which + * evaluates to the expected value. + * + * - Assert that RTEMS_CONFIGURED_MINIMUM_STACK_SIZE is a constant expression + * which evaluates to the expected value. + * + * - Assert that RTEMS_MINIMUM_PRIORITY is a constant expression which + * evaluates to the expected value. + * + * - Validate RTEMS_SELF using a sample directive call. + * + * - Check that rtems_task_is_suspended() returns the expected status if + * called with a task identifier parameter of RTEMS_SELF. + * * @{ */ @@ -208,16 +225,81 @@ static void RtemsTaskValTask_Action_3( void ) } /** + * @brief Assert that RTEMS_NO_PRIORITY is a constant expression which + * evaluates to the expected value. + */ +static void RtemsTaskValTask_Action_4( void ) +{ + RTEMS_STATIC_ASSERT( + RTEMS_NO_PRIORITY == RTEMS_CURRENT_PRIORITY, + NO_PRIORITY + ); +} + +/** + * @brief Assert that RTEMS_MINIMUM_STACK_SIZE is a constant expression which + * evaluates to the expected value. + */ +static void RtemsTaskValTask_Action_5( void ) +{ + RTEMS_STATIC_ASSERT( + RTEMS_MINIMUM_STACK_SIZE == STACK_MINIMUM_SIZE, + MINIMUM_STACK_SIZE + ); +} + +/** + * @brief Assert that RTEMS_CONFIGURED_MINIMUM_STACK_SIZE is a constant + * expression which evaluates to the expected value. + */ +static void RtemsTaskValTask_Action_6( void ) +{ + RTEMS_STATIC_ASSERT( + RTEMS_CONFIGURED_MINIMUM_STACK_SIZE == 0, + CONFIGURED_MINIMUM_STACK_SIZE + ); +} + +/** + * @brief Assert that RTEMS_MINIMUM_PRIORITY is a constant expression which + * evaluates to the expected value. + */ +static void RtemsTaskValTask_Action_7( void ) +{ + RTEMS_STATIC_ASSERT( RTEMS_MINIMUM_PRIORITY == 1, MINIMUM_PRIORITY ); +} + +/** + * @brief Validate RTEMS_SELF using a sample directive call. + */ +static void RtemsTaskValTask_Action_8( void ) +{ + rtems_status_code sc; + + /* + * Check that rtems_task_is_suspended() returns the expected status if called + * with a task identifier parameter of RTEMS_SELF. + */ + sc = rtems_task_is_suspended( RTEMS_SELF ); + T_step_rsc_success( 7, sc ); +} + +/** * @fn void T_case_body_RtemsTaskValTask( void ) */ T_TEST_CASE( RtemsTaskValTask ) { - T_plan( 7 ); + T_plan( 8 ); RtemsTaskValTask_Action_0(); RtemsTaskValTask_Action_1(); RtemsTaskValTask_Action_2(); RtemsTaskValTask_Action_3(); + RtemsTaskValTask_Action_4(); + RtemsTaskValTask_Action_5(); + RtemsTaskValTask_Action_6(); + RtemsTaskValTask_Action_7(); + RtemsTaskValTask_Action_8(); } /** @} */ |