diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-03-08 09:18:40 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-03-08 11:07:03 +0100 |
commit | e2a63ed1e22059fb8d9cab154b70d2102ea82620 (patch) | |
tree | ff81fdca28fc6fbe6b4022240a39b80a20c0c1f4 /spec/rtems/task | |
parent | spec: Use common wording (diff) | |
download | rtems-central-e2a63ed1e22059fb8d9cab154b70d2102ea82620.tar.bz2 |
spec: Use common wording
Diffstat (limited to 'spec/rtems/task')
-rw-r--r-- | spec/rtems/task/req/construct-errors.yml | 3 | ||||
-rw-r--r-- | spec/rtems/task/req/create-errors.yml | 6 | ||||
-rw-r--r-- | spec/rtems/task/req/ident.yml | 43 |
3 files changed, 30 insertions, 22 deletions
diff --git a/spec/rtems/task/req/construct-errors.yml b/spec/rtems/task/req/construct-errors.yml index ba47811c..70ba7404 100644 --- a/spec/rtems/task/req/construct-errors.yml +++ b/spec/rtems/task/req/construct-errors.yml @@ -191,7 +191,8 @@ pre-conditions: test-code: | ctx->config.initial_priority = 254; text: | - The initial priority of the task configuration shall be valid. + The initial priority of the task configuration shall be valid and + non-zero. - name: Zero test-code: | ctx->config.initial_priority = 0; diff --git a/spec/rtems/task/req/create-errors.yml b/spec/rtems/task/req/create-errors.yml index 65c648b1..943d0198 100644 --- a/spec/rtems/task/req/create-errors.yml +++ b/spec/rtems/task/req/create-errors.yml @@ -170,7 +170,8 @@ pre-conditions: test-code: | ctx->initial_priority = 254; text: | - The ${../if/create:/params[1]/name} parameter shall be valid. + The ${../if/create:/params[1]/name} parameter shall be valid and + non-zero. - name: Zero test-code: | ctx->initial_priority = 0; @@ -204,7 +205,8 @@ pre-conditions: ctx->stack_size = RTEMS_MINIMUM_STACK_SIZE; text: | The ${../if/create:/params[1]/name} parameter shall be greater than or - equal to the configured minimum size. + equal to the configured minimum size and less than or equal to the + maximum stack size which can be allocated by the system. - name: Small test-code: | ctx->stack_size = 0; diff --git a/spec/rtems/task/req/ident.yml b/spec/rtems/task/req/ident.yml index ed0cb5d8..df187d09 100644 --- a/spec/rtems/task/req/ident.yml +++ b/spec/rtems/task/req/ident.yml @@ -5,41 +5,46 @@ enabled-by: true functional-type: action links: - role: interface-function - uid: /rtems/task/if/ident + uid: ../if/ident post-conditions: -- name: Post +- name: Status states: - name: OkAndSelfId test-code: | - T_rsc(ctx->status, RTEMS_SUCCESSFUL); - T_eq_ptr(ctx->id, &ctx->id_value); - T_eq_u32(ctx->id_value, rtems_task_self()); + T_rsc( ctx->status, RTEMS_SUCCESSFUL ); + T_eq_ptr( ctx->id, &ctx->id_value ); + T_eq_u32( ctx->id_value, rtems_task_self() ); text: | - The status shall be RTEMS_SUCCESSFUL. The value of the object identifier - referenced by the id parameter shall be the identifier of the executing - thread. - - name: Generic + The return status of ${../if/ident:/name} shall be + ${../../status/if/successful:/name}. The value of the object identifier + referenced by the ${../if/ident:/params[0]/name} parameter shall be the + identifier of the executing thread. + - name: Skip test-code: | /* Checks performed by ${../../req/ident:/test-run}() */ text: | - The post-condition status shall be specified by ${../../req/ident}. + There is no status to validate. test-epilogue: null test-prologue: null pre-conditions: -- name: Pre +- name: Name states: - name: Self test-code: | ctx->id_value = 0xffffffff; ctx->id = &ctx->id_value; text: | - The name parameter shall be RTEMS_SELF. - - name: Generic + The ${../if/ident:/params[0]/name} parameter shall be + ${../if/self:/name}. + - name: NotSelf test-code: | ctx->id = NULL; /* Preparation performed by ${../../req/ident:/test-run}() */ text: | - The pre-condition status shall be specified by ${../../req/ident}. + When the ${../if/ident:/params[0]/name} is not ${../if/self:/name} or + ${../if/ident:/params[2]/name} parameter is ${/c/if/null:/name}, the + behaviour of ${../if/ident:/name} shall be specified by + ${../../req/ident}. test-epilogue: null test-prologue: null rationale: null @@ -135,14 +140,14 @@ text: ${.:text-template} transition-map: - enabled-by: true post-conditions: - Post: OkAndSelfId + Status: OkAndSelfId pre-conditions: - Pre: + Name: - Self - enabled-by: true post-conditions: - Post: Generic + Status: Skip pre-conditions: - Pre: - - Generic + Name: + - NotSelf type: requirement |