summaryrefslogtreecommitdiffstats
path: root/spec/req
diff options
context:
space:
mode:
Diffstat (limited to 'spec/req')
-rw-r--r--spec/req/applconfig.yml15
-rw-r--r--spec/req/rtems/attr/bit-set.yml15
-rw-r--r--spec/req/rtems/attr/default.yml14
-rw-r--r--spec/req/rtems/attr/semaphore-class.yml17
-rw-r--r--spec/req/rtems/attr/unique.yml14
-rw-r--r--spec/req/rtems/attr/val/attr.yml278
-rw-r--r--spec/req/rtems/barrier/ident.yml15
-rw-r--r--spec/req/rtems/barrier/val/ident.yml47
-rw-r--r--spec/req/rtems/event/receive.yml15
-rw-r--r--spec/req/rtems/event/send-receive.yml1001
-rw-r--r--spec/req/rtems/event/send.yml15
-rw-r--r--spec/req/rtems/event/system-receive.yml15
-rw-r--r--spec/req/rtems/event/system-send.yml15
-rw-r--r--spec/req/rtems/event/val/event-constant.yml391
-rw-r--r--spec/req/rtems/event/val/events.yml96
-rw-r--r--spec/req/rtems/event/val/send-receive.yml66
-rw-r--r--spec/req/rtems/event/val/system-send-receive.yml71
-rw-r--r--spec/req/rtems/ident-local.yml165
-rw-r--r--spec/req/rtems/ident.yml257
-rw-r--r--spec/req/rtems/message/ident.yml15
-rw-r--r--spec/req/rtems/message/val/ident.yml49
-rw-r--r--spec/req/rtems/modes/bit-set.yml15
-rw-r--r--spec/req/rtems/modes/default.yml14
-rw-r--r--spec/req/rtems/modes/masks-all.yml16
-rw-r--r--spec/req/rtems/modes/masks-unique.yml14
-rw-r--r--spec/req/rtems/modes/masks.yml16
-rw-r--r--spec/req/rtems/modes/unique.yml14
-rw-r--r--spec/req/rtems/modes/val/modes.yml242
-rw-r--r--spec/req/rtems/options/bit-set.yml15
-rw-r--r--spec/req/rtems/options/default.yml14
-rw-r--r--spec/req/rtems/options/unique.yml14
-rw-r--r--spec/req/rtems/options/val/options.yml117
-rw-r--r--spec/req/rtems/part/ident.yml15
-rw-r--r--spec/req/rtems/part/val/ident.yml51
-rw-r--r--spec/req/rtems/ratemon/ident.yml15
-rw-r--r--spec/req/rtems/ratemon/val/ident.yml45
-rw-r--r--spec/req/rtems/sem/ident.yml15
-rw-r--r--spec/req/rtems/sem/val/ident.yml49
-rw-r--r--spec/req/rtems/tasks/construct-errors.yml499
-rw-r--r--spec/req/rtems/tasks/ident.yml123
-rw-r--r--spec/req/rtems/timer/ident.yml15
-rw-r--r--spec/req/rtems/timer/val/ident.yml45
-rw-r--r--spec/req/rtems/userext/ident.yml15
-rw-r--r--spec/req/rtems/userext/val/ident.yml47
-rw-r--r--spec/req/system.yml12
45 files changed, 27 insertions, 3996 deletions
diff --git a/spec/req/applconfig.yml b/spec/req/applconfig.yml
new file mode 100644
index 00000000..a8ec5ea1
--- /dev/null
+++ b/spec/req/applconfig.yml
@@ -0,0 +1,15 @@
+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: requirement-refinement
+ uid: ../if/api
+non-functional-type: interface-requirement
+rationale: null
+references: []
+requirement-type: non-functional
+text: |
+ The system shall provide configuration options to the application to set
+ configurable system parameters at link time.
+type: requirement
diff --git a/spec/req/rtems/attr/bit-set.yml b/spec/req/rtems/attr/bit-set.yml
deleted file mode 100644
index a3711c40..00000000
--- a/spec/req/rtems/attr/bit-set.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-SPDX-License-Identifier: CC-BY-SA-4.0
-copyrights:
-- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
-enabled-by: true
-links:
-- role: requirement-refinement
- uid: /if/rtems/attr/group
-non-functional-type: interface
-rationale: null
-references: []
-requirement-type: non-functional
-text: |
- Each non-default directive attribute constant shall be a power of two
- representable as an integer of type ${/if/rtems/attr/attribute}.
-type: requirement
diff --git a/spec/req/rtems/attr/default.yml b/spec/req/rtems/attr/default.yml
deleted file mode 100644
index 5a628b85..00000000
--- a/spec/req/rtems/attr/default.yml
+++ /dev/null
@@ -1,14 +0,0 @@
-SPDX-License-Identifier: CC-BY-SA-4.0
-copyrights:
-- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
-enabled-by: true
-links:
-- role: requirement-refinement
- uid: /if/rtems/attr/group
-non-functional-type: interface
-rationale: null
-references: []
-requirement-type: non-functional
-text: |
- Each default directive attribute constant shall have a value of zero.
-type: requirement
diff --git a/spec/req/rtems/attr/semaphore-class.yml b/spec/req/rtems/attr/semaphore-class.yml
deleted file mode 100644
index fa85d7bd..00000000
--- a/spec/req/rtems/attr/semaphore-class.yml
+++ /dev/null
@@ -1,17 +0,0 @@
-SPDX-License-Identifier: CC-BY-SA-4.0
-copyrights:
-- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
-enabled-by: true
-links:
-- role: requirement-refinement
- uid: /if/rtems/attr/semaphore-class
-non-functional-type: interface
-rationale: null
-references: []
-requirement-type: non-functional
-text: |
- The ${/if/rtems/attr/semaphore-class:/name} constant shall be equal to the
- bitwise or of ${/if/rtems/attr/binary-semaphore:/name},
- ${/if/rtems/attr/counting-semaphore:/name}, and
- ${/if/rtems/attr/simple-binary-semaphore:/name}.
-type: requirement
diff --git a/spec/req/rtems/attr/unique.yml b/spec/req/rtems/attr/unique.yml
deleted file mode 100644
index d8da776d..00000000
--- a/spec/req/rtems/attr/unique.yml
+++ /dev/null
@@ -1,14 +0,0 @@
-SPDX-License-Identifier: CC-BY-SA-4.0
-copyrights:
-- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
-enabled-by: true
-links:
-- role: requirement-refinement
- uid: /if/rtems/attr/group
-non-functional-type: interface
-rationale: null
-references: []
-requirement-type: non-functional
-text: |
- The non-default directive attribute constants shall have unique values.
-type: requirement
diff --git a/spec/req/rtems/attr/val/attr.yml b/spec/req/rtems/attr/val/attr.yml
deleted file mode 100644
index 22594b12..00000000
--- a/spec/req/rtems/attr/val/attr.yml
+++ /dev/null
@@ -1,278 +0,0 @@
-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_true( ${step}, IsPowerOfTwo( RTEMS_BARRIER_MANUAL_RELEASE ) );
- description: |
- Check that RTEMS_BARRIER_MANUAL_RELEASE is a power of two.
- links:
- - role: validation
- uid: ../bit-set
- - role: validation
- uid: /if/rtems/attr/barrier-manual-release
- - check: |
- T_step_true( ${step}, IsPowerOfTwo( RTEMS_BINARY_SEMAPHORE ) );
- description: |
- Check that RTEMS_BINARY_SEMAPHORE is a power of two.
- links:
- - role: validation
- uid: ../bit-set
- - role: validation
- uid: /if/rtems/attr/binary-semaphore
- - check: |
- T_step_true( ${step}, IsPowerOfTwo( RTEMS_FLOATING_POINT ) );
- description: |
- Check that RTEMS_FLOATING_POINT is a power of two.
- links:
- - role: validation
- uid: ../bit-set
- - role: validation
- uid: /if/rtems/attr/floating-point
- - check: |
- T_step_true( ${step}, IsPowerOfTwo( RTEMS_GLOBAL ) );
- description: |
- Check that RTEMS_GLOBAL is a power of two.
- links:
- - role: validation
- uid: ../bit-set
- - role: validation
- uid: /if/rtems/attr/global
- - check: |
- T_step_true( ${step}, IsPowerOfTwo( RTEMS_INHERIT_PRIORITY ) );
- description: |
- Check that RTEMS_INHERIT_PRIORITY is a power of two.
- links:
- - role: validation
- uid: ../bit-set
- - role: validation
- uid: /if/rtems/attr/inherit-priority
- - check: |
- T_step_true(
- ${step},
- IsPowerOfTwo( RTEMS_MULTIPROCESSOR_RESOURCE_SHARING )
- );
- description: |
- Check that RTEMS_MULTIPROCESSOR_RESOURCE_SHARING is a power of two.
- links:
- - role: validation
- uid: ../bit-set
- - role: validation
- uid: /if/rtems/attr/multiprocessor-resource-sharing
- - check: |
- T_step_true( ${step}, IsPowerOfTwo( RTEMS_PRIORITY ) );
- description: |
- Check that RTEMS_PRIORITY is a power of two.
- links:
- - role: validation
- uid: ../bit-set
- - role: validation
- uid: /if/rtems/attr/priority
- - check: |
- T_step_true( ${step}, IsPowerOfTwo( RTEMS_PRIORITY_CEILING ) );
- description: |
- Check that RTEMS_PRIORITY_CEILING is a power of two.
- links:
- - role: validation
- uid: ../bit-set
- - role: validation
- uid: /if/rtems/attr/priority-ceiling
- - check: |
- T_step_true( ${step}, IsPowerOfTwo( RTEMS_SIMPLE_BINARY_SEMAPHORE ) );
- description: |
- Check that RTEMS_SIMPLE_BINARY_SEMAPHORE is a power of two.
- links:
- - role: validation
- uid: ../bit-set
- - role: validation
- uid: /if/rtems/attr/simple-binary-semaphore
- - check: |
- T_step_true( ${step}, IsPowerOfTwo( RTEMS_SYSTEM_TASK ) );
- description: |
- Check that RTEMS_SYSTEM_TASK is a power of two.
- links:
- - role: validation
- uid: ../bit-set
- - role: validation
- uid: /if/rtems/attr/system-task
- description: |
- Validate the non-default attribute constants.
- links: []
-- action: |
- /* No action */
- checks:
- - check: |
- T_step_eq_u32( ${step}, RTEMS_APPLICATION_TASK, 0 );
- description: |
- Check that RTEMS_APPLICATION_TASK is equal to zero.
- links:
- - role: validation
- uid: ../default
- - role: validation
- uid: /if/rtems/attr/application-task
- - check: |
- T_step_eq_u32( ${step}, RTEMS_BARRIER_MANUAL_RELEASE, 0 );
- description: |
- Check that RTEMS_BARRIER_MANUAL_RELEASE is equal to zero.
- links:
- - role: validation
- uid: ../default
- - role: validation
- uid: /if/rtems/attr/barrier-manual-release
- - check: |
- T_step_eq_u32( ${step}, RTEMS_COUNTING_SEMAPHORE, 0 );
- description: |
- Check that RTEMS_COUNTING_SEMAPHORE is equal to zero.
- links:
- - role: validation
- uid: ../default
- - role: validation
- uid: /if/rtems/attr/counting-semaphore
- - check: |
- T_step_eq_u32( ${step}, RTEMS_DEFAULT_ATTRIBUTES, 0 );
- description: |
- Check that RTEMS_DEFAULT_ATTRIBUTES is equal to zero.
- links:
- - role: validation
- uid: ../default
- - role: validation
- uid: /if/rtems/attr/default
- - check: |
- T_step_eq_u32( ${step}, RTEMS_FIFO, 0 );
- description: |
- Check that RTEMS_FIFO is equal to zero.
- links:
- - role: validation
- uid: ../default
- - role: validation
- uid: /if/rtems/attr/fifo
- - check: |
- T_step_eq_u32( ${step}, RTEMS_LOCAL, 0 );
- description: |
- Check that RTEMS_LOCAL is equal to zero.
- links:
- - role: validation
- uid: ../default
- - role: validation
- uid: /if/rtems/attr/local
- - check: |
- T_step_eq_u32( ${step}, RTEMS_NO_FLOATING_POINT, 0 );
- description: |
- Check that RTEMS_NO_FLOATING_POINT is equal to zero.
- links:
- - role: validation
- uid: ../default
- - role: validation
- uid: /if/rtems/attr/no-floating-point
- - check: |
- T_step_eq_u32( ${step}, RTEMS_NO_INHERIT_PRIORITY, 0 );
- description: |
- Check that RTEMS_NO_INHERIT_PRIORITY is equal to zero.
- links:
- - role: validation
- uid: ../default
- - role: validation
- uid: /if/rtems/attr/no-inherit-priority
- - check: |
- T_step_eq_u32( ${step}, RTEMS_NO_MULTIPROCESSOR_RESOURCE_SHARING, 0 );
- description: |
- Check that RTEMS_NO_MULTIPROCESSOR_RESOURCE_SHARING is equal to zero.
- links:
- - role: validation
- uid: ../default
- - role: validation
- uid: /if/rtems/attr/no-multiprocessor-resource-sharing
- - check: |
- T_step_eq_u32( ${step}, RTEMS_NO_PRIORITY_CEILING, 0 );
- description: |
- Check that RTEMS_NO_PRIORITY_CEILING is equal to zero.
- links:
- - role: validation
- uid: ../default
- - role: validation
- uid: /if/rtems/attr/no-priority-ceiling
- description: |
- Validate the default attribute constants.
- links: []
-- action: |
- attributes = 0;
- attributes |= RTEMS_BARRIER_AUTOMATIC_RELEASE;
- attributes |= RTEMS_BINARY_SEMAPHORE;
- attributes |= RTEMS_FLOATING_POINT;
- attributes |= RTEMS_GLOBAL;
- attributes |= RTEMS_INHERIT_PRIORITY;
- attributes |= RTEMS_MULTIPROCESSOR_RESOURCE_SHARING;
- attributes |= RTEMS_PRIORITY;
- attributes |= RTEMS_PRIORITY_CEILING;
- attributes |= RTEMS_SEMAPHORE_CLASS;
- attributes |= RTEMS_SIMPLE_BINARY_SEMAPHORE;
- attributes |= RTEMS_SYSTEM_TASK;
- checks:
- - check: |
- T_step_eq_int( ${step}, PopCount( attributes ), 10 );
- description: |
- Check that the count of set bits in the calculated value is equal to the
- count of non-default attribute constants. Since each non-default
- attribute constant is a power of two, this proves that each constant has
- a unique value.
- links:
- - role: validation
- uid: ../unique
- description: |
- Calculate the bitwise or of all non-default attribute constants.
- links: []
-- action: |
- attributes = 0;
- attributes |= RTEMS_BINARY_SEMAPHORE;
- attributes |= RTEMS_COUNTING_SEMAPHORE;
- attributes |= RTEMS_SIMPLE_BINARY_SEMAPHORE;
- checks:
- - check: |
- T_step_eq_u32( ${step}, RTEMS_SEMAPHORE_CLASS, attributes );
- description: |
- Check that the calculated value is equal to RTEMS_SEMAPHORE_CLASS.
- links:
- - role: validation
- uid: ../semaphore-class
- description: |
- Calculate the bitwise or of the RTEMS_BINARY_SEMAPHORE,
- RTEMS_COUNTING_SEMAPHORE, and RTEMS_SIMPLE_BINARY_SEMAPHORE attribute
- constants.
- links: []
-test-brief: |
- Tests the attribute constants of the Classic API.
-test-description: null
-test-epilogue: null
-test-fixture: null
-test-header: null
-test-includes:
-- rtems.h
-test-local-includes: []
-test-prologue: |
- rtems_attribute attributes;
-test-support: |
- static bool IsPowerOfTwo( rtems_attribute attribute )
- {
- return attribute != 0 && ( attribute & ( attribute - 1 ) ) == 0;
- }
-
- static int PopCount( rtems_attribute attributes )
- {
- int count;
-
- count = 0;
-
- while ( attributes != 0 ) {
- ++count;
- attributes &= attributes - 1;
- }
-
- return count;
- }
-test-target: testsuites/validation/tc-attr.c
-type: test-case
diff --git a/spec/req/rtems/barrier/ident.yml b/spec/req/rtems/barrier/ident.yml
deleted file mode 100644
index 502f35bf..00000000
--- a/spec/req/rtems/barrier/ident.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-SPDX-License-Identifier: CC-BY-SA-4.0
-copyrights:
-- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
-enabled-by: true
-functional-type: function
-links:
-- role: interface-function
- uid: /if/rtems/barrier/ident
-rationale: null
-references: []
-requirement-type: functional
-text: |
- The ${/if/rtems/barrier/ident:/name} directive shall identify an Classic API
- barrier class object by its name as specified by ${../ident-local}.
-type: requirement
diff --git a/spec/req/rtems/barrier/val/ident.yml b/spec/req/rtems/barrier/val/ident.yml
deleted file mode 100644
index 3272ff6b..00000000
--- a/spec/req/rtems/barrier/val/ident.yml
+++ /dev/null
@@ -1,47 +0,0 @@
-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: ../ident
-test-actions:
-- action: |
- ${../../ident-local:/test-run}(
- id_local_object,
- ClassicBarrierIdentAction
- );
- checks: []
- description: |
- Run the generic object identification tests for Classic API partition class
- objects defined by ${../../ident-local}.
- links: []
-test-brief: Test the ${/if/rtems/barrier/ident:/name} directive.
-test-description: null
-test-epilogue: null
-test-fixture: null
-test-header: null
-test-includes: []
-test-local-includes:
-- tr-object-ident-local.h
-test-prologue: |
- rtems_status_code sc;
- rtems_id id_local_object;
-
- sc = rtems_barrier_create(
- ClassicObjectLocalIdentName,
- RTEMS_DEFAULT_ATTRIBUTES,
- 1,
- &id_local_object
- );
- T_assert_rsc_success( sc );
-test-support: |
- static rtems_status_code ClassicBarrierIdentAction(
- rtems_name name,
- rtems_id *id
- )
- {
- return rtems_barrier_ident( name, id );
- }
-test-target: testsuites/validation/tc-barrier-ident.c
-type: test-case
diff --git a/spec/req/rtems/event/receive.yml b/spec/req/rtems/event/receive.yml
deleted file mode 100644
index a880dac5..00000000
--- a/spec/req/rtems/event/receive.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-SPDX-License-Identifier: CC-BY-SA-4.0
-copyrights:
-- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
-enabled-by: true
-functional-type: function
-links:
-- role: interface-function
- uid: /if/rtems/event/receive
-rationale: null
-references: []
-requirement-type: functional
-text: |
- The ${/if/rtems/event/receive:/name} directive shall receive events from the
- application event set of a task as specified by ${send-receive}.
-type: requirement
diff --git a/spec/req/rtems/event/send-receive.yml b/spec/req/rtems/event/send-receive.yml
deleted file mode 100644
index 5723e57e..00000000
--- a/spec/req/rtems/event/send-receive.yml
+++ /dev/null
@@ -1,1001 +0,0 @@
-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
-functional-type: action
-links: []
-post-conditions:
-- name: SendStatus
- states:
- - name: Ok
- test-code: |
- T_rsc_success( ctx->send_status );
- text: |
- The send event status shall be RTEMS_SUCCESSFUL.
- - name: InvId
- test-code: |
- T_rsc( ctx->send_status, RTEMS_INVALID_ID );
- text: |
- The send event status shall be RTEMS_INVALID_ID.
- test-epilogue: null
- test-prologue: null
-- name: ReceiveStatus
- states:
- - name: None
- test-code: |
- T_eq_int( ctx->receive_condition_state, RECEIVE_COND_UNKNOWN );
- T_eq_u32( GetPendingEvents( ctx ), 0 );
- text: |
- There shall be no pending events.
- - name: Pending
- test-code: |
- T_eq_int( ctx->receive_condition_state, RECEIVE_COND_UNKNOWN );
- T_eq_u32( GetPendingEvents( ctx ), ctx->events_to_send );
- text: |
- All events sent shall be pending.
- - name: Timeout
- test-code: |
- T_rsc( ctx->receive_status, RTEMS_TIMEOUT );
- T_eq_int( ctx->receive_condition_state, RECEIVE_COND_UNKNOWN );
- T_eq_u32( GetPendingEvents( ctx ), ctx->events_to_send );
- text: |
- The receive event status shall be RTEMS_TIMEOUT. All events sent after
- the timeout shall be pending.
- - name: Satisfied
- test-code: |
- T_rsc( ctx->receive_status, RTEMS_SUCCESSFUL );
-
- if ( ctx->receive_type != RECEIVE_NORMAL ) {
- T_eq_int( ctx->receive_condition_state, RECEIVE_COND_SATSIFIED );
- }
-
- T_eq_u32( ctx->received_events, ctx->events_to_send & INPUT_EVENTS );
- T_eq_u32( GetPendingEvents( ctx ), ctx->events_to_send & ~INPUT_EVENTS );
- text: |
- The receive event status shall be RTEMS_SUCCESSFUL. The received events
- shall be equal to the input events sent. The pending events shall be
- equal to the events sent which are not included in the input events.
- - name: Unsatisfied
- test-code: |
- T_rsc( ctx->receive_status, RTEMS_UNSATISFIED );
- T_eq_int( ctx->receive_condition_state, RECEIVE_COND_UNKNOWN );
- T_eq_u32( GetPendingEvents( ctx ), ctx->events_to_send );
- text: |
- The receive event status shall be RTEMS_UNSATISFIED. All sent events
- shall be pending.
- - name: Blocked
- test-code: |
- T_eq_int( ctx->receive_condition_state, RECEIVE_COND_UNSATISFIED );
- T_eq_u32( ctx->unsatisfied_pending, ctx->events_to_send );
- text: |
- The receiver task shall remain blocked waiting for events after the
- directive call. All sent events shall be pending.
- test-epilogue: null
- test-prologue: null
-- name: SenderPreemption
- states:
- - name: 'No'
- test-code: |
- /*
- * There may be a thread switch to the runner thread if the sender thread
- * was on another scheduler instance.
- */
-
- T_le_sz( log->recorded, 1 );
-
- for ( i = 0; i < log->recorded; ++i ) {
- T_ne_u32( log->events[ i ].executing, ctx->worker_id );
- T_eq_u32( log->events[ i ].heir, ctx->runner_id );
- }
- text: |
- There shall be no sender preemption.
- - name: 'Yes'
- test-code: |
- T_eq_sz( log->recorded, 2 );
- T_eq_u32( log->events[ 0 ].heir, ctx->runner_id );
- T_eq_u32( log->events[ 1 ].heir, ctx->worker_id );
- text: |
- There shall be a sender preemption.
- test-epilogue: null
- test-prologue: |
- T_thread_switch_log *log;
- size_t i;
-
- log = &ctx->thread_switch_log.log;
-pre-conditions:
-- name: Id
- states:
- - name: InvId
- test-code: |
- ctx->receiver_id = 0xffffffff;
- ctx->sender_type = SENDER_SELF;
- text: |
- The id parameter of the send directive shall be an invalid task object
- identifier.
- - name: Task
- test-code: |
- ctx->receiver_id = ctx->runner_id;
- text: |
- The id parameter of the send directive shall be a valid task object
- identifier.
- test-epilogue: null
- test-prologue: null
-- name: Send
- states:
- - name: Zero
- test-code: |
- ctx->events_to_send = 0;
- text: |
- The event set sent shall be the empty.
- - name: Unrelated
- test-code: |
- ctx->events_to_send = RTEMS_EVENT_7;
- text: |
- The event set sent shall be unrelated to the event receive condition.
- - name: Any
- test-code: |
- ctx->events_to_send = RTEMS_EVENT_5;
- text: |
- The event set sent shall be contain at least one but not all events of
- the event receive condition.
- - name: All
- test-code: |
- ctx->events_to_send = RTEMS_EVENT_5 | RTEMS_EVENT_23;
- text: |
- The event set sent shall be contain all events of the event receive condition.
- - name: MixedAny
- test-code: |
- ctx->events_to_send = RTEMS_EVENT_5 | RTEMS_EVENT_7;
- text: |
- The event set sent shall be contain at least one but not all events of
- the event receive condition and at least one unrelated event.
- - name: MixedAll
- test-code: |
- ctx->events_to_send = RTEMS_EVENT_5 | RTEMS_EVENT_7 | RTEMS_EVENT_23;
- text: |
- The event set sent shall be contain all events of the event receive
- condition and at least one unrelated event.
- test-epilogue: null
- test-prologue: null
-- name: ReceiverState
- states:
- - name: NotWaiting
- test-code: |
- ctx->sender_type = SENDER_SELF;
- ctx->receive_type = RECEIVE_SKIP;
- text: |
- The receiver task shall not be waiting for events.
- - name: Poll
- test-code: |
- ctx->sender_type = SENDER_SELF;
- ctx->receive_type = RECEIVE_NORMAL;
- ctx->receive_option_set |= RTEMS_NO_WAIT;
- text: |
- The receiver task shall poll for events.
- - name: Timeout
- test-code: |
- ctx->sender_type = SENDER_SELF_2;
- ctx->receive_type = RECEIVE_NORMAL;
- ctx->receive_timeout = 1;
- text: |
- The receiver task shall have waited for events with a timeout which
- occurred.
- - name: Lower
- test-code: |
- ctx->sender_type = SENDER_WORKER;
- ctx->sender_prio = PRIO_HIGH;
- ctx->receive_type = RECEIVE_NORMAL;
- text: |
- The receiver task shall be blocked waiting for events and the receiver
- task shall have a lower priority than the sender task.
- - name: Equal
- test-code: |
- ctx->sender_type = SENDER_WORKER;
- ctx->sender_prio = PRIO_NORMAL;
- ctx->receive_type = RECEIVE_NORMAL;
- text: |
- The receiver task shall be blocked waiting for events and the receiver
- task shall have a priority equal to the sender task.
- - name: Higher
- test-code: |
- ctx->sender_type = SENDER_WORKER;
- ctx->sender_prio = PRIO_LOW;
- ctx->receive_type = RECEIVE_NORMAL;
- text: |
- The receiver task shall be blocked waiting for events and the receiver
- task shall have a higher priority than the sender task.
- - name: Other
- test-code: |
- ctx->sender_type = SENDER_WORKER;
- ctx->sender_prio = PRIO_OTHER;
- ctx->receive_type = RECEIVE_NORMAL;
- text: |
- The receiver task shall be blocked waiting for events and the receiver
- task shall be on another scheduler instance than the sender task.
- - name: Intend
- test-code: |
- ctx->sender_type = SENDER_INTERRUPT;
- ctx->receive_type = RECEIVE_INTERRUPT;
- text: |
- The receiver task shall intend to block for waiting for events.
- test-epilogue: null
- test-prologue: null
-- name: Satisfy
- states:
- - name: All
- test-code: |
- ctx->receive_option_set |= RTEMS_EVENT_ALL;
- text: |
- The receiver task shall be interested in all input events.
- - name: Any
- test-code: |
- ctx->receive_option_set |= RTEMS_EVENT_ANY;
- text: |
- The receiver task shall be interested in any input event.
- test-epilogue: null
- test-prologue: null
-rationale: null
-references: []
-requirement-type: functional
-skip-reasons:
- NoOtherScheduler: |
- In non-SMP configurations, there exists exactly one scheduler instance.
-test-action: |
- if ( ctx->sender_type == SENDER_SELF ) {
- SendAction( ctx );
- } else if ( ctx->sender_type == SENDER_WORKER ) {
- Wakeup( ctx->worker_wakeup );
- }
-
- if ( ctx->receive_type == RECEIVE_NORMAL ) {
- ctx->receive_status = ( *ctx->receive )(
- INPUT_EVENTS,
- ctx->receive_option_set,
- ctx->receive_timeout,
- &ctx->received_events
- );
- } else if ( ctx->receive_type == RECEIVE_INTERRUPT ) {
- T_interrupt_test_state state;
-
- state = T_interrupt_test( &InterruptConfig, ctx );
- T_eq_int( state, T_INTERRUPT_TEST_DONE );
- }
-
- if ( ctx->sender_type == SENDER_SELF_2 ) {
- SendAction( ctx );
- } else if ( ctx->sender_type == SENDER_WORKER ) {
- rtems_status_code sc;
- rtems_task_priority prio;
-
- Wait( ctx->runner_wakeup );
-
- prio = 0;
- sc = rtems_task_set_priority( ctx->worker_id, PRIO_LOW, &prio );
- T_rsc_success( sc );
- T_eq_u32( prio, PRIO_HIGH );
- }
-test-brief: null
-test-cleanup: |
- rtems_status_code sc;
- rtems_event_set events;
-
- events = 0;
- sc = ( *ctx->receive )(
- RTEMS_ALL_EVENTS,
- RTEMS_NO_WAIT | RTEMS_EVENT_ANY,
- 0,
- &events
- );
- if ( sc == RTEMS_SUCCESSFUL ) {
- T_quiet_ne_u32( events, 0 );
- } else {
- T_quiet_rsc( sc, RTEMS_UNSATISFIED );
- T_quiet_eq_u32( events, 0 );
- }
-test-context:
-- brief: |
- This member defines the sender type to perform the event send action.
- description: null
- member: SenderTypes sender_type
-- brief: |
- This member defines the sender task priority.
- description: null
- member: Priorities sender_prio
-- brief: |
- This member defines the receiver ID used for the event send action.
- description: null
- member: rtems_id receiver_id
-- brief: |
- This member defines the events to send for the event send action.
- description: null
- member: rtems_event_set events_to_send
-- brief: |
- This member contains the status of the event send action.
- description: null
- member: rtems_status_code send_status
-- brief: |
- This member contains the scheduler ID of the runner task.
- description: null
- member: ReceiveTypes receive_type
-- brief: |
- This member defines the option set used for the event receive action.
- description: null
- member: rtems_option receive_option_set
-- brief: |
- This member defines the timeout used for the event receive action.
- description: null
- member: rtems_interval receive_timeout
-- brief: |
- This member contains the events received by the event receive action.
- description: null
- member: rtems_event_set received_events
-- brief: |
- This member contains the status of the event receive action.
- description: null
- member: rtems_status_code receive_status
-- brief: |
- This member contains the event conditon state of the receiver task after
- the event send action.
- description: null
- member: ReceiveConditionStates receive_condition_state
-- brief: |
- This member contains the pending events after an event send action which
- did not satsify the event condition of the receiver.
- description: null
- member: rtems_event_set unsatisfied_pending
-- brief: |
- This member contains the TCB of the runner task.
- description: null
- member: Thread_Control *runner_thread
-- brief: |
- This member contains the ID of the runner task.
- description: null
- member: rtems_id runner_id
-- brief: |
- This member contains the task ID of the worker task.
- description: null
- member: rtems_id worker_id
-- brief: |
- This member contains the ID of the semaphore used to wake up the worker
- task.
- description: null
- member: rtems_id worker_wakeup
-- brief: |
- This member contains the ID of the semaphore used to wake up the runner
- task.
- description: null
- member: rtems_id runner_wakeup
-- brief: |
- This member contains the scheduler ID of scheduler used by the runner task.
- description: null
- member: rtems_id runner_sched
-- brief: |
- This member contains the scheduler ID of another scheduler which is not
- used by the runner task.
- description: null
- member: rtems_id other_sched
-- brief: |
- This member contains the thread switch log.
- description: null
- member: T_thread_switch_log_4 thread_switch_log
-test-context-support: |
- typedef enum {
- PRIO_HIGH = 1,
- PRIO_NORMAL,
- PRIO_LOW,
- PRIO_OTHER
- } Priorities;
-
- typedef enum {
- SENDER_NONE,
- SENDER_SELF,
- SENDER_SELF_2,
- SENDER_WORKER,
- SENDER_INTERRUPT
- } SenderTypes;
-
- typedef enum {
- RECEIVE_SKIP,
- RECEIVE_NORMAL,
- RECEIVE_INTERRUPT
- } ReceiveTypes;
-
- typedef enum {
- RECEIVE_COND_UNKNOWN,
- RECEIVE_COND_SATSIFIED,
- RECEIVE_COND_UNSATISFIED
- } ReceiveConditionStates;
-test-description: null
-test-header:
- code: null
- includes:
- - rtems.h
- - rtems/score/thread.h
- local-includes: []
- run-params:
- - description: |
- is the event send handler.
- dir: null
- name: send
- specifier: rtems_status_code ( *${.:name} )( rtems_id, rtems_event_set )
- - description: |
- is the event receive handler.
- dir: null
- name: receive
- specifier: |
- rtems_status_code ( *${.:name} )( rtems_event_set, rtems_option, rtems_interval, rtems_event_set * )
- - description: |
- is the get pending events handler.
- dir: null
- name: get_pending_events
- specifier: rtems_event_set ( *${.:name} )( Thread_Control * )
- - description: |
- is the thread wait class.
- dir: null
- name: wait_class
- specifier: unsigned int ${.:name}
- - description: |
- is the thread waiting for event state.
- dir: null
- name: waiting_for_event
- specifier: int ${.:name}
- target: testsuites/validation/tr-event-send-receive.h
-test-includes:
-- rtems/score/threadimpl.h
-test-local-includes:
-- tr-event-send-receive.h
-test-prepare: |
- ctx->events_to_send = 0;
- ctx->send_status = RTEMS_INCORRECT_STATE;
- ctx->received_events = 0xffffffff;
- ctx->receive_option_set = 0;
- ctx->receive_timeout = RTEMS_NO_TIMEOUT;
- ctx->sender_type = SENDER_NONE;
- ctx->sender_prio = PRIO_NORMAL;
- ctx->receive_type = RECEIVE_SKIP;
- ctx->receive_condition_state = RECEIVE_COND_UNKNOWN;
- ctx->unsatisfied_pending = 0xffffffff;
- memset( &ctx->thread_switch_log, 0, sizeof( ctx->thread_switch_log ) );
- T_eq_u32( GetPendingEvents( ctx ), 0 );
- _Thread_Wait_flags_set( ctx->runner_thread, THREAD_WAIT_FLAGS_INITIAL );
-test-setup:
- brief: null
- code: |
- static char task_storage[ RTEMS_MINIMUM_STACK_SIZE ];
- static const rtems_task_config task_config = {
- .name = rtems_build_name( 'W', 'O', 'R', 'K' ),
- .initial_priority = PRIO_LOW,
- .storage_area = task_storage,
- .storage_size = sizeof( task_storage ),
- .initial_modes = RTEMS_DEFAULT_MODES,
- .attributes = RTEMS_DEFAULT_ATTRIBUTES
- };
-
- rtems_status_code sc;
- rtems_task_priority prio;
-
- memset( ctx, 0, sizeof( *ctx ) );
- ctx->runner_thread = _Thread_Get_executing();
- ctx->runner_id = ctx->runner_thread->Object.id;
- ctx->worker_wakeup = CreateWakeupSema();
- ctx->runner_wakeup = CreateWakeupSema();
-
- sc = rtems_task_get_scheduler( RTEMS_SELF, &ctx->runner_sched );
- T_rsc_success( sc );
-
- #if defined(RTEMS_SMP)
- sc = rtems_scheduler_ident_by_processor( 1, &ctx->other_sched );
- T_rsc_success( sc );
- T_ne_u32( ctx->runner_sched, ctx->other_sched );
- #endif
-
- prio = 0;
- sc = rtems_task_set_priority( RTEMS_SELF, PRIO_NORMAL, &prio );
- T_rsc_success( sc );
- T_eq_u32( prio, PRIO_HIGH );
-
- sc = rtems_task_build( &task_config, &ctx->worker_id );
- T_assert_rsc_success( sc );
-
- sc = rtems_task_start( ctx->worker_id, Worker, (rtems_task_argument) ctx );
- T_assert_rsc_success( sc );
- description: null
-test-stop: null
-test-support: |
- #define INPUT_EVENTS ( RTEMS_EVENT_5 | RTEMS_EVENT_23 )
-
- typedef ReqRtemsEventSendReceive_Context Context;
-
- static rtems_id CreateWakeupSema( void )
- {
- rtems_status_code sc;
- rtems_id id;
-
- sc = rtems_semaphore_create(
- rtems_build_name( 'W', 'K', 'U', 'P' ),
- 0,
- RTEMS_SIMPLE_BINARY_SEMAPHORE,
- 0,
- &id
- );
- T_assert_rsc_success( sc );
-
- return id;
- }
-
- static void DeleteWakeupSema( rtems_id id )
- {
- if ( id != 0 ) {
- rtems_status_code sc;
-
- sc = rtems_semaphore_delete( id );
- T_rsc_success( sc );
- }
- }
-
- static void Wait( rtems_id id )
- {
- rtems_status_code sc;
-
- sc = rtems_semaphore_obtain( id, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
- T_quiet_rsc_success( sc );
- }
-
- static void Wakeup( rtems_id id )
- {
- rtems_status_code sc;
-
- sc = rtems_semaphore_release( id );
- T_quiet_rsc_success( sc );
- }
-
- static bool BlockedForEvent( Context *ctx, Thread_Wait_flags flags )
- {
- return flags == ( ctx->wait_class | THREAD_WAIT_STATE_BLOCKED );
- }
-
- static bool IntendsToBlockForEvent( Context *ctx, Thread_Wait_flags flags )
- {
- return flags == ( ctx->wait_class | THREAD_WAIT_STATE_INTEND_TO_BLOCK );
- }
-
- static bool EventReadyAgain( Context *ctx, Thread_Wait_flags flags )
- {
- return flags == ( ctx->wait_class | THREAD_WAIT_STATE_READY_AGAIN );
- }
-
- static bool IsSatisfiedFlags( Context *ctx )
- {
- return EventReadyAgain(
- ctx,
- _Thread_Wait_flags_get( ctx->runner_thread )
- );
- }
-
- static bool IsSatisfiedState( Context *ctx )
- {
- return ctx->runner_thread->current_state != ctx->waiting_for_event;
- }
-
- static void SendAction( Context *ctx )
- {
- T_thread_switch_log *log;
-
- log = T_thread_switch_record_4( &ctx->thread_switch_log );
- T_quiet_null( log );
- ctx->send_status = ( *ctx->send )( ctx->receiver_id, ctx->events_to_send );
- log = T_thread_switch_record( NULL );
- T_quiet_eq_ptr( log, &ctx->thread_switch_log.log );
- }
-
- static void Send(
- Context *ctx,
- bool ( *is_satsified )( Context * )
- )
- {
- SendAction( ctx );
-
- if ( ( *is_satsified )( ctx ) ) {
- ctx->receive_condition_state = RECEIVE_COND_SATSIFIED;
- } else {
- rtems_status_code sc;
- rtems_event_set pending;
- rtems_event_set missing;
-
- ctx->receive_condition_state = RECEIVE_COND_UNSATISFIED;
- pending = ( *ctx->get_pending_events )( ctx->runner_thread );
- ctx->unsatisfied_pending = pending;
-
- missing = INPUT_EVENTS & ~ctx->events_to_send;
- T_ne_u32( missing, 0 );
- sc = ( *ctx->send )( ctx->runner_id, missing );
- T_rsc_success( sc );
-
- pending = ( *ctx->get_pending_events )( ctx->runner_thread );
- T_eq_u32( pending, ctx->events_to_send & ~INPUT_EVENTS );
- }
- }
-
- static void Worker( rtems_task_argument arg )
- {
- Context *ctx;
-
- ctx = (Context *) arg;
-
- while ( true ) {
- rtems_status_code sc;
- rtems_task_priority prio;
-
- Wait( ctx->worker_wakeup );
-
- switch ( ctx->sender_prio ) {
- case PRIO_NORMAL:
- case PRIO_HIGH:
- prio = 0;
- sc = rtems_task_set_priority( RTEMS_SELF, ctx->sender_prio, &prio );
- T_rsc_success( sc );
- T_eq_u32( prio, PRIO_LOW );
- break;
- case PRIO_OTHER:
- sc = rtems_task_set_scheduler(
- RTEMS_SELF,
- ctx->other_sched,
- PRIO_LOW
- );
- T_rsc_success( sc );
- break;
- case PRIO_LOW:
- break;
- }
-
- Send( ctx, IsSatisfiedState );
-
- sc = rtems_task_set_scheduler(
- RTEMS_SELF,
- ctx->runner_sched,
- PRIO_HIGH
- );
- T_rsc_success( sc );
-
- Wakeup( ctx->runner_wakeup );
- }
- }
-
- static rtems_event_set GetPendingEvents( Context *ctx )
- {
- rtems_event_set pending;
- rtems_status_code sc;
-
- sc = ( *ctx->receive )(
- RTEMS_PENDING_EVENTS,
- RTEMS_DEFAULT_OPTIONS,
- 0,
- &pending
- );
- T_quiet_rsc_success( sc );
-
- return pending;
- }
-
- static void ReqRtemsEventSendReceive_Cleanup( Context *ctx );
-
- static void InterruptPrepare( void *arg )
- {
- ReqRtemsEventSendReceive_Cleanup( arg );
- }
-
- static void InterruptAction( void *arg )
- {
- Context *ctx;
-
- ctx = arg;
- ctx->receive_status = ( *ctx->receive )(
- INPUT_EVENTS,
- ctx->receive_option_set,
- ctx->receive_timeout,
- &ctx->received_events
- );
- T_quiet_rsc_success( ctx->receive_status );
- }
-
- static void InterruptContinue( Context *ctx )
- {
- rtems_status_code sc;
-
- sc = ( *ctx->send )( ctx->receiver_id, INPUT_EVENTS );
- T_quiet_rsc_success( sc );
- }
-
- static T_interrupt_test_state Interrupt( void *arg )
- {
- Context *ctx;
- Thread_Wait_flags flags;
- T_interrupt_test_state next_state;
- T_interrupt_test_state previous_state;
-
- ctx = arg;
- flags = _Thread_Wait_flags_get( ctx->runner_thread );
-
- if ( IntendsToBlockForEvent( ctx, flags ) ) {
- next_state = T_INTERRUPT_TEST_DONE;
- } else if ( BlockedForEvent( ctx, flags ) ) {
- next_state = T_INTERRUPT_TEST_LATE;
- } else {
- next_state = T_INTERRUPT_TEST_EARLY;
- }
-
- previous_state = T_interrupt_test_change_state(
- T_INTERRUPT_TEST_ACTION,
- next_state
- );
-
- if ( previous_state == T_INTERRUPT_TEST_ACTION ) {
- if ( next_state == T_INTERRUPT_TEST_DONE ) {
- Send( ctx, IsSatisfiedFlags );
- } else {
- InterruptContinue( ctx );
- }
- }
-
- return next_state;
- }
-
- static const T_interrupt_test_config InterruptConfig = {
- .prepare = InterruptPrepare,
- .action = InterruptAction,
- .interrupt = Interrupt,
- .max_iteration_count = 10000
- };
-test-target: testsuites/validation/tr-event-send-receive.c
-test-teardown:
- brief: null
- code: |
- rtems_status_code sc;
- rtems_task_priority prio;
-
- prio = 0;
- sc = rtems_task_set_priority( RTEMS_SELF, PRIO_HIGH, &prio );
- T_rsc_success( sc );
- T_eq_u32( prio, PRIO_NORMAL );
-
- if ( ctx->worker_id != 0 ) {
- sc = rtems_task_delete( ctx->worker_id );
- T_rsc_success( sc );
- }
-
- DeleteWakeupSema( ctx->worker_wakeup );
- DeleteWakeupSema( ctx->runner_wakeup );
- description: null
-text: ${.:text-template}
-transition-map:
-- enabled-by: true
- post-conditions:
- ReceiveStatus: None
- SendStatus: InvId
- SenderPreemption: 'No'
- pre-conditions:
- Id:
- - InvId
- ReceiverState: N/A
- Satisfy: N/A
- Send: N/A
-- enabled-by: true
- post-conditions:
- ReceiveStatus: Pending
- SendStatus: Ok
- SenderPreemption: 'No'
- pre-conditions:
- Id:
- - Task
- ReceiverState:
- - NotWaiting
- Satisfy: N/A
- Send: all
-- enabled-by: true
- post-conditions:
- ReceiveStatus: Timeout
- SendStatus: Ok
- SenderPreemption: 'No'
- pre-conditions:
- Id:
- - Task
- ReceiverState:
- - Timeout
- Satisfy: all
- Send: all
-- enabled-by: true
- post-conditions:
- ReceiveStatus: Unsatisfied
- SendStatus: Ok
- SenderPreemption: 'No'
- pre-conditions:
- Id:
- - Task
- ReceiverState:
- - Poll
- Satisfy: all
- Send:
- - Zero
- - Unrelated
-- enabled-by: true
- post-conditions:
- ReceiveStatus: Blocked
- SendStatus: Ok
- SenderPreemption: 'No'
- pre-conditions:
- Id:
- - Task
- ReceiverState:
- - Lower
- - Equal
- - Higher
- - Intend
- Satisfy: all
- Send:
- - Unrelated
- - Zero
-- enabled-by: true
- post-conditions:
- ReceiveStatus: Satisfied
- SendStatus: Ok
- SenderPreemption: 'Yes'
- pre-conditions:
- Id:
- - Task
- ReceiverState:
- - Higher
- Satisfy: all
- Send:
- - All
- - MixedAll
-- enabled-by: true
- post-conditions:
- ReceiveStatus: Satisfied
- SendStatus: Ok
- SenderPreemption: 'No'
- pre-conditions:
- Id:
- - Task
- ReceiverState:
- - Poll
- - Lower
- - Equal
- - Intend
- Satisfy: all
- Send:
- - All
- - MixedAll
-- enabled-by: true
- post-conditions:
- ReceiveStatus: Satisfied
- SendStatus: Ok
- SenderPreemption: 'Yes'
- pre-conditions:
- Id:
- - Task
- ReceiverState:
- - Higher
- Satisfy:
- - Any
- Send:
- - Any
- - MixedAny
-- enabled-by: true
- post-conditions:
- ReceiveStatus: Satisfied
- SendStatus: Ok
- SenderPreemption: 'No'
- pre-conditions:
- Id:
- - Task
- ReceiverState:
- - Poll
- - Lower
- - Equal
- - Intend
- Satisfy:
- - Any
- Send:
- - Any
- - MixedAny
-- enabled-by: true
- post-conditions:
- ReceiveStatus: Unsatisfied
- SendStatus: Ok
- SenderPreemption: 'No'
- pre-conditions:
- Id:
- - Task
- ReceiverState:
- - Poll
- Satisfy:
- - All
- Send:
- - Any
- - MixedAny
-- enabled-by: true
- post-conditions:
- ReceiveStatus: Blocked
- SendStatus: Ok
- SenderPreemption: 'No'
- pre-conditions:
- Id:
- - Task
- ReceiverState:
- - Lower
- - Equal
- - Higher
- - Intend
- Satisfy:
- - All
- Send:
- - Any
- - MixedAny
-- enabled-by: true
- post-conditions: NoOtherScheduler
- pre-conditions:
- Id:
- - Task
- ReceiverState:
- - Other
- Satisfy: all
- Send: all
-- enabled-by: RTEMS_SMP
- post-conditions:
- ReceiveStatus: Blocked
- SendStatus: Ok
- SenderPreemption: 'No'
- pre-conditions:
- Id:
- - Task
- ReceiverState:
- - Other
- Satisfy: all
- Send:
- - Unrelated
- - Zero
-- enabled-by: RTEMS_SMP
- post-conditions:
- ReceiveStatus: Satisfied
- SendStatus: Ok
- SenderPreemption: 'No'
- pre-conditions:
- Id:
- - Task
- ReceiverState:
- - Other
- Satisfy: all
- Send:
- - All
- - MixedAll
-- enabled-by: RTEMS_SMP
- post-conditions:
- ReceiveStatus: Satisfied
- SendStatus: Ok
- SenderPreemption: 'No'
- pre-conditions:
- Id:
- - Task
- ReceiverState:
- - Other
- Satisfy:
- - Any
- Send:
- - Any
- - MixedAny
-- enabled-by: RTEMS_SMP
- post-conditions:
- ReceiveStatus: Blocked
- SendStatus: Ok
- SenderPreemption: 'No'
- pre-conditions:
- Id:
- - Task
- ReceiverState:
- - Other
- Satisfy:
- - All
- Send:
- - Any
- - MixedAny
-type: requirement
diff --git a/spec/req/rtems/event/send.yml b/spec/req/rtems/event/send.yml
deleted file mode 100644
index 1c43c6b9..00000000
--- a/spec/req/rtems/event/send.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-SPDX-License-Identifier: CC-BY-SA-4.0
-copyrights:
-- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
-enabled-by: true
-functional-type: function
-links:
-- role: interface-function
- uid: /if/rtems/event/send
-rationale: null
-references: []
-requirement-type: functional
-text: |
- The ${/if/rtems/event/send:/name} directive shall send events to the
- application event set of a task as specified by ${send-receive}.
-type: requirement
diff --git a/spec/req/rtems/event/system-receive.yml b/spec/req/rtems/event/system-receive.yml
deleted file mode 100644
index 14c5505e..00000000
--- a/spec/req/rtems/event/system-receive.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-SPDX-License-Identifier: CC-BY-SA-4.0
-copyrights:
-- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
-enabled-by: true
-functional-type: function
-links:
-- role: interface-function
- uid: /if/rtems/event/system-receive
-rationale: null
-references: []
-requirement-type: functional
-text: |
- The ${/if/rtems/event/system-receive:/name} directive shall receive events
- from the system event set of a task as specified by ${send-receive}.
-type: requirement
diff --git a/spec/req/rtems/event/system-send.yml b/spec/req/rtems/event/system-send.yml
deleted file mode 100644
index 3b1df17a..00000000
--- a/spec/req/rtems/event/system-send.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-SPDX-License-Identifier: CC-BY-SA-4.0
-copyrights:
-- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
-enabled-by: true
-functional-type: function
-links:
-- role: interface-function
- uid: /if/rtems/event/system-send
-rationale: null
-references: []
-requirement-type: functional
-text: |
- The ${/if/rtems/event/system-send:/name} directive shall send events to the
- system event set of a task as specified by ${send-receive}.
-type: requirement
diff --git a/spec/req/rtems/event/val/event-constant.yml b/spec/req/rtems/event/val/event-constant.yml
deleted file mode 100644
index d1e0b84e..00000000
--- a/spec/req/rtems/event/val/event-constant.yml
+++ /dev/null
@@ -1,391 +0,0 @@
-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
diff --git a/spec/req/rtems/event/val/events.yml b/spec/req/rtems/event/val/events.yml
deleted file mode 100644
index ede39e36..00000000
--- a/spec/req/rtems/event/val/events.yml
+++ /dev/null
@@ -1,96 +0,0 @@
-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: |
- for ( i = 0; i < 32; ++i ) {
- ${event-constant:/test-run}( events[ i ], i );
- T_step( (unsigned int) i ); /* ${steps/32} */
- }
- checks: []
- description: |
- Run the event constant and number test for all 32 event constants.
- links: []
-- action: |
- all = 0;
-
- for ( i = 0; i < 32; ++i ) {
- all |= events[ i ];
- }
- checks:
- - check: |
- T_step_eq_u32( ${step}, all, RTEMS_ALL_EVENTS );
- description: |
- Check that the value is equal to RTEMS_ALL_EVENTS.
- links: []
- description: |
- Calculate the value of a bitwise or of all 32 event constants.
- links: []
-- action: |
- /* No action */
- checks:
- - check: |
- T_step_eq_u32( ${step}, RTEMS_EVENT_ALL, 0 );
- description: |
- Check that RTEMS_EVENT_ALL is equal to zero.
- links: []
- - check: |
- T_step_ne_u32( ${step}, RTEMS_EVENT_ANY, 0 );
- T_step_eq_u32( ${step}, RTEMS_EVENT_ANY & ( RTEMS_EVENT_ANY - 1), 0 );
- description: |
- Check that RTEMS_EVENT_ANY is a power of two.
- links: []
- description: |
- Validate the Event Manager directive options.
- links: []
-test-brief: Tests the Event Manager API.
-test-description: null
-test-epilogue: null
-test-fixture: null
-test-header: null
-test-includes:
-- rtems.h
-test-local-includes:
-- tr-event-constant.h
-test-prologue: |
- rtems_event_set all;
- int i;
-test-support: |
- static const rtems_event_set events[] = {
- RTEMS_EVENT_0,
- RTEMS_EVENT_1,
- RTEMS_EVENT_2,
- RTEMS_EVENT_3,
- RTEMS_EVENT_4,
- RTEMS_EVENT_5,
- RTEMS_EVENT_6,
- RTEMS_EVENT_7,
- RTEMS_EVENT_8,
- RTEMS_EVENT_9,
- RTEMS_EVENT_10,
- RTEMS_EVENT_11,
- RTEMS_EVENT_12,
- RTEMS_EVENT_13,
- RTEMS_EVENT_14,
- RTEMS_EVENT_15,
- RTEMS_EVENT_16,
- RTEMS_EVENT_17,
- RTEMS_EVENT_18,
- RTEMS_EVENT_19,
- RTEMS_EVENT_20,
- RTEMS_EVENT_21,
- RTEMS_EVENT_22,
- RTEMS_EVENT_23,
- RTEMS_EVENT_24,
- RTEMS_EVENT_25,
- RTEMS_EVENT_26,
- RTEMS_EVENT_27,
- RTEMS_EVENT_28,
- RTEMS_EVENT_29,
- RTEMS_EVENT_30,
- RTEMS_EVENT_31,
- };
-test-target: testsuites/validation/tc-events.c
-type: test-case
diff --git a/spec/req/rtems/event/val/send-receive.yml b/spec/req/rtems/event/val/send-receive.yml
deleted file mode 100644
index bca154b3..00000000
--- a/spec/req/rtems/event/val/send-receive.yml
+++ /dev/null
@@ -1,66 +0,0 @@
-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: ../receive
-- role: validation
- uid: ../send
-test-actions:
-- action: |
- ${../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 ${../send-receive}.
- links: []
-test-brief: |
- Tests the ${/if/rtems/event/send:/name} and ${/if/rtems/event/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
diff --git a/spec/req/rtems/event/val/system-send-receive.yml b/spec/req/rtems/event/val/system-send-receive.yml
deleted file mode 100644
index a683f565..00000000
--- a/spec/req/rtems/event/val/system-send-receive.yml
+++ /dev/null
@@ -1,71 +0,0 @@
-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: ../system-receive
-- role: validation
- uid: ../system-send
-test-actions:
-- action: |
- ${../send-receive:/test-run}(
- EventSystemSend,
- EventSystemReceive,
- GetPendingSystemEvents,
- THREAD_WAIT_CLASS_SYSTEM_EVENT,
- STATES_WAITING_FOR_SYSTEM_EVENT
- );
- checks: []
- description: |
- Run the event send and receive tests for the system event set defined
- by ${../send-receive}.
- links: []
-test-brief: |
- Tests the ${/if/rtems/event/system-send:/name} and
- ${/if/rtems/event/system-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 EventSystemSend(
- rtems_id id,
- rtems_event_set event_in
- )
- {
- return rtems_event_system_send( id, event_in );
- }
-
- static rtems_status_code EventSystemReceive(
- rtems_id event_in,
- rtems_option option_set,
- rtems_interval ticks,
- rtems_event_set *event_out
- )
- {
- return rtems_event_system_receive(
- event_in,
- option_set,
- ticks,
- event_out
- );
- }
-
- static rtems_event_set GetPendingSystemEvents( Thread_Control *thread )
- {
- RTEMS_API_Control *api;
-
- api = thread->API_Extensions[ THREAD_API_RTEMS ];
- return api->System_event.pending_events;
- }
-test-target: testsuites/validation/tc-event-send-receive.c
-type: test-case
diff --git a/spec/req/rtems/ident-local.yml b/spec/req/rtems/ident-local.yml
deleted file mode 100644
index 416d8fc6..00000000
--- a/spec/req/rtems/ident-local.yml
+++ /dev/null
@@ -1,165 +0,0 @@
-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
-functional-type: action
-links: []
-post-conditions:
-- name: Status
- states:
- - name: Ok
- test-code: |
- T_rsc( ctx->status, RTEMS_SUCCESSFUL );
- text: |
- The status shall be RTEMS_SUCCESSFUL.
- - name: InvAddr
- test-code: |
- T_rsc( ctx->status, RTEMS_INVALID_ADDRESS );
- text: |
- The status shall be RTEMS_INVALID_ADDRESS.
- - name: InvName
- test-code: |
- T_rsc( ctx->status, RTEMS_INVALID_NAME );
- text: |
- The status shall be RTEMS_INVALID_NAME.
- test-epilogue: null
- test-prologue: null
-- name: Id
- states:
- - name: Nop
- test-code: |
- T_eq_ptr( ctx->id, &ctx->id_value );
- T_eq_u32( ctx->id_value, 0xffffffff );
- text: |
- The value of the object identifier referenced by the id parameter shall
- be the value before the action.
- - name: NullPtr
- test-code: |
- T_null( ctx->id )
- text: |
- The id parameter shall be NULL.
- - name: Id
- test-code: |
- T_eq_ptr( ctx->id, &ctx->id_value );
- T_eq_u32( ctx->id_value, ctx->id_local_object );
- text: |
- The value of the object identifier referenced by the id parameter shall
- be the identifier of a local object of the specified class with a name
- equal to the name parameter. If more than one local object of the
- specified class with such a name exists, then it shall be the identifier
- of the object with the lowest object index.
- test-epilogue: null
- test-prologue: null
-pre-conditions:
-- name: Name
- states:
- - name: Invalid
- test-code: |
- ctx->name = 1;
- text: |
- The name parameter shall not equal to a name of an active Classic API
- object of the specified class.
- - name: Valid
- test-code: |
- ctx->name = ClassicObjectLocalIdentName;
- text: |
- The name parameter shall equal to a name of an active Classic API object
- of the specified class.
- test-epilogue: null
- test-prologue: null
-- name: Id
- states:
- - name: NullPtr
- test-code: |
- ctx->id = NULL;
- text: |
- The id parameter shall be NULL.
- - name: Valid
- test-code: |
- ctx->id_value = 0xffffffff;
- ctx->id = &ctx->id_value;
- text: |
- The id parameter shall point to an object identifier.
- test-epilogue: null
- test-prologue: null
-rationale: null
-references: []
-requirement-type: functional
-skip-reasons: {}
-test-action: |
- ctx->status = ( *ctx->action )( ctx->name, ctx->id );
-test-brief: null
-test-cleanup: null
-test-context:
-- brief: null
- description: null
- member: rtems_status_code status
-- brief: null
- description: null
- member: rtems_name name
-- brief: null
- description: null
- member: rtems_id *id
-- brief: null
- description: null
- member: rtems_id id_value
-test-context-support: null
-test-description: null
-test-header:
- code: |
- #define ClassicObjectLocalIdentName \
- rtems_build_name( 'I', 'D', 'N', 'T' )
- includes:
- - rtems.h
- local-includes: []
- run-params:
- - description: |
- is the identifier of an active object of the class under test with the
- name ClassicObjectLocalIdentName.
- dir: null
- name: id_local_object
- specifier: rtems_id ${.:name}
- - description: |
- is the action handler.
- dir: null
- name: action
- specifier: rtems_status_code ( *${.:name} )( rtems_name, rtems_id * )
- target: testsuites/validation/tr-object-ident-local.h
-test-includes: []
-test-local-includes:
-- tr-object-ident-local.h
-test-prepare: null
-test-setup: null
-test-stop: null
-test-support: null
-test-target: testsuites/validation/tr-object-ident-local.c
-test-teardown: null
-text: ${.:text-template}
-transition-map:
-- enabled-by: true
- post-conditions:
- Id: NullPtr
- Status: InvAddr
- pre-conditions:
- Id:
- - NullPtr
- Name: all
-- enabled-by: true
- post-conditions:
- Id: Nop
- Status: InvName
- pre-conditions:
- Id:
- - Valid
- Name:
- - Invalid
-- enabled-by: true
- post-conditions:
- Id: Id
- Status: Ok
- pre-conditions:
- Id:
- - Valid
- Name:
- - Valid
-type: requirement
diff --git a/spec/req/rtems/ident.yml b/spec/req/rtems/ident.yml
deleted file mode 100644
index 11dd1820..00000000
--- a/spec/req/rtems/ident.yml
+++ /dev/null
@@ -1,257 +0,0 @@
-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
-functional-type: action
-links: []
-post-conditions:
-- name: Status
- states:
- - name: Ok
- test-code: |
- T_rsc(ctx->status, RTEMS_SUCCESSFUL);
- text: |
- The status shall be RTEMS_SUCCESSFUL.
- - name: InvAddr
- test-code: |
- T_rsc(ctx->status, RTEMS_INVALID_ADDRESS);
- text: |
- The status shall be RTEMS_INVALID_ADDRESS.
- - name: InvName
- test-code: |
- T_rsc(ctx->status, RTEMS_INVALID_NAME);
- text: |
- The status shall be RTEMS_INVALID_NAME.
- - name: InvNode
- test-code: |
- T_rsc(ctx->status, RTEMS_INVALID_NODE);
- text: |
- The status shall be RTEMS_INVALID_NODE.
- test-epilogue: null
- test-prologue: null
-- name: Id
- states:
- - name: Nop
- test-code: |
- T_eq_ptr(ctx->id, &ctx->id_value);
- T_eq_u32(ctx->id_value, 0xffffffff);
- text: |
- The value of the object identifier referenced by the id parameter shall
- be the value before the action.
- - name: NullPtr
- test-code: |
- T_null(ctx->id)
- text: |
- The id parameter shall be NULL.
- - name: LocalObj
- test-code: |
- T_eq_ptr(ctx->id, &ctx->id_value);
- T_eq_u32(ctx->id_value, ctx->id_local_object);
- text: |
- The value of the object identifier referenced by the id parameter shall
- be the identifier of a local object of the specified class with a name
- equal to the name parameter. If more than one local object of the
- specified class with such a name exists, then it shall be the identifier
- of the object with the lowest object index.
- - name: RemoteObj
- test-code: |
- T_eq_ptr(ctx->id, &ctx->id_value);
- T_eq_u32(ctx->id_value, ctx->id_remote_object);
- text: |
- The value of the object identifier referenced by the id parameter shall
- be the identifier of a remote object of the specified class on a eligible
- node defined by the node parameter with a name equal to the name
- parameter. If more than one local object of the specified class with
- such a name exists, then it shall be the identifier of the object with
- the lowest object index. Otherwise, if more than one object of the
- specified class with such a name exists on remote eligible nodes, then it
- shall be the identifier of the object with the lowest node index and the
- lowest object index on this node.
- test-epilogue: null
- test-prologue: null
-pre-conditions:
-- name: Name
- states:
- - name: Invalid
- test-code: |
- ctx->name = 1;
- text: |
- The name parameter shall not equal to a name of an active Classic API
- object of the specified class.
- - name: Valid
- test-code: |
- ctx->name = ClassicObjectIdentName;
- text: |
- The name parameter shall equal to a name of an active Classic API object
- of the specified class.
- test-epilogue: null
- test-prologue: null
-- name: Node
- states:
- - name: Local
- test-code: |
- ctx->node = 1;
- text: |
- The node parameter shall be the local node number.
- - name: Remote
- test-code: |
- ctx->node = 2;
- text: |
- The node parameter shall be a remote node number.
- - name: Invalid
- test-code: |
- ctx->node = 256;
- text: |
- The node parameter shall be an invalid node number.
- - name: SearchAll
- test-code: |
- ctx->node = RTEMS_SEARCH_ALL_NODES;
- text: |
- The node parameter shall be RTEMS_SEARCH_ALL_NODES.
- - name: SearchOther
- test-code: |
- ctx->node = RTEMS_SEARCH_OTHER_NODES;
- text: |
- The node parameter shall be RTEMS_SEARCH_OTHER_NODES.
- - name: SearchLocal
- test-code: |
- ctx->node = RTEMS_SEARCH_LOCAL_NODE;
- text: |
- The node parameter shall be RTEMS_SEARCH_LOCAL_NODE.
- test-epilogue: null
- test-prologue: null
-- name: Id
- states:
- - name: NullPtr
- test-code: |
- ctx->id = NULL;
- text: |
- The id parameter shall be NULL.
- - name: Valid
- test-code: |
- ctx->id_value = 0xffffffff;
- ctx->id = &ctx->id_value;
- text: |
- The id parameter shall point to an object identifier.
- test-epilogue: null
- test-prologue: null
-rationale: null
-references: []
-requirement-type: functional
-skip-reasons: {}
-test-action: |
- ctx->status = ( *ctx->action )( ctx->name, ctx->node, ctx->id );
-test-brief: null
-test-cleanup: null
-test-context:
-- brief: null
- description: null
- member: |
- rtems_status_code status
-- brief: null
- description: null
- member: rtems_name name
-- brief: null
- description: null
- member: uint32_t node
-- brief: null
- description: null
- member: rtems_id *id
-- brief: null
- description: null
- member: rtems_id id_value
-- brief: null
- description: null
- member: rtems_id id_remote_object
-test-context-support: null
-test-description: null
-test-header:
- code: |
- #define ClassicObjectIdentName \
- rtems_build_name( 'I', 'D', 'N', 'T' )
- includes:
- - rtems.h
- local-includes: []
- run-params:
- - description: |
- is the identifier of an active object of the class under test with the
- name ClassicObjectIdentName.
- dir: null
- name: id_local_object
- specifier: rtems_id ${.:name}
- - description: |
- is the action handler.
- dir: null
- name: action
- specifier: |
- rtems_status_code ( *${.:name} )( rtems_name, uint32_t, rtems_id * )
- target: testsuites/validation/tr-object-ident.h
-test-includes: []
-test-local-includes:
-- tr-object-ident.h
-test-prepare: null
-test-setup: null
-test-stop: null
-test-support: null
-test-target: testsuites/validation/tr-object-ident.c
-test-teardown: null
-text: ${.:text-template}
-transition-map:
-- enabled-by: true
- post-conditions:
- Id: LocalObj
- Status: Ok
- pre-conditions:
- Id:
- - Valid
- Name:
- - Valid
- Node:
- - SearchAll
- - SearchLocal
- - Local
-- enabled-by: true
- post-conditions:
- Id: Nop
- Status: InvName
- pre-conditions:
- Id:
- - Valid
- Name:
- - Valid
- Node:
- - Invalid
- - SearchOther
- - Remote
-- enabled-by: true
- post-conditions:
- Id: Nop
- Status: InvName
- pre-conditions:
- Id:
- - Valid
- Name:
- - Invalid
- Node: all
-- enabled-by: true
- post-conditions:
- Id: NullPtr
- Status: InvAddr
- pre-conditions:
- Id:
- - NullPtr
- Name: all
- Node: all
-- enabled-by: RTEMS_MULTIPROCESSING
- post-conditions:
- Id: RemoteObj
- Status: Ok
- pre-conditions:
- Id:
- - Valid
- Name:
- - Valid
- Node:
- - SearchOther
- - Remote
-type: requirement
diff --git a/spec/req/rtems/message/ident.yml b/spec/req/rtems/message/ident.yml
deleted file mode 100644
index 04daf90d..00000000
--- a/spec/req/rtems/message/ident.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-SPDX-License-Identifier: CC-BY-SA-4.0
-copyrights:
-- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
-enabled-by: true
-functional-type: function
-links:
-- role: interface-function
- uid: /if/rtems/message/ident
-rationale: null
-references: []
-requirement-type: functional
-text: |
- The ${/if/rtems/message/ident:/name} directive shall identify an Classic API
- message queue class object by its name as specified by ${../ident}.
-type: requirement
diff --git a/spec/req/rtems/message/val/ident.yml b/spec/req/rtems/message/val/ident.yml
deleted file mode 100644
index 436c1b9d..00000000
--- a/spec/req/rtems/message/val/ident.yml
+++ /dev/null
@@ -1,49 +0,0 @@
-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: ../ident
-test-actions:
-- action: |
- ${../../ident:/test-run}(
- id_local_object,
- ClassicMessageIdentAction
- );
- checks: []
- description: |
- Run the generic object identification tests for Classic API message queue
- class objects defined by ${../../ident}.
- links: []
-test-brief: Test the ${/if/rtems/message/ident:/name} directive.
-test-description: null
-test-epilogue: null
-test-fixture: null
-test-header: null
-test-includes: []
-test-local-includes:
-- tr-object-ident.h
-test-prologue: |
- rtems_status_code sc;
- rtems_id id_local_object;
-
- sc = rtems_message_queue_create(
- ClassicObjectIdentName,
- 1,
- 1,
- RTEMS_DEFAULT_ATTRIBUTES,
- &id_local_object
- );
- T_assert_rsc_success( sc );
-test-support: |
- static rtems_status_code ClassicMessageIdentAction(
- rtems_name name,
- uint32_t node,
- rtems_id *id
- )
- {
- return rtems_message_queue_ident( name, node, id );
- }
-test-target: testsuites/validation/tc-message-ident.c
-type: test-case
diff --git a/spec/req/rtems/modes/bit-set.yml b/spec/req/rtems/modes/bit-set.yml
deleted file mode 100644
index 04928658..00000000
--- a/spec/req/rtems/modes/bit-set.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-SPDX-License-Identifier: CC-BY-SA-4.0
-copyrights:
-- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
-enabled-by: true
-links:
-- role: requirement-refinement
- uid: /if/rtems/modes/group
-non-functional-type: interface
-rationale: null
-references: []
-requirement-type: non-functional
-text: |
- Each non-default task mode constant shall be a power of two representable as
- an integer of type ${/if/rtems/modes/mode:/name}.
-type: requirement
diff --git a/spec/req/rtems/modes/default.yml b/spec/req/rtems/modes/default.yml
deleted file mode 100644
index 3eb1c0c0..00000000
--- a/spec/req/rtems/modes/default.yml
+++ /dev/null
@@ -1,14 +0,0 @@
-SPDX-License-Identifier: CC-BY-SA-4.0
-copyrights:
-- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
-enabled-by: true
-links:
-- role: requirement-refinement
- uid: /if/rtems/modes/group
-non-functional-type: interface
-rationale: null
-references: []
-requirement-type: non-functional
-text: |
- Each default task mode constant shall have a value of zero.
-type: requirement
diff --git a/spec/req/rtems/modes/masks-all.yml b/spec/req/rtems/modes/masks-all.yml
deleted file mode 100644
index ceb0a07f..00000000
--- a/spec/req/rtems/modes/masks-all.yml
+++ /dev/null
@@ -1,16 +0,0 @@
-SPDX-License-Identifier: CC-BY-SA-4.0
-copyrights:
-- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
-enabled-by: true
-links:
-- role: requirement-refinement
- uid: /if/rtems/modes/all-mode-masks
-non-functional-type: interface
-rationale: null
-references: []
-requirement-type: non-functional
-text: |
- The bitwise and of a task mode mask constant and
- ${/if/rtems/modes/all-mode-masks:/name} shall be equal to the task mode mask
- constant.
-type: requirement
diff --git a/spec/req/rtems/modes/masks-unique.yml b/spec/req/rtems/modes/masks-unique.yml
deleted file mode 100644
index 770faf6d..00000000
--- a/spec/req/rtems/modes/masks-unique.yml
+++ /dev/null
@@ -1,14 +0,0 @@
-SPDX-License-Identifier: CC-BY-SA-4.0
-copyrights:
-- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
-enabled-by: true
-links:
-- role: requirement-refinement
- uid: /if/rtems/modes/group
-non-functional-type: interface
-rationale: null
-references: []
-requirement-type: non-functional
-text: |
- The task mode mask constants and 0xff shall have unique values.
-type: requirement
diff --git a/spec/req/rtems/modes/masks.yml b/spec/req/rtems/modes/masks.yml
deleted file mode 100644
index 9b066881..00000000
--- a/spec/req/rtems/modes/masks.yml
+++ /dev/null
@@ -1,16 +0,0 @@
-SPDX-License-Identifier: CC-BY-SA-4.0
-copyrights:
-- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
-enabled-by: true
-links:
-- role: requirement-refinement
- uid: /if/rtems/modes/group
-non-functional-type: interface
-rationale: null
-references: []
-requirement-type: non-functional
-text: |
- Each task mode mask constant except ${/if/rtems/modes/interrupt-mask} shall
- be a power of two representable as an integer of type
- ${/if/rtems/modes/mode:/name}.
-type: requirement
diff --git a/spec/req/rtems/modes/unique.yml b/spec/req/rtems/modes/unique.yml
deleted file mode 100644
index 39a39b07..00000000
--- a/spec/req/rtems/modes/unique.yml
+++ /dev/null
@@ -1,14 +0,0 @@
-SPDX-License-Identifier: CC-BY-SA-4.0
-copyrights:
-- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
-enabled-by: true
-links:
-- role: requirement-refinement
- uid: /if/rtems/modes/group
-non-functional-type: interface
-rationale: null
-references: []
-requirement-type: non-functional
-text: |
- The non-default task mode constants shall have unique values.
-type: requirement
diff --git a/spec/req/rtems/modes/val/modes.yml b/spec/req/rtems/modes/val/modes.yml
deleted file mode 100644
index cdb67966..00000000
--- a/spec/req/rtems/modes/val/modes.yml
+++ /dev/null
@@ -1,242 +0,0 @@
-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_true( ${step}, IsPowerOfTwo( RTEMS_NO_ASR ) );
- description: |
- Check that RTEMS_NO_ASR is a power of two representable as an integer of
- type rtems_mode.
- links:
- - role: validation
- uid: ../bit-set
- - role: validation
- uid: /if/rtems/modes/no-asr
- - check: |
- T_step_true( ${step}, IsPowerOfTwo( RTEMS_NO_PREEMPT ) );
- description: |
- Check that RTEMS_NO_PREEMPT is a power of two representable as an integer
- of type rtems_mode.
- links:
- - role: validation
- uid: ../bit-set
- - role: validation
- uid: /if/rtems/modes/no-preempt
- - check: |
- T_step_true( ${step}, IsPowerOfTwo( RTEMS_TIMESLICE ) );
- description: |
- Check that RTEMS_TIMESLICE is a power of two representable as an integer
- of type rtems_mode.
- links:
- - role: validation
- uid: ../bit-set
- - role: validation
- uid: /if/rtems/modes/timeslice
- description: |
- Validate the non-default task mode constants.
- links: []
-- action: |
- /* No action */
- checks:
- - check: |
- T_step_eq_u32( ${step}, RTEMS_ASR, 0 );
- description: |
- Check that RTEMS_ASR is equal to zero.
- links:
- - role: validation
- uid: ../default
- - role: validation
- uid: /if/rtems/modes/asr
- - check: |
- T_step_eq_u32( ${step}, RTEMS_DEFAULT_MODES, 0 );
- description: |
- Check that RTEMS_DEFAULT_MODES is equal to zero.
- links:
- - role: validation
- uid: ../default
- - role: validation
- uid: /if/rtems/modes/default
- - check: |
- T_step_eq_u32( ${step}, RTEMS_NO_TIMESLICE, 0 );
- description: |
- Check that RTEMS_NO_TIMESLICE is equal to zero.
- links:
- - role: validation
- uid: ../default
- - role: validation
- uid: /if/rtems/modes/no-timeslice
- - check: |
- T_step_eq_u32( ${step}, RTEMS_PREEMPT, 0 );
- description: |
- Check that RTEMS_PREEMPT is equal to zero.
- links:
- - role: validation
- uid: ../default
- - role: validation
- uid: /if/rtems/modes/preempt
- description: |
- Validate the default task mode constants.
- links: []
-- action: |
- /* No action */
- checks:
- - check: |
- T_step_eq_u32(
- ${step},
- RTEMS_ASR_MASK & RTEMS_ALL_MODE_MASKS,
- RTEMS_ASR_MASK
- );
- description: |
- Check that the bitwise and of RTEMS_ASR_MASK and RTEMS_ALL_MODE_MASKS is
- equal to RTEMS_ASR_MASK.
- links:
- - role: validation
- uid: ../masks-all
- - role: validation
- uid: /if/rtems/modes/asr-mask
- - check: |
- T_step_eq_u32(
- ${step},
- RTEMS_PREEMPT_MASK & RTEMS_ALL_MODE_MASKS,
- RTEMS_PREEMPT_MASK
- );
- description: |
- Check that the bitwise and of RTEMS_PREEMPT_MASK and RTEMS_ALL_MODE_MASKS
- is equal to RTEMS_PREEMPT_MASK.
- links:
- - role: validation
- uid: ../masks-all
- - role: validation
- uid: /if/rtems/modes/preempt-mask
- - check: |
- T_step_eq_u32(
- ${step},
- RTEMS_TIMESLICE_MASK & RTEMS_ALL_MODE_MASKS,
- RTEMS_TIMESLICE_MASK
- );
- description: |
- Check that the bitwise and of RTEMS_TIMESLICE_MASK and
- RTEMS_ALL_MODE_MASKS is equal to RTEMS_TIMESLICE_MASK.
- links:
- - role: validation
- uid: ../masks-all
- - role: validation
- uid: /if/rtems/modes/timeslice-mask
- - check: |
- T_step_eq_u32(
- ${step},
- RTEMS_INTERRUPT_MASK & RTEMS_ALL_MODE_MASKS,
- RTEMS_INTERRUPT_MASK
- );
- description: |
- Check that the bitwise and of RTEMS_INTERRUPT_MASK and
- RTEMS_ALL_MODE_MASKS is equal to RTEMS_INTERRUPT_MASK.
- links:
- - role: validation
- uid: ../masks-all
- - role: validation
- uid: /if/rtems/modes/interrupt-mask
- description: |
- Validate RTEMS_ALL_MODE_MASKS.
- links: []
-- action: |
- /* No action */
- checks:
- - check: |
- T_step_true( ${step}, IsPowerOfTwo( RTEMS_ASR_MASK ) );
- description: |
- Check that RTEMS_ASR_MASK is a power of two representable as an integer
- of type rtems_mode.
- links:
- - role: validation
- uid: ../masks
- - role: validation
- uid: /if/rtems/modes/asr-mask
- - check: |
- T_step_true( ${step}, IsPowerOfTwo( RTEMS_PREEMPT_MASK ) );
- description: |
- Check that RTEMS_PREEMPT_MASK is a power of two representable as an
- integer of type rtems_mode.
- links:
- - role: validation
- uid: ../masks
- - role: validation
- uid: /if/rtems/modes/preempt-mask
- - check: |
- T_step_true( ${step}, IsPowerOfTwo( RTEMS_TIMESLICE_MASK ) );
- description: |
- Check that RTEMS_TIMESLICE_MASK is a power of two representable as an
- integer of type rtems_mode.
- links:
- - role: validation
- uid: ../masks
- - role: validation
- uid: /if/rtems/modes/timeslice-mask
- description: |
- Validate the task mode mask constants except RTEMS_INTERRUPT_MASK.
- links: []
-- action: |
- modes = 0;
- modes |= 0xff;
- modes |= RTEMS_ASR_MASK;
- modes |= RTEMS_PREEMPT_MASK;
- modes |= RTEMS_TIMESLICE_MASK;
- checks:
- - check: |
- T_step_eq_int( ${step}, PopCount( modes ), 11 );
- description: |
- Check that the count of set bits in the calculated value is equal to the
- count of task mode mask constants except RTEMS_INTERRUPT_MASK plus eight.
- Since each task mode mask constants except RTEMS_INTERRUPT_MASK is a
- power of two and the bitwise and of 0xff and RTEMS_INTERRUPT_MASK is
- equal to RTEMS_INTERRUPT_MASK this proves that each constant and 0xff has
- a unique value.
- links:
- - role: validation
- uid: ../unique
- - role: validation
- uid: /if/rtems/modes/asr-mask
- - role: validation
- uid: /if/rtems/modes/preempt-mask
- - role: validation
- uid: /if/rtems/modes/timeslice-mask
- description: |
- Calculate the bitwise or of all task mode mask constants and 0xff.
- links: []
-test-brief: |
- Tests the task mode constants and function-like macros of the Classic API.
-test-description: null
-test-epilogue: null
-test-fixture: null
-test-header: null
-test-includes:
-- rtems.h
-test-local-includes: []
-test-prologue: |
- rtems_mode modes;
-test-support: |
- static bool IsPowerOfTwo( rtems_mode mode )
- {
- return mode != 0 && ( mode & ( mode - 1 ) ) == 0;
- }
-
- static int PopCount( rtems_mode modes )
- {
- int count;
-
- count = 0;
-
- while ( modes != 0 ) {
- ++count;
- modes &= modes - 1;
- }
-
- return count;
- }
-test-target: testsuites/validation/tc-modes.c
-type: test-case
diff --git a/spec/req/rtems/options/bit-set.yml b/spec/req/rtems/options/bit-set.yml
deleted file mode 100644
index 21b3c84c..00000000
--- a/spec/req/rtems/options/bit-set.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-SPDX-License-Identifier: CC-BY-SA-4.0
-copyrights:
-- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
-enabled-by: true
-links:
-- role: requirement-refinement
- uid: /if/rtems/options/group
-non-functional-type: interface
-rationale: null
-references: []
-requirement-type: non-functional
-text: |
- Each non-default directive option constant shall be a power of two
- representable as an integer of type ${/if/rtems/options/option}.
-type: requirement
diff --git a/spec/req/rtems/options/default.yml b/spec/req/rtems/options/default.yml
deleted file mode 100644
index 3f268b3f..00000000
--- a/spec/req/rtems/options/default.yml
+++ /dev/null
@@ -1,14 +0,0 @@
-SPDX-License-Identifier: CC-BY-SA-4.0
-copyrights:
-- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
-enabled-by: true
-links:
-- role: requirement-refinement
- uid: /if/rtems/options/group
-non-functional-type: interface
-rationale: null
-references: []
-requirement-type: non-functional
-text: |
- Each default directive option constant shall have a value of zero.
-type: requirement
diff --git a/spec/req/rtems/options/unique.yml b/spec/req/rtems/options/unique.yml
deleted file mode 100644
index 7dd37b28..00000000
--- a/spec/req/rtems/options/unique.yml
+++ /dev/null
@@ -1,14 +0,0 @@
-SPDX-License-Identifier: CC-BY-SA-4.0
-copyrights:
-- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
-enabled-by: true
-links:
-- role: requirement-refinement
- uid: /if/rtems/options/group
-non-functional-type: interface
-rationale: null
-references: []
-requirement-type: non-functional
-text: |
- The non-default directive option constants shall have unique values.
-type: requirement
diff --git a/spec/req/rtems/options/val/options.yml b/spec/req/rtems/options/val/options.yml
deleted file mode 100644
index 108d3023..00000000
--- a/spec/req/rtems/options/val/options.yml
+++ /dev/null
@@ -1,117 +0,0 @@
-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_true( ${step}, IsPowerOfTwo( RTEMS_EVENT_ANY ) );
- description: |
- Check that RTEMS_EVENT_ANY is a power of two.
- links:
- - role: validation
- uid: ../bit-set
- - role: validation
- uid: /if/rtems/options/event-any
- - check: |
- T_step_true( ${step}, IsPowerOfTwo( RTEMS_NO_WAIT ) );
- description: |
- Check that RTEMS_NO_WAIT is a power of two.
- links:
- - role: validation
- uid: ../bit-set
- - role: validation
- uid: /if/rtems/options/no-wait
- description: |
- Validate the non-default option constants.
- links: []
-- action: |
- /* No action */
- checks:
- - check: |
- T_step_eq_u32( ${step}, RTEMS_DEFAULT_OPTIONS, 0 );
- description: |
- Check that RTEMS_DEFAULT_OPTIONS is equal to zero.
- links:
- - role: validation
- uid: ../default
- - role: validation
- uid: /if/rtems/options/default
- - check: |
- T_step_eq_u32( ${step}, RTEMS_EVENT_ALL, 0 );
- description: |
- Check that RTEMS_EVENT_ALL is equal to zero.
- links:
- - role: validation
- uid: ../default
- - role: validation
- uid: /if/rtems/options/event-all
- - check: |
- T_step_eq_u32( ${step}, RTEMS_WAIT, 0 );
- description: |
- Check that RTEMS_WAIT is equal to zero.
- links:
- - role: validation
- uid: ../default
- - role: validation
- uid: /if/rtems/options/wait
- description: |
- Validate the default option constants.
- links: []
-- action: |
- options = 0;
- options |= RTEMS_EVENT_ANY;
- options |= RTEMS_NO_WAIT;
- checks:
- - check: |
- T_step_eq_int( ${step}, PopCount( options ), 2 );
- description: |
- Check that the count of set bits in the calculated value is equal to the
- count of non-default option constants. Since each non-default option
- constant is a power of two, this proves that each constant has a unique
- value.
- links:
- - role: validation
- uid: ../unique
- - role: validation
- uid: /if/rtems/options/event-any
- - role: validation
- uid: /if/rtems/options/no-wait
- description: |
- Calculate the bitwise or of all non-default option constants.
- links: []
-test-brief: |
- Tests the option constants of the Classic API.
-test-description: null
-test-epilogue: null
-test-fixture: null
-test-header: null
-test-includes:
-- rtems.h
-test-local-includes: []
-test-prologue: |
- rtems_option options;
-test-support: |
- static bool IsPowerOfTwo( rtems_option option )
- {
- return option != 0 && ( option & ( option - 1 ) ) == 0;
- }
-
- static int PopCount( rtems_option options )
- {
- int count;
-
- count = 0;
-
- while ( options != 0 ) {
- ++count;
- options &= options - 1;
- }
-
- return count;
- }
-test-target: testsuites/validation/tc-options.c
-type: test-case
diff --git a/spec/req/rtems/part/ident.yml b/spec/req/rtems/part/ident.yml
deleted file mode 100644
index eb78d345..00000000
--- a/spec/req/rtems/part/ident.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-SPDX-License-Identifier: CC-BY-SA-4.0
-copyrights:
-- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
-enabled-by: true
-functional-type: function
-links:
-- role: interface-function
- uid: /if/rtems/part/ident
-rationale: null
-references: []
-requirement-type: functional
-text: |
- The ${/if/rtems/part/ident:/name} directive shall identify an Classic API
- partition class object by its name as specified by ${../ident}.
-type: requirement
diff --git a/spec/req/rtems/part/val/ident.yml b/spec/req/rtems/part/val/ident.yml
deleted file mode 100644
index a9919001..00000000
--- a/spec/req/rtems/part/val/ident.yml
+++ /dev/null
@@ -1,51 +0,0 @@
-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: ../ident
-test-actions:
-- action: |
- ${../../ident:/test-run}(
- id_local_object,
- ClassicPartIdentAction
- );
- checks: []
- description: |
- Run the generic object identification tests for Classic API partition class
- objects defined by ${../../ident}.
- links: []
-test-brief: Test the ${/if/rtems/part/ident:/name} directive.
-test-description: null
-test-epilogue: null
-test-fixture: null
-test-header: null
-test-includes: []
-test-local-includes:
-- tr-object-ident.h
-test-prologue: |
- static long area[32];
- rtems_status_code sc;
- rtems_id id_local_object;
-
- sc = rtems_partition_create(
- ClassicObjectIdentName,
- area,
- sizeof( area ),
- sizeof( area ),
- RTEMS_DEFAULT_ATTRIBUTES,
- &id_local_object
- );
- T_assert_rsc_success( sc );
-test-support: |
- static rtems_status_code ClassicPartIdentAction(
- rtems_name name,
- uint32_t node,
- rtems_id *id
- )
- {
- return rtems_partition_ident( name, node, id );
- }
-test-target: testsuites/validation/tc-part-ident.c
-type: test-case
diff --git a/spec/req/rtems/ratemon/ident.yml b/spec/req/rtems/ratemon/ident.yml
deleted file mode 100644
index 592c7655..00000000
--- a/spec/req/rtems/ratemon/ident.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-SPDX-License-Identifier: CC-BY-SA-4.0
-copyrights:
-- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
-enabled-by: true
-functional-type: function
-links:
-- role: interface-function
- uid: /if/rtems/ratemon/ident
-rationale: null
-references: []
-requirement-type: functional
-text: |
- The ${/if/rtems/ratemon/ident:/name} directive shall identify an Classic API
- rate monotonic class object by its name as specified by ${../ident-local}.
-type: requirement
diff --git a/spec/req/rtems/ratemon/val/ident.yml b/spec/req/rtems/ratemon/val/ident.yml
deleted file mode 100644
index 8022b8df..00000000
--- a/spec/req/rtems/ratemon/val/ident.yml
+++ /dev/null
@@ -1,45 +0,0 @@
-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: ../ident
-test-actions:
-- action: |
- ${../../ident-local:/test-run}(
- id_local_object,
- ClassicRatemonIdentAction
- );
- checks: []
- description: |
- Run the generic object identification tests for Classic API rate monotonic
- class objects defined by ${../../ident-local}.
- links: []
-test-brief: Test the ${/if/rtems/part/ident:/name} directive.
-test-description: null
-test-epilogue: null
-test-fixture: null
-test-header: null
-test-includes: []
-test-local-includes:
-- tr-object-ident-local.h
-test-prologue: |
- rtems_status_code sc;
- rtems_id id_local_object;
-
- sc = rtems_rate_monotonic_create(
- ClassicObjectLocalIdentName,
- &id_local_object
- );
- T_assert_rsc_success( sc );
-test-support: |
- static rtems_status_code ClassicRatemonIdentAction(
- rtems_name name,
- rtems_id *id
- )
- {
- return rtems_rate_monotonic_ident( name, id );
- }
-test-target: testsuites/validation/tc-ratemon-ident.c
-type: test-case
diff --git a/spec/req/rtems/sem/ident.yml b/spec/req/rtems/sem/ident.yml
deleted file mode 100644
index fb37c324..00000000
--- a/spec/req/rtems/sem/ident.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-SPDX-License-Identifier: CC-BY-SA-4.0
-copyrights:
-- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
-enabled-by: true
-functional-type: function
-links:
-- role: interface-function
- uid: /if/rtems/sem/ident
-rationale: null
-references: []
-requirement-type: functional
-text: |
- The ${/if/rtems/sem/ident:/name} directive shall identify an Classic API
- semaphore class object by its name as specified by ${../ident}.
-type: requirement
diff --git a/spec/req/rtems/sem/val/ident.yml b/spec/req/rtems/sem/val/ident.yml
deleted file mode 100644
index 616e32ef..00000000
--- a/spec/req/rtems/sem/val/ident.yml
+++ /dev/null
@@ -1,49 +0,0 @@
-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: ../ident
-test-actions:
-- action: |
- ${../../ident:/test-run}(
- id_local_object,
- ClassicSemIdentAction
- );
- checks: []
- description: |
- Run the generic object identification tests for Classic API semaphore class
- objects defined by ${../../ident}.
- links: []
-test-brief: Test the ${/if/rtems/sem/ident:/name} directive.
-test-description: null
-test-epilogue: null
-test-fixture: null
-test-header: null
-test-includes: []
-test-local-includes:
-- tr-object-ident.h
-test-prologue: |
- rtems_status_code sc;
- rtems_id id_local_object;
-
- sc = rtems_semaphore_create(
- ClassicObjectIdentName,
- 0,
- RTEMS_DEFAULT_ATTRIBUTES,
- 0,
- &id_local_object
- );
- T_assert_rsc_success( sc );
-test-support: |
- static rtems_status_code ClassicSemIdentAction(
- rtems_name name,
- uint32_t node,
- rtems_id *id
- )
- {
- return rtems_semaphore_ident( name, node, id );
- }
-test-target: testsuites/validation/tc-sem-ident.c
-type: test-case
diff --git a/spec/req/rtems/tasks/construct-errors.yml b/spec/req/rtems/tasks/construct-errors.yml
deleted file mode 100644
index 2e24ac94..00000000
--- a/spec/req/rtems/tasks/construct-errors.yml
+++ /dev/null
@@ -1,499 +0,0 @@
-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
-functional-type: action
-links:
-- role: interface-function
- uid: /if/rtems/tasks/construct
-post-conditions:
-- name: Status
- states:
- - name: Ok
- test-code: |
- T_rsc_success( ctx->status );
- T_eq_ptr( ctx->id, &ctx->id_value );
- T_ne_u32( ctx->id_value, 0xffffffff );
-
- sc = rtems_task_delete( ctx->id_value );
- T_rsc_success( sc );
- text: |
- The status shall be RTEMS_SUCCESSFUL. The value of the object identifier
- referenced by the id parameter shall identify the constructed task.
- - name: InvAddress
- test-code: |
- T_rsc( ctx->status, RTEMS_INVALID_ADDRESS );
- T_null( ctx->id );
- T_eq_u32( ctx->id_value, 0xffffffff );
- text: |
- The status shall be RTEMS_INVALID_ADDRESS.
- - name: InvName
- test-code: |
- T_rsc( ctx->status, RTEMS_INVALID_NAME );
- T_eq_u32( ctx->id_value, 0xffffffff );
- text: |
- The status shall be RTEMS_INVALID_NAME. If the id parameter is not NULL,
- then the value of the object identifier referenced by the id parameter
- shall be unchanged.
- - name: InvPrio
- test-code: |
- T_rsc( ctx->status, RTEMS_INVALID_PRIORITY );
- T_eq_u32( ctx->id_value, 0xffffffff );
- text: |
- The status shall be RTEMS_INVALID_PRIORITY. If the id parameter is not
- NULL, then the value of the object identifier referenced by the id
- parameter shall be unchanged.
- - name: InvSize
- test-code: |
- T_rsc( ctx->status, RTEMS_INVALID_SIZE );
- T_eq_u32( ctx->id_value, 0xffffffff );
- text: |
- The status shall be RTEMS_INVALID_SIZE. If the id parameter is not NULL,
- then the value of the object identifier referenced by the id parameter
- shall be unchanged.
- - name: TooMany
- test-code: |
- T_rsc( ctx->status, RTEMS_TOO_MANY );
- T_eq_u32( ctx->id_value, 0xffffffff );
- text: |
- The status shall be RTEMS_TOO_MANY. If the id parameter is not NULL,
- then the value of the object identifier referenced by the id parameter
- shall be unchanged.
- - name: Unsatisfied
- test-code: |
- T_rsc( ctx->status, RTEMS_UNSATISFIED );
- T_eq_u32( ctx->id_value, 0xffffffff );
- text: |
- The status shall be RTEMS_UNSATISFIED. If the id parameter is not NULL,
- then the value of the object identifier referenced by the id parameter
- shall be unchanged.
- test-epilogue: null
- test-prologue: |
- rtems_status_code sc;
-pre-conditions:
-- name: Id
- states:
- - name: Id
- test-code: |
- ctx->id = &ctx->id_value;
- text: |
- The id parameter shall reference an object identifier value.
- - name: 'Null'
- test-code: |
- ctx->id = NULL;
- text: |
- The id parameter shall be NULL.
- test-epilogue: null
- test-prologue: null
-- name: Name
- states:
- - name: Valid
- test-code: |
- ctx->config.name = rtems_build_name( 'N', 'A', 'M', 'E' );
- text: |
- The name of the task configuration shall be valid.
- - name: Inv
- test-code: |
- ctx->config.name = 0;
- text: |
- The name of the task configuration shall be invalid.
- test-epilogue: null
- test-prologue: null
-- name: Prio
- states:
- - name: Valid
- test-code: |
- ctx->config.initial_priority = 254;
- text: |
- The initial priority of the task configuration shall be valid.
- - name: Zero
- test-code: |
- ctx->config.initial_priority = 0;
- text: |
- The initial priority of the task configuration shall be zero.
- - name: Inv
- test-code: |
- ctx->config.initial_priority = 0xffffffff;
- text: |
- The initial priority of the task configuration shall be invalid.
- test-epilogue: null
- test-prologue: null
-- name: Tasks
- states:
- - name: Avail
- test-code: |
- /* Nothing to do */
- text: |
- There shall be at least one inactive task object available.
- - name: None
- test-code: |
- create_extension_status = ctx->create_extension_status;
- ctx->create_extension_status = true;
-
- while ( true ) {
- rtems_status_code sc;
- rtems_id id;
-
- sc = rtems_task_construct( &valid_task_config, &id );
-
- if ( sc == RTEMS_SUCCESSFUL ) {
- Objects_Control *obj;
- const Objects_Information *info;
-
- info = _Objects_Get_information_id( id );
- T_quiet_assert_not_null( info );
- obj = _Objects_Get_no_protection( id, info );
- T_quiet_assert_not_null( obj );
- _Chain_Append_unprotected( &ctx->tasks, &obj->Node );
- } else {
- T_quiet_rsc( sc, RTEMS_TOO_MANY );
- break;
- }
- }
-
- ctx->create_extension_status = create_extension_status;
- text: |
- There shall be no inactive task object available.
- test-epilogue: null
- test-prologue: |
- bool create_extension_status;
-- name: TLS
- states:
- - name: Enough
- test-code: |
- ctx->config.maximum_thread_local_storage_size = MAX_TLS_SIZE;
- text: |
- The maximum thread-local storage size of the task configuration shall be
- greater than or equal to the thread-local storage size.
- - name: Small
- test-code: |
- ctx->config.maximum_thread_local_storage_size = 0;
- text: |
- The maximum thread-local storage size of the task configuration shall be
- less than the thread-local storage size.
- test-epilogue: null
- test-prologue: null
-- name: Stack
- states:
- - name: Enough
- test-code: |
- ctx->stack_size = RTEMS_MINIMUM_STACK_SIZE;
- text: |
- The task stack size of the task configuration shall be greater than or
- equal to the configured minimum size.
- - name: Small
- test-code: |
- ctx->stack_size = 0;
- text: |
- The task stack size of the task configuration shall be less than to the
- configured minimum size.
- test-epilogue: null
- test-prologue: null
-- name: Ext
- states:
- - name: Ok
- test-code: |
- ctx->create_extension_status = true;
- text: |
- None of the task create extensions shall fail.
- - name: Err
- test-code: |
- ctx->create_extension_status = false;
- text: |
- At least one of the task create extensions shall fail.
- test-epilogue: null
- test-prologue: null
-- name: Preempt
- states:
- - name: 'Yes'
- test-code: |
- ctx->config.initial_modes &= ~RTEMS_PREEMPT_MASK;
- ctx->config.initial_modes |= RTEMS_PREEMPT;
- text: |
- The preemptible mode in the initial modes of the task configuration shall
- be set to preemptible.
- - name: 'No'
- test-code: |
- ctx->config.initial_modes &= ~RTEMS_PREEMPT_MASK;
- ctx->config.initial_modes |= RTEMS_NO_PREEMPT;
- text: |
- The preemptible mode in the initial modes of the task configuration shall
- be set to non-preemptible.
- test-epilogue: null
- test-prologue: null
-rationale: null
-references: []
-requirement-type: functional
-skip-reasons: {}
-test-action: |
- ctx->config.storage_size = RTEMS_TASK_STORAGE_SIZE(
- ctx->config.maximum_thread_local_storage_size + ctx->stack_size,
- ctx->config.attributes
- );
- ctx->status = rtems_task_construct( &ctx->config, ctx->id );
-test-brief: null
-test-cleanup: |
- Chain_Node *node;
-
- while ( ( node = _Chain_Get_unprotected( &ctx->tasks ) ) ) {
- Objects_Control *obj;
- rtems_status_code sc;
-
- obj = (Objects_Control *) node;
- sc = rtems_task_delete( obj->id );
- T_quiet_rsc_success( sc );
- }
-test-context:
-- brief: null
- description: null
- member: rtems_status_code status
-- brief: null
- description: null
- member: rtems_task_config config
-- brief: null
- description: null
- member: rtems_id *id
-- brief: null
- description: null
- member: rtems_id id_value
-- brief: null
- description: null
- member: bool create_extension_status
-- brief: null
- description: null
- member: size_t stack_size
-- brief: null
- description: null
- member: rtems_id extension_id
-- brief: null
- description: null
- member: Chain_Control tasks
-test-context-support: null
-test-description: null
-test-header: null
-test-includes:
-- rtems.h
-- rtems/score/chainimpl.h
-- rtems/score/objectimpl.h
-- string.h
-test-local-includes: []
-test-prepare: |
- ctx->id_value = 0xffffffff;
- memset( &ctx->config, 0, sizeof( ctx->config ) );
-test-setup:
- brief: null
- code: |
- rtems_status_code sc;
- int var;
-
- var = tls_variable;
- RTEMS_OBFUSCATE_VARIABLE( var );
- tls_variable = var;
-
- sc = rtems_extension_create(
- rtems_build_name( 'T', 'C', 'F', 'C' ),
- &extensions,
- &ctx->extension_id
- );
- T_rsc_success( sc );
-
- _Chain_Initialize_empty( &ctx->tasks );
- description: null
-test-stop: null
-test-support: |
- static _Thread_local int tls_variable;
-
- #define MAX_TLS_SIZE RTEMS_ALIGN_UP( 128, RTEMS_TASK_STORAGE_ALIGNMENT )
-
- RTEMS_ALIGNED( RTEMS_TASK_STORAGE_ALIGNMENT ) static char task_storage[
- RTEMS_TASK_STORAGE_SIZE(
- MAX_TLS_SIZE + RTEMS_MINIMUM_STACK_SIZE,
- RTEMS_FLOATING_POINT
- )
- ];
-
- static const rtems_task_config valid_task_config = {
- .name = rtems_build_name( 'T', 'A', 'S', 'K' ),
- .initial_priority = 1,
- .storage_area = task_storage,
- .storage_size = sizeof( task_storage ),
- .maximum_thread_local_storage_size = MAX_TLS_SIZE,
- .initial_modes = RTEMS_DEFAULT_MODES,
- .attributes = RTEMS_DEFAULT_MODES
- };
-
- static bool ThreadCreate( rtems_tcb *executing, rtems_tcb *created )
- {
- (void) executing;
- (void) created;
-
- return ReqRtemsTasksConstructErrors_Instance.create_extension_status;
- }
-
- static const rtems_extensions_table extensions = {
- .thread_create = ThreadCreate
- };
-test-target: testsuites/validation/tc-task-construct-errors.c
-test-teardown:
- brief: null
- code: |
- rtems_status_code sc;
-
- sc = rtems_extension_delete( ctx->extension_id );
- T_rsc_success( sc );
- description: null
-text: ${.:text-template}
-transition-map:
-- enabled-by: true
- post-conditions:
- Status: Ok
- pre-conditions:
- Id:
- - Id
- Name:
- - Valid
- Prio:
- - Valid
- Tasks:
- - Avail
- TLS:
- - Enough
- Stack:
- - Enough
- Ext:
- - Ok
- Preempt: all
-- enabled-by: true
- post-conditions:
- Status: InvAddress
- pre-conditions:
- Id:
- - 'Null'
- Name: all
- Prio: all
- Tasks: all
- TLS: all
- Stack: all
- Ext: all
- Preempt: all
-- enabled-by: true
- post-conditions:
- Status: InvName
- pre-conditions:
- Id:
- - Id
- Name:
- - Inv
- Prio: all
- Tasks: all
- TLS: all
- Stack: all
- Ext: all
- Preempt: all
-- enabled-by: true
- post-conditions:
- Status: InvPrio
- pre-conditions:
- Id:
- - Id
- Name:
- - Valid
- Prio:
- - Zero
- - Inv
- Tasks: all
- TLS: all
- Stack: all
- Ext: all
- Preempt: all
-- enabled-by: true
- post-conditions:
- Status: TooMany
- pre-conditions:
- Id:
- - Id
- Name:
- - Valid
- Prio:
- - Valid
- Tasks:
- - None
- TLS: all
- Stack: all
- Ext: all
- Preempt: all
-- enabled-by: true
- post-conditions:
- Status: InvSize
- pre-conditions:
- Id:
- - Id
- Name:
- - Valid
- Prio:
- - Valid
- Tasks:
- - Avail
- TLS:
- - Small
- Stack: all
- Ext: all
- Preempt: all
-- enabled-by: true
- post-conditions:
- Status: InvSize
- pre-conditions:
- Id:
- - Id
- Name:
- - Valid
- Prio:
- - Valid
- Tasks:
- - Avail
- TLS:
- - Enough
- Stack:
- - Small
- Ext: all
- Preempt: all
-- enabled-by: true
- post-conditions:
- Status: Unsatisfied
- pre-conditions:
- Id:
- - Id
- Name:
- - Valid
- Prio:
- - Valid
- Tasks:
- - Avail
- TLS:
- - Enough
- Stack:
- - Enough
- Ext:
- - Err
- Preempt: all
-- enabled-by: RTEMS_SMP
- post-conditions:
- Status: Unsatisfied
- pre-conditions:
- Id:
- - Id
- Name:
- - Valid
- Prio:
- - Valid
- Tasks:
- - Avail
- TLS:
- - Enough
- Stack:
- - Enough
- Ext:
- - Ok
- Preempt:
- - 'No'
-type: requirement
diff --git a/spec/req/rtems/tasks/ident.yml b/spec/req/rtems/tasks/ident.yml
deleted file mode 100644
index 9b4df1d4..00000000
--- a/spec/req/rtems/tasks/ident.yml
+++ /dev/null
@@ -1,123 +0,0 @@
-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
-functional-type: action
-links:
-- role: interface-function
- uid: /if/rtems/tasks/ident
-post-conditions:
-- name: Post
- states:
- - name: OkAndSelfId
- test-code: |
- T_rsc(ctx->status, RTEMS_SUCCESSFUL);
- T_eq_ptr(ctx->id, &ctx->id_value);
- T_eq_u32(ctx->id_value, rtems_task_self());
- text: |
- The status shall be RTEMS_SUCCESSFUL. The value of the object identifier
- referenced by the id parameter shall be the identifier of the executing
- thread.
- - name: Generic
- test-code: |
- /* Checks performed by ${../ident:/test-run}() */
- text: |
- The post-condition status shall be specified by ${../ident}.
- test-epilogue: null
- test-prologue: null
-pre-conditions:
-- name: Pre
- states:
- - name: Self
- test-code: |
- ctx->id_value = 0xffffffff;
- ctx->id = &ctx->id_value;
- text: |
- The name parameter shall be RTEMS_SELF.
- - name: Generic
- test-code: |
- ctx->id = NULL;
- /* Preparation performed by ${../ident:/test-run}() */
- text: |
- The pre-condition status shall be specified by ${../ident}.
- test-epilogue: null
- test-prologue: null
-rationale: null
-references: []
-requirement-type: functional
-skip-reasons: {}
-test-action: |
- if ( ctx->id != NULL ) {
- ctx->status = rtems_task_ident( RTEMS_SELF, 0xdeadbeef, ctx->id );
- } else {
- ${../ident:/test-run}(
- ctx->id_local_object,
- ClassicTaskIdentAction
- );
- }
-test-brief: null
-test-cleanup: null
-test-context:
-- brief: null
- description: null
- member: rtems_status_code status
-- brief: null
- description: null
- member: rtems_id *id
-- brief: null
- description: null
- member: rtems_id id_value
-- brief: null
- description: null
- member: rtems_id id_local_object
-test-context-support: null
-test-description: null
-test-header: null
-test-includes: []
-test-local-includes:
-- tr-object-ident.h
-test-prepare: null
-test-setup:
- brief: null
- code: |
- static char task_storage[ RTEMS_MINIMUM_STACK_SIZE ];
- static const rtems_task_config task_config = {
- .name = ClassicObjectIdentName,
- .initial_priority = 1,
- .storage_area = task_storage,
- .storage_size = sizeof( task_storage ),
- .initial_modes = RTEMS_DEFAULT_MODES,
- .attributes = RTEMS_DEFAULT_ATTRIBUTES
- };
- rtems_status_code sc;
-
- sc = rtems_task_build( &task_config, &ctx->id_local_object );
- T_assert_rsc_success( sc );
- description: null
-test-stop: null
-test-support: |
- static rtems_status_code ClassicTaskIdentAction(
- rtems_name name,
- uint32_t node,
- rtems_id *id
- )
- {
- return rtems_task_ident( name, node, id );
- }
-test-target: testsuites/validation/tc-task-ident.c
-test-teardown: null
-text: ${.:text-template}
-transition-map:
-- enabled-by: true
- post-conditions:
- Post: OkAndSelfId
- pre-conditions:
- Pre:
- - Self
-- enabled-by: true
- post-conditions:
- Post: Generic
- pre-conditions:
- Pre:
- - Generic
-type: requirement
diff --git a/spec/req/rtems/timer/ident.yml b/spec/req/rtems/timer/ident.yml
deleted file mode 100644
index 1391e8b4..00000000
--- a/spec/req/rtems/timer/ident.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-SPDX-License-Identifier: CC-BY-SA-4.0
-copyrights:
-- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
-enabled-by: true
-functional-type: function
-links:
-- role: interface-function
- uid: /if/rtems/timer/ident
-rationale: null
-references: []
-requirement-type: functional
-text: |
- The ${/if/rtems/timer/ident:/name} directive shall identify an Classic API
- timer class object by its name as specified by ${../ident-local}.
-type: requirement
diff --git a/spec/req/rtems/timer/val/ident.yml b/spec/req/rtems/timer/val/ident.yml
deleted file mode 100644
index 16c25913..00000000
--- a/spec/req/rtems/timer/val/ident.yml
+++ /dev/null
@@ -1,45 +0,0 @@
-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: ../ident
-test-actions:
-- action: |
- ${../../ident-local:/test-run}(
- id_local_object,
- ClassicTimerIdentAction
- );
- checks: []
- description: |
- Run the generic object identification tests for Classic API timer class
- objects defined by ${../../ident-local}.
- links: []
-test-brief: Test the ${/if/rtems/timer/ident:/name} directive.
-test-description: null
-test-epilogue: null
-test-fixture: null
-test-header: null
-test-includes: []
-test-local-includes:
-- tr-object-ident-local.h
-test-prologue: |
- rtems_status_code sc;
- rtems_id id_local_object;
-
- sc = rtems_timer_create(
- ClassicObjectLocalIdentName,
- &id_local_object
- );
- T_assert_rsc_success( sc );
-test-support: |
- static rtems_status_code ClassicTimerIdentAction(
- rtems_name name,
- rtems_id *id
- )
- {
- return rtems_timer_ident( name, id );
- }
-test-target: testsuites/validation/tc-timer-ident.c
-type: test-case
diff --git a/spec/req/rtems/userext/ident.yml b/spec/req/rtems/userext/ident.yml
deleted file mode 100644
index e9d09864..00000000
--- a/spec/req/rtems/userext/ident.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-SPDX-License-Identifier: CC-BY-SA-4.0
-copyrights:
-- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
-enabled-by: true
-functional-type: function
-links:
-- role: interface-function
- uid: /if/rtems/userext/ident
-rationale: null
-references: []
-requirement-type: functional
-text: |
- The ${/if/rtems/userext/ident:/name} directive shall identify an Classic API
- user extension class object by its name as specified by ${../ident-local}.
-type: requirement
diff --git a/spec/req/rtems/userext/val/ident.yml b/spec/req/rtems/userext/val/ident.yml
deleted file mode 100644
index 6da57c5d..00000000
--- a/spec/req/rtems/userext/val/ident.yml
+++ /dev/null
@@ -1,47 +0,0 @@
-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: ../ident
-test-actions:
-- action: |
- ${../../ident-local:/test-run}(
- id_local_object,
- ClassicUserExtIdentAction
- );
- checks: []
- description: |
- Run the generic object identification tests for Classic API user extension
- class objects defined by ${../../ident-local}.
- links: []
-test-brief: Test the ${/if/rtems/userext/ident:/name} directive.
-test-description: null
-test-epilogue: null
-test-fixture: null
-test-header: null
-test-includes: []
-test-local-includes:
-- tr-object-ident-local.h
-test-prologue: |
- static const rtems_extensions_table table;
- rtems_status_code sc;
- rtems_id id_local_object;
-
- sc = rtems_extension_create(
- ClassicObjectLocalIdentName,
- &table,
- &id_local_object
- );
- T_assert_rsc_success( sc );
-test-support: |
- static rtems_status_code ClassicUserExtIdentAction(
- rtems_name name,
- rtems_id *id
- )
- {
- return rtems_extension_ident( name, id );
- }
-test-target: testsuites/validation/tc-userext-ident.c
-type: test-case
diff --git a/spec/req/system.yml b/spec/req/system.yml
new file mode 100644
index 00000000..39b2b04b
--- /dev/null
+++ b/spec/req/system.yml
@@ -0,0 +1,12 @@
+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
+functional-type: function
+links: []
+rationale: null
+references: []
+requirement-type: functional
+text: |
+ The system shall shall be a real-time operating system.
+type: requirement