diff options
Diffstat (limited to '')
-rw-r--r-- | testsuites/validation/tc-scheduler-non-smp.c | 46 |
1 files changed, 34 insertions, 12 deletions
diff --git a/testsuites/validation/tc-scheduler-non-smp.c b/testsuites/validation/tc-scheduler-non-smp.c index a3eec8fd2d..4e805769a0 100644 --- a/testsuites/validation/tc-scheduler-non-smp.c +++ b/testsuites/validation/tc-scheduler-non-smp.c @@ -3,11 +3,11 @@ /** * @file * - * @ingroup RTEMSTestCaseRtemsSchedulerValNonSmp + * @ingroup RtemsSchedulerValNonSmp */ /* - * Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de) + * Copyright (C) 2021, 2023 embedded brains GmbH & Co. KG * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -57,28 +57,31 @@ #include <rtems/test.h> /** - * @defgroup RTEMSTestCaseRtemsSchedulerValNonSmp \ - * spec:/rtems/scheduler/val/non-smp + * @defgroup RtemsSchedulerValNonSmp spec:/rtems/scheduler/val/non-smp * - * @ingroup RTEMSTestSuiteTestsuitesValidationNonSmp + * @ingroup TestsuitesValidationNonSmp * * @brief This test case collection provides validation test cases for non-SMP * requirements of the @ref RTEMSAPIClassicScheduler. * * This test case performs the following actions: * - * - Check that calling rtems_scheduler_get_processor() is a constant - * expression which evaluates to zero. + * - Assert that rtems_scheduler_get_processor() is a constant expression which + * evaluates to zero. + * + * - Check that calling rtems_scheduler_get_processor() returns zero. * - * - Check that calling rtems_scheduler_get_processor_maximum() is a constant + * - Assert that rtems_scheduler_get_processor_maximum() is a constant * expression which evaluates to zero. * + * - Check that calling rtems_scheduler_get_processor_maximum() returns one. + * * @{ */ /** - * @brief Check that calling rtems_scheduler_get_processor() is a constant - * expression which evaluates to zero. + * @brief Assert that rtems_scheduler_get_processor() is a constant expression + * which evaluates to zero. */ static void RtemsSchedulerValNonSmp_Action_0( void ) { @@ -86,11 +89,19 @@ static void RtemsSchedulerValNonSmp_Action_0( void ) } /** - * @brief Check that calling rtems_scheduler_get_processor_maximum() is a - * constant expression which evaluates to zero. + * @brief Check that calling rtems_scheduler_get_processor() returns zero. */ static void RtemsSchedulerValNonSmp_Action_1( void ) { + T_eq_u32( rtems_scheduler_get_processor(), 0 ); +} + +/** + * @brief Assert that rtems_scheduler_get_processor_maximum() is a constant + * expression which evaluates to zero. + */ +static void RtemsSchedulerValNonSmp_Action_2( void ) +{ RTEMS_STATIC_ASSERT( rtems_scheduler_get_processor_maximum() == 1, GET_PROCESSOR_MAXIMUM @@ -98,12 +109,23 @@ static void RtemsSchedulerValNonSmp_Action_1( void ) } /** + * @brief Check that calling rtems_scheduler_get_processor_maximum() returns + * one. + */ +static void RtemsSchedulerValNonSmp_Action_3( void ) +{ + T_eq_u32( rtems_scheduler_get_processor_maximum(), 1 ); +} + +/** * @fn void T_case_body_RtemsSchedulerValNonSmp( void ) */ T_TEST_CASE( RtemsSchedulerValNonSmp ) { RtemsSchedulerValNonSmp_Action_0(); RtemsSchedulerValNonSmp_Action_1(); + RtemsSchedulerValNonSmp_Action_2(); + RtemsSchedulerValNonSmp_Action_3(); } /** @} */ |