I’m not sure this patch reasonably backports to 5. There have been some changes 
in the organization of the message code and the modifications here are relevant 
to the message queue config structure that was added. The function signatures 
could be updated, but the remainder does not apply.

Kinsey

From: Joel Sherrill <j...@rtems.org>
Sent: Monday, February 15, 2021 10:16
To: Kinsey Moore <kinsey.mo...@oarcorp.com>
Cc: rtems-de...@rtems.org <devel@rtems.org>; ryan long 
<rlong@localhost.localdomain>
Subject: Re: [PATCH] tests/validation: Fix 64bit test failure

Should this have a ticket and be applied to 5 also? There are other 64 bit 
architectures but they don't get tested as often and thoroughly.

On Mon, Feb 15, 2021, 9:12 AM Kinsey Moore 
<kinsey.mo...@oarcorp.com<mailto:kinsey.mo...@oarcorp.com>> wrote:
From: ryan long 
<rlong@localhost.localdomain<mailto:rlong@localhost.localdomain>>

The ts-validation-0 test currently fails on 64bit BSPs due to a
limitation of the message structure. Changing the max message size to a
size_t type and adjusting the expected value in the test resolves this.

Closes #4179.
---
 cpukit/include/rtems/rtems/message.h                | 2 +-
 cpukit/include/rtems/score/coremsgimpl.h            | 2 +-
 cpukit/score/src/coremsg.c                          | 2 +-
 spec/build/bsps/aarch64/a53/tsta53.yml              | 3 ---
 spec/build/bsps/aarch64/xilinx-zynqmp/tstqemu.yml   | 3 ---
 testsuites/validation/tc-message-construct-errors.c | 2 +-
 6 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/cpukit/include/rtems/rtems/message.h 
b/cpukit/include/rtems/rtems/message.h
index 14083b8cd0..7bb48ba35a 100644
--- a/cpukit/include/rtems/rtems/message.h
+++ b/cpukit/include/rtems/rtems/message.h
@@ -51,7 +51,7 @@ typedef struct {
    * @brief This member defines the maximum number of pending messages 
supported
    *   by the message queue.
    */
-  uint32_t maximum_pending_messages;
+  size_t maximum_pending_messages;

   /**
    * @brief This member defines the maximum message size supported by the 
message
diff --git a/cpukit/include/rtems/score/coremsgimpl.h 
b/cpukit/include/rtems/score/coremsgimpl.h
index 6f6a01bea6..c7a424c08c 100644
--- a/cpukit/include/rtems/score/coremsgimpl.h
+++ b/cpukit/include/rtems/score/coremsgimpl.h
@@ -144,7 +144,7 @@ void *_CORE_message_queue_Workspace_allocate(
 Status_Control _CORE_message_queue_Initialize(
   CORE_message_queue_Control          *the_message_queue,
   CORE_message_queue_Disciplines       discipline,
-  uint32_t                             maximum_pending_messages,
+  size_t                               maximum_pending_messages,
   size_t                               maximum_message_size,
   CORE_message_queue_Allocate_buffers  allocate_buffers,
   const void                          *arg
diff --git a/cpukit/score/src/coremsg.c b/cpukit/score/src/coremsg.c
index cf7f44ed17..530f05719a 100644
--- a/cpukit/score/src/coremsg.c
+++ b/cpukit/score/src/coremsg.c
@@ -35,7 +35,7 @@ RTEMS_STATIC_ASSERT(
 Status_Control _CORE_message_queue_Initialize(
   CORE_message_queue_Control          *the_message_queue,
   CORE_message_queue_Disciplines       discipline,
-  uint32_t                             maximum_pending_messages,
+  size_t                               maximum_pending_messages,
   size_t                               maximum_message_size,
   CORE_message_queue_Allocate_buffers  allocate_buffers,
   const void                          *arg
diff --git a/spec/build/bsps/aarch64/a53/tsta53.yml 
b/spec/build/bsps/aarch64/a53/tsta53.yml
index 9135fac7f4..4ecef03641 100644
--- a/spec/build/bsps/aarch64/a53/tsta53.yml
+++ b/spec/build/bsps/aarch64/a53/tsta53.yml
@@ -4,9 +4,6 @@ actions:
     # expected to fail, don't compile these
     minimum: exclude

-    # test broken under 64bit due to SIZE_MAX differences
-    validation-0: exclude
-
     # don't compile due to toolchain issues
     spconfig01: exclude
     spmisc01: exclude
diff --git a/spec/build/bsps/aarch64/xilinx-zynqmp/tstqemu.yml 
b/spec/build/bsps/aarch64/xilinx-zynqmp/tstqemu.yml
index d0efba65cd..45fdc503aa 100644
--- a/spec/build/bsps/aarch64/xilinx-zynqmp/tstqemu.yml
+++ b/spec/build/bsps/aarch64/xilinx-zynqmp/tstqemu.yml
@@ -4,9 +4,6 @@ actions:
     # expected to fail
     minimum: exclude

-    # test broken under 64bit due to SIZE_MAX differences
-    validation-0: expected-fail
-
     # don't compile due to toolchain issues
     spconfig01: exclude
     spmisc01: exclude
diff --git a/testsuites/validation/tc-message-construct-errors.c 
b/testsuites/validation/tc-message-construct-errors.c
index 5820855ac4..903ff534fa 100644
--- a/testsuites/validation/tc-message-construct-errors.c
+++ b/testsuites/validation/tc-message-construct-errors.c
@@ -278,7 +278,7 @@ static void 
RtemsMessageReqConstructErrors_Pre_MaxPending_Prepare(
     }

     case RtemsMessageReqConstructErrors_Pre_MaxPending_Big: {
-      ctx->config.maximum_pending_messages = UINT32_MAX;
+      ctx->config.maximum_pending_messages = SIZE_MAX;
       break;
     }

--
2.20.1

_______________________________________________
devel mailing list
devel@rtems.org<mailto:devel@rtems.org>
http://lists.rtems.org/mailman/listinfo/devel
_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to