summaryrefslogtreecommitdiffstats
path: root/testsuites
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2011-03-10 15:41:58 +0000
committerSebastian Huber <sebastian.huber@embedded-brains.de>2011-03-10 15:41:58 +0000
commit627b70e10a4768584805a52e32628d549dafc25b (patch)
tree493eba0f0a5ffafab0a9b9117afe48e836c477f6 /testsuites
parent2011-03-10 Sebastian Huber <sebastian.huber@embedded-brains.de> (diff)
downloadrtems-627b70e10a4768584805a52e32628d549dafc25b.tar.bz2
2011-03-10 Sebastian Huber <sebastian.huber@embedded-brains.de>
* heapwalk/init.c: Improve coverage. * heapwalk/heapwalk.scn: Update.
Diffstat (limited to 'testsuites')
-rw-r--r--testsuites/libtests/ChangeLog5
-rw-r--r--testsuites/libtests/heapwalk/heapwalk.scn8
-rw-r--r--testsuites/libtests/heapwalk/init.c7
3 files changed, 15 insertions, 5 deletions
diff --git a/testsuites/libtests/ChangeLog b/testsuites/libtests/ChangeLog
index 5a215c6a91..96a8f88c50 100644
--- a/testsuites/libtests/ChangeLog
+++ b/testsuites/libtests/ChangeLog
@@ -1,3 +1,8 @@
+2011-03-10 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * heapwalk/init.c: Improve coverage.
+ * heapwalk/heapwalk.scn: Update.
+
2011-03-09 Joel Sherrill <joel.sherrill@oarcorp.com>
* devfs04/devfs04.scn, devfs04/init.c: Increase configuration so this
diff --git a/testsuites/libtests/heapwalk/heapwalk.scn b/testsuites/libtests/heapwalk/heapwalk.scn
index c1ff8e9ac3..e4a3486005 100644
--- a/testsuites/libtests/heapwalk/heapwalk.scn
+++ b/testsuites/libtests/heapwalk/heapwalk.scn
@@ -6,7 +6,7 @@ testing the _Heap_Walk_check_control() function
set minimal block size to a not page aligned value
set allocation area of the first block to be non page-aligned
clear the previous used flag of the first block
- set the previous block size of the first block to an invalid value
+ mark last block as free
set invalid next block for last block
testing the _Heap_Walk_check_free_list() function
no free blocks
@@ -30,8 +30,8 @@ test the _Heap_Walk_check_free_block() function
test the output-function for the _Heap_Walk()
therefore use the (already tested) case with a page size of 0
PASS[0]: page size 0, min block size 16
- area begin 0x0202C4BC, area end 0x0202D4BC
- first block 0x0202C4C0, last block 0x0202D4B0
- first free 0x0202C4C0, last free 0x0202C4C0
+ area begin 0x0202D4BC, area end 0x0202E4BC
+ first block 0x0202D4C0, last block 0x0202E4B0
+ first free 0x0202D4C0, last free 0x0202D4C0
FAIL[0]: page size is zero
*** END OF HEAP WALK TEST ***
diff --git a/testsuites/libtests/heapwalk/init.c b/testsuites/libtests/heapwalk/init.c
index 0cb161447a..c735f6a9a3 100644
--- a/testsuites/libtests/heapwalk/init.c
+++ b/testsuites/libtests/heapwalk/init.c
@@ -131,10 +131,15 @@ static void test_check_control(void)
TestHeap.first_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
test_call_heap_walk( false );
- puts( "\tset invalid next block for last block" );
+ puts( "\tmark last block as free" );
test_heap_init_custom();
TestHeap.last_block->size_and_flag = 0;
test_call_heap_walk( false );
+
+ puts( "\tset invalid next block for last block" );
+ test_heap_init_custom();
+ TestHeap.last_block->size_and_flag = HEAP_PREV_BLOCK_USED;
+ test_call_heap_walk( false );
}
static void test_check_free_list(void)