summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2020-06-25 11:37:40 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2020-09-22 10:06:05 +0200
commit17e5644e2a1de16d089befd697771b464fafbfcb (patch)
tree0787ba0d95ecd89dc95ccaaa096d7b38f8efc78b
parent9a566cf97bb57b0523409cf3ad038f4713efa374 (diff)
validation: Add tests for object name to id
-rw-r--r--spec/build/testsuites/validation/validation-0.yml10
-rw-r--r--testsuites/validation/tc-barrier-ident.c96
-rw-r--r--testsuites/validation/tc-message-ident.c98
-rw-r--r--testsuites/validation/tc-part-ident.c100
-rw-r--r--testsuites/validation/tc-ratemon-ident.c94
-rw-r--r--testsuites/validation/tc-sem-ident.c98
-rw-r--r--testsuites/validation/tc-task-ident.c295
-rw-r--r--testsuites/validation/tc-timer-ident.c94
-rw-r--r--testsuites/validation/tc-userext-ident.c96
-rw-r--r--testsuites/validation/tr-object-ident-local.c332
-rw-r--r--testsuites/validation/tr-object-ident-local.h106
-rw-r--r--testsuites/validation/tr-object-ident.c532
-rw-r--r--testsuites/validation/tr-object-ident.h118
13 files changed, 2069 insertions, 0 deletions
diff --git a/spec/build/testsuites/validation/validation-0.yml b/spec/build/testsuites/validation/validation-0.yml
index edc0b570ae..fdc462db48 100644
--- a/spec/build/testsuites/validation/validation-0.yml
+++ b/spec/build/testsuites/validation/validation-0.yml
@@ -11,7 +11,17 @@ includes: []
ldflags: []
links: []
source:
+- testsuites/validation/tc-barrier-ident.c
+- testsuites/validation/tc-message-ident.c
+- testsuites/validation/tc-part-ident.c
+- testsuites/validation/tc-ratemon-ident.c
+- testsuites/validation/tc-sem-ident.c
- testsuites/validation/tc-task-construct-errors.c
+- testsuites/validation/tc-task-ident.c
+- testsuites/validation/tc-timer-ident.c
+- testsuites/validation/tc-userext-ident.c
+- testsuites/validation/tr-object-ident.c
+- testsuites/validation/tr-object-ident-local.c
- testsuites/validation/ts-validation-0.c
stlib: []
target: testsuites/validation/ts-validation-0.exe
diff --git a/testsuites/validation/tc-barrier-ident.c b/testsuites/validation/tc-barrier-ident.c
new file mode 100644
index 0000000000..dcbb651547
--- /dev/null
+++ b/testsuites/validation/tc-barrier-ident.c
@@ -0,0 +1,96 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RTEMSTestCaseRtemsBarrierValIdent
+ */
+
+/*
+ * 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 was automatically generated. Do not edit it manually.
+ * Please have a look at
+ *
+ * https://docs.rtems.org/branches/master/eng/req/howto.html
+ *
+ * for information how to maintain and re-generate this file.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tr-object-ident-local.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RTEMSTestCaseRtemsBarrierValIdent spec:/rtems/barrier/val/ident
+ *
+ * @ingroup RTEMSTestSuiteTestsuitesValidation0
+ *
+ * @brief Test the rtems_barrier_ident directive.
+ *
+ * This test case performs the following actions:
+ *
+ * - Run the generic object identification tests for Classic API partition
+ * class objects defined by /rtems/req/ident-local.
+ *
+ * @{
+ */
+
+static rtems_status_code ClassicBarrierIdentAction(
+ rtems_name name,
+ rtems_id *id
+)
+{
+ return rtems_barrier_ident( name, id );
+}
+
+/**
+ * @fn void T_case_body_RtemsBarrierValIdent( void )
+ */
+T_TEST_CASE( RtemsBarrierValIdent )
+{
+ rtems_status_code sc;
+ rtems_id id_local_object;
+
+ sc = rtems_barrier_create(
+ ClassicObjectLocalIdentName,
+ RTEMS_DEFAULT_ATTRIBUTES,
+ 1,
+ &id_local_object
+ );
+ T_assert_rsc_success( sc );
+
+ RtemsReqIdentLocal_Run(
+ id_local_object,
+ ClassicBarrierIdentAction
+ );
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-message-ident.c b/testsuites/validation/tc-message-ident.c
new file mode 100644
index 0000000000..2484b2b906
--- /dev/null
+++ b/testsuites/validation/tc-message-ident.c
@@ -0,0 +1,98 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RTEMSTestCaseRtemsMessageValIdent
+ */
+
+/*
+ * 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 was automatically generated. Do not edit it manually.
+ * Please have a look at
+ *
+ * https://docs.rtems.org/branches/master/eng/req/howto.html
+ *
+ * for information how to maintain and re-generate this file.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tr-object-ident.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RTEMSTestCaseRtemsMessageValIdent spec:/rtems/message/val/ident
+ *
+ * @ingroup RTEMSTestSuiteTestsuitesValidation0
+ *
+ * @brief Test the rtems_message_queue_ident directive.
+ *
+ * This test case performs the following actions:
+ *
+ * - Run the generic object identification tests for Classic API message queue
+ * class objects defined by /rtems/req/ident.
+ *
+ * @{
+ */
+
+static rtems_status_code ClassicMessageIdentAction(
+ rtems_name name,
+ uint32_t node,
+ rtems_id *id
+)
+{
+ return rtems_message_queue_ident( name, node, id );
+}
+
+/**
+ * @fn void T_case_body_RtemsMessageValIdent( void )
+ */
+T_TEST_CASE( RtemsMessageValIdent )
+{
+ rtems_status_code sc;
+ rtems_id id_local_object;
+
+ sc = rtems_message_queue_create(
+ ClassicObjectIdentName,
+ 1,
+ 1,
+ RTEMS_DEFAULT_ATTRIBUTES,
+ &id_local_object
+ );
+ T_assert_rsc_success( sc );
+
+ RtemsReqIdent_Run(
+ id_local_object,
+ ClassicMessageIdentAction
+ );
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-part-ident.c b/testsuites/validation/tc-part-ident.c
new file mode 100644
index 0000000000..d6c8e39b9f
--- /dev/null
+++ b/testsuites/validation/tc-part-ident.c
@@ -0,0 +1,100 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RTEMSTestCaseRtemsPartValIdent
+ */
+
+/*
+ * 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 was automatically generated. Do not edit it manually.
+ * Please have a look at
+ *
+ * https://docs.rtems.org/branches/master/eng/req/howto.html
+ *
+ * for information how to maintain and re-generate this file.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tr-object-ident.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RTEMSTestCaseRtemsPartValIdent spec:/rtems/part/val/ident
+ *
+ * @ingroup RTEMSTestSuiteTestsuitesValidation0
+ *
+ * @brief Test the rtems_partition_ident directive.
+ *
+ * This test case performs the following actions:
+ *
+ * - Run the generic object identification tests for Classic API partition
+ * class objects defined by /rtems/req/ident.
+ *
+ * @{
+ */
+
+static rtems_status_code ClassicPartIdentAction(
+ rtems_name name,
+ uint32_t node,
+ rtems_id *id
+)
+{
+ return rtems_partition_ident( name, node, id );
+}
+
+/**
+ * @fn void T_case_body_RtemsPartValIdent( void )
+ */
+T_TEST_CASE( RtemsPartValIdent )
+{
+ static long area[32];
+ rtems_status_code sc;
+ rtems_id id_local_object;
+
+ sc = rtems_partition_create(
+ ClassicObjectIdentName,
+ area,
+ sizeof( area ),
+ sizeof( area ),
+ RTEMS_DEFAULT_ATTRIBUTES,
+ &id_local_object
+ );
+ T_assert_rsc_success( sc );
+
+ RtemsReqIdent_Run(
+ id_local_object,
+ ClassicPartIdentAction
+ );
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-ratemon-ident.c b/testsuites/validation/tc-ratemon-ident.c
new file mode 100644
index 0000000000..04b62db988
--- /dev/null
+++ b/testsuites/validation/tc-ratemon-ident.c
@@ -0,0 +1,94 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RTEMSTestCaseRtemsRatemonValIdent
+ */
+
+/*
+ * 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 was automatically generated. Do not edit it manually.
+ * Please have a look at
+ *
+ * https://docs.rtems.org/branches/master/eng/req/howto.html
+ *
+ * for information how to maintain and re-generate this file.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tr-object-ident-local.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RTEMSTestCaseRtemsRatemonValIdent spec:/rtems/ratemon/val/ident
+ *
+ * @ingroup RTEMSTestSuiteTestsuitesValidation0
+ *
+ * @brief Test the rtems_rate_monotonic_ident directive.
+ *
+ * This test case performs the following actions:
+ *
+ * - Run the generic object identification tests for Classic API rate monotonic
+ * class objects defined by /rtems/req/ident-local.
+ *
+ * @{
+ */
+
+static rtems_status_code ClassicRatemonIdentAction(
+ rtems_name name,
+ rtems_id *id
+)
+{
+ return rtems_rate_monotonic_ident( name, id );
+}
+
+/**
+ * @fn void T_case_body_RtemsRatemonValIdent( void )
+ */
+T_TEST_CASE( RtemsRatemonValIdent )
+{
+ rtems_status_code sc;
+ rtems_id id_local_object;
+
+ sc = rtems_rate_monotonic_create(
+ ClassicObjectLocalIdentName,
+ &id_local_object
+ );
+ T_assert_rsc_success( sc );
+
+ RtemsReqIdentLocal_Run(
+ id_local_object,
+ ClassicRatemonIdentAction
+ );
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-sem-ident.c b/testsuites/validation/tc-sem-ident.c
new file mode 100644
index 0000000000..2c48f4549e
--- /dev/null
+++ b/testsuites/validation/tc-sem-ident.c
@@ -0,0 +1,98 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RTEMSTestCaseRtemsSemValIdent
+ */
+
+/*
+ * 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 was automatically generated. Do not edit it manually.
+ * Please have a look at
+ *
+ * https://docs.rtems.org/branches/master/eng/req/howto.html
+ *
+ * for information how to maintain and re-generate this file.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tr-object-ident.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RTEMSTestCaseRtemsSemValIdent spec:/rtems/sem/val/ident
+ *
+ * @ingroup RTEMSTestSuiteTestsuitesValidation0
+ *
+ * @brief Test the rtems_semaphore_ident directive.
+ *
+ * This test case performs the following actions:
+ *
+ * - Run the generic object identification tests for Classic API semaphore
+ * class objects defined by /rtems/req/ident.
+ *
+ * @{
+ */
+
+static rtems_status_code ClassicSemIdentAction(
+ rtems_name name,
+ uint32_t node,
+ rtems_id *id
+)
+{
+ return rtems_semaphore_ident( name, node, id );
+}
+
+/**
+ * @fn void T_case_body_RtemsSemValIdent( void )
+ */
+T_TEST_CASE( RtemsSemValIdent )
+{
+ rtems_status_code sc;
+ rtems_id id_local_object;
+
+ sc = rtems_semaphore_create(
+ ClassicObjectIdentName,
+ 0,
+ RTEMS_DEFAULT_ATTRIBUTES,
+ 0,
+ &id_local_object
+ );
+ T_assert_rsc_success( sc );
+
+ RtemsReqIdent_Run(
+ id_local_object,
+ ClassicSemIdentAction
+ );
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-task-ident.c b/testsuites/validation/tc-task-ident.c
new file mode 100644
index 0000000000..361d4ae99a
--- /dev/null
+++ b/testsuites/validation/tc-task-ident.c
@@ -0,0 +1,295 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RTEMSTestCaseRtemsTaskReqIdent
+ */
+
+/*
+ * 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 was automatically generated. Do not edit it manually.
+ * Please have a look at
+ *
+ * https://docs.rtems.org/branches/master/eng/req/howto.html
+ *
+ * for information how to maintain and re-generate this file.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tr-object-ident.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RTEMSTestCaseRtemsTaskReqIdent spec:/rtems/task/req/ident
+ *
+ * @ingroup RTEMSTestSuiteTestsuitesValidation0
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsTaskReqIdent_Pre_Pre_Self,
+ RtemsTaskReqIdent_Pre_Pre_Generic,
+ RtemsTaskReqIdent_Pre_Pre_NA
+} RtemsTaskReqIdent_Pre_Pre;
+
+typedef enum {
+ RtemsTaskReqIdent_Post_Post_OkAndSelfId,
+ RtemsTaskReqIdent_Post_Post_Generic,
+ RtemsTaskReqIdent_Post_Post_NA
+} RtemsTaskReqIdent_Post_Post;
+
+/**
+ * @brief Test context for spec:/rtems/task/req/ident test case.
+ */
+typedef struct {
+ rtems_status_code status;
+
+ rtems_id *id;
+
+ rtems_id id_value;
+
+ rtems_id id_local_object;
+
+ /**
+ * @brief This member defines the pre-condition states for the next action.
+ */
+ size_t pcs[ 1 ];
+
+ /**
+ * @brief This member indicates if the test action loop is currently
+ * executed.
+ */
+ bool in_action_loop;
+} RtemsTaskReqIdent_Context;
+
+static RtemsTaskReqIdent_Context
+ RtemsTaskReqIdent_Instance;
+
+static const char * const RtemsTaskReqIdent_PreDesc_Pre[] = {
+ "Self",
+ "Generic",
+ "NA"
+};
+
+static const char * const * const RtemsTaskReqIdent_PreDesc[] = {
+ RtemsTaskReqIdent_PreDesc_Pre,
+ NULL
+};
+
+static rtems_status_code ClassicTaskIdentAction(
+ rtems_name name,
+ uint32_t node,
+ rtems_id *id
+)
+{
+ return rtems_task_ident( name, node, id );
+}
+
+#define TASK_ATTRIBUTES RTEMS_DEFAULT_ATTRIBUTES
+
+#define MAX_TLS_SIZE RTEMS_ALIGN_UP( 64, RTEMS_TASK_STORAGE_ALIGNMENT )
+
+RTEMS_ALIGNED( RTEMS_TASK_STORAGE_ALIGNMENT )
+static char ClassicTaskIdentStorage[
+ RTEMS_TASK_STORAGE_SIZE(
+ MAX_TLS_SIZE + RTEMS_MINIMUM_STACK_SIZE,
+ TASK_ATTRIBUTES
+ )
+];
+
+static const rtems_task_config ClassicTaskIdentConfig = {
+ .name = ClassicObjectIdentName,
+ .initial_priority = 1,
+ .storage_area = ClassicTaskIdentStorage,
+ .storage_size = sizeof( ClassicTaskIdentStorage ),
+ .maximum_thread_local_storage_size = MAX_TLS_SIZE,
+ .initial_modes = RTEMS_DEFAULT_MODES,
+ .attributes = TASK_ATTRIBUTES
+};
+
+static void RtemsTaskReqIdent_Pre_Pre_Prepare(
+ RtemsTaskReqIdent_Context *ctx,
+ RtemsTaskReqIdent_Pre_Pre state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqIdent_Pre_Pre_Self: {
+ ctx->id_value = 0xffffffff;
+ ctx->id = &ctx->id_value;
+ break;
+ }
+
+ case RtemsTaskReqIdent_Pre_Pre_Generic: {
+ ctx->id = NULL;
+ /* Preparation performed by RtemsReqIdent_Run() */
+ break;
+ }
+
+ case RtemsTaskReqIdent_Pre_Pre_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqIdent_Post_Post_Check(
+ RtemsTaskReqIdent_Context *ctx,
+ RtemsTaskReqIdent_Post_Post state
+)
+{
+ switch ( state ) {
+ case RtemsTaskReqIdent_Post_Post_OkAndSelfId: {
+ T_rsc(ctx->status, RTEMS_SUCCESSFUL);
+ T_eq_ptr(ctx->id, &ctx->id_value);
+ T_eq_u32(ctx->id_value, rtems_task_self());
+ break;
+ }
+
+ case RtemsTaskReqIdent_Post_Post_Generic: {
+ /* Checks performed by RtemsReqIdent_Run() */
+ break;
+ }
+
+ case RtemsTaskReqIdent_Post_Post_NA:
+ break;
+ }
+}
+
+static void RtemsTaskReqIdent_Setup( RtemsTaskReqIdent_Context *ctx )
+{
+ rtems_status_code sc;
+
+ sc = rtems_task_construct(
+ &ClassicTaskIdentConfig,
+ &ctx->id_local_object
+ );
+ T_assert_rsc_success( sc );
+}
+
+static void RtemsTaskReqIdent_Setup_Wrap( void *arg )
+{
+ RtemsTaskReqIdent_Context *ctx;
+
+ ctx = arg;
+ ctx->in_action_loop = false;
+ RtemsTaskReqIdent_Setup( ctx );
+}
+
+static size_t RtemsTaskReqIdent_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsTaskReqIdent_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->in_action_loop ) {
+ return T_get_scope( RtemsTaskReqIdent_PreDesc, buf, n, ctx->pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsTaskReqIdent_Fixture = {
+ .setup = RtemsTaskReqIdent_Setup_Wrap,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = RtemsTaskReqIdent_Scope,
+ .initial_context = &RtemsTaskReqIdent_Instance
+};
+
+static const uint8_t RtemsTaskReqIdent_TransitionMap[][ 1 ] = {
+ {
+ RtemsTaskReqIdent_Post_Post_OkAndSelfId
+ }, {
+ RtemsTaskReqIdent_Post_Post_Generic
+ }
+};
+
+static const struct {
+ uint8_t Skip : 1;
+ uint8_t Pre_Pre_NA : 1;
+} RtemsTaskReqIdent_TransitionInfo[] = {
+ {
+ 0, 0
+ }, {
+ 0, 0
+ }
+};
+
+static void RtemsTaskReqIdent_Action( RtemsTaskReqIdent_Context *ctx )
+{
+ if ( ctx->id != NULL ) {
+ ctx->status = rtems_task_ident( RTEMS_SELF, 0xdeadbeef, ctx->id );
+ } else {
+ RtemsReqIdent_Run(
+ ctx->id_local_object,
+ ClassicTaskIdentAction
+ );
+ }
+}
+
+/**
+ * @fn void T_case_body_RtemsTaskReqIdent( void )
+ */
+T_TEST_CASE_FIXTURE( RtemsTaskReqIdent, &RtemsTaskReqIdent_Fixture )
+{
+ RtemsTaskReqIdent_Context *ctx;
+ size_t index;
+
+ ctx = T_fixture_context();
+ ctx->in_action_loop = true;
+ index = 0;
+
+ for (
+ ctx->pcs[ 0 ] = RtemsTaskReqIdent_Pre_Pre_Self;
+ ctx->pcs[ 0 ] < RtemsTaskReqIdent_Pre_Pre_NA;
+ ++ctx->pcs[ 0 ]
+ ) {
+ if ( RtemsTaskReqIdent_TransitionInfo[ index ].Pre_Pre_NA ) {
+ ctx->pcs[ 0 ] = RtemsTaskReqIdent_Pre_Pre_NA;
+ index += ( RtemsTaskReqIdent_Pre_Pre_NA - 1 );
+ }
+
+ if ( RtemsTaskReqIdent_TransitionInfo[ index ].Skip ) {
+ ++index;
+ continue;
+ }
+
+ RtemsTaskReqIdent_Pre_Pre_Prepare( ctx, ctx->pcs[ 0 ] );
+ RtemsTaskReqIdent_Action( ctx );
+ RtemsTaskReqIdent_Post_Post_Check(
+ ctx,
+ RtemsTaskReqIdent_TransitionMap[ index ][ 0 ]
+ );
+ ++index;
+ }
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-timer-ident.c b/testsuites/validation/tc-timer-ident.c
new file mode 100644
index 0000000000..4762a47a79
--- /dev/null
+++ b/testsuites/validation/tc-timer-ident.c
@@ -0,0 +1,94 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RTEMSTestCaseRtemsTimerValIdent
+ */
+
+/*
+ * 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 was automatically generated. Do not edit it manually.
+ * Please have a look at
+ *
+ * https://docs.rtems.org/branches/master/eng/req/howto.html
+ *
+ * for information how to maintain and re-generate this file.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tr-object-ident-local.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RTEMSTestCaseRtemsTimerValIdent spec:/rtems/timer/val/ident
+ *
+ * @ingroup RTEMSTestSuiteTestsuitesValidation0
+ *
+ * @brief Test the rtems_timer_ident directive.
+ *
+ * This test case performs the following actions:
+ *
+ * - Run the generic object identification tests for Classic API timer class
+ * objects defined by /rtems/req/ident-local.
+ *
+ * @{
+ */
+
+static rtems_status_code ClassicTimerIdentAction(
+ rtems_name name,
+ rtems_id *id
+)
+{
+ return rtems_timer_ident( name, id );
+}
+
+/**
+ * @fn void T_case_body_RtemsTimerValIdent( void )
+ */
+T_TEST_CASE( RtemsTimerValIdent )
+{
+ rtems_status_code sc;
+ rtems_id id_local_object;
+
+ sc = rtems_timer_create(
+ ClassicObjectLocalIdentName,
+ &id_local_object
+ );
+ T_assert_rsc_success( sc );
+
+ RtemsReqIdentLocal_Run(
+ id_local_object,
+ ClassicTimerIdentAction
+ );
+}
+
+/** @} */
diff --git a/testsuites/validation/tc-userext-ident.c b/testsuites/validation/tc-userext-ident.c
new file mode 100644
index 0000000000..ac30322741
--- /dev/null
+++ b/testsuites/validation/tc-userext-ident.c
@@ -0,0 +1,96 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RTEMSTestCaseRtemsUserextValIdent
+ */
+
+/*
+ * 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 was automatically generated. Do not edit it manually.
+ * Please have a look at
+ *
+ * https://docs.rtems.org/branches/master/eng/req/howto.html
+ *
+ * for information how to maintain and re-generate this file.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tr-object-ident-local.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RTEMSTestCaseRtemsUserextValIdent spec:/rtems/userext/val/ident
+ *
+ * @ingroup RTEMSTestSuiteTestsuitesValidation0
+ *
+ * @brief Test the rtems_extension_ident directive.
+ *
+ * This test case performs the following actions:
+ *
+ * - Run the generic object identification tests for Classic API user extension
+ * class objects defined by /rtems/req/ident-local.
+ *
+ * @{
+ */
+
+static rtems_status_code ClassicUserExtIdentAction(
+ rtems_name name,
+ rtems_id *id
+)
+{
+ return rtems_extension_ident( name, id );
+}
+
+/**
+ * @fn void T_case_body_RtemsUserextValIdent( void )
+ */
+T_TEST_CASE( RtemsUserextValIdent )
+{
+ static const rtems_extensions_table table;
+ rtems_status_code sc;
+ rtems_id id_local_object;
+
+ sc = rtems_extension_create(
+ ClassicObjectLocalIdentName,
+ &table,
+ &id_local_object
+ );
+ T_assert_rsc_success( sc );
+
+ RtemsReqIdentLocal_Run(
+ id_local_object,
+ ClassicUserExtIdentAction
+ );
+}
+
+/** @} */
diff --git a/testsuites/validation/tr-object-ident-local.c b/testsuites/validation/tr-object-ident-local.c
new file mode 100644
index 0000000000..1010eab08b
--- /dev/null
+++ b/testsuites/validation/tr-object-ident-local.c
@@ -0,0 +1,332 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RTEMSTestCaseRtemsReqIdentLocal
+ */
+
+/*
+ * 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 was automatically generated. Do not edit it manually.
+ * Please have a look at
+ *
+ * https://docs.rtems.org/branches/master/eng/req/howto.html
+ *
+ * for information how to maintain and re-generate this file.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tr-object-ident-local.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RTEMSTestCaseRtemsReqIdentLocal spec:/rtems/req/ident-local
+ *
+ * @ingroup RTEMSTestSuiteTestsuitesValidation0
+ *
+ * @{
+ */
+
+/**
+ * @brief Test context for spec:/rtems/req/ident-local test case.
+ */
+typedef struct {
+ rtems_status_code status;
+
+ rtems_name name;
+
+ rtems_id *id;
+
+ rtems_id id_value;
+
+ /**
+ * @brief This member contains a copy of the corresponding
+ * RtemsReqIdentLocal_Run() parameter.
+ */
+ rtems_id id_local_object;
+
+ /**
+ * @brief This member contains a copy of the corresponding
+ * RtemsReqIdentLocal_Run() parameter.
+ */
+ rtems_status_code ( *action )( rtems_name, rtems_id * );
+
+ /**
+ * @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;
+} RtemsReqIdentLocal_Context;
+
+static RtemsReqIdentLocal_Context
+ RtemsReqIdentLocal_Instance;
+
+static const char * const RtemsReqIdentLocal_PreDesc_Name[] = {
+ "Invalid",
+ "Valid",
+ "NA"
+};
+
+static const char * const RtemsReqIdentLocal_PreDesc_Id[] = {
+ "NullPtr",
+ "Valid",
+ "NA"
+};
+
+static const char * const * const RtemsReqIdentLocal_PreDesc[] = {
+ RtemsReqIdentLocal_PreDesc_Name,
+ RtemsReqIdentLocal_PreDesc_Id,
+ NULL
+};
+
+static void RtemsReqIdentLocal_Pre_Name_Prepare(
+ RtemsReqIdentLocal_Context *ctx,
+ RtemsReqIdentLocal_Pre_Name state
+)
+{
+ switch ( state ) {
+ case RtemsReqIdentLocal_Pre_Name_Invalid: {
+ ctx->name = 1;
+ break;
+ }
+
+ case RtemsReqIdentLocal_Pre_Name_Valid: {
+ ctx->name = ClassicObjectLocalIdentName;
+ break;
+ }
+
+ case RtemsReqIdentLocal_Pre_Name_NA:
+ break;
+ }
+}
+
+static void RtemsReqIdentLocal_Pre_Id_Prepare(
+ RtemsReqIdentLocal_Context *ctx,
+ RtemsReqIdentLocal_Pre_Id state
+)
+{
+ switch ( state ) {
+ case RtemsReqIdentLocal_Pre_Id_NullPtr: {
+ ctx->id = NULL;
+ break;
+ }
+
+ case RtemsReqIdentLocal_Pre_Id_Valid: {
+ ctx->id_value = 0xffffffff;
+ ctx->id = &ctx->id_value;
+ break;
+ }
+
+ case RtemsReqIdentLocal_Pre_Id_NA:
+ break;
+ }
+}
+
+static void RtemsReqIdentLocal_Post_Status_Check(
+ RtemsReqIdentLocal_Context *ctx,
+ RtemsReqIdentLocal_Post_Status state
+)
+{
+ switch ( state ) {
+ case RtemsReqIdentLocal_Post_Status_Ok: {
+ T_rsc( ctx->status, RTEMS_SUCCESSFUL );
+ break;
+ }
+
+ case RtemsReqIdentLocal_Post_Status_InvAddr: {
+ T_rsc( ctx->status, RTEMS_INVALID_ADDRESS );
+ break;
+ }
+
+ case RtemsReqIdentLocal_Post_Status_InvName: {
+ T_rsc( ctx->status, RTEMS_INVALID_NAME );
+ break;
+ }
+
+ case RtemsReqIdentLocal_Post_Status_NA:
+ break;
+ }
+}
+
+static void RtemsReqIdentLocal_Post_Id_Check(
+ RtemsReqIdentLocal_Context *ctx,
+ RtemsReqIdentLocal_Post_Id state
+)
+{
+ switch ( state ) {
+ case RtemsReqIdentLocal_Post_Id_Nop: {
+ T_eq_ptr( ctx->id, &ctx->id_value );
+ T_eq_u32( ctx->id_value, 0xffffffff );
+ break;
+ }
+
+ case RtemsReqIdentLocal_Post_Id_NullPtr: {
+ T_null( ctx->id )
+ break;
+ }
+
+ case RtemsReqIdentLocal_Post_Id_Id: {
+ T_eq_ptr( ctx->id, &ctx->id_value );
+ T_eq_u32( ctx->id_value, ctx->id_local_object );
+ break;
+ }
+
+ case RtemsReqIdentLocal_Post_Id_NA:
+ break;
+ }
+}
+
+static size_t RtemsReqIdentLocal_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsReqIdentLocal_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->in_action_loop ) {
+ return T_get_scope( RtemsReqIdentLocal_PreDesc, buf, n, ctx->pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsReqIdentLocal_Fixture = {
+ .setup = NULL,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = RtemsReqIdentLocal_Scope,
+ .initial_context = &RtemsReqIdentLocal_Instance
+};
+
+static const uint8_t RtemsReqIdentLocal_TransitionMap[][ 2 ] = {
+ {
+ RtemsReqIdentLocal_Post_Status_InvAddr,
+ RtemsReqIdentLocal_Post_Id_NullPtr
+ }, {
+ RtemsReqIdentLocal_Post_Status_InvName,
+ RtemsReqIdentLocal_Post_Id_Nop
+ }, {
+ RtemsReqIdentLocal_Post_Status_InvAddr,
+ RtemsReqIdentLocal_Post_Id_NullPtr
+ }, {
+ RtemsReqIdentLocal_Post_Status_Ok,
+ RtemsReqIdentLocal_Post_Id_Id
+ }
+};
+
+static const struct {
+ uint8_t Skip : 1;
+ uint8_t Pre_Name_NA : 1;
+ uint8_t Pre_Id_NA : 1;
+} RtemsReqIdentLocal_TransitionInfo[] = {
+ {
+ 0, 0, 0
+ }, {
+ 0, 0, 0
+ }, {
+ 0, 0, 0
+ }, {
+ 0, 0, 0
+ }
+};
+
+static void RtemsReqIdentLocal_Action( RtemsReqIdentLocal_Context *ctx )
+{
+ ctx->status = ( *ctx->action )( ctx->name, ctx->id );
+}
+
+static T_fixture_node RtemsReqIdentLocal_Node;
+
+void RtemsReqIdentLocal_Run(
+ rtems_id id_local_object,
+ rtems_status_code ( *action )( rtems_name, rtems_id * )
+)
+{
+ RtemsReqIdentLocal_Context *ctx;
+ size_t index;
+
+ ctx = T_push_fixture( &RtemsReqIdentLocal_Node, &RtemsReqIdentLocal_Fixture );
+
+ ctx->id_local_object = id_local_object;
+ ctx->action = action;
+ ctx->in_action_loop = true;
+ index = 0;
+
+ for (
+ ctx->pcs[ 0 ] = RtemsReqIdentLocal_Pre_Name_Invalid;
+ ctx->pcs[ 0 ] < RtemsReqIdentLocal_Pre_Name_NA;
+ ++ctx->pcs[ 0 ]
+ ) {
+ if ( RtemsReqIdentLocal_TransitionInfo[ index ].Pre_Name_NA ) {
+ ctx->pcs[ 0 ] = RtemsReqIdentLocal_Pre_Name_NA;
+ index += ( RtemsReqIdentLocal_Pre_Name_NA - 1 )
+ * RtemsReqIdentLocal_Pre_Id_NA;
+ }
+
+ for (
+ ctx->pcs[ 1 ] = RtemsReqIdentLocal_Pre_Id_NullPtr;
+ ctx->pcs[ 1 ] < RtemsReqIdentLocal_Pre_Id_NA;
+ ++ctx->pcs[ 1 ]
+ ) {
+ if ( RtemsReqIdentLocal_TransitionInfo[ index ].Pre_Id_NA ) {
+ ctx->pcs[ 1 ] = RtemsReqIdentLocal_Pre_Id_NA;
+ index += ( RtemsReqIdentLocal_Pre_Id_NA - 1 );
+ }
+
+ if ( RtemsReqIdentLocal_TransitionInfo[ index ].Skip ) {
+ ++index;
+ continue;
+ }
+
+ RtemsReqIdentLocal_Pre_Name_Prepare( ctx, ctx->pcs[ 0 ] );
+ RtemsReqIdentLocal_Pre_Id_Prepare( ctx, ctx->pcs[ 1 ] );
+ RtemsReqIdentLocal_Action( ctx );
+ RtemsReqIdentLocal_Post_Status_Check(
+ ctx,
+ RtemsReqIdentLocal_TransitionMap[ index ][ 0 ]
+ );
+ RtemsReqIdentLocal_Post_Id_Check(
+ ctx,
+ RtemsReqIdentLocal_TransitionMap[ index ][ 1 ]
+ );
+ ++index;
+ }
+ }
+
+ T_pop_fixture();
+}
+
+/** @} */
diff --git a/testsuites/validation/tr-object-ident-local.h b/testsuites/validation/tr-object-ident-local.h
new file mode 100644
index 0000000000..f77b062854
--- /dev/null
+++ b/testsuites/validation/tr-object-ident-local.h
@@ -0,0 +1,106 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RTEMSTestCaseRtemsReqIdentLocal
+ */
+
+/*
+ * 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 was automatically generated. Do not edit it manually.
+ * Please have a look at
+ *
+ * https://docs.rtems.org/branches/master/eng/req/howto.html
+ *
+ * for information how to maintain and re-generate this file.
+ */
+
+#ifndef _TR_OBJECT_IDENT_LOCAL_H
+#define _TR_OBJECT_IDENT_LOCAL_H
+
+#include <rtems.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @addtogroup RTEMSTestCaseRtemsReqIdentLocal
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsReqIdentLocal_Pre_Name_Invalid,
+ RtemsReqIdentLocal_Pre_Name_Valid,
+ RtemsReqIdentLocal_Pre_Name_NA
+} RtemsReqIdentLocal_Pre_Name;
+
+typedef enum {
+ RtemsReqIdentLocal_Pre_Id_NullPtr,
+ RtemsReqIdentLocal_Pre_Id_Valid,
+ RtemsReqIdentLocal_Pre_Id_NA
+} RtemsReqIdentLocal_Pre_Id;
+
+typedef enum {
+ RtemsReqIdentLocal_Post_Status_Ok,
+ RtemsReqIdentLocal_Post_Status_InvAddr,
+ RtemsReqIdentLocal_Post_Status_InvName,
+ RtemsReqIdentLocal_Post_Status_NA
+} RtemsReqIdentLocal_Post_Status;
+
+typedef enum {
+ RtemsReqIdentLocal_Post_Id_Nop,
+ RtemsReqIdentLocal_Post_Id_NullPtr,
+ RtemsReqIdentLocal_Post_Id_Id,
+ RtemsReqIdentLocal_Post_Id_NA
+} RtemsReqIdentLocal_Post_Id;
+
+#define ClassicObjectLocalIdentName \
+ rtems_build_name( 'I', 'D', 'N', 'T' )
+
+/**
+ * @brief Runs the parameterized test case.
+ *
+ * @param id_local_object is the identifier of an active object of the class
+ * under test with the name ClassicObjectLocalIdentName.
+ *
+ * @param action is the action handler.
+ */
+void RtemsReqIdentLocal_Run(
+ rtems_id id_local_object,
+ rtems_status_code ( *action )( rtems_name, rtems_id * )
+);
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TR_OBJECT_IDENT_LOCAL_H */
diff --git a/testsuites/validation/tr-object-ident.c b/testsuites/validation/tr-object-ident.c
new file mode 100644
index 0000000000..9593de0d28
--- /dev/null
+++ b/testsuites/validation/tr-object-ident.c
@@ -0,0 +1,532 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RTEMSTestCaseRtemsReqIdent
+ */
+
+/*
+ * 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 was automatically generated. Do not edit it manually.
+ * Please have a look at
+ *
+ * https://docs.rtems.org/branches/master/eng/req/howto.html
+ *
+ * for information how to maintain and re-generate this file.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tr-object-ident.h"
+
+#include <rtems/test.h>
+
+/**
+ * @defgroup RTEMSTestCaseRtemsReqIdent spec:/rtems/req/ident
+ *
+ * @ingroup RTEMSTestSuiteTestsuitesValidation0
+ *
+ * @{
+ */
+
+/**
+ * @brief Test context for spec:/rtems/req/ident test case.
+ */
+typedef struct {
+ rtems_status_code status;
+
+ rtems_name name;
+
+ uint32_t node;
+
+ rtems_id *id;
+
+ rtems_id id_value;
+
+ rtems_id id_remote_object;
+
+ /**
+ * @brief This member contains a copy of the corresponding
+ * RtemsReqIdent_Run() parameter.
+ */
+ rtems_id id_local_object;
+
+ /**
+ * @brief This member contains a copy of the corresponding
+ * RtemsReqIdent_Run() parameter.
+ */
+ rtems_status_code ( *action )( rtems_name, uint32_t, rtems_id * );
+
+ /**
+ * @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;
+} RtemsReqIdent_Context;
+
+static RtemsReqIdent_Context
+ RtemsReqIdent_Instance;
+
+static const char * const RtemsReqIdent_PreDesc_Name[] = {
+ "Invalid",
+ "Valid",
+ "NA"
+};
+
+static const char * const RtemsReqIdent_PreDesc_Node[] = {
+ "Local",
+ "Remote",
+ "Invalid",
+ "SearchAll",
+ "SearchOther",
+ "SearchLocal",
+ "NA"
+};
+
+static const char * const RtemsReqIdent_PreDesc_Id[] = {
+ "NullPtr",
+ "Valid",
+ "NA"
+};
+
+static const char * const * const RtemsReqIdent_PreDesc[] = {
+ RtemsReqIdent_PreDesc_Name,
+ RtemsReqIdent_PreDesc_Node,
+ RtemsReqIdent_PreDesc_Id,
+ NULL
+};
+
+static void RtemsReqIdent_Pre_Name_Prepare(
+ RtemsReqIdent_Context *ctx,
+ RtemsReqIdent_Pre_Name state
+)
+{
+ switch ( state ) {
+ case RtemsReqIdent_Pre_Name_Invalid: {
+ ctx->name = 1;
+ break;
+ }
+
+ case RtemsReqIdent_Pre_Name_Valid: {
+ ctx->name = ClassicObjectIdentName;
+ break;
+ }
+
+ case RtemsReqIdent_Pre_Name_NA:
+ break;
+ }
+}
+
+static void RtemsReqIdent_Pre_Node_Prepare(
+ RtemsReqIdent_Context *ctx,
+ RtemsReqIdent_Pre_Node state
+)
+{
+ switch ( state ) {
+ case RtemsReqIdent_Pre_Node_Local: {
+ ctx->node = 1;
+ break;
+ }
+
+ case RtemsReqIdent_Pre_Node_Remote: {
+ ctx->node = 2;
+ break;
+ }
+
+ case RtemsReqIdent_Pre_Node_Invalid: {
+ ctx->node = 256;
+ break;
+ }
+
+ case RtemsReqIdent_Pre_Node_SearchAll: {
+ ctx->node = RTEMS_SEARCH_ALL_NODES;
+ break;
+ }
+
+ case RtemsReqIdent_Pre_Node_SearchOther: {
+ ctx->node = RTEMS_SEARCH_OTHER_NODES;
+ break;
+ }
+
+ case RtemsReqIdent_Pre_Node_SearchLocal: {
+ ctx->node = RTEMS_SEARCH_LOCAL_NODE;
+ break;
+ }
+
+ case RtemsReqIdent_Pre_Node_NA:
+ break;
+ }
+}
+
+static void RtemsReqIdent_Pre_Id_Prepare(
+ RtemsReqIdent_Context *ctx,
+ RtemsReqIdent_Pre_Id state
+)
+{
+ switch ( state ) {
+ case RtemsReqIdent_Pre_Id_NullPtr: {
+ ctx->id = NULL;
+ break;
+ }
+
+ case RtemsReqIdent_Pre_Id_Valid: {
+ ctx->id_value = 0xffffffff;
+ ctx->id = &ctx->id_value;
+ break;
+ }
+
+ case RtemsReqIdent_Pre_Id_NA:
+ break;
+ }
+}
+
+static void RtemsReqIdent_Post_Status_Check(
+ RtemsReqIdent_Context *ctx,
+ RtemsReqIdent_Post_Status state
+)
+{
+ switch ( state ) {
+ case RtemsReqIdent_Post_Status_Ok: {
+ T_rsc(ctx->status, RTEMS_SUCCESSFUL);
+ break;
+ }
+
+ case RtemsReqIdent_Post_Status_InvAddr: {
+ T_rsc(ctx->status, RTEMS_INVALID_ADDRESS);
+ break;
+ }
+
+ case RtemsReqIdent_Post_Status_InvName: {
+ T_rsc(ctx->status, RTEMS_INVALID_NAME);
+ break;
+ }
+
+ case RtemsReqIdent_Post_Status_InvNode: {
+ T_rsc(ctx->status, RTEMS_INVALID_NODE);
+ break;
+ }
+
+ case RtemsReqIdent_Post_Status_NA:
+ break;
+ }
+}
+
+static void RtemsReqIdent_Post_Id_Check(
+ RtemsReqIdent_Context *ctx,
+ RtemsReqIdent_Post_Id state
+)
+{
+ switch ( state ) {
+ case RtemsReqIdent_Post_Id_Nop: {
+ T_eq_ptr(ctx->id, &ctx->id_value);
+ T_eq_u32(ctx->id_value, 0xffffffff);
+ break;
+ }
+
+ case RtemsReqIdent_Post_Id_NullPtr: {
+ T_null(ctx->id)
+ break;
+ }
+
+ case RtemsReqIdent_Post_Id_LocalObj: {
+ T_eq_ptr(ctx->id, &ctx->id_value);
+ T_eq_u32(ctx->id_value, ctx->id_local_object);
+ break;
+ }
+
+ case RtemsReqIdent_Post_Id_RemoteObj: {
+ T_eq_ptr(ctx->id, &ctx->id_value);
+ T_eq_u32(ctx->id_value, ctx->id_remote_object);
+ break;
+ }
+
+ case RtemsReqIdent_Post_Id_NA:
+ break;
+ }
+}
+
+static size_t RtemsReqIdent_Scope( void *arg, char *buf, size_t n )
+{
+ RtemsReqIdent_Context *ctx;
+
+ ctx = arg;
+
+ if ( ctx->in_action_loop ) {
+ return T_get_scope( RtemsReqIdent_PreDesc, buf, n, ctx->pcs );
+ }
+
+ return 0;
+}
+
+static T_fixture RtemsReqIdent_Fixture = {
+ .setup = NULL,
+ .stop = NULL,
+ .teardown = NULL,
+ .scope = RtemsReqIdent_Scope,
+ .initial_context = &RtemsReqIdent_Instance
+};
+
+static const uint8_t RtemsReqIdent_TransitionMap[][ 2 ] = {
+ {
+ RtemsReqIdent_Post_Status_InvAddr,
+ RtemsReqIdent_Post_Id_NullPtr
+ }, {
+ RtemsReqIdent_Post_Status_InvName,
+ RtemsReqIdent_Post_Id_Nop
+ }, {
+ RtemsReqIdent_Post_Status_InvAddr,
+ RtemsReqIdent_Post_Id_NullPtr
+ }, {
+ RtemsReqIdent_Post_Status_InvName,
+ RtemsReqIdent_Post_Id_Nop
+ }, {
+ RtemsReqIdent_Post_Status_InvAddr,
+ RtemsReqIdent_Post_Id_NullPtr
+ }, {
+ RtemsReqIdent_Post_Status_InvName,
+ RtemsReqIdent_Post_Id_Nop
+ }, {
+ RtemsReqIdent_Post_Status_InvAddr,
+ RtemsReqIdent_Post_Id_NullPtr
+ }, {
+ RtemsReqIdent_Post_Status_InvName,
+ RtemsReqIdent_Post_Id_Nop
+ }, {
+ RtemsReqIdent_Post_Status_InvAddr,
+ RtemsReqIdent_Post_Id_NullPtr
+ }, {
+ RtemsReqIdent_Post_Status_InvName,
+ RtemsReqIdent_Post_Id_Nop
+ }, {
+ RtemsReqIdent_Post_Status_InvAddr,
+ RtemsReqIdent_Post_Id_NullPtr
+ }, {
+ RtemsReqIdent_Post_Status_InvName,
+ RtemsReqIdent_Post_Id_Nop
+ }, {
+ RtemsReqIdent_Post_Status_InvAddr,
+ RtemsReqIdent_Post_Id_NullPtr
+ }, {
+ RtemsReqIdent_Post_Status_Ok,
+ RtemsReqIdent_Post_Id_LocalObj
+ }, {
+ RtemsReqIdent_Post_Status_InvAddr,
+ RtemsReqIdent_Post_Id_NullPtr
+ }, {
+#if defined(RTEMS_MULTIPROCESSING)
+ RtemsReqIdent_Post_Status_Ok,
+ RtemsReqIdent_Post_Id_RemoteObj
+#else
+ RtemsReqIdent_Post_Status_InvName,
+ RtemsReqIdent_Post_Id_Nop
+#endif
+ }, {
+ RtemsReqIdent_Post_Status_InvAddr,
+ RtemsReqIdent_Post_Id_NullPtr
+ }, {
+ RtemsReqIdent_Post_Status_InvName,
+ RtemsReqIdent_Post_Id_Nop
+ }, {
+ RtemsReqIdent_Post_Status_InvAddr,
+ RtemsReqIdent_Post_Id_NullPtr
+ }, {
+ RtemsReqIdent_Post_Status_Ok,
+ RtemsReqIdent_Post_Id_LocalObj
+ }, {
+ RtemsReqIdent_Post_Status_InvAddr,
+ RtemsReqIdent_Post_Id_NullPtr
+ }, {
+#if defined(RTEMS_MULTIPROCESSING)
+ RtemsReqIdent_Post_Status_Ok,
+ RtemsReqIdent_Post_Id_RemoteObj
+#else
+ RtemsReqIdent_Post_Status_InvName,
+ RtemsReqIdent_Post_Id_Nop
+#endif
+ }, {
+ RtemsReqIdent_Post_Status_InvAddr,
+ RtemsReqIdent_Post_Id_NullPtr
+ }, {
+ RtemsReqIdent_Post_Status_Ok,
+ RtemsReqIdent_Post_Id_LocalObj
+ }
+};
+
+static const struct {
+ uint8_t Skip : 1;
+ uint8_t Pre_Name_NA : 1;
+ uint8_t Pre_Node_NA : 1;
+ uint8_t Pre_Id_NA : 1;
+} RtemsReqIdent_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
+ }, {
+#if defined(RTEMS_MULTIPROCESSING)
+ 0, 0, 0, 0
+#else
+ 0, 0, 0, 0
+#endif
+ }, {
+ 0, 0, 0, 0
+ }, {
+ 0, 0, 0, 0
+ }, {
+ 0, 0, 0, 0
+ }, {
+ 0, 0, 0, 0
+ }, {
+ 0, 0, 0, 0
+ }, {
+#if defined(RTEMS_MULTIPROCESSING)
+ 0, 0, 0, 0
+#else
+ 0, 0, 0, 0
+#endif
+ }, {
+ 0, 0, 0, 0
+ }, {
+ 0, 0, 0, 0
+ }
+};
+
+static void RtemsReqIdent_Action( RtemsReqIdent_Context *ctx )
+{
+ ctx->status = ( *ctx->action )( ctx->name, ctx->node, ctx->id );
+}
+
+static T_fixture_node RtemsReqIdent_Node;
+
+void RtemsReqIdent_Run(
+ rtems_id id_local_object,
+ rtems_status_code ( *action )( rtems_name, uint32_t, rtems_id * )
+)
+{
+ RtemsReqIdent_Context *ctx;
+ size_t index;
+
+ ctx = T_push_fixture( &RtemsReqIdent_Node, &RtemsReqIdent_Fixture );
+
+ ctx->id_local_object = id_local_object;
+ ctx->action = action;
+ ctx->in_action_loop = true;
+ index = 0;
+
+ for (
+ ctx->pcs[ 0 ] = RtemsReqIdent_Pre_Name_Invalid;
+ ctx->pcs[ 0 ] < RtemsReqIdent_Pre_Name_NA;
+ ++ctx->pcs[ 0 ]
+ ) {
+ if ( RtemsReqIdent_TransitionInfo[ index ].Pre_Name_NA ) {
+ ctx->pcs[ 0 ] = RtemsReqIdent_Pre_Name_NA;
+ index += ( RtemsReqIdent_Pre_Name_NA - 1 )
+ * RtemsReqIdent_Pre_Node_NA
+ * RtemsReqIdent_Pre_Id_NA;
+ }
+
+ for (
+ ctx->pcs[ 1 ] = RtemsReqIdent_Pre_Node_Local;
+ ctx->pcs[ 1 ] < RtemsReqIdent_Pre_Node_NA;
+ ++ctx->pcs[ 1 ]
+ ) {
+ if ( RtemsReqIdent_TransitionInfo[ index ].Pre_Node_NA ) {
+ ctx->pcs[ 1 ] = RtemsReqIdent_Pre_Node_NA;
+ index += ( RtemsReqIdent_Pre_Node_NA - 1 )
+ * RtemsReqIdent_Pre_Id_NA;
+ }
+
+ for (
+ ctx->pcs[ 2 ] = RtemsReqIdent_Pre_Id_NullPtr;
+ ctx->pcs[ 2 ] < RtemsReqIdent_Pre_Id_NA;
+ ++ctx->pcs[ 2 ]
+ ) {
+ if ( RtemsReqIdent_TransitionInfo[ index ].Pre_Id_NA ) {
+ ctx->pcs[ 2 ] = RtemsReqIdent_Pre_Id_NA;
+ index += ( RtemsReqIdent_Pre_Id_NA - 1 );
+ }
+
+ if ( RtemsReqIdent_TransitionInfo[ index ].Skip ) {
+ ++index;
+ continue;
+ }
+
+ RtemsReqIdent_Pre_Name_Prepare( ctx, ctx->pcs[ 0 ] );
+ RtemsReqIdent_Pre_Node_Prepare( ctx, ctx->pcs[ 1 ] );
+ RtemsReqIdent_Pre_Id_Prepare( ctx, ctx->pcs[ 2 ] );
+ RtemsReqIdent_Action( ctx );
+ RtemsReqIdent_Post_Status_Check(
+ ctx,
+ RtemsReqIdent_TransitionMap[ index ][ 0 ]
+ );
+ RtemsReqIdent_Post_Id_Check(
+ ctx,
+ RtemsReqIdent_TransitionMap[ index ][ 1 ]
+ );
+ ++index;
+ }
+ }
+ }
+
+ T_pop_fixture();
+}
+
+/** @} */
diff --git a/testsuites/validation/tr-object-ident.h b/testsuites/validation/tr-object-ident.h
new file mode 100644
index 0000000000..54a7e838e6
--- /dev/null
+++ b/testsuites/validation/tr-object-ident.h
@@ -0,0 +1,118 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RTEMSTestCaseRtemsReqIdent
+ */
+
+/*
+ * 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 was automatically generated. Do not edit it manually.
+ * Please have a look at
+ *
+ * https://docs.rtems.org/branches/master/eng/req/howto.html
+ *
+ * for information how to maintain and re-generate this file.
+ */
+
+#ifndef _TR_OBJECT_IDENT_H
+#define _TR_OBJECT_IDENT_H
+
+#include <rtems.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @addtogroup RTEMSTestCaseRtemsReqIdent
+ *
+ * @{
+ */
+
+typedef enum {
+ RtemsReqIdent_Pre_Name_Invalid,
+ RtemsReqIdent_Pre_Name_Valid,
+ RtemsReqIdent_Pre_Name_NA
+} RtemsReqIdent_Pre_Name;
+
+typedef enum {
+ RtemsReqIdent_Pre_Node_Local,
+ RtemsReqIdent_Pre_Node_Remote,
+ RtemsReqIdent_Pre_Node_Invalid,
+ RtemsReqIdent_Pre_Node_SearchAll,
+ RtemsReqIdent_Pre_Node_SearchOther,
+ RtemsReqIdent_Pre_Node_SearchLocal,
+ RtemsReqIdent_Pre_Node_NA
+} RtemsReqIdent_Pre_Node;
+
+typedef enum {
+ RtemsReqIdent_Pre_Id_NullPtr,
+ RtemsReqIdent_Pre_Id_Valid,
+ RtemsReqIdent_Pre_Id_NA
+} RtemsReqIdent_Pre_Id;
+
+typedef enum {
+ RtemsReqIdent_Post_Status_Ok,
+ RtemsReqIdent_Post_Status_InvAddr,
+ RtemsReqIdent_Post_Status_InvName,
+ RtemsReqIdent_Post_Status_InvNode,
+ RtemsReqIdent_Post_Status_NA
+} RtemsReqIdent_Post_Status;
+
+typedef enum {
+ RtemsReqIdent_Post_Id_Nop,
+ RtemsReqIdent_Post_Id_NullPtr,
+ RtemsReqIdent_Post_Id_LocalObj,
+ RtemsReqIdent_Post_Id_RemoteObj,
+ RtemsReqIdent_Post_Id_NA
+} RtemsReqIdent_Post_Id;
+
+#define ClassicObjectIdentName \
+ rtems_build_name( 'I', 'D', 'N', 'T' )
+
+/**
+ * @brief Runs the parameterized test case.
+ *
+ * @param id_local_object is the identifier of an active object of the class
+ * under test with the name ClassicObjectIdentName.
+ *
+ * @param action is the action handler.
+ */
+void RtemsReqIdent_Run(
+ rtems_id id_local_object,
+ rtems_status_code ( *action )( rtems_name, uint32_t, rtems_id * )
+);
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TR_OBJECT_IDENT_H */