blob: 0a80c6703f0a1b500980a68579bc144f5f6d16d6 (
plain)
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
|
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: bsps/sparc/leon3
links: []
test-actions:
- action-brief: |
The test action is carried out by the OccupyClockInterrupt() system
initialization handler.
action-code: |
/* Nothing to do */
checks:
- brief: |
Check that the expected fatal source is present.
code: |
T_step_eq_int( ${.:/step}, ctx->source, RTEMS_FATAL_SOURCE_BSP );
links:
- role: validation
uid: ../req/fatal-clock-initialization
- brief: |
Check that the expected fatal code is present.
code: |
T_step_eq_ulong(
${.:/step},
ctx->code,
LEON3_FATAL_CLOCK_INITIALIZATION
);
links:
- role: validation
uid: ../req/fatal-clock-initialization
links: []
test-brief: |
Tests a fatal error.
test-context: []
test-context-support: null
test-description: null
test-header:
code: null
freestanding: true
includes:
- rtems.h
local-includes: []
run-params:
- description: |
is fatal source.
dir: null
name: source
specifier: ${/rtems/userext/if/fatal-source:/name} ${.:name}
- description: |
is fatal code.
dir: null
name: code
specifier: ${/rtems/userext/if/fatal-code:/name} ${.:name}
target: testsuites/validation/tr-fatal-bsp-sparc-leon3-clock-initialization.h
test-includes:
- rtems/irq-extension.h
- rtems/sysinit.h
- bsp/fatal.h
- bsp/leon3.h
test-local-includes:
- tr-fatal-bsp-sparc-leon3-clock-initialization.h
test-setup: null
test-stop: null
test-support: |
static void ClockInterrupt( void *arg )
{
(void) arg;
}
static rtems_interrupt_entry interrupt_entry = RTEMS_INTERRUPT_ENTRY_INITIALIZER(
ClockInterrupt,
NULL,
"Clock"
);
static void OccupyClockInterrupt( void )
{
rtems_vector_number vector;
vector = GPTIMER_CONFIG_IRQ_GET( grlib_load_32( &LEON3_Timer_Regs->config ) );
(void) rtems_interrupt_entry_install(
vector,
RTEMS_INTERRUPT_UNIQUE,
&interrupt_entry
);
}
RTEMS_SYSINIT_ITEM(
OccupyClockInterrupt,
RTEMS_SYSINIT_DEVICE_DRIVERS,
RTEMS_SYSINIT_ORDER_FIRST
);
test-target: testsuites/validation/tr-fatal-bsp-sparc-leon3-clock-initialization.c
test-teardown: null
type: test-case
|