[rtems-central commit] validation: Add ${.:/test-context-type}

Sebastian Huber sebh at rtems.org
Tue Aug 31 05:08:04 UTC 2021


Module:    rtems-central
Branch:    master
Commit:    2085243b4d063ee571313d53b1fd6c0de9dd5816
Changeset: http://git.rtems.org/rtems-central/commit/?id=2085243b4d063ee571313d53b1fd6c0de9dd5816

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Tue Aug 17 17:32:35 2021 +0200

validation: Add ${.:/test-context-type}

Add and use ${.:/test-context-type} and ${.:/test-context-instance}
substitutions.

---

 rtemsspec/tests/spec-validation/action2.yml |  1 +
 rtemsspec/tests/test_validation.py          |  1 +
 rtemsspec/validation.py                     | 19 ++++++++++++++++++-
 spec/bsp/req/interrupt-spurious.yml         |  2 +-
 spec/c/req/clock-nanosleep.yml              |  2 +-
 spec/rtems/barrier/req/create.yml           |  2 +-
 spec/rtems/barrier/req/delete.yml           |  2 +-
 spec/rtems/barrier/req/release.yml          |  2 +-
 spec/rtems/barrier/req/wait.yml             |  2 +-
 spec/rtems/event/req/send-receive.yml       |  2 +-
 spec/rtems/intr/req/clear.yml               |  2 +-
 spec/rtems/intr/req/entry-install.yml       |  2 +-
 spec/rtems/intr/req/entry-remove.yml        |  2 +-
 spec/rtems/intr/req/get-affinity.yml        |  2 +-
 spec/rtems/intr/req/handler-iterate.yml     |  2 +-
 spec/rtems/intr/req/is-pending.yml          |  2 +-
 spec/rtems/intr/req/raise-on.yml            |  2 +-
 spec/rtems/intr/req/raise.yml               |  2 +-
 spec/rtems/intr/req/set-affinity.yml        |  2 +-
 spec/rtems/intr/req/vector-disable.yml      |  2 +-
 spec/rtems/intr/req/vector-enable.yml       |  2 +-
 spec/rtems/intr/req/vector-is-enabled.yml   |  2 +-
 spec/rtems/io/req/getchark.yml              |  2 +-
 spec/rtems/io/req/put-char.yml              |  2 +-
 spec/rtems/io/req/putc.yml                  |  2 +-
 spec/rtems/message/req/delete.yml           |  2 +-
 spec/rtems/sem/req/create.yml               |  2 +-
 spec/rtems/sem/req/delete.yml               |  2 +-
 spec/rtems/sem/req/obtain.yml               |  2 +-
 spec/rtems/sem/req/release.yml              |  2 +-
 spec/rtems/sem/req/set-priority.yml         |  2 +-
 spec/rtems/signal/req/catch.yml             |  2 +-
 spec/rtems/signal/req/send.yml              |  2 +-
 spec/rtems/task/req/construct.yml           | 14 +++++++-------
 spec/rtems/task/req/create-errors.yml       |  2 +-
 spec/rtems/task/req/delete.yml              |  2 +-
 spec/rtems/task/req/exit.yml                |  2 +-
 spec/rtems/task/req/mode.yml                |  2 +-
 spec/rtems/task/req/restart.yml             |  2 +-
 spec/rtems/task/req/set-scheduler.yml       |  2 +-
 spec/rtems/task/req/start.yml               |  8 ++++----
 spec/rtems/task/req/wake-after.yml          |  2 +-
 spec/rtems/task/req/wake-when.yml           |  2 +-
 spec/score/mtx/req/seize-try.yml            |  2 +-
 spec/score/mtx/req/seize-wait.yml           |  2 +-
 spec/score/sem/req/seize-try.yml            |  2 +-
 spec/score/sem/req/seize-wait.yml           |  2 +-
 spec/score/thread/val/thread.yml            |  2 +-
 spec/score/tq/req/enqueue-ceiling.yml       |  2 +-
 spec/score/tq/req/enqueue-fifo.yml          |  2 +-
 spec/score/tq/req/enqueue-priority.yml      |  2 +-
 51 files changed, 77 insertions(+), 58 deletions(-)

diff --git a/rtemsspec/tests/spec-validation/action2.yml b/rtemsspec/tests/spec-validation/action2.yml
index 17b649a..6cbdd39 100644
--- a/rtemsspec/tests/spec-validation/action2.yml
+++ b/rtemsspec/tests/spec-validation/action2.yml
@@ -179,6 +179,7 @@ test-setup:
 test-stop: null
 test-support: |
   /* Support code */
+  ${.:/test-context-type} *instance = &${.:/test-context-instance};
 test-target: action2.c
 test-teardown:
   brief: |
