diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-08-26 12:01:21 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-08-26 12:01:21 +0000 |
commit | 8de136b6c5bf4edb00c4257fece94d5beb7c80c3 (patch) | |
tree | 7b9d4a2f8b743e1720901b18bca7cc551879d1c4 /testsuites/libtests | |
parent | 2009-08-24 Sebastian Huber <Sebastian.Huber@embedded-brains.de> (diff) | |
download | rtems-8de136b6c5bf4edb00c4257fece94d5beb7c80c3.tar.bz2 |
2009-08-19 Sebastian Huber <Sebastian.Huber@embedded-brains.de>
* heapwalk/init.c, stackchk/blow.c: Update for heap API changes.
Diffstat (limited to 'testsuites/libtests')
-rw-r--r-- | testsuites/libtests/ChangeLog | 4 | ||||
-rw-r--r-- | testsuites/libtests/heapwalk/init.c | 26 | ||||
-rw-r--r-- | testsuites/libtests/stackchk/blow.c | 2 |
3 files changed, 18 insertions, 14 deletions
diff --git a/testsuites/libtests/ChangeLog b/testsuites/libtests/ChangeLog index 33a6374120..6d3cbcb2a6 100644 --- a/testsuites/libtests/ChangeLog +++ b/testsuites/libtests/ChangeLog @@ -1,3 +1,7 @@ +2009-08-19 Sebastian Huber <Sebastian.Huber@embedded-brains.de> + + * heapwalk/init.c, stackchk/blow.c: Update for heap API changes. + 2009-08-15 Joel Sherrill <joel.sherrill@oarcorp.com> * termios01/init.c, termios01/termios01.scn: Add a few error paths to diff --git a/testsuites/libtests/heapwalk/init.c b/testsuites/libtests/heapwalk/init.c index 31785f2bca..6da32e4d70 100644 --- a/testsuites/libtests/heapwalk/init.c +++ b/testsuites/libtests/heapwalk/init.c @@ -23,10 +23,10 @@ #include <rtems/dumpbuf.h> #define TEST_HEAP_SIZE 1024 -uint32_t TestHeapMemory[TEST_HEAP_SIZE]; +unsigned TestHeapMemory[TEST_HEAP_SIZE]; Heap_Control TestHeap; -void test_heap_init(void) +static void test_heap_init(void) { memset( TestHeapMemory, '\0', sizeof(TestHeapMemory) ); _Heap_Initialize( &TestHeap, TestHeapMemory, sizeof(TestHeapMemory), 0 ); @@ -34,7 +34,7 @@ void test_heap_init(void) void test_heap_walk_body( int source, bool do_dump ); -void test_heap_walk( int source ) +static void test_heap_walk( int source ) { test_heap_walk_body( source, true ); test_heap_walk_body( source, false ); @@ -42,7 +42,7 @@ void test_heap_walk( int source ) void test_heap_walk_body( int source, bool do_dump ) { - int i, j, original; + unsigned i, j, original; _Heap_Walk( &TestHeap, source, do_dump ); @@ -55,7 +55,7 @@ void test_heap_walk_body( int source, bool do_dump ) continue; /* mark it free -- may or may not have already been */ - TestHeapMemory[i] &= ~0x01; + TestHeapMemory[i] &= ~0x01U; _Heap_Walk( &TestHeap, source, do_dump ); /* mark it used -- may or may not have already been */ @@ -64,7 +64,7 @@ void test_heap_walk_body( int source, bool do_dump ) /* try values of 2-7 in the last three bits -- push alignment issues */ for (j=2 ; j<=7 ; j++) { - TestHeapMemory[i] = (TestHeapMemory[i] & ~0x7) | j; + TestHeapMemory[i] = (TestHeapMemory[i] & ~0x7U) | j; _Heap_Walk( &TestHeap, source, do_dump ); } @@ -81,14 +81,14 @@ void test_heap_walk_body( int source, bool do_dump ) } } -void test_walk_freshly_initialized(void) +static void test_walk_freshly_initialized(void) { puts( "Walk freshly initialized heap" ); test_heap_init(); test_heap_walk(1); } -void test_negative_source_value(void) +static void test_negative_source_value(void) { /* * Passing a negative value for source so that @@ -99,7 +99,7 @@ void test_negative_source_value(void) test_heap_walk( -1 ); } -void test_prev_block_flag_check(void) +static void test_prev_block_flag_check(void) { /* Calling heapwalk without initialising the heap. * Covers line 80 and 85 on heapwalk. @@ -109,7 +109,7 @@ void test_prev_block_flag_check(void) test_heap_walk( 1 ); } -void test_not_aligned(void) +static void test_not_aligned(void) { /* * Hack to get to the error case where the blocks are @@ -123,7 +123,7 @@ void test_not_aligned(void) test_heap_walk( -1 ); } -void test_first_block_not_aligned(void) +static void test_first_block_not_aligned(void) { /* * Hack to get to the error case where the blocks are @@ -133,11 +133,11 @@ void test_first_block_not_aligned(void) */ puts( "Testing case of blocks not on page size" ); test_heap_init(); - _Heap_Head(&TestHeap)->next = (void *)1; + _Heap_Free_list_head(&TestHeap)->next = (void *)1; test_heap_walk( -1 ); } -void test_not_in_free_list(void) +static void test_not_in_free_list(void) { void *p1, *p2, *p3; diff --git a/testsuites/libtests/stackchk/blow.c b/testsuites/libtests/stackchk/blow.c index ca9b4052cd..66daebf692 100644 --- a/testsuites/libtests/stackchk/blow.c +++ b/testsuites/libtests/stackchk/blow.c @@ -30,7 +30,7 @@ b(); area = (unsigned char *)_Thread_Executing->Start.Initial_stack.area; - low = (volatile uint32_t *) (area + HEAP_OVERHEAD); + low = (volatile uint32_t *) (area + HEAP_LAST_BLOCK_OVERHEAD); high = (volatile uint32_t *) (area + _Thread_Executing->Start.Initial_stack.size - 16); |