diff options
Diffstat (limited to 'test/freespace.c')
-rw-r--r-- | test/freespace.c | 83 |
1 files changed, 41 insertions, 42 deletions
diff --git a/test/freespace.c b/test/freespace.c index 5b24fee..93c81ea 100644 --- a/test/freespace.c +++ b/test/freespace.c @@ -30,7 +30,6 @@ #define FILENAME_LEN 1024 -#define TEST_FSPACE_CLIENT_ID 2 #define TEST_FSPACE_SECT_TYPE 0 #define TEST_FSPACE_SECT_TYPE_NEW 1 #define TEST_FSPACE_SECT_TYPE_NONE 2 @@ -623,7 +622,7 @@ test_fs_sect_add(hid_t fapl) if(!H5F_addr_defined(fs_addr)) TEST_ERROR - if(NULL == (sect_node = HDmalloc(sizeof(TEST_free_section_t)))) + if(NULL == (sect_node = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t)))) FAIL_STACK_ERROR init_sect_node(sect_node, (haddr_t)TEST_SECT_ADDR80, (hsize_t)TEST_SECT_SIZE20, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE); @@ -686,7 +685,7 @@ test_fs_sect_add(hid_t fapl) TEST_ERROR /* Create free list section node */ - if(NULL == (sect_node = HDmalloc(sizeof(TEST_free_section_t)))) + if(NULL == (sect_node = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t)))) FAIL_STACK_ERROR init_sect_node(sect_node, (haddr_t)TEST_SECT_ADDR80, (hsize_t)TEST_SECT_SIZE20, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE); @@ -757,7 +756,7 @@ test_fs_sect_add(hid_t fapl) if(!H5F_addr_defined(fs_addr)) TEST_ERROR - if(NULL == (sect_node = HDmalloc(sizeof(TEST_free_section_t)))) + if(NULL == (sect_node = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t)))) FAIL_STACK_ERROR /* @@ -826,7 +825,7 @@ test_fs_sect_add(hid_t fapl) if(!H5F_addr_defined(fs_addr)) TEST_ERROR - if(NULL == (sect_node = HDmalloc(sizeof(TEST_free_section_t)))) + if(NULL == (sect_node = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t)))) FAIL_STACK_ERROR /* @@ -973,7 +972,7 @@ test_fs_sect_find(hid_t fapl) /* * Add section A */ - if(NULL == (sect_node1 = HDmalloc(sizeof(TEST_free_section_t)))) + if(NULL == (sect_node1 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t)))) FAIL_STACK_ERROR init_sect_node(sect_node1, (haddr_t)TEST_SECT_ADDR60, (hsize_t)TEST_SECT_SIZE30, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE); @@ -994,7 +993,7 @@ test_fs_sect_find(hid_t fapl) /* * Add section C */ - if(NULL == (sect_node3 = HDmalloc(sizeof(TEST_free_section_t)))) + if(NULL == (sect_node3 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t)))) FAIL_STACK_ERROR init_sect_node(sect_node3, (haddr_t)(TEST_SECT_ADDR200), (hsize_t)TEST_SECT_SIZE50, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE); @@ -1013,7 +1012,7 @@ test_fs_sect_find(hid_t fapl) /* * Add section B */ - if(NULL == (sect_node2 = HDmalloc(sizeof(TEST_free_section_t)))) + if(NULL == (sect_node2 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t)))) FAIL_STACK_ERROR init_sect_node(sect_node2, (haddr_t)TEST_SECT_ADDR100, (hsize_t)TEST_SECT_SIZE50, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE); @@ -1032,7 +1031,7 @@ test_fs_sect_find(hid_t fapl) /* * Add section D */ - if(NULL == (sect_node4 = HDmalloc(sizeof(TEST_free_section_t)))) + if(NULL == (sect_node4 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t)))) FAIL_STACK_ERROR init_sect_node(sect_node4, (haddr_t)TEST_SECT_ADDR300, (hsize_t)TEST_SECT_SIZE80, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE); @@ -1090,7 +1089,7 @@ test_fs_sect_find(hid_t fapl) /* * Add section A */ - if(NULL == (sect_node1 = HDmalloc(sizeof(TEST_free_section_t)))) + if(NULL == (sect_node1 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t)))) FAIL_STACK_ERROR init_sect_node(sect_node1, (haddr_t)TEST_SECT_ADDR60, (hsize_t)TEST_SECT_SIZE30, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE); @@ -1110,7 +1109,7 @@ test_fs_sect_find(hid_t fapl) /* * Add section B */ - if(NULL == (sect_node2 = HDmalloc(sizeof(TEST_free_section_t)))) + if(NULL == (sect_node2 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t)))) FAIL_STACK_ERROR init_sect_node(sect_node2, (haddr_t)TEST_SECT_ADDR200, (hsize_t)TEST_SECT_SIZE80, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE); @@ -1163,7 +1162,7 @@ test_fs_sect_find(hid_t fapl) /* * Add section A */ - if(NULL == (sect_node1 = HDmalloc(sizeof(TEST_free_section_t)))) + if(NULL == (sect_node1 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t)))) FAIL_STACK_ERROR init_sect_node(sect_node1, (haddr_t)TEST_SECT_ADDR60, (hsize_t)TEST_SECT_SIZE30, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE); @@ -1296,7 +1295,7 @@ test_fs_sect_merge(hid_t fapl) /* * Add section C */ - if(NULL == (sect_node1 = HDmalloc(sizeof(TEST_free_section_t)))) + if(NULL == (sect_node1 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t)))) FAIL_STACK_ERROR init_sect_node(sect_node1, (haddr_t)TEST_SECT_ADDR100, (hsize_t)TEST_SECT_SIZE50, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE); @@ -1316,7 +1315,7 @@ test_fs_sect_merge(hid_t fapl) /* * Add section B */ - if(NULL == (sect_node2 = HDmalloc(sizeof(TEST_free_section_t)))) + if(NULL == (sect_node2 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t)))) FAIL_STACK_ERROR init_sect_node(sect_node2, (haddr_t)TEST_SECT_ADDR70, (hsize_t)TEST_SECT_SIZE30, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE); @@ -1334,7 +1333,7 @@ test_fs_sect_merge(hid_t fapl) /* * Add section A */ - if(NULL == (sect_node3 = HDmalloc(sizeof(TEST_free_section_t)))) + if(NULL == (sect_node3 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t)))) FAIL_STACK_ERROR init_sect_node(sect_node3, (haddr_t)TEST_SECT_ADDR60, (hsize_t)TEST_SECT_SIZE10, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE); @@ -1352,7 +1351,7 @@ test_fs_sect_merge(hid_t fapl) /* * Add section D */ - if(NULL == (sect_node4 = HDmalloc(sizeof(TEST_free_section_t)))) + if(NULL == (sect_node4 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t)))) FAIL_STACK_ERROR init_sect_node(sect_node4, (haddr_t)TEST_SECT_ADDR150, (hsize_t)TEST_SECT_SIZE80, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE); @@ -1424,7 +1423,7 @@ test_fs_sect_merge(hid_t fapl) /* * Add section A */ - if(NULL == (sect_node1 = HDmalloc(sizeof(TEST_free_section_t)))) + if(NULL == (sect_node1 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t)))) FAIL_STACK_ERROR init_sect_node(sect_node1, (haddr_t)TEST_SECT_ADDR70, (hsize_t)TEST_SECT_SIZE30, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE); @@ -1444,7 +1443,7 @@ test_fs_sect_merge(hid_t fapl) /* * Add section B */ - if(NULL == (sect_node2 = HDmalloc(sizeof(TEST_free_section_t)))) + if(NULL == (sect_node2 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t)))) FAIL_STACK_ERROR init_sect_node(sect_node2, (haddr_t)TEST_SECT_ADDR100, (hsize_t)TEST_SECT_SIZE50, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE); @@ -1518,7 +1517,7 @@ test_fs_sect_merge(hid_t fapl) /* * Add section A */ - if(NULL == (sect_node1 = HDmalloc(sizeof(TEST_free_section_t)))) + if(NULL == (sect_node1 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t)))) FAIL_STACK_ERROR init_sect_node(sect_node1, (haddr_t)TEST_SECT_ADDR60, (hsize_t)TEST_SECT_SIZE10, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE); @@ -1538,7 +1537,7 @@ test_fs_sect_merge(hid_t fapl) /* * Add section B */ - if(NULL == (sect_node2 = HDmalloc(sizeof(TEST_free_section_t)))) + if(NULL == (sect_node2 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t)))) FAIL_STACK_ERROR init_sect_node(sect_node2, (haddr_t)TEST_SECT_ADDR70, (hsize_t)TEST_SECT_SIZE30, TEST_FSPACE_SECT_TYPE_NEW, H5FS_SECT_LIVE); @@ -1558,7 +1557,7 @@ test_fs_sect_merge(hid_t fapl) /* * Add section C */ - if(NULL == (sect_node3 = HDmalloc(sizeof(TEST_free_section_t)))) + if(NULL == (sect_node3 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t)))) FAIL_STACK_ERROR init_sect_node(sect_node3, (haddr_t)TEST_SECT_ADDR100, (hsize_t)TEST_SECT_SIZE50, TEST_FSPACE_SECT_TYPE_NEW, H5FS_SECT_LIVE); @@ -1576,7 +1575,7 @@ test_fs_sect_merge(hid_t fapl) /* * Add section D */ - if(NULL == (sect_node4 = HDmalloc(sizeof(TEST_free_section_t)))) + if(NULL == (sect_node4 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t)))) FAIL_STACK_ERROR init_sect_node(sect_node4, (haddr_t)TEST_SECT_ADDR150, (hsize_t)TEST_SECT_SIZE80, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE); @@ -1750,7 +1749,7 @@ test_fs_sect_shrink(hid_t fapl) /* * Add section A that allow shrinking but its section class type does not define "can_shrink" */ - if(NULL == (sect_node1 = HDmalloc(sizeof(TEST_free_section_t)))) + if(NULL == (sect_node1 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t)))) FAIL_STACK_ERROR init_sect_node(sect_node1, (haddr_t)TEST_SECT_ADDR100, (hsize_t)TEST_SECT_SIZE50, TEST_FSPACE_SECT_TYPE_NEW, H5FS_SECT_LIVE); @@ -1784,7 +1783,7 @@ test_fs_sect_shrink(hid_t fapl) /* * Re-add section A that allow shrinking and its section class type defines "can_shrink" */ - if(NULL == (sect_node1 = HDmalloc(sizeof(TEST_free_section_t)))) + if(NULL == (sect_node1 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t)))) FAIL_STACK_ERROR init_sect_node(sect_node1, (haddr_t)TEST_SECT_ADDR100, (hsize_t)TEST_SECT_SIZE50, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE); @@ -1851,7 +1850,7 @@ test_fs_sect_shrink(hid_t fapl) /* * Add section A */ - if(NULL == (sect_node1 = HDmalloc(sizeof(TEST_free_section_t)))) + if(NULL == (sect_node1 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t)))) FAIL_STACK_ERROR init_sect_node(sect_node1, (haddr_t)TEST_SECT_ADDR80, (hsize_t)TEST_SECT_SIZE20, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE); @@ -1871,7 +1870,7 @@ test_fs_sect_shrink(hid_t fapl) /* * Add section B */ - if(NULL == (sect_node2 = HDmalloc(sizeof(TEST_free_section_t)))) + if(NULL == (sect_node2 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t)))) FAIL_STACK_ERROR init_sect_node(sect_node2, (haddr_t)TEST_SECT_ADDR100, (hsize_t)TEST_SECT_SIZE50, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE); @@ -1950,7 +1949,7 @@ test_fs_sect_shrink(hid_t fapl) /* * Add section A */ - if(NULL == (sect_node1 = HDmalloc(sizeof(TEST_free_section_t)))) + if(NULL == (sect_node1 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t)))) FAIL_STACK_ERROR init_sect_node(sect_node1, (haddr_t)TEST_SECT_ADDR70, (hsize_t)TEST_SECT_SIZE30, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE); @@ -1970,7 +1969,7 @@ test_fs_sect_shrink(hid_t fapl) /* * Add section B */ - if(NULL == (sect_node2 = HDmalloc(sizeof(TEST_free_section_t)))) + if(NULL == (sect_node2 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t)))) FAIL_STACK_ERROR init_sect_node(sect_node2, (haddr_t)TEST_SECT_ADDR100, (hsize_t)TEST_SECT_SIZE50, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE); @@ -2086,7 +2085,7 @@ test_fs_sect_change_class(hid_t fapl) /* * Add section A */ - if(NULL == (sect_node1 = HDmalloc(sizeof(TEST_free_section_t)))) + if(NULL == (sect_node1 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t)))) FAIL_STACK_ERROR init_sect_node(sect_node1, (haddr_t)TEST_SECT_ADDR60, (hsize_t)TEST_SECT_SIZE30, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE); @@ -2106,7 +2105,7 @@ test_fs_sect_change_class(hid_t fapl) /* * Add section B */ - if(NULL == (sect_node2 = HDmalloc(sizeof(TEST_free_section_t)))) + if(NULL == (sect_node2 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t)))) FAIL_STACK_ERROR init_sect_node(sect_node2, (haddr_t)TEST_SECT_ADDR100, (hsize_t)TEST_SECT_SIZE50, TEST_FSPACE_SECT_TYPE_NONE, H5FS_SECT_LIVE); @@ -2187,7 +2186,7 @@ test_fs_sect_change_class(hid_t fapl) /* * Add section A */ - if(NULL == (sect_node1 = HDmalloc(sizeof(TEST_free_section_t)))) + if(NULL == (sect_node1 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t)))) FAIL_STACK_ERROR init_sect_node(sect_node1, (haddr_t)TEST_SECT_ADDR70, (hsize_t)TEST_SECT_SIZE30, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE); @@ -2199,7 +2198,7 @@ test_fs_sect_change_class(hid_t fapl) /* * Add section B */ - if(NULL == (sect_node2 = HDmalloc(sizeof(TEST_free_section_t)))) + if(NULL == (sect_node2 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t)))) FAIL_STACK_ERROR init_sect_node(sect_node2, (haddr_t)TEST_SECT_ADDR100, (hsize_t)TEST_SECT_SIZE50, TEST_FSPACE_SECT_TYPE_NONE, H5FS_SECT_LIVE); @@ -2211,7 +2210,7 @@ test_fs_sect_change_class(hid_t fapl) /* * Add section C */ - if(NULL == (sect_node3 = HDmalloc(sizeof(TEST_free_section_t)))) + if(NULL == (sect_node3 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t)))) FAIL_STACK_ERROR init_sect_node(sect_node3, (haddr_t)TEST_SECT_ADDR200, (hsize_t)TEST_SECT_SIZE80, TEST_FSPACE_SECT_TYPE_NONE, H5FS_SECT_LIVE); @@ -2362,7 +2361,7 @@ test_fs_sect_extend(hid_t fapl) /* * Add section A */ - if(NULL == (sect_node1 = HDmalloc(sizeof(TEST_free_section_t)))) + if(NULL == (sect_node1 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t)))) FAIL_STACK_ERROR init_sect_node(sect_node1, (haddr_t)TEST_SECT_ADDR70, (hsize_t)TEST_SECT_SIZE5, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE); @@ -2382,7 +2381,7 @@ test_fs_sect_extend(hid_t fapl) /* * Add section B */ - if(NULL == (sect_node2 = HDmalloc(sizeof(TEST_free_section_t)))) + if(NULL == (sect_node2 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t)))) FAIL_STACK_ERROR init_sect_node(sect_node2, (haddr_t)TEST_SECT_ADDR100, (hsize_t)TEST_SECT_SIZE40, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE); @@ -2436,7 +2435,7 @@ test_fs_sect_extend(hid_t fapl) /* * Add section A */ - if(NULL == (sect_node1 = HDmalloc(sizeof(TEST_free_section_t)))) + if(NULL == (sect_node1 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t)))) FAIL_STACK_ERROR init_sect_node(sect_node1, (haddr_t)TEST_SECT_ADDR70, (hsize_t)TEST_SECT_SIZE5, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE); @@ -2456,7 +2455,7 @@ test_fs_sect_extend(hid_t fapl) /* * Add section B */ - if(NULL == (sect_node2 = HDmalloc(sizeof(TEST_free_section_t)))) + if(NULL == (sect_node2 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t)))) FAIL_STACK_ERROR init_sect_node(sect_node2, (haddr_t)TEST_SECT_ADDR100, (hsize_t)TEST_SECT_SIZE40, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE); @@ -2507,7 +2506,7 @@ test_fs_sect_extend(hid_t fapl) /* * Add section A */ - if(NULL == (sect_node1 = HDmalloc(sizeof(TEST_free_section_t)))) + if(NULL == (sect_node1 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t)))) FAIL_STACK_ERROR init_sect_node(sect_node1, (haddr_t)TEST_SECT_ADDR70, (hsize_t)TEST_SECT_SIZE5, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE); @@ -2527,7 +2526,7 @@ test_fs_sect_extend(hid_t fapl) /* * Add section B */ - if(NULL == (sect_node2 = HDmalloc(sizeof(TEST_free_section_t)))) + if(NULL == (sect_node2 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t)))) FAIL_STACK_ERROR init_sect_node(sect_node2, (haddr_t)TEST_SECT_ADDR100, (hsize_t)TEST_SECT_SIZE40, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE); @@ -2579,7 +2578,7 @@ test_fs_sect_extend(hid_t fapl) /* * Add section A */ - if(NULL == (sect_node1 = HDmalloc(sizeof(TEST_free_section_t)))) + if(NULL == (sect_node1 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t)))) FAIL_STACK_ERROR init_sect_node(sect_node1, (haddr_t)TEST_SECT_ADDR70, (hsize_t)TEST_SECT_SIZE5, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE); @@ -2599,7 +2598,7 @@ test_fs_sect_extend(hid_t fapl) /* * Add section B */ - if(NULL == (sect_node2 = HDmalloc(sizeof(TEST_free_section_t)))) + if(NULL == (sect_node2 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t)))) FAIL_STACK_ERROR init_sect_node(sect_node2, (haddr_t)TEST_SECT_ADDR100, (hsize_t)TEST_SECT_SIZE40, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE); @@ -2703,7 +2702,7 @@ test_fs_sect_iterate(hid_t fapl) TEST_ERROR for (i = 1; i <= NUM_SECTIONS; i++) { - if(NULL == (sect_node = HDmalloc(sizeof(TEST_free_section_t)))) + if(NULL == (sect_node = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t)))) FAIL_STACK_ERROR sect_size = (unsigned)((i-1) % 9) + 1; |