Changeset ce217f96 in rtems
- Timestamp:
- Mar 9, 2011, 3:39:58 PM (9 years ago)
- Branches:
- 4.11, master
- Children:
- b1e13f4
- Parents:
- 9d5f600
- Location:
- testsuites/libtests
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
testsuites/libtests/ChangeLog
r9d5f600 rce217f96 1 2011-03-09 Sebastian Huber <sebastian.huber@embedded-brains.de> 2 3 * malloctest/init.c: Improve coverage. 4 * malloctest/malloctest.scn: Update. 5 1 6 2011-02-22 Ralf Corsépius <ralf.corsepius@rtems.org> 2 7 -
testsuites/libtests/malloctest/init.c
r9d5f600 rce217f96 941 941 { 942 942 bool ret = false; 943 944 _Heap_Initialize( &TestHeap, TestHeapMemory + 768, 256, 0 ); 943 Heap_Control *heap = &TestHeap; 944 uint8_t *area_begin = TestHeapMemory; 945 946 _Heap_Initialize( heap, area_begin + 768, 256, 0 ); 945 947 946 948 puts( "heap extend - link below" ); 947 ret = _Protected_heap_Extend( &TestHeap, TestHeapMemory+ 0, 256 );949 ret = _Protected_heap_Extend( heap, area_begin + 0, 256 ); 948 950 test_heap_assert( ret, true ); 949 951 950 952 puts( "heap extend - merge below" ); 951 ret = _Protected_heap_Extend( &TestHeap, TestHeapMemory+ 512, 256 );953 ret = _Protected_heap_Extend( heap, area_begin + 512, 256 ); 952 954 test_heap_assert( ret, true ); 953 955 954 956 puts( "heap extend - merge above" ); 955 ret = _Protected_heap_Extend( &TestHeap, TestHeapMemory+ 1024, 256 );957 ret = _Protected_heap_Extend( heap, area_begin + 1024, 256 ); 956 958 test_heap_assert( ret, true ); 957 959 958 960 puts( "heap extend - link above" ); 959 ret = _Protected_heap_Extend( &TestHeap, TestHeapMemory+ 1536, 256 );961 ret = _Protected_heap_Extend( heap, area_begin + 1536, 256 ); 960 962 test_heap_assert( ret, true ); 961 963 962 964 puts( "heap extend - area too small" ); 963 ret = _Protected_heap_Extend( &TestHeap, TestHeapMemory+ 2048, 0 );965 ret = _Protected_heap_Extend( heap, area_begin + 2048, 0 ); 964 966 test_heap_assert( ret, false ); 965 967 966 968 puts( "heap extend - invalid area" ); 967 ret = _Protected_heap_Extend( &TestHeap, (void *) -1, 2 );969 ret = _Protected_heap_Extend( heap, (void *) -1, 2 ); 968 970 test_heap_assert( ret, false ); 971 972 area_begin = (uint8_t *) (((uintptr_t) area_begin) | 1); 973 974 _Heap_Initialize( heap, area_begin + 768, 256, 0 ); 975 976 puts( "heap extend - merge below with align up" ); 977 ret = _Protected_heap_Extend( heap, area_begin + 512, 256 ); 978 test_heap_assert( ret, true ); 969 979 } 970 980 -
testsuites/libtests/malloctest/malloctest.scn
r9d5f600 rce217f96 45 45 malloc_walk - in critical section path 46 46 Heap Initialized 47 heap extend - bad address 48 heap extend - OK 47 heap extend - link below 48 heap extend - merge below 49 heap extend - merge above 50 heap extend - link above 51 heap extend - area too small 52 heap extend - invalid area 53 heap extend - merge below with align up 49 54 malloc_free_space - check malloc space drops after malloc 50 55 malloc_free_space - verify free space returns to previous value
Note: See TracChangeset
for help on using the changeset viewer.