1 | SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause |
---|
2 | copyrights: |
---|
3 | - Copyright (C) 2021 embedded brains GmbH & Co. KG |
---|
4 | enabled-by: true |
---|
5 | functional-type: action |
---|
6 | links: |
---|
7 | - role: interface-function |
---|
8 | uid: ../if/fire-after |
---|
9 | post-conditions: |
---|
10 | - name: Status |
---|
11 | states: |
---|
12 | - name: Ok |
---|
13 | test-code: | |
---|
14 | T_rsc_success( ctx->status ); |
---|
15 | text: | |
---|
16 | The return status of ${../if/fire-after:/name} shall be |
---|
17 | ${../../status/if/successful:/name}. |
---|
18 | - name: InvId |
---|
19 | test-code: | |
---|
20 | T_rsc( ctx->status, RTEMS_INVALID_ID ); |
---|
21 | text: | |
---|
22 | The return status of ${../if/fire-after:/name} shall be |
---|
23 | ${../../status/if/invalid-id:/name}. |
---|
24 | - name: InvAddr |
---|
25 | test-code: | |
---|
26 | T_rsc( ctx->status, RTEMS_INVALID_ADDRESS ); |
---|
27 | text: | |
---|
28 | The return status of ${../if/fire-after:/name} shall be |
---|
29 | ${../../status/if/invalid-address:/name}. |
---|
30 | - name: InvNum |
---|
31 | test-code: | |
---|
32 | T_rsc( ctx->status, RTEMS_INVALID_NUMBER ); |
---|
33 | text: | |
---|
34 | The return status of ${../if/fire-after:/name} shall be |
---|
35 | ${../../status/if/invalid-number:/name}. |
---|
36 | test-epilogue: null |
---|
37 | test-prologue: null |
---|
38 | - name: Context |
---|
39 | states: |
---|
40 | - name: None |
---|
41 | test-code: | |
---|
42 | T_eq_int( class, TIMER_DORMANT ); |
---|
43 | text: | |
---|
44 | The timer shall have never been ${../glossary/scheduled:/term}. |
---|
45 | See also ${../glossary/none:/term}. |
---|
46 | - name: Interrupt |
---|
47 | test-code: | |
---|
48 | T_eq_int( class & TIMER_CLASS_BIT_ON_TASK, 0 ); |
---|
49 | text: | |
---|
50 | The timer shall be in ${../glossary/interruptcontext:/term}. |
---|
51 | - name: Server |
---|
52 | test-code: | |
---|
53 | T_eq_int( class & TIMER_CLASS_BIT_ON_TASK, TIMER_CLASS_BIT_ON_TASK ); |
---|
54 | text: | |
---|
55 | The timer shall be in ${../glossary/servercontext:/term}. |
---|
56 | - name: Nop |
---|
57 | test-code: | |
---|
58 | T_eq_int( class, ctx->pre_class ); |
---|
59 | text: | |
---|
60 | Objects referenced by the parameters in the past call to |
---|
61 | ${../if/fire-after:/name} shall not be accessed by the |
---|
62 | ${../if/fire-after:/name} call. |
---|
63 | See also ${../glossary/nop:/term}. |
---|
64 | test-epilogue: null |
---|
65 | test-prologue: | |
---|
66 | Timer_Classes class; |
---|
67 | class = GetTimerClass( ctx->timer_id ); |
---|
68 | - name: Clock |
---|
69 | states: |
---|
70 | - name: None |
---|
71 | test-code: | |
---|
72 | T_eq_int( class, TIMER_DORMANT ); |
---|
73 | text: | |
---|
74 | The timer shall have never been ${../glossary/scheduled:/term}. |
---|
75 | - name: Ticks |
---|
76 | test-code: | |
---|
77 | T_eq_int( class & TIMER_CLASS_BIT_TIME_OF_DAY, 0 ); |
---|
78 | text: | |
---|
79 | The timer shall use the ${../glossary/ticksbasedclock:/term}. |
---|
80 | - name: Realtime |
---|
81 | test-code: | |
---|
82 | T_eq_int( |
---|
83 | class & TIMER_CLASS_BIT_TIME_OF_DAY, |
---|
84 | TIMER_CLASS_BIT_TIME_OF_DAY |
---|
85 | ); |
---|
86 | text: | |
---|
87 | The timer shall use the ${../glossary/realtimeclock:/term}. |
---|
88 | - name: Nop |
---|
89 | test-code: | |
---|
90 | T_eq_int( class, ctx->pre_class ); |
---|
91 | text: | |
---|
92 | Objects referenced by the parameters in the past call to |
---|
93 | ${../if/fire-after:/name} shall not be accessed by the |
---|
94 | ${../if/fire-after:/name} call. |
---|
95 | test-epilogue: null |
---|
96 | test-prologue: | |
---|
97 | Timer_Classes class; |
---|
98 | class = GetTimerClass( ctx->timer_id ); |
---|
99 | - name: State |
---|
100 | states: |
---|
101 | - name: Scheduled |
---|
102 | test-code: | |
---|
103 | ctx->ticks_till_fire = TriggerTimer( ctx ); |
---|
104 | T_eq_int( ctx->invocations, 1 ); |
---|
105 | text: | |
---|
106 | The timer shall be in ${../glossary/scheduled:/term} |
---|
107 | ${../glossary/state:/term}. |
---|
108 | - name: Nop |
---|
109 | test-code: | |
---|
110 | T_eq_int( ctx->post_state, ctx->pre_state ); |
---|
111 | text: | |
---|
112 | Objects referenced by the parameters in the past call to |
---|
113 | ${../if/fire-after:/name} shall not be accessed by the |
---|
114 | ${../if/fire-after:/name} call. |
---|
115 | test-epilogue: null |
---|
116 | test-prologue: null |
---|
117 | - name: Interval |
---|
118 | states: |
---|
119 | - name: Param |
---|
120 | test-code: | |
---|
121 | T_eq_int( ctx->ticks_till_fire, ctx->ticks_param ); |
---|
122 | text: | |
---|
123 | The ${../glossary/timerserviceroutine:/term} shall be invoked the |
---|
124 | number of ticks (see ${/glossary/tick:/term}), which are provided by |
---|
125 | the ${../if/fire-after:/params[1]/name} parameter |
---|
126 | in the past call to ${../if/fire-after:/name}, after a point in time |
---|
127 | during the execution of the ${../if/fire-after:/name} call. |
---|
128 | - name: Nop |
---|
129 | test-code: | |
---|
130 | /* |
---|
131 | * Whether the timer is scheduled has already been tested by the |
---|
132 | * "Nop" "State" post-condition above. |
---|
133 | */ |
---|
134 | T_eq_u32( |
---|
135 | ctx->post_scheduling_data.interval, |
---|
136 | ctx->pre_scheduling_data.interval |
---|
137 | ); |
---|
138 | text: | |
---|
139 | If and when the ${../glossary/timerserviceroutine:/term} will be invoked |
---|
140 | shall not be changed by the past call to ${../if/fire-after:/name}. |
---|
141 | test-epilogue: null |
---|
142 | test-prologue: null |
---|
143 | - name: Routine |
---|
144 | states: |
---|
145 | - name: Param |
---|
146 | test-code: | |
---|
147 | T_eq_int( ctx->invocations, 1 ); |
---|
148 | text: | |
---|
149 | The function reference used to invoke the |
---|
150 | ${../glossary/timerserviceroutine:/term} when the timer will |
---|
151 | ${../glossary/fire:/term} shall be the one provided by |
---|
152 | the ${../if/fire-after:/params[2]/name} parameter |
---|
153 | in the past call to ${../if/fire-after:/name}. |
---|
154 | - name: Nop |
---|
155 | test-code: | |
---|
156 | T_eq_ptr( |
---|
157 | ctx->post_scheduling_data.routine, |
---|
158 | ctx->pre_scheduling_data.routine |
---|
159 | ); |
---|
160 | text: | |
---|
161 | The function reference used for any invocation of the |
---|
162 | ${../glossary/timerserviceroutine:/term} shall not be changed |
---|
163 | by the past call to ${../if/fire-after:/name}. |
---|
164 | test-epilogue: null |
---|
165 | test-prologue: null |
---|
166 | - name: UserData |
---|
167 | states: |
---|
168 | - name: Param |
---|
169 | test-code: | |
---|
170 | T_eq_ptr( ctx->routine_user_data, ctx ); |
---|
171 | text: | |
---|
172 | The user data argument for invoking the |
---|
173 | ${../glossary/timerserviceroutine:/term} when the timer will |
---|
174 | ${../glossary/fire:/term} shall be the one provided by |
---|
175 | the ${../if/fire-after:/params[3]/name} parameter |
---|
176 | in the past call to ${../if/fire-after:/name}. |
---|
177 | - name: Nop |
---|
178 | test-code: | |
---|
179 | T_eq_ptr( |
---|
180 | ctx->post_scheduling_data.user_data, |
---|
181 | ctx->pre_scheduling_data.user_data |
---|
182 | ); |
---|
183 | text: | |
---|
184 | The user data argument used for any invocation of the |
---|
185 | ${../glossary/timerserviceroutine:/term} shall not be changed |
---|
186 | by the past call to ${../if/fire-after:/name}. |
---|
187 | test-epilogue: null |
---|
188 | test-prologue: null |
---|
189 | pre-conditions: |
---|
190 | - name: Ticks |
---|
191 | states: |
---|
192 | - name: Valid |
---|
193 | test-code: | |
---|
194 | ctx->ticks_param = SCHEDULE_LATER; |
---|
195 | text: | |
---|
196 | While the ${../if/fire-after:/params[1]/name} parameter is a positive |
---|
197 | (greater 0) number. |
---|
198 | - name: Is0 |
---|
199 | test-code: | |
---|
200 | ctx->ticks_param = 0; |
---|
201 | text: | |
---|
202 | While the ${../if/fire-after:/params[1]/name} parameter is 0. |
---|
203 | test-epilogue: null |
---|
204 | test-prologue: null |
---|
205 | - name: Routine |
---|
206 | states: |
---|
207 | - name: Valid |
---|
208 | test-code: | |
---|
209 | ctx->routine_param = TimerServiceRoutine; |
---|
210 | text: | |
---|
211 | While the ${../if/fire-after:/params[2]/name} parameter references an |
---|
212 | object of type ${../if/service-routine-entry:/name}. |
---|
213 | - name: 'Null' |
---|
214 | test-code: | |
---|
215 | ctx->routine_param = NULL; |
---|
216 | text: | |
---|
217 | While the ${../if/fire-after:/params[2]/name} parameter is |
---|
218 | ${/c/if/null:/name}.. |
---|
219 | test-epilogue: null |
---|
220 | test-prologue: null |
---|
221 | - name: Id |
---|
222 | states: |
---|
223 | - name: Valid |
---|
224 | test-code: | |
---|
225 | ctx->id_param = ctx->timer_id; |
---|
226 | text: | |
---|
227 | While the ${../if/fire-after:/params[0]/name} parameter is valid. |
---|
228 | - name: Invalid |
---|
229 | test-code: | |
---|
230 | ctx->id_param = RTEMS_ID_NONE; |
---|
231 | text: | |
---|
232 | While the ${../if/fire-after:/params[0]/name} parameter is invalid. |
---|
233 | test-epilogue: null |
---|
234 | test-prologue: null |
---|
235 | - name: Context |
---|
236 | states: |
---|
237 | - name: None |
---|
238 | test-code: | |
---|
239 | ctx->pre_cond_contex = PRE_NONE; |
---|
240 | text: | |
---|
241 | While the ${../glossary/timerserviceroutine:/term} has never been |
---|
242 | ${../glossary/scheduled:/term} since creation of the timer. |
---|
243 | See also ${../glossary/none:/term}. |
---|
244 | - name: Interrupt |
---|
245 | test-code: | |
---|
246 | ctx->pre_cond_contex = PRE_INTERRUPT; |
---|
247 | text: | |
---|
248 | While the timer is in ${../glossary/interruptcontext:/term}. |
---|
249 | - name: Server |
---|
250 | test-code: | |
---|
251 | ctx->pre_cond_contex = PRE_SERVER; |
---|
252 | text: | |
---|
253 | While the timer is in ${../glossary/servercontext:/term}. |
---|
254 | test-epilogue: null |
---|
255 | test-prologue: null |
---|
256 | - name: Clock |
---|
257 | states: |
---|
258 | - name: None |
---|
259 | test-code: | |
---|
260 | T_eq_int( ctx->pre_cond_contex, PRE_NONE ); |
---|
261 | text: | |
---|
262 | While the timer has never been ${../glossary/scheduled:/term} |
---|
263 | since creation of the timer. |
---|
264 | - name: Ticks |
---|
265 | test-code: | |
---|
266 | rtems_status_code status; |
---|
267 | |
---|
268 | if ( ctx->pre_cond_contex == PRE_INTERRUPT ) { |
---|
269 | status = rtems_timer_fire_after( |
---|
270 | ctx->timer_id, |
---|
271 | SCHEDULE_SOON, |
---|
272 | TimerServiceRoutine, |
---|
273 | ctx |
---|
274 | ); |
---|
275 | } else { |
---|
276 | status = rtems_timer_server_fire_after( |
---|
277 | ctx->timer_id, |
---|
278 | SCHEDULE_SOON, |
---|
279 | TimerServiceRoutine, |
---|
280 | ctx |
---|
281 | ); |
---|
282 | } |
---|
283 | T_rsc_success( status ); |
---|
284 | text: | |
---|
285 | While the ${../glossary/clock:/term} used to determine when the timer |
---|
286 | will ${../glossary/fire:/term} is the |
---|
287 | ${../glossary/ticksbasedclock:/term}. |
---|
288 | - name: Realtime |
---|
289 | test-code: | |
---|
290 | rtems_status_code status; |
---|
291 | |
---|
292 | if ( ctx->pre_cond_contex == PRE_INTERRUPT ) { |
---|
293 | status = rtems_timer_fire_when( |
---|
294 | ctx->timer_id, |
---|
295 | &tod_schedule, |
---|
296 | TimerServiceRoutine, |
---|
297 | ctx |
---|
298 | ); |
---|
299 | } else { |
---|
300 | status = rtems_timer_server_fire_when( |
---|
301 | ctx->timer_id, |
---|
302 | &tod_schedule, |
---|
303 | TimerServiceRoutine, |
---|
304 | ctx |
---|
305 | ); |
---|
306 | } |
---|
307 | T_rsc_success( status ); |
---|
308 | text: | |
---|
309 | While the ${../glossary/clock:/term} used to determine when the timer |
---|
310 | will ${../glossary/fire:/term} is the ${../glossary/realtimeclock:/term}. |
---|
311 | test-epilogue: null |
---|
312 | test-prologue: null |
---|
313 | - name: State |
---|
314 | states: |
---|
315 | - name: Inactive |
---|
316 | test-code: | |
---|
317 | TriggerTimer( ctx ); |
---|
318 | T_eq_int( |
---|
319 | ctx->invocations, |
---|
320 | ( ctx->pre_cond_contex == PRE_NONE ) ? 0 : 1 |
---|
321 | ); |
---|
322 | ctx->invocations = 0; |
---|
323 | ctx->pre_state = TIMER_INACTIVE; |
---|
324 | text: | |
---|
325 | While the timer is in ${../glossary/inactive:/term} |
---|
326 | ${../glossary/state:/term}. |
---|
327 | - name: Scheduled |
---|
328 | test-code: | |
---|
329 | /* The timer was already scheduled in the "Clock" pre-conditions. */ |
---|
330 | ctx->pre_state = TIMER_SCHEDULED; |
---|
331 | text: | |
---|
332 | While the timer is in ${../glossary/scheduled:/term} |
---|
333 | ${../glossary/state:/term}. |
---|
334 | - name: Pending |
---|
335 | test-code: | |
---|
336 | T_rsc_success( rtems_task_suspend( GetTimerServerTaskId() ) ); |
---|
337 | TriggerTimer( ctx ); |
---|
338 | T_eq_int( ctx->invocations, 0 ); |
---|
339 | ctx->pre_state = TIMER_PENDING; |
---|
340 | text: | |
---|
341 | While the timer is in ${../glossary/pending:/term} |
---|
342 | ${../glossary/state:/term}. |
---|
343 | test-epilogue: null |
---|
344 | test-prologue: null |
---|
345 | rationale: null |
---|
346 | references: [] |
---|
347 | requirement-type: functional |
---|
348 | skip-reasons: |
---|
349 | NotExist: | |
---|
350 | The pre-condition combination of ${../glossary/context:/term}, |
---|
351 | ${../glossary/clock:/term} and ${../glossary/state:/term} cannot be |
---|
352 | produced and does therefore not exist. |
---|
353 | test-action: | |
---|
354 | GetTimerSchedulingData( ctx->timer_id, &ctx->pre_scheduling_data ); |
---|
355 | ctx->pre_class = GetTimerClass( ctx->timer_id ); |
---|
356 | ctx->status = rtems_timer_fire_after( |
---|
357 | ctx->id_param, |
---|
358 | ctx->ticks_param, |
---|
359 | ctx->routine_param, |
---|
360 | ctx |
---|
361 | ); |
---|
362 | ctx->post_state = GetTimerState( ctx->timer_id ); |
---|
363 | GetTimerSchedulingData( ctx->timer_id, &ctx->post_scheduling_data ); |
---|
364 | /* Ignoring return status: the timer server task may be suspended or not. */ |
---|
365 | rtems_task_resume( GetTimerServerTaskId() ); |
---|
366 | test-brief: null |
---|
367 | test-cleanup: | |
---|
368 | T_rsc_success( rtems_timer_delete( ctx->timer_id ) ); |
---|
369 | test-context: |
---|
370 | - brief: | |
---|
371 | This member contains a valid id of a timer. |
---|
372 | description: null |
---|
373 | member: | |
---|
374 | rtems_id timer_id |
---|
375 | - brief: | |
---|
376 | This member specifies the ${../if/fire-after:/params[0]/name} parameter |
---|
377 | for the action. |
---|
378 | description: null |
---|
379 | member: | |
---|
380 | rtems_id id_param |
---|
381 | - brief: | |
---|
382 | This member specifies the ${../if/fire-after:/params[1]/name} parameter |
---|
383 | for the action. |
---|
384 | description: null |
---|
385 | member: | |
---|
386 | rtems_interval ticks_param |
---|
387 | - brief: | |
---|
388 | This member specifies the ${../if/fire-after:/params[2]/name} parameter |
---|
389 | for the action. |
---|
390 | description: null |
---|
391 | member: | |
---|
392 | rtems_timer_service_routine_entry routine_param |
---|
393 | - brief: | |
---|
394 | This member contains the returned ${/glossary/statuscode:/term} |
---|
395 | of the action. |
---|
396 | description: null |
---|
397 | member: | |
---|
398 | rtems_status_code status |
---|
399 | - brief: | |
---|
400 | This member contains a counter for invocations of |
---|
401 | the ${../glossary/timerserviceroutine:/term}. |
---|
402 | description: null |
---|
403 | member: | |
---|
404 | int invocations |
---|
405 | - brief: | |
---|
406 | Function TriggerTimer() is used to figure out how many |
---|
407 | ticks (see ${/glossary/tick:/term}) are needed till the |
---|
408 | ${../glossary/timerserviceroutine:/term} gets executed. |
---|
409 | This member contains the number of ticks needed to |
---|
410 | ${../glossary/fire:/term} the ${../glossary/timerserviceroutine:/term}. |
---|
411 | description: null |
---|
412 | member: | |
---|
413 | Scheduling_Ticks ticks_till_fire |
---|
414 | - brief: | |
---|
415 | This member contains the user data given to the |
---|
416 | ${../glossary/timerserviceroutine:/term} when called. |
---|
417 | description: null |
---|
418 | member: | |
---|
419 | void *routine_user_data |
---|
420 | - brief: | |
---|
421 | This member specifies which pre-condition ${../glossary/context:/term} |
---|
422 | (${../glossary/none:/term}, ${../glossary/interruptcontext:/term}, |
---|
423 | ${../glossary/servercontext:/term}) must be created before the |
---|
424 | ${../if/fire-after:/name} action gets executed. |
---|
425 | description: null |
---|
426 | member: | |
---|
427 | PreConditionContext pre_cond_contex |
---|
428 | - brief: | |
---|
429 | This member stores internal ${../glossary/clock:/term} and |
---|
430 | ${../glossary/context:/term} settings of the timer before |
---|
431 | the execution of the test action. |
---|
432 | description: null |
---|
433 | member: | |
---|
434 | Timer_Classes pre_class |
---|
435 | - brief: | |
---|
436 | This member stores the ${../glossary/state:/term} of the timer before |
---|
437 | the execution of the test action. |
---|
438 | description: null |
---|
439 | member: | |
---|
440 | Timer_States pre_state |
---|
441 | - brief: | |
---|
442 | This member stores the ${../glossary/state:/term} of the timer after |
---|
443 | the execution of the test action. |
---|
444 | description: null |
---|
445 | member: | |
---|
446 | Timer_States post_state |
---|
447 | - brief: | |
---|
448 | This member stores the scheduling data of the timer before |
---|
449 | the execution of the test action. |
---|
450 | description: null |
---|
451 | member: | |
---|
452 | Timer_Scheduling_Data pre_scheduling_data |
---|
453 | - brief: | |
---|
454 | This member stores the scheduling data of the timer after |
---|
455 | the execution of the test action. |
---|
456 | description: null |
---|
457 | member: | |
---|
458 | Timer_Scheduling_Data post_scheduling_data |
---|
459 | test-context-support: | |
---|
460 | typedef enum { |
---|
461 | PRE_NONE = 0, |
---|
462 | PRE_INTERRUPT = 1, |
---|
463 | PRE_SERVER = 2 |
---|
464 | } PreConditionContext; |
---|
465 | |
---|
466 | typedef enum { |
---|
467 | SCHEDULE_NONE = 0, |
---|
468 | SCHEDULE_SOON = 1, |
---|
469 | SCHEDULE_LATER = 2, |
---|
470 | SCHEDULE_MAX = 5 |
---|
471 | } Scheduling_Ticks; |
---|
472 | test-description: null |
---|
473 | test-header: null |
---|
474 | test-includes: |
---|
475 | - rtems.h |
---|
476 | test-local-includes: |
---|
477 | - tx-support.h |
---|
478 | test-prepare: | |
---|
479 | rtems_status_code status; |
---|
480 | status = rtems_timer_create( |
---|
481 | rtems_build_name( 'T', 'I', 'M', 'E' ), |
---|
482 | &ctx->timer_id |
---|
483 | ); |
---|
484 | T_rsc_success( status ); |
---|
485 | |
---|
486 | ctx->invocations = 0; |
---|
487 | ctx->ticks_till_fire = SCHEDULE_NONE; |
---|
488 | ctx->routine_user_data = NULL; |
---|
489 | T_rsc_success( rtems_clock_set( &tod_now ) ); |
---|
490 | test-setup: |
---|
491 | brief: null |
---|
492 | code: | |
---|
493 | rtems_status_code status; |
---|
494 | status = rtems_timer_initiate_server( |
---|
495 | RTEMS_TIMER_SERVER_DEFAULT_PRIORITY, |
---|
496 | RTEMS_MINIMUM_STACK_SIZE, |
---|
497 | RTEMS_DEFAULT_ATTRIBUTES |
---|
498 | ); |
---|
499 | T_rsc_success( status ); |
---|
500 | description: null |
---|
501 | test-stop: null |
---|
502 | test-support: | |
---|
503 | static const rtems_time_of_day tod_now = { 2000, 1, 1, 0, 0, 0, 0 }; |
---|
504 | static const rtems_time_of_day tod_schedule = { 2000, 1, 1, 1, 0, 0, 0 }; |
---|
505 | static const rtems_time_of_day tod_fire = { 2000, 1, 2, 0, 0, 0, 0 }; |
---|
506 | |
---|
507 | static Scheduling_Ticks TriggerTimer( const RtemsTimerReqFireAfter_Context *ctx ) |
---|
508 | { |
---|
509 | int ticks_fired = SCHEDULE_NONE; |
---|
510 | int invocations_old = ctx->invocations; |
---|
511 | |
---|
512 | /* Fire the timer service routine for ticks and realtime clock */ |
---|
513 | int i; |
---|
514 | for ( i = 1; i <= SCHEDULE_MAX; ++i ) { |
---|
515 | ClockTick(); |
---|
516 | if ( ctx->invocations > invocations_old ) { |
---|
517 | ticks_fired = i; |
---|
518 | break; |
---|
519 | } |
---|
520 | } |
---|
521 | |
---|
522 | T_rsc_success( rtems_clock_set( &tod_fire ) ); |
---|
523 | |
---|
524 | return ticks_fired; |
---|
525 | } |
---|
526 | |
---|
527 | static void TimerServiceRoutine( |
---|
528 | rtems_id timer_id, |
---|
529 | void *user_data |
---|
530 | ) |
---|
531 | { |
---|
532 | RtemsTimerReqFireAfter_Context *ctx = user_data; |
---|
533 | ++( ctx->invocations ); |
---|
534 | ctx->routine_user_data = user_data; |
---|
535 | } |
---|
536 | test-target: testsuites/validation/tc-timer-fire-after.c |
---|
537 | test-teardown: |
---|
538 | brief: Make sure the timer server is not running and the realtime clock |
---|
539 | is not set after this test. |
---|
540 | code: | |
---|
541 | DeleteTimerServer(); |
---|
542 | UnsetClock(); |
---|
543 | description: null |
---|
544 | text: ${.:text-template} |
---|
545 | transition-map: |
---|
546 | - enabled-by: true |
---|
547 | post-conditions: |
---|
548 | Status: Ok |
---|
549 | Context: Interrupt |
---|
550 | Clock: Ticks |
---|
551 | State: Scheduled |
---|
552 | Interval: Param |
---|
553 | Routine: Param |
---|
554 | UserData: Param |
---|
555 | pre-conditions: |
---|
556 | Ticks: |
---|
557 | - Valid |
---|
558 | Routine: |
---|
559 | - Valid |
---|
560 | Id: |
---|
561 | - Valid |
---|
562 | Context: |
---|
563 | - None |
---|
564 | Clock: |
---|
565 | - None |
---|
566 | State: |
---|
567 | - Inactive |
---|
568 | - enabled-by: true |
---|
569 | post-conditions: |
---|
570 | Status: Ok |
---|
571 | Context: Interrupt |
---|
572 | Clock: Ticks |
---|
573 | State: Scheduled |
---|
574 | Interval: Param |
---|
575 | Routine: Param |
---|
576 | UserData: Param |
---|
577 | pre-conditions: |
---|
578 | Ticks: |
---|
579 | - Valid |
---|
580 | Routine: |
---|
581 | - Valid |
---|
582 | Id: |
---|
583 | - Valid |
---|
584 | Context: |
---|
585 | - Server |
---|
586 | Clock: |
---|
587 | - Ticks |
---|
588 | - Realtime |
---|
589 | State: all |
---|
590 | - enabled-by: true |
---|
591 | post-conditions: |
---|
592 | Status: Ok |
---|
593 | Context: Interrupt |
---|
594 | Clock: Ticks |
---|
595 | State: Scheduled |
---|
596 | Interval: Param |
---|
597 | Routine: Param |
---|
598 | UserData: Param |
---|
599 | pre-conditions: |
---|
600 | Ticks: |
---|
601 | - Valid |
---|
602 | Routine: |
---|
603 | - Valid |
---|
604 | Id: |
---|
605 | - Valid |
---|
606 | Context: |
---|
607 | - Interrupt |
---|
608 | Clock: |
---|
609 | - Ticks |
---|
610 | - Realtime |
---|
611 | State: |
---|
612 | - Inactive |
---|
613 | - Scheduled |
---|
614 | - enabled-by: true |
---|
615 | post-conditions: NotExist |
---|
616 | pre-conditions: |
---|
617 | Ticks: all |
---|
618 | Routine: all |
---|
619 | Id: all |
---|
620 | Context: |
---|
621 | - None |
---|
622 | Clock: |
---|
623 | - None |
---|
624 | State: |
---|
625 | - Scheduled |
---|
626 | - Pending |
---|
627 | - enabled-by: true |
---|
628 | post-conditions: NotExist |
---|
629 | pre-conditions: |
---|
630 | Ticks: all |
---|
631 | Routine: all |
---|
632 | Id: all |
---|
633 | Context: |
---|
634 | - None |
---|
635 | Clock: |
---|
636 | - Ticks |
---|
637 | - Realtime |
---|
638 | State: all |
---|
639 | - enabled-by: true |
---|
640 | post-conditions: NotExist |
---|
641 | pre-conditions: |
---|
642 | Ticks: all |
---|
643 | Routine: all |
---|
644 | Id: all |
---|
645 | Context: |
---|
646 | - Interrupt |
---|
647 | - Server |
---|
648 | Clock: |
---|
649 | - None |
---|
650 | State: all |
---|
651 | - enabled-by: true |
---|
652 | post-conditions: NotExist |
---|
653 | pre-conditions: |
---|
654 | Ticks: all |
---|
655 | Routine: all |
---|
656 | Id: all |
---|
657 | Context: |
---|
658 | - Interrupt |
---|
659 | Clock: |
---|
660 | - Ticks |
---|
661 | - Realtime |
---|
662 | State: |
---|
663 | - Pending |
---|
664 | - enabled-by: true |
---|
665 | post-conditions: |
---|
666 | Status: InvId |
---|
667 | Context: Nop |
---|
668 | Clock: Nop |
---|
669 | State: Nop |
---|
670 | Interval: Nop |
---|
671 | Routine: Nop |
---|
672 | UserData: Nop |
---|
673 | pre-conditions: |
---|
674 | Ticks: |
---|
675 | - Valid |
---|
676 | Routine: |
---|
677 | - Valid |
---|
678 | Id: |
---|
679 | - Invalid |
---|
680 | Context: |
---|
681 | - None |
---|
682 | Clock: |
---|
683 | - None |
---|
684 | State: |
---|
685 | - Inactive |
---|
686 | - enabled-by: true |
---|
687 | post-conditions: |
---|
688 | Status: InvId |
---|
689 | Context: Nop |
---|
690 | Clock: Nop |
---|
691 | State: Nop |
---|
692 | Interval: Nop |
---|
693 | Routine: Nop |
---|
694 | UserData: Nop |
---|
695 | pre-conditions: |
---|
696 | Ticks: |
---|
697 | - Valid |
---|
698 | Routine: |
---|
699 | - Valid |
---|
700 | Id: |
---|
701 | - Invalid |
---|
702 | Context: |
---|
703 | - Server |
---|
704 | Clock: |
---|
705 | - Ticks |
---|
706 | - Realtime |
---|
707 | State: all |
---|
708 | - enabled-by: true |
---|
709 | post-conditions: |
---|
710 | Status: InvId |
---|
711 | Context: Nop |
---|
712 | Clock: Nop |
---|
713 | State: Nop |
---|
714 | Interval: Nop |
---|
715 | Routine: Nop |
---|
716 | UserData: Nop |
---|
717 | pre-conditions: |
---|
718 | Ticks: |
---|
719 | - Valid |
---|
720 | Routine: |
---|
721 | - Valid |
---|
722 | Id: |
---|
723 | - Invalid |
---|
724 | Context: |
---|
725 | - Interrupt |
---|
726 | Clock: |
---|
727 | - Ticks |
---|
728 | - Realtime |
---|
729 | State: |
---|
730 | - Inactive |
---|
731 | - Scheduled |
---|
732 | - enabled-by: true |
---|
733 | post-conditions: |
---|
734 | Status: InvAddr |
---|
735 | Context: Nop |
---|
736 | Clock: Nop |
---|
737 | State: Nop |
---|
738 | Interval: Nop |
---|
739 | Routine: Nop |
---|
740 | UserData: Nop |
---|
741 | pre-conditions: |
---|
742 | Ticks: |
---|
743 | - Valid |
---|
744 | Routine: |
---|
745 | - 'Null' |
---|
746 | Id: all |
---|
747 | Context: |
---|
748 | - None |
---|
749 | Clock: |
---|
750 | - None |
---|
751 | State: |
---|
752 | - Inactive |
---|
753 | - enabled-by: true |
---|
754 | post-conditions: |
---|
755 | Status: InvAddr |
---|
756 | Context: Nop |
---|
757 | Clock: Nop |
---|
758 | State: Nop |
---|
759 | Interval: Nop |
---|
760 | Routine: Nop |
---|
761 | UserData: Nop |
---|
762 | pre-conditions: |
---|
763 | Ticks: |
---|
764 | - Valid |
---|
765 | Routine: |
---|
766 | - 'Null' |
---|
767 | Id: all |
---|
768 | Context: |
---|
769 | - Server |
---|
770 | Clock: |
---|
771 | - Ticks |
---|
772 | - Realtime |
---|
773 | State: all |
---|
774 | - enabled-by: true |
---|
775 | post-conditions: |
---|
776 | Status: InvAddr |
---|
777 | Context: Nop |
---|
778 | Clock: Nop |
---|
779 | State: Nop |
---|
780 | Interval: Nop |
---|
781 | Routine: Nop |
---|
782 | UserData: Nop |
---|
783 | pre-conditions: |
---|
784 | Ticks: |
---|
785 | - Valid |
---|
786 | Routine: |
---|
787 | - 'Null' |
---|
788 | Id: all |
---|
789 | Context: |
---|
790 | - Interrupt |
---|
791 | Clock: |
---|
792 | - Ticks |
---|
793 | - Realtime |
---|
794 | State: |
---|
795 | - Inactive |
---|
796 | - Scheduled |
---|
797 | - enabled-by: true |
---|
798 | post-conditions: |
---|
799 | Status: InvNum |
---|
800 | Context: Nop |
---|
801 | Clock: Nop |
---|
802 | State: Nop |
---|
803 | Interval: Nop |
---|
804 | Routine: Nop |
---|
805 | UserData: Nop |
---|
806 | pre-conditions: |
---|
807 | Ticks: |
---|
808 | - Is0 |
---|
809 | Routine: all |
---|
810 | Id: all |
---|
811 | Context: |
---|
812 | - None |
---|
813 | Clock: |
---|
814 | - None |
---|
815 | State: |
---|
816 | - Inactive |
---|
817 | - enabled-by: true |
---|
818 | post-conditions: |
---|
819 | Status: InvNum |
---|
820 | Context: Nop |
---|
821 | Clock: Nop |
---|
822 | State: Nop |
---|
823 | Interval: Nop |
---|
824 | Routine: Nop |
---|
825 | UserData: Nop |
---|
826 | pre-conditions: |
---|
827 | Ticks: |
---|
828 | - Is0 |
---|
829 | Routine: all |
---|
830 | Id: all |
---|
831 | Context: |
---|
832 | - Server |
---|
833 | Clock: |
---|
834 | - Ticks |
---|
835 | - Realtime |
---|
836 | State: all |
---|
837 | - enabled-by: true |
---|
838 | post-conditions: |
---|
839 | Status: InvNum |
---|
840 | Context: Nop |
---|
841 | Clock: Nop |
---|
842 | State: Nop |
---|
843 | Interval: Nop |
---|
844 | Routine: Nop |
---|
845 | UserData: Nop |
---|
846 | pre-conditions: |
---|
847 | Ticks: |
---|
848 | - Is0 |
---|
849 | Routine: all |
---|
850 | Id: all |
---|
851 | Context: |
---|
852 | - Interrupt |
---|
853 | Clock: |
---|
854 | - Ticks |
---|
855 | - Realtime |
---|
856 | State: |
---|
857 | - Inactive |
---|
858 | - Scheduled |
---|
859 | type: requirement |
---|