summaryrefslogtreecommitdiffstats
path: root/spec/rtems/part/val
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2020-10-06 17:46:46 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2020-10-08 15:19:31 +0200
commit21ebee734ffdb427a0f7d0cdb324035f4721011b (patch)
tree2f19307d9fa5ed39d3905558bba0f18ace1f06df /spec/rtems/part/val
parentspec: Use RTEMS_TEST_VERBOSITY (diff)
downloadrtems-central-21ebee734ffdb427a0f7d0cdb324035f4721011b.tar.bz2
spec: Specify Partition Manager
Diffstat (limited to 'spec/rtems/part/val')
-rw-r--r--spec/rtems/part/val/part.yml109
1 files changed, 109 insertions, 0 deletions
diff --git a/spec/rtems/part/val/part.yml b/spec/rtems/part/val/part.yml
new file mode 100644
index 00000000..c4e8c7ed
--- /dev/null
+++ b/spec/rtems/part/val/part.yml
@@ -0,0 +1,109 @@
+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: |
+ id = 0xffffffff;
+ sc = rtems_partition_create(
+ rtems_build_name( 'N', 'A', 'M', 'E' ),
+ buffers,
+ sizeof( buffers ) - 1,
+ sizeof( buffers[ 0 ] ),
+ RTEMS_DEFAULT_ATTRIBUTES,
+ &id
+ );
+ T_step_rsc_success( ${step}, sc );
+ checks:
+ - check: |
+ pointers[ 0 ] = NULL;
+ sc = rtems_partition_get_buffer( id, &pointers[ 0 ] );
+ T_step_rsc_success( ${step}, sc );
+ T_step_not_null( ${step}, pointers[ 0 ] );
+
+ pointers[ 1 ] = NULL;
+ sc = rtems_partition_get_buffer( id, &pointers[ 1 ] );
+ T_step_rsc_success( ${step}, sc );
+ T_step_not_null( ${step}, pointers[ 1 ] );
+
+ pointers[ 2 ] = NULL;
+ sc = rtems_partition_get_buffer( id, &pointers[ 2 ] );
+ T_step_rsc_success( ${step}, sc );
+ T_step_not_null( ${step}, pointers[ 2 ] );
+
+ pointers[ 3 ] = NULL;
+ sc = rtems_partition_get_buffer( id, &pointers[ 3 ] );
+ T_step_rsc( ${step}, sc, RTEMS_UNSATISFIED );
+ T_step_null( ${step}, pointers[ 3 ] );
+ description: |
+ Check that exactly three buffers can be obtained from the partition for
+ use in parallel.
+ links:
+ - role: validation
+ uid: ../req/buffers
+ - check: |
+ sc = rtems_partition_return_buffer( id, pointers[ 1 ] );
+ T_step_rsc_success( ${step}, sc );
+
+ sc = rtems_partition_return_buffer( id, pointers[ 2 ] );
+ T_step_rsc_success( ${step}, sc );
+
+ sc = rtems_partition_return_buffer( id, pointers[ 0 ] );
+ T_step_rsc_success( ${step}, sc );
+
+ pointer = NULL;
+ sc = rtems_partition_get_buffer( id, &pointer );
+ T_step_rsc_success( ${step}, sc );
+ T_step_eq_ptr( ${step}, pointer, pointers[ 1 ] );
+
+ pointer = NULL;
+ sc = rtems_partition_get_buffer( id, &pointer );
+ T_step_rsc_success( ${step}, sc );
+ T_step_eq_ptr( ${step}, pointer, pointers[ 2 ] );
+
+ pointer = NULL;
+ sc = rtems_partition_get_buffer( id, &pointer );
+ T_step_rsc_success( ${step}, sc );
+ T_step_eq_ptr( ${step}, pointer, pointers[ 0 ] );
+
+ sc = rtems_partition_return_buffer( id, pointers[ 0 ] );
+ T_step_rsc_success( ${step}, sc );
+
+ sc = rtems_partition_return_buffer( id, pointers[ 1 ] );
+ T_step_rsc_success( ${step}, sc );
+
+ sc = rtems_partition_return_buffer( id, pointers[ 2 ] );
+ T_step_rsc_success( ${step}, sc );
+
+ sc = rtems_partition_delete( id );
+ T_step_rsc_success( ${step}, sc );
+ description: |
+ Return the three buffers in use to the partition and check that they can
+ be obtained from the partition for use in parallel in FIFO order.
+ links:
+ - role: validation
+ uid: ../req/fifo
+ description: |
+ Create a partition with a buffer area length which is greater than three
+ times the buffer size and less than four times the buffer size.
+ links: []
+test-brief: |
+ Validates some functional requirements of the Partition Manager.
+test-description: null
+test-epilogue: null
+test-fixture: null
+test-header: null
+test-includes:
+- rtems.h
+test-local-includes: []
+test-prologue: |
+ RTEMS_ALIGNED( RTEMS_PARTITION_ALIGNMENT ) uint8_t
+ buffers[ 4 ][ 2 * sizeof( void * ) ];
+ void *pointers[ RTEMS_ARRAY_SIZE( buffers ) ];
+ void *pointer;
+ rtems_status_code sc;
+ rtems_id id;
+test-support: null
+test-target: testsuites/validation/tc-part.c
+type: test-case