summaryrefslogtreecommitdiffstats
path: root/spec/rtems/event/req/event-constant.yml
diff options
context:
space:
mode:
Diffstat (limited to 'spec/rtems/event/req/event-constant.yml')
-rw-r--r--spec/rtems/event/req/event-constant.yml391
1 files changed, 391 insertions, 0 deletions
diff --git a/spec/rtems/event/req/event-constant.yml b/spec/rtems/event/req/event-constant.yml
new file mode 100644
index 00000000..d1e0b84e
--- /dev/null
+++ b/spec/rtems/event/req/event-constant.yml
@@ -0,0 +1,391 @@
+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: []
+test-actions:
+- action: |
+ /* No action */
+ checks:
+ - check: |
+ T_step_eq_u32( ${step}, event, ( (rtems_event_set) 1 ) << number );
+ description: |
+ Check that the event constant is equal to the event number bit in the
+ event set.
+ links: []
+ - check: |
+ T_step_eq_u32( ${step}, event & RTEMS_PENDING_EVENTS, 0 );
+ description: |
+ Check that the event number bit of the event constant is not set in
+ RTEMS_PENDING_EVENTS.
+ links: []
+ description: |
+ Validate the event constant.
+ links: []
+- action: |
+ out = RTEMS_ALL_EVENTS;
+ sc = rtems_event_receive(
+ RTEMS_PENDING_EVENTS,
+ RTEMS_DEFAULT_OPTIONS,
+ 0,
+ &out
+ );
+ checks:
+ - check: |
+ T_step_rsc_success( ${step}, sc );
+ description: |
+ Check that the directive call was successful.
+ links: []
+ - check: |
+ T_step_eq_u32( ${step}, out, 0 );
+ description: |
+ Check that there were no pending events.
+ links: []
+ description: |
+ Get all pending events of the Classic event set of the executing task.
+ links: []
+- action: |
+ out = RTEMS_ALL_EVENTS;
+ sc = rtems_event_system_receive(
+ RTEMS_PENDING_EVENTS,
+ RTEMS_DEFAULT_OPTIONS,
+ 0,
+ &out
+ );
+ checks:
+ - check: |
+ T_step_rsc_success( ${step}, sc );
+ description: |
+ Check that the directive call was successful.
+ links: []
+ - check: |
+ T_step_eq_u32( ${step}, out, 0 );
+ description: |
+ Check that there were no pending events.
+ links: []
+ description: |
+ Get all pending events of the system event set of the executing task.
+ links: []
+- action: |
+ out = RTEMS_ALL_EVENTS;
+ sc = rtems_event_receive(
+ RTEMS_ALL_EVENTS,
+ RTEMS_NO_WAIT | RTEMS_EVENT_ANY,
+ 0,
+ &out
+ );
+ checks:
+ - check: |
+ T_step_rsc( ${step}, sc, RTEMS_UNSATISFIED );
+ description: |
+ Check that the directive call was unsatisfied.
+ links: []
+ - check: |
+ T_step_eq_u32( ${step}, out, 0 );
+ description: |
+ Check that there were no events received.
+ links: []
+ description: |
+ Receive all pending events of the Classic event set of the executing task.
+ links: []
+- action: |
+ out = RTEMS_ALL_EVENTS;
+ sc = rtems_event_system_receive(
+ RTEMS_ALL_EVENTS,
+ RTEMS_NO_WAIT | RTEMS_EVENT_ANY,
+ 0,
+ &out
+ );
+ checks:
+ - check: |
+ T_step_rsc( ${step}, sc, RTEMS_UNSATISFIED );
+ description: |
+ Check that the directive call was unsatisfied.
+ links: []
+ - check: |
+ T_step_eq_u32( ${step}, out, 0 );
+ description: |
+ Check that there were no events received.
+ links: []
+ description: |
+ Receive all pending events of the system event set of the executing task.
+ links: []
+- action: |
+ sc = rtems_event_send( RTEMS_SELF, event );
+ checks:
+ - check: |
+ T_step_rsc_success( ${step}, sc );
+ description: |
+ Check that the directive call was successful.
+ links: []
+ description: |
+ Send the event to the Classic event set of the executing task.
+ links: []
+- action: |
+ out = RTEMS_ALL_EVENTS;
+ sc = rtems_event_receive(
+ RTEMS_PENDING_EVENTS,
+ RTEMS_DEFAULT_OPTIONS,
+ 0,
+ &out
+ );
+ checks:
+ - check: |
+ T_step_rsc_success( ${step}, sc );
+ description: |
+ Check that the directive call was successful.
+ links: []
+ - check: |
+ T_step_eq_u32( ${step}, out, event );
+ description: |
+ Check that the pending event is equal to the event sent by a previous
+ action.
+ links: []
+ description: |
+ Get all pending events of the Classic event set of the executing task.
+ links: []
+- action: |
+ out = RTEMS_ALL_EVENTS;
+ sc = rtems_event_system_receive(
+ RTEMS_PENDING_EVENTS,
+ RTEMS_DEFAULT_OPTIONS,
+ 0,
+ &out
+ );
+ checks:
+ - check: |
+ T_step_rsc_success( ${step}, sc );
+ description: |
+ Check that the directive call was successful.
+ links: []
+ - check: |
+ T_step_eq_u32( ${step}, out, 0 );
+ description: |
+ Check that there were no pending events.
+ links: []
+ description: |
+ Get all pending events of the system event set of the executing task.
+ links: []
+- action: |
+ out = 0;
+ sc = rtems_event_receive(
+ RTEMS_ALL_EVENTS,
+ RTEMS_NO_WAIT | RTEMS_EVENT_ANY,
+ 0,
+ &out
+ );
+ checks:
+ - check: |
+ T_step_rsc_success( ${step}, sc );
+ description: |
+ Check that the directive call was successful.
+ links: []
+ - check: |
+ T_step_eq_u32( ${step}, out, event );
+ description: |
+ Check that the received event is equal to the event sent by a previous
+ action.
+ links: []
+ description: |
+ Receive any event of the Classic event set of the executing task.
+ links: []
+- action: |
+ out = RTEMS_ALL_EVENTS;
+ sc = rtems_event_system_receive(
+ RTEMS_ALL_EVENTS,
+ RTEMS_NO_WAIT | RTEMS_EVENT_ANY,
+ 0,
+ &out
+ );
+ checks:
+ - check: |
+ T_step_rsc( ${step}, sc, RTEMS_UNSATISFIED );
+ description: |
+ Check that the directive call was unsatisfied.
+ links: []
+ - check: |
+ T_step_eq_u32( ${step}, out, 0 );
+ description: |
+ Check that the no events were received.
+ links: []
+ description: |
+ Receive any event of the system event set of the executing task.
+ links: []
+- action: |
+ sc = rtems_event_system_send( RTEMS_SELF, event );
+ checks:
+ - check: |
+ T_step_rsc_success( ${step}, sc );
+ description: |
+ Check that the directive call was successful.
+ links: []
+ description: |
+ Send the event to the Classic event set of the executing task.
+ links: []
+- action: |
+ out = RTEMS_ALL_EVENTS;
+ sc = rtems_event_receive(
+ RTEMS_PENDING_EVENTS,
+ RTEMS_DEFAULT_OPTIONS,
+ 0,
+ &out
+ );
+ checks:
+ - check: |
+ T_step_rsc_success( ${step}, sc );
+ description: |
+ Check that the directive call was successful.
+ links: []
+ - check: |
+ T_step_eq_u32( ${step}, out, 0 );
+ description: |
+ Check that there were no pending events.
+ links: []
+ description: |
+ Get all pending events of the Classic event set of the executing task.
+ links: []
+- action: |
+ out = RTEMS_ALL_EVENTS;
+ sc = rtems_event_system_receive(
+ RTEMS_PENDING_EVENTS,
+ RTEMS_DEFAULT_OPTIONS,
+ 0,
+ &out
+ );
+ checks:
+ - check: |
+ T_step_rsc_success( ${step}, sc );
+ description: |
+ Check that the directive call was successful.
+ links: []
+ - check: |
+ T_step_eq_u32( ${step}, out, event );
+ description: |
+ Check that the pending event is equal to the event sent by a previous
+ action.
+ links: []
+ description: |
+ Get all pending events of the system event set of the executing task.
+ links: []
+- action: |
+ out = RTEMS_ALL_EVENTS;
+ sc = rtems_event_receive(
+ RTEMS_ALL_EVENTS,
+ RTEMS_NO_WAIT | RTEMS_EVENT_ANY,
+ 0,
+ &out
+ );
+ checks:
+ - check: |
+ T_step_rsc( ${step}, sc, RTEMS_UNSATISFIED );
+ description: |
+ Check that the directive call was unsatisfied.
+ links: []
+ - check: |
+ T_step_eq_u32( ${step}, out, 0 );
+ description: |
+ Check that the no events were received.
+ links: []
+ description: |
+ Receive any event of the Classic event set of the executing task.
+ links: []
+- action: |
+ out = 0;
+ sc = rtems_event_system_receive(
+ RTEMS_ALL_EVENTS,
+ RTEMS_NO_WAIT | RTEMS_EVENT_ANY,
+ 0,
+ &out
+ );
+ checks:
+ - check: |
+ T_step_rsc_success( ${step}, sc );
+ description: |
+ Check that the directive call was successful.
+ links: []
+ - check: |
+ T_step_eq_u32( ${step}, out, event );
+ description: |
+ Check that the received event is equal to the event sent by a previous
+ action.
+ links: []
+ description: |
+ Receive any event of the system event set of the executing task.
+ links: []
+- action: |
+ out = RTEMS_ALL_EVENTS;
+ sc = rtems_event_receive(
+ RTEMS_PENDING_EVENTS,
+ RTEMS_DEFAULT_OPTIONS,
+ 0,
+ &out
+ );
+ checks:
+ - check: |
+ T_step_rsc_success( ${step}, sc );
+ description: |
+ Check that the directive call was successful.
+ links: []
+ - check: |
+ T_step_eq_u32( ${step}, out, 0 );
+ description: |
+ Check that there were no pending events.
+ links: []
+ description: |
+ Get all pending events of the Classic event set of the executing task.
+ links: []
+- action: |
+ out = RTEMS_ALL_EVENTS;
+ sc = rtems_event_system_receive(
+ RTEMS_PENDING_EVENTS,
+ RTEMS_DEFAULT_OPTIONS,
+ 0,
+ &out
+ );
+ checks:
+ - check: |
+ T_step_rsc_success( ${step}, sc );
+ description: |
+ Check that the directive call was successful.
+ links: []
+ - check: |
+ T_step_eq_u32( ${step}, out, 0 );
+ description: |
+ Check that there were no pending events.
+ links: []
+ description: |
+ Get all pending events of the system event set of the executing task.
+ links: []
+test-brief: |
+ Tests an event constant and number of the Event Manager using the Classic and
+ system event sets of the executing task.
+test-description: null
+test-epilogue: null
+test-fixture: null
+test-header:
+ code: null
+ includes:
+ - rtems.h
+ local-includes: []
+ run-params:
+ - description: |
+ is the event constant.
+ dir: null
+ name: event
+ specifier: rtems_event_set ${.:name}
+ - description: |
+ is the event number.
+ dir: null
+ name: number
+ specifier: int ${.:name}
+ target: testsuites/validation/tr-event-constant.h
+test-includes:
+- rtems.h
+test-local-includes:
+- tr-event-constant.h
+test-prologue: |
+ rtems_status_code sc;
+ rtems_event_set out;
+test-support: null
+test-target: testsuites/validation/tr-event-constant.c
+type: test-case