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