[rtems-central commit] spec: Move INVALID_ID to tx-support.h

Sebastian Huber sebh at rtems.org
Fri May 14 06:54:15 UTC 2021


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Wed May 12 07:11:04 2021 +0200

spec: Move INVALID_ID to tx-support.h

---

 spec/rtems/barrier/req/create.yml                   |  2 --
 spec/rtems/message/req/construct-errors.yml         |  5 ++---
 spec/rtems/part/req/create.yml                      |  5 ++---
 spec/rtems/ratemon/req/create.yml                   |  5 ++---
 spec/rtems/scheduler/req/add-processor.yml          |  2 --
 spec/rtems/scheduler/req/get-maximum-priority.yml   |  3 +--
 spec/rtems/scheduler/req/get-processor-set.yml      |  4 ++--
 spec/rtems/scheduler/req/ident-by-processor-set.yml |  4 ++--
 spec/rtems/scheduler/req/ident-by-processor.yml     |  4 ++--
 spec/rtems/scheduler/req/ident.yml                  |  4 ++--
 spec/rtems/scheduler/req/remove-processor.yml       |  3 +--
 spec/rtems/sem/req/create.yml                       |  2 --
 spec/rtems/sem/req/set-priority.yml                 | 12 ++++--------
 spec/rtems/task/req/construct-errors.yml            |  5 ++---
 spec/rtems/task/req/create-errors.yml               |  5 ++---
 spec/rtems/timer/req/create.yml                     |  5 ++---
 spec/rtems/userext/req/create.yml                   |  5 ++---
 17 files changed, 28 insertions(+), 47 deletions(-)

diff --git a/spec/rtems/barrier/req/create.yml b/spec/rtems/barrier/req/create.yml
index 98cf18f..38c6326 100644
--- a/spec/rtems/barrier/req/create.yml
+++ b/spec/rtems/barrier/req/create.yml
@@ -271,8 +271,6 @@ test-stop: null
 test-support: |
   #define NAME rtems_build_name( 'T', 'E', 'S', 'T' )
 
-  #define INVALID_ID 0xffffffff
-
   typedef RtemsBarrierReqCreate_Context Context;
 
   static void Worker( rtems_task_argument arg )
diff --git a/spec/rtems/message/req/construct-errors.yml b/spec/rtems/message/req/construct-errors.yml
index 62dc78a..23e1d55 100644
--- a/spec/rtems/message/req/construct-errors.yml
+++ b/spec/rtems/message/req/construct-errors.yml
@@ -296,7 +296,8 @@ test-header: null
 test-includes:
 - rtems.h
 - string.h
-test-local-includes: []
+test-local-includes:
+- tx-support.h
 test-prepare: |
   ctx->id_value = INVALID_ID;
   memset( &ctx->config_value, 0, sizeof( ctx->config_value ) );
@@ -305,8 +306,6 @@ test-stop: null
 test-support: |
   #define NAME rtems_build_name( 'T', 'E', 'S', 'T' )
 
-  #define INVALID_ID 0xffffffff
-
   #define MAX_MESSAGE_QUEUES 4
 
   #define MAX_PENDING_MESSAGES 1
diff --git a/spec/rtems/part/req/create.yml b/spec/rtems/part/req/create.yml
index d5a6ad9..91615b7 100644
--- a/spec/rtems/part/req/create.yml
+++ b/spec/rtems/part/req/create.yml
@@ -277,7 +277,8 @@ test-header: null
 test-includes:
 - rtems.h
 - string.h
-test-local-includes: []
+test-local-includes:
+- tx-support.h
 test-prepare: |
   rtems_status_code sc;
   rtems_id          id;
@@ -294,8 +295,6 @@ test-stop: null
 test-support: |
   #define NAME rtems_build_name( 'T', 'E', 'S', 'T' )
 
-  #define INVALID_ID 0xffffffff
-
   #define MAX_PARTITIONS 4
 
   #define BUFFER_COUNT 2
