source: rtems-central/spec/req/rtems/ident.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: 6.4 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  - name: InvNode
26    test-code: |
27      T_rsc(ctx->status, RTEMS_INVALID_NODE);
28    text: |
29      The status shall be RTEMS_INVALID_NODE.
30  test-epilogue: null
31  test-prologue: null
32- name: Id
33  states:
34  - name: Nop
35    test-code: |
36      T_eq_ptr(ctx->id, &ctx->id_value);
37      T_eq_u32(ctx->id_value, 0xffffffff);
38    text: |
39      The value of the object identifier referenced by the id parameter shall
40      be the value before the action.
41  - name: NullPtr
42    test-code: |
43      T_null(ctx->id)
44    text: |
45      The id parameter shall be NULL.
46  - name: LocalObj
47    test-code: |
48      T_eq_ptr(ctx->id, &ctx->id_value);
49      T_eq_u32(ctx->id_value, ctx->id_local_object);
50    text: |
51      The value of the object identifier referenced by the id parameter shall
52      be the identifier of a local object of the specified class with a name
53      equal to the name parameter.  If more than one local object of the
54      specified class with such a name exists, then it shall be the identifier
55      of the object with the lowest object index.
56  - name: RemoteObj
57    test-code: |
58      T_eq_ptr(ctx->id, &ctx->id_value);
59      T_eq_u32(ctx->id_value, ctx->id_remote_object);
60    text: |
61      The value of the object identifier referenced by the id parameter shall
62      be the identifier of a remote object of the specified class on a eligible
63      node defined by the node parameter with a name equal to the name
64      parameter.  If more than one local object of the specified class with
65      such a name exists, then it shall be the identifier of the object with
66      the lowest object index.  Otherwise, if more than one object of the
67      specified class with such a name exists on remote eligible nodes, then it
68      shall be the identifier of the object with the lowest node index and the
69      lowest object index on this node.
70  test-epilogue: null
71  test-prologue: null
72pre-conditions:
73- name: Name
74  states:
75  - name: Invalid
76    test-code: |
77      ctx->name = 1;
78    text: |
79      The name parameter shall not equal to a name of an active Classic API
80      object of the specified class.
81  - name: Valid
82    test-code: |
83      ctx->name = ClassicObjectIdentName;
84    text: |
85      The name parameter shall equal to a name of an active Classic API object
86      of the specified class.
87  test-epilogue: null
88  test-prologue: null
89- name: Node
90  states:
91  - name: Local
92    test-code: |
93      ctx->node = 1;
94    text: |
95      The node parameter shall be the local node number.
96  - name: Remote
97    test-code: |
98      ctx->node = 2;
99    text: |
100      The node parameter shall be a remote node number.
101  - name: Invalid
102    test-code: |
103      ctx->node = 256;
104    text: |
105      The node parameter shall be an invalid node number.
106  - name: SearchAll
107    test-code: |
108      ctx->node = RTEMS_SEARCH_ALL_NODES;
109    text: |
110      The node parameter shall be RTEMS_SEARCH_ALL_NODES.
111  - name: SearchOther
112    test-code: |
113      ctx->node = RTEMS_SEARCH_OTHER_NODES;
114    text: |
115      The node parameter shall be RTEMS_SEARCH_OTHER_NODES.
116  - name: SearchLocal
117    test-code: |
118      ctx->node = RTEMS_SEARCH_LOCAL_NODE;
119    text: |
120      The node parameter shall be RTEMS_SEARCH_LOCAL_NODE.
121  test-epilogue: null
122  test-prologue: null
123- name: Id
124  states:
125  - name: NullPtr
126    test-code: |
127      ctx->id = NULL;
128    text: |
129      The id parameter shall be NULL.
130  - name: Valid
131    test-code: |
132      ctx->id_value = 0xffffffff;
133      ctx->id = &ctx->id_value;
134    text: |
135      The id parameter shall point to an object identifier.
136  test-epilogue: null
137  test-prologue: null
138rationale: null
139references: []
140requirement-type: functional
141skip-reasons: {}
142test-action: |
143  ctx->status = ( *ctx->action )( ctx->name, ctx->node, ctx->id );
144test-brief: null
145test-cleanup: null
146test-context:
147- brief: null
148  description: null
149  member: |
150    rtems_status_code status
151- brief: null
152  description: null
153  member: rtems_name name
154- brief: null
155  description: null
156  member: uint32_t node
157- brief: null
158  description: null
159  member: rtems_id *id
160- brief: null
161  description: null
162  member: rtems_id id_value
163- brief: null
164  description: null
165  member: rtems_id id_remote_object
166test-context-support: null
167test-description: null
168test-header:
169  code: |
170    #define ClassicObjectIdentName \
171      rtems_build_name( 'I', 'D', 'N', 'T' )
172  includes:
173  - rtems.h
174  local-includes: []
175  run-params:
176  - description: |
177      is the identifier of an active object of the class under test with the
178      name ClassicObjectIdentName.
179    dir: null
180    name: id_local_object
181    specifier: rtems_id ${.:name}
182  - description: |
183      is the action handler.
184    dir: null
185    name: action
186    specifier: |
187      rtems_status_code ( *${.:name} )( rtems_name, uint32_t, rtems_id * )
188  target: testsuites/validation/tr-object-ident.h
189test-includes: []
190test-local-includes:
191- tr-object-ident.h
192test-prepare: null
193test-setup: null
194test-stop: null
195test-support: null
196test-target: testsuites/validation/tr-object-ident.c
197test-teardown: null
198text: ${.:text-template}
199transition-map:
200- enabled-by: true
201  post-conditions:
202    Id: LocalObj
203    Status: Ok
204  pre-conditions:
205    Id:
206    - Valid
207    Name:
208    - Valid
209    Node:
210    - SearchAll
211    - SearchLocal
212    - Local
213- enabled-by: true
214  post-conditions:
215    Id: Nop
216    Status: InvName
217  pre-conditions:
218    Id:
219    - Valid
220    Name:
221    - Valid
222    Node:
223    - Invalid
224    - SearchOther
225    - Remote
226- enabled-by: true
227  post-conditions:
228    Id: Nop
229    Status: InvName
230  pre-conditions:
231    Id:
232    - Valid
233    Name:
234    - Invalid
235    Node: all
236- enabled-by: true
237  post-conditions:
238    Id: NullPtr
239    Status: InvAddr
240  pre-conditions:
241    Id:
242    - NullPtr
243    Name: all
244    Node: all
245- enabled-by: RTEMS_MULTIPROCESSING
246  post-conditions:
247    Id: RemoteObj
248    Status: Ok
249  pre-conditions:
250    Id:
251    - Valid
252    Name:
253    - Valid
254    Node:
255    - SearchOther
256    - Remote
257type: requirement
Note: See TracBrowser for help on using the repository browser.