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
|
SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
copyrights:
- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
enabled-by: true
links:
- role: validation
uid: ../req/perf-runtime
params:
buffer-count: 100
sample-count: 1000
test-brief: |
This test case provides a context to run Partition Manager performance tests.
test-cleanup: null
test-context:
- brief: |
This member provides a partition with exactly one free buffer.
description: null
member: |
rtems_id part_one
- brief: |
This member provides a partition with exactly ${.:/params/buffer-count}
free buffers.
description: null
member: |
rtems_id part_many
- brief: |
This member provides a status code.
description: null
member: |
rtems_status_code status
- brief: |
This member provides a buffer pointer.
description: null
member: |
void *buffer
- brief: |
This member provides a second buffer pointer.
description: null
member: |
void *buffer_2
test-context-support: null
test-description: null
test-includes:
- rtems.h
- rtems/chain.h
test-local-includes: []
test-prepare: null
test-setup:
brief: |
Creates the test partition.
code: |
rtems_status_code sc;
size_t size;
void *area;
uintptr_t length;
size = sizeof( rtems_chain_node );
area = T_malloc( size );
sc = rtems_partition_create(
rtems_build_name( ' ', 'O', 'N', 'E' ),
area,
size,
size,
RTEMS_DEFAULT_ATTRIBUTES,
&ctx->part_one
);
T_assert_rsc_success( sc );
length = ${.:/params/buffer-count} * size;
area = T_malloc( length );
sc = rtems_partition_create(
rtems_build_name( 'M', 'A', 'N', 'Y' ),
area,
length,
size,
RTEMS_DEFAULT_ATTRIBUTES,
&ctx->part_many
);
T_assert_rsc_success( sc );
description: null
test-stop: null
test-support: null
test-target: testsuites/validation/tc-part-performance.c
test-teardown:
brief: |
Deletes the test partition.
code: |
rtems_status_code sc;
if ( ctx->part_one != 0 ) {
sc = rtems_partition_delete( ctx->part_one );
T_rsc_success( sc );
}
if ( ctx->part_many != 0 ) {
sc = rtems_partition_delete( ctx->part_many );
T_rsc_success( sc );
}
description: null
type: runtime-measurement-test
|