diff --git a/rtemsspec/tests/test_validation.py b/rtemsspec/tests/test_validation.py
index e1b1157..b47aaca 100644
--- a/rtemsspec/tests/test_validation.py
+++ b/rtemsspec/tests/test_validation.py
@@ -1946,6 +1946,7 @@ static const char * const * const Action2_PreDesc[] = {
 };
 
 /* Support code */
+Action2_Context *instance = &Action2_Instance;
 
 static void Action2_Pre_A_Prepare( Action2_Context *ctx, Action2_Pre_A state )
 {
diff --git a/rtemsspec/validation.py b/rtemsspec/validation.py
index bae2910..8862578 100644
--- a/rtemsspec/validation.py
+++ b/rtemsspec/validation.py
@@ -43,8 +43,16 @@ ItemMap = Dict[str, Item]
 _STEPS = re.compile(r"^steps/([0-9]+)$")
 
 
+def _get_test_context_instance(ctx: ItemGetValueContext) -> Any:
+    return f"{to_camel_case(ctx.item.uid[1:])}_Instance"
+
+
+def _get_test_context_type(ctx: ItemGetValueContext) -> Any:
+    return f"{to_camel_case(ctx.item.uid[1:])}_Context"
+
+
 def _get_test_run(ctx: ItemGetValueContext) -> Any:
-    return f"{to_camel_case(ctx.item.uid[1:]).replace(' ', '')}_Run"
+    return f"{to_camel_case(ctx.item.uid[1:])}_Run"
 
 
 class _Mapper(ItemMapper):
@@ -58,8 +66,17 @@ class _Mapper(ItemMapper):
         self.add_get_value("interface/group:/name", get_value_doxygen_group)
         self.add_get_value("interface/macro:/name", get_value_doxygen_function)
         self.add_get_value("interface/macro:/params/name", get_value_params)
+        self.add_get_value(
+            "requirement/functional/action:/test-context-instance",
+            _get_test_context_instance)
+        self.add_get_value("requirement/functional/action:/test-context-type",
+                           _get_test_context_type)
         self.add_get_value("requirement/functional/action:/test-run",
                            _get_test_run)
+        self.add_get_value("test-case:/test-context-instance",
+                           _get_test_context_instance)
+        self.add_get_value("test-case:/test-context-type",
+                           _get_test_context_type)
         self.add_get_value("test-case:/test-run", _get_test_run)
 
     @property
diff --git a/spec/bsp/req/interrupt-spurious.yml b/spec/bsp/req/interrupt-spurious.yml
index 9495828..59a7bce 100644
--- a/spec/bsp/req/interrupt-spurious.yml
+++ b/spec/bsp/req/interrupt-spurious.yml
@@ -175,7 +175,7 @@ test-setup:
   description: null
 test-stop: null
 test-support: |
-  typedef BspReqInterruptSpurious_Context Context;
+  typedef ${.:/test-context-type} Context;
 
   static bool test_case_active;
 
diff --git a/spec/c/req/clock-nanosleep.yml b/spec/c/req/clock-nanosleep.yml
index 912bc1d..5e57eaa 100644
--- a/spec/c/req/clock-nanosleep.yml
+++ b/spec/c/req/clock-nanosleep.yml
@@ -367,7 +367,7 @@ test-setup:
   description: null
 test-stop: null
 test-support: |
-  typedef CReqClockNanosleep_Context Context;
+  typedef ${.:/test-context-type} Context;
 
   static void Worker( rtems_task_argument arg )
   {
diff --git a/spec/rtems/barrier/req/create.yml b/spec/rtems/barrier/req/create.yml
index 38c6326..5a69188 100644
--- a/spec/rtems/barrier/req/create.yml
+++ b/spec/rtems/barrier/req/create.yml
@@ -271,7 +271,7 @@ test-stop: null
 test-support: |
   #define NAME rtems_build_name( 'T', 'E', 'S', 'T' )
 
-  typedef RtemsBarrierReqCreate_Context Context;
+  typedef ${.:/test-context-type} Context;
 
   static void Worker( rtems_task_argument arg )
   {
diff --git a/spec/rtems/barrier/req/delete.yml b/spec/rtems/barrier/req/delete.yml
index b0f07bd..e055db2 100644
--- a/spec/rtems/barrier/req/delete.yml
+++ b/spec/rtems/barrier/req/delete.yml
@@ -145,7 +145,7 @@ test-stop: null
 test-support: |
   #define NAME rtems_build_name( 'T', 'E', 'S', 'T' )
 
-  typedef RtemsBarrierReqDelete_Context Context;
+  typedef ${.:/test-context-type} Context;
 
   static void Worker( rtems_task_argument arg )
   {
diff --git a/spec/rtems/barrier/req/release.yml b/spec/rtems/barrier/req/release.yml
index 260699b..6985e3c 100644
--- a/spec/rtems/barrier/req/release.yml
+++ b/spec/rtems/barrier/req/release.yml
@@ -186,7 +186,7 @@ test-support: |
 
   #define RELEASED_INVALID_VALUE 0xffffffff
 
-  typedef RtemsBarrierReqRelease_Context Context;
+  typedef ${.:/test-context-type} Context;
 
   static void Worker( rtems_task_argument arg )
   {
diff --git a/spec/rtems/barrier/req/wait.yml b/spec/rtems/barrier/req/wait.yml
index 73e8439..26ae81d 100644
--- a/spec/rtems/barrier/req/wait.yml
+++ b/spec/rtems/barrier/req/wait.yml
@@ -205,7 +205,7 @@ test-support: |
 
   #define EVENT_TIMER_EXPIRE RTEMS_EVENT_4
 
-  typedef RtemsBarrierReqWait_Context Context;
+  typedef ${.:/test-context-type} Context;
 
   static void Worker( rtems_task_argument arg )
   {
diff --git a/spec/rtems/event/req/send-receive.yml b/spec/rtems/event/req/send-receive.yml
index ccee2f3..0c306a3 100644
--- a/spec/rtems/event/req/send-receive.yml
+++ b/spec/rtems/event/req/send-receive.yml
@@ -507,7 +507,7 @@ test-stop: null
 test-support: |
   #define INPUT_EVENTS ( RTEMS_EVENT_5 | RTEMS_EVENT_23 )
 
-  typedef RtemsEventReqSendReceive_Context Context;
+  typedef ${.:/test-context-type} Context;
 
   static rtems_id CreateWakeupSema( void )
   {
diff --git a/spec/rtems/intr/req/clear.yml b/spec/rtems/intr/req/clear.yml
index 065f352..e05ffb6 100644
--- a/spec/rtems/intr/req/clear.yml
+++ b/spec/rtems/intr/req/clear.yml
@@ -161,7 +161,7 @@ test-prepare: null
 test-setup: null
 test-stop: null
 test-support: |
-  typedef RtemsIntrReqClear_Context Context;
+  typedef ${.:/test-context-type} Context;
 
   static bool IsEnabled( const Context *ctx )
   {
diff --git a/spec/rtems/intr/req/entry-install.yml b/spec/rtems/intr/req/entry-install.yml
index 39ceb5c..810a8c0 100644
--- a/spec/rtems/intr/req/entry-install.yml
+++ b/spec/rtems/intr/req/entry-install.yml
@@ -539,7 +539,7 @@ test-setup:
   description: null
 test-stop: null
 test-support: |
-  typedef RtemsIntrReqEntryInstall_Context Context;
+  typedef ${.:/test-context-type} Context;
 
   static char entry_arg;
 
diff --git a/spec/rtems/intr/req/entry-remove.yml b/spec/rtems/intr/req/entry-remove.yml
index c3abfe5..24c3769 100644
--- a/spec/rtems/intr/req/entry-remove.yml
+++ b/spec/rtems/intr/req/entry-remove.yml
@@ -551,7 +551,7 @@ test-setup:
   description: null
 test-stop: null
 test-support: |
-  typedef RtemsIntrReqEntryRemove_Context Context;
+  typedef ${.:/test-context-type} Context;
 
   static char entry_arg;
 
diff --git a/spec/rtems/intr/req/get-affinity.yml b/spec/rtems/intr/req/get-affinity.yml
index fe0bd4d..bef498e 100644
--- a/spec/rtems/intr/req/get-affinity.yml
+++ b/spec/rtems/intr/req/get-affinity.yml
@@ -280,7 +280,7 @@ test-setup:
   description: null
 test-stop: null
 test-support: |
-  typedef RtemsIntrReqGetAffinity_Context Context;
+  typedef ${.:/test-context-type} Context;
 
   static void CheckGetAffinity(
     Context                          *ctx,
diff --git a/spec/rtems/intr/req/handler-iterate.yml b/spec/rtems/intr/req/handler-iterate.yml
index af21155..d10a3c2 100644
--- a/spec/rtems/intr/req/handler-iterate.yml
+++ b/spec/rtems/intr/req/handler-iterate.yml
@@ -218,7 +218,7 @@ test-setup:
   description: null
 test-stop: null
 test-support: |
-  typedef RtemsIntrReqHandlerIterate_Context Context;
+  typedef ${.:/test-context-type} Context;
 
   static char entry_arg;
 
diff --git a/spec/rtems/intr/req/is-pending.yml b/spec/rtems/intr/req/is-pending.yml
index 7f4b887..f7cd555 100644
--- a/spec/rtems/intr/req/is-pending.yml
+++ b/spec/rtems/intr/req/is-pending.yml
@@ -201,7 +201,7 @@ test-prepare: null
 test-setup: null
 test-stop: null
 test-support: |
-  typedef RtemsIntrReqIsPending_Context Context;
+  typedef ${.:/test-context-type} Context;
 
   static bool IsEnabled( const Context *ctx )
   {
diff --git a/spec/rtems/intr/req/raise-on.yml b/spec/rtems/intr/req/raise-on.yml
index d4ebed1..795d5e0 100644
--- a/spec/rtems/intr/req/raise-on.yml
+++ b/spec/rtems/intr/req/raise-on.yml
@@ -221,7 +221,7 @@ test-setup:
   description: null
 test-stop: null
 test-support: |
-  typedef RtemsIntrReqRaiseOn_Context Context;
+  typedef ${.:/test-context-type} Context;
 
   static bool IsEnabled( const Context *ctx )
   {
diff --git a/spec/rtems/intr/req/raise.yml b/spec/rtems/intr/req/raise.yml
index f3540f1..871a414 100644
--- a/spec/rtems/intr/req/raise.yml
+++ b/spec/rtems/intr/req/raise.yml
@@ -160,7 +160,7 @@ test-prepare: null
 test-setup: null
 test-stop: null
 test-support: |
-  typedef RtemsIntrReqRaise_Context Context;
+  typedef ${.:/test-context-type} Context;
 
   static bool IsEnabled( const Context *ctx )
   {
diff --git a/spec/rtems/intr/req/set-affinity.yml b/spec/rtems/intr/req/set-affinity.yml
index 6bf2648..926fb9b 100644
--- a/spec/rtems/intr/req/set-affinity.yml
+++ b/spec/rtems/intr/req/set-affinity.yml
@@ -261,7 +261,7 @@ test-setup:
   description: null
 test-stop: null
 test-support: |
-  typedef RtemsIntrReqSetAffinity_Context Context;
+  typedef ${.:/test-context-type} Context;
 
   static void CheckSetAffinity(
     Context                          *ctx,
diff --git a/spec/rtems/intr/req/vector-disable.yml b/spec/rtems/intr/req/vector-disable.yml
index 187cef0..46b654b 100644
--- a/spec/rtems/intr/req/vector-disable.yml
+++ b/spec/rtems/intr/req/vector-disable.yml
@@ -206,7 +206,7 @@ test-prepare: null
 test-setup: null
 test-stop: null
 test-support: |
-  typedef RtemsIntrReqVectorDisable_Context Context;
+  typedef ${.:/test-context-type} Context;
 
   static bool IsEnabled( const Context *ctx )
   {
diff --git a/spec/rtems/intr/req/vector-enable.yml b/spec/rtems/intr/req/vector-enable.yml
index 95cd740..a9f270e 100644
--- a/spec/rtems/intr/req/vector-enable.yml
+++ b/spec/rtems/intr/req/vector-enable.yml
@@ -206,7 +206,7 @@ test-prepare: null
 test-setup: null
 test-stop: null
 test-support: |
-  typedef RtemsIntrReqVectorEnable_Context Context;
+  typedef ${.:/test-context-type} Context;
 
   static bool IsEnabled( const Context *ctx )
   {
diff --git a/spec/rtems/intr/req/vector-is-enabled.yml b/spec/rtems/intr/req/vector-is-enabled.yml
index b162dd4..346f9cf 100644
--- a/spec/rtems/intr/req/vector-is-enabled.yml
+++ b/spec/rtems/intr/req/vector-is-enabled.yml
@@ -208,7 +208,7 @@ test-prepare: null
 test-setup: null
 test-stop: null
 test-support: |
-  typedef RtemsIntrReqVectorIsEnabled_Context Context;
+  typedef ${.:/test-context-type} Context;
 
   static void CheckIsEnabled( Context *ctx, bool expected )
   {
diff --git a/spec/rtems/io/req/getchark.yml b/spec/rtems/io/req/getchark.yml
index 94445eb..7725db7 100644
--- a/spec/rtems/io/req/getchark.yml
+++ b/spec/rtems/io/req/getchark.yml
@@ -88,7 +88,7 @@ test-prepare: null
 test-setup: null
 test-stop: null
 test-support: |
-  typedef RtemsIoReqGetchark_Context Context;
+  typedef ${.:/test-context-type} Context;
 
   static int PollChar( void )
   {
diff --git a/spec/rtems/io/req/put-char.yml b/spec/rtems/io/req/put-char.yml
index 7713690..6c4fe87 100644
--- a/spec/rtems/io/req/put-char.yml
+++ b/spec/rtems/io/req/put-char.yml
@@ -86,7 +86,7 @@ test-prepare: null
 test-setup: null
 test-stop: null
 test-support: |
-  typedef RtemsIoReqPutChar_Context Context;
+  typedef ${.:/test-context-type} Context;
 
   static void Output( int value )
   {
diff --git a/spec/rtems/io/req/putc.yml b/spec/rtems/io/req/putc.yml
index 673d3b8..9265457 100644
--- a/spec/rtems/io/req/putc.yml
+++ b/spec/rtems/io/req/putc.yml
@@ -86,7 +86,7 @@ test-prepare: null
 test-setup: null
 test-stop: null
 test-support: |
-  typedef RtemsIoReqPutc_Context Context;
+  typedef ${.:/test-context-type} Context;
 
   static void Output( int value )
   {
diff --git a/spec/rtems/message/req/delete.yml b/spec/rtems/message/req/delete.yml
index fc692e7..530a07e 100644
--- a/spec/rtems/message/req/delete.yml
+++ b/spec/rtems/message/req/delete.yml
@@ -149,7 +149,7 @@ test-support: |
 
   #define MAX_MESSAGE_SIZE 1
 
-  typedef RtemsMessageReqDelete_Context Context;
+  typedef ${.:/test-context-type} Context;
 
   static RTEMS_MESSAGE_QUEUE_BUFFER( MAX_MESSAGE_SIZE )
     buffers[ MAX_PENDING_MESSAGES ];
diff --git a/spec/rtems/sem/req/create.yml b/spec/rtems/sem/req/create.yml
index 2aab306..db59fc4 100644
--- a/spec/rtems/sem/req/create.yml
+++ b/spec/rtems/sem/req/create.yml
@@ -499,7 +499,7 @@ test-stop: null
 test-support: |
   #define NAME rtems_build_name( 'T', 'E', 'S', 'T' )
 
-  typedef RtemsSemReqCreate_Context Context;
+  typedef ${.:/test-context-type} Context;
 
   static rtems_status_code Create( void *arg, uint32_t *id )
   {
diff --git a/spec/rtems/sem/req/delete.yml b/spec/rtems/sem/req/delete.yml
index cd4e808..399c1f2 100644
--- a/spec/rtems/sem/req/delete.yml
+++ b/spec/rtems/sem/req/delete.yml
@@ -295,7 +295,7 @@ test-support: |
 
   #define EVENT_OBTAIN RTEMS_EVENT_0
 
-  typedef RtemsSemReqDelete_Context Context;
+  typedef ${.:/test-context-type} Context;
 
   static void WakeUp( Context *ctx, size_t index )
   {
diff --git a/spec/rtems/sem/req/obtain.yml b/spec/rtems/sem/req/obtain.yml
index 9ae2650..a48fe07 100644
--- a/spec/rtems/sem/req/obtain.yml
+++ b/spec/rtems/sem/req/obtain.yml
@@ -260,7 +260,7 @@ test-stop: null
 test-support: |
   #define NAME rtems_build_name( 'T', 'E', 'S', 'T' )
 
-  typedef RtemsSemReqObtain_Context Context;
+  typedef ${.:/test-context-type} Context;
 test-target: testsuites/validation/tc-sem-obtain.c
 test-teardown:
   brief: null
diff --git a/spec/rtems/sem/req/release.yml b/spec/rtems/sem/req/release.yml
index e8526f4..0fdf801 100644
--- a/spec/rtems/sem/req/release.yml
+++ b/spec/rtems/sem/req/release.yml
@@ -571,7 +571,7 @@ test-stop: null
 test-support: |
   #define NAME rtems_build_name( 'T', 'E', 'S', 'T' )
 
-  typedef RtemsSemReqRelease_Context Context;
+  typedef ${.:/test-context-type} Context;
 
   typedef enum {
     EVENT_HELPER_SYNC = RTEMS_EVENT_0,
diff --git a/spec/rtems/sem/req/set-priority.yml b/spec/rtems/sem/req/set-priority.yml
index f019d32..fad724d 100644
--- a/spec/rtems/sem/req/set-priority.yml
+++ b/spec/rtems/sem/req/set-priority.yml
@@ -403,7 +403,7 @@ test-stop: null
 test-support: |
   #define NAME rtems_build_name( 'T', 'E', 'S', 'T' )
 
-  typedef RtemsSemReqSetPriority_Context Context;
+  typedef ${.:/test-context-type} Context;
 
   static void ReleaseSemaphore( const Context *ctx )
   {
diff --git a/spec/rtems/signal/req/catch.yml b/spec/rtems/signal/req/catch.yml
index 72f4bda..9a1cc3a 100644
--- a/spec/rtems/signal/req/catch.yml
+++ b/spec/rtems/signal/req/catch.yml
@@ -363,7 +363,7 @@ test-setup:
   description: null
 test-stop: null
 test-support: |
-  typedef RtemsSignalReqCatch_Context Context;
+  typedef ${.:/test-context-type} Context;
 
   static void DefaultHandler( rtems_signal_set signal_set )
   {
diff --git a/spec/rtems/signal/req/send.yml b/spec/rtems/signal/req/send.yml
index 742b814..6b9f670 100644
--- a/spec/rtems/signal/req/send.yml
+++ b/spec/rtems/signal/req/send.yml
@@ -338,7 +338,7 @@ test-support: |
 
   #define EVENT_WORKER_DONE RTEMS_EVENT_4
 
-  typedef RtemsSignalReqSend_Context Context;
+  typedef ${.:/test-context-type} Context;
 
   static void WorkerDone( const Context *ctx )
   {
diff --git a/spec/rtems/task/req/construct.yml b/spec/rtems/task/req/construct.yml
index 5bde19c..f3f1be4 100644
--- a/spec/rtems/task/req/construct.yml
+++ b/spec/rtems/task/req/construct.yml
@@ -679,7 +679,7 @@ test-stop: null
 test-support: |
   #define NAME rtems_build_name( 'T', 'E', 'S', 'T' )
 
-  typedef RtemsTaskReqConstruct_Context Context;
+  typedef ${.:/test-context-type} Context;
 
   static volatile _Thread_local int tls_object;
 
@@ -705,7 +705,7 @@ test-support: |
   static void StorageFree( void *ptr )
   {
     T_eq_ptr( ptr, task_storage );
-    ++RtemsTaskReqConstruct_Instance.storage_free_calls;
+    ++${.:/test-context-instance}.storage_free_calls;
   }
 
   static rtems_status_code Create( void *arg, uint32_t *id )
@@ -728,8 +728,8 @@ test-support: |
     (void) executing;
     (void) created;
 
-    ++RtemsTaskReqConstruct_Instance.create_extension_calls;
-    return RtemsTaskReqConstruct_Instance.create_extension_status;
+    ++${.:/test-context-instance}.create_extension_calls;
+    return ${.:/test-context-instance}.create_extension_status;
   }
 
   static bool SecondThreadCreate( rtems_tcb *executing, rtems_tcb *created )
@@ -737,7 +737,7 @@ test-support: |
     (void) executing;
     (void) created;
 
-    ++RtemsTaskReqConstruct_Instance.create_extension_calls;
+    ++${.:/test-context-instance}.create_extension_calls;
     return true;
   }
 
@@ -747,7 +747,7 @@ test-support: |
 
     (void) executing;
 
-    ctx = &RtemsTaskReqConstruct_Instance;
+    ctx = &${.:/test-context-instance};
 
     if ( deleted->Object.id == ctx->zombie_id ) {
       ++ctx->delete_zombie_extension_calls;
@@ -780,7 +780,7 @@ test-support: |
   {
     Context *ctx;
 
-    ctx = &RtemsTaskReqConstruct_Instance;
+    ctx = &${.:/test-context-instance};
 
     if (
       ctx->scheduler_b_id != INVALID_ID &&
diff --git a/spec/rtems/task/req/create-errors.yml b/spec/rtems/task/req/create-errors.yml
index 4afe26c..9710180 100644
--- a/spec/rtems/task/req/create-errors.yml
+++ b/spec/rtems/task/req/create-errors.yml
@@ -345,7 +345,7 @@ test-stop: null
 test-support: |
   #define NAME rtems_build_name( 'T', 'E', 'S', 'T' )
 
-  typedef RtemsTaskReqCreateErrors_Context Context;
+  typedef ${.:/test-context-type} Context;
 
   static rtems_status_code Create( void *arg, uint32_t *id )
   {
diff --git a/spec/rtems/task/req/delete.yml b/spec/rtems/task/req/delete.yml
index e717dd1..7f9519b 100644
--- a/spec/rtems/task/req/delete.yml
+++ b/spec/rtems/task/req/delete.yml
@@ -738,7 +738,7 @@ test-setup:
   description: null
 test-stop: null
 test-support: |
-  typedef RtemsTaskReqDelete_Context Context;
+  typedef ${.:/test-context-type} Context;
 
   static void CaptureWorkerState( Context *ctx )
   {
diff --git a/spec/rtems/task/req/exit.yml b/spec/rtems/task/req/exit.yml
index 46bf4d3..5b4d7b0 100644
--- a/spec/rtems/task/req/exit.yml
+++ b/spec/rtems/task/req/exit.yml
@@ -348,7 +348,7 @@ test-setup:
   description: null
 test-stop: null
 test-support: |
-  typedef RtemsTaskReqExit_Context Context;
+  typedef ${.:/test-context-type} Context;
 
   static void Signal( rtems_signal_set signals )
   {
diff --git a/spec/rtems/task/req/mode.yml b/spec/rtems/task/req/mode.yml
index 58914f3..7a767f6 100644
--- a/spec/rtems/task/req/mode.yml
+++ b/spec/rtems/task/req/mode.yml
@@ -562,7 +562,7 @@ test-support: |
 
   #define EVENT_TIMESLICE RTEMS_EVENT_1
 
-  typedef RtemsTaskReqMode_Context Context;
+  typedef ${.:/test-context-type} Context;
 
   static void Worker( rtems_task_argument arg )
   {
diff --git a/spec/rtems/task/req/restart.yml b/spec/rtems/task/req/restart.yml
index 05c3171..ed6cbf6 100644
--- a/spec/rtems/task/req/restart.yml
+++ b/spec/rtems/task/req/restart.yml
@@ -899,7 +899,7 @@ test-support: |
 
   #define UNSET_ARGUMENT 1
 
-  typedef RtemsTaskReqRestart_Context Context;
+  typedef ${.:/test-context-type} Context;
 
   static void PrepareRealPriority( Context *ctx )
   {
diff --git a/spec/rtems/task/req/set-scheduler.yml b/spec/rtems/task/req/set-scheduler.yml
index 94e9ff6..9212ea7 100644
--- a/spec/rtems/task/req/set-scheduler.yml
+++ b/spec/rtems/task/req/set-scheduler.yml
@@ -558,7 +558,7 @@ test-setup:
   description: null
 test-stop: null
 test-support: |
-  typedef RtemsTaskReqSetScheduler_Context Context;
+  typedef ${.:/test-context-type} Context;
 
   #define EVENT_OBTAIN_MUTEX_A RTEMS_EVENT_0
 
diff --git a/spec/rtems/task/req/start.yml b/spec/rtems/task/req/start.yml
index 74c9bf5..a316d3b 100644
--- a/spec/rtems/task/req/start.yml
+++ b/spec/rtems/task/req/start.yml
@@ -309,13 +309,13 @@ test-setup:
   description: null
 test-stop: null
 test-support: |
-  typedef RtemsTaskReqStart_Context Context;
+  typedef ${.:/test-context-type} Context;
 
   static void WorkerA( rtems_task_argument arg )
   {
     Context *ctx;
 
-    ctx = &RtemsTaskReqStart_Instance;
+    ctx = &${.:/test-context-instance};
 
     while ( true ) {
       ctx->actual_argument += arg;
@@ -328,7 +328,7 @@ test-support: |
   {
     Context *ctx;
 
-    ctx = &RtemsTaskReqStart_Instance;
+    ctx = &${.:/test-context-instance};
 
     while ( true ) {
       ctx->actual_argument += arg;
@@ -341,7 +341,7 @@ test-support: |
     (void) executing;
     (void) started;
 
-    ++RtemsTaskReqStart_Instance.start_extension_calls;
+    ++${.:/test-context-instance}.start_extension_calls;
   }
 
   static const rtems_extensions_table extensions = {
diff --git a/spec/rtems/task/req/wake-after.yml b/spec/rtems/task/req/wake-after.yml
index ee7e9ee..d23bf92 100644
--- a/spec/rtems/task/req/wake-after.yml
+++ b/spec/rtems/task/req/wake-after.yml
@@ -181,7 +181,7 @@ test-setup:
   description: null
 test-stop: null
 test-support: |
-  typedef RtemsTaskReqWakeAfter_Context Context;
+  typedef ${.:/test-context-type} Context;
 
   static void Worker( rtems_task_argument arg )
   {
diff --git a/spec/rtems/task/req/wake-when.yml b/spec/rtems/task/req/wake-when.yml
index 2551d3b..366baa6 100644
--- a/spec/rtems/task/req/wake-when.yml
+++ b/spec/rtems/task/req/wake-when.yml
@@ -211,7 +211,7 @@ test-setup:
   description: null
 test-stop: null
 test-support: |
-  typedef RtemsTaskReqWakeWhen_Context Context;
+  typedef ${.:/test-context-type} Context;
 
   static void SetTOD( rtems_time_of_day *tod, uint32_t year )
   {
diff --git a/spec/score/mtx/req/seize-try.yml b/spec/score/mtx/req/seize-try.yml
index 6277339..f9bab38 100644
--- a/spec/score/mtx/req/seize-try.yml
+++ b/spec/score/mtx/req/seize-try.yml
@@ -296,7 +296,7 @@ test-prepare: |
 test-setup: null
 test-stop: null
 test-support: |
-  typedef ScoreMtxReqSeizeTry_Context Context;
+  typedef ${.:/test-context-type} Context;
 
   static Status_Control Status( const Context *ctx, Status_Control status )
   {
diff --git a/spec/score/mtx/req/seize-wait.yml b/spec/score/mtx/req/seize-wait.yml
index 17c4f65..8bf08aa 100644
--- a/spec/score/mtx/req/seize-wait.yml
+++ b/spec/score/mtx/req/seize-wait.yml
@@ -287,7 +287,7 @@ test-prepare: |
 test-setup: null
 test-stop: null
 test-support: |
-  typedef ScoreMtxReqSeizeWait_Context Context;
+  typedef ${.:/test-context-type} Context;
 
   static Status_Control Status( const Context *ctx, Status_Control status )
   {
diff --git a/spec/score/sem/req/seize-try.yml b/spec/score/sem/req/seize-try.yml
index cf9a0cb..148e9e9 100644
--- a/spec/score/sem/req/seize-try.yml
+++ b/spec/score/sem/req/seize-try.yml
@@ -100,7 +100,7 @@ test-prepare: null
 test-setup: null
 test-stop: null
 test-support: |
-  typedef ScoreSemReqSeizeTry_Context Context;
+  typedef ${.:/test-context-type} Context;
 
   static Status_Control Status( const Context *ctx, Status_Control status )
   {
diff --git a/spec/score/sem/req/seize-wait.yml b/spec/score/sem/req/seize-wait.yml
index 3f77dad..ee2eef6 100644
--- a/spec/score/sem/req/seize-wait.yml
+++ b/spec/score/sem/req/seize-wait.yml
@@ -125,7 +125,7 @@ test-prepare: |
 test-setup: null
 test-stop: null
 test-support: |
-  typedef ScoreSemReqSeizeWait_Context Context;
+  typedef ${.:/test-context-type} Context;
 
   static Status_Control Status( const Context *ctx, Status_Control status )
   {
diff --git a/spec/score/thread/val/thread.yml b/spec/score/thread/val/thread.yml
index 61ea71c..48d4311 100644
--- a/spec/score/thread/val/thread.yml
+++ b/spec/score/thread/val/thread.yml
@@ -103,7 +103,7 @@ test-local-includes:
 test-setup: null
 test-stop: null
 test-support: |
-  typedef ScoreThreadValThread_Context Context;
+  typedef ${.:/test-context-type} Context;
 
   static void TaskTerminate( rtems_tcb *executing )
   {
diff --git a/spec/score/tq/req/enqueue-ceiling.yml b/spec/score/tq/req/enqueue-ceiling.yml
index 1775e58..66dbe3e 100644
--- a/spec/score/tq/req/enqueue-ceiling.yml
+++ b/spec/score/tq/req/enqueue-ceiling.yml
@@ -297,7 +297,7 @@ test-setup:
   description: null
 test-stop: null
 test-support: |
-  typedef ScoreTqReqEnqueueCeiling_Context Context;
+  typedef ${.:/test-context-type} Context;
 
   static const rtems_tcb *GetUnblock( Context *ctx, size_t *index )
   {
diff --git a/spec/score/tq/req/enqueue-fifo.yml b/spec/score/tq/req/enqueue-fifo.yml
index f9fc91d..8c95217 100644
--- a/spec/score/tq/req/enqueue-fifo.yml
+++ b/spec/score/tq/req/enqueue-fifo.yml
@@ -92,7 +92,7 @@ test-setup:
   description: null
 test-stop: null
 test-support: |
-  typedef ScoreTqReqEnqueueFifo_Context Context;
+  typedef ${.:/test-context-type} Context;
 
   static const rtems_tcb *GetUnblock( Context *ctx, size_t *index )
   {
diff --git a/spec/score/tq/req/enqueue-priority.yml b/spec/score/tq/req/enqueue-priority.yml
index 600cacd..306d996 100644
--- a/spec/score/tq/req/enqueue-priority.yml
+++ b/spec/score/tq/req/enqueue-priority.yml
@@ -329,7 +329,7 @@ test-setup:
   description: null
 test-stop: null
 test-support: |
-  typedef ScoreTqReqEnqueuePriority_Context Context;
+  typedef ${.:/test-context-type} Context;
 
   static const rtems_tcb *GetUnblock( Context *ctx, size_t *index )
   {



More information about the vc mailing list