summaryrefslogtreecommitdiffstats
path: root/spec/rtems/event/val/send-receive.yml
blob: f3d67209555fdb1a48fc56d0f6b4467fca59267e (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
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/receive
- role: validation
  uid: ../req/send
test-actions:
- action: |
    ${../req/send-receive:/test-run}(
      EventSend,
      EventReceive,
      GetPendingEvents,
      THREAD_WAIT_CLASS_EVENT,
      STATES_WAITING_FOR_EVENT
    );
  checks: []
  description: |
    Run the event send and receive tests for the application event set defined
    by ${../req/send-receive}.
  links: []
test-brief: |
  Tests the ${../if/send:/name} and ${../if/receive:/name} directives.
test-description: null
test-epilogue: null
test-fixture: null
test-header: null
test-includes:
- rtems/rtems/eventimpl.h
- rtems/rtems/tasksdata.h
- rtems/score/statesimpl.h
- rtems/score/threadimpl.h
test-local-includes:
- tr-event-send-receive.h
test-prologue: null
test-support: |
  static rtems_status_code EventSend(
    rtems_id        id,
    rtems_event_set event_in
  )
  {
    return rtems_event_send( id, event_in );
  }

  static rtems_status_code EventReceive(
    rtems_id         event_in,
    rtems_option     option_set,
    rtems_interval   ticks,
    rtems_event_set *event_out
  )
  {
    return rtems_event_receive( event_in, option_set, ticks, event_out );
  }

  static rtems_event_set GetPendingEvents( Thread_Control *thread )
  {
    RTEMS_API_Control *api;

    api = thread->API_Extensions[ THREAD_API_RTEMS ];
    return api->Event.pending_events;
  }
test-target: testsuites/validation/tc-event-send-receive.c
type: test-case