summaryrefslogtreecommitdiffstats
path: root/spec/testsuites/validation/classic-barrier.yml
blob: d72b49ae8f675433a5b50aa5ecdda1cfe1cebf1a (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
SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
actions:
- action: |
    id = 0xffffffff;
    sc = rtems_barrier_create(name, RTEMS_BARRIER_AUTOMATIC_RELEASE, 1, &id);
  checks:
  - check: |
      T_step_rsc_success(${step}, sc);
    description: |
      Check that the barrier creation was successful.
    links: []
  description: |
    Set an object identifier to an invalid value and create an automatic
    release barrier object for one task.
  links: []
- action: |
    id2 = 0xffffffff;
    sc = rtems_barrier_ident(name, &id2);
  checks:
  - check: |
      T_step_rsc_success(${step}, sc);
    description: |
      Check that the barrier identification by name was successful.
    links: []
  - check: |
      T_step_eq_u32(${step}, id, id2);
    description: |
      Check that the second identifier is equal to the one returned by the
      barrier creation.
    links: []
  description: |
    Set a second object identifier to an invalid value and identify a barrier
    object by its name.
  links: []
- action: |
    released = 1;
    sc = rtems_barrier_release(id, &released);
  checks:
  - check: |
      T_step_rsc_success(${step}, sc);
    description: |
      Check that the barrier release was successful.
    links: []
  - check: |
      T_step_eq_u32(${step}, released, 0);
    description: |
      Check that the count of released tasks is zero.
    links: []
  description: |
    Set the count of released tasks to one and release the barrier.
  links: []
- action: |
    sc = rtems_barrier_wait(id, RTEMS_NO_TIMEOUT);
  checks:
  - check: |
      T_step_rsc_success(${step}, sc);
    description: |
      Check that the barrier wait was successful.
    links: []
  description: |
    Wait with an infinite timeout for the barrier.
  links: []
brief: |
  This test case calls functions of the Barrier Manager which are included in
  the space profile.
copyrights:
- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
description: null
enabled-by: true
epilogue: |
  T_check_rtems_barriers(T_EVENT_RUN_INITIALIZE_EARLY, T_case_name());
fixture: null
includes:
- rtems.h
links: []
local-includes: []
prologue: |
  static const rtems_name name = rtems_build_name('B', 'A', 'R', 'R');
  rtems_status_code sc;
  rtems_id id;
  rtems_id id2;
  uint32_t released;
support: null
target: testsuites/validation/tc-space-profile.c
test-header: null
type: test-case