blob: 25f0aa42f7631a87476d2cc20112dfc1223edf1b (
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
|
SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
copyrights:
- Copyright (C) 2021 embedded brains GmbH & Co. KG
enabled-by: true
links: []
test-actions:
- action-brief: |
Validate the signal constant.
action-code: |
/* No action */
checks:
- brief: |
Check that the signal constant is equal to the integer representation of
the signal in the signal set.
code: |
T_step_eq_u32(
${.:/step},
ctx->signal,
( (rtems_signal_set) 1 ) << ctx->number
);
links:
- role: validation
uid: ../req/signal-constant
- role: validation
uid: ../req/signal-number
links: []
- action-brief: |
Validate the signal delivery.
action-code: |
rtems_status_code sc;
ctx->signal_set = 0;
sc = rtems_signal_catch( NULL, RTEMS_DEFAULT_MODES );
T_step_rsc_success( ${.:/step}, sc );
sc = rtems_signal_catch( SignalHandler, RTEMS_NO_ASR );
T_step_rsc_success( ${.:/step}, sc );
sc = rtems_signal_send( RTEMS_SELF, ctx->signal );
T_step_rsc_success( ${.:/step}, sc );
checks:
- brief: |
Check that the caught signal set represents exactly the sent signal.
code: |
T_step_eq_u32(
${.:/step},
ctx->signal_set,
ctx->signal
);
links:
- role: validation
uid: ../req/signal-delivery
links: []
test-brief: |
Tests a signal constant of the ${../if/group:/name} using the signal set of
the executing task.
test-context:
- brief: |
This member contains the caught signal set.
description: null
member: |
rtems_signal_set signal_set
test-context-support: null
test-description: null
test-header:
code: null
freestanding: false
includes:
- rtems.h
local-includes: []
run-params:
- description: |
is the signal constant.
dir: null
name: signal
specifier: rtems_signal_set ${.:name}
- description: |
is the signal number.
dir: null
name: number
specifier: int ${.:name}
target: testsuites/validation/tr-signal-constant.h
test-includes:
- rtems.h
test-local-includes:
- tr-signal-constant.h
test-setup: null
test-stop: null
test-support: |
typedef ${.:/test-context-type} Context;
static void SignalHandler( rtems_signal_set signal_set )
{
Context *ctx;
ctx = T_fixture_context();
ctx->signal_set = signal_set;
}
test-target: testsuites/validation/tr-signal-constant.c
test-teardown: null
type: test-case
|