[PATCH 21/42] sptests/sp13/system.h: Fine tune message buffer configuration to avoid integer overflow

Joel Sherrill joel.sherrill at oarcorp.com
Mon Mar 23 14:39:19 UTC 2015


---
 testsuites/sptests/sp13/system.h | 30 +++++++++++++++++-------------
 1 file changed, 17 insertions(+), 13 deletions(-)

diff --git a/testsuites/sptests/sp13/system.h b/testsuites/sptests/sp13/system.h
index ae5ed4f..7bb680c 100644
--- a/testsuites/sptests/sp13/system.h
+++ b/testsuites/sptests/sp13/system.h
@@ -40,6 +40,18 @@ rtems_task Task_3(
   rtems_task_argument argument
 );
 
+/* global variables */
+
+TEST_EXTERN rtems_id   Task_id[ 4 ];         /* array of task ids */
+TEST_EXTERN rtems_name Task_name[ 4 ];       /* array of task names */
+
+TEST_EXTERN rtems_id   Queue_id[ 4 ];        /* array of queue ids */
+TEST_EXTERN rtems_name Queue_name[ 4 ];      /* array of queue names */
+
+/* test configuration */
+
+#define MESSAGE_SIZE (sizeof(long) * 4)  /* must be multiple of sizeof(long) */
+
 /* configuration information */
 
 #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
@@ -53,21 +65,13 @@ rtems_task Task_3(
 
 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
 
-#define CONFIGURE_MESSAGE_BUFFER_MEMORY     (32 * 1024)
+#define CONFIGURE_MESSAGE_BUFFER_MEMORY \
+   CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE( 100, MESSAGE_SIZE ) + \
+   CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE( 10, MESSAGE_SIZE ) + \
+   CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE( 100, MESSAGE_SIZE )
+
 #define CONFIGURE_EXTRA_TASK_STACKS         (3 * RTEMS_MINIMUM_STACK_SIZE)
 
 #include <rtems/confdefs.h>
 
-/* global variables */
-
-TEST_EXTERN rtems_id   Task_id[ 4 ];         /* array of task ids */
-TEST_EXTERN rtems_name Task_name[ 4 ];       /* array of task names */
-
-TEST_EXTERN rtems_id   Queue_id[ 4 ];        /* array of queue ids */
-TEST_EXTERN rtems_name Queue_name[ 4 ];      /* array of queue names */
-
-/* test configuration */
-
-#define MESSAGE_SIZE (sizeof(long) * 4)  /* must be multiple of sizeof(long) */
-
 /* end of include file */
-- 
1.9.3




More information about the devel mailing list