source: rtems-central/spec/rtems/timer/req/delete.yml

Last change on this file was 940b7ea6, checked in by Sebastian Huber <sebastian.huber@…>, on 05/19/23 at 05:26:09

Update company name

The embedded brains GmbH & Co. KG is the legal successor of embedded
brains GmbH.

  • Property mode set to 100644
File size: 2.9 KB
Line 
1SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
2copyrights:
3- Copyright (C) 2021 embedded brains GmbH & Co. KG
4enabled-by: true
5functional-type: action
6links:
7- role: interface-function
8  uid: ../if/delete
9post-conditions:
10- name: Status
11  states:
12  - name: Ok
13    test-code: |
14      ctx->timer_id = 0;
15      T_rsc_success( ctx->status );
16    text: |
17      The return status of ${../if/delete:/name} shall be
18      ${../../status/if/successful:/name}.
19  - name: InvId
20    test-code: |
21      T_rsc( ctx->status, RTEMS_INVALID_ID );
22    text: |
23      The return status of ${../if/delete:/name} shall be
24      ${../../status/if/invalid-id:/name}.
25  test-epilogue: null
26  test-prologue: null
27- name: Name
28  states:
29  - name: Valid
30    test-code: |
31      id = 0;
32      sc = rtems_timer_ident( NAME, &id );
33      T_rsc_success( sc );
34      T_eq_u32( id, ctx->timer_id );
35    text: |
36      The unique object name shall identify a timer.
37  - name: Invalid
38    test-code: |
39      sc = rtems_timer_ident( NAME, &id );
40      T_rsc( sc, RTEMS_INVALID_NAME );
41    text: |
42      The unique object name shall not identify a timer.
43  test-epilogue: null
44  test-prologue: |
45    rtems_status_code sc;
46    rtems_id          id;
47pre-conditions:
48- name: Id
49  states:
50  - name: NoObj
51    test-code: |
52      ctx->id = 0;
53    text: |
54      While the ${../if/delete:/params[0]/name} parameter is not associated
55      with a timer.
56  - name: Timer
57    test-code: |
58      ctx->id = ctx->timer_id;
59    text: |
60      While the ${../if/delete:/params[0]/name} parameter is associated with
61      a timer.
62  test-epilogue: null
63  test-prologue: null
64rationale: null
65references: []
66requirement-type: functional
67skip-reasons: {}
68test-action: |
69  ctx->status = rtems_timer_delete( ctx->id );
70test-brief: null
71test-cleanup: null
72test-context:
73- brief: null
74  description: null
75  member: |
76    rtems_id timer_id
77- brief: null
78  description: null
79  member: |
80    rtems_id id
81- brief: null
82  description: null
83  member: |
84    rtems_status_code status
85test-context-support: null
86test-description: null
87test-header: null
88test-includes:
89- rtems.h
90- string.h
91test-local-includes: []
92test-prepare: |
93  if ( ctx->timer_id == 0 ) {
94    rtems_status_code sc;
95
96    sc = rtems_timer_create( NAME, &ctx->timer_id );
97    T_rsc_success( sc );
98  }
99test-setup:
100  brief: null
101  code: |
102    memset( ctx, 0, sizeof( *ctx ) );
103  description: null
104test-stop: null
105test-support: |
106  #define NAME rtems_build_name( 'T', 'E', 'S', 'T' )
107test-target: testsuites/validation/tc-timer-delete.c
108test-teardown:
109  brief: null
110  code: |
111    if ( ctx->timer_id != 0 ) {
112      rtems_status_code sc;
113
114      sc = rtems_timer_delete( ctx->timer_id );
115      T_rsc_success( sc );
116    }
117  description: null
118text: ${.:text-template}
119transition-map:
120- enabled-by: true
121  post-conditions:
122    Status: Ok
123    Name: Invalid
124  pre-conditions:
125    Id:
126    - Timer
127- enabled-by: true
128  post-conditions:
129    Status: InvId
130    Name: Valid
131  pre-conditions:
132    Id:
133    - NoObj
134type: requirement
Note: See TracBrowser for help on using the repository browser.