Back to home page

LXR

 
 

    


File indexing completed on 2025-05-11 08:24:52

0001 /* SPDX-License-Identifier: BSD-2-Clause */
0002 
0003 /**
0004  * @file
0005  *
0006  * @ingroup RtemsRatemonReqGetStatus
0007  */
0008 
0009 /*
0010  * Copyright (C) 2021 embedded brains GmbH & Co. KG
0011  *
0012  * Redistribution and use in source and binary forms, with or without
0013  * modification, are permitted provided that the following conditions
0014  * are met:
0015  * 1. Redistributions of source code must retain the above copyright
0016  *    notice, this list of conditions and the following disclaimer.
0017  * 2. Redistributions in binary form must reproduce the above copyright
0018  *    notice, this list of conditions and the following disclaimer in the
0019  *    documentation and/or other materials provided with the distribution.
0020  *
0021  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
0022  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
0023  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
0024  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
0025  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
0026  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
0027  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
0028  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
0029  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
0030  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
0031  * POSSIBILITY OF SUCH DAMAGE.
0032  */
0033 
0034 /*
0035  * This file is part of the RTEMS quality process and was automatically
0036  * generated.  If you find something that needs to be fixed or
0037  * worded better please post a report or patch to an RTEMS mailing list
0038  * or raise a bug report:
0039  *
0040  * https://www.rtems.org/bugs.html
0041  *
0042  * For information on updating and regenerating please refer to the How-To
0043  * section in the Software Requirements Engineering chapter of the
0044  * RTEMS Software Engineering manual.  The manual is provided as a part of
0045  * a release.  For development sources please refer to the online
0046  * documentation at:
0047  *
0048  * https://docs.rtems.org
0049  */
0050 
0051 #ifdef HAVE_CONFIG_H
0052 #include "config.h"
0053 #endif
0054 
0055 #include <rtems.h>
0056 #include <rtems/cpuuse.h>
0057 
0058 #include "tx-support.h"
0059 
0060 #include <rtems/test.h>
0061 
0062 /**
0063  * @defgroup RtemsRatemonReqGetStatus spec:/rtems/ratemon/req/get-status
0064  *
0065  * @ingroup TestsuitesValidationNoClock0
0066  * @ingroup TestsuitesValidationOneCpu0
0067  *
0068  * @{
0069  */
0070 
0071 typedef enum {
0072   RtemsRatemonReqGetStatus_Pre_StatusAddr_Valid,
0073   RtemsRatemonReqGetStatus_Pre_StatusAddr_Null,
0074   RtemsRatemonReqGetStatus_Pre_StatusAddr_NA
0075 } RtemsRatemonReqGetStatus_Pre_StatusAddr;
0076 
0077 typedef enum {
0078   RtemsRatemonReqGetStatus_Pre_Id_Valid,
0079   RtemsRatemonReqGetStatus_Pre_Id_Invalid,
0080   RtemsRatemonReqGetStatus_Pre_Id_NA
0081 } RtemsRatemonReqGetStatus_Pre_Id;
0082 
0083 typedef enum {
0084   RtemsRatemonReqGetStatus_Pre_State_Inactive,
0085   RtemsRatemonReqGetStatus_Pre_State_Active,
0086   RtemsRatemonReqGetStatus_Pre_State_Expired,
0087   RtemsRatemonReqGetStatus_Pre_State_NA
0088 } RtemsRatemonReqGetStatus_Pre_State;
0089 
0090 typedef enum {
0091   RtemsRatemonReqGetStatus_Pre_Elapsed_Time,
0092   RtemsRatemonReqGetStatus_Pre_Elapsed_NA
0093 } RtemsRatemonReqGetStatus_Pre_Elapsed;
0094 
0095 typedef enum {
0096   RtemsRatemonReqGetStatus_Pre_Consumed_CpuTime,
0097   RtemsRatemonReqGetStatus_Pre_Consumed_NA
0098 } RtemsRatemonReqGetStatus_Pre_Consumed;
0099 
0100 typedef enum {
0101   RtemsRatemonReqGetStatus_Pre_Postponed_Zero,
0102   RtemsRatemonReqGetStatus_Pre_Postponed_One,
0103   RtemsRatemonReqGetStatus_Pre_Postponed_Several,
0104   RtemsRatemonReqGetStatus_Pre_Postponed_NA
0105 } RtemsRatemonReqGetStatus_Pre_Postponed;
0106 
0107 typedef enum {
0108   RtemsRatemonReqGetStatus_Post_Status_Ok,
0109   RtemsRatemonReqGetStatus_Post_Status_InvAddr,
0110   RtemsRatemonReqGetStatus_Post_Status_InvId,
0111   RtemsRatemonReqGetStatus_Post_Status_NA
0112 } RtemsRatemonReqGetStatus_Post_Status;
0113 
0114 typedef enum {
0115   RtemsRatemonReqGetStatus_Post_Owner_OwnerTask,
0116   RtemsRatemonReqGetStatus_Post_Owner_Nop,
0117   RtemsRatemonReqGetStatus_Post_Owner_NA
0118 } RtemsRatemonReqGetStatus_Post_Owner;
0119 
0120 typedef enum {
0121   RtemsRatemonReqGetStatus_Post_State_Inactive,
0122   RtemsRatemonReqGetStatus_Post_State_Active,
0123   RtemsRatemonReqGetStatus_Post_State_Expired,
0124   RtemsRatemonReqGetStatus_Post_State_Nop,
0125   RtemsRatemonReqGetStatus_Post_State_NA
0126 } RtemsRatemonReqGetStatus_Post_State;
0127 
0128 typedef enum {
0129   RtemsRatemonReqGetStatus_Post_Elapsed_Time,
0130   RtemsRatemonReqGetStatus_Post_Elapsed_Zero,
0131   RtemsRatemonReqGetStatus_Post_Elapsed_Nop,
0132   RtemsRatemonReqGetStatus_Post_Elapsed_NA
0133 } RtemsRatemonReqGetStatus_Post_Elapsed;
0134 
0135 typedef enum {
0136   RtemsRatemonReqGetStatus_Post_Consumed_CpuTime,
0137   RtemsRatemonReqGetStatus_Post_Consumed_Zero,
0138   RtemsRatemonReqGetStatus_Post_Consumed_Nop,
0139   RtemsRatemonReqGetStatus_Post_Consumed_NA
0140 } RtemsRatemonReqGetStatus_Post_Consumed;
0141 
0142 typedef enum {
0143   RtemsRatemonReqGetStatus_Post_Postponed_Zero,
0144   RtemsRatemonReqGetStatus_Post_Postponed_One,
0145   RtemsRatemonReqGetStatus_Post_Postponed_Several,
0146   RtemsRatemonReqGetStatus_Post_Postponed_Nop,
0147   RtemsRatemonReqGetStatus_Post_Postponed_NA
0148 } RtemsRatemonReqGetStatus_Post_Postponed;
0149 
0150 typedef struct {
0151   uint32_t Skip : 1;
0152   uint32_t Pre_StatusAddr_NA : 1;
0153   uint32_t Pre_Id_NA : 1;
0154   uint32_t Pre_State_NA : 1;
0155   uint32_t Pre_Elapsed_NA : 1;
0156   uint32_t Pre_Consumed_NA : 1;
0157   uint32_t Pre_Postponed_NA : 1;
0158   uint32_t Post_Status : 2;
0159   uint32_t Post_Owner : 2;
0160   uint32_t Post_State : 3;
0161   uint32_t Post_Elapsed : 2;
0162   uint32_t Post_Consumed : 2;
0163   uint32_t Post_Postponed : 3;
0164 } RtemsRatemonReqGetStatus_Entry;
0165 
0166 /**
0167  * @brief Test context for spec:/rtems/ratemon/req/get-status test case.
0168  */
0169 typedef struct {
0170   /**
0171    * @brief This member contains a valid identifier of a period.
0172    */
0173   rtems_id period_id;
0174 
0175   /**
0176    * @brief This member contains the previous timecounter handler to restore.
0177    */
0178   GetTimecountHandler previous_timecounter_handler;
0179 
0180   /**
0181    * @brief This member is used to receive the
0182    *   rtems_rate_monotonic_period_status from the action.
0183    */
0184   rtems_rate_monotonic_period_status period_status;
0185 
0186   /**
0187    * @brief This member specifies the ``id`` parameter for the action.
0188    */
0189   rtems_id id_param;
0190 
0191   /**
0192    * @brief This member specifies the ``status`` parameter for the action.
0193    */
0194   rtems_rate_monotonic_period_status *status_param;
0195 
0196   /**
0197    * @brief This member contains the returned status code of the action.
0198    */
0199   rtems_status_code status;
0200 
0201   /**
0202    * @brief This member contains the task identifier of the owner task.
0203    */
0204   rtems_id task_id;
0205 
0206   /**
0207    * @brief This member contains the state before the action.
0208    */
0209   rtems_rate_monotonic_period_states previous_state;
0210 
0211   /**
0212    * @brief If the rtems_cpu_usage_reset() directive should be called before
0213    *   rtems_rate_monotonic_get_status(), this member contains a pointer to it.
0214    */
0215   void (*do_reset)( void );
0216 
0217   /**
0218    * @brief This member contains the CLOCK_MONOTONIC time elapsed.
0219    */
0220   struct timespec elapsed;
0221 
0222   /**
0223    * @brief This member contains the CPU time consumed by the owner task.
0224    */
0225   struct timespec consumed;
0226 
0227   /**
0228    * @brief This member contains the number of postponed jobs.
0229    */
0230   uint32_t postponed_jobs_count;
0231 
0232   struct {
0233     /**
0234      * @brief This member defines the pre-condition indices for the next
0235      *   action.
0236      */
0237     size_t pci[ 6 ];
0238 
0239     /**
0240      * @brief This member defines the pre-condition states for the next action.
0241      */
0242     size_t pcs[ 6 ];
0243 
0244     /**
0245      * @brief If this member is true, then the test action loop is executed.
0246      */
0247     bool in_action_loop;
0248 
0249     /**
0250      * @brief This member contains the next transition map index.
0251      */
0252     size_t index;
0253 
0254     /**
0255      * @brief This member contains the current transition map entry.
0256      */
0257     RtemsRatemonReqGetStatus_Entry entry;
0258 
0259     /**
0260      * @brief If this member is true, then the current transition variant
0261      *   should be skipped.
0262      */
0263     bool skip;
0264   } Map;
0265 } RtemsRatemonReqGetStatus_Context;
0266 
0267 static RtemsRatemonReqGetStatus_Context
0268   RtemsRatemonReqGetStatus_Instance;
0269 
0270 static const char * const RtemsRatemonReqGetStatus_PreDesc_StatusAddr[] = {
0271   "Valid",
0272   "Null",
0273   "NA"
0274 };
0275 
0276 static const char * const RtemsRatemonReqGetStatus_PreDesc_Id[] = {
0277   "Valid",
0278   "Invalid",
0279   "NA"
0280 };
0281 
0282 static const char * const RtemsRatemonReqGetStatus_PreDesc_State[] = {
0283   "Inactive",
0284   "Active",
0285   "Expired",
0286   "NA"
0287 };
0288 
0289 static const char * const RtemsRatemonReqGetStatus_PreDesc_Elapsed[] = {
0290   "Time",
0291   "NA"
0292 };
0293 
0294 static const char * const RtemsRatemonReqGetStatus_PreDesc_Consumed[] = {
0295   "CpuTime",
0296   "NA"
0297 };
0298 
0299 static const char * const RtemsRatemonReqGetStatus_PreDesc_Postponed[] = {
0300   "Zero",
0301   "One",
0302   "Several",
0303   "NA"
0304 };
0305 
0306 static const char * const * const RtemsRatemonReqGetStatus_PreDesc[] = {
0307   RtemsRatemonReqGetStatus_PreDesc_StatusAddr,
0308   RtemsRatemonReqGetStatus_PreDesc_Id,
0309   RtemsRatemonReqGetStatus_PreDesc_State,
0310   RtemsRatemonReqGetStatus_PreDesc_Elapsed,
0311   RtemsRatemonReqGetStatus_PreDesc_Consumed,
0312   RtemsRatemonReqGetStatus_PreDesc_Postponed,
0313   NULL
0314 };
0315 
0316 static const rtems_id initial_owner = 0xFFFFFFFF;
0317 static const rtems_rate_monotonic_period_states initial_state =
0318   (rtems_rate_monotonic_period_states) 0xFFFFFFFF;
0319 static const struct timespec initial_period = { 0xFFFFFFFF, 0xFFFFFFFF };
0320 static const uint32_t initial_postponed_jobs_count = 0xFFFFFFFF;
0321 static const rtems_interval period_length = 5;
0322 static const uint32_t elapsed_cpu_ticks = 3;
0323 
0324 static uint32_t FreezeTime( void )
0325 {
0326   return GetTimecountCounter() - 1;
0327 }
0328 
0329 static void TickTheClock(
0330   RtemsRatemonReqGetStatus_Context *ctx,
0331   uint32_t ticks
0332 )
0333 {
0334   uint32_t i;
0335   for ( i = 0; i < ticks; ++i ) {
0336     TimecounterTick();
0337   }
0338   ctx->elapsed.tv_nsec +=
0339     rtems_configuration_get_nanoseconds_per_tick() * ticks;
0340 }
0341 
0342 static void CreatePostponedJobs(
0343   RtemsRatemonReqGetStatus_Context *ctx,
0344   uint32_t jobs_count
0345 )
0346 {
0347   rtems_status_code status;
0348   ctx->postponed_jobs_count = jobs_count;
0349   if ( ctx->previous_state == RATE_MONOTONIC_ACTIVE ) {
0350     jobs_count++;
0351     TickTheClock( ctx, jobs_count * period_length );
0352     status = rtems_rate_monotonic_period( ctx->period_id, period_length );
0353     T_rsc( status, RTEMS_TIMEOUT );
0354   } else {
0355     /* ctx->previous_state == RATE_MONOTONIC_INACTIVE || _EXPIRED */
0356     TickTheClock( ctx, jobs_count * period_length );
0357   }
0358   ctx->consumed.tv_nsec +=
0359     rtems_configuration_get_nanoseconds_per_tick() *
0360     jobs_count * period_length;
0361 }
0362 
0363 static void RtemsRatemonReqGetStatus_Pre_StatusAddr_Prepare(
0364   RtemsRatemonReqGetStatus_Context       *ctx,
0365   RtemsRatemonReqGetStatus_Pre_StatusAddr state
0366 )
0367 {
0368   switch ( state ) {
0369     case RtemsRatemonReqGetStatus_Pre_StatusAddr_Valid: {
0370       /*
0371        * While the ``status`` parameter references an object of type
0372        * rtems_rate_monotonic_period_status.
0373        */
0374       ctx->status_param = &ctx->period_status;
0375       break;
0376     }
0377 
0378     case RtemsRatemonReqGetStatus_Pre_StatusAddr_Null: {
0379       /*
0380        * While the ``status`` parameter is NULL.
0381        */
0382       ctx->status_param = NULL;
0383       break;
0384     }
0385 
0386     case RtemsRatemonReqGetStatus_Pre_StatusAddr_NA:
0387       break;
0388   }
0389 }
0390 
0391 static void RtemsRatemonReqGetStatus_Pre_Id_Prepare(
0392   RtemsRatemonReqGetStatus_Context *ctx,
0393   RtemsRatemonReqGetStatus_Pre_Id   state
0394 )
0395 {
0396   switch ( state ) {
0397     case RtemsRatemonReqGetStatus_Pre_Id_Valid: {
0398       /*
0399        * While the ``id`` parameter is valid.
0400        */
0401       ctx->id_param = ctx->period_id;
0402       break;
0403     }
0404 
0405     case RtemsRatemonReqGetStatus_Pre_Id_Invalid: {
0406       /*
0407        * While the ``id`` parameter is invalid.
0408        */
0409       ctx->id_param = RTEMS_ID_NONE;
0410       break;
0411     }
0412 
0413     case RtemsRatemonReqGetStatus_Pre_Id_NA:
0414       break;
0415   }
0416 }
0417 
0418 static void RtemsRatemonReqGetStatus_Pre_State_Prepare(
0419   RtemsRatemonReqGetStatus_Context  *ctx,
0420   RtemsRatemonReqGetStatus_Pre_State state
0421 )
0422 {
0423   switch ( state ) {
0424     case RtemsRatemonReqGetStatus_Pre_State_Inactive: {
0425       /*
0426        * While the ``id`` parameter references an period object in inactive
0427        * state.
0428        */
0429       /* Nothing to do here as the period is newly created. */
0430       ctx->previous_state = RATE_MONOTONIC_INACTIVE;
0431       break;
0432     }
0433 
0434     case RtemsRatemonReqGetStatus_Pre_State_Active: {
0435       /*
0436        * While the ``id`` parameter references an period object in active
0437        * state.
0438        */
0439       rtems_status_code status;
0440       status = rtems_rate_monotonic_period( ctx->period_id, period_length );
0441       T_rsc_success( status );
0442       ctx->previous_state = RATE_MONOTONIC_ACTIVE;
0443       break;
0444     }
0445 
0446     case RtemsRatemonReqGetStatus_Pre_State_Expired: {
0447       /*
0448        * While the ``id`` parameter references an period object in expired
0449        * state.
0450        */
0451       rtems_status_code status;
0452       status = rtems_rate_monotonic_period( ctx->period_id, period_length );
0453       T_rsc_success( status );
0454       ctx->previous_state = RATE_MONOTONIC_EXPIRED;
0455       break;
0456     }
0457 
0458     case RtemsRatemonReqGetStatus_Pre_State_NA:
0459       break;
0460   }
0461 }
0462 
0463 static void RtemsRatemonReqGetStatus_Pre_Elapsed_Prepare(
0464   RtemsRatemonReqGetStatus_Context    *ctx,
0465   RtemsRatemonReqGetStatus_Pre_Elapsed state
0466 )
0467 {
0468   switch ( state ) {
0469     case RtemsRatemonReqGetStatus_Pre_Elapsed_Time: {
0470       /*
0471        * While a certain time of the CLOCK_MONOTONIC has elapsed.
0472        */
0473       /* Time elapsed while having a CPU is added below in "CpuTime". */
0474       break;
0475     }
0476 
0477     case RtemsRatemonReqGetStatus_Pre_Elapsed_NA:
0478       break;
0479   }
0480 }
0481 
0482 static void RtemsRatemonReqGetStatus_Pre_Consumed_Prepare(
0483   RtemsRatemonReqGetStatus_Context     *ctx,
0484   RtemsRatemonReqGetStatus_Pre_Consumed state
0485 )
0486 {
0487   switch ( state ) {
0488     case RtemsRatemonReqGetStatus_Pre_Consumed_CpuTime: {
0489       /*
0490        * While the owner task has consumed a certain amount of CPU time.
0491        */
0492       TickTheClock( ctx, elapsed_cpu_ticks );
0493       ctx->consumed.tv_nsec +=
0494         rtems_configuration_get_nanoseconds_per_tick() * elapsed_cpu_ticks;
0495       break;
0496     }
0497 
0498     case RtemsRatemonReqGetStatus_Pre_Consumed_NA:
0499       break;
0500   }
0501 }
0502 
0503 static void RtemsRatemonReqGetStatus_Pre_Postponed_Prepare(
0504   RtemsRatemonReqGetStatus_Context      *ctx,
0505   RtemsRatemonReqGetStatus_Pre_Postponed state
0506 )
0507 {
0508   switch ( state ) {
0509     case RtemsRatemonReqGetStatus_Pre_Postponed_Zero: {
0510       /*
0511        * While the period is not in expired state.
0512        */
0513       ctx->postponed_jobs_count = 0;
0514       break;
0515     }
0516 
0517     case RtemsRatemonReqGetStatus_Pre_Postponed_One: {
0518       /*
0519        * While there is one postponed job.
0520        */
0521       CreatePostponedJobs( ctx, 1 );
0522       break;
0523     }
0524 
0525     case RtemsRatemonReqGetStatus_Pre_Postponed_Several: {
0526       /*
0527        * While there are two or more postponed job.
0528        */
0529       CreatePostponedJobs( ctx, 5 );
0530       break;
0531     }
0532 
0533     case RtemsRatemonReqGetStatus_Pre_Postponed_NA:
0534       break;
0535   }
0536 }
0537 
0538 static void RtemsRatemonReqGetStatus_Post_Status_Check(
0539   RtemsRatemonReqGetStatus_Context    *ctx,
0540   RtemsRatemonReqGetStatus_Post_Status state
0541 )
0542 {
0543   switch ( state ) {
0544     case RtemsRatemonReqGetStatus_Post_Status_Ok: {
0545       /*
0546        * The return status of rtems_rate_monotonic_get_status() shall be
0547        * RTEMS_SUCCESSFUL
0548        */
0549       T_rsc_success( ctx->status );
0550       break;
0551     }
0552 
0553     case RtemsRatemonReqGetStatus_Post_Status_InvAddr: {
0554       /*
0555        * The return status of rtems_rate_monotonic_get_status() shall be
0556        * RTEMS_INVALID_ADDRESS.
0557        */
0558       T_rsc( ctx->status, RTEMS_INVALID_ADDRESS );
0559       break;
0560     }
0561 
0562     case RtemsRatemonReqGetStatus_Post_Status_InvId: {
0563       /*
0564        * The return status of rtems_rate_monotonic_get_status() shall be
0565        * RTEMS_INVALID_ID.
0566        */
0567       T_rsc( ctx->status, RTEMS_INVALID_ID );
0568       break;
0569     }
0570 
0571     case RtemsRatemonReqGetStatus_Post_Status_NA:
0572       break;
0573   }
0574 }
0575 
0576 static void RtemsRatemonReqGetStatus_Post_Owner_Check(
0577   RtemsRatemonReqGetStatus_Context   *ctx,
0578   RtemsRatemonReqGetStatus_Post_Owner state
0579 )
0580 {
0581   switch ( state ) {
0582     case RtemsRatemonReqGetStatus_Post_Owner_OwnerTask: {
0583       /*
0584        * The value of the member owner of the object referenced by the
0585        * ``status`` parameter shall be set to the object identifier of the
0586        * owner task of the period after the return of the
0587        * rtems_rate_monotonic_get_status() call.
0588        */
0589       T_eq_u32( ctx->period_status.owner, ctx->task_id );
0590       break;
0591     }
0592 
0593     case RtemsRatemonReqGetStatus_Post_Owner_Nop: {
0594       /*
0595        * Objects referenced by the ``status`` parameter in past call to
0596        * rtems_rate_monotonic_get_status() shall not be accessed by the
0597        * rtems_rate_monotonic_get_status() call (see also Nop).
0598        */
0599       T_eq_u32( ctx->period_status.owner, initial_owner );
0600       break;
0601     }
0602 
0603     case RtemsRatemonReqGetStatus_Post_Owner_NA:
0604       break;
0605   }
0606 }
0607 
0608 static void RtemsRatemonReqGetStatus_Post_State_Check(
0609   RtemsRatemonReqGetStatus_Context   *ctx,
0610   RtemsRatemonReqGetStatus_Post_State state
0611 )
0612 {
0613   switch ( state ) {
0614     case RtemsRatemonReqGetStatus_Post_State_Inactive: {
0615       /*
0616        * The value of the member state of the object referenced by the
0617        * ``status`` parameter shall be set to RATE_MONOTONIC_INACTIVE after the
0618        * return of the rtems_rate_monotonic_get_status() call. (See also
0619        * inactive)
0620        */
0621       T_eq_int( ctx->period_status.state, RATE_MONOTONIC_INACTIVE );
0622       break;
0623     }
0624 
0625     case RtemsRatemonReqGetStatus_Post_State_Active: {
0626       /*
0627        * The value of the member state of the object referenced by the
0628        * ``status`` parameter shall be set to RATE_MONOTONIC_ACTIVE after the
0629        * return of the rtems_rate_monotonic_get_status() call. (See also
0630        * active)
0631        */
0632       T_eq_int( ctx->period_status.state, RATE_MONOTONIC_ACTIVE );
0633       break;
0634     }
0635 
0636     case RtemsRatemonReqGetStatus_Post_State_Expired: {
0637       /*
0638        * The value of the member state of the object referenced by the
0639        * ``status`` parameter shall be set to RATE_MONOTONIC_EXPIRED after the
0640        * return of the rtems_rate_monotonic_get_status() call. (See also
0641        * expired)
0642        */
0643       T_eq_int( ctx->period_status.state, RATE_MONOTONIC_EXPIRED );
0644       break;
0645     }
0646 
0647     case RtemsRatemonReqGetStatus_Post_State_Nop: {
0648       /*
0649        * Objects referenced by the ``status`` parameter in past calls to
0650        * rtems_rate_monotonic_get_status() shall not be accessed by the
0651        * rtems_rate_monotonic_get_status() call (see also Nop).
0652        */
0653       T_eq_u32( ctx->period_status.state, initial_state );
0654       break;
0655     }
0656 
0657     case RtemsRatemonReqGetStatus_Post_State_NA:
0658       break;
0659   }
0660 }
0661 
0662 static void RtemsRatemonReqGetStatus_Post_Elapsed_Check(
0663   RtemsRatemonReqGetStatus_Context     *ctx,
0664   RtemsRatemonReqGetStatus_Post_Elapsed state
0665 )
0666 {
0667   switch ( state ) {
0668     case RtemsRatemonReqGetStatus_Post_Elapsed_Time: {
0669       /*
0670        * The value of the member since_last_period of the object referenced by
0671        * the ``status`` parameter shall be set to the time elapsed.
0672        */
0673       T_log( T_VERBOSE, "Elapsed: %lld.%ld (expected: %lld.%ld)",
0674         ctx->period_status.since_last_period.tv_sec,
0675         ctx->period_status.since_last_period.tv_nsec,
0676         ctx->elapsed.tv_sec,
0677         ctx->elapsed.tv_nsec
0678       );
0679       T_eq_u64(
0680         ctx->period_status.since_last_period.tv_sec,
0681         ctx->elapsed.tv_sec
0682       );
0683       /* period_status integer arithmetic is plagued by a rounding error. */
0684       T_le_long(
0685         ctx->period_status.since_last_period.tv_nsec,
0686         ctx->elapsed.tv_nsec + 1
0687       );
0688       T_ge_long(
0689         ctx->period_status.since_last_period.tv_nsec,
0690         ctx->elapsed.tv_nsec - 1
0691       );
0692       break;
0693     }
0694 
0695     case RtemsRatemonReqGetStatus_Post_Elapsed_Zero: {
0696       /*
0697        * The value of the member since_last_period of the object referenced by
0698        * the ``status`` parameter shall be set to 0.
0699        */
0700       T_eq_u64( ctx->period_status.since_last_period.tv_sec,   0 );
0701       T_eq_long( ctx->period_status.since_last_period.tv_nsec, 0 );
0702       break;
0703     }
0704 
0705     case RtemsRatemonReqGetStatus_Post_Elapsed_Nop: {
0706       /*
0707        * Objects referenced by the ``status`` parameter in past calls to
0708        * rtems_rate_monotonic_get_status() shall not be accessed by the
0709        * rtems_rate_monotonic_get_status() call (see also Nop).
0710        */
0711       T_eq_u64(
0712         ctx->period_status.since_last_period.tv_sec,
0713         initial_period.tv_sec
0714       );
0715       T_eq_long(
0716         ctx->period_status.since_last_period.tv_nsec,
0717         initial_period.tv_nsec
0718       );
0719       break;
0720     }
0721 
0722     case RtemsRatemonReqGetStatus_Post_Elapsed_NA:
0723       break;
0724   }
0725 }
0726 
0727 static void RtemsRatemonReqGetStatus_Post_Consumed_Check(
0728   RtemsRatemonReqGetStatus_Context      *ctx,
0729   RtemsRatemonReqGetStatus_Post_Consumed state
0730 )
0731 {
0732   switch ( state ) {
0733     case RtemsRatemonReqGetStatus_Post_Consumed_CpuTime: {
0734       /*
0735        * The value of the member executed_since_last_period of the object
0736        * referenced by the ``status`` parameter shall be set to the CPU time
0737        * consumed by the owner task.
0738        */
0739       T_log( T_VERBOSE, "CPU elapsed: %lld.%ld (expected: %lld.%ld)",
0740         ctx->period_status.executed_since_last_period.tv_sec,
0741         ctx->period_status.executed_since_last_period.tv_nsec,
0742         ctx->consumed.tv_sec,
0743         ctx->consumed.tv_nsec
0744       );
0745       T_eq_u64(
0746         ctx->period_status.executed_since_last_period.tv_sec,
0747         ctx->consumed.tv_sec
0748       );
0749       /* period_status integer arithmetic is plagued by a rounding error. */
0750       T_le_long(
0751         ctx->period_status.executed_since_last_period.tv_nsec,
0752         ctx->consumed.tv_nsec + 1
0753       );
0754       T_ge_long(
0755         ctx->period_status.executed_since_last_period.tv_nsec,
0756         ctx->consumed.tv_nsec - 1
0757       );
0758       break;
0759     }
0760 
0761     case RtemsRatemonReqGetStatus_Post_Consumed_Zero: {
0762       /*
0763        * The value of the member since_last_period of the object referenced by
0764        * the ``status`` parameter shall be set to 0.
0765        */
0766       T_eq_u64( ctx->period_status.executed_since_last_period.tv_sec,   0 );
0767       T_eq_long( ctx->period_status.executed_since_last_period.tv_nsec, 0 );
0768       break;
0769     }
0770 
0771     case RtemsRatemonReqGetStatus_Post_Consumed_Nop: {
0772       /*
0773        * Objects referenced by the ``status`` parameter in past calls to
0774        * rtems_rate_monotonic_get_status() shall not be accessed by the
0775        * rtems_rate_monotonic_get_status() call (see also Nop).
0776        */
0777       T_eq_u64(
0778         ctx->period_status.executed_since_last_period.tv_sec,
0779         initial_period.tv_sec
0780       );
0781       T_eq_long(
0782         ctx->period_status.executed_since_last_period.tv_nsec,
0783         initial_period.tv_nsec
0784       );
0785       break;
0786     }
0787 
0788     case RtemsRatemonReqGetStatus_Post_Consumed_NA:
0789       break;
0790   }
0791 }
0792 
0793 static void RtemsRatemonReqGetStatus_Post_Postponed_Check(
0794   RtemsRatemonReqGetStatus_Context       *ctx,
0795   RtemsRatemonReqGetStatus_Post_Postponed state
0796 )
0797 {
0798   switch ( state ) {
0799     case RtemsRatemonReqGetStatus_Post_Postponed_Zero: {
0800       /*
0801        * The value of the member postponed_jobs_count of the object referenced
0802        * by the ``status`` parameter shall be set to 0 after the return of the
0803        * rtems_rate_monotonic_get_status() call.
0804        */
0805       T_eq_u32( ctx->period_status.postponed_jobs_count, 0 );
0806       break;
0807     }
0808 
0809     case RtemsRatemonReqGetStatus_Post_Postponed_One: {
0810       /*
0811        * The value of the member postponed_jobs_count of the object referenced
0812        * by the ``status`` parameter shall be set to the number of postponed
0813        * jobs (here 1) after the return of the
0814        * rtems_rate_monotonic_get_status() call.
0815        */
0816       T_eq_u32( ctx->period_status.postponed_jobs_count, 1 );
0817       break;
0818     }
0819 
0820     case RtemsRatemonReqGetStatus_Post_Postponed_Several: {
0821       /*
0822        * The value of the member postponed_jobs_count of the object referenced
0823        * by the ``status`` parameter shall be set to the number of postponed
0824        * jobs after the return of the rtems_rate_monotonic_get_status() call.
0825        */
0826       T_eq_u32(
0827         ctx->period_status.postponed_jobs_count,
0828         ctx->postponed_jobs_count
0829       );
0830       break;
0831     }
0832 
0833     case RtemsRatemonReqGetStatus_Post_Postponed_Nop: {
0834       /*
0835        * Objects referenced by the ``status`` parameter in past calls to
0836        * rtems_rate_monotonic_get_status() shall not be accessed by the
0837        * rtems_rate_monotonic_get_status() call (see also Nop).
0838        */
0839       T_eq_u32( ctx->period_status.postponed_jobs_count,
0840         initial_postponed_jobs_count );
0841       break;
0842     }
0843 
0844     case RtemsRatemonReqGetStatus_Post_Postponed_NA:
0845       break;
0846   }
0847 }
0848 
0849 static void RtemsRatemonReqGetStatus_Setup(
0850   RtemsRatemonReqGetStatus_Context *ctx
0851 )
0852 {
0853   ctx->previous_timecounter_handler = SetGetTimecountHandler( FreezeTime );
0854   ctx->task_id = rtems_task_self();
0855 }
0856 
0857 static void RtemsRatemonReqGetStatus_Setup_Wrap( void *arg )
0858 {
0859   RtemsRatemonReqGetStatus_Context *ctx;
0860 
0861   ctx = arg;
0862   ctx->Map.in_action_loop = false;
0863   RtemsRatemonReqGetStatus_Setup( ctx );
0864 }
0865 
0866 static void RtemsRatemonReqGetStatus_Teardown(
0867   RtemsRatemonReqGetStatus_Context *ctx
0868 )
0869 {
0870   SetGetTimecountHandler( ctx->previous_timecounter_handler );
0871 }
0872 
0873 static void RtemsRatemonReqGetStatus_Teardown_Wrap( void *arg )
0874 {
0875   RtemsRatemonReqGetStatus_Context *ctx;
0876 
0877   ctx = arg;
0878   ctx->Map.in_action_loop = false;
0879   RtemsRatemonReqGetStatus_Teardown( ctx );
0880 }
0881 
0882 static void RtemsRatemonReqGetStatus_Prepare(
0883   RtemsRatemonReqGetStatus_Context *ctx
0884 )
0885 {
0886   rtems_status_code status;
0887   status =  rtems_rate_monotonic_create(
0888     rtems_build_name( 'R', 'M', 'O', 'N' ),
0889     &ctx->period_id
0890   );
0891   T_rsc_success( status );
0892 
0893   ctx->period_status = (rtems_rate_monotonic_period_status) {
0894     .owner = initial_owner,
0895     .state = initial_state,
0896     .since_last_period = initial_period,
0897     .executed_since_last_period = initial_period,
0898     .postponed_jobs_count = initial_postponed_jobs_count
0899   };
0900 
0901   ctx->elapsed.tv_sec  = 0;
0902   ctx->elapsed.tv_nsec = 0;
0903   ctx->consumed.tv_sec  = 0;
0904   ctx->consumed.tv_nsec = 0;
0905   ctx->postponed_jobs_count = 0;
0906   TimecounterTick();
0907 }
0908 
0909 static void RtemsRatemonReqGetStatus_Action(
0910   RtemsRatemonReqGetStatus_Context *ctx
0911 )
0912 {
0913   if ( ctx->do_reset != NULL ) {
0914       ctx->do_reset();
0915   }
0916   ctx->status = rtems_rate_monotonic_get_status(
0917     ctx->id_param,
0918     ctx->status_param
0919   );
0920 }
0921 
0922 static void RtemsRatemonReqGetStatus_Cleanup(
0923   RtemsRatemonReqGetStatus_Context *ctx
0924 )
0925 {
0926   T_rsc_success( rtems_rate_monotonic_delete( ctx->period_id ) );
0927 }
0928 
0929 static const RtemsRatemonReqGetStatus_Entry
0930 RtemsRatemonReqGetStatus_Entries[] = {
0931   { 0, 0, 0, 0, 0, 0, 0, RtemsRatemonReqGetStatus_Post_Status_InvAddr,
0932     RtemsRatemonReqGetStatus_Post_Owner_Nop,
0933     RtemsRatemonReqGetStatus_Post_State_Nop,
0934     RtemsRatemonReqGetStatus_Post_Elapsed_Nop,
0935     RtemsRatemonReqGetStatus_Post_Consumed_Nop,
0936     RtemsRatemonReqGetStatus_Post_Postponed_Nop },
0937   { 1, 0, 0, 0, 0, 0, 0, RtemsRatemonReqGetStatus_Post_Status_NA,
0938     RtemsRatemonReqGetStatus_Post_Owner_NA,
0939     RtemsRatemonReqGetStatus_Post_State_NA,
0940     RtemsRatemonReqGetStatus_Post_Elapsed_NA,
0941     RtemsRatemonReqGetStatus_Post_Consumed_NA,
0942     RtemsRatemonReqGetStatus_Post_Postponed_NA },
0943   { 0, 0, 0, 0, 0, 0, 0, RtemsRatemonReqGetStatus_Post_Status_InvId,
0944     RtemsRatemonReqGetStatus_Post_Owner_Nop,
0945     RtemsRatemonReqGetStatus_Post_State_Nop,
0946     RtemsRatemonReqGetStatus_Post_Elapsed_Nop,
0947     RtemsRatemonReqGetStatus_Post_Consumed_Nop,
0948     RtemsRatemonReqGetStatus_Post_Postponed_Nop },
0949   { 1, 0, 0, 0, 0, 0, 0, RtemsRatemonReqGetStatus_Post_Status_NA,
0950     RtemsRatemonReqGetStatus_Post_Owner_NA,
0951     RtemsRatemonReqGetStatus_Post_State_NA,
0952     RtemsRatemonReqGetStatus_Post_Elapsed_NA,
0953     RtemsRatemonReqGetStatus_Post_Consumed_NA,
0954     RtemsRatemonReqGetStatus_Post_Postponed_NA },
0955   { 0, 0, 0, 0, 0, 0, 1, RtemsRatemonReqGetStatus_Post_Status_InvAddr,
0956     RtemsRatemonReqGetStatus_Post_Owner_Nop,
0957     RtemsRatemonReqGetStatus_Post_State_Nop,
0958     RtemsRatemonReqGetStatus_Post_Elapsed_Nop,
0959     RtemsRatemonReqGetStatus_Post_Consumed_Nop,
0960     RtemsRatemonReqGetStatus_Post_Postponed_Nop },
0961   { 0, 0, 0, 0, 1, 1, 1, RtemsRatemonReqGetStatus_Post_Status_Ok,
0962     RtemsRatemonReqGetStatus_Post_Owner_OwnerTask,
0963     RtemsRatemonReqGetStatus_Post_State_Inactive,
0964     RtemsRatemonReqGetStatus_Post_Elapsed_Zero,
0965     RtemsRatemonReqGetStatus_Post_Consumed_Zero,
0966     RtemsRatemonReqGetStatus_Post_Postponed_NA },
0967   { 0, 0, 0, 0, 0, 0, 0, RtemsRatemonReqGetStatus_Post_Status_Ok,
0968     RtemsRatemonReqGetStatus_Post_Owner_OwnerTask,
0969     RtemsRatemonReqGetStatus_Post_State_Active,
0970     RtemsRatemonReqGetStatus_Post_Elapsed_Time,
0971     RtemsRatemonReqGetStatus_Post_Consumed_CpuTime,
0972     RtemsRatemonReqGetStatus_Post_Postponed_Zero },
0973   { 0, 0, 0, 0, 0, 0, 0, RtemsRatemonReqGetStatus_Post_Status_Ok,
0974     RtemsRatemonReqGetStatus_Post_Owner_OwnerTask,
0975     RtemsRatemonReqGetStatus_Post_State_Active,
0976     RtemsRatemonReqGetStatus_Post_Elapsed_Time,
0977     RtemsRatemonReqGetStatus_Post_Consumed_CpuTime,
0978     RtemsRatemonReqGetStatus_Post_Postponed_One },
0979   { 0, 0, 0, 0, 0, 0, 0, RtemsRatemonReqGetStatus_Post_Status_Ok,
0980     RtemsRatemonReqGetStatus_Post_Owner_OwnerTask,
0981     RtemsRatemonReqGetStatus_Post_State_Active,
0982     RtemsRatemonReqGetStatus_Post_Elapsed_Time,
0983     RtemsRatemonReqGetStatus_Post_Consumed_CpuTime,
0984     RtemsRatemonReqGetStatus_Post_Postponed_Several },
0985   { 0, 0, 0, 0, 0, 0, 0, RtemsRatemonReqGetStatus_Post_Status_Ok,
0986     RtemsRatemonReqGetStatus_Post_Owner_OwnerTask,
0987     RtemsRatemonReqGetStatus_Post_State_Expired,
0988     RtemsRatemonReqGetStatus_Post_Elapsed_Time,
0989     RtemsRatemonReqGetStatus_Post_Consumed_CpuTime,
0990     RtemsRatemonReqGetStatus_Post_Postponed_One },
0991   { 0, 0, 0, 0, 0, 0, 0, RtemsRatemonReqGetStatus_Post_Status_Ok,
0992     RtemsRatemonReqGetStatus_Post_Owner_OwnerTask,
0993     RtemsRatemonReqGetStatus_Post_State_Expired,
0994     RtemsRatemonReqGetStatus_Post_Elapsed_Time,
0995     RtemsRatemonReqGetStatus_Post_Consumed_CpuTime,
0996     RtemsRatemonReqGetStatus_Post_Postponed_Several },
0997   { 0, 0, 0, 0, 0, 0, 1, RtemsRatemonReqGetStatus_Post_Status_InvId,
0998     RtemsRatemonReqGetStatus_Post_Owner_Nop,
0999     RtemsRatemonReqGetStatus_Post_State_Nop,
1000     RtemsRatemonReqGetStatus_Post_Elapsed_Nop,
1001     RtemsRatemonReqGetStatus_Post_Consumed_Nop,
1002     RtemsRatemonReqGetStatus_Post_Postponed_Nop }
1003 };
1004 
1005 static const uint8_t
1006 RtemsRatemonReqGetStatus_Map[] = {
1007   5, 1, 1, 6, 7, 8, 3, 9, 10, 11, 1, 1, 2, 2, 2, 3, 2, 2, 4, 1, 1, 0, 0, 0, 3,
1008   0, 0, 4, 1, 1, 0, 0, 0, 3, 0, 0
1009 };
1010 
1011 static size_t RtemsRatemonReqGetStatus_Scope( void *arg, char *buf, size_t n )
1012 {
1013   RtemsRatemonReqGetStatus_Context *ctx;
1014 
1015   ctx = arg;
1016 
1017   if ( ctx->Map.in_action_loop ) {
1018     return T_get_scope(
1019       RtemsRatemonReqGetStatus_PreDesc,
1020       buf,
1021       n,
1022       ctx->Map.pcs
1023     );
1024   }
1025 
1026   return 0;
1027 }
1028 
1029 static T_fixture RtemsRatemonReqGetStatus_Fixture = {
1030   .setup = RtemsRatemonReqGetStatus_Setup_Wrap,
1031   .stop = NULL,
1032   .teardown = RtemsRatemonReqGetStatus_Teardown_Wrap,
1033   .scope = RtemsRatemonReqGetStatus_Scope,
1034   .initial_context = &RtemsRatemonReqGetStatus_Instance
1035 };
1036 
1037 static inline RtemsRatemonReqGetStatus_Entry RtemsRatemonReqGetStatus_PopEntry(
1038   RtemsRatemonReqGetStatus_Context *ctx
1039 )
1040 {
1041   size_t index;
1042 
1043   index = ctx->Map.index;
1044   ctx->Map.index = index + 1;
1045   return RtemsRatemonReqGetStatus_Entries[
1046     RtemsRatemonReqGetStatus_Map[ index ]
1047   ];
1048 }
1049 
1050 static void RtemsRatemonReqGetStatus_SetPreConditionStates(
1051   RtemsRatemonReqGetStatus_Context *ctx
1052 )
1053 {
1054   ctx->Map.pcs[ 0 ] = ctx->Map.pci[ 0 ];
1055   ctx->Map.pcs[ 1 ] = ctx->Map.pci[ 1 ];
1056   ctx->Map.pcs[ 2 ] = ctx->Map.pci[ 2 ];
1057 
1058   if ( ctx->Map.entry.Pre_Elapsed_NA ) {
1059     ctx->Map.pcs[ 3 ] = RtemsRatemonReqGetStatus_Pre_Elapsed_NA;
1060   } else {
1061     ctx->Map.pcs[ 3 ] = ctx->Map.pci[ 3 ];
1062   }
1063 
1064   if ( ctx->Map.entry.Pre_Consumed_NA ) {
1065     ctx->Map.pcs[ 4 ] = RtemsRatemonReqGetStatus_Pre_Consumed_NA;
1066   } else {
1067     ctx->Map.pcs[ 4 ] = ctx->Map.pci[ 4 ];
1068   }
1069 
1070   if ( ctx->Map.entry.Pre_Postponed_NA ) {
1071     ctx->Map.pcs[ 5 ] = RtemsRatemonReqGetStatus_Pre_Postponed_NA;
1072   } else {
1073     ctx->Map.pcs[ 5 ] = ctx->Map.pci[ 5 ];
1074   }
1075 }
1076 
1077 static void RtemsRatemonReqGetStatus_TestVariant(
1078   RtemsRatemonReqGetStatus_Context *ctx
1079 )
1080 {
1081   RtemsRatemonReqGetStatus_Pre_StatusAddr_Prepare( ctx, ctx->Map.pcs[ 0 ] );
1082   RtemsRatemonReqGetStatus_Pre_Id_Prepare( ctx, ctx->Map.pcs[ 1 ] );
1083   RtemsRatemonReqGetStatus_Pre_State_Prepare( ctx, ctx->Map.pcs[ 2 ] );
1084   RtemsRatemonReqGetStatus_Pre_Elapsed_Prepare( ctx, ctx->Map.pcs[ 3 ] );
1085   RtemsRatemonReqGetStatus_Pre_Consumed_Prepare( ctx, ctx->Map.pcs[ 4 ] );
1086   RtemsRatemonReqGetStatus_Pre_Postponed_Prepare( ctx, ctx->Map.pcs[ 5 ] );
1087   RtemsRatemonReqGetStatus_Action( ctx );
1088   RtemsRatemonReqGetStatus_Post_Status_Check(
1089     ctx,
1090     ctx->Map.entry.Post_Status
1091   );
1092   RtemsRatemonReqGetStatus_Post_Owner_Check( ctx, ctx->Map.entry.Post_Owner );
1093   RtemsRatemonReqGetStatus_Post_State_Check( ctx, ctx->Map.entry.Post_State );
1094   RtemsRatemonReqGetStatus_Post_Elapsed_Check(
1095     ctx,
1096     ctx->Map.entry.Post_Elapsed
1097   );
1098   RtemsRatemonReqGetStatus_Post_Consumed_Check(
1099     ctx,
1100     ctx->Map.entry.Post_Consumed
1101   );
1102   RtemsRatemonReqGetStatus_Post_Postponed_Check(
1103     ctx,
1104     ctx->Map.entry.Post_Postponed
1105   );
1106 }
1107 
1108 /**
1109  * @fn void T_case_body_RtemsRatemonReqGetStatus( void )
1110  */
1111 T_TEST_CASE_FIXTURE(
1112   RtemsRatemonReqGetStatus,
1113   &RtemsRatemonReqGetStatus_Fixture
1114 )
1115 {
1116   RtemsRatemonReqGetStatus_Context *ctx;
1117 
1118   ctx = T_fixture_context();
1119   ctx->Map.in_action_loop = true;
1120   ctx->Map.index = 0;
1121 
1122   for (
1123     ctx->Map.pci[ 0 ] = RtemsRatemonReqGetStatus_Pre_StatusAddr_Valid;
1124     ctx->Map.pci[ 0 ] < RtemsRatemonReqGetStatus_Pre_StatusAddr_NA;
1125     ++ctx->Map.pci[ 0 ]
1126   ) {
1127     for (
1128       ctx->Map.pci[ 1 ] = RtemsRatemonReqGetStatus_Pre_Id_Valid;
1129       ctx->Map.pci[ 1 ] < RtemsRatemonReqGetStatus_Pre_Id_NA;
1130       ++ctx->Map.pci[ 1 ]
1131     ) {
1132       for (
1133         ctx->Map.pci[ 2 ] = RtemsRatemonReqGetStatus_Pre_State_Inactive;
1134         ctx->Map.pci[ 2 ] < RtemsRatemonReqGetStatus_Pre_State_NA;
1135         ++ctx->Map.pci[ 2 ]
1136       ) {
1137         for (
1138           ctx->Map.pci[ 3 ] = RtemsRatemonReqGetStatus_Pre_Elapsed_Time;
1139           ctx->Map.pci[ 3 ] < RtemsRatemonReqGetStatus_Pre_Elapsed_NA;
1140           ++ctx->Map.pci[ 3 ]
1141         ) {
1142           for (
1143             ctx->Map.pci[ 4 ] = RtemsRatemonReqGetStatus_Pre_Consumed_CpuTime;
1144             ctx->Map.pci[ 4 ] < RtemsRatemonReqGetStatus_Pre_Consumed_NA;
1145             ++ctx->Map.pci[ 4 ]
1146           ) {
1147             for (
1148               ctx->Map.pci[ 5 ] = RtemsRatemonReqGetStatus_Pre_Postponed_Zero;
1149               ctx->Map.pci[ 5 ] < RtemsRatemonReqGetStatus_Pre_Postponed_NA;
1150               ++ctx->Map.pci[ 5 ]
1151             ) {
1152               ctx->Map.entry = RtemsRatemonReqGetStatus_PopEntry( ctx );
1153 
1154               if ( ctx->Map.entry.Skip ) {
1155                 continue;
1156               }
1157 
1158               RtemsRatemonReqGetStatus_SetPreConditionStates( ctx );
1159               RtemsRatemonReqGetStatus_Prepare( ctx );
1160               RtemsRatemonReqGetStatus_TestVariant( ctx );
1161               RtemsRatemonReqGetStatus_Cleanup( ctx );
1162             }
1163           }
1164         }
1165       }
1166     }
1167   }
1168 }
1169 
1170 /** @} */