diff --git a/spec/rtems/ratemon/req/create.yml b/spec/rtems/ratemon/req/create.yml
index c23a7b2..ba26206 100644
--- a/spec/rtems/ratemon/req/create.yml
+++ b/spec/rtems/ratemon/req/create.yml
@@ -164,7 +164,8 @@ test-header: null
 test-includes:
 - rtems.h
 - string.h
-test-local-includes: []
+test-local-includes:
+- tx-support.h
 test-prepare: null
 test-setup:
   brief: null
@@ -176,8 +177,6 @@ test-stop: null
 test-support: |
   #define NAME rtems_build_name( 'T', 'E', 'S', 'T' )
 
-  #define INVALID_ID 0xffffffff
-
   static rtems_status_code Create( void *arg, uint32_t *id )
   {
     return rtems_rate_monotonic_create(
diff --git a/spec/rtems/scheduler/req/add-processor.yml b/spec/rtems/scheduler/req/add-processor.yml
index 0044cd1..6a4d3c8 100644
--- a/spec/rtems/scheduler/req/add-processor.yml
+++ b/spec/rtems/scheduler/req/add-processor.yml
@@ -328,8 +328,6 @@ test-setup:
   description: null
 test-stop: null
 test-support: |
-  #define INVALID_ID 0xffffffff
-
   #define CPU_TO_ADD 1
 test-target: testsuites/validation/tc-scheduler-add-processor.c
 test-teardown: null
diff --git a/spec/rtems/scheduler/req/get-maximum-priority.yml b/spec/rtems/scheduler/req/get-maximum-priority.yml
index 0f2847d..f475060 100644
--- a/spec/rtems/scheduler/req/get-maximum-priority.yml
+++ b/spec/rtems/scheduler/req/get-maximum-priority.yml
@@ -147,8 +147,7 @@ test-setup:
     T_rsc_success( sc );
   description: null
 test-stop: null
-test-support: |
-  #define INVALID_ID 0xffffffff
+test-support: null
 test-target: testsuites/validation/tc-scheduler-get-maximum-priority.c
 test-teardown: null
 text: ${.:text-template}
diff --git a/spec/rtems/scheduler/req/get-processor-set.yml b/spec/rtems/scheduler/req/get-processor-set.yml
index db3b1d8..f80051c 100644
--- a/spec/rtems/scheduler/req/get-processor-set.yml
+++ b/spec/rtems/scheduler/req/get-processor-set.yml
@@ -175,6 +175,7 @@ test-includes:
 - rtems.h
 test-local-includes:
 - ts-config.h
+- tx-support.h
 test-prepare: |
   CPU_FILL( &ctx->cpuset_value );
 test-setup:
@@ -189,8 +190,7 @@ test-setup:
     T_rsc_success( sc );
   description: null
 test-stop: null
-test-support: |
-  #define INVALID_ID 0xffffffff
+test-support: null
 test-target: testsuites/validation/tc-scheduler-get-processor-set.c
 test-teardown: null
 text: ${.:text-template}
diff --git a/spec/rtems/scheduler/req/ident-by-processor-set.yml b/spec/rtems/scheduler/req/ident-by-processor-set.yml
index 65e1cc3..9ee6053 100644
--- a/spec/rtems/scheduler/req/ident-by-processor-set.yml
+++ b/spec/rtems/scheduler/req/ident-by-processor-set.yml
@@ -237,6 +237,7 @@ test-includes:
 - rtems.h
 test-local-includes:
 - ts-config.h
+- tx-support.h
 test-prepare: |
   ctx->id_value = INVALID_ID;
 test-setup:
@@ -255,8 +256,7 @@ test-setup:
     #endif
   description: null
 test-stop: null
-test-support: |
-  #define INVALID_ID 0xffffffff
+test-support: null
 test-target: testsuites/validation/tc-scheduler-ident-by-processor-set.c
 test-teardown: null
 text: ${.:text-template}
diff --git a/spec/rtems/scheduler/req/ident-by-processor.yml b/spec/rtems/scheduler/req/ident-by-processor.yml
index 553fa57..d953b8b 100644
--- a/spec/rtems/scheduler/req/ident-by-processor.yml
+++ b/spec/rtems/scheduler/req/ident-by-processor.yml
@@ -183,6 +183,7 @@ test-includes:
 - rtems.h
 test-local-includes:
 - ts-config.h
+- tx-support.h
 test-prepare: |
   ctx->id_value = INVALID_ID;
 test-setup:
@@ -201,8 +202,7 @@ test-setup:
     #endif
   description: null
 test-stop: null
-test-support: |
-  #define INVALID_ID 0xffffffff
+test-support: null
 test-target: testsuites/validation/tc-scheduler-ident-by-processor.c
 test-teardown: null
 text: ${.:text-template}
diff --git a/spec/rtems/scheduler/req/ident.yml b/spec/rtems/scheduler/req/ident.yml
index d544445..ee62ce7 100644
--- a/spec/rtems/scheduler/req/ident.yml
+++ b/spec/rtems/scheduler/req/ident.yml
@@ -122,12 +122,12 @@ test-includes:
 - rtems.h
 test-local-includes:
 - ts-config.h
+- tx-support.h
 test-prepare: |
   ctx->id_value = INVALID_ID;
 test-setup: null
 test-stop: null
-test-support: |
-  #define INVALID_ID 0xffffffff
+test-support: null
 test-target: testsuites/validation/tc-scheduler-ident.c
 test-teardown: null
 text: ${.:text-template}
diff --git a/spec/rtems/scheduler/req/remove-processor.yml b/spec/rtems/scheduler/req/remove-processor.yml
index f04e72b..aa3223c 100644
--- a/spec/rtems/scheduler/req/remove-processor.yml
+++ b/spec/rtems/scheduler/req/remove-processor.yml
@@ -232,8 +232,7 @@ test-setup:
     #endif
   description: null
 test-stop: null
-test-support: |
-  #define INVALID_ID 0xffffffff
+test-support: null
 test-target: testsuites/validation/tc-scheduler-remove-processor.c
 test-teardown: null
 text: ${.:text-template}
diff --git a/spec/rtems/sem/req/create.yml b/spec/rtems/sem/req/create.yml
index 1919177..2aab306 100644
--- a/spec/rtems/sem/req/create.yml
+++ b/spec/rtems/sem/req/create.yml
@@ -499,8 +499,6 @@ test-stop: null
 test-support: |
   #define NAME rtems_build_name( 'T', 'E', 'S', 'T' )
 
-  #define INVALID_ID 0xffffffff
-
   typedef RtemsSemReqCreate_Context Context;
 
   static rtems_status_code Create( void *arg, uint32_t *id )
diff --git a/spec/rtems/sem/req/set-priority.yml b/spec/rtems/sem/req/set-priority.yml
index 8f122e4..f019d32 100644
--- a/spec/rtems/sem/req/set-priority.yml
+++ b/spec/rtems/sem/req/set-priority.yml
@@ -124,7 +124,7 @@ post-conditions:
       is set by the ${../if/set-priority:/name} call.
   - name: Nop
     test-code: |
-      T_eq_u32( ctx->old_priority_value, INVALID_PRIO );
+      T_eq_u32( ctx->old_priority_value, PRIO_INVALID );
     text: |
       Objects referenced by the ${../if/set-priority:/params[3]/name} parameter in
       past calls to ${../if/set-priority:/name} shall not be accessed by the
@@ -233,7 +233,7 @@ pre-conditions:
       parameter.
   - name: Invalid
     test-code: |
-      ctx->new_priority = INVALID_PRIO;
+      ctx->new_priority = PRIO_INVALID;
     text: |
       While the ${../if/set-priority:/params[2]/name} parameter is invalid with
       respect to the scheduler specified by the
@@ -371,10 +371,10 @@ test-includes:
 - rtems.h
 - string.h
 test-local-includes:
-- tx-support.h
 - ts-config.h
+- tx-support.h
 test-prepare: |
-  ctx->old_priority_value = INVALID_PRIO;
+  ctx->old_priority_value = PRIO_INVALID;
   ctx->count = 1;
   ctx->attribute_set = RTEMS_PRIORITY;
   ctx->valid_id = true;
@@ -403,10 +403,6 @@ test-stop: null
 test-support: |
   #define NAME rtems_build_name( 'T', 'E', 'S', 'T' )
 
-  #define INVALID_ID 0xffffffff
-
-  #define INVALID_PRIO 0xffffffff
-
   typedef RtemsSemReqSetPriority_Context Context;
 
   static void ReleaseSemaphore( const Context *ctx )
diff --git a/spec/rtems/task/req/construct-errors.yml b/spec/rtems/task/req/construct-errors.yml
index 9864d06..c9d320b 100644
--- a/spec/rtems/task/req/construct-errors.yml
+++ b/spec/rtems/task/req/construct-errors.yml
@@ -366,7 +366,8 @@ test-includes:
 - string.h
 - rtems/score/apimutex.h
 - rtems/score/threadimpl.h
-test-local-includes: []
+test-local-includes:
+- tx-support.h
 test-prepare: |
   _RTEMS_Lock_allocator();
   _Thread_Kill_zombies();
@@ -397,8 +398,6 @@ test-stop: null
 test-support: |
   #define NAME rtems_build_name( 'T', 'E', 'S', 'T' )
 
-  #define INVALID_ID 0xffffffff
-
   typedef RtemsTaskReqConstructErrors_Context Context;
 
   static _Thread_local int tls_variable;
diff --git a/spec/rtems/task/req/create-errors.yml b/spec/rtems/task/req/create-errors.yml
index ce4dbab..4afe26c 100644
--- a/spec/rtems/task/req/create-errors.yml
+++ b/spec/rtems/task/req/create-errors.yml
@@ -321,7 +321,8 @@ test-includes:
 - string.h
 - rtems/score/apimutex.h
 - rtems/score/threadimpl.h
-test-local-includes: []
+test-local-includes:
+- tx-support.h
 test-prepare: |
   _RTEMS_Lock_allocator();
   _Thread_Kill_zombies();
@@ -344,8 +345,6 @@ test-stop: null
 test-support: |
   #define NAME rtems_build_name( 'T', 'E', 'S', 'T' )
 
-  #define INVALID_ID 0xffffffff
-
   typedef RtemsTaskReqCreateErrors_Context Context;
 
   static rtems_status_code Create( void *arg, uint32_t *id )
diff --git a/spec/rtems/timer/req/create.yml b/spec/rtems/timer/req/create.yml
index f22b6bf..be3a20b 100644
--- a/spec/rtems/timer/req/create.yml
+++ b/spec/rtems/timer/req/create.yml
@@ -174,7 +174,8 @@ test-header: null
 test-includes:
 - rtems.h
 - string.h
-test-local-includes: []
+test-local-includes:
+- tx-support.h
 test-prepare: null
 test-setup:
   brief: null
@@ -186,8 +187,6 @@ test-stop: null
 test-support: |
   #define NAME rtems_build_name( 'T', 'E', 'S', 'T' )
 
-  #define INVALID_ID 0xffffffff
-
   static rtems_status_code Create( void *arg, uint32_t *id )
   {
     return rtems_timer_create( rtems_build_name( 'S', 'I', 'Z', 'E' ), id );
diff --git a/spec/rtems/userext/req/create.yml b/spec/rtems/userext/req/create.yml
index 7d5ab4b..3b47474 100644
--- a/spec/rtems/userext/req/create.yml
+++ b/spec/rtems/userext/req/create.yml
@@ -205,7 +205,8 @@ test-header: null
 test-includes:
 - rtems.h
 - string.h
-test-local-includes: []
+test-local-includes:
+- tx-support.h
 test-prepare: null
 test-setup:
   brief: null
@@ -217,8 +218,6 @@ test-stop: null
 test-support: |
   #define NAME rtems_build_name( 'T', 'E', 'S', 'T' )
 
-  #define INVALID_ID 0xffffffff
-
   static rtems_status_code Create( void *arg, uint32_t *id )
   {
     static const rtems_extensions_table table;



More information about the vc mailing list