summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-03-03 10:27:52 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-03-04 09:08:03 +0100
commit8fe59be236e7f2047adb6e393639bbf56bbd996d (patch)
tree2bf9340a27a865a7595bd138a1d07380b7c464ee
parentrtems: Fix RTEMS_TASK_STORAGE_ALIGNMENT (diff)
downloadrtems-8fe59be236e7f2047adb6e393639bbf56bbd996d.tar.bz2
validation: Fix for 64-bit targets
Closes #4179.
-rw-r--r--spec/build/bsps/aarch64/a53/tsta53.yml3
-rw-r--r--spec/build/bsps/aarch64/xilinx-zynqmp/tstqemu.yml3
-rw-r--r--testsuites/validation/tc-message-construct-errors.c13
3 files changed, 12 insertions, 7 deletions
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 e1b36091b4..0a98a52f43 100644
--- a/testsuites/validation/tc-message-construct-errors.c
+++ b/testsuites/validation/tc-message-construct-errors.c
@@ -358,7 +358,18 @@ static void RtemsMessageReqConstructErrors_Pre_MaxSize_Prepare(
* The maximum message size of the message queue configuration shall be
* valid.
*/
- ctx->config.maximum_message_size = MAX_MESSAGE_SIZE;
+ if ( ctx->config.maximum_pending_messages == UINT32_MAX ) {
+ /*
+ * At least on 64-bit systems we need a bit of help to ensure that we
+ * meet the Big state of the MaxPending pre-condition. The following
+ * message size is valid with respect to calculations involving only
+ * the message size.
+ */
+ ctx->config.maximum_message_size = SIZE_MAX - sizeof( uintptr_t ) +
+ 1 - sizeof( CORE_message_queue_Buffer );
+ } else {
+ ctx->config.maximum_message_size = MAX_MESSAGE_SIZE;
+ }
break;
}