summaryrefslogtreecommitdiffstats
path: root/spec/rtems/intr/val/intr-non-smp.yml
blob: 5598582cbf69b541e5b65f3521e088fb7b4f6121 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
copyrights:
- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
enabled-by:
  not: RTEMS_SMP
links: []
test-actions:
- action-brief: |
    Validate some interrupt lock macros.
  action-code: |
    const char *s;
  checks:
  - brief: |
      Check that ${../if/lock-declare:/name} expands to white space only.
    code: |
      s = RTEMS_XSTRING( RTEMS_INTERRUPT_LOCK_DECLARE( x, y ) );
      T_true( IsWhiteSpaceOnly( s ) );
    links:
    - role: validation
      uid: ../if/lock-declare
    - role: validation
      uid: ../req/lock-white-space
  - brief: |
      Check that ${../if/lock-define:/name} expands to white space only.
    code: |
      s = RTEMS_XSTRING( RTEMS_INTERRUPT_LOCK_DEFINE( x, y, z ) );
      T_true( IsWhiteSpaceOnly( s ) );
    links:
    - role: validation
      uid: ../if/lock-define
    - role: validation
      uid: ../req/lock-white-space
  - brief: |
      Check that ${../if/lock-member:/name} expands to white space only.
    code: |
      s = RTEMS_XSTRING( RTEMS_INTERRUPT_LOCK_MEMBER( x ) );
      T_true( IsWhiteSpaceOnly( s ) );
    links:
    - role: validation
      uid: ../if/lock-member
    - role: validation
      uid: ../req/lock-white-space
  - brief: |
      Check that ${../if/lock-reference:/name} expands to white space only.
    code: |
      s = RTEMS_XSTRING( RTEMS_INTERRUPT_LOCK_REFERENCE( x, y ) );
      T_true( IsWhiteSpaceOnly( s ) );
    links:
    - role: validation
      uid: ../if/lock-reference
    - role: validation
      uid: ../req/lock-white-space
  - brief: |
      Check that ${../if/lock-destroy:/name} expands to white space only.
    code: |
      s = RTEMS_XSTRING( rtems_interrupt_lock_destroy( x ) );
      T_true( IsWhiteSpaceOnly( s ) );
    links:
    - role: validation
      uid: ../if/lock-destroy
    - role: validation
      uid: ../req/lock-white-space
  - brief: |
      Check that ${../if/lock-initializer:/name} expands to an empty structure
      initializer.
    code: |
      s = RTEMS_XSTRING( RTEMS_INTERRUPT_LOCK_INITIALIZER( x ) );
      T_true( IsEqualIgnoreWhiteSpace( s, "{}" ) );
    links:
    - role: validation
      uid: ../if/lock-initializer
    - role: validation
      uid: ../req/lock-empty-initializer
  - brief: |
      Check that ${../if/lock-initialize:/name} expands to white space only.
    code: |
      s = RTEMS_XSTRING( rtems_interrupt_lock_initialize( x, y ) );
      T_true( IsWhiteSpaceOnly( s ) );
    links:
    - role: validation
      uid: ../if/lock-initialize
    - role: validation
      uid: ../req/lock-white-space
  - brief: |
      Check that ${../if/lock-acquire-isr:/name} expands to a code block which
      marks the second parameter as used.
    code: |
      s = RTEMS_XSTRING( rtems_interrupt_lock_acquire_isr( x, y ) );
      T_true( IsEqualIgnoreWhiteSpace( s, "do{(void)y;}while(0)" ) );
    links:
    - role: validation
      uid: ../if/lock-acquire-isr
    - role: validation
      uid: ../req/lock-use-context
  - brief: |
      Check that ${../if/lock-release-isr:/name} expands to a code block which
      marks the second parameter as used.
    code: |
      s = RTEMS_XSTRING( rtems_interrupt_lock_release_isr( x, y ) );
      T_true( IsEqualIgnoreWhiteSpace( s, "do{(void)y;}while(0)" ) );
    links:
    - role: validation
      uid: ../if/lock-release-isr
    - role: validation
      uid: ../req/lock-use-context
  links: []
test-brief: |
  Tests some ${../if/group:/name} interfaces.
test-context: []
test-context-support: null
test-description: null
test-header: null
test-includes:
- rtems.h
test-local-includes:
- tx-support.h
test-setup: null
test-stop: null
test-support: null
test-target: testsuites/validation/tc-intr-non-smp.c
test-teardown: null
type: test-case