summaryrefslogtreecommitdiffstats
path: root/testsuites
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2023-05-08 22:03:44 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2023-05-19 08:08:45 +0200
commit28fabc299fa0a1c95ea5124473d6446a812aa9e2 (patch)
tree469f3cc16c7e74a22ac1748e5e10edd8bfdee9b9 /testsuites
parentvalidation: Improve formatting (diff)
downloadrtems-28fabc299fa0a1c95ea5124473d6446a812aa9e2.tar.bz2
validation: rtems_scheduler_get_maximum_priority()
Validate this directive for the EDF SMP scheduler. Update #3716.
Diffstat (limited to 'testsuites')
-rw-r--r--testsuites/validation/tc-scheduler-smp-only.c24
1 files changed, 18 insertions, 6 deletions
diff --git a/testsuites/validation/tc-scheduler-smp-only.c b/testsuites/validation/tc-scheduler-smp-only.c
index b4ff000000..c975ba2a66 100644
--- a/testsuites/validation/tc-scheduler-smp-only.c
+++ b/testsuites/validation/tc-scheduler-smp-only.c
@@ -52,6 +52,7 @@
#include "config.h"
#endif
+#include <limits.h>
#include <rtems.h>
#include "ts-config.h"
@@ -93,6 +94,9 @@
*
* - Check that processor 1 has scheduler B assigned.
*
+ * - Check that scheduler B has the maximum priority of the EDF SMP
+ * scheduler.
+ *
* - Check that processor 2 has scheduler C assigned if it is present.
*
* - Check that processor 3 has scheduler C assigned if it is present.
@@ -165,9 +169,10 @@ static void RtemsSchedulerValSmpOnly_Action_1( void )
*/
static void RtemsSchedulerValSmpOnly_Action_2( void )
{
- rtems_status_code sc;
- rtems_id id[ 4 ];
- rtems_id id_by_cpu;
+ rtems_status_code sc;
+ rtems_id id[ 4 ];
+ rtems_id id_by_cpu;
+ rtems_task_priority priority;
sc = rtems_scheduler_ident( TEST_SCHEDULER_A_NAME, &id[ 0 ]);
T_step_rsc_success( 3, sc );
@@ -216,16 +221,23 @@ static void RtemsSchedulerValSmpOnly_Action_2( void )
T_step_eq_u32( 14, id[ 1 ], id_by_cpu );
/*
+ * Check that scheduler B has the maximum priority of the EDF SMP scheduler.
+ */
+ sc = rtems_scheduler_get_maximum_priority( id_by_cpu, &priority );
+ T_step_rsc_success( 15, sc );
+ T_step_eq_u32( 16, priority, (uint32_t) INT_MAX );
+
+ /*
* Check that processor 2 has scheduler C assigned if it is present.
*/
sc = rtems_scheduler_ident_by_processor( 2, &id_by_cpu );
- T_step_true( 15, sc == RTEMS_INVALID_NAME || id[ 2 ] == id_by_cpu );
+ T_step_true( 17, sc == RTEMS_INVALID_NAME || id[ 2 ] == id_by_cpu );
/*
* Check that processor 3 has scheduler C assigned if it is present.
*/
sc = rtems_scheduler_ident_by_processor( 3, &id_by_cpu );
- T_step_true( 16, sc == RTEMS_INVALID_NAME || id[ 2 ] == id_by_cpu );
+ T_step_true( 18, sc == RTEMS_INVALID_NAME || id[ 2 ] == id_by_cpu );
}
/**
@@ -233,7 +245,7 @@ static void RtemsSchedulerValSmpOnly_Action_2( void )
*/
T_TEST_CASE( RtemsSchedulerValSmpOnly )
{
- T_plan( 17 );
+ T_plan( 19 );
RtemsSchedulerValSmpOnly_Action_0();
RtemsSchedulerValSmpOnly_Action_1();