summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-07-24 20:59:06 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-07-26 11:55:37 +0200
commit044f317aac8921ce1c6dfbf4671600807d06c0a7 (patch)
treebce658be005374219cb48fda3cc9eee0ddb00bc0
parentconf.t: Fix minor typos. (diff)
downloadrtems-044f317aac8921ce1c6dfbf4671600807d06c0a7.tar.bz2
libtests/malloc04: Fixes for RTEMS_DEBUG
-rw-r--r--testsuites/libtests/malloc04/init.c24
-rw-r--r--testsuites/libtests/malloc04/malloc04.scn10
2 files changed, 17 insertions, 17 deletions
diff --git a/testsuites/libtests/malloc04/init.c b/testsuites/libtests/malloc04/init.c
index c1fc2367e1..bf4b2eaa43 100644
--- a/testsuites/libtests/malloc04/init.c
+++ b/testsuites/libtests/malloc04/init.c
@@ -40,7 +40,7 @@ void *rtems_heap_null_extend(
}
#endif
-char Malloc_Heap[ 256 ] CPU_STRUCTURE_ALIGNMENT;
+char Malloc_Heap[ 512 ] CPU_STRUCTURE_ALIGNMENT;
/*
* Use volatile to prevent compiler optimizations due to the malloc() builtin.
@@ -88,23 +88,23 @@ rtems_task Init(
puts( "No sbrk() amount" );
sbrk_count = 0;
- offset = 64;
+ offset = 128;
area.begin = &Malloc_Heap [0];
area.size = offset;
RTEMS_Malloc_Initialize( &area, 1, NULL );
errno = 0;
- p = malloc(64);
+ p = malloc( 128 );
rtems_test_assert( p == NULL );
rtems_test_assert( errno == ENOMEM );
rtems_test_assert( sbrk_count == 0 );
- rtems_heap_set_sbrk_amount( 64 );
+ rtems_heap_set_sbrk_amount( 128 );
puts( "Misaligned extend" );
sbrk_count = 0;
- offset = 64;
+ offset = 128;
area.begin = &Malloc_Heap [0];
area.size = offset;
RTEMS_Malloc_Initialize( &area, 1, NULL );
@@ -113,14 +113,14 @@ rtems_task Init(
rtems_test_assert( p != NULL );
rtems_test_assert( sbrk_count == 0 );
- p = malloc(65);
+ p = malloc(129);
rtems_test_assert( p != NULL );
rtems_test_assert( sbrk_count == 1 );
puts( "Not enough sbrk() space" );
sbrk_count = 0;
- offset = 64;
+ offset = 128;
area.begin = &Malloc_Heap [0];
area.size = offset;
RTEMS_Malloc_Initialize( &area, 1, NULL );
@@ -134,29 +134,29 @@ rtems_task Init(
puts( "Valid heap extend" );
sbrk_count = 0;
- offset = 64;
+ offset = 128;
area.begin = &Malloc_Heap [0];
area.size = offset;
RTEMS_Malloc_Initialize( &area, 1, NULL );
- p = malloc(32);
+ p = malloc( 64 );
rtems_test_assert( p != NULL );
rtems_test_assert( sbrk_count == 0 );
- p = malloc(32);
+ p = malloc( 64 );
rtems_test_assert( p != NULL );
rtems_test_assert( sbrk_count == 1 );
puts( "Invalid heap extend" );
sbrk_count = -1;
- offset = 64;
+ offset = 128;
area.begin = &Malloc_Heap [0];
area.size = offset;
RTEMS_Malloc_Initialize( &area, 1, NULL );
errno = 0;
- p = malloc( 64 );
+ p = malloc( 128 );
rtems_test_assert( p == NULL );
rtems_test_assert( errno == ENOMEM );
rtems_test_assert( sbrk_count == 2 );
diff --git a/testsuites/libtests/malloc04/malloc04.scn b/testsuites/libtests/malloc04/malloc04.scn
index afe644afba..1984d74298 100644
--- a/testsuites/libtests/malloc04/malloc04.scn
+++ b/testsuites/libtests/malloc04/malloc04.scn
@@ -1,12 +1,12 @@
*** TEST MALLOC 04 ***
No sbrk() amount
Misaligned extend
-sbrk(128)
-Not enough sbrk() space
sbrk(256)
+Not enough sbrk() space
+sbrk(512)
Valid heap extend
-sbrk(64)
+sbrk(128)
Invalid heap extend
-sbrk(64)
-sbrk(-64)
+sbrk(128)
+sbrk(-128)
*** END OF TEST MALLOC 04 ***