summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-11-18 16:47:21 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-11-23 15:18:38 +0100
commit0b9077ec9a94d3dbcbbb4bcf04e6a52c344592a0 (patch)
tree72de3ef65b17c713edee857cb690ec7777a994da
parentcf95aa13dc7cf5f498e594471622283d415aca00 (diff)
testsuites/validation/tc-task.c
-rw-r--r--testsuites/validation/tc-task.c84
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();
}
/** @} */