summaryrefslogtreecommitdiffstats
path: root/test/freespace.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/freespace.c')
-rw-r--r--test/freespace.c782
1 files changed, 391 insertions, 391 deletions
diff --git a/test/freespace.c b/test/freespace.c
index 1107609..f26c3d0 100644
--- a/test/freespace.c
+++ b/test/freespace.c
@@ -258,7 +258,7 @@ TEST_sect_merging(H5FS_section_info_t **_sect1, H5FS_section_info_t *_sect2, voi
/* Get rid of second section */
if (TEST_sect_free((H5FS_section_info_t *)sect2) < 0)
- TEST_ERROR
+ TEST_ERROR;
error:
return ret_value;
} /* TEST_sect_merging() */
@@ -316,7 +316,7 @@ TEST_sect_shrinking(H5FS_section_info_t **_sect, void *_udata)
/* just free the section node */
if (*can_shrink) {
if (TEST_sect_free((H5FS_section_info_t *)*sect) < 0)
- TEST_ERROR
+ TEST_ERROR;
*sect = NULL;
return TRUE;
} /* end if */
@@ -397,32 +397,32 @@ check_stats(const H5F_t *f, const H5FS_t *frsp, frspace_state_t *state)
/* Get statistics for heap and verify they are correct */
if (H5FS_stat_info(f, frsp, &frspace_stats) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (frspace_stats.tot_space != state->tot_space) {
HDfprintf(stdout, "frspace_stats.tot_space = %" PRIuHSIZE ", state->tot_space = %" PRIuHSIZE "\n",
frspace_stats.tot_space, state->tot_space);
- TEST_ERROR
+ TEST_ERROR;
} /* end if */
if (frspace_stats.tot_sect_count != state->tot_sect_count) {
HDfprintf(stdout,
"frspace_stats.tot_sect_count = %" PRIuHSIZE ", state->tot_sect_count = %" PRIuHSIZE "\n",
frspace_stats.tot_sect_count, state->tot_sect_count);
- TEST_ERROR
+ TEST_ERROR;
} /* end if */
if (frspace_stats.serial_sect_count != state->serial_sect_count) {
HDfprintf(stdout,
"frspace_stats.serial_sect_count = %" PRIuHSIZE ", state->serial_sect_count = %" PRIuHSIZE
"\n",
frspace_stats.serial_sect_count, state->serial_sect_count);
- TEST_ERROR
+ TEST_ERROR;
} /* end if */
if (frspace_stats.ghost_sect_count != state->ghost_sect_count) {
HDfprintf(stdout,
"frspace_stats.ghost_sect_count = %" PRIuHSIZE ", state->ghost_sect_count = %" PRIuHSIZE
"\n",
frspace_stats.ghost_sect_count, state->ghost_sect_count);
- TEST_ERROR
+ TEST_ERROR;
} /* end if */
/* All tests passed */
@@ -460,23 +460,23 @@ test_fs_create(hid_t fapl)
/* Create the file to work on */
if ((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close file */
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get the size of a file w/empty heap*/
if ((empty_size = h5_get_file_size(filename, fapl)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Re-open the file */
if ((file = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get a pointer to the internal file object */
if (NULL == (f = (H5F_t *)H5VL_object(file)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* initialize creation parameters for free-space manager */
init_cparam(&cparam);
@@ -487,59 +487,59 @@ test_fs_create(hid_t fapl)
if (NULL == (frsp = H5FS_create(f, &fs_addr, &cparam, nclasses, test_classes, &init_flags,
(hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (!H5F_addr_defined(fs_addr))
- TEST_ERROR
+ TEST_ERROR;
if (frsp->nclasses != nclasses)
- TEST_ERROR
+ TEST_ERROR;
HDmemset(&state, 0, sizeof(frspace_state_t));
if (check_stats(f, frsp, &state))
- TEST_ERROR
+ TEST_ERROR;
HDmemset(&test_cparam, 0, sizeof(H5FS_create_t));
if (H5FS__get_cparam_test(frsp, &test_cparam) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5FS__cmp_cparam_test(&cparam, &test_cparam))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close the free space manager */
if (H5FS_close(f, frsp) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
frsp = NULL;
/* reopen the free-space manager */
if (NULL == (frsp = H5FS_open(f, fs_addr, nclasses, test_classes, NULL, (hsize_t)FSPACE_THRHD_DEF,
(hsize_t)FSPACE_ALIGN_DEF)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (!H5F_addr_defined(fs_addr))
- TEST_ERROR
+ TEST_ERROR;
if (frsp->nclasses != nclasses)
- TEST_ERROR
+ TEST_ERROR;
/* Close the free space manager */
if (H5FS_close(f, frsp) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
frsp = NULL;
/* Delete free space manager */
if (H5FS_delete(f, fs_addr) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
fs_addr = HADDR_UNDEF;
/* Close the file */
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get the size of the file */
if ((file_size = h5_get_file_size(filename, fapl)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Verify the file is the correct size */
if (file_size != empty_size)
- TEST_ERROR
+ TEST_ERROR;
PASSED();
@@ -603,23 +603,23 @@ test_fs_sect_add(hid_t fapl)
/* Create the file to work on */
if ((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close file */
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get the size of a file w/empty heap*/
if ((file_size = h5_get_file_size(filename, fapl)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Re-open the file */
if ((file = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get a pointer to the internal file object */
if (NULL == (f = (H5F_t *)H5VL_object(file)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
init_cparam(&cparam);
nclasses = NELMTS(test_classes);
@@ -629,19 +629,19 @@ test_fs_sect_add(hid_t fapl)
if (NULL == (frsp = H5FS_create(f, &fs_addr, &cparam, nclasses, test_classes, &init_flags,
(hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (!H5F_addr_defined(fs_addr))
- TEST_ERROR
+ TEST_ERROR;
if (NULL == (sect_node = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
- FAIL_STACK_ERROR
+ 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);
if (H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node, H5FS_ADD_RETURNED_SPACE, NULL) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
HDmemset(&state, 0, sizeof(frspace_state_t));
state.tot_space += sect_node->sect_info.size;
@@ -649,27 +649,27 @@ test_fs_sect_add(hid_t fapl)
state.serial_sect_count += 1;
if (check_stats(f, frsp, &state))
- TEST_ERROR
+ TEST_ERROR;
fr_meta_size = H5FS_HEADER_SIZE(f) + H5FS_SINFO_PREFIX_SIZE(f);
/* Close the free space manager */
if (H5FS_close(f, frsp) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
frsp = NULL;
/* Close the file */
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
sect_node = NULL;
if (h5_using_default_driver(NULL)) {
/* Get the size of a file w/empty heap*/
if ((tmp_file_size = h5_get_file_size(filename, fapl)) < 0)
- TEST_ERROR
+ TEST_ERROR;
if (tmp_file_size <= (file_size + fr_meta_size))
- TEST_ERROR
+ TEST_ERROR;
}
PASSED();
@@ -678,15 +678,15 @@ test_fs_sect_add(hid_t fapl)
/* Get the size of a file w/empty heap*/
if ((file_size = h5_get_file_size(filename, fapl)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Re-open the file */
if ((file = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get a pointer to the internal file object */
if (NULL == (f = (H5F_t *)H5VL_object(file)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
init_cparam(&cparam);
nclasses = NELMTS(test_classes);
@@ -694,20 +694,20 @@ test_fs_sect_add(hid_t fapl)
init_flags = H5FS_CLS_GHOST_OBJ;
if (NULL == (frsp = H5FS_create(f, &fs_addr, &cparam, nclasses, test_classes, &init_flags,
(hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (!H5F_addr_defined(fs_addr))
- TEST_ERROR
+ TEST_ERROR;
/* Create free list section node */
if (NULL == (sect_node = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
- FAIL_STACK_ERROR
+ 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);
if (H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node, 0, NULL) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
HDmemset(&state, 0, sizeof(frspace_state_t));
state.tot_space += sect_node->sect_info.size;
@@ -715,26 +715,26 @@ test_fs_sect_add(hid_t fapl)
state.ghost_sect_count += 1;
if (check_stats(f, frsp, &state))
- TEST_ERROR
+ TEST_ERROR;
fr_meta_size = H5FS_HEADER_SIZE(f);
/* Close the free space manager */
if (H5FS_close(f, frsp) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close the file */
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
sect_node = NULL;
if (h5_using_default_driver(NULL)) {
/* Get the size of a file w/empty heap*/
if ((tmp_file_size = h5_get_file_size(filename, fapl)) < 0)
- TEST_ERROR
+ TEST_ERROR;
if (tmp_file_size != (file_size + fr_meta_size))
- TEST_ERROR
+ TEST_ERROR;
}
PASSED();
@@ -743,23 +743,23 @@ test_fs_sect_add(hid_t fapl)
/* Create the file to work on */
if ((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close file */
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get the size of a file w/empty heap*/
if ((file_size = h5_get_file_size(filename, fapl)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Re-open the file */
if ((file = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get a pointer to the internal file object */
if (NULL == (f = (H5F_t *)H5VL_object(file)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
TEST_set_eoa((haddr_t)TEST_SECT_ADDR150); /* set end of file address for shrinking */
@@ -769,13 +769,13 @@ test_fs_sect_add(hid_t fapl)
init_flags = 0;
if (NULL == (frsp = H5FS_create(f, &fs_addr, &cparam, nclasses, test_classes, &init_flags,
(hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (!H5F_addr_defined(fs_addr))
- TEST_ERROR
+ TEST_ERROR;
if (NULL == (sect_node = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/*
* Add section A
@@ -784,27 +784,27 @@ test_fs_sect_add(hid_t fapl)
H5FS_SECT_LIVE);
if (H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node, H5FS_ADD_RETURNED_SPACE, &can_shrink) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* nothing in free-space */
HDmemset(&state, 0, sizeof(frspace_state_t));
if (check_stats(f, frsp, &state))
- TEST_ERROR
+ TEST_ERROR;
/* Close the free space manager */
if (H5FS_close(f, frsp) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
frsp = NULL;
/* Delete free space manager */
if (H5FS_delete(f, fs_addr) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
fs_addr = HADDR_UNDEF;
/* Close the file */
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
sect_node = NULL;
PASSED();
@@ -813,23 +813,23 @@ test_fs_sect_add(hid_t fapl)
/* Create the file to work on */
if ((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close file */
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get the size of a file w/empty heap*/
if ((file_size = h5_get_file_size(filename, fapl)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Re-open the file */
if ((file = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get a pointer to the internal file object */
if (NULL == (f = (H5F_t *)H5VL_object(file)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
TEST_set_eoa((haddr_t)TEST_SECT_ADDR150); /* set end of file address for shrinking */
@@ -839,13 +839,13 @@ test_fs_sect_add(hid_t fapl)
init_flags = 0;
if (NULL == (frsp = H5FS_create(f, &fs_addr, &cparam, nclasses, test_classes, &init_flags,
(hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (!H5F_addr_defined(fs_addr))
- TEST_ERROR
+ TEST_ERROR;
if (NULL == (sect_node = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/*
* Add section A
@@ -854,7 +854,7 @@ test_fs_sect_add(hid_t fapl)
H5FS_SECT_LIVE);
if (H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node, H5FS_ADD_DESERIALIZING, &can_shrink) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
HDmemset(&state, 0, sizeof(frspace_state_t));
state.tot_space += sect_node->sect_info.size;
@@ -862,29 +862,29 @@ test_fs_sect_add(hid_t fapl)
state.serial_sect_count += 1;
if (check_stats(f, frsp, &state))
- TEST_ERROR
+ TEST_ERROR;
if (H5FS_sect_remove(f, frsp, (H5FS_section_info_t *)sect_node) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Free the section node(s) */
if (TEST_sect_free((H5FS_section_info_t *)sect_node) < 0)
- TEST_ERROR
+ TEST_ERROR;
sect_node = NULL;
/* Close the free space manager */
if (H5FS_close(f, frsp) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
frsp = NULL;
/* Delete free space manager */
if (H5FS_delete(f, fs_addr) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
fs_addr = HADDR_UNDEF;
/* Close the file */
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
sect_node = NULL;
PASSED();
@@ -948,11 +948,11 @@ test_fs_sect_find(hid_t fapl)
/* Create the file to work on */
if ((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get a pointer to the internal file object */
if (NULL == (f = (H5F_t *)H5VL_object(file)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
init_cparam(&cparam);
nclasses = NELMTS(test_classes);
@@ -962,28 +962,28 @@ test_fs_sect_find(hid_t fapl)
if (NULL == (frsp = H5FS_create(f, &fs_addr, &cparam, nclasses, test_classes, &init_flags,
(hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (!H5F_addr_defined(fs_addr))
- TEST_ERROR
+ TEST_ERROR;
HDmemset(&state, 0, sizeof(frspace_state_t));
if (check_stats(f, frsp, &state))
- TEST_ERROR
+ TEST_ERROR;
if ((node_found = H5FS_sect_find(f, frsp, (hsize_t)TEST_SECT_SIZE30, (H5FS_section_info_t **)&node)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (node_found)
- TEST_ERROR
+ TEST_ERROR;
if (check_stats(f, frsp, &state))
- TEST_ERROR
+ TEST_ERROR;
/* Close the free space manager */
if (H5FS_close(f, frsp) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
frsp = NULL;
PASSED();
@@ -993,24 +993,24 @@ test_fs_sect_find(hid_t fapl)
/* reopen the free-space manager */
if (NULL == (frsp = H5FS_open(f, fs_addr, nclasses, test_classes, NULL, (hsize_t)FSPACE_THRHD_DEF,
(hsize_t)FSPACE_ALIGN_DEF)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (!H5F_addr_defined(fs_addr))
- TEST_ERROR
+ TEST_ERROR;
if (frsp->nclasses != nclasses)
- TEST_ERROR
+ TEST_ERROR;
/*
* Add section A
*/
if (NULL == (sect_node1 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
- FAIL_STACK_ERROR
+ 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);
if (H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node1, H5FS_ADD_RETURNED_SPACE, NULL) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
HDmemset(&state, 0, sizeof(frspace_state_t));
state.tot_space += sect_node1->sect_info.size;
@@ -1018,99 +1018,99 @@ test_fs_sect_find(hid_t fapl)
state.serial_sect_count += 1;
if (check_stats(f, frsp, &state))
- TEST_ERROR
+ TEST_ERROR;
/*
* Add section C
*/
if (NULL == (sect_node3 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
- FAIL_STACK_ERROR
+ 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);
if (H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node3, H5FS_ADD_RETURNED_SPACE, NULL) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
state.tot_space += sect_node3->sect_info.size;
state.tot_sect_count += 1;
state.serial_sect_count += 1;
if (check_stats(f, frsp, &state))
- TEST_ERROR
+ TEST_ERROR;
/*
* Add section B
*/
if (NULL == (sect_node2 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
- FAIL_STACK_ERROR
+ 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);
if (H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node2, H5FS_ADD_RETURNED_SPACE, NULL) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
state.tot_space += sect_node2->sect_info.size;
state.tot_sect_count += 1;
state.serial_sect_count += 1;
if (check_stats(f, frsp, &state))
- TEST_ERROR
+ TEST_ERROR;
/*
* Add section D
*/
if (NULL == (sect_node4 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
- FAIL_STACK_ERROR
+ 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);
if (H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node4, H5FS_ADD_RETURNED_SPACE, NULL) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
state.tot_space += sect_node4->sect_info.size;
state.tot_sect_count += 1;
state.serial_sect_count += 1;
if (check_stats(f, frsp, &state))
- TEST_ERROR
+ TEST_ERROR;
if ((node_found = H5FS_sect_find(f, frsp, (hsize_t)TEST_SECT_SIZE50, (H5FS_section_info_t **)&node)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (!node_found)
- TEST_ERROR
+ TEST_ERROR;
if ((node->sect_info.addr != TEST_SECT_ADDR100) || (node->sect_info.size != TEST_SECT_SIZE50))
- TEST_ERROR
+ TEST_ERROR;
if (TEST_sect_free((H5FS_section_info_t *)node) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* remove sections A, C and D */
if (H5FS_sect_remove(f, frsp, (H5FS_section_info_t *)sect_node1) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5FS_sect_remove(f, frsp, (H5FS_section_info_t *)sect_node3) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5FS_sect_remove(f, frsp, (H5FS_section_info_t *)sect_node4) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Free the section node(s) */
if (TEST_sect_free((H5FS_section_info_t *)sect_node1) < 0)
- TEST_ERROR
+ TEST_ERROR;
sect_node1 = NULL;
if (TEST_sect_free((H5FS_section_info_t *)sect_node3) < 0)
- TEST_ERROR
+ TEST_ERROR;
sect_node3 = NULL;
if (TEST_sect_free((H5FS_section_info_t *)sect_node4) < 0)
- TEST_ERROR
+ TEST_ERROR;
sect_node4 = NULL;
/* Close the free space manager */
if (H5FS_close(f, frsp) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
frsp = NULL;
PASSED();
@@ -1120,24 +1120,24 @@ test_fs_sect_find(hid_t fapl)
/* reopen the free-space manager */
if (NULL == (frsp = H5FS_open(f, fs_addr, nclasses, test_classes, NULL, (hsize_t)FSPACE_THRHD_DEF,
(hsize_t)FSPACE_ALIGN_DEF)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (!H5F_addr_defined(fs_addr))
- TEST_ERROR
+ TEST_ERROR;
if (frsp->nclasses != nclasses)
- TEST_ERROR
+ TEST_ERROR;
/*
* Add section A
*/
if (NULL == (sect_node1 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
- FAIL_STACK_ERROR
+ 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);
if (H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node1, H5FS_ADD_RETURNED_SPACE, NULL) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
HDmemset(&state, 0, sizeof(frspace_state_t));
state.tot_space += sect_node1->sect_info.size;
@@ -1145,51 +1145,51 @@ test_fs_sect_find(hid_t fapl)
state.serial_sect_count += 1;
if (check_stats(f, frsp, &state))
- TEST_ERROR
+ TEST_ERROR;
/*
* Add section B
*/
if (NULL == (sect_node2 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
- FAIL_STACK_ERROR
+ 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);
if (H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node2, H5FS_ADD_RETURNED_SPACE, NULL) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
state.tot_space += sect_node2->sect_info.size;
state.tot_sect_count += 1;
state.serial_sect_count += 1;
if (check_stats(f, frsp, &state))
- TEST_ERROR
+ TEST_ERROR;
if ((node_found = H5FS_sect_find(f, frsp, (hsize_t)TEST_SECT_SIZE50, (H5FS_section_info_t **)&node)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (!node_found)
- TEST_ERROR
+ TEST_ERROR;
if ((node->sect_info.addr != TEST_SECT_ADDR200) || (node->sect_info.size < TEST_SECT_SIZE50))
- TEST_ERROR
+ TEST_ERROR;
if (TEST_sect_free((H5FS_section_info_t *)node) < 0)
- TEST_ERROR
+ TEST_ERROR;
node = NULL;
/* remove sections A */
if (H5FS_sect_remove(f, frsp, (H5FS_section_info_t *)sect_node1) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Free the section node(s) */
if (TEST_sect_free((H5FS_section_info_t *)sect_node1) < 0)
- TEST_ERROR
+ TEST_ERROR;
sect_node1 = NULL;
/* Close the free space manager */
if (H5FS_close(f, frsp) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
frsp = NULL;
PASSED();
@@ -1199,24 +1199,24 @@ test_fs_sect_find(hid_t fapl)
/* reopen the free-space manager */
if (NULL == (frsp = H5FS_open(f, fs_addr, nclasses, test_classes, NULL, (hsize_t)FSPACE_THRHD_DEF,
(hsize_t)FSPACE_ALIGN_DEF)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (!H5F_addr_defined(fs_addr))
- TEST_ERROR
+ TEST_ERROR;
if (frsp->nclasses != nclasses)
- TEST_ERROR
+ TEST_ERROR;
/*
* Add section A
*/
if (NULL == (sect_node1 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
- FAIL_STACK_ERROR
+ 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);
if (H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node1, H5FS_ADD_RETURNED_SPACE, NULL) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
HDmemset(&state, 0, sizeof(frspace_state_t));
state.tot_space += sect_node1->sect_info.size;
@@ -1224,36 +1224,36 @@ test_fs_sect_find(hid_t fapl)
state.serial_sect_count += 1;
if (check_stats(f, frsp, &state))
- TEST_ERROR
+ TEST_ERROR;
if ((node_found = H5FS_sect_find(f, frsp, (hsize_t)TEST_SECT_SIZE50, (H5FS_section_info_t **)&node)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (node_found)
- TEST_ERROR
+ TEST_ERROR;
/* remove sections A */
if (H5FS_sect_remove(f, frsp, (H5FS_section_info_t *)sect_node1) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Free the section node(s) */
if (TEST_sect_free((H5FS_section_info_t *)sect_node1) < 0)
- TEST_ERROR
+ TEST_ERROR;
sect_node1 = NULL;
/* Close the free space manager */
if (H5FS_close(f, frsp) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
frsp = NULL;
/* Delete free space manager */
if (H5FS_delete(f, fs_addr) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
fs_addr = HADDR_UNDEF;
/* Close the file */
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
PASSED();
@@ -1335,11 +1335,11 @@ test_fs_sect_merge(hid_t fapl)
/* Create the file to work on */
if ((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get a pointer to the internal file object */
if (NULL == (f = (H5F_t *)H5VL_object(file)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
init_cparam(&cparam);
nclasses = NELMTS(test_classes);
@@ -1349,22 +1349,22 @@ test_fs_sect_merge(hid_t fapl)
if (NULL == (frsp = H5FS_create(f, &fs_addr, &cparam, nclasses, test_classes, &init_flags,
(hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (!H5F_addr_defined(fs_addr))
- TEST_ERROR
+ TEST_ERROR;
/*
* Add section C
*/
if (NULL == (sect_node1 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
- FAIL_STACK_ERROR
+ 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);
if (H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node1, H5FS_ADD_RETURNED_SPACE, NULL) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
HDmemset(&state, 0, sizeof(frspace_state_t));
state.tot_space += TEST_SECT_SIZE50;
@@ -1372,90 +1372,90 @@ test_fs_sect_merge(hid_t fapl)
state.serial_sect_count += 1;
if (check_stats(f, frsp, &state))
- TEST_ERROR
+ TEST_ERROR;
/*
* Add section B
*/
if (NULL == (sect_node2 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
- FAIL_STACK_ERROR
+ 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);
if (H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node2, H5FS_ADD_RETURNED_SPACE, NULL) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* section B & C are merged */
state.tot_space += TEST_SECT_SIZE30;
if (check_stats(f, frsp, &state))
- TEST_ERROR
+ TEST_ERROR;
/*
* Add section A
*/
if (NULL == (sect_node3 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
- FAIL_STACK_ERROR
+ 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);
if (H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node3, H5FS_ADD_RETURNED_SPACE, NULL) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* section A is merged with the merged section of B & C */
state.tot_space += TEST_SECT_SIZE10;
if (check_stats(f, frsp, &state))
- TEST_ERROR
+ TEST_ERROR;
/*
* Add section D
*/
if (NULL == (sect_node4 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
- FAIL_STACK_ERROR
+ 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);
if (H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node4, H5FS_ADD_RETURNED_SPACE, NULL) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* section D is merged with the merged section of A & B & C */
state.tot_space += TEST_SECT_SIZE80;
if (check_stats(f, frsp, &state))
- TEST_ERROR
+ TEST_ERROR;
/* should be able to find the merged section of A, B, C & D */
if ((node_found = H5FS_sect_find(
f, frsp, (hsize_t)(TEST_SECT_SIZE10 + TEST_SECT_SIZE30 + TEST_SECT_SIZE50 + TEST_SECT_SIZE80),
(H5FS_section_info_t **)&node)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (!node_found)
- TEST_ERROR
+ TEST_ERROR;
if ((node->sect_info.addr != TEST_SECT_ADDR60) ||
(node->sect_info.size != (TEST_SECT_SIZE10 + TEST_SECT_SIZE30 + TEST_SECT_SIZE50 + TEST_SECT_SIZE80)))
- TEST_ERROR
+ TEST_ERROR;
if (TEST_sect_free((H5FS_section_info_t *)node) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Close the free space manager */
if (H5FS_close(f, frsp) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
frsp = NULL;
/* Delete free space manager */
if (H5FS_delete(f, fs_addr) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
fs_addr = HADDR_UNDEF;
/* Close the file */
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
PASSED();
@@ -1466,11 +1466,11 @@ test_fs_sect_merge(hid_t fapl)
/* Re-open the file */
if ((file = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get a pointer to the internal file object */
if (NULL == (f = (H5F_t *)H5VL_object(file)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
init_cparam(&cparam);
nclasses = NELMTS(test_classes);
@@ -1478,22 +1478,22 @@ test_fs_sect_merge(hid_t fapl)
init_flags = H5FS_CLS_SEPAR_OBJ;
if (NULL == (frsp = H5FS_create(f, &fs_addr, &cparam, nclasses, test_classes, &init_flags,
(hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (!H5F_addr_defined(fs_addr))
- TEST_ERROR
+ TEST_ERROR;
/*
* Add section A
*/
if (NULL == (sect_node1 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
- FAIL_STACK_ERROR
+ 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);
if (H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node1, H5FS_ADD_RETURNED_SPACE, NULL) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
HDmemset(&state, 0, sizeof(frspace_state_t));
state.tot_space += TEST_SECT_SIZE30;
@@ -1501,19 +1501,19 @@ test_fs_sect_merge(hid_t fapl)
state.serial_sect_count += 1;
if (check_stats(f, frsp, &state))
- TEST_ERROR
+ TEST_ERROR;
/*
* Add section B
*/
if (NULL == (sect_node2 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
- FAIL_STACK_ERROR
+ 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);
if (H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node2, H5FS_ADD_RETURNED_SPACE, NULL) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* section A & B are not merged because H5FS_CLS_SEPAR_OBJ is set */
state.tot_space += TEST_SECT_SIZE50;
@@ -1521,44 +1521,44 @@ test_fs_sect_merge(hid_t fapl)
state.serial_sect_count += 1;
if (check_stats(f, frsp, &state))
- TEST_ERROR
+ TEST_ERROR;
/* should not be able to find the merged section of A & B */
if ((node_found = H5FS_sect_find(f, frsp, (hsize_t)(TEST_SECT_SIZE30 + TEST_SECT_SIZE50),
(H5FS_section_info_t **)&node)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (node_found)
- TEST_ERROR
+ TEST_ERROR;
/* remove section A from free-space */
if (H5FS_sect_remove(f, frsp, (H5FS_section_info_t *)sect_node1) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* remove section B from free-space */
if (H5FS_sect_remove(f, frsp, (H5FS_section_info_t *)sect_node2) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Free the section node(s) */
if (TEST_sect_free((H5FS_section_info_t *)sect_node1) < 0)
- TEST_ERROR
+ TEST_ERROR;
sect_node1 = NULL;
if (TEST_sect_free((H5FS_section_info_t *)sect_node2) < 0)
- TEST_ERROR
+ TEST_ERROR;
sect_node2 = NULL;
/* Close the free space manager */
if (H5FS_close(f, frsp) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
frsp = NULL;
/* Delete free space manager */
if (H5FS_delete(f, fs_addr) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
fs_addr = HADDR_UNDEF;
/* Close the file */
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
PASSED();
@@ -1569,11 +1569,11 @@ test_fs_sect_merge(hid_t fapl)
/* Re-open the file */
if ((file = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get a pointer to the internal file object */
if (NULL == (f = (H5F_t *)H5VL_object(file)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
init_cparam(&cparam);
nclasses = NELMTS(test_classes);
@@ -1581,22 +1581,22 @@ test_fs_sect_merge(hid_t fapl)
init_flags = 0; /* reset */
if (NULL == (frsp = H5FS_create(f, &fs_addr, &cparam, nclasses, test_classes, &init_flags,
(hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (!H5F_addr_defined(fs_addr))
- TEST_ERROR
+ TEST_ERROR;
/*
* Add section A
*/
if (NULL == (sect_node1 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
- FAIL_STACK_ERROR
+ 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);
if (H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node1, H5FS_ADD_RETURNED_SPACE, NULL) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
HDmemset(&state, 0, sizeof(frspace_state_t));
state.tot_space += TEST_SECT_SIZE10;
@@ -1604,19 +1604,19 @@ test_fs_sect_merge(hid_t fapl)
state.serial_sect_count += 1;
if (check_stats(f, frsp, &state))
- TEST_ERROR
+ TEST_ERROR;
/*
* Add section B
*/
if (NULL == (sect_node2 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
- FAIL_STACK_ERROR
+ 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);
if (H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node2, H5FS_ADD_RETURNED_SPACE, NULL) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* sections A & B are not merged because H5FS_CLS_MERGE_SYM is set & section class type is different */
state.tot_space += TEST_SECT_SIZE30;
@@ -1624,37 +1624,37 @@ test_fs_sect_merge(hid_t fapl)
state.serial_sect_count += 1;
if (check_stats(f, frsp, &state))
- TEST_ERROR
+ TEST_ERROR;
/*
* Add section C
*/
if (NULL == (sect_node3 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
- FAIL_STACK_ERROR
+ 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);
if (H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node3, H5FS_ADD_RETURNED_SPACE, NULL) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* sections B & C are merged because H5FS_CLS_MERGE_SYM is set & section class type is the same */
state.tot_space += TEST_SECT_SIZE50;
if (check_stats(f, frsp, &state))
- TEST_ERROR
+ TEST_ERROR;
/*
* Add section D
*/
if (NULL == (sect_node4 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
- FAIL_STACK_ERROR
+ 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);
if (H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node4, H5FS_ADD_RETURNED_SPACE, NULL) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/*
* section D is not merged with the merged section of B & C because
@@ -1665,73 +1665,73 @@ test_fs_sect_merge(hid_t fapl)
state.serial_sect_count += 1;
if (check_stats(f, frsp, &state))
- TEST_ERROR
+ TEST_ERROR;
/* should not be able to find a merged section of A, B, C & D */
if ((node_found = H5FS_sect_find(
f, frsp, (hsize_t)(TEST_SECT_SIZE10 + TEST_SECT_SIZE30 + TEST_SECT_SIZE50 + TEST_SECT_SIZE80),
(H5FS_section_info_t **)&node)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (node_found)
- TEST_ERROR
+ TEST_ERROR;
/* should be able to find the merged section of B & C */
if ((node_found = H5FS_sect_find(f, frsp, (hsize_t)(TEST_SECT_SIZE30 + TEST_SECT_SIZE50),
(H5FS_section_info_t **)&node)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (!node_found)
- TEST_ERROR
+ TEST_ERROR;
if ((node->sect_info.addr != TEST_SECT_ADDR70) ||
(node->sect_info.size != (TEST_SECT_SIZE30 + TEST_SECT_SIZE50)))
- TEST_ERROR
+ TEST_ERROR;
if (TEST_sect_free((H5FS_section_info_t *)node) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* should be able to find section A */
if ((node_found = H5FS_sect_find(f, frsp, (hsize_t)(TEST_SECT_SIZE10), (H5FS_section_info_t **)&node)) <
0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (!node_found)
- TEST_ERROR
+ TEST_ERROR;
if ((node->sect_info.addr != TEST_SECT_ADDR60) || (node->sect_info.size != TEST_SECT_SIZE10))
- TEST_ERROR
+ TEST_ERROR;
if (TEST_sect_free((H5FS_section_info_t *)node) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* should be able to find section D */
if ((node_found = H5FS_sect_find(f, frsp, (hsize_t)(TEST_SECT_SIZE80), (H5FS_section_info_t **)&node)) <
0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (!node_found)
- TEST_ERROR
+ TEST_ERROR;
if ((node->sect_info.addr != TEST_SECT_ADDR150) || (node->sect_info.size != TEST_SECT_SIZE80))
- TEST_ERROR
+ TEST_ERROR;
if (TEST_sect_free((H5FS_section_info_t *)node) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Close the free space manager */
if (H5FS_close(f, frsp) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
frsp = NULL;
/* Delete free space manager */
if (H5FS_delete(f, fs_addr) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
fs_addr = HADDR_UNDEF;
/* Close the file */
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
PASSED();
@@ -1811,11 +1811,11 @@ test_fs_sect_shrink(hid_t fapl)
/* Create the file to work on */
if ((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get a pointer to the internal file object */
if (NULL == (f = (H5F_t *)H5VL_object(file)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
init_cparam(&cparam);
nclasses = NELMTS(test_classes);
@@ -1827,23 +1827,23 @@ test_fs_sect_shrink(hid_t fapl)
if (NULL == (frsp = H5FS_create(f, &fs_addr, &cparam, nclasses, test_classes, &init_flags,
(hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (!H5F_addr_defined(fs_addr))
- TEST_ERROR
+ TEST_ERROR;
/*
* Add section A that allow shrinking but its section class type does not define "can_shrink"
*/
if (NULL == (sect_node1 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
- FAIL_STACK_ERROR
+ 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);
can_shrink = FALSE;
if (H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node1, H5FS_ADD_RETURNED_SPACE, &can_shrink) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
HDmemset(&state, 0, sizeof(frspace_state_t));
state.tot_space += sect_node1->sect_info.size;
@@ -1851,62 +1851,62 @@ test_fs_sect_shrink(hid_t fapl)
state.serial_sect_count += 1;
if (check_stats(f, frsp, &state))
- TEST_ERROR
+ TEST_ERROR;
/* section A should still be there in free-space */
if ((node_found = H5FS_sect_find(f, frsp, (hsize_t)(TEST_SECT_SIZE50), (H5FS_section_info_t **)&node)) <
0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (!node_found)
- TEST_ERROR
+ TEST_ERROR;
if ((node->sect_info.addr != TEST_SECT_ADDR100) || (node->sect_info.size != TEST_SECT_SIZE50))
- TEST_ERROR
+ TEST_ERROR;
if (TEST_sect_free((H5FS_section_info_t *)node) < 0)
- TEST_ERROR
+ TEST_ERROR;
/*
* Re-add section A that allow shrinking and its section class type defines "can_shrink"
*/
if (NULL == (sect_node1 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
- FAIL_STACK_ERROR
+ 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);
can_shrink = FALSE;
if (H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node1, H5FS_ADD_RETURNED_SPACE, &can_shrink) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* should have nothing in free-space */
HDmemset(&state, 0, sizeof(frspace_state_t));
if (check_stats(f, frsp, &state))
- TEST_ERROR
+ TEST_ERROR;
/* section A should not be there in free-space */
if ((node_found = H5FS_sect_find(f, frsp, (hsize_t)(TEST_SECT_SIZE50), (H5FS_section_info_t **)&node)) <
0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (node_found)
- TEST_ERROR
+ TEST_ERROR;
/* Close the free space manager */
if (H5FS_close(f, frsp) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
frsp = NULL;
/* Delete free space manager */
if (H5FS_delete(f, fs_addr) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
fs_addr = HADDR_UNDEF;
/* Close the file */
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
PASSED();
@@ -1914,11 +1914,11 @@ test_fs_sect_shrink(hid_t fapl)
/* Re-open the file */
if ((file = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get a pointer to the internal file object */
if (NULL == (f = (H5F_t *)H5VL_object(file)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
init_cparam(&cparam);
nclasses = NELMTS(test_classes);
@@ -1929,22 +1929,22 @@ test_fs_sect_shrink(hid_t fapl)
init_flags = H5FS_CLS_SEPAR_OBJ;
if (NULL == (frsp = H5FS_create(f, &fs_addr, &cparam, nclasses, test_classes, &init_flags,
(hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (!H5F_addr_defined(fs_addr))
- TEST_ERROR
+ TEST_ERROR;
/*
* Add section A
*/
if (NULL == (sect_node1 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
- FAIL_STACK_ERROR
+ 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);
if (H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node1, H5FS_ADD_RETURNED_SPACE, &can_shrink) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
HDmemset(&state, 0, sizeof(frspace_state_t));
state.tot_space += sect_node1->sect_info.size;
@@ -1952,62 +1952,62 @@ test_fs_sect_shrink(hid_t fapl)
state.serial_sect_count += 1;
if (check_stats(f, frsp, &state))
- TEST_ERROR
+ TEST_ERROR;
/*
* Add section B
*/
if (NULL == (sect_node2 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
- FAIL_STACK_ERROR
+ 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);
if (H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node2, H5FS_ADD_RETURNED_SPACE, &can_shrink) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* free-space should be the same since section B is shrunk */
if (check_stats(f, frsp, &state))
- TEST_ERROR
+ TEST_ERROR;
/* section B should not be there in free-space */
if ((node_found = H5FS_sect_find(f, frsp, (hsize_t)(TEST_SECT_SIZE50), (H5FS_section_info_t **)&node)) <
0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (node_found)
- TEST_ERROR
+ TEST_ERROR;
if (check_stats(f, frsp, &state))
- TEST_ERROR
+ TEST_ERROR;
/* section A should still be there in free-space */
if ((node_found = H5FS_sect_find(f, frsp, (hsize_t)(TEST_SECT_SIZE20), (H5FS_section_info_t **)&node)) <
0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (!node_found)
- TEST_ERROR
+ TEST_ERROR;
if ((node->sect_info.addr != TEST_SECT_ADDR80) || (node->sect_info.size != TEST_SECT_SIZE20))
- TEST_ERROR
+ TEST_ERROR;
if (TEST_sect_free((H5FS_section_info_t *)node) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Close the free space manager */
if (H5FS_close(f, frsp) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
frsp = NULL;
/* Delete free space manager */
if (H5FS_delete(f, fs_addr) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
fs_addr = HADDR_UNDEF;
/* Close the file */
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
PASSED();
@@ -2015,11 +2015,11 @@ test_fs_sect_shrink(hid_t fapl)
/* Re-open the file */
if ((file = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get a pointer to the internal file object */
if (NULL == (f = (H5F_t *)H5VL_object(file)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
init_cparam(&cparam);
nclasses = NELMTS(test_classes);
@@ -2029,22 +2029,22 @@ test_fs_sect_shrink(hid_t fapl)
init_flags = 0; /* reset */
if (NULL == (frsp = H5FS_create(f, &fs_addr, &cparam, nclasses, test_classes, &init_flags,
(hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (!H5F_addr_defined(fs_addr))
- TEST_ERROR
+ TEST_ERROR;
/*
* Add section A
*/
if (NULL == (sect_node1 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
- FAIL_STACK_ERROR
+ 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);
if (H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node1, H5FS_ADD_RETURNED_SPACE, &can_shrink) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
HDmemset(&state, 0, sizeof(frspace_state_t));
state.tot_space += sect_node1->sect_info.size;
@@ -2052,54 +2052,54 @@ test_fs_sect_shrink(hid_t fapl)
state.serial_sect_count += 1;
if (check_stats(f, frsp, &state))
- TEST_ERROR
+ TEST_ERROR;
/*
* Add section B
*/
if (NULL == (sect_node2 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
- FAIL_STACK_ERROR
+ 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);
if (H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node2, H5FS_ADD_RETURNED_SPACE, &can_shrink) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* section A & B are merged and then strunk, so there is nothing in free-space */
HDmemset(&state, 0, sizeof(frspace_state_t));
if (check_stats(f, frsp, &state))
- TEST_ERROR
+ TEST_ERROR;
/* section B should not be there in free-space */
if ((node_found = H5FS_sect_find(f, frsp, (hsize_t)(TEST_SECT_SIZE50), (H5FS_section_info_t **)&node)) <
0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (node_found)
- TEST_ERROR
+ TEST_ERROR;
/* section A should not be there in free-space */
if ((node_found = H5FS_sect_find(f, frsp, (hsize_t)(TEST_SECT_SIZE30), (H5FS_section_info_t **)&node)) <
0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (node_found)
- TEST_ERROR
+ TEST_ERROR;
/* Close the free space manager */
if (H5FS_close(f, frsp) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
frsp = NULL;
/* Delete free space manager */
if (H5FS_delete(f, fs_addr) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
fs_addr = HADDR_UNDEF;
/* Close the file */
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
PASSED();
@@ -2156,11 +2156,11 @@ test_fs_sect_change_class(hid_t fapl)
/* Create the file to work on */
if ((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get a pointer to the internal file object */
if (NULL == (f = (H5F_t *)H5VL_object(file)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
init_cparam(&cparam);
nclasses = NELMTS(test_classes);
@@ -2171,22 +2171,22 @@ test_fs_sect_change_class(hid_t fapl)
init_flags = H5FS_CLS_GHOST_OBJ;
if (NULL == (frsp = H5FS_create(f, &fs_addr, &cparam, nclasses, test_classes, &init_flags,
(hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (!H5F_addr_defined(fs_addr))
- TEST_ERROR
+ TEST_ERROR;
/*
* Add section A
*/
if (NULL == (sect_node1 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
- FAIL_STACK_ERROR
+ 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);
if (H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node1, H5FS_ADD_RETURNED_SPACE, NULL) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
HDmemset(&state, 0, sizeof(frspace_state_t));
state.tot_space += TEST_SECT_SIZE30;
@@ -2194,65 +2194,65 @@ test_fs_sect_change_class(hid_t fapl)
state.ghost_sect_count += 1;
if (check_stats(f, frsp, &state))
- TEST_ERROR
+ TEST_ERROR;
/*
* Add section B
*/
if (NULL == (sect_node2 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
- FAIL_STACK_ERROR
+ 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);
if (H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node2, H5FS_ADD_RETURNED_SPACE, NULL) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
state.tot_space += TEST_SECT_SIZE50;
state.tot_sect_count += 1;
state.serial_sect_count += 1;
if (check_stats(f, frsp, &state))
- TEST_ERROR
+ TEST_ERROR;
if (H5FS_sect_change_class(f, frsp, (H5FS_section_info_t *)sect_node1, TEST_FSPACE_SECT_TYPE_NONE) < 0)
- TEST_ERROR
+ TEST_ERROR;
state.serial_sect_count += 1;
state.ghost_sect_count -= 1;
if (check_stats(f, frsp, &state))
- TEST_ERROR
+ TEST_ERROR;
if (H5FS_sect_find(f, frsp, (hsize_t)TEST_SECT_SIZE30, (H5FS_section_info_t **)&node) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (node->sect_info.type != TEST_FSPACE_SECT_TYPE_NONE)
- TEST_ERROR
+ TEST_ERROR;
if (TEST_sect_free((H5FS_section_info_t *)node) < 0)
- TEST_ERROR
+ TEST_ERROR;
if (H5FS_sect_remove(f, frsp, (H5FS_section_info_t *)sect_node2) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Free the section node(s) */
if (TEST_sect_free((H5FS_section_info_t *)sect_node2) < 0)
- TEST_ERROR
+ TEST_ERROR;
sect_node2 = NULL;
/* Close the free space manager */
if (H5FS_close(f, frsp) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
frsp = NULL;
/* Delete free space manager */
if (H5FS_delete(f, fs_addr) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
fs_addr = HADDR_UNDEF;
/* Close the file */
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
PASSED();
@@ -2263,11 +2263,11 @@ test_fs_sect_change_class(hid_t fapl)
/* Re-open the file */
if ((file = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get a pointer to the internal file object */
if (NULL == (f = (H5F_t *)H5VL_object(file)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
init_cparam(&cparam);
nclasses = NELMTS(test_classes);
@@ -2275,102 +2275,102 @@ test_fs_sect_change_class(hid_t fapl)
init_flags = H5FS_CLS_SEPAR_OBJ;
if (NULL == (frsp = H5FS_create(f, &fs_addr, &cparam, nclasses, test_classes, &init_flags,
(hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (!H5F_addr_defined(fs_addr))
- TEST_ERROR
+ TEST_ERROR;
/*
* Add section A
*/
if (NULL == (sect_node1 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
- FAIL_STACK_ERROR
+ 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);
if (H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node1, H5FS_ADD_RETURNED_SPACE, NULL) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/*
* Add section B
*/
if (NULL == (sect_node2 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
- FAIL_STACK_ERROR
+ 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);
if (H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node2, H5FS_ADD_RETURNED_SPACE, NULL) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/*
* Add section C
*/
if (NULL == (sect_node3 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
- FAIL_STACK_ERROR
+ 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);
if (H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node3, H5FS_ADD_RETURNED_SPACE, NULL) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* change the class of B to A's class */
if (H5FS_sect_change_class(f, frsp, (H5FS_section_info_t *)sect_node2, TEST_FSPACE_SECT_TYPE) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* change the class of C to A's class */
if (H5FS_sect_change_class(f, frsp, (H5FS_section_info_t *)sect_node3, TEST_FSPACE_SECT_TYPE) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* the merge_list should be empty */
if (frsp->sinfo->merge_list)
if (H5SL_count(frsp->sinfo->merge_list))
- TEST_ERROR
+ TEST_ERROR;
/* verify that section B has changed class */
if (H5FS_sect_find(f, frsp, (hsize_t)TEST_SECT_SIZE50, (H5FS_section_info_t **)&node) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (node->sect_info.type != TEST_FSPACE_SECT_TYPE)
- TEST_ERROR
+ TEST_ERROR;
if (TEST_sect_free((H5FS_section_info_t *)node) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* verify that section C has changed class */
if (H5FS_sect_find(f, frsp, (hsize_t)TEST_SECT_SIZE80, (H5FS_section_info_t **)&node) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (node->sect_info.type != TEST_FSPACE_SECT_TYPE)
- TEST_ERROR
+ TEST_ERROR;
if (TEST_sect_free((H5FS_section_info_t *)node) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* remove section A from free-space */
if (H5FS_sect_remove(f, frsp, (H5FS_section_info_t *)sect_node1) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Free the section node(s) */
if (TEST_sect_free((H5FS_section_info_t *)sect_node1) < 0)
- TEST_ERROR
+ TEST_ERROR;
sect_node1 = NULL;
/* Close the free space manager */
if (H5FS_close(f, frsp) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
frsp = NULL;
/* Delete free space manager */
if (H5FS_delete(f, fs_addr) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
fs_addr = HADDR_UNDEF;
/* Close the file */
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
PASSED();
@@ -2442,11 +2442,11 @@ test_fs_sect_extend(hid_t fapl)
/* Create the file to work on */
if ((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get a pointer to the internal file object */
if (NULL == (f = (H5F_t *)H5VL_object(file)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Tag with the global free space tag */
H5AC_tag(H5AC__FREESPACE_TAG, NULL);
@@ -2459,22 +2459,22 @@ test_fs_sect_extend(hid_t fapl)
if (NULL == (frsp = H5FS_create(f, &fs_addr, &cparam, nclasses, test_classes, &init_flags,
(hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (!H5F_addr_defined(fs_addr))
- TEST_ERROR
+ TEST_ERROR;
/*
* Add section A
*/
if (NULL == (sect_node1 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
- FAIL_STACK_ERROR
+ 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);
if (H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node1, H5FS_ADD_RETURNED_SPACE, NULL) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
HDmemset(&state, 0, sizeof(frspace_state_t));
state.tot_space += sect_node1->sect_info.size;
@@ -2482,49 +2482,49 @@ test_fs_sect_extend(hid_t fapl)
state.serial_sect_count += 1;
if (check_stats(f, frsp, &state))
- TEST_ERROR
+ TEST_ERROR;
/*
* Add section B
*/
if (NULL == (sect_node2 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
- FAIL_STACK_ERROR
+ 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);
if (H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node2, H5FS_ADD_RETURNED_SPACE, NULL) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
state.tot_space += sect_node2->sect_info.size;
state.tot_sect_count += 1;
state.serial_sect_count += 1;
if (check_stats(f, frsp, &state))
- TEST_ERROR
+ TEST_ERROR;
/* Extend a block by requested-size */
if ((status = H5FS_sect_try_extend(f, frsp, (haddr_t)TEST_SECT_SIZE80, (hsize_t)TEST_SECT_SIZE20,
(hsize_t)TEST_SECT_SIZE40, 0, NULL)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (FALSE == status)
- TEST_ERROR
+ TEST_ERROR;
/* Succeed in extending the block: free space info is decremented accordingly */
state.tot_space -= (hsize_t)TEST_SECT_SIZE40;
state.tot_sect_count -= 1;
state.serial_sect_count -= 1;
if (check_stats(f, frsp, &state))
- TEST_ERROR
+ TEST_ERROR;
/* Close the free space manager */
if (H5FS_close(f, frsp) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
frsp = NULL;
/* Delete free space manager */
if (H5FS_delete(f, fs_addr) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
fs_addr = HADDR_UNDEF;
PASSED();
@@ -2536,22 +2536,22 @@ test_fs_sect_extend(hid_t fapl)
if (NULL == (frsp = H5FS_create(f, &fs_addr, &cparam, nclasses, test_classes, &init_flags,
(hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (!H5F_addr_defined(fs_addr))
- TEST_ERROR
+ TEST_ERROR;
/*
* Add section A
*/
if (NULL == (sect_node1 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
- FAIL_STACK_ERROR
+ 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);
if (H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node1, H5FS_ADD_RETURNED_SPACE, NULL) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
HDmemset(&state, 0, sizeof(frspace_state_t));
state.tot_space += sect_node1->sect_info.size;
@@ -2559,46 +2559,46 @@ test_fs_sect_extend(hid_t fapl)
state.serial_sect_count += 1;
if (check_stats(f, frsp, &state))
- TEST_ERROR
+ TEST_ERROR;
/*
* Add section B
*/
if (NULL == (sect_node2 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
- FAIL_STACK_ERROR
+ 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);
if (H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node2, H5FS_ADD_RETURNED_SPACE, NULL) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
state.tot_space += sect_node2->sect_info.size;
state.tot_sect_count += 1;
state.serial_sect_count += 1;
if (check_stats(f, frsp, &state))
- TEST_ERROR
+ TEST_ERROR;
/* Extend the block by requested-size */
if ((status = H5FS_sect_try_extend(f, frsp, (haddr_t)TEST_SECT_ADDR80, (hsize_t)TEST_SECT_SIZE20,
(hsize_t)TEST_SECT_SIZE50, 0, NULL)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (TRUE == status)
- TEST_ERROR
+ TEST_ERROR;
/* Not able to extend the block: free space info remains the same */
if (check_stats(f, frsp, &state))
- TEST_ERROR
+ TEST_ERROR;
/* Close the free space manager */
if (H5FS_close(f, frsp) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
frsp = NULL;
/* Delete free space manager */
if (H5FS_delete(f, fs_addr) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
fs_addr = HADDR_UNDEF;
PASSED();
@@ -2610,22 +2610,22 @@ test_fs_sect_extend(hid_t fapl)
if (NULL == (frsp = H5FS_create(f, &fs_addr, &cparam, nclasses, test_classes, &init_flags,
(hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (!H5F_addr_defined(fs_addr))
- TEST_ERROR
+ TEST_ERROR;
/*
* Add section A
*/
if (NULL == (sect_node1 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
- FAIL_STACK_ERROR
+ 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);
if (H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node1, H5FS_ADD_RETURNED_SPACE, NULL) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
HDmemset(&state, 0, sizeof(frspace_state_t));
state.tot_space += sect_node1->sect_info.size;
@@ -2633,47 +2633,47 @@ test_fs_sect_extend(hid_t fapl)
state.serial_sect_count += 1;
if (check_stats(f, frsp, &state))
- TEST_ERROR
+ TEST_ERROR;
/*
* Add section B
*/
if (NULL == (sect_node2 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
- FAIL_STACK_ERROR
+ 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);
if (H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node2, H5FS_ADD_RETURNED_SPACE, NULL) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
state.tot_space += sect_node2->sect_info.size;
state.tot_sect_count += 1;
state.serial_sect_count += 1;
if (check_stats(f, frsp, &state))
- TEST_ERROR
+ TEST_ERROR;
/* Extend the block by requested-size */
if ((status = H5FS_sect_try_extend(f, frsp, (haddr_t)TEST_SECT_ADDR80, (hsize_t)TEST_SECT_SIZE20,
(hsize_t)TEST_SECT_SIZE30, 0, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR;
if (FALSE == status)
- TEST_ERROR
+ TEST_ERROR;
/* Succeed in extending the block: total free space is decreased but other info remains the same */
state.tot_space -= 30;
if (check_stats(f, frsp, &state))
- TEST_ERROR
+ TEST_ERROR;
/* Close the free space manager */
if (H5FS_close(f, frsp) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
frsp = NULL;
/* Delete free space manager */
if (H5FS_delete(f, fs_addr) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
fs_addr = HADDR_UNDEF;
PASSED();
@@ -2685,22 +2685,22 @@ test_fs_sect_extend(hid_t fapl)
if (NULL == (frsp = H5FS_create(f, &fs_addr, &cparam, nclasses, test_classes, &init_flags,
(hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (!H5F_addr_defined(fs_addr))
- TEST_ERROR
+ TEST_ERROR;
/*
* Add section A
*/
if (NULL == (sect_node1 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
- FAIL_STACK_ERROR
+ 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);
if (H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node1, H5FS_ADD_RETURNED_SPACE, NULL) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
HDmemset(&state, 0, sizeof(frspace_state_t));
state.tot_space += sect_node1->sect_info.size;
@@ -2708,53 +2708,53 @@ test_fs_sect_extend(hid_t fapl)
state.serial_sect_count += 1;
if (check_stats(f, frsp, &state))
- TEST_ERROR
+ TEST_ERROR;
/*
* Add section B
*/
if (NULL == (sect_node2 = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
- FAIL_STACK_ERROR
+ 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);
if (H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node2, H5FS_ADD_RETURNED_SPACE, NULL) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
state.tot_space += sect_node2->sect_info.size;
state.tot_sect_count += 1;
state.serial_sect_count += 1;
if (check_stats(f, frsp, &state))
- TEST_ERROR
+ TEST_ERROR;
/* Extend the block by requested-size */
if ((status = H5FS_sect_try_extend(f, frsp, (haddr_t)TEST_SECT_ADDR80, (hsize_t)TEST_SECT_SIZE15,
(hsize_t)TEST_SECT_SIZE40, 0, NULL)) < 0)
- TEST_ERROR
+ TEST_ERROR;
if (TRUE == status)
- TEST_ERROR
+ TEST_ERROR;
/* Not able to extend the block: free space manager info remains the same */
if (check_stats(f, frsp, &state))
- TEST_ERROR
+ TEST_ERROR;
/* Close the free space manager */
if (H5FS_close(f, frsp) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
frsp = NULL;
/* Delete free space manager */
if (H5FS_delete(f, fs_addr) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
fs_addr = HADDR_UNDEF;
PASSED();
/* Close the file */
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
return 0;
@@ -2801,11 +2801,11 @@ test_fs_sect_iterate(hid_t fapl)
/* Create the file to work on */
if ((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get a pointer to the internal file object */
if (NULL == (f = (H5F_t *)H5VL_object(file)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
init_cparam(&cparam);
nclasses = NELMTS(test_classes);
@@ -2818,45 +2818,45 @@ test_fs_sect_iterate(hid_t fapl)
init_flags = H5FS_CLS_SEPAR_OBJ;
if (NULL == (frsp = H5FS_create(f, &fs_addr, &cparam, nclasses, test_classes, &init_flags,
(hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (!H5F_addr_defined(fs_addr))
- TEST_ERROR
+ TEST_ERROR;
for (i = 1; i <= NUM_SECTIONS; i++) {
if (NULL == (sect_node = (TEST_free_section_t *)HDmalloc(sizeof(TEST_free_section_t))))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
sect_size = (unsigned)((i - 1) % 9) + 1;
init_sect_node(sect_node, (haddr_t)i * 10, (hsize_t)sect_size, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE);
if (H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node, H5FS_ADD_RETURNED_SPACE, NULL) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
} /* end for */
if (H5FS_sect_iterate(f, frsp, TEST_sects_cb, &udata) < 0)
- TEST_ERROR
+ TEST_ERROR;
H5FS_sect_stats(frsp, &tot_space, &nsects);
if (udata.tot_size != tot_space)
- TEST_ERROR
+ TEST_ERROR;
if (udata.tot_sect_count != nsects)
- TEST_ERROR
+ TEST_ERROR;
/* Close the free space manager */
if (H5FS_close(f, frsp) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
frsp = NULL;
/* Delete free space manager */
if (H5FS_delete(f, fs_addr) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
fs_addr = HADDR_UNDEF;
/* Close the file */
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
PASSED();
@@ -2884,18 +2884,18 @@ main(void)
if ((fapl = h5_fileaccess()) < 0) {
nerrors++;
- PUTS_ERROR("Can't get VFD-dependent fapl")
+ PUTS_ERROR("Can't get VFD-dependent fapl");
} /* end if */
/* Push API context */
if (H5CX_push() < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
api_ctx_pushed = TRUE;
/* make sure alignment is not set for tests to succeed */
if (H5Pset_alignment(fapl, (hsize_t)1, (hsize_t)1) < 0) {
nerrors++;
- PUTS_ERROR("Can't set alignment")
+ PUTS_ERROR("Can't set alignment");
} /* end if */
nerrors += test_fs_create(fapl);
@@ -2916,7 +2916,7 @@ main(void)
/* Pop API context */
if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
api_ctx_pushed = FALSE;
h5_cleanup(FILENAME, fapl);