source: rtems/testsuites/libtests/heapwalk/heapwalk.scn @ 78da8ac3

4.115
Last change on this file since 78da8ac3 was b2f05456, checked in by Joel Sherrill <joel.sherrill@…>, on 09/09/09 at 16:30:14

2009-09-09 Sebastian Huber <Sebastian.Huber@…>

  • heapwalk/heapwalk.scn, heapwalk/init.c: Add missing _Heap_Walk test cases to get back to 100% object coverage.
  • Property mode set to 100644
File size: 1.9 KB
Line 
1*** HEAP WALK TEST ***
2start with a system state != SYSTEM_STATE_UP
3testing the _Heap_Walk_check_control() function
4        test what happens if page size = 0
5        set page size to a not CPU-aligned value
6        set minimal block size to a not page aligned value
7        set allocation area of the first block to be non page-aligned
8        clear the previous used flag of the first block
9        set the previous block size of the first block to an invalid value
10        set invalid next block for last block
11testing the _Heap_Walk_check_free_list() function
12        no free blocks
13        create a loop in the free list
14        put a block outside the heap to the free list
15        put a block on the free list, which is not page-aligned
16        put a used block on the free list
17Walk freshly initialized heap
18Test the main loop
19        set the blocksize so, that the next block is outside the heap
20        walk a heap with blocks with different states of the previous-used flag
21        create a block with a not page aligned size
22        create a block with a size smaller than the min_block_size
23        make a block with a size, so that the block reaches into the next block
24        create a block with invalid successor
25        make a block with a size, so that it includes the next block
26test the _Heap_Walk_check_free_block() function
27        set a previous size for the next block which is not equal to the size of the actual block
28        clear the previous_used flag of the first free block after an used block
29        take a free block out of the free list
30test the output-function for the _Heap_Walk()
31therefore use the (already tested) case with a page size of 0
32PASS[0]: page size 0, min block size 16
33        area begin 0x0202C4BC, area end 0x0202D4BC
34        first block 0x0202C4C0, last block 0x0202D4B0
35        first free 0x0202C4C0, last free 0x0202C4C0
36FAIL[0]: page size is zero
37*** END OF HEAP WALK TEST ***
Note: See TracBrowser for help on using the repository browser.