summaryrefslogtreecommitdiffstats
path: root/testsuites
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2011-12-13 10:49:13 +0000
committerSebastian Huber <sebastian.huber@embedded-brains.de>2011-12-13 10:49:13 +0000
commit5f818ec1bea09760250ef7caf9bebdc251dff330 (patch)
treec1c40c47440ffb4c57fafac4c0f8c0175a4f1977 /testsuites
parent2011-12-13 Ralf Corsépius <ralf.corsepius@rtems.org> (diff)
downloadrtems-5f818ec1bea09760250ef7caf9bebdc251dff330.tar.bz2
2011-12-13 Sebastian Huber <sebastian.huber@embedded-brains.de>
* psxmsgq04/init.c: Fixed allocation of second message queue.
Diffstat (limited to 'testsuites')
-rw-r--r--testsuites/psxtests/ChangeLog4
-rw-r--r--testsuites/psxtests/psxmsgq04/init.c18
2 files changed, 7 insertions, 15 deletions
diff --git a/testsuites/psxtests/ChangeLog b/testsuites/psxtests/ChangeLog
index b4bcc62017..5c7c51a398 100644
--- a/testsuites/psxtests/ChangeLog
+++ b/testsuites/psxtests/ChangeLog
@@ -1,5 +1,9 @@
2011-12-13 Sebastian Huber <sebastian.huber@embedded-brains.de>
+ * psxmsgq04/init.c: Fixed allocation of second message queue.
+
+2011-12-13 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
* psxconfig01/init.c: Create more objects.
2011-12-13 Ralf Corsépius <ralf.corsepius@rtems.org>
diff --git a/testsuites/psxtests/psxmsgq04/init.c b/testsuites/psxtests/psxmsgq04/init.c
index efc65f1221..316da83558 100644
--- a/testsuites/psxtests/psxmsgq04/init.c
+++ b/testsuites/psxtests/psxmsgq04/init.c
@@ -87,13 +87,8 @@ void *POSIX_Init(
*/
puts( "Init - Memory allocation error test" );
- sb = rtems_workspace_get_information( &info );
-
- attr.mq_maxmsg = 1;
- attr.mq_msgsize = 200;
-
name = Get_Longest_Name();
- while ( attr.mq_msgsize > 0 ) {
+ do {
sb = rtems_workspace_allocate( to_alloc, &alloced );
rtems_test_assert( sb );
@@ -102,15 +97,8 @@ void *POSIX_Init(
/* free the memory we snagged, then check the status */
rtems_workspace_free( alloced );
- if ( second_Queue != (-1) )
- break;
-
- /* attr.mq_msgsize -= 48; */
to_alloc -= 4;
- }
-
- if ( second_Queue == -1 )
- rtems_test_exit(0);
+ } while ( second_Queue == -1 );
puts( "Init - Message Queue created" );
@@ -141,7 +129,7 @@ void *POSIX_Init(
/* account for message buffers and string names */
#define CONFIGURE_MESSAGE_BUFFER_MEMORY \
- CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE(1, sizeof(int))
+ (2 * CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE(1, sizeof(int)))
#define CONFIGURE_MAXIMUM_POSIX_THREADS 1
#define CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES 1