From cb13fa362e2b28dd374c3492ef150531a7817be5 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Wed, 7 Oct 2020 15:20:06 +0200 Subject: validation: Add tests for Partition Manager --- spec/build/testsuites/validation/validation-0.yml | 5 + testsuites/validation/tc-part-create.c | 2516 +++++++++++++++++++++ testsuites/validation/tc-part-delete.c | 390 ++++ testsuites/validation/tc-part-get.c | 543 +++++ testsuites/validation/tc-part-return.c | 473 ++++ testsuites/validation/tc-part.c | 179 ++ 6 files changed, 4106 insertions(+) create mode 100644 testsuites/validation/tc-part-create.c create mode 100644 testsuites/validation/tc-part-delete.c create mode 100644 testsuites/validation/tc-part-get.c create mode 100644 testsuites/validation/tc-part-return.c create mode 100644 testsuites/validation/tc-part.c diff --git a/spec/build/testsuites/validation/validation-0.yml b/spec/build/testsuites/validation/validation-0.yml index df885a8d2f..04639bd190 100644 --- a/spec/build/testsuites/validation/validation-0.yml +++ b/spec/build/testsuites/validation/validation-0.yml @@ -24,7 +24,12 @@ source: - testsuites/validation/tc-modes.c - testsuites/validation/tc-object.c - testsuites/validation/tc-options.c +- testsuites/validation/tc-part.c +- testsuites/validation/tc-part-create.c +- testsuites/validation/tc-part-delete.c +- testsuites/validation/tc-part-get.c - testsuites/validation/tc-part-ident.c +- testsuites/validation/tc-part-return.c - testsuites/validation/tc-ratemon-ident.c - testsuites/validation/tc-sem-ident.c - testsuites/validation/tc-signal-catch.c diff --git a/testsuites/validation/tc-part-create.c b/testsuites/validation/tc-part-create.c new file mode 100644 index 0000000000..e9f0ff98d0 --- /dev/null +++ b/testsuites/validation/tc-part-create.c @@ -0,0 +1,2516 @@ +/* SPDX-License-Identifier: BSD-2-Clause */ + +/** + * @file + * + * @ingroup RTEMSTestCaseRtemsPartReqCreate + */ + +/* + * Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * This file is part of the RTEMS quality process and was automatically + * generated. If you find something that needs to be fixed or + * worded better please post a report or patch to an RTEMS mailing list + * or raise a bug report: + * + * https://www.rtems.org/bugs.html + * + * For information on updating and regenerating please refer to the How-To + * section in the Software Requirements Engineering chapter of the + * RTEMS Software Engineering manual. The manual is provided as a part of + * a release. For development sources please refer to the online + * documentation at: + * + * https://docs.rtems.org + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include + +#include + +/** + * @defgroup RTEMSTestCaseRtemsPartReqCreate spec:/rtems/part/req/create + * + * @ingroup RTEMSTestSuiteTestsuitesValidation0 + * + * @{ + */ + +typedef enum { + RtemsPartReqCreate_Pre_Id_Id, + RtemsPartReqCreate_Pre_Id_Null, + RtemsPartReqCreate_Pre_Id_NA +} RtemsPartReqCreate_Pre_Id; + +typedef enum { + RtemsPartReqCreate_Pre_Name_Valid, + RtemsPartReqCreate_Pre_Name_Invalid, + RtemsPartReqCreate_Pre_Name_NA +} RtemsPartReqCreate_Pre_Name; + +typedef enum { + RtemsPartReqCreate_Pre_Start_Valid, + RtemsPartReqCreate_Pre_Start_Null, + RtemsPartReqCreate_Pre_Start_BadAlign, + RtemsPartReqCreate_Pre_Start_NA +} RtemsPartReqCreate_Pre_Start; + +typedef enum { + RtemsPartReqCreate_Pre_Length_Valid, + RtemsPartReqCreate_Pre_Length_Zero, + RtemsPartReqCreate_Pre_Length_Invalid, + RtemsPartReqCreate_Pre_Length_NA +} RtemsPartReqCreate_Pre_Length; + +typedef enum { + RtemsPartReqCreate_Pre_Size_Valid, + RtemsPartReqCreate_Pre_Size_Zero, + RtemsPartReqCreate_Pre_Size_Skew, + RtemsPartReqCreate_Pre_Size_Small, + RtemsPartReqCreate_Pre_Size_NA +} RtemsPartReqCreate_Pre_Size; + +typedef enum { + RtemsPartReqCreate_Pre_Free_Yes, + RtemsPartReqCreate_Pre_Free_No, + RtemsPartReqCreate_Pre_Free_NA +} RtemsPartReqCreate_Pre_Free; + +typedef enum { + RtemsPartReqCreate_Post_Status_Ok, + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Status_InvSize, + RtemsPartReqCreate_Post_Status_TooMany, + RtemsPartReqCreate_Post_Status_NA +} RtemsPartReqCreate_Post_Status; + +typedef enum { + RtemsPartReqCreate_Post_Name_Valid, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_Name_NA +} RtemsPartReqCreate_Post_Name; + +typedef enum { + RtemsPartReqCreate_Post_IdValue_Assigned, + RtemsPartReqCreate_Post_IdValue_Unchanged, + RtemsPartReqCreate_Post_IdValue_NA +} RtemsPartReqCreate_Post_IdValue; + +/** + * @brief Test context for spec:/rtems/part/req/create test case. + */ +typedef struct { + void *seized_objects; + + rtems_status_code status; + + rtems_name name; + + void *starting_address; + + uintptr_t length; + + size_t buffer_size; + + rtems_attribute attribute_set; + + rtems_id *id; + + rtems_id id_value; + + /** + * @brief This member defines the pre-condition states for the next action. + */ + size_t pcs[ 6 ]; + + /** + * @brief This member indicates if the test action loop is currently + * executed. + */ + bool in_action_loop; +} RtemsPartReqCreate_Context; + +static RtemsPartReqCreate_Context + RtemsPartReqCreate_Instance; + +static const char * const RtemsPartReqCreate_PreDesc_Id[] = { + "Id", + "Null", + "NA" +}; + +static const char * const RtemsPartReqCreate_PreDesc_Name[] = { + "Valid", + "Invalid", + "NA" +}; + +static const char * const RtemsPartReqCreate_PreDesc_Start[] = { + "Valid", + "Null", + "BadAlign", + "NA" +}; + +static const char * const RtemsPartReqCreate_PreDesc_Length[] = { + "Valid", + "Zero", + "Invalid", + "NA" +}; + +static const char * const RtemsPartReqCreate_PreDesc_Size[] = { + "Valid", + "Zero", + "Skew", + "Small", + "NA" +}; + +static const char * const RtemsPartReqCreate_PreDesc_Free[] = { + "Yes", + "No", + "NA" +}; + +static const char * const * const RtemsPartReqCreate_PreDesc[] = { + RtemsPartReqCreate_PreDesc_Id, + RtemsPartReqCreate_PreDesc_Name, + RtemsPartReqCreate_PreDesc_Start, + RtemsPartReqCreate_PreDesc_Length, + RtemsPartReqCreate_PreDesc_Size, + RtemsPartReqCreate_PreDesc_Free, + NULL +}; + +#define NAME rtems_build_name( 'T', 'E', 'S', 'T' ) + +#define INVALID_ID 0xffffffff + +#define MAX_PARTITIONS 4 + +#define BUFFER_COUNT 2 + +#define BUFFER_SIZE ( 2 * sizeof( void * ) ) + +static RTEMS_ALIGNED( RTEMS_PARTITION_ALIGNMENT ) uint8_t + buffers_to_seize[ MAX_PARTITIONS ][ BUFFER_COUNT ][ BUFFER_SIZE ]; + +static RTEMS_ALIGNED( RTEMS_PARTITION_ALIGNMENT ) uint8_t + buffers[ BUFFER_COUNT ][ BUFFER_SIZE ]; + +static rtems_status_code Create( void *arg, uint32_t *id ) +{ + size_t *i; + size_t j; + + i = arg; + j = *i; + T_quiet_lt_sz( j, MAX_PARTITIONS ); + + *i = j + 1; + + return rtems_partition_create( + rtems_build_name( 'S', 'I', 'Z', 'E' ), + buffers_to_seize[ j ], + sizeof( buffers_to_seize[ j ] ), + sizeof( buffers_to_seize[ j ][ 0 ] ), + RTEMS_DEFAULT_ATTRIBUTES, + id + ); +} + +static void RtemsPartReqCreate_Pre_Id_Prepare( + RtemsPartReqCreate_Context *ctx, + RtemsPartReqCreate_Pre_Id state +) +{ + switch ( state ) { + case RtemsPartReqCreate_Pre_Id_Id: { + /* + * The ``id`` parameter shall reference an object of type rtems_id. + */ + ctx->id = &ctx->id_value; + break; + } + + case RtemsPartReqCreate_Pre_Id_Null: { + /* + * The ``id`` parameter shall be NULL. + */ + ctx->id = NULL; + break; + } + + case RtemsPartReqCreate_Pre_Id_NA: + break; + } +} + +static void RtemsPartReqCreate_Pre_Name_Prepare( + RtemsPartReqCreate_Context *ctx, + RtemsPartReqCreate_Pre_Name state +) +{ + switch ( state ) { + case RtemsPartReqCreate_Pre_Name_Valid: { + /* + * The ``name`` parameter shall be valid. + */ + ctx->name = NAME; + break; + } + + case RtemsPartReqCreate_Pre_Name_Invalid: { + /* + * The ``name`` parameter shall be invalid. + */ + ctx->name = 0; + break; + } + + case RtemsPartReqCreate_Pre_Name_NA: + break; + } +} + +static void RtemsPartReqCreate_Pre_Start_Prepare( + RtemsPartReqCreate_Context *ctx, + RtemsPartReqCreate_Pre_Start state +) +{ + switch ( state ) { + case RtemsPartReqCreate_Pre_Start_Valid: { + /* + * The ``starting_address`` parameter shall be valid. + */ + ctx->starting_address = buffers; + break; + } + + case RtemsPartReqCreate_Pre_Start_Null: { + /* + * The ``starting_address`` parameter shall be NULL. + */ + ctx->starting_address = NULL; + break; + } + + case RtemsPartReqCreate_Pre_Start_BadAlign: { + /* + * The ``starting_address`` parameter shall be misaligned. + */ + ctx->starting_address = &buffers[ 0 ][ 1 ]; + break; + } + + case RtemsPartReqCreate_Pre_Start_NA: + break; + } +} + +static void RtemsPartReqCreate_Pre_Length_Prepare( + RtemsPartReqCreate_Context *ctx, + RtemsPartReqCreate_Pre_Length state +) +{ + switch ( state ) { + case RtemsPartReqCreate_Pre_Length_Valid: { + /* + * The ``length`` parameter shall be valid. + */ + ctx->length = sizeof( buffers ); + break; + } + + case RtemsPartReqCreate_Pre_Length_Zero: { + /* + * The ``length`` parameter shall be zero. + */ + ctx->length = 0; + break; + } + + case RtemsPartReqCreate_Pre_Length_Invalid: { + /* + * The ``length`` parameter shall be less than the buffer size. + */ + ctx->length = sizeof( buffers[ 0 ] ) - 1; + break; + } + + case RtemsPartReqCreate_Pre_Length_NA: + break; + } +} + +static void RtemsPartReqCreate_Pre_Size_Prepare( + RtemsPartReqCreate_Context *ctx, + RtemsPartReqCreate_Pre_Size state +) +{ + switch ( state ) { + case RtemsPartReqCreate_Pre_Size_Valid: { + /* + * The ``buffer_size`` parameter shall be valid. + */ + ctx->buffer_size = sizeof( buffers[ 0 ] ); + break; + } + + case RtemsPartReqCreate_Pre_Size_Zero: { + /* + * The ``buffer_size`` parameter shall be zero. + */ + ctx->buffer_size = 0; + break; + } + + case RtemsPartReqCreate_Pre_Size_Skew: { + /* + * The ``buffer_size`` parameter shall not an integral multiple of the + * pointer size. + */ + ctx->buffer_size = 1; + break; + } + + case RtemsPartReqCreate_Pre_Size_Small: { + /* + * The ``buffer_size`` parameter shall greater than zero and an integral + * multiple of the pointer size and less than the size of two pointers. + */ + ctx->buffer_size = sizeof( uintptr_t ); + break; + } + + case RtemsPartReqCreate_Pre_Size_NA: + break; + } +} + +static void RtemsPartReqCreate_Pre_Free_Prepare( + RtemsPartReqCreate_Context *ctx, + RtemsPartReqCreate_Pre_Free state +) +{ + size_t i; + + switch ( state ) { + case RtemsPartReqCreate_Pre_Free_Yes: { + /* + * The system shall have at least one inactive partition object + * available. + */ + /* Nothing to do */ + break; + } + + case RtemsPartReqCreate_Pre_Free_No: { + /* + * The system shall have no inactive partition object available. + */ + i = 0; + ctx->seized_objects = T_seize_objects( Create, &i ); + break; + } + + case RtemsPartReqCreate_Pre_Free_NA: + break; + } +} + +static void RtemsPartReqCreate_Post_Status_Check( + RtemsPartReqCreate_Context *ctx, + RtemsPartReqCreate_Post_Status state +) +{ + switch ( state ) { + case RtemsPartReqCreate_Post_Status_Ok: { + /* + * The return status of rtems_partition_create() shall be + * RTEMS_SUCCESSFUL. + */ + T_rsc_success( ctx->status ); + break; + } + + case RtemsPartReqCreate_Post_Status_InvAddress: { + /* + * The return status of rtems_partition_create() shall be + * RTEMS_INVALID_ADDRESS. + */ + T_rsc( ctx->status, RTEMS_INVALID_ADDRESS ); + break; + } + + case RtemsPartReqCreate_Post_Status_InvName: { + /* + * The return status of rtems_partition_create() shall be + * RTEMS_INVALID_NAME. + */ + T_rsc( ctx->status, RTEMS_INVALID_NAME ); + break; + } + + case RtemsPartReqCreate_Post_Status_InvSize: { + /* + * The return status of rtems_partition_create() shall be + * RTEMS_INVALID_SIZE. + */ + T_rsc( ctx->status, RTEMS_INVALID_SIZE ); + break; + } + + case RtemsPartReqCreate_Post_Status_TooMany: { + /* + * The return status of rtems_partition_create() shall be RTEMS_TOO_MANY. + */ + T_rsc( ctx->status, RTEMS_TOO_MANY ); + break; + } + + case RtemsPartReqCreate_Post_Status_NA: + break; + } +} + +static void RtemsPartReqCreate_Post_Name_Check( + RtemsPartReqCreate_Context *ctx, + RtemsPartReqCreate_Post_Name state +) +{ + rtems_status_code sc; + rtems_id id; + + switch ( state ) { + case RtemsPartReqCreate_Post_Name_Valid: { + /* + * The unique object name shall identify the partition created by the + * rtems_partition_create() call. + */ + id = 0; + sc = rtems_partition_ident( NAME, RTEMS_SEARCH_LOCAL_NODE, &id ); + T_rsc_success( sc ); + T_eq_u32( id, ctx->id_value ); + break; + } + + case RtemsPartReqCreate_Post_Name_Invalid: { + /* + * The unique object name shall not identify a partition. + */ + sc = rtems_partition_ident( NAME, RTEMS_SEARCH_LOCAL_NODE, &id ); + T_rsc( sc, RTEMS_INVALID_NAME ); + break; + } + + case RtemsPartReqCreate_Post_Name_NA: + break; + } +} + +static void RtemsPartReqCreate_Post_IdValue_Check( + RtemsPartReqCreate_Context *ctx, + RtemsPartReqCreate_Post_IdValue state +) +{ + rtems_status_code sc; + size_t i; + void *buffers[ BUFFER_COUNT ]; + void *no_buffer; + + switch ( state ) { + case RtemsPartReqCreate_Post_IdValue_Assigned: { + /* + * The value of the object identifier variable shall be equal to the + * object identifier of the partition created by the + * rtems_partition_create() call. + */ + T_eq_ptr( ctx->id, &ctx->id_value ); + T_ne_u32( ctx->id_value, INVALID_ID ); + + for ( i = 0; i < BUFFER_COUNT; ++i) { + sc = rtems_partition_get_buffer( ctx->id_value, &buffers[ i ] ); + T_rsc_success( sc ); + T_not_null( buffers[ i ] ); + } + + no_buffer = (void *) (uintptr_t) 1; + sc = rtems_partition_get_buffer( ctx->id_value, &no_buffer ); + T_rsc( sc, RTEMS_UNSATISFIED ); + T_eq_ptr( no_buffer, (void *) (uintptr_t) 1 ); + + for ( i = 0; i < BUFFER_COUNT; ++i) { + sc = rtems_partition_return_buffer( ctx->id_value, buffers[ i ] ); + T_rsc_success( sc ); + } + + sc = rtems_partition_delete( ctx->id_value ); + T_rsc_success( sc ); + break; + } + + case RtemsPartReqCreate_Post_IdValue_Unchanged: { + /* + * The value of the object identifier variable shall be unchanged by the + * rtems_partition_create() call. + */ + T_eq_u32( ctx->id_value, INVALID_ID ); + break; + } + + case RtemsPartReqCreate_Post_IdValue_NA: + break; + } +} + +static size_t RtemsPartReqCreate_Scope( void *arg, char *buf, size_t n ) +{ + RtemsPartReqCreate_Context *ctx; + + ctx = arg; + + if ( ctx->in_action_loop ) { + return T_get_scope( RtemsPartReqCreate_PreDesc, buf, n, ctx->pcs ); + } + + return 0; +} + +static T_fixture RtemsPartReqCreate_Fixture = { + .setup = NULL, + .stop = NULL, + .teardown = NULL, + .scope = RtemsPartReqCreate_Scope, + .initial_context = &RtemsPartReqCreate_Instance +}; + +static const uint8_t RtemsPartReqCreate_TransitionMap[][ 3 ] = { + { + RtemsPartReqCreate_Post_Status_Ok, + RtemsPartReqCreate_Post_Name_Valid, + RtemsPartReqCreate_Post_IdValue_Assigned + }, { + RtemsPartReqCreate_Post_Status_TooMany, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvSize, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvSize, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvSize, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvSize, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvSize, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvSize, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvSize, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvSize, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvSize, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvSize, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvSize, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvSize, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvSize, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvSize, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvSize, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvSize, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvSize, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvSize, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvSize, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvSize, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvSize, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvSize, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvSize, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvSize, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvSize, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvSize, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvSize, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvSize, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvSize, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvSize, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvSize, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvSize, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvSize, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvSize, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvSize, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvSize, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvSize, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvSize, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvSize, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvSize, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvSize, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvSize, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvSize, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvSize, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvAddress, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + }, { + RtemsPartReqCreate_Post_Status_InvName, + RtemsPartReqCreate_Post_Name_Invalid, + RtemsPartReqCreate_Post_IdValue_Unchanged + } +}; + +static const struct { + uint8_t Skip : 1; + uint8_t Pre_Id_NA : 1; + uint8_t Pre_Name_NA : 1; + uint8_t Pre_Start_NA : 1; + uint8_t Pre_Length_NA : 1; + uint8_t Pre_Size_NA : 1; + uint8_t Pre_Free_NA : 1; +} RtemsPartReqCreate_TransitionInfo[] = { + { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + }, { + 0, 0, 0, 0, 0, 0, 0 + } +}; + +static void RtemsPartReqCreate_Prepare( RtemsPartReqCreate_Context *ctx ) +{ + rtems_status_code sc; + rtems_id id; + + ctx->id_value = INVALID_ID; + ctx->attribute_set = RTEMS_DEFAULT_ATTRIBUTES; + + id = INVALID_ID; + sc = rtems_partition_ident( NAME, RTEMS_SEARCH_LOCAL_NODE, &id ); + T_rsc( sc, RTEMS_INVALID_NAME ); + T_eq_u32( id, INVALID_ID ); +} + +static void RtemsPartReqCreate_Action( RtemsPartReqCreate_Context *ctx ) +{ + ctx->status = rtems_partition_create( + ctx->name, + ctx->starting_address, + ctx->length, + ctx->buffer_size, + ctx->attribute_set, + ctx->id + ); +} + +static void RtemsPartReqCreate_Cleanup( RtemsPartReqCreate_Context *ctx ) +{ + T_surrender_objects( &ctx->seized_objects, rtems_partition_delete ); +} + +/** + * @fn void T_case_body_RtemsPartReqCreate( void ) + */ +T_TEST_CASE_FIXTURE( RtemsPartReqCreate, &RtemsPartReqCreate_Fixture ) +{ + RtemsPartReqCreate_Context *ctx; + size_t index; + + ctx = T_fixture_context(); + ctx->in_action_loop = true; + index = 0; + + for ( + ctx->pcs[ 0 ] = RtemsPartReqCreate_Pre_Id_Id; + ctx->pcs[ 0 ] < RtemsPartReqCreate_Pre_Id_NA; + ++ctx->pcs[ 0 ] + ) { + if ( RtemsPartReqCreate_TransitionInfo[ index ].Pre_Id_NA ) { + ctx->pcs[ 0 ] = RtemsPartReqCreate_Pre_Id_NA; + index += ( RtemsPartReqCreate_Pre_Id_NA - 1 ) + * RtemsPartReqCreate_Pre_Name_NA + * RtemsPartReqCreate_Pre_Start_NA + * RtemsPartReqCreate_Pre_Length_NA + * RtemsPartReqCreate_Pre_Size_NA + * RtemsPartReqCreate_Pre_Free_NA; + } + + for ( + ctx->pcs[ 1 ] = RtemsPartReqCreate_Pre_Name_Valid; + ctx->pcs[ 1 ] < RtemsPartReqCreate_Pre_Name_NA; + ++ctx->pcs[ 1 ] + ) { + if ( RtemsPartReqCreate_TransitionInfo[ index ].Pre_Name_NA ) { + ctx->pcs[ 1 ] = RtemsPartReqCreate_Pre_Name_NA; + index += ( RtemsPartReqCreate_Pre_Name_NA - 1 ) + * RtemsPartReqCreate_Pre_Start_NA + * RtemsPartReqCreate_Pre_Length_NA + * RtemsPartReqCreate_Pre_Size_NA + * RtemsPartReqCreate_Pre_Free_NA; + } + + for ( + ctx->pcs[ 2 ] = RtemsPartReqCreate_Pre_Start_Valid; + ctx->pcs[ 2 ] < RtemsPartReqCreate_Pre_Start_NA; + ++ctx->pcs[ 2 ] + ) { + if ( RtemsPartReqCreate_TransitionInfo[ index ].Pre_Start_NA ) { + ctx->pcs[ 2 ] = RtemsPartReqCreate_Pre_Start_NA; + index += ( RtemsPartReqCreate_Pre_Start_NA - 1 ) + * RtemsPartReqCreate_Pre_Length_NA + * RtemsPartReqCreate_Pre_Size_NA + * RtemsPartReqCreate_Pre_Free_NA; + } + + for ( + ctx->pcs[ 3 ] = RtemsPartReqCreate_Pre_Length_Valid; + ctx->pcs[ 3 ] < RtemsPartReqCreate_Pre_Length_NA; + ++ctx->pcs[ 3 ] + ) { + if ( RtemsPartReqCreate_TransitionInfo[ index ].Pre_Length_NA ) { + ctx->pcs[ 3 ] = RtemsPartReqCreate_Pre_Length_NA; + index += ( RtemsPartReqCreate_Pre_Length_NA - 1 ) + * RtemsPartReqCreate_Pre_Size_NA + * RtemsPartReqCreate_Pre_Free_NA; + } + + for ( + ctx->pcs[ 4 ] = RtemsPartReqCreate_Pre_Size_Valid; + ctx->pcs[ 4 ] < RtemsPartReqCreate_Pre_Size_NA; + ++ctx->pcs[ 4 ] + ) { + if ( RtemsPartReqCreate_TransitionInfo[ index ].Pre_Size_NA ) { + ctx->pcs[ 4 ] = RtemsPartReqCreate_Pre_Size_NA; + index += ( RtemsPartReqCreate_Pre_Size_NA - 1 ) + * RtemsPartReqCreate_Pre_Free_NA; + } + + for ( + ctx->pcs[ 5 ] = RtemsPartReqCreate_Pre_Free_Yes; + ctx->pcs[ 5 ] < RtemsPartReqCreate_Pre_Free_NA; + ++ctx->pcs[ 5 ] + ) { + if ( RtemsPartReqCreate_TransitionInfo[ index ].Pre_Free_NA ) { + ctx->pcs[ 5 ] = RtemsPartReqCreate_Pre_Free_NA; + index += ( RtemsPartReqCreate_Pre_Free_NA - 1 ); + } + + if ( RtemsPartReqCreate_TransitionInfo[ index ].Skip ) { + ++index; + continue; + } + + RtemsPartReqCreate_Prepare( ctx ); + RtemsPartReqCreate_Pre_Id_Prepare( ctx, ctx->pcs[ 0 ] ); + RtemsPartReqCreate_Pre_Name_Prepare( ctx, ctx->pcs[ 1 ] ); + RtemsPartReqCreate_Pre_Start_Prepare( ctx, ctx->pcs[ 2 ] ); + RtemsPartReqCreate_Pre_Length_Prepare( ctx, ctx->pcs[ 3 ] ); + RtemsPartReqCreate_Pre_Size_Prepare( ctx, ctx->pcs[ 4 ] ); + RtemsPartReqCreate_Pre_Free_Prepare( ctx, ctx->pcs[ 5 ] ); + RtemsPartReqCreate_Action( ctx ); + RtemsPartReqCreate_Post_Status_Check( + ctx, + RtemsPartReqCreate_TransitionMap[ index ][ 0 ] + ); + RtemsPartReqCreate_Post_Name_Check( + ctx, + RtemsPartReqCreate_TransitionMap[ index ][ 1 ] + ); + RtemsPartReqCreate_Post_IdValue_Check( + ctx, + RtemsPartReqCreate_TransitionMap[ index ][ 2 ] + ); + RtemsPartReqCreate_Cleanup( ctx ); + ++index; + } + } + } + } + } + } +} + +/** @} */ diff --git a/testsuites/validation/tc-part-delete.c b/testsuites/validation/tc-part-delete.c new file mode 100644 index 0000000000..0f4698d61a --- /dev/null +++ b/testsuites/validation/tc-part-delete.c @@ -0,0 +1,390 @@ +/* SPDX-License-Identifier: BSD-2-Clause */ + +/** + * @file + * + * @ingroup RTEMSTestCaseRtemsPartReqDelete + */ + +/* + * Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * This file is part of the RTEMS quality process and was automatically + * generated. If you find something that needs to be fixed or + * worded better please post a report or patch to an RTEMS mailing list + * or raise a bug report: + * + * https://www.rtems.org/bugs.html + * + * For information on updating and regenerating please refer to the How-To + * section in the Software Requirements Engineering chapter of the + * RTEMS Software Engineering manual. The manual is provided as a part of + * a release. For development sources please refer to the online + * documentation at: + * + * https://docs.rtems.org + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#include + +/** + * @defgroup RTEMSTestCaseRtemsPartReqDelete spec:/rtems/part/req/delete + * + * @ingroup RTEMSTestSuiteTestsuitesValidation0 + * + * @{ + */ + +typedef enum { + RtemsPartReqDelete_Pre_Id_NoObj, + RtemsPartReqDelete_Pre_Id_Part, + RtemsPartReqDelete_Pre_Id_NA +} RtemsPartReqDelete_Pre_Id; + +typedef enum { + RtemsPartReqDelete_Pre_InUse_Yes, + RtemsPartReqDelete_Pre_InUse_No, + RtemsPartReqDelete_Pre_InUse_NA +} RtemsPartReqDelete_Pre_InUse; + +typedef enum { + RtemsPartReqDelete_Post_Status_Ok, + RtemsPartReqDelete_Post_Status_InvId, + RtemsPartReqDelete_Post_Status_InUse, + RtemsPartReqDelete_Post_Status_NA +} RtemsPartReqDelete_Post_Status; + +/** + * @brief Test context for spec:/rtems/part/req/delete test case. + */ +typedef struct { + rtems_status_code status; + + rtems_id id; + + rtems_id id_value; + + void *buffer; + + /** + * @brief This member defines the pre-condition states for the next action. + */ + size_t pcs[ 2 ]; + + /** + * @brief This member indicates if the test action loop is currently + * executed. + */ + bool in_action_loop; +} RtemsPartReqDelete_Context; + +static RtemsPartReqDelete_Context + RtemsPartReqDelete_Instance; + +static const char * const RtemsPartReqDelete_PreDesc_Id[] = { + "NoObj", + "Part", + "NA" +}; + +static const char * const RtemsPartReqDelete_PreDesc_InUse[] = { + "Yes", + "No", + "NA" +}; + +static const char * const * const RtemsPartReqDelete_PreDesc[] = { + RtemsPartReqDelete_PreDesc_Id, + RtemsPartReqDelete_PreDesc_InUse, + NULL +}; + +#define PART_NAME rtems_build_name( 'N', 'A', 'M', 'E' ) + +#define BUFFER_COUNT 1 + +#define BUFFER_SIZE ( 2 * sizeof( void * ) ) + +static RTEMS_ALIGNED( RTEMS_PARTITION_ALIGNMENT ) uint8_t + buffers[ BUFFER_COUNT ][ BUFFER_SIZE ]; + +static void RtemsPartReqDelete_Pre_Id_Prepare( + RtemsPartReqDelete_Context *ctx, + RtemsPartReqDelete_Pre_Id state +) +{ + switch ( state ) { + case RtemsPartReqDelete_Pre_Id_NoObj: { + /* + * The ``id`` parameter shall be invalid. + */ + ctx->id = 0xffffffff; + break; + } + + case RtemsPartReqDelete_Pre_Id_Part: { + /* + * The ``id`` parameter shall be associated with a partition. + */ + ctx->id = ctx->id_value; + break; + } + + case RtemsPartReqDelete_Pre_Id_NA: + break; + } +} + +static void RtemsPartReqDelete_Pre_InUse_Prepare( + RtemsPartReqDelete_Context *ctx, + RtemsPartReqDelete_Pre_InUse state +) +{ + rtems_status_code sc; + + switch ( state ) { + case RtemsPartReqDelete_Pre_InUse_Yes: { + /* + * The partition shall have at least one buffer in use. + */ + ctx->buffer = NULL; + sc = rtems_partition_get_buffer( ctx->id_value, &ctx->buffer ); + T_rsc_success( sc ); + T_not_null( ctx->buffer ); + break; + } + + case RtemsPartReqDelete_Pre_InUse_No: { + /* + * The partition shall have no buffer in use. + */ + ctx->buffer = NULL; + break; + } + + case RtemsPartReqDelete_Pre_InUse_NA: + break; + } +} + +static void RtemsPartReqDelete_Post_Status_Check( + RtemsPartReqDelete_Context *ctx, + RtemsPartReqDelete_Post_Status state +) +{ + rtems_status_code sc; + rtems_id id; + + switch ( state ) { + case RtemsPartReqDelete_Post_Status_Ok: { + /* + * The status shall be RTEMS_SUCCESSFUL. The deleted partition object + * shall be inactive. + */ + T_rsc_success( ctx->status ); + ctx->id_value = 0xffffffff; + + id = 0xffffffff; + sc = rtems_partition_ident( PART_NAME, RTEMS_SEARCH_LOCAL_NODE, &id ); + T_rsc( sc, RTEMS_INVALID_NAME ); + T_eq_u32( id, 0xffffffff ); + break; + } + + case RtemsPartReqDelete_Post_Status_InvId: { + /* + * The status shall be RTEMS_INVALID_ID. + */ + T_rsc( ctx->status, RTEMS_INVALID_ID ); + + id = 0xffffffff; + sc = rtems_partition_ident( PART_NAME, RTEMS_SEARCH_LOCAL_NODE, &id ); + T_rsc_success( sc); + T_eq_u32( id, ctx->id_value ); + break; + } + + case RtemsPartReqDelete_Post_Status_InUse: { + /* + * The status shall be RTEMS_RESOURCE_IN_USE. + */ + T_rsc( ctx->status, RTEMS_RESOURCE_IN_USE ); + + id = 0xffffffff; + sc = rtems_partition_ident( PART_NAME, RTEMS_SEARCH_LOCAL_NODE, &id ); + T_rsc_success( sc); + T_eq_u32( id, ctx->id_value ); + break; + } + + case RtemsPartReqDelete_Post_Status_NA: + break; + } +} + +static size_t RtemsPartReqDelete_Scope( void *arg, char *buf, size_t n ) +{ + RtemsPartReqDelete_Context *ctx; + + ctx = arg; + + if ( ctx->in_action_loop ) { + return T_get_scope( RtemsPartReqDelete_PreDesc, buf, n, ctx->pcs ); + } + + return 0; +} + +static T_fixture RtemsPartReqDelete_Fixture = { + .setup = NULL, + .stop = NULL, + .teardown = NULL, + .scope = RtemsPartReqDelete_Scope, + .initial_context = &RtemsPartReqDelete_Instance +}; + +static const uint8_t RtemsPartReqDelete_TransitionMap[][ 1 ] = { + { + RtemsPartReqDelete_Post_Status_InvId + }, { + RtemsPartReqDelete_Post_Status_InvId + }, { + RtemsPartReqDelete_Post_Status_InUse + }, { + RtemsPartReqDelete_Post_Status_Ok + } +}; + +static const struct { + uint8_t Skip : 1; + uint8_t Pre_Id_NA : 1; + uint8_t Pre_InUse_NA : 1; +} RtemsPartReqDelete_TransitionInfo[] = { + { + 0, 0, 0 + }, { + 0, 0, 0 + }, { + 0, 0, 0 + }, { + 0, 0, 0 + } +}; + +static void RtemsPartReqDelete_Prepare( RtemsPartReqDelete_Context *ctx ) +{ + rtems_status_code sc; + + sc = rtems_partition_create( + PART_NAME, + buffers, + sizeof( buffers ), + sizeof( buffers[ 0 ] ), + RTEMS_DEFAULT_ATTRIBUTES, + &ctx->id_value + ); + T_rsc_success( sc ); +} + +static void RtemsPartReqDelete_Action( RtemsPartReqDelete_Context *ctx ) +{ + ctx->status = rtems_partition_delete( ctx->id ); +} + +static void RtemsPartReqDelete_Cleanup( RtemsPartReqDelete_Context *ctx ) +{ + rtems_status_code sc; + + if ( ctx->buffer != NULL ) { + sc = rtems_partition_return_buffer( ctx->id_value, ctx->buffer ); + T_rsc_success( sc ); + } + + if ( ctx->id_value != 0xffffffff ) { + sc = rtems_partition_delete( ctx->id_value ); + T_rsc_success( sc ); + } +} + +/** + * @fn void T_case_body_RtemsPartReqDelete( void ) + */ +T_TEST_CASE_FIXTURE( RtemsPartReqDelete, &RtemsPartReqDelete_Fixture ) +{ + RtemsPartReqDelete_Context *ctx; + size_t index; + + ctx = T_fixture_context(); + ctx->in_action_loop = true; + index = 0; + + for ( + ctx->pcs[ 0 ] = RtemsPartReqDelete_Pre_Id_NoObj; + ctx->pcs[ 0 ] < RtemsPartReqDelete_Pre_Id_NA; + ++ctx->pcs[ 0 ] + ) { + if ( RtemsPartReqDelete_TransitionInfo[ index ].Pre_Id_NA ) { + ctx->pcs[ 0 ] = RtemsPartReqDelete_Pre_Id_NA; + index += ( RtemsPartReqDelete_Pre_Id_NA - 1 ) + * RtemsPartReqDelete_Pre_InUse_NA; + } + + for ( + ctx->pcs[ 1 ] = RtemsPartReqDelete_Pre_InUse_Yes; + ctx->pcs[ 1 ] < RtemsPartReqDelete_Pre_InUse_NA; + ++ctx->pcs[ 1 ] + ) { + if ( RtemsPartReqDelete_TransitionInfo[ index ].Pre_InUse_NA ) { + ctx->pcs[ 1 ] = RtemsPartReqDelete_Pre_InUse_NA; + index += ( RtemsPartReqDelete_Pre_InUse_NA - 1 ); + } + + if ( RtemsPartReqDelete_TransitionInfo[ index ].Skip ) { + ++index; + continue; + } + + RtemsPartReqDelete_Prepare( ctx ); + RtemsPartReqDelete_Pre_Id_Prepare( ctx, ctx->pcs[ 0 ] ); + RtemsPartReqDelete_Pre_InUse_Prepare( ctx, ctx->pcs[ 1 ] ); + RtemsPartReqDelete_Action( ctx ); + RtemsPartReqDelete_Post_Status_Check( + ctx, + RtemsPartReqDelete_TransitionMap[ index ][ 0 ] + ); + RtemsPartReqDelete_Cleanup( ctx ); + ++index; + } + } +} + +/** @} */ diff --git a/testsuites/validation/tc-part-get.c b/testsuites/validation/tc-part-get.c new file mode 100644 index 0000000000..c2083b1e82 --- /dev/null +++ b/testsuites/validation/tc-part-get.c @@ -0,0 +1,543 @@ +/* SPDX-License-Identifier: BSD-2-Clause */ + +/** + * @file + * + * @ingroup RTEMSTestCaseRtemsPartReqGetBuffer + */ + +/* + * Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * This file is part of the RTEMS quality process and was automatically + * generated. If you find something that needs to be fixed or + * worded better please post a report or patch to an RTEMS mailing list + * or raise a bug report: + * + * https://www.rtems.org/bugs.html + * + * For information on updating and regenerating please refer to the How-To + * section in the Software Requirements Engineering chapter of the + * RTEMS Software Engineering manual. The manual is provided as a part of + * a release. For development sources please refer to the online + * documentation at: + * + * https://docs.rtems.org + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#include + +/** + * @defgroup RTEMSTestCaseRtemsPartReqGetBuffer spec:/rtems/part/req/get-buffer + * + * @ingroup RTEMSTestSuiteTestsuitesValidation0 + * + * @{ + */ + +typedef enum { + RtemsPartReqGetBuffer_Pre_Id_NoObj, + RtemsPartReqGetBuffer_Pre_Id_Part, + RtemsPartReqGetBuffer_Pre_Id_NA +} RtemsPartReqGetBuffer_Pre_Id; + +typedef enum { + RtemsPartReqGetBuffer_Pre_Buf_Valid, + RtemsPartReqGetBuffer_Pre_Buf_Null, + RtemsPartReqGetBuffer_Pre_Buf_NA +} RtemsPartReqGetBuffer_Pre_Buf; + +typedef enum { + RtemsPartReqGetBuffer_Pre_Avail_Yes, + RtemsPartReqGetBuffer_Pre_Avail_No, + RtemsPartReqGetBuffer_Pre_Avail_NA +} RtemsPartReqGetBuffer_Pre_Avail; + +typedef enum { + RtemsPartReqGetBuffer_Post_Status_Ok, + RtemsPartReqGetBuffer_Post_Status_InvId, + RtemsPartReqGetBuffer_Post_Status_InvAddr, + RtemsPartReqGetBuffer_Post_Status_Unsat, + RtemsPartReqGetBuffer_Post_Status_NA +} RtemsPartReqGetBuffer_Post_Status; + +typedef enum { + RtemsPartReqGetBuffer_Post_BufValue_Assigned, + RtemsPartReqGetBuffer_Post_BufValue_Unchanged, + RtemsPartReqGetBuffer_Post_BufValue_NA +} RtemsPartReqGetBuffer_Post_BufValue; + +/** + * @brief Test context for spec:/rtems/part/req/get-buffer test case. + */ +typedef struct { + rtems_status_code status; + + rtems_id id; + + rtems_id id_value; + + void **buffer; + + void *buffer_pointer; + + void *stolen_buffer; + + /** + * @brief This member defines the pre-condition states for the next action. + */ + size_t pcs[ 3 ]; + + /** + * @brief This member indicates if the test action loop is currently + * executed. + */ + bool in_action_loop; +} RtemsPartReqGetBuffer_Context; + +static RtemsPartReqGetBuffer_Context + RtemsPartReqGetBuffer_Instance; + +static const char * const RtemsPartReqGetBuffer_PreDesc_Id[] = { + "NoObj", + "Part", + "NA" +}; + +static const char * const RtemsPartReqGetBuffer_PreDesc_Buf[] = { + "Valid", + "Null", + "NA" +}; + +static const char * const RtemsPartReqGetBuffer_PreDesc_Avail[] = { + "Yes", + "No", + "NA" +}; + +static const char * const * const RtemsPartReqGetBuffer_PreDesc[] = { + RtemsPartReqGetBuffer_PreDesc_Id, + RtemsPartReqGetBuffer_PreDesc_Buf, + RtemsPartReqGetBuffer_PreDesc_Avail, + NULL +}; + +#define BUFFER_COUNT 1 + +#define BUFFER_SIZE ( 2 * sizeof( void * ) ) + +static RTEMS_ALIGNED( RTEMS_PARTITION_ALIGNMENT ) uint8_t + buffers[ BUFFER_COUNT ][ BUFFER_SIZE ]; + +static void RtemsPartReqGetBuffer_Pre_Id_Prepare( + RtemsPartReqGetBuffer_Context *ctx, + RtemsPartReqGetBuffer_Pre_Id state +) +{ + switch ( state ) { + case RtemsPartReqGetBuffer_Pre_Id_NoObj: { + /* + * The ``id`` parameter shall be invalid. + */ + ctx->id = 0xffffffff; + break; + } + + case RtemsPartReqGetBuffer_Pre_Id_Part: { + /* + * The ``id`` parameter shall be associated with a partition. + */ + ctx->id = ctx->id_value; + break; + } + + case RtemsPartReqGetBuffer_Pre_Id_NA: + break; + } +} + +static void RtemsPartReqGetBuffer_Pre_Buf_Prepare( + RtemsPartReqGetBuffer_Context *ctx, + RtemsPartReqGetBuffer_Pre_Buf state +) +{ + switch ( state ) { + case RtemsPartReqGetBuffer_Pre_Buf_Valid: { + /* + * The ``buffer`` parameter shall reference an object of type ``void *``. + */ + ctx->buffer = &ctx->buffer_pointer; + break; + } + + case RtemsPartReqGetBuffer_Pre_Buf_Null: { + /* + * The ``buffer`` parameter shall be NULL. + */ + ctx->buffer = NULL; + break; + } + + case RtemsPartReqGetBuffer_Pre_Buf_NA: + break; + } +} + +static void RtemsPartReqGetBuffer_Pre_Avail_Prepare( + RtemsPartReqGetBuffer_Context *ctx, + RtemsPartReqGetBuffer_Pre_Avail state +) +{ + rtems_status_code sc; + + switch ( state ) { + case RtemsPartReqGetBuffer_Pre_Avail_Yes: { + /* + * The partition shall have at least one free buffer available. + */ + /* Nothing to do */ + break; + } + + case RtemsPartReqGetBuffer_Pre_Avail_No: { + /* + * The partition shall have no buffer available. + */ + sc = rtems_partition_get_buffer( ctx->id_value, &ctx->stolen_buffer ); + T_rsc_success( sc ); + break; + } + + case RtemsPartReqGetBuffer_Pre_Avail_NA: + break; + } +} + +static void RtemsPartReqGetBuffer_Post_Status_Check( + RtemsPartReqGetBuffer_Context *ctx, + RtemsPartReqGetBuffer_Post_Status state +) +{ + switch ( state ) { + case RtemsPartReqGetBuffer_Post_Status_Ok: { + /* + * The return status of rtems_partition_get_buffer() shall be + * RTEMS_SUCCESSFUL. + */ + T_rsc_success( ctx->status ); + T_eq_ptr( ctx->buffer_pointer, buffers ); + break; + } + + case RtemsPartReqGetBuffer_Post_Status_InvId: { + /* + * The return status of rtems_partition_get_buffer() shall be + * RTEMS_INVALID_ID. + */ + T_rsc( ctx->status, RTEMS_INVALID_ID ); + T_eq_ptr( ctx->buffer_pointer, (void *) (uintptr_t) 1 ); + break; + } + + case RtemsPartReqGetBuffer_Post_Status_InvAddr: { + /* + * The return status of rtems_partition_get_buffer() shall be + * RTEMS_INVALID_ADDRESS. + */ + T_rsc( ctx->status, RTEMS_INVALID_ADDRESS ); + break; + } + + case RtemsPartReqGetBuffer_Post_Status_Unsat: { + /* + * The return status of rtems_partition_get_buffer() shall be + * RTEMS_UNSATISFIED. + */ + T_rsc( ctx->status, RTEMS_UNSATISFIED ); + T_eq_ptr( ctx->buffer_pointer, (void *) (uintptr_t) 1 ); + break; + } + + case RtemsPartReqGetBuffer_Post_Status_NA: + break; + } +} + +static void RtemsPartReqGetBuffer_Post_BufValue_Check( + RtemsPartReqGetBuffer_Context *ctx, + RtemsPartReqGetBuffer_Post_BufValue state +) +{ + switch ( state ) { + case RtemsPartReqGetBuffer_Post_BufValue_Assigned: { + /* + * The value of the buffer pointer variable shall be equal to the begin + * address of the buffer returned by the rtems_partition_get_buffer() + * call. + */ + T_eq_ptr( ctx->buffer, &ctx->buffer_pointer ); + T_eq_ptr( ctx->buffer_pointer, buffers ); + break; + } + + case RtemsPartReqGetBuffer_Post_BufValue_Unchanged: { + /* + * The value of the buffer pointer variable shall be unchanged by the + * rtems_partition_get_buffer() call. + */ + T_eq_ptr( ctx->buffer_pointer, (void *) (uintptr_t) 1 ); + break; + } + + case RtemsPartReqGetBuffer_Post_BufValue_NA: + break; + } +} + +static void RtemsPartReqGetBuffer_Setup( RtemsPartReqGetBuffer_Context *ctx ) +{ + rtems_status_code sc; + + ctx->id_value = 0; + sc = rtems_partition_create( + rtems_build_name( 'N', 'A', 'M', 'E' ), + buffers, + sizeof( buffers ), + sizeof( buffers[ 0 ] ), + RTEMS_DEFAULT_ATTRIBUTES, + &ctx->id_value + ); + T_assert_rsc_success( sc ); +} + +static void RtemsPartReqGetBuffer_Setup_Wrap( void *arg ) +{ + RtemsPartReqGetBuffer_Context *ctx; + + ctx = arg; + ctx->in_action_loop = false; + RtemsPartReqGetBuffer_Setup( ctx ); +} + +static void RtemsPartReqGetBuffer_Teardown( + RtemsPartReqGetBuffer_Context *ctx +) +{ + if ( ctx->id_value != 0 ) { + rtems_status_code sc; + + sc = rtems_partition_delete( ctx->id_value ); + T_rsc_success( sc ); + } +} + +static void RtemsPartReqGetBuffer_Teardown_Wrap( void *arg ) +{ + RtemsPartReqGetBuffer_Context *ctx; + + ctx = arg; + ctx->in_action_loop = false; + RtemsPartReqGetBuffer_Teardown( ctx ); +} + +static size_t RtemsPartReqGetBuffer_Scope( void *arg, char *buf, size_t n ) +{ + RtemsPartReqGetBuffer_Context *ctx; + + ctx = arg; + + if ( ctx->in_action_loop ) { + return T_get_scope( RtemsPartReqGetBuffer_PreDesc, buf, n, ctx->pcs ); + } + + return 0; +} + +static T_fixture RtemsPartReqGetBuffer_Fixture = { + .setup = RtemsPartReqGetBuffer_Setup_Wrap, + .stop = NULL, + .teardown = RtemsPartReqGetBuffer_Teardown_Wrap, + .scope = RtemsPartReqGetBuffer_Scope, + .initial_context = &RtemsPartReqGetBuffer_Instance +}; + +static const uint8_t RtemsPartReqGetBuffer_TransitionMap[][ 2 ] = { + { + RtemsPartReqGetBuffer_Post_Status_InvId, + RtemsPartReqGetBuffer_Post_BufValue_Unchanged + }, { + RtemsPartReqGetBuffer_Post_Status_InvId, + RtemsPartReqGetBuffer_Post_BufValue_Unchanged + }, { + RtemsPartReqGetBuffer_Post_Status_InvAddr, + RtemsPartReqGetBuffer_Post_BufValue_Unchanged + }, { + RtemsPartReqGetBuffer_Post_Status_InvAddr, + RtemsPartReqGetBuffer_Post_BufValue_Unchanged + }, { + RtemsPartReqGetBuffer_Post_Status_Ok, + RtemsPartReqGetBuffer_Post_BufValue_Assigned + }, { + RtemsPartReqGetBuffer_Post_Status_Unsat, + RtemsPartReqGetBuffer_Post_BufValue_Unchanged + }, { + RtemsPartReqGetBuffer_Post_Status_InvAddr, + RtemsPartReqGetBuffer_Post_BufValue_Unchanged + }, { + RtemsPartReqGetBuffer_Post_Status_InvAddr, + RtemsPartReqGetBuffer_Post_BufValue_Unchanged + } +}; + +static const struct { + uint8_t Skip : 1; + uint8_t Pre_Id_NA : 1; + uint8_t Pre_Buf_NA : 1; + uint8_t Pre_Avail_NA : 1; +} RtemsPartReqGetBuffer_TransitionInfo[] = { + { + 0, 0, 0, 0 + }, { + 0, 0, 0, 0 + }, { + 0, 0, 0, 0 + }, { + 0, 0, 0, 0 + }, { + 0, 0, 0, 0 + }, { + 0, 0, 0, 0 + }, { + 0, 0, 0, 0 + }, { + 0, 0, 0, 0 + } +}; + +static void RtemsPartReqGetBuffer_Prepare( RtemsPartReqGetBuffer_Context *ctx ) +{ + ctx->buffer_pointer = (void *) (uintptr_t) 1; + ctx->stolen_buffer = NULL; +} + +static void RtemsPartReqGetBuffer_Action( RtemsPartReqGetBuffer_Context *ctx ) +{ + ctx->status = rtems_partition_get_buffer( ctx->id, ctx->buffer ); +} + +static void RtemsPartReqGetBuffer_Cleanup( RtemsPartReqGetBuffer_Context *ctx ) +{ + rtems_status_code sc; + + if ( (uintptr_t) ctx->buffer_pointer != 1 ) { + sc = rtems_partition_return_buffer( ctx->id_value, ctx->buffer_pointer ); + T_rsc_success( sc ); + } + + if ( ctx->stolen_buffer != NULL ) { + sc = rtems_partition_return_buffer( ctx->id_value, ctx->stolen_buffer ); + T_rsc_success( sc ); + } +} + +/** + * @fn void T_case_body_RtemsPartReqGetBuffer( void ) + */ +T_TEST_CASE_FIXTURE( RtemsPartReqGetBuffer, &RtemsPartReqGetBuffer_Fixture ) +{ + RtemsPartReqGetBuffer_Context *ctx; + size_t index; + + ctx = T_fixture_context(); + ctx->in_action_loop = true; + index = 0; + + for ( + ctx->pcs[ 0 ] = RtemsPartReqGetBuffer_Pre_Id_NoObj; + ctx->pcs[ 0 ] < RtemsPartReqGetBuffer_Pre_Id_NA; + ++ctx->pcs[ 0 ] + ) { + if ( RtemsPartReqGetBuffer_TransitionInfo[ index ].Pre_Id_NA ) { + ctx->pcs[ 0 ] = RtemsPartReqGetBuffer_Pre_Id_NA; + index += ( RtemsPartReqGetBuffer_Pre_Id_NA - 1 ) + * RtemsPartReqGetBuffer_Pre_Buf_NA + * RtemsPartReqGetBuffer_Pre_Avail_NA; + } + + for ( + ctx->pcs[ 1 ] = RtemsPartReqGetBuffer_Pre_Buf_Valid; + ctx->pcs[ 1 ] < RtemsPartReqGetBuffer_Pre_Buf_NA; + ++ctx->pcs[ 1 ] + ) { + if ( RtemsPartReqGetBuffer_TransitionInfo[ index ].Pre_Buf_NA ) { + ctx->pcs[ 1 ] = RtemsPartReqGetBuffer_Pre_Buf_NA; + index += ( RtemsPartReqGetBuffer_Pre_Buf_NA - 1 ) + * RtemsPartReqGetBuffer_Pre_Avail_NA; + } + + for ( + ctx->pcs[ 2 ] = RtemsPartReqGetBuffer_Pre_Avail_Yes; + ctx->pcs[ 2 ] < RtemsPartReqGetBuffer_Pre_Avail_NA; + ++ctx->pcs[ 2 ] + ) { + if ( RtemsPartReqGetBuffer_TransitionInfo[ index ].Pre_Avail_NA ) { + ctx->pcs[ 2 ] = RtemsPartReqGetBuffer_Pre_Avail_NA; + index += ( RtemsPartReqGetBuffer_Pre_Avail_NA - 1 ); + } + + if ( RtemsPartReqGetBuffer_TransitionInfo[ index ].Skip ) { + ++index; + continue; + } + + RtemsPartReqGetBuffer_Prepare( ctx ); + RtemsPartReqGetBuffer_Pre_Id_Prepare( ctx, ctx->pcs[ 0 ] ); + RtemsPartReqGetBuffer_Pre_Buf_Prepare( ctx, ctx->pcs[ 1 ] ); + RtemsPartReqGetBuffer_Pre_Avail_Prepare( ctx, ctx->pcs[ 2 ] ); + RtemsPartReqGetBuffer_Action( ctx ); + RtemsPartReqGetBuffer_Post_Status_Check( + ctx, + RtemsPartReqGetBuffer_TransitionMap[ index ][ 0 ] + ); + RtemsPartReqGetBuffer_Post_BufValue_Check( + ctx, + RtemsPartReqGetBuffer_TransitionMap[ index ][ 1 ] + ); + RtemsPartReqGetBuffer_Cleanup( ctx ); + ++index; + } + } + } +} + +/** @} */ diff --git a/testsuites/validation/tc-part-return.c b/testsuites/validation/tc-part-return.c new file mode 100644 index 0000000000..d1de631536 --- /dev/null +++ b/testsuites/validation/tc-part-return.c @@ -0,0 +1,473 @@ +/* SPDX-License-Identifier: BSD-2-Clause */ + +/** + * @file + * + * @ingroup RTEMSTestCaseRtemsPartReqReturnBuffer + */ + +/* + * Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * This file is part of the RTEMS quality process and was automatically + * generated. If you find something that needs to be fixed or + * worded better please post a report or patch to an RTEMS mailing list + * or raise a bug report: + * + * https://www.rtems.org/bugs.html + * + * For information on updating and regenerating please refer to the How-To + * section in the Software Requirements Engineering chapter of the + * RTEMS Software Engineering manual. The manual is provided as a part of + * a release. For development sources please refer to the online + * documentation at: + * + * https://docs.rtems.org + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#include + +/** + * @defgroup RTEMSTestCaseRtemsPartReqReturnBuffer \ + * spec:/rtems/part/req/return-buffer + * + * @ingroup RTEMSTestSuiteTestsuitesValidation0 + * + * @{ + */ + +typedef enum { + RtemsPartReqReturnBuffer_Pre_Id_NoObj, + RtemsPartReqReturnBuffer_Pre_Id_Part, + RtemsPartReqReturnBuffer_Pre_Id_NA +} RtemsPartReqReturnBuffer_Pre_Id; + +typedef enum { + RtemsPartReqReturnBuffer_Pre_Buf_Valid, + RtemsPartReqReturnBuffer_Pre_Buf_BadAlign, + RtemsPartReqReturnBuffer_Pre_Buf_OutOfArea, + RtemsPartReqReturnBuffer_Pre_Buf_NA +} RtemsPartReqReturnBuffer_Pre_Buf; + +typedef enum { + RtemsPartReqReturnBuffer_Post_Status_Ok, + RtemsPartReqReturnBuffer_Post_Status_InvId, + RtemsPartReqReturnBuffer_Post_Status_InvAddr, + RtemsPartReqReturnBuffer_Post_Status_NA +} RtemsPartReqReturnBuffer_Post_Status; + +typedef enum { + RtemsPartReqReturnBuffer_Post_Buf_Free, + RtemsPartReqReturnBuffer_Post_Buf_InUse, + RtemsPartReqReturnBuffer_Post_Buf_NA +} RtemsPartReqReturnBuffer_Post_Buf; + +/** + * @brief Test context for spec:/rtems/part/req/return-buffer test case. + */ +typedef struct { + rtems_status_code status; + + rtems_id id; + + rtems_id id_value; + + void *buffer; + + void *buffer_in_use; + + /** + * @brief This member defines the pre-condition states for the next action. + */ + size_t pcs[ 2 ]; + + /** + * @brief This member indicates if the test action loop is currently + * executed. + */ + bool in_action_loop; +} RtemsPartReqReturnBuffer_Context; + +static RtemsPartReqReturnBuffer_Context + RtemsPartReqReturnBuffer_Instance; + +static const char * const RtemsPartReqReturnBuffer_PreDesc_Id[] = { + "NoObj", + "Part", + "NA" +}; + +static const char * const RtemsPartReqReturnBuffer_PreDesc_Buf[] = { + "Valid", + "BadAlign", + "OutOfArea", + "NA" +}; + +static const char * const * const RtemsPartReqReturnBuffer_PreDesc[] = { + RtemsPartReqReturnBuffer_PreDesc_Id, + RtemsPartReqReturnBuffer_PreDesc_Buf, + NULL +}; + +#define BUFFER_COUNT 1 + +#define BUFFER_SIZE ( 2 * sizeof( void * ) ) + +static RTEMS_ALIGNED( RTEMS_PARTITION_ALIGNMENT ) uint8_t + buffers[ BUFFER_COUNT ][ BUFFER_SIZE ]; + +static void RtemsPartReqReturnBuffer_Pre_Id_Prepare( + RtemsPartReqReturnBuffer_Context *ctx, + RtemsPartReqReturnBuffer_Pre_Id state +) +{ + switch ( state ) { + case RtemsPartReqReturnBuffer_Pre_Id_NoObj: { + /* + * The ``id`` parameter shall be invalid. + */ + ctx->id = 0xffffffff; + break; + } + + case RtemsPartReqReturnBuffer_Pre_Id_Part: { + /* + * The ``id`` parameter shall be associated with a partition. + */ + ctx->id = ctx->id_value; + break; + } + + case RtemsPartReqReturnBuffer_Pre_Id_NA: + break; + } +} + +static void RtemsPartReqReturnBuffer_Pre_Buf_Prepare( + RtemsPartReqReturnBuffer_Context *ctx, + RtemsPartReqReturnBuffer_Pre_Buf state +) +{ + switch ( state ) { + case RtemsPartReqReturnBuffer_Pre_Buf_Valid: { + /* + * The ``buffer`` parameter shall reference a buffer previously returned + * by rtems_partition_get_buffer(). + */ + ctx->buffer = ctx->buffer_in_use; + break; + } + + case RtemsPartReqReturnBuffer_Pre_Buf_BadAlign: { + /* + * The ``buffer`` parameter shall be an address inside the buffer area of + * the partition and not on a valid buffer boundary. + */ + ctx->buffer = (void *) ( (uintptr_t) ctx->buffer_in_use + 1 ); + break; + } + + case RtemsPartReqReturnBuffer_Pre_Buf_OutOfArea: { + /* + * The ``buffer`` parameter shall be an address outside the buffer area + * of the partition. + */ + ctx->buffer = (void *) (uintptr_t) 1; + break; + } + + case RtemsPartReqReturnBuffer_Pre_Buf_NA: + break; + } +} + +static void RtemsPartReqReturnBuffer_Post_Status_Check( + RtemsPartReqReturnBuffer_Context *ctx, + RtemsPartReqReturnBuffer_Post_Status state +) +{ + switch ( state ) { + case RtemsPartReqReturnBuffer_Post_Status_Ok: { + /* + * The return status of rtems_partition_return_buffer() shall be + * RTEMS_SUCCESSFUL. + */ + T_rsc_success( ctx->status ); + break; + } + + case RtemsPartReqReturnBuffer_Post_Status_InvId: { + /* + * The return status of rtems_partition_return_buffer() shall be + * RTEMS_INVALID_ID. + */ + T_rsc( ctx->status, RTEMS_INVALID_ID ); + break; + } + + case RtemsPartReqReturnBuffer_Post_Status_InvAddr: { + /* + * The return status of rtems_partition_return_buffer() shall be + * RTEMS_INVALID_ADDRESS. + */ + T_rsc( ctx->status, RTEMS_INVALID_ADDRESS ); + break; + } + + case RtemsPartReqReturnBuffer_Post_Status_NA: + break; + } +} + +static void RtemsPartReqReturnBuffer_Post_Buf_Check( + RtemsPartReqReturnBuffer_Context *ctx, + RtemsPartReqReturnBuffer_Post_Buf state +) +{ + rtems_status_code sc; + void *no_buffer; + + switch ( state ) { + case RtemsPartReqReturnBuffer_Post_Buf_Free: { + /* + * The buffer obtained from the partition shall be made available for + * re-use by the rtems_partition_return_buffer() call. + */ + sc = rtems_partition_get_buffer( ctx->id_value, &ctx->buffer_in_use ); + T_rsc_success( sc ); + T_eq_ptr( ctx->buffer_in_use, buffers ); + break; + } + + case RtemsPartReqReturnBuffer_Post_Buf_InUse: { + /* + * The buffer obtained from the partition shall be still in use after the + * rtems_partition_return_buffer() call. + */ + sc = rtems_partition_get_buffer( ctx->id_value, &no_buffer ); + T_rsc( sc, RTEMS_UNSATISFIED ); + break; + } + + case RtemsPartReqReturnBuffer_Post_Buf_NA: + break; + } +} + +static void RtemsPartReqReturnBuffer_Setup( + RtemsPartReqReturnBuffer_Context *ctx +) +{ + rtems_status_code sc; + + ctx->buffer_in_use = NULL; + ctx->id_value = 0; + + sc = rtems_partition_create( + rtems_build_name( 'N', 'A', 'M', 'E' ), + buffers, + sizeof( buffers ), + sizeof( buffers[ 0 ] ), + RTEMS_DEFAULT_ATTRIBUTES, + &ctx->id_value + ); + T_assert_rsc_success( sc ); + + sc = rtems_partition_get_buffer( ctx->id_value, &ctx->buffer_in_use ); + T_assert_rsc_success( sc ); + T_assert_eq_ptr( ctx->buffer_in_use, buffers ); +} + +static void RtemsPartReqReturnBuffer_Setup_Wrap( void *arg ) +{ + RtemsPartReqReturnBuffer_Context *ctx; + + ctx = arg; + ctx->in_action_loop = false; + RtemsPartReqReturnBuffer_Setup( ctx ); +} + +static void RtemsPartReqReturnBuffer_Teardown( + RtemsPartReqReturnBuffer_Context *ctx +) +{ + rtems_status_code sc; + + if ( ctx->buffer_in_use != NULL ) { + sc = rtems_partition_return_buffer( ctx->id_value, ctx->buffer_in_use ); + T_rsc_success( sc ); + } + + if ( ctx->id_value != 0 ) { + sc = rtems_partition_delete( ctx->id_value ); + T_rsc_success( sc ); + } +} + +static void RtemsPartReqReturnBuffer_Teardown_Wrap( void *arg ) +{ + RtemsPartReqReturnBuffer_Context *ctx; + + ctx = arg; + ctx->in_action_loop = false; + RtemsPartReqReturnBuffer_Teardown( ctx ); +} + +static size_t RtemsPartReqReturnBuffer_Scope( void *arg, char *buf, size_t n ) +{ + RtemsPartReqReturnBuffer_Context *ctx; + + ctx = arg; + + if ( ctx->in_action_loop ) { + return T_get_scope( RtemsPartReqReturnBuffer_PreDesc, buf, n, ctx->pcs ); + } + + return 0; +} + +static T_fixture RtemsPartReqReturnBuffer_Fixture = { + .setup = RtemsPartReqReturnBuffer_Setup_Wrap, + .stop = NULL, + .teardown = RtemsPartReqReturnBuffer_Teardown_Wrap, + .scope = RtemsPartReqReturnBuffer_Scope, + .initial_context = &RtemsPartReqReturnBuffer_Instance +}; + +static const uint8_t RtemsPartReqReturnBuffer_TransitionMap[][ 2 ] = { + { + RtemsPartReqReturnBuffer_Post_Status_InvId, + RtemsPartReqReturnBuffer_Post_Buf_InUse + }, { + RtemsPartReqReturnBuffer_Post_Status_InvId, + RtemsPartReqReturnBuffer_Post_Buf_InUse + }, { + RtemsPartReqReturnBuffer_Post_Status_InvId, + RtemsPartReqReturnBuffer_Post_Buf_InUse + }, { + RtemsPartReqReturnBuffer_Post_Status_Ok, + RtemsPartReqReturnBuffer_Post_Buf_Free + }, { + RtemsPartReqReturnBuffer_Post_Status_InvAddr, + RtemsPartReqReturnBuffer_Post_Buf_InUse + }, { + RtemsPartReqReturnBuffer_Post_Status_InvAddr, + RtemsPartReqReturnBuffer_Post_Buf_InUse + } +}; + +static const struct { + uint8_t Skip : 1; + uint8_t Pre_Id_NA : 1; + uint8_t Pre_Buf_NA : 1; +} RtemsPartReqReturnBuffer_TransitionInfo[] = { + { + 0, 0, 0 + }, { + 0, 0, 0 + }, { + 0, 0, 0 + }, { + 0, 0, 0 + }, { + 0, 0, 0 + }, { + 0, 0, 0 + } +}; + +static void RtemsPartReqReturnBuffer_Action( + RtemsPartReqReturnBuffer_Context *ctx +) +{ + ctx->status = rtems_partition_return_buffer( ctx->id, ctx->buffer ); +} + +/** + * @fn void T_case_body_RtemsPartReqReturnBuffer( void ) + */ +T_TEST_CASE_FIXTURE( + RtemsPartReqReturnBuffer, + &RtemsPartReqReturnBuffer_Fixture +) +{ + RtemsPartReqReturnBuffer_Context *ctx; + size_t index; + + ctx = T_fixture_context(); + ctx->in_action_loop = true; + index = 0; + + for ( + ctx->pcs[ 0 ] = RtemsPartReqReturnBuffer_Pre_Id_NoObj; + ctx->pcs[ 0 ] < RtemsPartReqReturnBuffer_Pre_Id_NA; + ++ctx->pcs[ 0 ] + ) { + if ( RtemsPartReqReturnBuffer_TransitionInfo[ index ].Pre_Id_NA ) { + ctx->pcs[ 0 ] = RtemsPartReqReturnBuffer_Pre_Id_NA; + index += ( RtemsPartReqReturnBuffer_Pre_Id_NA - 1 ) + * RtemsPartReqReturnBuffer_Pre_Buf_NA; + } + + for ( + ctx->pcs[ 1 ] = RtemsPartReqReturnBuffer_Pre_Buf_Valid; + ctx->pcs[ 1 ] < RtemsPartReqReturnBuffer_Pre_Buf_NA; + ++ctx->pcs[ 1 ] + ) { + if ( RtemsPartReqReturnBuffer_TransitionInfo[ index ].Pre_Buf_NA ) { + ctx->pcs[ 1 ] = RtemsPartReqReturnBuffer_Pre_Buf_NA; + index += ( RtemsPartReqReturnBuffer_Pre_Buf_NA - 1 ); + } + + if ( RtemsPartReqReturnBuffer_TransitionInfo[ index ].Skip ) { + ++index; + continue; + } + + RtemsPartReqReturnBuffer_Pre_Id_Prepare( ctx, ctx->pcs[ 0 ] ); + RtemsPartReqReturnBuffer_Pre_Buf_Prepare( ctx, ctx->pcs[ 1 ] ); + RtemsPartReqReturnBuffer_Action( ctx ); + RtemsPartReqReturnBuffer_Post_Status_Check( + ctx, + RtemsPartReqReturnBuffer_TransitionMap[ index ][ 0 ] + ); + RtemsPartReqReturnBuffer_Post_Buf_Check( + ctx, + RtemsPartReqReturnBuffer_TransitionMap[ index ][ 1 ] + ); + ++index; + } + } +} + +/** @} */ diff --git a/testsuites/validation/tc-part.c b/testsuites/validation/tc-part.c new file mode 100644 index 0000000000..5ade8a1cdb --- /dev/null +++ b/testsuites/validation/tc-part.c @@ -0,0 +1,179 @@ +/* SPDX-License-Identifier: BSD-2-Clause */ + +/** + * @file + * + * @ingroup RTEMSTestCaseRtemsPartValPart + */ + +/* + * Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * This file is part of the RTEMS quality process and was automatically + * generated. If you find something that needs to be fixed or + * worded better please post a report or patch to an RTEMS mailing list + * or raise a bug report: + * + * https://www.rtems.org/bugs.html + * + * For information on updating and regenerating please refer to the How-To + * section in the Software Requirements Engineering chapter of the + * RTEMS Software Engineering manual. The manual is provided as a part of + * a release. For development sources please refer to the online + * documentation at: + * + * https://docs.rtems.org + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#include + +/** + * @defgroup RTEMSTestCaseRtemsPartValPart spec:/rtems/part/val/part + * + * @ingroup RTEMSTestSuiteTestsuitesValidation0 + * + * @brief Validates some functional requirements of the Partition Manager. + * + * This test case performs the following actions: + * + * - 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. + * + * - Check that exactly three buffers can be obtained from the partition for + * use in parallel. + * + * - 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. + * + * @{ + */ + +/** + * @brief 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. + */ +static void RtemsPartValPart_Action_0( void ) +{ + 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; + + 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( 0, sc ); + + /* + * Check that exactly three buffers can be obtained from the partition for + * use in parallel. + */ + pointers[ 0 ] = NULL; + sc = rtems_partition_get_buffer( id, &pointers[ 0 ] ); + T_step_rsc_success( 1, sc ); + T_step_not_null( 2, pointers[ 0 ] ); + + pointers[ 1 ] = NULL; + sc = rtems_partition_get_buffer( id, &pointers[ 1 ] ); + T_step_rsc_success( 3, sc ); + T_step_not_null( 4, pointers[ 1 ] ); + + pointers[ 2 ] = NULL; + sc = rtems_partition_get_buffer( id, &pointers[ 2 ] ); + T_step_rsc_success( 5, sc ); + T_step_not_null( 6, pointers[ 2 ] ); + + pointers[ 3 ] = NULL; + sc = rtems_partition_get_buffer( id, &pointers[ 3 ] ); + T_step_rsc( 7, sc, RTEMS_UNSATISFIED ); + T_step_null( 8, pointers[ 3 ] ); + + /* + * 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. + */ + sc = rtems_partition_return_buffer( id, pointers[ 1 ] ); + T_step_rsc_success( 9, sc ); + + sc = rtems_partition_return_buffer( id, pointers[ 2 ] ); + T_step_rsc_success( 10, sc ); + + sc = rtems_partition_return_buffer( id, pointers[ 0 ] ); + T_step_rsc_success( 11, sc ); + + pointer = NULL; + sc = rtems_partition_get_buffer( id, &pointer ); + T_step_rsc_success( 12, sc ); + T_step_eq_ptr( 13, pointer, pointers[ 1 ] ); + + pointer = NULL; + sc = rtems_partition_get_buffer( id, &pointer ); + T_step_rsc_success( 14, sc ); + T_step_eq_ptr( 15, pointer, pointers[ 2 ] ); + + pointer = NULL; + sc = rtems_partition_get_buffer( id, &pointer ); + T_step_rsc_success( 16, sc ); + T_step_eq_ptr( 17, pointer, pointers[ 0 ] ); + + sc = rtems_partition_return_buffer( id, pointers[ 0 ] ); + T_step_rsc_success( 18, sc ); + + sc = rtems_partition_return_buffer( id, pointers[ 1 ] ); + T_step_rsc_success( 19, sc ); + + sc = rtems_partition_return_buffer( id, pointers[ 2 ] ); + T_step_rsc_success( 20, sc ); + + sc = rtems_partition_delete( id ); + T_step_rsc_success( 21, sc ); +} + +/** + * @fn void T_case_body_RtemsPartValPart( void ) + */ +T_TEST_CASE( RtemsPartValPart ) +{ + T_plan( 22 ); + + RtemsPartValPart_Action_0(); +} + +/** @} */ -- cgit v1.2.3