Changeset e76470df in rtems


Ignore:
Timestamp:
Mar 8, 2021, 9:49:51 AM (6 weeks ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
3246fa42
Parents:
1ce127e
git-author:
Sebastian Huber <sebastian.huber@…> (03/08/21 09:49:51)
git-committer:
Sebastian Huber <sebastian.huber@…> (03/08/21 10:04:55)
Message:

validation: Use common wording

Location:
testsuites/validation
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • testsuites/validation/tc-barrier-delete.c

    r1ce127e re76470df  
    6767
    6868typedef enum {
    69   RtemsBarrierReqDelete_Pre_Id_Valid,
    70   RtemsBarrierReqDelete_Pre_Id_Invalid,
     69  RtemsBarrierReqDelete_Pre_Id_NoObj,
     70  RtemsBarrierReqDelete_Pre_Id_Barrier,
    7171  RtemsBarrierReqDelete_Pre_Id_NA
    7272} RtemsBarrierReqDelete_Pre_Id;
     
    7979
    8080typedef enum {
    81   RtemsBarrierReqDelete_Post_Id_Valid,
    82   RtemsBarrierReqDelete_Post_Id_Invalid,
    83   RtemsBarrierReqDelete_Post_Id_NA
    84 } RtemsBarrierReqDelete_Post_Id;
     81  RtemsBarrierReqDelete_Post_Name_Valid,
     82  RtemsBarrierReqDelete_Post_Name_Invalid,
     83  RtemsBarrierReqDelete_Post_Name_NA
     84} RtemsBarrierReqDelete_Post_Name;
    8585
    8686typedef enum {
     
    122122
    123123static const char * const RtemsBarrierReqDelete_PreDesc_Id[] = {
    124   "Valid",
    125   "Invalid",
     124  "NoObj",
     125  "Barrier",
    126126  "NA"
    127127};
     
    183183{
    184184  switch ( state ) {
    185     case RtemsBarrierReqDelete_Pre_Id_Valid: {
    186       /*
    187        * The ``id`` parameter shall be associated with the barrier.
     185    case RtemsBarrierReqDelete_Pre_Id_NoObj: {
     186      /*
     187       * The ``id`` parameter shall not be associated with a barrier.
     188       */
     189      ctx->id = 0;
     190      break;
     191    }
     192
     193    case RtemsBarrierReqDelete_Pre_Id_Barrier: {
     194      /*
     195       * The ``id`` parameter shall be associated with a barrier.
    188196       */
    189197      ctx->id = ctx->barrier_id;
    190       break;
    191     }
    192 
    193     case RtemsBarrierReqDelete_Pre_Id_Invalid: {
    194       /*
    195        * The ``id`` parameter shall be invalid.
    196        */
    197       ctx->id = 0;
    198198      break;
    199199    }
     
    232232}
    233233
    234 static void RtemsBarrierReqDelete_Post_Id_Check(
    235   RtemsBarrierReqDelete_Context *ctx,
    236   RtemsBarrierReqDelete_Post_Id state
     234static void RtemsBarrierReqDelete_Post_Name_Check(
     235  RtemsBarrierReqDelete_Context  *ctx,
     236  RtemsBarrierReqDelete_Post_Name state
    237237)
    238238{
     
    241241
    242242  switch ( state ) {
    243     case RtemsBarrierReqDelete_Post_Id_Valid: {
     243    case RtemsBarrierReqDelete_Post_Name_Valid: {
    244244      /*
    245245       * The unique object name shall identify the barrier.
     
    252252    }
    253253
    254     case RtemsBarrierReqDelete_Post_Id_Invalid: {
     254    case RtemsBarrierReqDelete_Post_Name_Invalid: {
    255255      /*
    256256       * The unique object name shall not identify the barrier.
     
    261261    }
    262262
    263     case RtemsBarrierReqDelete_Post_Id_NA:
     263    case RtemsBarrierReqDelete_Post_Name_NA:
    264264      break;
    265265  }
     
    379379static const uint8_t RtemsBarrierReqDelete_TransitionMap[][ 3 ] = {
    380380  {
     381    RtemsBarrierReqDelete_Post_Status_InvId,
     382    RtemsBarrierReqDelete_Post_Name_Valid,
     383    RtemsBarrierReqDelete_Post_Flush_No
     384  }, {
    381385    RtemsBarrierReqDelete_Post_Status_Ok,
    382     RtemsBarrierReqDelete_Post_Id_Invalid,
     386    RtemsBarrierReqDelete_Post_Name_Invalid,
    383387    RtemsBarrierReqDelete_Post_Flush_Yes
    384   }, {
    385     RtemsBarrierReqDelete_Post_Status_InvId,
    386     RtemsBarrierReqDelete_Post_Id_Valid,
    387     RtemsBarrierReqDelete_Post_Flush_No
    388388  }
    389389};
     
    423423    sc = rtems_barrier_delete( ctx->barrier_id );
    424424    T_rsc_success( sc );
     425
     426    ++ctx->wait_expected;
     427    T_eq_u32( ctx->wait_done, ctx->wait_expected );
     428
     429    ctx->barrier_id = 0;
    425430  }
    426431}
     
    439444
    440445  for (
    441     ctx->pcs[ 0 ] = RtemsBarrierReqDelete_Pre_Id_Valid;
     446    ctx->pcs[ 0 ] = RtemsBarrierReqDelete_Pre_Id_NoObj;
    442447    ctx->pcs[ 0 ] < RtemsBarrierReqDelete_Pre_Id_NA;
    443448    ++ctx->pcs[ 0 ]
     
    460465      RtemsBarrierReqDelete_TransitionMap[ index ][ 0 ]
    461466    );
    462     RtemsBarrierReqDelete_Post_Id_Check(
     467    RtemsBarrierReqDelete_Post_Name_Check(
    463468      ctx,
    464469      RtemsBarrierReqDelete_TransitionMap[ index ][ 1 ]
  • testsuites/validation/tc-barrier-release.c

    r1ce127e re76470df  
    6868
    6969typedef enum {
    70   RtemsBarrierReqRelease_Pre_Barrier_NoObj,
    71   RtemsBarrierReqRelease_Pre_Barrier_Manual,
    72   RtemsBarrierReqRelease_Pre_Barrier_Auto,
    73   RtemsBarrierReqRelease_Pre_Barrier_NA
    74 } RtemsBarrierReqRelease_Pre_Barrier;
     70  RtemsBarrierReqRelease_Pre_Id_NoObj,
     71  RtemsBarrierReqRelease_Pre_Id_Manual,
     72  RtemsBarrierReqRelease_Pre_Id_Auto,
     73  RtemsBarrierReqRelease_Pre_Id_NA
     74} RtemsBarrierReqRelease_Pre_Id;
    7575
    7676typedef enum {
     
    134134  RtemsBarrierReqRelease_Instance;
    135135
    136 static const char * const RtemsBarrierReqRelease_PreDesc_Barrier[] = {
     136static const char * const RtemsBarrierReqRelease_PreDesc_Id[] = {
    137137  "NoObj",
    138138  "Manual",
     
    154154
    155155static const char * const * const RtemsBarrierReqRelease_PreDesc[] = {
    156   RtemsBarrierReqRelease_PreDesc_Barrier,
     156  RtemsBarrierReqRelease_PreDesc_Id,
    157157  RtemsBarrierReqRelease_PreDesc_Released,
    158158  RtemsBarrierReqRelease_PreDesc_Waiting,
     
    207207}
    208208
    209 static void RtemsBarrierReqRelease_Pre_Barrier_Prepare(
    210   RtemsBarrierReqRelease_Context    *ctx,
    211   RtemsBarrierReqRelease_Pre_Barrier state
     209static void RtemsBarrierReqRelease_Pre_Id_Prepare(
     210  RtemsBarrierReqRelease_Context *ctx,
     211  RtemsBarrierReqRelease_Pre_Id  state
    212212)
    213213{
    214214  switch ( state ) {
    215     case RtemsBarrierReqRelease_Pre_Barrier_NoObj: {
    216       /*
    217        * The ``id`` parameter shall be invalid.
     215    case RtemsBarrierReqRelease_Pre_Id_NoObj: {
     216      /*
     217       * The ``id`` parameter shall not be associated with a barrier.
    218218       */
    219219      ctx->id = 0xffffffff;
     
    221221    }
    222222
    223     case RtemsBarrierReqRelease_Pre_Barrier_Manual: {
     223    case RtemsBarrierReqRelease_Pre_Id_Manual: {
    224224      /*
    225225       * The ``id`` parameter shall be associated with a manual release
     
    230230    }
    231231
    232     case RtemsBarrierReqRelease_Pre_Barrier_Auto: {
     232    case RtemsBarrierReqRelease_Pre_Id_Auto: {
    233233      /*
    234234       * The ``id`` parameter shall be associated with an automatic release
     
    239239    }
    240240
    241     case RtemsBarrierReqRelease_Pre_Barrier_NA:
     241    case RtemsBarrierReqRelease_Pre_Id_NA:
    242242      break;
    243243  }
     
    523523static const struct {
    524524  uint8_t Skip : 1;
    525   uint8_t Pre_Barrier_NA : 1;
     525  uint8_t Pre_Id_NA : 1;
    526526  uint8_t Pre_Released_NA : 1;
    527527  uint8_t Pre_Waiting_NA : 1;
     
    574574
    575575  for (
    576     ctx->pcs[ 0 ] = RtemsBarrierReqRelease_Pre_Barrier_NoObj;
    577     ctx->pcs[ 0 ] < RtemsBarrierReqRelease_Pre_Barrier_NA;
     576    ctx->pcs[ 0 ] = RtemsBarrierReqRelease_Pre_Id_NoObj;
     577    ctx->pcs[ 0 ] < RtemsBarrierReqRelease_Pre_Id_NA;
    578578    ++ctx->pcs[ 0 ]
    579579  ) {
    580     if ( RtemsBarrierReqRelease_TransitionInfo[ index ].Pre_Barrier_NA ) {
    581       ctx->pcs[ 0 ] = RtemsBarrierReqRelease_Pre_Barrier_NA;
    582       index += ( RtemsBarrierReqRelease_Pre_Barrier_NA - 1 )
     580    if ( RtemsBarrierReqRelease_TransitionInfo[ index ].Pre_Id_NA ) {
     581      ctx->pcs[ 0 ] = RtemsBarrierReqRelease_Pre_Id_NA;
     582      index += ( RtemsBarrierReqRelease_Pre_Id_NA - 1 )
    583583        * RtemsBarrierReqRelease_Pre_Released_NA
    584584        * RtemsBarrierReqRelease_Pre_Waiting_NA;
     
    611611        }
    612612
    613         RtemsBarrierReqRelease_Pre_Barrier_Prepare( ctx, ctx->pcs[ 0 ] );
     613        RtemsBarrierReqRelease_Pre_Id_Prepare( ctx, ctx->pcs[ 0 ] );
    614614        RtemsBarrierReqRelease_Pre_Released_Prepare( ctx, ctx->pcs[ 1 ] );
    615615        RtemsBarrierReqRelease_Pre_Waiting_Prepare( ctx, ctx->pcs[ 2 ] );
  • testsuites/validation/tc-barrier-wait.c

    r1ce127e re76470df  
    6767
    6868typedef enum {
    69   RtemsBarrierReqWait_Pre_Barrier_NoObj,
    70   RtemsBarrierReqWait_Pre_Barrier_Manual,
    71   RtemsBarrierReqWait_Pre_Barrier_Auto,
    72   RtemsBarrierReqWait_Pre_Barrier_NA
    73 } RtemsBarrierReqWait_Pre_Barrier;
     69  RtemsBarrierReqWait_Pre_Id_NoObj,
     70  RtemsBarrierReqWait_Pre_Id_Manual,
     71  RtemsBarrierReqWait_Pre_Id_Auto,
     72  RtemsBarrierReqWait_Pre_Id_NA
     73} RtemsBarrierReqWait_Pre_Id;
    7474
    7575typedef enum {
     
    131131  RtemsBarrierReqWait_Instance;
    132132
    133 static const char * const RtemsBarrierReqWait_PreDesc_Barrier[] = {
     133static const char * const RtemsBarrierReqWait_PreDesc_Id[] = {
    134134  "NoObj",
    135135  "Manual",
     
    153153
    154154static const char * const * const RtemsBarrierReqWait_PreDesc[] = {
    155   RtemsBarrierReqWait_PreDesc_Barrier,
     155  RtemsBarrierReqWait_PreDesc_Id,
    156156  RtemsBarrierReqWait_PreDesc_Timeout,
    157157  RtemsBarrierReqWait_PreDesc_Satisfy,
     
    257257}
    258258
    259 static void RtemsBarrierReqWait_Pre_Barrier_Prepare(
    260   RtemsBarrierReqWait_Context    *ctx,
    261   RtemsBarrierReqWait_Pre_Barrier state
     259static void RtemsBarrierReqWait_Pre_Id_Prepare(
     260  RtemsBarrierReqWait_Context *ctx,
     261  RtemsBarrierReqWait_Pre_Id  state
    262262)
    263263{
    264264  switch ( state ) {
    265     case RtemsBarrierReqWait_Pre_Barrier_NoObj: {
    266       /*
    267        * The ``id`` parameter shall be invalid.
     265    case RtemsBarrierReqWait_Pre_Id_NoObj: {
     266      /*
     267       * The ``id`` parameter shall not be associated with a barrier.
    268268       */
    269269      ctx->id = 0xffffffff;
     
    271271    }
    272272
    273     case RtemsBarrierReqWait_Pre_Barrier_Manual: {
     273    case RtemsBarrierReqWait_Pre_Id_Manual: {
    274274      /*
    275275       * The ``id`` parameter shall be associated with a manual release
     
    280280    }
    281281
    282     case RtemsBarrierReqWait_Pre_Barrier_Auto: {
     282    case RtemsBarrierReqWait_Pre_Id_Auto: {
    283283      /*
    284284       * The ``id`` parameter shall be associated with an automatic release
     
    289289    }
    290290
    291     case RtemsBarrierReqWait_Pre_Barrier_NA:
     291    case RtemsBarrierReqWait_Pre_Id_NA:
    292292      break;
    293293  }
     
    609609static const struct {
    610610  uint8_t Skip : 1;
    611   uint8_t Pre_Barrier_NA : 1;
     611  uint8_t Pre_Id_NA : 1;
    612612  uint8_t Pre_Timeout_NA : 1;
    613613  uint8_t Pre_Satisfy_NA : 1;
     
    682682
    683683  for (
    684     ctx->pcs[ 0 ] = RtemsBarrierReqWait_Pre_Barrier_NoObj;
    685     ctx->pcs[ 0 ] < RtemsBarrierReqWait_Pre_Barrier_NA;
     684    ctx->pcs[ 0 ] = RtemsBarrierReqWait_Pre_Id_NoObj;
     685    ctx->pcs[ 0 ] < RtemsBarrierReqWait_Pre_Id_NA;
    686686    ++ctx->pcs[ 0 ]
    687687  ) {
    688     if ( RtemsBarrierReqWait_TransitionInfo[ index ].Pre_Barrier_NA ) {
    689       ctx->pcs[ 0 ] = RtemsBarrierReqWait_Pre_Barrier_NA;
    690       index += ( RtemsBarrierReqWait_Pre_Barrier_NA - 1 )
     688    if ( RtemsBarrierReqWait_TransitionInfo[ index ].Pre_Id_NA ) {
     689      ctx->pcs[ 0 ] = RtemsBarrierReqWait_Pre_Id_NA;
     690      index += ( RtemsBarrierReqWait_Pre_Id_NA - 1 )
    691691        * RtemsBarrierReqWait_Pre_Timeout_NA
    692692        * RtemsBarrierReqWait_Pre_Satisfy_NA;
     
    719719        }
    720720
    721         RtemsBarrierReqWait_Pre_Barrier_Prepare( ctx, ctx->pcs[ 0 ] );
     721        RtemsBarrierReqWait_Pre_Id_Prepare( ctx, ctx->pcs[ 0 ] );
    722722        RtemsBarrierReqWait_Pre_Timeout_Prepare( ctx, ctx->pcs[ 1 ] );
    723723        RtemsBarrierReqWait_Pre_Satisfy_Prepare( ctx, ctx->pcs[ 2 ] );
  • testsuites/validation/tc-signal-send.c

    r1ce127e re76470df  
    373373    case RtemsSignalReqSend_Pre_Task_NoObj: {
    374374      /*
    375        * The ``id`` parameter shall be invalid.
     375       * The ``id`` parameter shall not be associated with a task.
    376376       */
    377377      ctx->id = 0xffffffff;
  • testsuites/validation/tc-task-construct-errors.c

    r1ce127e re76470df  
    421421    case RtemsTaskReqConstructErrors_Pre_Prio_Valid: {
    422422      /*
    423        * The initial priority of the task configuration shall be valid.
     423       * The initial priority of the task configuration shall be valid and
     424       * non-zero.
    424425       */
    425426      ctx->config.initial_priority = 254;
  • testsuites/validation/tc-task-create-errors.c

    r1ce127e re76470df  
    384384    case RtemsTaskReqCreateErrors_Pre_Prio_Valid: {
    385385      /*
    386        * The ``initial_priority`` parameter shall be valid.
     386       * The ``initial_priority`` parameter shall be valid and non-zero.
    387387       */
    388388      ctx->initial_priority = 254;
     
    447447      /*
    448448       * The ``initial_priority`` parameter shall be greater than or equal to
    449        * the configured minimum size.
     449       * the configured minimum size and less than or equal to the maximum
     450       * stack size which can be allocated by the system.
    450451       */
    451452      ctx->stack_size = RTEMS_MINIMUM_STACK_SIZE;
Note: See TracChangeset for help on using the changeset viewer.