diff options
Diffstat (limited to 'testsuites/validation/tc-scheduler-smp-only.c')
-rw-r--r-- | testsuites/validation/tc-scheduler-smp-only.c | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/testsuites/validation/tc-scheduler-smp-only.c b/testsuites/validation/tc-scheduler-smp-only.c index 2a6f0b53c6..0455567aee 100644 --- a/testsuites/validation/tc-scheduler-smp-only.c +++ b/testsuites/validation/tc-scheduler-smp-only.c @@ -3,11 +3,11 @@ /** * @file * - * @ingroup RTEMSTestCaseRtemsSchedulerValSmpOnly + * @ingroup RtemsSchedulerValSmpOnly */ /* - * Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de) + * Copyright (C) 2021 embedded brains GmbH & Co. KG * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -52,6 +52,7 @@ #include "config.h" #endif +#include <limits.h> #include <rtems.h> #include "ts-config.h" @@ -60,10 +61,9 @@ #include <rtems/test.h> /** - * @defgroup RTEMSTestCaseRtemsSchedulerValSmpOnly \ - * spec:/rtems/scheduler/val/smp-only + * @defgroup RtemsSchedulerValSmpOnly spec:/rtems/scheduler/val/smp-only * - * @ingroup RTEMSTestSuiteTestsuitesValidationSmpOnly0 + * @ingroup TestsuitesValidationSmpOnly0 * * @brief This test case collection provides validation test cases for SMP-only * requirements of the @ref RTEMSAPIClassicScheduler. @@ -94,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. @@ -166,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 ); @@ -217,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 ); } /** @@ -234,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(); |