source: rtems-central/spec/req/rtems/ident-local.yml @ 1b4640d

Last change on this file since 1b4640d was 1b4640d, checked in by Sebastian Huber <sebastian.huber@…>, on 08/17/20 at 08:41:18

spec: Use tr-* file pattern for test runs

  • Property mode set to 100644
File size: 4.1 KB
Line 
1SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
2copyrights:
3- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
4enabled-by: true
5functional-type: action
6links: []
7post-conditions:
8- name: Status
9  states:
10  - name: Ok
11    test-code: |
12      T_rsc( ctx->status, RTEMS_SUCCESSFUL );
13    text: |
14      The status shall be RTEMS_SUCCESSFUL.
15  - name: InvAddr
16    test-code: |
17      T_rsc( ctx->status, RTEMS_INVALID_ADDRESS );
18    text: |
19      The status shall be RTEMS_INVALID_ADDRESS.
20  - name: InvName
21    test-code: |
22      T_rsc( ctx->status, RTEMS_INVALID_NAME );
23    text: |
24      The status shall be RTEMS_INVALID_NAME.
25  test-epilogue: null
26  test-prologue: null
27- name: Id
28  states:
29  - name: Nop
30    test-code: |
31      T_eq_ptr( ctx->id, &ctx->id_value );
32      T_eq_u32( ctx->id_value, 0xffffffff );
33    text: |
34      The value of the object identifier referenced by the id parameter shall
35      be the value before the action.
36  - name: NullPtr
37    test-code: |
38      T_null( ctx->id )
39    text: |
40      The id parameter shall be NULL.
41  - name: Id
42    test-code: |
43      T_eq_ptr( ctx->id, &ctx->id_value );
44      T_eq_u32( ctx->id_value, ctx->id_local_object );
45    text: |
46      The value of the object identifier referenced by the id parameter shall
47      be the identifier of a local object of the specified class with a name
48      equal to the name parameter.  If more than one local object of the
49      specified class with such a name exists, then it shall be the identifier
50      of the object with the lowest object index.
51  test-epilogue: null
52  test-prologue: null
53pre-conditions:
54- name: Name
55  states:
56  - name: Invalid
57    test-code: |
58      ctx->name = 1;
59    text: |
60      The name parameter shall not equal to a name of an active Classic API
61      object of the specified class.
62  - name: Valid
63    test-code: |
64      ctx->name = ClassicObjectLocalIdentName;
65    text: |
66      The name parameter shall equal to a name of an active Classic API object
67      of the specified class.
68  test-epilogue: null
69  test-prologue: null
70- name: Id
71  states:
72  - name: NullPtr
73    test-code: |
74      ctx->id = NULL;
75    text: |
76      The id parameter shall be NULL.
77  - name: Valid
78    test-code: |
79      ctx->id_value = 0xffffffff;
80      ctx->id = &ctx->id_value;
81    text: |
82      The id parameter shall point to an object identifier.
83  test-epilogue: null
84  test-prologue: null
85rationale: null
86references: []
87requirement-type: functional
88skip-reasons: {}
89test-action: |
90  ctx->status = ( *ctx->action )( ctx->name, ctx->id );
91test-brief: null
92test-cleanup: null
93test-context:
94- brief: null
95  description: null
96  member: rtems_status_code status
97- brief: null
98  description: null
99  member: rtems_name name
100- brief: null
101  description: null
102  member: rtems_id *id
103- brief: null
104  description: null
105  member: rtems_id id_value
106test-context-support: null
107test-description: null
108test-header:
109  code: |
110    #define ClassicObjectLocalIdentName \
111      rtems_build_name( 'I', 'D', 'N', 'T' )
112  includes:
113  - rtems.h
114  local-includes: []
115  run-params:
116  - description: |
117      is the identifier of an active object of the class under test with the
118      name ClassicObjectLocalIdentName.
119    dir: null
120    name: id_local_object
121    specifier: rtems_id ${.:name}
122  - description: |
123      is the action handler.
124    dir: null
125    name: action
126    specifier: rtems_status_code ( *${.:name} )( rtems_name, rtems_id * )
127  target: testsuites/validation/tr-object-ident-local.h
128test-includes: []
129test-local-includes:
130- tr-object-ident-local.h
131test-prepare: null
132test-setup: null
133test-stop: null
134test-support: null
135test-target: testsuites/validation/tr-object-ident-local.c
136test-teardown: null
137text: ${.:text-template}
138transition-map:
139- enabled-by: true
140  post-conditions:
141    Id: NullPtr
142    Status: InvAddr
143  pre-conditions:
144    Id:
145    - NullPtr
146    Name: all
147- enabled-by: true
148  post-conditions:
149    Id: Nop
150    Status: InvName
151  pre-conditions:
152    Id:
153    - Valid
154    Name:
155    - Invalid
156- enabled-by: true
157  post-conditions:
158    Id: Id
159    Status: Ok
160  pre-conditions:
161    Id:
162    - Valid
163    Name:
164    - Valid
165type: requirement
Note: See TracBrowser for help on using the repository browser.