summaryrefslogtreecommitdiffstats
path: root/test/mf.c
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2022-05-04 15:49:01 (GMT)
committerGitHub <noreply@github.com>2022-05-04 15:49:01 (GMT)
commit838d050a63d310a38f92a510dc94c0656a84bb51 (patch)
tree55fe7b05c0408ebf4b28c3bfb5cd9a1d04fb2502 /test/mf.c
parent19a59c29b93c04ae069881da2354d3d7048619b9 (diff)
downloadhdf5-838d050a63d310a38f92a510dc94c0656a84bb51.zip
hdf5-838d050a63d310a38f92a510dc94c0656a84bb51.tar.gz
hdf5-838d050a63d310a38f92a510dc94c0656a84bb51.tar.bz2
h5test.h testing macros get enclosed in do..while loops (#1721)
* h5test.h testing macros get enclosed in do..while loops * Adds missed macro in hl C++ code * Fixes macro in Windows code
Diffstat (limited to 'test/mf.c')
-rw-r--r--test/mf.c2318
1 files changed, 1159 insertions, 1159 deletions
diff --git a/test/mf.c b/test/mf.c
index 242e319..ce9d667 100644
--- a/test/mf.c
+++ b/test/mf.c
@@ -165,32 +165,32 @@ check_stats(const H5F_t *f, const H5FS_t *frsp, H5FS_stat_t *state)
/* Get statistics for free-space 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 */
@@ -237,19 +237,19 @@ test_mf_eoa(const char *env_h5_drvr, hid_t fapl)
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
if ((fapl_new = H5Pcopy(fapl)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* 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 the file */
if ((file_size = h5_get_file_size(filename, fapl)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Turn off using meta/small data aggregator */
H5Pset_meta_block_size(fapl_new, (hsize_t)0);
@@ -257,11 +257,11 @@ test_mf_eoa(const char *env_h5_drvr, hid_t fapl)
/* Re-open the file with meta/small data setting */
if ((file = H5Fopen(filename, H5F_ACC_RDWR, fapl_new)) < 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;
H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
@@ -271,56 +271,56 @@ test_mf_eoa(const char *env_h5_drvr, hid_t fapl)
/* nothing should be changed in meta_aggr */
H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &ma_size);
if (new_ma_addr != ma_addr)
- TEST_ERROR
+ TEST_ERROR;
if (addr1 < (haddr_t)file_size)
- TEST_ERROR
+ TEST_ERROR;
addr2 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE50);
/* nothing should be changed in meta_aggr */
H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &ma_size);
if (new_ma_addr != ma_addr)
- TEST_ERROR
+ TEST_ERROR;
if (addr2 < (haddr_t)file_size)
- TEST_ERROR
+ TEST_ERROR;
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get the size of the file */
if ((new_file_size = h5_get_file_size(filename, fapl_new)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Verify the file is the correct size */
if (new_file_size != (file_size + TBLOCK_SIZE30 + TBLOCK_SIZE50))
- TEST_ERROR
+ TEST_ERROR;
/* Re-open the file */
if ((file = H5Fopen(filename, H5F_ACC_RDWR, fapl_new)) < 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;
H5MF_xfree(f, type, addr1, (hsize_t)TBLOCK_SIZE30);
H5MF_xfree(f, type, addr2, (hsize_t)TBLOCK_SIZE50);
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get the size of the file */
if ((new_file_size = h5_get_file_size(filename, fapl_new)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Verify the file is the correct size */
if (new_file_size != file_size)
- TEST_ERROR
+ TEST_ERROR;
if (H5Pclose(fapl_new) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
PASSED();
} /* end if */
@@ -386,19 +386,19 @@ test_mf_eoa_shrink(const char *env_h5_drvr, hid_t fapl)
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
if ((fapl_new = H5Pcopy(fapl)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* 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 the file */
if ((file_size = h5_get_file_size(filename, fapl)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Turn off using meta/small data aggregator */
H5Pset_meta_block_size(fapl_new, (hsize_t)0);
@@ -406,11 +406,11 @@ test_mf_eoa_shrink(const char *env_h5_drvr, hid_t fapl)
/* Re-open the file with meta/small data setting */
if ((file = H5Fopen(filename, H5F_ACC_RDWR, fapl_new)) < 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;
H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
@@ -418,57 +418,57 @@ test_mf_eoa_shrink(const char *env_h5_drvr, hid_t fapl)
addr = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE30);
if (addr < (haddr_t)file_size)
- TEST_ERROR
+ TEST_ERROR;
/* nothing should be changed in meta_aggr */
H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size);
if (new_ma_addr != ma_addr)
- TEST_ERROR
+ TEST_ERROR;
if (new_ma_size != ma_size)
- TEST_ERROR
+ TEST_ERROR;
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get the size of the file */
if ((new_file_size = h5_get_file_size(filename, fapl_new)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Verify the file is the correct size */
if (new_file_size != (file_size + TBLOCK_SIZE30))
- TEST_ERROR
+ TEST_ERROR;
/* Re-open the file */
if ((file = H5Fopen(filename, H5F_ACC_RDWR, fapl_new)) < 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;
H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
/* should succeed */
if (H5MF_try_shrink(f, type, addr, (hsize_t)TBLOCK_SIZE30) <= 0)
- TEST_ERROR
+ TEST_ERROR;
/* nothing should be changed in meta_aggr */
H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &ma_size);
if (new_ma_addr != ma_addr)
- TEST_ERROR
+ TEST_ERROR;
if (new_ma_size != ma_size)
- TEST_ERROR
+ TEST_ERROR;
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get the size of the file */
if ((new_file_size = h5_get_file_size(filename, fapl_new)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Verify the file is the correct size */
if (new_file_size != file_size)
- TEST_ERROR
+ TEST_ERROR;
PASSED();
} /* end if */
@@ -485,40 +485,40 @@ test_mf_eoa_shrink(const char *env_h5_drvr, hid_t fapl)
if (suitable_vfd) {
/* Re-open the file with meta/small data setting */
if ((file = H5Fopen(filename, H5F_ACC_RDWR, fapl_new)) < 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;
H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
addr = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE30);
if (addr < (haddr_t)file_size)
- TEST_ERROR
+ TEST_ERROR;
/* should not succeed in shrinking */
if (H5MF_try_shrink(f, type, addr, (hsize_t)TBLOCK_SIZE30 - 10) > 0)
- TEST_ERROR
+ TEST_ERROR;
/* nothing should be changed in meta_aggr */
H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &ma_size);
if (new_ma_addr != ma_addr)
- TEST_ERROR
+ TEST_ERROR;
if (new_ma_size != ma_size)
- TEST_ERROR
+ TEST_ERROR;
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get the size of the file */
if ((new_file_size = h5_get_file_size(filename, fapl_new)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Verify the file is the correct size */
if (new_file_size != (file_size + TBLOCK_SIZE30))
- TEST_ERROR
+ TEST_ERROR;
PASSED();
} /* end if */
@@ -535,35 +535,35 @@ test_mf_eoa_shrink(const char *env_h5_drvr, hid_t fapl)
if (suitable_vfd) {
/* Re-open the file with meta/small data setting */
if ((file = H5Fopen(filename, H5F_ACC_RDWR, fapl_new)) < 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;
H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
/* should not succeed in shrinking */
if (H5MF_try_shrink(f, type, addr, (hsize_t)TBLOCK_SIZE30 + 10) > 0)
- TEST_ERROR
+ TEST_ERROR;
/* nothing should be changed in meta_aggr */
H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &ma_size);
if (new_ma_addr != ma_addr)
- TEST_ERROR
+ TEST_ERROR;
if (new_ma_size != ma_size)
- TEST_ERROR
+ TEST_ERROR;
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get the size of the file */
if ((new_file_size = h5_get_file_size(filename, fapl_new)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Verify the file is the correct size */
if (new_file_size != (file_size + TBLOCK_SIZE30))
- TEST_ERROR
+ TEST_ERROR;
PASSED();
} /* end if */
@@ -580,38 +580,38 @@ test_mf_eoa_shrink(const char *env_h5_drvr, hid_t fapl)
if (suitable_vfd) {
/* Re-open the file with meta/small data setting */
if ((file = H5Fopen(filename, H5F_ACC_RDWR, fapl_new)) < 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;
H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
/* should succeed in shrinking */
if (H5MF_try_shrink(f, type, addr + 10, (hsize_t)(TBLOCK_SIZE30 - 10)) <= 0)
- TEST_ERROR
+ TEST_ERROR;
/* nothing should be changed in meta_aggr */
H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &ma_size);
if (new_ma_addr != ma_addr)
- TEST_ERROR
+ TEST_ERROR;
if (new_ma_size != ma_size)
- TEST_ERROR
+ TEST_ERROR;
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get the size of the file */
if ((new_file_size = h5_get_file_size(filename, fapl_new)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Verify the file is the correct size */
if (new_file_size != (file_size + 10))
- TEST_ERROR
+ TEST_ERROR;
if (H5Pclose(fapl_new) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
PASSED();
} /* end if */
@@ -674,87 +674,87 @@ test_mf_eoa_extend(const char *env_h5_drvr, hid_t fapl)
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
if ((fapl_new = H5Pcopy(fapl)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* 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 */
if ((file_size = h5_get_file_size(filename, fapl)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Turn off using meta/small data aggregator */
if (H5Pset_meta_block_size(fapl_new, (hsize_t)0) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Pset_small_data_block_size(fapl_new, (hsize_t)0) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Re-open the file with meta/small data setting */
if ((file = H5Fopen(filename, H5F_ACC_RDWR, fapl_new)) < 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;
H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
type = H5FD_MEM_SUPER;
addr = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE30);
if (addr < (haddr_t)file_size)
- TEST_ERROR
+ TEST_ERROR;
/* nothing should be changed in meta_aggr */
H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size);
if (new_ma_addr != ma_addr)
- TEST_ERROR
+ TEST_ERROR;
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get the size of the file */
if ((new_file_size = h5_get_file_size(filename, fapl_new)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Verify the file is the correct size */
if (new_file_size != (file_size + TBLOCK_SIZE30))
- TEST_ERROR
+ TEST_ERROR;
/* Re-open the file */
if ((file = H5Fopen(filename, H5F_ACC_RDWR, fapl_new)) < 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;
/* should succeed */
was_extended =
H5MF_try_extend(f, type, (haddr_t)addr, (hsize_t)TBLOCK_SIZE30, (hsize_t)TBLOCK_SIZE50);
if (was_extended <= 0)
- TEST_ERROR
+ TEST_ERROR;
/* nothing should be changed in meta_aggr */
H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size);
if (new_ma_addr != ma_addr)
- TEST_ERROR
+ TEST_ERROR;
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get the size of the file */
if ((new_file_size = h5_get_file_size(filename, fapl_new)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Verify the file is the correct size */
if (new_file_size != (file_size + TBLOCK_SIZE30 + TBLOCK_SIZE50))
- TEST_ERROR
+ TEST_ERROR;
PASSED();
} /* end if */
@@ -771,15 +771,15 @@ test_mf_eoa_extend(const char *env_h5_drvr, hid_t fapl)
if (suitable_vfd) {
/* Re-open the file with meta/small data setting */
if ((file = H5Fopen(filename, H5F_ACC_RDWR, fapl_new)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get the size of the file */
if ((file_size = h5_get_file_size(filename, fapl_new)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Get a pointer to the internal file object */
if (NULL == (f = (H5F_t *)H5VL_object(file)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
@@ -787,38 +787,38 @@ test_mf_eoa_extend(const char *env_h5_drvr, hid_t fapl)
addr = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE30);
if (addr < (haddr_t)file_size)
- TEST_ERROR
+ TEST_ERROR;
/* nothing should be changed in meta_aggr */
H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size);
if (new_ma_addr != ma_addr)
- TEST_ERROR
+ TEST_ERROR;
was_extended =
H5MF_try_extend(f, type, (haddr_t)addr, (hsize_t)(TBLOCK_SIZE30 - 10), (hsize_t)(TBLOCK_SIZE50));
/* should not succeed */
if (was_extended > 0)
- TEST_ERROR
+ TEST_ERROR;
/* nothing should be changed in meta_aggr */
H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size);
if (new_ma_addr != ma_addr)
- TEST_ERROR
+ TEST_ERROR;
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get the size of the file */
if ((new_file_size = h5_get_file_size(filename, fapl_new)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Verify the file is the correct size */
if (new_file_size != file_size + TBLOCK_SIZE30)
- TEST_ERROR
+ TEST_ERROR;
if (H5Pclose(fapl_new) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
PASSED();
} /* end if */
@@ -870,9 +870,9 @@ test_mf_tmp(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
hid_t fcpl = -1; /* File creation property list */
if (new_format)
- TESTING("'temporary' file space allocation with new library format")
+ TESTING("'temporary' file space allocation with new library format");
else
- TESTING("'temporary' file space allocation with old library format")
+ TESTING("'temporary' file space allocation with old library format");
/* Can't run this test with multi-file VFDs */
if (HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0 &&
@@ -891,53 +891,53 @@ test_mf_tmp(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (new_format) {
/* Copy the file access property list */
if ((fapl2 = H5Pcopy(fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Set the "use the latest version of the format" bounds for creating objects in the file */
if (H5Pset_libver_bounds(fapl2, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, FALSE, (hsize_t)1);
} /* end if */
/* Create the file to work on */
if ((file = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, new_format ? fapl2 : fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close 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;
/* 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;
/* Retrieve the file's maxaddr */
if (H5F__get_maxaddr_test(file, &maxaddr) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Allocate some temporary address space */
if (HADDR_UNDEF == (tmp_addr = H5MF_alloc_tmp(f, (hsize_t)TBLOCK_SIZE30)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Check if temporary file address is valid */
if (!H5F_IS_TMP_ADDR(f, tmp_addr))
- TEST_ERROR
+ TEST_ERROR;
if (tmp_addr < (haddr_t)(maxaddr - TBLOCK_SIZE30))
- TEST_ERROR
+ TEST_ERROR;
/* Reading & writing with a temporary address value should fail */
H5E_BEGIN_TRY
@@ -946,14 +946,14 @@ test_mf_tmp(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
}
H5E_END_TRY;
if (status >= 0)
- TEST_ERROR
+ TEST_ERROR;
H5E_BEGIN_TRY
{
status = H5F_block_write(f, H5FD_MEM_SUPER, tmp_addr, sizeof(buf), &buf);
}
H5E_END_TRY;
if (status >= 0)
- TEST_ERROR
+ TEST_ERROR;
/* Freeing a temporary address value should fail */
H5E_BEGIN_TRY
@@ -962,39 +962,39 @@ test_mf_tmp(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
}
H5E_END_TRY;
if (status >= 0)
- TEST_ERROR
+ TEST_ERROR;
/* Close the file */
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get the size of the file */
if ((new_file_size = h5_get_file_size(filename, fapl)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Verify the file is the correct size */
if (new_file_size != file_size)
- 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;
/* Allocate 1/3 of the file as temporary address space */
if (HADDR_UNDEF == (tmp_addr = H5MF_alloc_tmp(f, (hsize_t)(maxaddr / 3))))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (!H5F_IS_TMP_ADDR(f, tmp_addr))
- TEST_ERROR
+ TEST_ERROR;
/* Allocate 1/3 of the file as normal address space */
if (HADDR_UNDEF == (norm_addr = H5MF_alloc(f, H5FD_MEM_DRAW, (hsize_t)(maxaddr / 3))))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5F_IS_TMP_ADDR(f, norm_addr))
- TEST_ERROR
+ TEST_ERROR;
/* Test that pushing temporary space allocation into normal space fails */
H5E_BEGIN_TRY
@@ -1003,7 +1003,7 @@ test_mf_tmp(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
}
H5E_END_TRY;
if (H5F_addr_defined(check_addr))
- TEST_ERROR
+ TEST_ERROR;
/* Test that pushing normal space allocation into temporary space fails */
H5E_BEGIN_TRY
@@ -1012,23 +1012,23 @@ test_mf_tmp(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
}
H5E_END_TRY;
if (H5F_addr_defined(check_addr))
- TEST_ERROR
+ TEST_ERROR;
/* Free the normal block (so the file doesn't blow up to a huge size) */
if (H5MF_xfree(f, H5FD_MEM_DRAW, norm_addr, (hsize_t)(maxaddr / 3)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close the file */
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get the size of the file */
if ((new_file_size = h5_get_file_size(filename, fapl)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Verify the file is the correct size */
if (new_file_size != file_size)
- TEST_ERROR
+ TEST_ERROR;
PASSED();
} /* end if */
@@ -1072,19 +1072,19 @@ test_mf_fs_start(hid_t fapl)
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
if ((fapl_new = H5Pcopy(fapl)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* 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 the file */
if ((file_size = h5_get_file_size(filename, fapl)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Turn off using meta/small data aggregator */
H5Pset_meta_block_size(fapl_new, (hsize_t)0);
@@ -1092,39 +1092,39 @@ test_mf_fs_start(hid_t fapl)
/* Re-open the file with meta/small data setting */
if ((file = H5Fopen(filename, H5F_ACC_RDWR, fapl_new)) < 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;
/* Start up H5FD_MEM_SUPER free-space manager */
if (H5MF__start_fstype(f, (H5F_mem_page_t)H5FD_MEM_SUPER) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (f->shared->fs_state[H5FD_MEM_SUPER] != H5F_FS_STATE_OPEN)
- TEST_ERROR
+ TEST_ERROR;
if (f->shared->fs_man[H5FD_MEM_SUPER]->client != H5FS_CLIENT_FILE_ID)
- TEST_ERROR
+ TEST_ERROR;
HDmemset(&state, 0, sizeof(H5FS_stat_t));
if (check_stats(f, f->shared->fs_man[H5FD_MEM_SUPER], &state))
- TEST_ERROR
+ TEST_ERROR;
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get the size of the file */
if ((new_file_size = h5_get_file_size(filename, fapl_new)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Verify the file is the correct size */
if (new_file_size != file_size)
- TEST_ERROR
+ TEST_ERROR;
if (H5Pclose(fapl_new) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
PASSED();
@@ -1186,19 +1186,19 @@ test_mf_fs_alloc_free(hid_t fapl)
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
if ((fapl_new = H5Pcopy(fapl)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* 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 */
if ((file_size = h5_get_file_size(filename, fapl)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Turn off using meta/small data aggregator */
H5Pset_meta_block_size(fapl_new, (hsize_t)0);
@@ -1206,27 +1206,27 @@ test_mf_fs_alloc_free(hid_t fapl)
/* Re-open the file with meta/small data setting */
if ((file = H5Fopen(filename, H5F_ACC_RDWR, fapl_new)) < 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;
/* Start up H5FD_MEM_SUPER free-space manager */
if (H5MF__start_fstype(f, (H5F_mem_page_t)H5FD_MEM_SUPER) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (f->shared->fs_state[H5FD_MEM_SUPER] != H5F_FS_STATE_OPEN)
- TEST_ERROR
+ TEST_ERROR;
if (f->shared->fs_man[H5FD_MEM_SUPER]->client != H5FS_CLIENT_FILE_ID)
- TEST_ERROR
+ TEST_ERROR;
/* Create section A */
sect_node = H5MF__sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR70, (hsize_t)TBLOCK_SIZE30);
/* Add section A to free-space manager */
if (H5MF__add_sect(f, H5FD_MEM_SUPER, f->shared->fs_man[H5FD_MEM_SUPER], sect_node))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
HDmemset(&state, 0, sizeof(H5FS_stat_t));
state.tot_space += TBLOCK_SIZE30;
@@ -1234,21 +1234,21 @@ test_mf_fs_alloc_free(hid_t fapl)
state.serial_sect_count += 1;
if (check_stats(f, f->shared->fs_man[H5FD_MEM_SUPER], &state))
- TEST_ERROR
+ TEST_ERROR;
/* Allocate a block of 30 */
addr = H5MF_alloc(f, H5FD_MEM_SUPER, (hsize_t)TBLOCK_SIZE30);
/* Verify that the allocated block is section A in free-space */
if (addr != TBLOCK_ADDR70)
- TEST_ERROR
+ TEST_ERROR;
state.tot_space -= TBLOCK_SIZE30;
state.tot_sect_count -= 1;
state.serial_sect_count -= 1;
if (check_stats(f, f->shared->fs_man[H5FD_MEM_SUPER], &state))
- TEST_ERROR
+ TEST_ERROR;
/* Free the block to free-space */
H5MF_xfree(f, H5FD_MEM_SUPER, addr, (hsize_t)TBLOCK_SIZE30);
@@ -1257,26 +1257,26 @@ test_mf_fs_alloc_free(hid_t fapl)
state.tot_sect_count += 1;
state.serial_sect_count += 1;
if (check_stats(f, f->shared->fs_man[H5FD_MEM_SUPER], &state))
- TEST_ERROR
+ TEST_ERROR;
/* Remove section A from free-space */
if (H5MF__find_sect(f, H5FD_MEM_SUPER, (hsize_t)TBLOCK_SIZE30, f->shared->fs_man[H5FD_MEM_SUPER], &tmp) !=
TRUE)
- TEST_ERROR
+ TEST_ERROR;
if (tmp != TBLOCK_ADDR70)
- TEST_ERROR
+ TEST_ERROR;
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get the size of the file */
if ((new_file_size = h5_get_file_size(filename, fapl_new)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Verify the file is the correct size */
if (new_file_size != file_size)
- TEST_ERROR
+ TEST_ERROR;
PASSED();
@@ -1284,27 +1284,27 @@ test_mf_fs_alloc_free(hid_t fapl)
/* Re-open the file with meta/small data setting */
if ((file = H5Fopen(filename, H5F_ACC_RDWR, fapl_new)) < 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;
/* Start up H5FD_MEM_SUPER free-space manager */
if (H5MF__start_fstype(f, (H5F_mem_page_t)H5FD_MEM_SUPER) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (f->shared->fs_state[H5FD_MEM_SUPER] != H5F_FS_STATE_OPEN)
- TEST_ERROR
+ TEST_ERROR;
if (f->shared->fs_man[H5FD_MEM_SUPER]->client != H5FS_CLIENT_FILE_ID)
- TEST_ERROR
+ TEST_ERROR;
/* Create section A */
sect_node = H5MF__sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR70, (hsize_t)TBLOCK_SIZE30);
/* Add section A to free-space manager */
if (H5MF__add_sect(f, H5FD_MEM_SUPER, f->shared->fs_man[H5FD_MEM_SUPER], sect_node))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
HDmemset(&state, 0, sizeof(H5FS_stat_t));
state.tot_space += TBLOCK_SIZE30;
@@ -1312,20 +1312,20 @@ test_mf_fs_alloc_free(hid_t fapl)
state.serial_sect_count += 1;
if (check_stats(f, f->shared->fs_man[H5FD_MEM_SUPER], &state))
- TEST_ERROR
+ TEST_ERROR;
/* Allocate a block of 20 */
addr = H5MF_alloc(f, H5FD_MEM_SUPER, (hsize_t)(TBLOCK_SIZE20));
/* Verify that the allocated block is section A in free-space manager */
if (addr != TBLOCK_ADDR70)
- TEST_ERROR
+ TEST_ERROR;
/* should still have 1 section of size 10 left in free-space manager */
state.tot_space -= (TBLOCK_SIZE20);
if (check_stats(f, f->shared->fs_man[H5FD_MEM_SUPER], &state))
- TEST_ERROR
+ TEST_ERROR;
/* Free the block to free-space manager */
H5MF_xfree(f, H5FD_MEM_SUPER, addr, (hsize_t)(TBLOCK_SIZE20));
@@ -1333,26 +1333,26 @@ test_mf_fs_alloc_free(hid_t fapl)
/* Still 1 section in free-space because of merging */
state.tot_space += TBLOCK_SIZE20;
if (check_stats(f, f->shared->fs_man[H5FD_MEM_SUPER], &state))
- TEST_ERROR
+ TEST_ERROR;
/* Remove section A from free-space */
if (H5MF__find_sect(f, H5FD_MEM_SUPER, (hsize_t)TBLOCK_SIZE30, f->shared->fs_man[H5FD_MEM_SUPER], &tmp) !=
TRUE)
- TEST_ERROR
+ TEST_ERROR;
if (tmp != TBLOCK_ADDR70)
- TEST_ERROR
+ TEST_ERROR;
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get the size of the file */
if ((new_file_size = h5_get_file_size(filename, fapl_new)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Verify the file is the correct size */
if (new_file_size != file_size)
- TEST_ERROR
+ TEST_ERROR;
PASSED();
@@ -1360,27 +1360,27 @@ test_mf_fs_alloc_free(hid_t fapl)
/* Re-open the file with meta/small data setting */
if ((file = H5Fopen(filename, H5F_ACC_RDWR, fapl_new)) < 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;
/* Start up H5FD_MEM_SUPER free-space manager */
if (H5MF__start_fstype(f, (H5F_mem_page_t)H5FD_MEM_SUPER) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (f->shared->fs_state[H5FD_MEM_SUPER] != H5F_FS_STATE_OPEN)
- TEST_ERROR
+ TEST_ERROR;
if (f->shared->fs_man[H5FD_MEM_SUPER]->client != H5FS_CLIENT_FILE_ID)
- TEST_ERROR
+ TEST_ERROR;
/* Create section A */
sect_node = H5MF__sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR70, (hsize_t)TBLOCK_SIZE30);
/* Add section A to free-space manager */
if (H5MF__add_sect(f, H5FD_MEM_SUPER, f->shared->fs_man[H5FD_MEM_SUPER], sect_node))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
HDmemset(&state, 0, sizeof(H5FS_stat_t));
state.tot_space += TBLOCK_SIZE30;
@@ -1388,7 +1388,7 @@ test_mf_fs_alloc_free(hid_t fapl)
state.serial_sect_count += 1;
if (check_stats(f, f->shared->fs_man[H5FD_MEM_SUPER], &state))
- TEST_ERROR
+ TEST_ERROR;
/*
* Allocate a block of 40.
@@ -1399,24 +1399,24 @@ test_mf_fs_alloc_free(hid_t fapl)
/* Verify that the allocated block is not section A in free-space */
if (addr == TBLOCK_ADDR70)
- TEST_ERROR
+ TEST_ERROR;
/* free-space info should be the same */
if (check_stats(f, f->shared->fs_man[H5FD_MEM_SUPER], &state))
- TEST_ERROR
+ TEST_ERROR;
/* Remove section A from free-space */
if (H5MF__find_sect(f, H5FD_MEM_SUPER, (hsize_t)TBLOCK_SIZE30, f->shared->fs_man[H5FD_MEM_SUPER], &tmp) !=
TRUE)
- TEST_ERROR
+ TEST_ERROR;
/* Verify that the block is section A in free-space */
if (tmp != TBLOCK_ADDR70)
- TEST_ERROR
+ TEST_ERROR;
HDmemset(&state, 0, sizeof(H5FS_stat_t));
if (check_stats(f, f->shared->fs_man[H5FD_MEM_SUPER], &state))
- TEST_ERROR
+ TEST_ERROR;
/* Free the block of size 40 to free-space */
H5MF_xfree(f, H5FD_MEM_SUPER, addr, (hsize_t)(TBLOCK_SIZE40));
@@ -1427,21 +1427,21 @@ test_mf_fs_alloc_free(hid_t fapl)
* It is shrunk and freed because it is at end of file.
*/
if (check_stats(f, f->shared->fs_man[H5FD_MEM_SUPER], &state))
- TEST_ERROR
+ TEST_ERROR;
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get the size of the file */
if ((new_file_size = h5_get_file_size(filename, fapl_new)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Verify the file is the correct size */
if (new_file_size != file_size)
- TEST_ERROR
+ TEST_ERROR;
if (H5Pclose(fapl_new) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
PASSED();
@@ -1516,19 +1516,19 @@ test_mf_fs_extend(hid_t fapl)
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
if ((fapl_new = H5Pcopy(fapl)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* 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 */
if ((file_size = h5_get_file_size(filename, fapl)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Turn off using meta/small data aggregator */
H5Pset_meta_block_size(fapl_new, (hsize_t)0);
@@ -1536,27 +1536,27 @@ test_mf_fs_extend(hid_t fapl)
/* Re-open the file with meta/small data setting */
if ((file = H5Fopen(filename, H5F_ACC_RDWR, fapl_new)) < 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;
/* Start up H5FD_MEM_SUPER free-space manager */
if (H5MF__start_fstype(f, (H5F_mem_page_t)H5FD_MEM_SUPER) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (f->shared->fs_state[H5FD_MEM_SUPER] != H5F_FS_STATE_OPEN)
- TEST_ERROR
+ TEST_ERROR;
if (f->shared->fs_man[H5FD_MEM_SUPER]->client != H5FS_CLIENT_FILE_ID)
- TEST_ERROR
+ TEST_ERROR;
/* Create section A */
sect_node1 = H5MF__sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR70, (hsize_t)TBLOCK_SIZE30);
/* Add section A to free-space manager */
if (H5MF__add_sect(f, H5FD_MEM_SUPER, f->shared->fs_man[H5FD_MEM_SUPER], sect_node1))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
HDmemset(&state, 0, sizeof(H5FS_stat_t));
state.tot_space += TBLOCK_SIZE30;
@@ -1564,35 +1564,35 @@ test_mf_fs_extend(hid_t fapl)
state.serial_sect_count += 1;
if (check_stats(f, f->shared->fs_man[H5FD_MEM_SUPER], &state))
- TEST_ERROR
+ TEST_ERROR;
/* Allocate a block of 30 */
addr = H5MF_alloc(f, H5FD_MEM_SUPER, (hsize_t)TBLOCK_SIZE30);
/* Verify that the allocated block is section A in free-space manager */
if (addr != TBLOCK_ADDR70)
- TEST_ERROR
+ TEST_ERROR;
state.tot_space -= TBLOCK_SIZE30;
state.tot_sect_count -= 1;
state.serial_sect_count -= 1;
if (check_stats(f, f->shared->fs_man[H5FD_MEM_SUPER], &state))
- TEST_ERROR
+ TEST_ERROR;
/* Create section B */
sect_node2 = H5MF__sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR100, (hsize_t)TBLOCK_SIZE50);
/* Add section B to free-space manager */
if (H5MF__add_sect(f, H5FD_MEM_SUPER, f->shared->fs_man[H5FD_MEM_SUPER], sect_node2))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
state.tot_space += TBLOCK_SIZE50;
state.tot_sect_count += 1;
state.serial_sect_count += 1;
if (check_stats(f, f->shared->fs_man[H5FD_MEM_SUPER], &state))
- TEST_ERROR
+ TEST_ERROR;
/* Try to extend the allocated block */
was_extended = H5MF_try_extend(f, H5FD_MEM_SUPER, (haddr_t)TBLOCK_ADDR70, (hsize_t)TBLOCK_SIZE30,
@@ -1600,7 +1600,7 @@ test_mf_fs_extend(hid_t fapl)
/* should succeed */
if (was_extended <= 0)
- TEST_ERROR
+ TEST_ERROR;
/* Section B is removed from free-space manager */
state.tot_space -= TBLOCK_SIZE50;
@@ -1608,7 +1608,7 @@ test_mf_fs_extend(hid_t fapl)
state.serial_sect_count -= 1;
if (check_stats(f, f->shared->fs_man[H5FD_MEM_SUPER], &state))
- TEST_ERROR
+ TEST_ERROR;
/* Free the extended block to free-space manager */
H5MF_xfree(f, H5FD_MEM_SUPER, addr, (hsize_t)(TBLOCK_SIZE30 + TBLOCK_SIZE50));
@@ -1619,26 +1619,26 @@ test_mf_fs_extend(hid_t fapl)
state.serial_sect_count = 1;
if (check_stats(f, f->shared->fs_man[H5FD_MEM_SUPER], &state))
- TEST_ERROR
+ TEST_ERROR;
/* Remove the extended block */
if (H5MF__find_sect(f, H5FD_MEM_SUPER, (hsize_t)(TBLOCK_SIZE30 + TBLOCK_SIZE50),
f->shared->fs_man[H5FD_MEM_SUPER], &tmp) != TRUE)
- TEST_ERROR
+ TEST_ERROR;
if (tmp != TBLOCK_ADDR70)
- TEST_ERROR
+ TEST_ERROR;
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get the size of the file */
if ((new_file_size = h5_get_file_size(filename, fapl_new)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Verify the file is the correct size */
if (new_file_size != file_size)
- TEST_ERROR
+ TEST_ERROR;
PASSED();
@@ -1646,27 +1646,27 @@ test_mf_fs_extend(hid_t fapl)
/* Re-open the file with meta/small data setting */
if ((file = H5Fopen(filename, H5F_ACC_RDWR, fapl_new)) < 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;
/* Start up H5FD_MEM_SUPER free-space manager */
if (H5MF__start_fstype(f, (H5F_mem_page_t)H5FD_MEM_SUPER) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (f->shared->fs_state[H5FD_MEM_SUPER] != H5F_FS_STATE_OPEN)
- TEST_ERROR
+ TEST_ERROR;
if (f->shared->fs_man[H5FD_MEM_SUPER]->client != H5FS_CLIENT_FILE_ID)
- TEST_ERROR
+ TEST_ERROR;
/* Create section A */
sect_node1 = H5MF__sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR70, (hsize_t)TBLOCK_SIZE30);
/* Add section A to free-space manager */
if (H5MF__add_sect(f, H5FD_MEM_SUPER, f->shared->fs_man[H5FD_MEM_SUPER], sect_node1))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
HDmemset(&state, 0, sizeof(H5FS_stat_t));
state.tot_space += TBLOCK_SIZE30;
@@ -1674,35 +1674,35 @@ test_mf_fs_extend(hid_t fapl)
state.serial_sect_count += 1;
if (check_stats(f, f->shared->fs_man[H5FD_MEM_SUPER], &state))
- TEST_ERROR
+ TEST_ERROR;
/* Allocate a block of 30 */
addr = H5MF_alloc(f, H5FD_MEM_SUPER, (hsize_t)TBLOCK_SIZE30);
/* Verify that the allocated block is section A in free-space manager */
if (addr != TBLOCK_ADDR70)
- TEST_ERROR
+ TEST_ERROR;
state.tot_space -= TBLOCK_SIZE30;
state.tot_sect_count -= 1;
state.serial_sect_count -= 1;
if (check_stats(f, f->shared->fs_man[H5FD_MEM_SUPER], &state))
- TEST_ERROR
+ TEST_ERROR;
/* Create section B */
sect_node2 = H5MF__sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR100, (hsize_t)TBLOCK_SIZE50);
/* Add section B to free-space manager */
if (H5MF__add_sect(f, H5FD_MEM_SUPER, f->shared->fs_man[H5FD_MEM_SUPER], sect_node2))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
state.tot_space += TBLOCK_SIZE50;
state.tot_sect_count += 1;
state.serial_sect_count += 1;
if (check_stats(f, f->shared->fs_man[H5FD_MEM_SUPER], &state))
- TEST_ERROR
+ TEST_ERROR;
/* Try to extend the allocated block */
was_extended = H5MF_try_extend(f, H5FD_MEM_SUPER, (haddr_t)TBLOCK_ADDR70, (hsize_t)TBLOCK_SIZE30,
@@ -1710,11 +1710,11 @@ test_mf_fs_extend(hid_t fapl)
/* Should not be able to extend the allocated block */
if (was_extended)
- TEST_ERROR
+ TEST_ERROR;
/* free-space info should remain the same */
if (check_stats(f, f->shared->fs_man[H5FD_MEM_SUPER], &state))
- TEST_ERROR
+ TEST_ERROR;
/* Free the allocated block A to free-space */
H5MF_xfree(f, H5FD_MEM_SUPER, addr, (hsize_t)TBLOCK_SIZE30);
@@ -1724,26 +1724,26 @@ test_mf_fs_extend(hid_t fapl)
state.tot_space += TBLOCK_SIZE30;
if (check_stats(f, f->shared->fs_man[H5FD_MEM_SUPER], &state))
- TEST_ERROR
+ TEST_ERROR;
/* Remove the merged sections A & B from free-space */
if (H5MF__find_sect(f, H5FD_MEM_SUPER, (hsize_t)(TBLOCK_SIZE30 + TBLOCK_SIZE50),
f->shared->fs_man[H5FD_MEM_SUPER], &tmp) != TRUE)
- TEST_ERROR
+ TEST_ERROR;
if (tmp != addr)
- TEST_ERROR
+ TEST_ERROR;
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get the size of the file */
if ((new_file_size = h5_get_file_size(filename, fapl_new)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Verify the file is the correct size */
if (new_file_size != file_size)
- TEST_ERROR
+ TEST_ERROR;
PASSED();
@@ -1751,27 +1751,27 @@ test_mf_fs_extend(hid_t fapl)
/* Re-open the file with meta/small data setting */
if ((file = H5Fopen(filename, H5F_ACC_RDWR, fapl_new)) < 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;
/* Start up H5FD_MEM_SUPER free-space manager */
if (H5MF__start_fstype(f, (H5F_mem_page_t)H5FD_MEM_SUPER) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (f->shared->fs_state[H5FD_MEM_SUPER] != H5F_FS_STATE_OPEN)
- TEST_ERROR
+ TEST_ERROR;
if (f->shared->fs_man[H5FD_MEM_SUPER]->client != H5FS_CLIENT_FILE_ID)
- TEST_ERROR
+ TEST_ERROR;
/* Create section A */
sect_node1 = H5MF__sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR70, (hsize_t)TBLOCK_SIZE30);
/* Add section A to free-space manager */
if (H5MF__add_sect(f, H5FD_MEM_SUPER, f->shared->fs_man[H5FD_MEM_SUPER], sect_node1))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
HDmemset(&state, 0, sizeof(H5FS_stat_t));
state.tot_space += TBLOCK_SIZE30;
@@ -1779,35 +1779,35 @@ test_mf_fs_extend(hid_t fapl)
state.serial_sect_count += 1;
if (check_stats(f, f->shared->fs_man[H5FD_MEM_SUPER], &state))
- TEST_ERROR
+ TEST_ERROR;
/* Allocate a block of 30 */
addr = H5MF_alloc(f, H5FD_MEM_SUPER, (hsize_t)TBLOCK_SIZE30);
/* Verify that the allocated block is section A in free-space manager */
if (addr != TBLOCK_ADDR70)
- TEST_ERROR
+ TEST_ERROR;
state.tot_space -= TBLOCK_SIZE30;
state.tot_sect_count -= 1;
state.serial_sect_count -= 1;
if (check_stats(f, f->shared->fs_man[H5FD_MEM_SUPER], &state))
- TEST_ERROR
+ TEST_ERROR;
/* Create section B */
sect_node2 = H5MF__sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR100, (hsize_t)TBLOCK_SIZE50);
/* Add section B to free-space manager */
if (H5MF__add_sect(f, H5FD_MEM_SUPER, f->shared->fs_man[H5FD_MEM_SUPER], sect_node2))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
state.tot_space += TBLOCK_SIZE50;
state.tot_sect_count += 1;
state.serial_sect_count += 1;
if (check_stats(f, f->shared->fs_man[H5FD_MEM_SUPER], &state))
- TEST_ERROR
+ TEST_ERROR;
/* Try to extend the allocated block */
was_extended = H5MF_try_extend(f, H5FD_MEM_SUPER, (haddr_t)TBLOCK_ADDR70, (hsize_t)TBLOCK_SIZE30,
@@ -1815,12 +1815,12 @@ test_mf_fs_extend(hid_t fapl)
/* Should succeed in extending the allocated block */
if (was_extended <= 0)
- TEST_ERROR
+ TEST_ERROR;
/* Should have 1 section of size=10 left in free-space manager */
state.tot_space -= (TBLOCK_SIZE40);
if (check_stats(f, f->shared->fs_man[H5FD_MEM_SUPER], &state))
- TEST_ERROR
+ TEST_ERROR;
/* Free the extended block */
H5MF_xfree(f, H5FD_MEM_SUPER, addr, (hsize_t)(TBLOCK_SIZE30 + TBLOCK_SIZE40));
@@ -1829,26 +1829,26 @@ test_mf_fs_extend(hid_t fapl)
state.tot_space += (TBLOCK_SIZE30 + TBLOCK_SIZE40);
if (check_stats(f, f->shared->fs_man[H5FD_MEM_SUPER], &state))
- TEST_ERROR
+ TEST_ERROR;
/* Remove the merged sections A & B from free-space */
if (H5MF__find_sect(f, H5FD_MEM_SUPER, (hsize_t)(TBLOCK_SIZE30 + TBLOCK_SIZE50),
f->shared->fs_man[H5FD_MEM_SUPER], &tmp) != TRUE)
- TEST_ERROR
+ TEST_ERROR;
if (tmp != addr)
- TEST_ERROR
+ TEST_ERROR;
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get the size of the file */
if ((new_file_size = h5_get_file_size(filename, fapl_new)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Verify the file is the correct size */
if (new_file_size != file_size)
- TEST_ERROR
+ TEST_ERROR;
PASSED();
@@ -1856,20 +1856,20 @@ test_mf_fs_extend(hid_t fapl)
/* Re-open the file with meta/small data setting */
if ((file = H5Fopen(filename, H5F_ACC_RDWR, fapl_new)) < 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;
/* Start up H5FD_MEM_SUPER free-space manager */
if (H5MF__start_fstype(f, (H5F_mem_page_t)H5FD_MEM_SUPER) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (f->shared->fs_state[H5FD_MEM_SUPER] != H5F_FS_STATE_OPEN)
- TEST_ERROR
+ TEST_ERROR;
if (f->shared->fs_man[H5FD_MEM_SUPER]->client != H5FS_CLIENT_FILE_ID)
- TEST_ERROR
+ TEST_ERROR;
/* Create section A */
sect_node1 =
@@ -1877,7 +1877,7 @@ test_mf_fs_extend(hid_t fapl)
/* Add section A of size=20 to free-space */
if (H5MF__add_sect(f, H5FD_MEM_SUPER, f->shared->fs_man[H5FD_MEM_SUPER], sect_node1))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
HDmemset(&state, 0, sizeof(H5FS_stat_t));
state.tot_space += (TBLOCK_SIZE30 - 10);
@@ -1885,35 +1885,35 @@ test_mf_fs_extend(hid_t fapl)
state.serial_sect_count += 1;
if (check_stats(f, f->shared->fs_man[H5FD_MEM_SUPER], &state))
- TEST_ERROR
+ TEST_ERROR;
/* Allocate a block of size=20 */
addr = H5MF_alloc(f, H5FD_MEM_SUPER, (hsize_t)(TBLOCK_SIZE30 - 10));
/* Verify that the allocated block is section A in free-space manager */
if (addr != TBLOCK_ADDR70)
- TEST_ERROR
+ TEST_ERROR;
state.tot_space -= (TBLOCK_SIZE30 - 10);
state.tot_sect_count -= 1;
state.serial_sect_count -= 1;
if (check_stats(f, f->shared->fs_man[H5FD_MEM_SUPER], &state))
- TEST_ERROR
+ TEST_ERROR;
/* Create section B */
sect_node2 = H5MF__sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR100, (hsize_t)TBLOCK_SIZE50);
/* Add section B to free-space manager */
if (H5MF__add_sect(f, H5FD_MEM_SUPER, f->shared->fs_man[H5FD_MEM_SUPER], sect_node2))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
state.tot_space += TBLOCK_SIZE50;
state.tot_sect_count += 1;
state.serial_sect_count += 1;
if (check_stats(f, f->shared->fs_man[H5FD_MEM_SUPER], &state))
- TEST_ERROR
+ TEST_ERROR;
/* Try to extend the allocated block */
was_extended = H5MF_try_extend(f, H5FD_MEM_SUPER, (haddr_t)TBLOCK_ADDR70, (hsize_t)(TBLOCK_SIZE30 - 10),
@@ -1921,11 +1921,11 @@ test_mf_fs_extend(hid_t fapl)
/* Should not succeed in extending the allocated block */
if (was_extended)
- TEST_ERROR
+ TEST_ERROR;
/* Free-space info should be the same */
if (check_stats(f, f->shared->fs_man[H5FD_MEM_SUPER], &state))
- TEST_ERROR
+ TEST_ERROR;
/* Free the allocated block */
H5MF_xfree(f, H5FD_MEM_SUPER, addr, (hsize_t)(TBLOCK_SIZE30 - 10));
@@ -1935,34 +1935,34 @@ test_mf_fs_extend(hid_t fapl)
state.serial_sect_count += 1;
if (check_stats(f, f->shared->fs_man[H5FD_MEM_SUPER], &state))
- TEST_ERROR
+ TEST_ERROR;
/* Remove section A from free-space manager */
if (H5MF__find_sect(f, H5FD_MEM_SUPER, (hsize_t)(TBLOCK_SIZE30 - 10), f->shared->fs_man[H5FD_MEM_SUPER],
&tmp) != TRUE)
- TEST_ERROR
+ TEST_ERROR;
if (tmp != addr)
- TEST_ERROR
+ TEST_ERROR;
/* Remove section B from free-space manager */
if (H5MF__find_sect(f, H5FD_MEM_SUPER, (hsize_t)TBLOCK_SIZE50, f->shared->fs_man[H5FD_MEM_SUPER], &tmp) !=
TRUE)
- TEST_ERROR
+ TEST_ERROR;
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get the size of the file */
if ((new_file_size = h5_get_file_size(filename, fapl_new)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Verify the file is the correct size */
if (new_file_size != file_size)
- TEST_ERROR
+ TEST_ERROR;
if (H5Pclose(fapl_new) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
PASSED();
@@ -2027,28 +2027,28 @@ test_mf_fs_absorb(const char *env_h5_drvr, 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;
/* 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;
/* Start up H5FD_MEM_SUPER free-space manager */
if (H5MF__start_fstype(f, (H5F_mem_page_t)H5FD_MEM_SUPER) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (f->shared->fs_state[H5FD_MEM_SUPER] != H5F_FS_STATE_OPEN)
- TEST_ERROR
+ TEST_ERROR;
if (f->shared->fs_man[H5FD_MEM_SUPER]->client != H5FS_CLIENT_FILE_ID)
- TEST_ERROR
+ TEST_ERROR;
/* Allocate a section from meta_aggr */
addr = H5MF_alloc(f, H5FD_MEM_SUPER, (hsize_t)TBLOCK_SIZE30);
@@ -2061,15 +2061,15 @@ test_mf_fs_absorb(const char *env_h5_drvr, hid_t fapl)
/* Add a section to free-space that adjoins end of the aggregator */
if (H5MF__add_sect(f, H5FD_MEM_SUPER, f->shared->fs_man[H5FD_MEM_SUPER], sect_node))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Verify that the section did absorb the aggregator */
if (H5MF__find_sect(f, H5FD_MEM_SUPER, (hsize_t)(ma_addr + ma_size),
f->shared->fs_man[H5FD_MEM_SUPER], &tmp) != TRUE)
- TEST_ERROR
+ TEST_ERROR;
if (tmp != ma_addr)
- TEST_ERROR
+ TEST_ERROR;
/* Restore info for aggregator */
f->shared->meta_aggr.addr = ma_addr;
@@ -2079,7 +2079,7 @@ test_mf_fs_absorb(const char *env_h5_drvr, hid_t fapl)
H5MF_xfree(f, H5FD_MEM_SUPER, addr, (hsize_t)TBLOCK_SIZE30);
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
PASSED();
} /* end if */
@@ -2094,20 +2094,20 @@ test_mf_fs_absorb(const char *env_h5_drvr, hid_t fapl)
if (contig_addr_vfd) {
/* 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;
/* Start up H5FD_MEM_SUPER free-space manager */
if (H5MF__start_fstype(f, (H5F_mem_page_t)H5FD_MEM_SUPER) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (f->shared->fs_state[H5FD_MEM_SUPER] != H5F_FS_STATE_OPEN)
- TEST_ERROR
+ TEST_ERROR;
if (f->shared->fs_man[H5FD_MEM_SUPER]->client != H5FS_CLIENT_FILE_ID)
- TEST_ERROR
+ TEST_ERROR;
/* Allocate a section from meta_aggr */
addr = H5MF_alloc(f, H5FD_MEM_SUPER, (hsize_t)TBLOCK_SIZE30);
@@ -2121,15 +2121,15 @@ test_mf_fs_absorb(const char *env_h5_drvr, hid_t fapl)
/* When adding, meta_aggr is absorbed onto the end of the section */
if (H5MF__add_sect(f, H5FD_MEM_SUPER, f->shared->fs_man[H5FD_MEM_SUPER], sect_node))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Verify that the section did absorb the aggregator */
if (H5MF__find_sect(f, H5FD_MEM_SUPER, (hsize_t)(ma_size + TBLOCK_SIZE30),
f->shared->fs_man[H5FD_MEM_SUPER], &tmp) != TRUE)
- TEST_ERROR
+ TEST_ERROR;
if ((tmp + TBLOCK_SIZE30) != ma_addr)
- TEST_ERROR
+ TEST_ERROR;
/* restore info to meta_aggr */
f->shared->meta_aggr.addr = ma_addr;
@@ -2141,7 +2141,7 @@ test_mf_fs_absorb(const char *env_h5_drvr, hid_t fapl)
H5MF_xfree(f, H5FD_MEM_DRAW, saddr, (hsize_t)TBLOCK_SIZE50);
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
PASSED();
} /* end if */
@@ -2204,89 +2204,89 @@ test_mf_aggr_alloc1(const char *env_h5_drvr, hid_t fapl)
/* File creation property list template */
if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Set to H5F_FSPACE_STRATEGY_AGGR strategy */
if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_AGGR, FALSE, (hsize_t)1) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Create the file to work on */
if ((file = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close file */
if (H5Fclose(file) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Get the size of a file */
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)
- TEST_ERROR
+ TEST_ERROR;
/* Get a pointer to the internal file object */
if (NULL == (f = (H5F_t *)H5VL_object(file)))
- TEST_ERROR
+ TEST_ERROR;
/* Allocate first block from meta_aggr */
type = H5FD_MEM_SUPER;
if ((addr1 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE30)) == HADDR_UNDEF)
- TEST_ERROR
+ TEST_ERROR;
H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if ((addr1 + TBLOCK_SIZE30) != ma_addr)
- TEST_ERROR
+ TEST_ERROR;
/* Allocate second block from meta_aggr */
if ((addr2 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE50)) == HADDR_UNDEF)
- TEST_ERROR
+ TEST_ERROR;
H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if ((addr2 + TBLOCK_SIZE50) != ma_addr)
- TEST_ERROR
+ TEST_ERROR;
if (ma_size != (TBLOCK_SIZE2048 - (TBLOCK_SIZE30 + TBLOCK_SIZE50)))
- TEST_ERROR
+ TEST_ERROR;
if (H5Fclose(file) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Get the size of the file */
if ((new_file_size = h5_get_file_size(filename, fapl)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Verify the file is the correct size */
if (new_file_size != (file_size + TBLOCK_SIZE30 + TBLOCK_SIZE50))
- TEST_ERROR
+ TEST_ERROR;
/* Re-open the file */
if ((file = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Get a pointer to the internal file object */
if (NULL == (f = (H5F_t *)H5VL_object(file)))
- TEST_ERROR
+ TEST_ERROR;
/* Free the two blocks: order matters because of H5F_FSPACE_STRATEGY_AGGR strategy */
if (H5MF_xfree(f, type, addr2, (hsize_t)TBLOCK_SIZE50) < 0)
- TEST_ERROR
+ TEST_ERROR;
if (H5MF_xfree(f, type, addr1, (hsize_t)TBLOCK_SIZE30) < 0)
- TEST_ERROR
+ TEST_ERROR;
if (H5Fclose(file) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Get the size of the file */
if ((new_file_size = h5_get_file_size(filename, fapl)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Verify the file is the correct size */
if (new_file_size != file_size)
- TEST_ERROR
+ TEST_ERROR;
if (H5Pclose(fcpl) < 0)
- TEST_ERROR
+ TEST_ERROR;
PASSED();
} /* end if */
@@ -2356,82 +2356,82 @@ test_mf_aggr_alloc2(const char *env_h5_drvr, 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 */
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;
type = H5FD_MEM_SUPER;
addr1 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE30);
H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if ((addr1 + TBLOCK_SIZE30) != ma_addr)
- TEST_ERROR
+ TEST_ERROR;
addr2 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE50);
H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if ((addr2 + TBLOCK_SIZE50) != ma_addr)
- TEST_ERROR
+ TEST_ERROR;
if (ma_size != (TBLOCK_SIZE2048 - (TBLOCK_SIZE30 + TBLOCK_SIZE50)))
- TEST_ERROR
+ TEST_ERROR;
addr3 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE2058);
H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if ((addr3 + TBLOCK_SIZE2058) != ma_addr)
- TEST_ERROR
+ TEST_ERROR;
if (ma_size != (TBLOCK_SIZE2048 - (TBLOCK_SIZE30 + TBLOCK_SIZE50)))
- TEST_ERROR
+ TEST_ERROR;
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get the size of the file */
if ((new_file_size = h5_get_file_size(filename, fapl)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Verify the file is the correct size */
/* Unused space is freed from the end of the file */
if (new_file_size != (file_size + TBLOCK_SIZE30 + TBLOCK_SIZE50 + TBLOCK_SIZE2058))
- 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;
H5MF_xfree(f, type, addr1, (hsize_t)TBLOCK_SIZE30 + TBLOCK_SIZE50 + TBLOCK_SIZE2058);
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get the size of the file */
if ((new_file_size = h5_get_file_size(filename, fapl)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Verify the file is the correct size */
if (new_file_size != file_size)
- TEST_ERROR
+ TEST_ERROR;
PASSED();
} /* end if */
@@ -2514,23 +2514,23 @@ test_mf_aggr_alloc3(const char *env_h5_drvr, 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 the file */
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;
/* Allocate first block from meta_aggr */
type = H5FD_MEM_SUPER;
@@ -2538,7 +2538,7 @@ test_mf_aggr_alloc3(const char *env_h5_drvr, hid_t fapl)
H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if ((addr1 + TBLOCK_SIZE30) != ma_addr)
- TEST_ERROR
+ TEST_ERROR;
/* Allocate second block from meta_aggr */
addr2 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE50);
@@ -2546,18 +2546,18 @@ test_mf_aggr_alloc3(const char *env_h5_drvr, hid_t fapl)
H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if ((addr2 + TBLOCK_SIZE50) != ma_addr)
- TEST_ERROR
+ TEST_ERROR;
if (ma_size != (TBLOCK_SIZE2048 - (TBLOCK_SIZE30 + TBLOCK_SIZE50)))
- TEST_ERROR
+ TEST_ERROR;
/* Allocate first block from sdata_aggr */
stype = H5FD_MEM_DRAW;
saddr1 = H5MF_alloc(f, stype, (hsize_t)TBLOCK_SIZE30);
H5MF__aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size);
if ((saddr1 + TBLOCK_SIZE30) != sdata_addr)
- TEST_ERROR
+ TEST_ERROR;
if (sdata_size != (TBLOCK_SIZE2048 - TBLOCK_SIZE30))
- TEST_ERROR
+ TEST_ERROR;
/* Allocate third block, which is from file allocation not from meta_aggr */
addr3 = H5MF_alloc(f, type, (hsize_t)(TBLOCK_SIZE2058));
@@ -2566,20 +2566,20 @@ test_mf_aggr_alloc3(const char *env_h5_drvr, hid_t fapl)
/* info for meta_aggr shouldn't be changed */
if (addr3 != (sdata_addr + sdata_size))
- TEST_ERROR
+ TEST_ERROR;
if ((addr3 + TBLOCK_SIZE2058) == new_ma_addr)
- TEST_ERROR
+ TEST_ERROR;
if ((new_ma_addr != ma_addr) || (new_ma_size != ma_size))
- TEST_ERROR
+ TEST_ERROR;
/* Allocate fourth block, which should be from meta_aggr */
addr4 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE50);
H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if ((addr4 + TBLOCK_SIZE50) != ma_addr)
- TEST_ERROR
+ TEST_ERROR;
if (ma_size != (TBLOCK_SIZE2048 - (TBLOCK_SIZE30 + TBLOCK_SIZE50 + TBLOCK_SIZE50)))
- TEST_ERROR
+ TEST_ERROR;
/* Free all the allocated blocks */
H5MF_xfree(f, type, addr1, (hsize_t)TBLOCK_SIZE30);
@@ -2589,15 +2589,15 @@ test_mf_aggr_alloc3(const char *env_h5_drvr, hid_t fapl)
H5MF_xfree(f, stype, saddr1, (hsize_t)TBLOCK_SIZE30);
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get the size of the file */
if ((new_file_size = h5_get_file_size(filename, fapl)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Verify the file is the correct size */
if (new_file_size != file_size)
- TEST_ERROR
+ TEST_ERROR;
PASSED();
} /* end if */
@@ -2682,23 +2682,23 @@ test_mf_aggr_alloc4(const char *env_h5_drvr, 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 the file */
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;
/* Allocate first block from meta_aggr */
type = H5FD_MEM_SUPER;
@@ -2707,47 +2707,47 @@ test_mf_aggr_alloc4(const char *env_h5_drvr, hid_t fapl)
H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if ((addr1 + TBLOCK_SIZE30) != ma_addr)
- TEST_ERROR
+ TEST_ERROR;
if (ma_size != (TBLOCK_SIZE2048 - TBLOCK_SIZE30))
- TEST_ERROR
+ TEST_ERROR;
/* Allocate first block from sdata_aggr */
stype = H5FD_MEM_DRAW;
saddr1 = H5MF_alloc(f, stype, (hsize_t)TBLOCK_SIZE30);
H5MF__aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size);
if ((saddr1 + TBLOCK_SIZE30) != sdata_addr)
- TEST_ERROR
+ TEST_ERROR;
/* Allocate second block from sdata_aggr */
saddr2 = H5MF_alloc(f, stype, (hsize_t)(TBLOCK_SIZE2048 - TBLOCK_SIZE30));
H5MF__aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size);
if (saddr2 + (TBLOCK_SIZE2048 - TBLOCK_SIZE30) != sdata_addr)
- TEST_ERROR
+ TEST_ERROR;
/* Allocate third block from sdata_aggr */
saddr3 = H5MF_alloc(f, stype, (hsize_t)TBLOCK_SIZE50);
H5MF__aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size);
if ((saddr3 + TBLOCK_SIZE50) != sdata_addr)
- TEST_ERROR
+ TEST_ERROR;
if (sdata_size != (TBLOCK_SIZE2048 - TBLOCK_SIZE50))
- TEST_ERROR
+ TEST_ERROR;
/* Allocate second block of 2058, which is from file allocation, not from meta_aggr */
addr2 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE2058);
if (addr2 != sdata_addr)
- TEST_ERROR
+ TEST_ERROR;
/* sdata_aggr is reset 0 */
H5MF__aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size);
if ((sdata_addr != 0) && (sdata_size != 0))
- TEST_ERROR
+ TEST_ERROR;
/* info is unchanged in meta_aggr */
H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size);
if ((new_ma_addr != ma_addr) && (new_ma_size != ma_size))
- TEST_ERROR
+ TEST_ERROR;
/* Free all the allocated blocks */
H5MF_xfree(f, type, addr1, (hsize_t)TBLOCK_SIZE30);
@@ -2757,15 +2757,15 @@ test_mf_aggr_alloc4(const char *env_h5_drvr, hid_t fapl)
H5MF_xfree(f, stype, saddr3, (hsize_t)TBLOCK_SIZE50);
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get the size of the file */
if ((new_file_size = h5_get_file_size(filename, fapl)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Verify the file is the correct size */
if (new_file_size != file_size)
- TEST_ERROR
+ TEST_ERROR;
PASSED();
} /* end if */
@@ -2831,23 +2831,23 @@ test_mf_aggr_alloc5(const char *env_h5_drvr, 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 the file */
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;
/* Allocate first block from meta_aggr */
type = H5FD_MEM_SUPER;
@@ -2855,27 +2855,27 @@ test_mf_aggr_alloc5(const char *env_h5_drvr, hid_t fapl)
H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if ((addr1 + TBLOCK_SIZE30) != ma_addr)
- TEST_ERROR
+ TEST_ERROR;
/* Allocate second block from meta_aggr */
addr2 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE50);
H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if (addr2 + TBLOCK_SIZE50 != ma_addr)
- TEST_ERROR
+ TEST_ERROR;
if (ma_size != (TBLOCK_SIZE2048 - (TBLOCK_SIZE30 + TBLOCK_SIZE50)))
- TEST_ERROR
+ TEST_ERROR;
/* Allocate third block from meta_aggr */
addr3 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE1970);
H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size);
if (addr3 != ma_addr)
- TEST_ERROR
+ TEST_ERROR;
if ((addr3 + TBLOCK_SIZE1970) != new_ma_addr)
- TEST_ERROR
+ TEST_ERROR;
if (new_ma_size != (TBLOCK_SIZE2048 - (TBLOCK_SIZE1970 - ma_size)))
- TEST_ERROR
+ TEST_ERROR;
/* Free all the allocated blocks */
H5MF_xfree(f, type, addr1, (hsize_t)TBLOCK_SIZE30);
@@ -2883,15 +2883,15 @@ test_mf_aggr_alloc5(const char *env_h5_drvr, hid_t fapl)
H5MF_xfree(f, type, addr3, (hsize_t)TBLOCK_SIZE1970);
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get the size of the file */
if ((new_file_size = h5_get_file_size(filename, fapl)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Verify the file is the correct size */
if (new_file_size != file_size)
- TEST_ERROR
+ TEST_ERROR;
PASSED();
} /* end if */
@@ -2969,23 +2969,23 @@ test_mf_aggr_alloc6(const char *env_h5_drvr, 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 the file */
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;
type = H5FD_MEM_SUPER;
@@ -2994,16 +2994,16 @@ test_mf_aggr_alloc6(const char *env_h5_drvr, hid_t fapl)
H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if ((addr1 + TBLOCK_SIZE30) != ma_addr)
- TEST_ERROR
+ TEST_ERROR;
/* Allocate second block from meta_aggr */
addr2 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE50);
H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if (addr2 + TBLOCK_SIZE50 != ma_addr)
- TEST_ERROR
+ TEST_ERROR;
if (ma_size != (TBLOCK_SIZE2048 - (TBLOCK_SIZE30 + TBLOCK_SIZE50)))
- TEST_ERROR
+ TEST_ERROR;
/* Allocate first block from sdata_aggr */
stype = H5FD_MEM_DRAW;
@@ -3011,9 +3011,9 @@ test_mf_aggr_alloc6(const char *env_h5_drvr, hid_t fapl)
H5MF__aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size);
if ((saddr1 + TBLOCK_SIZE30) != sdata_addr)
- TEST_ERROR
+ TEST_ERROR;
if (sdata_size != (TBLOCK_SIZE2048 - TBLOCK_SIZE30))
- TEST_ERROR
+ TEST_ERROR;
/* Allocate third block from meta_aggr */
addr3 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE1970);
@@ -3021,14 +3021,14 @@ test_mf_aggr_alloc6(const char *env_h5_drvr, hid_t fapl)
H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size);
if ((addr3 + TBLOCK_SIZE1970) != new_ma_addr)
- TEST_ERROR
+ TEST_ERROR;
if (addr3 != (sdata_addr + sdata_size))
- TEST_ERROR
+ TEST_ERROR;
if ((ma_addr + TBLOCK_SIZE1970) == new_ma_addr)
- TEST_ERROR
+ TEST_ERROR;
if (new_ma_size != (TBLOCK_SIZE2048 - TBLOCK_SIZE1970))
- TEST_ERROR
+ TEST_ERROR;
/* Verify that meta_aggr's unused space of 1968 is freed to free-space */
HDmemset(&state, 0, sizeof(H5FS_stat_t));
@@ -3037,7 +3037,7 @@ test_mf_aggr_alloc6(const char *env_h5_drvr, hid_t fapl)
state.serial_sect_count += 1;
if (check_stats(f, f->shared->fs_man[type], &state))
- TEST_ERROR
+ TEST_ERROR;
/* Free all the allocated blocks */
H5MF_xfree(f, type, addr1, (hsize_t)TBLOCK_SIZE30);
@@ -3046,15 +3046,15 @@ test_mf_aggr_alloc6(const char *env_h5_drvr, hid_t fapl)
H5MF_xfree(f, stype, saddr1, (hsize_t)TBLOCK_SIZE30);
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get the size of the file */
if ((new_file_size = h5_get_file_size(filename, fapl)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Verify the file is the correct size */
if (new_file_size != file_size)
- TEST_ERROR
+ TEST_ERROR;
PASSED();
} /* end if */
@@ -3143,82 +3143,82 @@ test_mf_aggr_alloc7(const char *env_h5_drvr, 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 the file */
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;
/* Allocate the first block from meta_aggr */
type = H5FD_MEM_SUPER;
addr1 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE30);
H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if ((addr1 + TBLOCK_SIZE30) != ma_addr)
- TEST_ERROR
+ TEST_ERROR;
/* Allocate the second block from meta_aggr */
addr2 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE50);
H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if (addr2 + TBLOCK_SIZE50 != ma_addr)
- TEST_ERROR
+ TEST_ERROR;
if (ma_size != (TBLOCK_SIZE2048 - (TBLOCK_SIZE30 + TBLOCK_SIZE50)))
- TEST_ERROR
+ TEST_ERROR;
/* Allocate the first block from sdata_aggr */
stype = H5FD_MEM_DRAW;
saddr1 = H5MF_alloc(f, stype, (hsize_t)TBLOCK_SIZE30);
H5MF__aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size);
if ((saddr1 + TBLOCK_SIZE30) != sdata_addr)
- TEST_ERROR
+ TEST_ERROR;
/* Allocate the second block from sdata_aggr */
saddr2 = H5MF_alloc(f, stype, (hsize_t)TBLOCK_SIZE2048 - TBLOCK_SIZE30);
H5MF__aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size);
if ((saddr2 + (TBLOCK_SIZE2048 - TBLOCK_SIZE30)) != sdata_addr)
- TEST_ERROR
+ TEST_ERROR;
if (sdata_size != 0)
- TEST_ERROR
+ TEST_ERROR;
/* Allocate the third block from sdata_aggr */
saddr3 = H5MF_alloc(f, stype, (hsize_t)TBLOCK_SIZE50);
H5MF__aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size);
if ((saddr3 + TBLOCK_SIZE50) != sdata_addr)
- TEST_ERROR
+ TEST_ERROR;
if (sdata_size != (TBLOCK_SIZE2048 - TBLOCK_SIZE50))
- TEST_ERROR
+ TEST_ERROR;
/* Allocate the third block from meta_aggr */
addr3 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE1970);
H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if (addr3 != sdata_addr)
- TEST_ERROR
+ TEST_ERROR;
if ((addr3 + TBLOCK_SIZE1970) != ma_addr)
- TEST_ERROR
+ TEST_ERROR;
if (ma_size != (TBLOCK_SIZE2048 - TBLOCK_SIZE1970))
- TEST_ERROR
+ TEST_ERROR;
/* sdata_aggr info is reset to 0 */
H5MF__aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size);
if (sdata_addr != HADDR_UNDEF)
- TEST_ERROR
+ TEST_ERROR;
if (sdata_size != 0)
- TEST_ERROR
+ TEST_ERROR;
/* Verify that meta_aggr's unused space of 1968 is freed to free-space */
HDmemset(&state, 0, sizeof(H5FS_stat_t));
@@ -3227,7 +3227,7 @@ test_mf_aggr_alloc7(const char *env_h5_drvr, hid_t fapl)
state.serial_sect_count += 1;
if (check_stats(f, f->shared->fs_man[type], &state))
- TEST_ERROR
+ TEST_ERROR;
/* Free all the allocated blocks */
H5MF_xfree(f, type, addr1, (hsize_t)TBLOCK_SIZE30);
@@ -3238,15 +3238,15 @@ test_mf_aggr_alloc7(const char *env_h5_drvr, hid_t fapl)
H5MF_xfree(f, stype, saddr3, (hsize_t)TBLOCK_SIZE50);
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();
} /* end if */
@@ -3314,30 +3314,30 @@ test_mf_aggr_extend(const char *env_h5_drvr, 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 the file */
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;
/* Allocate the first block from meta_aggr */
type = H5FD_MEM_SUPER;
addr = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE30);
H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if ((addr + TBLOCK_SIZE30) != ma_addr)
- TEST_ERROR
+ TEST_ERROR;
/* Adjust meta_aggr's info info for testing */
f->shared->meta_aggr.addr = addr;
@@ -3350,14 +3350,14 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl)
/* should succeed */
if (!was_extended)
- TEST_ERROR
+ TEST_ERROR;
H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size);
if (new_ma_addr != (addr + TBLOCK_SIZE50))
- TEST_ERROR
+ TEST_ERROR;
if (new_ma_size != (f->shared->meta_aggr.alloc_size - TBLOCK_SIZE50))
- TEST_ERROR
+ TEST_ERROR;
/* Free the allocated blocks */
H5MF_xfree(f, type, addr, (hsize_t)TBLOCK_SIZE50);
@@ -3367,14 +3367,14 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl)
/* should succeed */
if (!was_extended)
- TEST_ERROR
+ TEST_ERROR;
H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size);
if (new_ma_addr != (addr + TBLOCK_SIZE700))
- TEST_ERROR
+ TEST_ERROR;
if (new_ma_size != (f->shared->meta_aggr.alloc_size * 2 - TBLOCK_SIZE700))
- TEST_ERROR
+ TEST_ERROR;
/* Free the allocated blocks */
H5MF_xfree(f, type, addr, (hsize_t)TBLOCK_SIZE700);
@@ -3384,28 +3384,28 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl)
/* should succeed */
if (!was_extended)
- TEST_ERROR
+ TEST_ERROR;
H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size);
if (new_ma_addr != (addr + TBLOCK_SIZE2058))
- TEST_ERROR
+ TEST_ERROR;
if (new_ma_size != f->shared->meta_aggr.size)
- TEST_ERROR
+ TEST_ERROR;
/* Free the allocated blocks */
H5MF_xfree(f, type, addr, (hsize_t)TBLOCK_SIZE2058);
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();
} /* end if */
@@ -3420,25 +3420,25 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl)
if (contig_addr_vfd) {
/* 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;
/* Allocate the first block from meta_aggr */
type = H5FD_MEM_SUPER;
addr = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE30);
H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if ((addr + TBLOCK_SIZE30) != ma_addr)
- TEST_ERROR
+ TEST_ERROR;
/* Allocate the first block from sdata_aggr */
stype = H5FD_MEM_DRAW;
saddr = H5MF_alloc(f, stype, (hsize_t)TBLOCK_SIZE50);
H5MF__aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size);
if ((saddr + TBLOCK_SIZE50) != sdata_addr)
- TEST_ERROR
+ TEST_ERROR;
/* Adjust meta_aggr's info info for testing */
f->shared->meta_aggr.addr = addr;
@@ -3450,14 +3450,14 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl)
was_extended = H5MF_try_extend(f, type, (haddr_t)new_addr, (hsize_t)10, (hsize_t)(TBLOCK_SIZE50));
if (!was_extended)
- TEST_ERROR
+ TEST_ERROR;
H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size);
if (new_ma_addr != (addr + TBLOCK_SIZE50))
- TEST_ERROR
+ TEST_ERROR;
if (new_ma_size != (f->shared->meta_aggr.alloc_size - TBLOCK_SIZE50))
- TEST_ERROR
+ TEST_ERROR;
/* Restore info for meta_aggr */
f->shared->meta_aggr.addr = ma_addr;
@@ -3467,15 +3467,15 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl)
H5MF_xfree(f, stype, saddr, (hsize_t)TBLOCK_SIZE50);
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();
} /* end if */
@@ -3490,25 +3490,25 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl)
if (contig_addr_vfd) {
/* 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;
/* Allocate first block from meta_aggr */
type = H5FD_MEM_SUPER;
addr = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE30);
H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if ((addr + TBLOCK_SIZE30) != ma_addr)
- TEST_ERROR
+ TEST_ERROR;
/* Allocate first block from sdata_aggr */
stype = H5FD_MEM_DRAW;
saddr = H5MF_alloc(f, stype, (hsize_t)TBLOCK_SIZE50);
H5MF__aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size);
if ((saddr + TBLOCK_SIZE50) != sdata_addr)
- TEST_ERROR
+ TEST_ERROR;
/* Adjust meta_aggr's info info for testing */
f->shared->meta_aggr.addr = addr;
@@ -3520,14 +3520,14 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl)
was_extended = H5MF_try_extend(f, type, (haddr_t)new_addr, (hsize_t)10, (hsize_t)(TBLOCK_SIZE50));
if (was_extended)
- TEST_ERROR
+ TEST_ERROR;
H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size);
if (new_ma_addr != addr)
- TEST_ERROR
+ TEST_ERROR;
if (new_ma_size != 0)
- TEST_ERROR
+ TEST_ERROR;
/* restore info for meta_aggr */
f->shared->meta_aggr.addr = ma_addr;
@@ -3537,15 +3537,15 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl)
H5MF_xfree(f, stype, saddr, (hsize_t)TBLOCK_SIZE50);
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();
} /* end if */
@@ -3612,23 +3612,23 @@ test_mf_aggr_absorb(const char *env_h5_drvr, 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 the file */
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;
/* Allocate block A from meta_aggr */
type = H5FD_MEM_SUPER;
@@ -3637,27 +3637,27 @@ test_mf_aggr_absorb(const char *env_h5_drvr, hid_t fapl)
ma_addr = new_ma_addr - TBLOCK_SIZE30;
if ((addr1 + TBLOCK_SIZE30) != new_ma_addr)
- TEST_ERROR
+ TEST_ERROR;
/* should succeed */
if (H5MF_try_shrink(f, type, addr1, (hsize_t)TBLOCK_SIZE30) <= 0)
- TEST_ERROR
+ TEST_ERROR;
H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size);
if (new_ma_addr != ma_addr)
- TEST_ERROR
+ TEST_ERROR;
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();
} /* end if */
@@ -3672,11 +3672,11 @@ test_mf_aggr_absorb(const char *env_h5_drvr, hid_t fapl)
if (contig_addr_vfd) {
/* 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;
/* Allocate block A from meta_aggr */
type = H5FD_MEM_SUPER;
@@ -3684,9 +3684,9 @@ test_mf_aggr_absorb(const char *env_h5_drvr, hid_t fapl)
H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if ((addr1 + TBLOCK_SIZE30) != ma_addr)
- TEST_ERROR
+ TEST_ERROR;
if (ma_size != (TBLOCK_SIZE2048 - TBLOCK_SIZE30))
- TEST_ERROR
+ TEST_ERROR;
/* Allocate block B from sdata_aggr */
stype = H5FD_MEM_DRAW;
@@ -3696,33 +3696,33 @@ test_mf_aggr_absorb(const char *env_h5_drvr, hid_t fapl)
/* should succeed */
if (H5MF_try_shrink(f, stype, saddr1, (hsize_t)TBLOCK_SIZE50) <= 0)
- TEST_ERROR
+ TEST_ERROR;
H5MF__aggr_query(f, &(f->shared->sdata_aggr), &new_sdata_addr, &new_sdata_size);
if (new_sdata_addr != saddr1)
- TEST_ERROR
+ TEST_ERROR;
if (new_sdata_size != sdata_size + TBLOCK_SIZE50)
- TEST_ERROR
+ TEST_ERROR;
/* meta_aggr info should be updated because the block is absorbed into the meta_aggr */
H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size);
if (new_ma_addr != ma_addr)
- TEST_ERROR
+ TEST_ERROR;
if (new_ma_size != (ma_size))
- TEST_ERROR
+ TEST_ERROR;
H5MF_xfree(f, type, addr1, (hsize_t)TBLOCK_SIZE30);
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();
} /* end if */
@@ -3737,11 +3737,11 @@ test_mf_aggr_absorb(const char *env_h5_drvr, hid_t fapl)
if (contig_addr_vfd) {
/* 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;
/* Allocate block A from meta_aggr */
type = H5FD_MEM_SUPER;
@@ -3749,43 +3749,43 @@ test_mf_aggr_absorb(const char *env_h5_drvr, hid_t fapl)
H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if ((addr1 + TBLOCK_SIZE30) != ma_addr)
- TEST_ERROR
+ TEST_ERROR;
/* Allocate block B from meta_aggr */
addr2 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE50);
H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if ((addr2 + TBLOCK_SIZE50) != ma_addr)
- TEST_ERROR
+ TEST_ERROR;
/* Allocate block C from meta_aggr */
addr3 = H5MF_alloc(f, type, (hsize_t)(TBLOCK_SIZE30 + TBLOCK_SIZE50));
H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if ((addr3 + TBLOCK_SIZE30 + TBLOCK_SIZE50) != ma_addr)
- TEST_ERROR
+ TEST_ERROR;
/* should not succeed */
if (H5MF_try_shrink(f, type, addr2, (hsize_t)TBLOCK_SIZE50) > 0)
- TEST_ERROR
+ TEST_ERROR;
/* aggregator info should be the same as before */
H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size);
if (new_ma_addr != ma_addr)
- TEST_ERROR
+ TEST_ERROR;
H5MF_xfree(f, type, addr1, (hsize_t)TBLOCK_SIZE30);
H5MF_xfree(f, type, addr2, (hsize_t)TBLOCK_SIZE50);
H5MF_xfree(f, type, addr3, (hsize_t)(TBLOCK_SIZE30 + TBLOCK_SIZE50));
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();
} /* end if */
@@ -3868,34 +3868,34 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Turn off using meta/small data aggregator */
if ((fapl1 = H5Pcopy(new_fapl)) < 0)
- TEST_ERROR
+ TEST_ERROR;
H5Pset_meta_block_size(fapl1, (hsize_t)0);
H5Pset_small_data_block_size(fapl1, (hsize_t)0);
/* Create the file to work on (without alignment) */
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 the file */
if ((file_size = h5_get_file_size(filename, fapl)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* get alignment setting */
if (H5Pget_alignment(fapl1, NULL, &alignment) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Re-open the file with alignment and meta/sdata setting */
if ((file = H5Fopen(filename, H5F_ACC_RDWR, fapl1)) < 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;
/* calculate fragment for alignment of block 30 */
if ((tmp = (hsize_t)file_size % alignment))
@@ -3909,12 +3909,12 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Verify that the allocated block is aligned */
if (addr1 % alignment)
- TEST_ERROR
+ TEST_ERROR;
/* there should be nothing in the aggregator */
H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if (ma_addr || ma_size)
- TEST_ERROR
+ TEST_ERROR;
HDmemset(&state, 0, sizeof(H5FS_stat_t));
if (mis_align) {
@@ -3922,7 +3922,7 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
state.tot_sect_count += 1;
state.serial_sect_count += 1;
if (check_stats(f, f->shared->fs_man[type], &state))
- TEST_ERROR
+ TEST_ERROR;
}
/* calculate fragment for alignment of block 50 */
@@ -3935,32 +3935,32 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Verify that the allocated block is aligned */
if (addr2 % alignment)
- TEST_ERROR
+ TEST_ERROR;
/* there should be nothing in the aggregator */
H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if (ma_addr || ma_size)
- TEST_ERROR
+ TEST_ERROR;
if (mis_align) {
state.tot_space += mis_align;
state.tot_sect_count += 1;
state.serial_sect_count += 1;
if (check_stats(f, f->shared->fs_man[type], &state))
- TEST_ERROR
+ TEST_ERROR;
}
H5MF_xfree(f, type, addr1, (hsize_t)TBLOCK_SIZE30);
H5MF_xfree(f, type, addr2, (hsize_t)TBLOCK_SIZE50);
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if ((new_file_size = h5_get_file_size(filename, fapl1)) < 0)
- TEST_ERROR
+ TEST_ERROR;
if (new_file_size != file_size)
- TEST_ERROR
+ TEST_ERROR;
PASSED();
} /* end if */
@@ -3978,11 +3978,11 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
if (suitable_vfd) {
/* Re-open the file with alignment and meta/sdata setting */
if ((file = H5Fopen(filename, H5F_ACC_RDWR, fapl1)) < 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;
/* allocate a block of 50 from meta_aggr */
type = H5FD_MEM_SUPER;
@@ -3990,35 +3990,35 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* address should be aligned */
if (addr1 % alignment)
- TEST_ERROR
+ TEST_ERROR;
/* Close file */
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if ((file_size = h5_get_file_size(filename, fapl1)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Re-open the file */
if ((file = H5Fopen(filename, H5F_ACC_RDWR, fapl1)) < 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;
/* shrink the block */
if (H5MF_try_shrink(f, type, addr1, (hsize_t)TBLOCK_SIZE50) <= 0)
- TEST_ERROR
+ TEST_ERROR;
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if ((new_file_size = h5_get_file_size(filename, fapl1)) < 0)
- TEST_ERROR
+ TEST_ERROR;
if (new_file_size != (file_size - TBLOCK_SIZE50))
- TEST_ERROR
+ TEST_ERROR;
PASSED();
} /* end if */
@@ -4036,11 +4036,11 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
if (suitable_vfd) {
/* Re-open the file with alignment and meta/sdata setting */
if ((file = H5Fopen(filename, H5F_ACC_RDWR, fapl1)) < 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;
/* allocate a block of 50 */
type = H5FD_MEM_SUPER;
@@ -4048,38 +4048,38 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* address should be aligned */
if (addr1 % alignment)
- TEST_ERROR
+ TEST_ERROR;
/* Close file */
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if ((file_size = h5_get_file_size(filename, fapl1)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Re-open the file */
if ((file = H5Fopen(filename, H5F_ACC_RDWR, fapl1)) < 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;
/* try to extend the block */
was_extended =
H5MF_try_extend(f, type, (haddr_t)addr1, (hsize_t)TBLOCK_SIZE50, (hsize_t)TBLOCK_SIZE30);
if (was_extended <= 0)
- TEST_ERROR
+ TEST_ERROR;
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if ((new_file_size = h5_get_file_size(filename, fapl1)) < 0)
- TEST_ERROR
+ TEST_ERROR;
if (new_file_size != (file_size + TBLOCK_SIZE30))
- TEST_ERROR
+ TEST_ERROR;
PASSED();
} /* end if */
@@ -4089,7 +4089,7 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
} /* end else */
if (fapl1 >= 0 && H5Pclose(fapl1) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
return (0);
@@ -4155,39 +4155,39 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_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 alignment setting */
if (H5Pget_alignment(new_fapl, NULL, &alignment) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Re-open the file with alignment setting */
if ((file = H5Fopen(filename, H5F_ACC_RDWR, new_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;
/* Start up H5FD_MEM_SUPER free-space manager */
if (H5MF__start_fstype(f, (H5F_mem_page_t)H5FD_MEM_SUPER) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (f->shared->fs_state[H5FD_MEM_SUPER] != H5F_FS_STATE_OPEN)
- TEST_ERROR
+ TEST_ERROR;
if (f->shared->fs_man[H5FD_MEM_SUPER]->client != H5FS_CLIENT_FILE_ID)
- TEST_ERROR
+ TEST_ERROR;
/* Create section A */
sect_node = H5MF__sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)alignment, (hsize_t)TBLOCK_SIZE50);
/* Add section A to free-space manager */
if (H5MF__add_sect(f, H5FD_MEM_SUPER, f->shared->fs_man[H5FD_MEM_SUPER], sect_node))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
HDmemset(&state, 0, sizeof(H5FS_stat_t));
state.tot_space += TBLOCK_SIZE50;
@@ -4195,23 +4195,23 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
state.serial_sect_count += 1;
if (check_stats(f, f->shared->fs_man[H5FD_MEM_SUPER], &state))
- TEST_ERROR
+ TEST_ERROR;
/* Allocate a block of 50 */
addr = H5MF_alloc(f, H5FD_MEM_SUPER, (hsize_t)TBLOCK_SIZE50);
/* Verify that the allocated block is section A in free-space */
if (addr != (haddr_t)alignment)
- TEST_ERROR
+ TEST_ERROR;
if (addr % alignment)
- TEST_ERROR
+ TEST_ERROR;
state.tot_space -= TBLOCK_SIZE50;
state.tot_sect_count -= 1;
state.serial_sect_count -= 1;
if (check_stats(f, f->shared->fs_man[H5FD_MEM_SUPER], &state))
- TEST_ERROR
+ TEST_ERROR;
/* Free the block to free-space */
H5MF_xfree(f, H5FD_MEM_SUPER, addr, (hsize_t)TBLOCK_SIZE50);
@@ -4220,10 +4220,10 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
state.tot_sect_count += 1;
state.serial_sect_count += 1;
if (check_stats(f, f->shared->fs_man[H5FD_MEM_SUPER], &state))
- TEST_ERROR
+ TEST_ERROR;
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
PASSED();
@@ -4231,27 +4231,27 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Re-open the file with alignment setting */
if ((file = H5Fopen(filename, H5F_ACC_RDWR, new_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;
/* Start up H5FD_MEM_SUPER free-space manager */
if (H5MF__start_fstype(f, (H5F_mem_page_t)H5FD_MEM_SUPER) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (f->shared->fs_state[H5FD_MEM_SUPER] != H5F_FS_STATE_OPEN)
- TEST_ERROR
+ TEST_ERROR;
if (f->shared->fs_man[H5FD_MEM_SUPER]->client != H5FS_CLIENT_FILE_ID)
- TEST_ERROR
+ TEST_ERROR;
/* Create section A */
sect_node = H5MF__sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR70, (hsize_t)TBLOCK_SIZE8000);
/* Add section A to free-space manager */
if (H5MF__add_sect(f, H5FD_MEM_SUPER, f->shared->fs_man[H5FD_MEM_SUPER], sect_node))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
HDmemset(&state, 0, sizeof(H5FS_stat_t));
state.tot_space += TBLOCK_SIZE8000;
@@ -4259,14 +4259,14 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
state.serial_sect_count += 1;
if (check_stats(f, f->shared->fs_man[H5FD_MEM_SUPER], &state))
- TEST_ERROR
+ TEST_ERROR;
/* Allocate a block of 600 */
addr = H5MF_alloc(f, H5FD_MEM_SUPER, (hsize_t)TBLOCK_SIZE600);
/* Verify that the allocated block is aligned */
if (addr % alignment)
- TEST_ERROR
+ TEST_ERROR;
/* should have 1 more section in free-space */
state.tot_space -= TBLOCK_SIZE600;
@@ -4274,20 +4274,20 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
state.serial_sect_count += 1;
if (check_stats(f, f->shared->fs_man[H5FD_MEM_SUPER], &state))
- TEST_ERROR
+ TEST_ERROR;
/* try to extend the block */
was_extended =
H5MF_try_extend(f, H5FD_MEM_SUPER, (haddr_t)addr, (hsize_t)TBLOCK_SIZE600, (hsize_t)TBLOCK_SIZE200);
if (was_extended <= 0)
- TEST_ERROR
+ TEST_ERROR;
/* space should be decreased by 200, # of sections remain the same */
state.tot_space -= TBLOCK_SIZE200;
if (check_stats(f, f->shared->fs_man[H5FD_MEM_SUPER], &state))
- TEST_ERROR
+ TEST_ERROR;
/* Free the block to free-space manager */
H5MF_xfree(f, H5FD_MEM_SUPER, addr, (hsize_t)(TBLOCK_SIZE600 + TBLOCK_SIZE200));
@@ -4297,10 +4297,10 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
state.tot_sect_count = 1;
state.serial_sect_count = 1;
if (check_stats(f, f->shared->fs_man[H5FD_MEM_SUPER], &state))
- TEST_ERROR
+ TEST_ERROR;
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
PASSED();
@@ -4314,31 +4314,31 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
HDstrcmp(env_h5_drvr, "multi") != 0 && HDstrcmp(env_h5_drvr, "direct") != 0);
if (suitable_vfd) {
if ((file_size = h5_get_file_size(filename, new_fapl)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Re-open the file with alignment setting */
if ((file = H5Fopen(filename, H5F_ACC_RDWR, new_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;
/* Start up H5FD_MEM_SUPER free-space manager */
if (H5MF__start_fstype(f, (H5F_mem_page_t)H5FD_MEM_SUPER) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (f->shared->fs_state[H5FD_MEM_SUPER] != H5F_FS_STATE_OPEN)
- TEST_ERROR
+ TEST_ERROR;
if (f->shared->fs_man[H5FD_MEM_SUPER]->client != H5FS_CLIENT_FILE_ID)
- TEST_ERROR
+ TEST_ERROR;
/* Create section A */
sect_node = H5MF__sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR70, (hsize_t)TBLOCK_SIZE700);
/* Add section A to free-space manager */
if (H5MF__add_sect(f, H5FD_MEM_SUPER, f->shared->fs_man[H5FD_MEM_SUPER], sect_node))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
HDmemset(&state, 0, sizeof(H5FS_stat_t));
state.tot_space += TBLOCK_SIZE700;
@@ -4346,7 +4346,7 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
state.serial_sect_count += 1;
if (check_stats(f, f->shared->fs_man[H5FD_MEM_SUPER], &state))
- TEST_ERROR
+ TEST_ERROR;
/*
* Allocate a block of 40
* Since free-space manager cannot fulfull the request because of alignment,
@@ -4356,11 +4356,11 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Verify that the allocated block is aligned */
if (addr % alignment)
- TEST_ERROR
+ TEST_ERROR;
/* verify that the allocated block is from file allocation, not section A in free-space */
if (!(addr >= (haddr_t)file_size))
- TEST_ERROR
+ TEST_ERROR;
/* calculate fragment for alignment of block 40 from file allocation */
if ((tmp = (hsize_t)file_size % alignment))
@@ -4374,10 +4374,10 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* free-space info should be the same */
if (check_stats(f, f->shared->fs_man[H5FD_MEM_SUPER], &state))
- TEST_ERROR
+ TEST_ERROR;
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
PASSED();
} /* end if */
@@ -4525,27 +4525,27 @@ test_mf_align_alloc1(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Create the file to work on (without alignment) */
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 the file */
if ((file_size = h5_get_file_size(filename, fapl)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* get alignment setting */
if (H5Pget_alignment(new_fapl, NULL, &alignment) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Re-open the file with alignment setting */
if ((file = H5Fopen(filename, H5F_ACC_RDWR, new_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;
/* calculate fragment for alignment of block 30 */
if ((tmp = (hsize_t)file_size % alignment))
@@ -4557,7 +4557,7 @@ test_mf_align_alloc1(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Verify that the allocated block is aligned */
if (addr1 % alignment)
- TEST_ERROR
+ TEST_ERROR;
/* fragment for alignment of block 30 is freed to free-space */
HDmemset(&state, 0, sizeof(H5FS_stat_t));
@@ -4570,7 +4570,7 @@ test_mf_align_alloc1(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if ((addr1 + TBLOCK_SIZE30) != ma_addr)
- TEST_ERROR
+ TEST_ERROR;
/* calculate fragment for alignment of block 50 */
mis_align = 0;
@@ -4582,7 +4582,7 @@ test_mf_align_alloc1(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Verify that the allocated block is aligned */
if (addr2 % alignment)
- TEST_ERROR
+ TEST_ERROR;
/* fragment for alignment of block 50 is freed to free-space */
if (mis_align) {
@@ -4594,7 +4594,7 @@ test_mf_align_alloc1(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if ((addr2 + TBLOCK_SIZE50) != ma_addr)
- TEST_ERROR
+ TEST_ERROR;
/* calculate fragment for alignment of block 80 */
mis_align = 0;
@@ -4605,7 +4605,7 @@ test_mf_align_alloc1(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Verify that the allocated block is aligned */
if (addr3 % alignment)
- TEST_ERROR
+ TEST_ERROR;
/* fragment for alignment of block 80 is freed to free-space */
if (mis_align) {
@@ -4617,7 +4617,7 @@ test_mf_align_alloc1(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if ((addr3 + TBLOCK_SIZE80) != ma_addr)
- TEST_ERROR
+ TEST_ERROR;
/* calculate fragment for alignment of block 1970 */
mis_align = 0;
@@ -4629,7 +4629,7 @@ test_mf_align_alloc1(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Verify that the allocated block is aligned */
if (addr4 % alignment)
- TEST_ERROR
+ TEST_ERROR;
/* fragment for alignment of block 1970 is freed to free-space */
if (mis_align) {
@@ -4641,11 +4641,11 @@ test_mf_align_alloc1(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if ((addr4 + TBLOCK_SIZE1970) != ma_addr)
- TEST_ERROR
+ TEST_ERROR;
/* Verify total size of free space after all the allocations */
if (check_stats(f, f->shared->fs_man[type], &state))
- TEST_ERROR
+ TEST_ERROR;
H5MF_xfree(f, type, addr1, (hsize_t)TBLOCK_SIZE30);
H5MF_xfree(f, type, addr2, (hsize_t)TBLOCK_SIZE50);
@@ -4653,7 +4653,7 @@ test_mf_align_alloc1(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
H5MF_xfree(f, type, addr3, (hsize_t)TBLOCK_SIZE1970);
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
PASSED();
} /* end if */
@@ -4788,27 +4788,27 @@ test_mf_align_alloc2(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Create the file to work on (without alignment) */
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 the file */
if ((file_size = h5_get_file_size(filename, fapl)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* get alignment setting */
if (H5Pget_alignment(new_fapl, NULL, &alignment) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Re-open the file with alignment setting */
if ((file = H5Fopen(filename, H5F_ACC_RDWR, new_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;
/* calculate fragment for alignment of block 30 */
if ((tmp = (hsize_t)file_size % alignment))
@@ -4820,7 +4820,7 @@ test_mf_align_alloc2(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Verify that the allocated block is aligned */
if (addr1 % alignment)
- TEST_ERROR
+ TEST_ERROR;
/* fragment for alignment of block 30 is freed to free-space */
HDmemset(&state, 0, sizeof(H5FS_stat_t) * H5FD_MEM_NTYPES);
@@ -4833,7 +4833,7 @@ test_mf_align_alloc2(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if ((addr1 + TBLOCK_SIZE30) != ma_addr)
- TEST_ERROR
+ TEST_ERROR;
/* fragment for alignment of block 50 is freed to free-space */
mis_align = 0;
@@ -4844,7 +4844,7 @@ test_mf_align_alloc2(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Verify that the allocated block is aligned */
if (addr2 % alignment)
- TEST_ERROR
+ TEST_ERROR;
/* fragment for alignment of block 50 is freed to free-space */
if (mis_align) {
@@ -4856,7 +4856,7 @@ test_mf_align_alloc2(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if ((addr2 + TBLOCK_SIZE50) != ma_addr)
- TEST_ERROR
+ TEST_ERROR;
/*
* Calculate fragment for alignment of block 30 in sdata_aggr:
@@ -4888,13 +4888,13 @@ test_mf_align_alloc2(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Verify that the allocated block is aligned */
if (saddr1 % alignment)
- TEST_ERROR
+ TEST_ERROR;
H5MF__aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size);
H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if (sdata_addr != (saddr1 + TBLOCK_SIZE30))
- TEST_ERROR
+ TEST_ERROR;
/*
* Calculate fragment for the allocation of block 80 from meta_aggr:
@@ -4916,7 +4916,7 @@ test_mf_align_alloc2(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Verify that the allocated block is aligned */
if (addr3 % alignment)
- TEST_ERROR
+ TEST_ERROR;
/* fragment for alignment of block 80 is freed to free-space */
if (mis_align) {
@@ -4928,17 +4928,17 @@ test_mf_align_alloc2(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if ((addr3 + TBLOCK_SIZE80) != ma_addr)
- TEST_ERROR
+ TEST_ERROR;
/* Verify total size of free space after all the allocations */
if (f->shared->fs_man[type]) {
if (check_stats(f, f->shared->fs_man[type], &(state[type])))
- TEST_ERROR
+ TEST_ERROR;
}
if (f->shared->fs_man[stype]) {
if (check_stats(f, f->shared->fs_man[stype], &(state[stype])))
- TEST_ERROR
+ TEST_ERROR;
}
H5MF_xfree(f, type, addr1, (hsize_t)TBLOCK_SIZE30);
@@ -4947,7 +4947,7 @@ test_mf_align_alloc2(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
H5MF_xfree(f, stype, saddr1, (hsize_t)TBLOCK_SIZE30);
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
PASSED();
} /* end if */
@@ -5134,27 +5134,27 @@ test_mf_align_alloc3(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Create the file to work on (without alignment) */
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 the file */
if ((file_size = h5_get_file_size(filename, fapl)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* get alignment setting */
if (H5Pget_alignment(new_fapl, NULL, &alignment) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Re-open the file with alignment setting */
if ((file = H5Fopen(filename, H5F_ACC_RDWR, new_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;
/* calculate fragment for alignment of block 30 */
if ((tmp = (hsize_t)file_size % alignment))
@@ -5166,7 +5166,7 @@ test_mf_align_alloc3(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Verify that the allocated block is aligned */
if (addr1 % alignment)
- TEST_ERROR
+ TEST_ERROR;
/* fragment for alignment of block 30 is freed to free-space */
HDmemset(&state, 0, sizeof(H5FS_stat_t) * H5FD_MEM_NTYPES);
@@ -5178,7 +5178,7 @@ test_mf_align_alloc3(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if ((addr1 + TBLOCK_SIZE30) != ma_addr)
- TEST_ERROR
+ TEST_ERROR;
/* calculate fragment for alignment of block 50 */
mis_align = 0;
@@ -5190,7 +5190,7 @@ test_mf_align_alloc3(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Verify that the allocated block is aligned */
if (addr2 % alignment)
- TEST_ERROR
+ TEST_ERROR;
/* fragment for alignment of block 50 is freed to free-space */
if (mis_align) {
@@ -5201,7 +5201,7 @@ test_mf_align_alloc3(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if ((addr2 + TBLOCK_SIZE50) != ma_addr)
- TEST_ERROR
+ TEST_ERROR;
/*
* Calculate fragment for alignment of block 30 in sdata_aggr:
@@ -5226,7 +5226,7 @@ test_mf_align_alloc3(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Verify that the allocated block is aligned */
if (saddr1 % alignment)
- TEST_ERROR
+ TEST_ERROR;
/* fragment for alignment of block 30 for sdata_aggr is freed to free-space */
if (mis_align) {
@@ -5237,7 +5237,7 @@ test_mf_align_alloc3(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
H5MF__aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size);
if (sdata_addr != (saddr1 + TBLOCK_SIZE30))
- TEST_ERROR
+ TEST_ERROR;
/* calculate fragment for alignment of block 50 in sdata_aggr */
mis_align = 0;
@@ -5249,7 +5249,7 @@ test_mf_align_alloc3(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Verify that the allocated block is aligned */
if (saddr2 % alignment)
- TEST_ERROR
+ TEST_ERROR;
/* fragment for alignment of block 50 for sdata_aggr is freed to free-space */
if (mis_align) {
@@ -5260,7 +5260,7 @@ test_mf_align_alloc3(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
H5MF__aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size);
if (sdata_addr != (saddr2 + TBLOCK_SIZE50))
- TEST_ERROR
+ TEST_ERROR;
/* calculate fragment for alignment of block 80 in sdata_aggr */
mis_align = 0;
@@ -5272,7 +5272,7 @@ test_mf_align_alloc3(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Verify that the allocated block is aligned */
if (saddr3 % alignment)
- TEST_ERROR
+ TEST_ERROR;
/* fragment for alignment of block 80 for sdata_aggr is freed to free-space */
if (mis_align) {
@@ -5283,7 +5283,7 @@ test_mf_align_alloc3(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
H5MF__aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size);
if ((saddr3 + TBLOCK_SIZE80) != sdata_addr)
- TEST_ERROR
+ TEST_ERROR;
/* calculate fragment for alignment of block 1034 */
mis_align = 0;
@@ -5295,7 +5295,7 @@ test_mf_align_alloc3(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Verify that the allocated block is aligned */
if (addr3 % alignment)
- TEST_ERROR
+ TEST_ERROR;
/* fragment for alignment of block 1034 for meta_aggr is freed to free-space */
if (mis_align) {
@@ -5319,21 +5319,21 @@ test_mf_align_alloc3(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if ((addr3 + TBLOCK_SIZE1034) != ma_addr)
- TEST_ERROR
+ TEST_ERROR;
/* Verify total size of free space after all allocations */
if (f->shared->fs_man[type]) {
if (check_stats(f, f->shared->fs_man[type], &(state[type])))
- TEST_ERROR
+ TEST_ERROR;
}
if (f->shared->fs_man[stype]) {
if (check_stats(f, f->shared->fs_man[stype], &(state[stype])))
- TEST_ERROR
+ TEST_ERROR;
}
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
PASSED();
} /* end if */
@@ -5448,27 +5448,27 @@ test_mf_align_alloc4(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Create the file to work on (without alignment) */
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 the file */
if ((file_size = h5_get_file_size(filename, fapl)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Re-open the file with alignment setting and meta/sdata setting */
if ((file = H5Fopen(filename, H5F_ACC_RDWR, new_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;
/* get alignment setting */
if (H5Pget_alignment(new_fapl, NULL, &alignment) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* calculate fragment for alignment of block 30 */
if ((tmp = (hsize_t)file_size % alignment))
@@ -5480,7 +5480,7 @@ test_mf_align_alloc4(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Verify that the allocated block is aligned */
if (addr1 % alignment)
- TEST_ERROR
+ TEST_ERROR;
/* fragment for alignment of block 30 is freed to free-space */
HDmemset(&state, 0, sizeof(H5FS_stat_t));
@@ -5493,7 +5493,7 @@ test_mf_align_alloc4(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
saved_ma_size = ma_size;
if ((addr1 + TBLOCK_SIZE30) != ma_addr)
- TEST_ERROR
+ TEST_ERROR;
/* calculate fragment for alignment of block 2058 */
mis_align = 0;
@@ -5505,7 +5505,7 @@ test_mf_align_alloc4(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Verify that the allocated block is aligned */
if (addr2 % alignment)
- TEST_ERROR
+ TEST_ERROR;
/* fragment for alignment of block 2058 is freed to free-space */
if (mis_align) {
@@ -5517,11 +5517,11 @@ test_mf_align_alloc4(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if ((addr2 + TBLOCK_SIZE2058) != ma_addr)
- TEST_ERROR
+ TEST_ERROR;
/* meta_aggr->size remains the same */
if (ma_size != saved_ma_size)
- TEST_ERROR
+ TEST_ERROR;
/* calculate fragment for alignment of block 5 from meta_aggr */
mis_align = 0;
@@ -5540,16 +5540,16 @@ test_mf_align_alloc4(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Verify that the allocated block is aligned */
if (addr3 % alignment)
- TEST_ERROR
+ TEST_ERROR;
/* Verify total size of free space after all allocations */
if (f->shared->fs_man[type]) {
if (check_stats(f, f->shared->fs_man[type], &state))
- TEST_ERROR
+ TEST_ERROR;
}
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
PASSED();
} /* end if */
@@ -5667,27 +5667,27 @@ test_mf_align_alloc5(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Create the file to work on (without alignment) */
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 the file */
if ((file_size = h5_get_file_size(filename, fapl)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Re-open the file with alignment setting and meta/sdata setting */
if ((file = H5Fopen(filename, H5F_ACC_RDWR, new_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;
/* get alignment setting */
if (H5Pget_alignment(new_fapl, NULL, &alignment) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* calculate fragment for alignment of block 30 */
if ((tmp = (hsize_t)file_size % alignment))
@@ -5699,12 +5699,12 @@ test_mf_align_alloc5(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Verify that the allocated block is aligned */
if (addr1 % alignment)
- TEST_ERROR
+ TEST_ERROR;
H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if ((addr1 + TBLOCK_SIZE30) != ma_addr)
- TEST_ERROR
+ TEST_ERROR;
/* fragment for alignment of block 30 is freed to free-space */
HDmemset(&state, 0, sizeof(H5FS_stat_t) * H5FD_MEM_NTYPES);
@@ -5725,7 +5725,7 @@ test_mf_align_alloc5(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Verify that the allocated block is aligned */
if (saddr1 % alignment)
- TEST_ERROR
+ TEST_ERROR;
/* fragment of alignment for block 30 in sdata_aggr is freed to free-space */
if (mis_align) {
@@ -5736,7 +5736,7 @@ test_mf_align_alloc5(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
H5MF__aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size);
if ((saddr1 + TBLOCK_SIZE30) != sdata_addr)
- TEST_ERROR
+ TEST_ERROR;
/* calculate fragment for alignment of block 2058 from meta_aggr */
mis_align = 0;
@@ -5748,7 +5748,7 @@ test_mf_align_alloc5(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Verify that the allocated block is aligned */
if (addr2 % alignment)
- TEST_ERROR
+ TEST_ERROR;
/* fragment for alignment of block 2058 is freed to free-space */
if (mis_align) {
@@ -5760,26 +5760,26 @@ test_mf_align_alloc5(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Verify total size of free space after all allocations */
if (f->shared->fs_man[type]) {
if (check_stats(f, f->shared->fs_man[type], &(state[type])))
- TEST_ERROR
+ TEST_ERROR;
}
if (f->shared->fs_man[stype]) {
if (check_stats(f, f->shared->fs_man[stype], &(state[stype])))
- TEST_ERROR
+ TEST_ERROR;
}
/* nothing is changed in meta_aggr */
H5MF__aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size);
if (new_ma_addr != ma_addr || new_ma_size != ma_size)
- TEST_ERROR
+ TEST_ERROR;
/* nothing is changed in sdata_aggr */
H5MF__aggr_query(f, &(f->shared->sdata_aggr), &new_sdata_addr, &new_sdata_size);
if (new_sdata_addr != sdata_addr || new_sdata_size != sdata_size)
- TEST_ERROR
+ TEST_ERROR;
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
PASSED();
} /* end if */
@@ -5938,27 +5938,27 @@ test_mf_align_alloc6(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Create the file to work on (without alignment) */
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 the file */
if ((file_size = h5_get_file_size(filename, fapl)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Re-open the file with alignment setting and meta/sdata setting */
if ((file = H5Fopen(filename, H5F_ACC_RDWR, new_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;
/* get alignment setting */
if (H5Pget_alignment(new_fapl, NULL, &alignment) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* calculate fragment for alignment of block 30 */
if ((tmp = (hsize_t)file_size % alignment))
@@ -5970,7 +5970,7 @@ test_mf_align_alloc6(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Verify that the allocated block is aligned */
if (addr1 % alignment)
- TEST_ERROR
+ TEST_ERROR;
/* fragment for alignment of block 30 in meta_aggr is freed to free-space */
HDmemset(&state, 0, sizeof(H5FS_stat_t) * H5FD_MEM_NTYPES);
@@ -5982,7 +5982,7 @@ test_mf_align_alloc6(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
H5MF__aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if ((addr1 + TBLOCK_SIZE30) != ma_addr)
- TEST_ERROR
+ TEST_ERROR;
/* calculate fragment for alignment of block 30 in sdata_aggr */
mis_align = 0;
@@ -5995,7 +5995,7 @@ test_mf_align_alloc6(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Verify that the allocated block is aligned */
if (saddr1 % alignment)
- TEST_ERROR
+ TEST_ERROR;
/* fragment for alignment of block 30 in sdata_aggr is freed to free-space */
if (mis_align) {
@@ -6006,7 +6006,7 @@ test_mf_align_alloc6(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
H5MF__aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size);
if (sdata_addr != (saddr1 + TBLOCK_SIZE30))
- TEST_ERROR
+ TEST_ERROR;
/* calculate fragment for alignment of block 50 in sdata_aggr */
mis_align = 0;
@@ -6018,7 +6018,7 @@ test_mf_align_alloc6(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Verify that the allocated block is aligned */
if (saddr2 % alignment)
- TEST_ERROR
+ TEST_ERROR;
/* fragment for alignment of block 50 in sdata_aggr is freed to free-space */
if (mis_align) {
@@ -6029,7 +6029,7 @@ test_mf_align_alloc6(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
H5MF__aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size);
if (sdata_addr != (saddr2 + TBLOCK_SIZE50))
- TEST_ERROR
+ TEST_ERROR;
/* calculate fragment for alignment of block 80 in sdata_aggr */
mis_align = 0;
@@ -6041,7 +6041,7 @@ test_mf_align_alloc6(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Verify that the allocated block is aligned */
if (saddr3 % alignment)
- TEST_ERROR
+ TEST_ERROR;
/* fragment for alignment of block 80 in sdata_aggr is freed to free-space */
if (mis_align) {
@@ -6052,7 +6052,7 @@ test_mf_align_alloc6(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
H5MF__aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size);
if (sdata_addr != (saddr3 + TBLOCK_SIZE80))
- TEST_ERROR
+ TEST_ERROR;
/* calculate fragment for alignment of block 2058 */
/* remaining space in sdata_aggr is freed and shrunk */
@@ -6065,7 +6065,7 @@ test_mf_align_alloc6(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Verify that the allocated block is aligned */
if (addr2 % alignment)
- TEST_ERROR
+ TEST_ERROR;
/* fragment for alignment of block 2058 is freed to free-space */
if (mis_align) {
@@ -6078,23 +6078,23 @@ test_mf_align_alloc6(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
H5MF__aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size);
if (new_ma_addr != ma_addr && new_ma_size != ma_size)
- TEST_ERROR
+ TEST_ERROR;
if (sdata_addr != HADDR_UNDEF || sdata_size != 0)
- TEST_ERROR
+ TEST_ERROR;
if (f->shared->fs_man[type]) {
if (check_stats(f, f->shared->fs_man[type], &(state[type])))
- TEST_ERROR
+ TEST_ERROR;
}
if (f->shared->fs_man[stype]) {
if (check_stats(f, f->shared->fs_man[stype], &(state[stype])))
- TEST_ERROR
+ TEST_ERROR;
}
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
PASSED();
} /* end if */
@@ -6138,16 +6138,16 @@ test_mf_bug1(const char *env_h5_drvr, hid_t fapl)
/* Copy fapl */
if ((copied_fapl = H5Pcopy(fapl)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Get metadata block size */
if (H5Pget_meta_block_size(copied_fapl, &block_size) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Set alignment to equal block size / 2 */
align = block_size / 2;
if (H5Pset_alignment(copied_fapl, 0, align) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Check for split or multi driver */
if (!HDstrcmp(env_h5_drvr, "split"))
@@ -6162,19 +6162,19 @@ test_mf_bug1(const char *env_h5_drvr, hid_t fapl)
/* Get current multi settings */
if (H5Pget_fapl_multi(copied_fapl, NULL, memb_fapl_arr, NULL, NULL, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Set alignment. Note that it is the block size of the parent FAPL that
* is important here. */
if (H5Pset_alignment(memb_fapl_arr[H5FD_MEM_SUPER], 0, align) < 0)
- TEST_ERROR
+ TEST_ERROR;
if (H5Pset_alignment(memb_fapl_arr[H5FD_MEM_DRAW], 0, align) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Set split driver with new FAPLs */
if (H5Pset_fapl_split(copied_fapl, "-m.h5", memb_fapl_arr[H5FD_MEM_SUPER], "-r.h5",
memb_fapl_arr[H5FD_MEM_DRAW]) < 0)
- TEST_ERROR
+ TEST_ERROR;
} /* end if */
else {
H5FD_mem_t memb_map[H5FD_MEM_NTYPES];
@@ -6187,7 +6187,7 @@ test_mf_bug1(const char *env_h5_drvr, hid_t fapl)
/* Get current multi settings */
HDmemset(memb_name, 0, sizeof memb_name);
if (H5Pget_fapl_multi(copied_fapl, memb_map, memb_fapl_arr, memb_name, memb_addr, &relax) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Populate memb_fapl_arr, patch memb_addr so member file addresses
* are aligned */
@@ -6195,14 +6195,14 @@ test_mf_bug1(const char *env_h5_drvr, hid_t fapl)
/* Set alignment. Note that it is the block size of the parent FAPL that
* is important here. */
if (H5Pset_alignment(memb_fapl_arr[mt], 0, align) < 0)
- TEST_ERROR
+ TEST_ERROR;
memb_addr[mt] = ((memb_addr[mt] + align - 1) / align) * align;
} /* end for */
/* Set multi driver with new FAPLs */
if (H5Pset_fapl_multi(copied_fapl, memb_map, memb_fapl_arr, (const char *const *)memb_name,
memb_addr, relax) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Free memb_name */
for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt++)
@@ -6212,11 +6212,11 @@ test_mf_bug1(const char *env_h5_drvr, hid_t fapl)
/* Reopen the file with alignment */
if ((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, copied_fapl)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Get a pointer to the internal file object */
if (NULL == (f = (H5F_t *)H5VL_object(file)))
- TEST_ERROR
+ TEST_ERROR;
/* Allocate a block of size align from meta_aggr. This should create an
* aggregator that extends to the end of the file, with
@@ -6226,7 +6226,7 @@ test_mf_bug1(const char *env_h5_drvr, hid_t fapl)
/* Verify that the allocated block is aligned */
if (addr1 % align)
- TEST_ERROR
+ TEST_ERROR;
/* Allocate a block of size align from meta_aggr. This should force the
* aggregator to extend to the end of the file, with 0 bytes remaining, and
@@ -6236,11 +6236,11 @@ test_mf_bug1(const char *env_h5_drvr, hid_t fapl)
/* Verify that the allocated block is aligned */
if (addr2 % align)
- TEST_ERROR
+ TEST_ERROR;
/* Verify that the allocated block is placed align after the previous */
if ((addr2 - addr1) != align)
- TEST_ERROR
+ TEST_ERROR;
/* Allocate a block of size block_size + 1 from meta_aggr. This should
* force the aggregator to extend to the end of the file, with 0 bytes
@@ -6250,12 +6250,12 @@ test_mf_bug1(const char *env_h5_drvr, hid_t fapl)
/* Verify that the allocated block is aligned */
if (addr1 % align)
- TEST_ERROR
+ TEST_ERROR;
/* Verify that the allocated block is placed block_size / 2 after the
* previous */
if ((addr1 - addr2) != align)
- TEST_ERROR
+ TEST_ERROR;
/* Allocate a block of size 1. This should extend the aggregator from
* the previous allocation, and align the new block */
@@ -6264,21 +6264,21 @@ test_mf_bug1(const char *env_h5_drvr, hid_t fapl)
/* Verify that the allocated block is aligned */
if (addr2 % align)
- TEST_ERROR
+ TEST_ERROR;
/* Verify that the allocated block is placed 3 * (block_size / 2) after
* the previous */
if ((addr2 - addr1) != (3 * align))
- TEST_ERROR
+ TEST_ERROR;
PASSED();
if (H5Pclose(copied_fapl) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Close file */
if (H5Fclose(file) < 0)
- TEST_ERROR
+ TEST_ERROR;
return (0);
@@ -6334,226 +6334,226 @@ test_mf_fs_persist_split(void)
if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Set up split driver */
if (H5Pset_fapl_split(fapl, "-m.h5", H5P_DEFAULT, "-r.h5", H5P_DEFAULT) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* File creation property list template */
if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, TRUE, (hsize_t)1) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
/* Create the file to work on */
if ((file = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, 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;
/* Allocate 4 blocks of type H5FD_MEM_SUPER */
type = H5FD_MEM_SUPER;
if (HADDR_UNDEF == (addr1 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE1)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (HADDR_UNDEF == (addr2 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE2)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (HADDR_UNDEF == (addr3 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE3)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (HADDR_UNDEF == (addr4 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE4)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Put block #1, #3 into H5FD_MEM_SUPER free-space manager */
if (H5MF_xfree(f, type, addr1, (hsize_t)TBLOCK_SIZE1) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5MF_xfree(f, type, addr3, (hsize_t)TBLOCK_SIZE3) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Allocate 4 blocks of type H5FD_MEM_DRAW */
stype = H5FD_MEM_DRAW;
if (HADDR_UNDEF == (saddr1 = H5MF_alloc(f, stype, (hsize_t)TBLOCK_SIZE1)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (HADDR_UNDEF == (saddr2 = H5MF_alloc(f, stype, (hsize_t)TBLOCK_SIZE2)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (HADDR_UNDEF == (saddr3 = H5MF_alloc(f, stype, (hsize_t)TBLOCK_SIZE3)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (HADDR_UNDEF == (saddr4 = H5MF_alloc(f, stype, (hsize_t)TBLOCK_SIZE4)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Put block #1, #3 into H5FD_MEM_DRAW free-space manager */
if (H5MF_xfree(f, stype, saddr1, (hsize_t)TBLOCK_SIZE1) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5MF_xfree(f, stype, saddr3, (hsize_t)TBLOCK_SIZE3) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_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;
/* Verify that the H5FD_MEM_SUPER free-space manager is there */
if (!H5F_addr_defined(f->shared->fs_addr[type]))
- TEST_ERROR
+ TEST_ERROR;
/* Start up H5FD_MEM_SUPER free-space manager */
if (H5MF__open_fstype(f, (H5F_mem_page_t)type) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get free-space info */
if (H5FS_stat_info(f, f->shared->fs_man[type], &fs_stat) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Verify free-space info */
if (fs_stat.tot_space < (TBLOCK_SIZE1 + TBLOCK_SIZE3))
- TEST_ERROR
+ TEST_ERROR;
if (fs_stat.serial_sect_count < 2)
- TEST_ERROR
+ TEST_ERROR;
/* Retrieve block #1 from H5FD_MEM_SUPER free-space manager; block #3 still in free-space */
if (HADDR_UNDEF == (tmp_addr = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE1)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (tmp_addr != addr1)
- TEST_ERROR
+ TEST_ERROR;
/* Verify that the free-space manager for H5FD_MEM_DRAW is there */
if (!H5F_addr_defined(f->shared->fs_addr[stype]))
- TEST_ERROR
+ TEST_ERROR;
/* Start up H5FD_MEM_DRAW free-space manager */
if (H5MF__open_fstype(f, (H5F_mem_page_t)stype) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get free-space info */
if (H5FS_stat_info(f, f->shared->fs_man[stype], &fs_stat) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Verify free-space info */
if (fs_stat.tot_space < (TBLOCK_SIZE1 + TBLOCK_SIZE3))
- TEST_ERROR
+ TEST_ERROR;
if (fs_stat.serial_sect_count < 2)
- TEST_ERROR
+ TEST_ERROR;
/* Retrieve blocks #1 from H5FD_MEM_DRAW free-space manager */
if (HADDR_UNDEF == (tmp_addr = H5MF_alloc(f, stype, (hsize_t)TBLOCK_SIZE1)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (tmp_addr != saddr1)
- TEST_ERROR
+ TEST_ERROR;
/* Retrieve blocks #3 from H5FD_MEM_DRAW free-space manager */
if (HADDR_UNDEF == (tmp_addr = H5MF_alloc(f, stype, (hsize_t)TBLOCK_SIZE3)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (tmp_addr != saddr3)
- TEST_ERROR
+ TEST_ERROR;
/* H5FD_MEM_DRAW free-space manager is going away at closing */
/* works for this one because the freeing of sect_addr is to H5FD_MEM_SUPER fs, not against itself */
/* Allocate 4 blocks of type H5FD_MEM_BTREE */
btype = H5FD_MEM_BTREE;
if (HADDR_UNDEF == (baddr5 = H5MF_alloc(f, btype, (hsize_t)TBLOCK_SIZE5)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (HADDR_UNDEF == (baddr6 = H5MF_alloc(f, btype, (hsize_t)TBLOCK_SIZE6)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (HADDR_UNDEF == (baddr7 = H5MF_alloc(f, btype, (hsize_t)TBLOCK_SIZE7)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (HADDR_UNDEF == (baddr8 = H5MF_alloc(f, btype, (hsize_t)TBLOCK_SIZE8)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Put block #5 & #7 into H5FD_MEM_BTREE free-space manager */
if (H5MF_xfree(f, btype, baddr5, (hsize_t)TBLOCK_SIZE5) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5MF_xfree(f, btype, baddr7, (hsize_t)TBLOCK_SIZE7) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_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;
/* Verify that the free-space manager for H5FD_MEM_DRAW is not there */
if (H5F_addr_defined(f->shared->fs_addr[stype]))
- TEST_ERROR
+ TEST_ERROR;
/* Verify that the free-space manager for H5FD_MEM_SUPER is there */
if (!H5F_addr_defined(f->shared->fs_addr[type]))
- TEST_ERROR
+ TEST_ERROR;
/* Start up H5FD_MEM_SUPER free-space manager */
if (H5MF__open_fstype(f, (H5F_mem_page_t)type) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get free-space info */
if (H5FS_stat_info(f, f->shared->fs_man[type], &fs_stat) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Verify free-space info */
if (fs_stat.tot_space < (TBLOCK_SIZE3 + TBLOCK_SIZE5 + TBLOCK_SIZE7))
- TEST_ERROR
+ TEST_ERROR;
/* Retrieve block #3 from H5FD_MEM_SUPER free-space manager */
if (HADDR_UNDEF == (tmp_addr = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE3)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (tmp_addr != addr3)
- TEST_ERROR
+ TEST_ERROR;
/* Retrieve block #7 from H5FD_MEM_BTREE free-space manager */
if (HADDR_UNDEF == (tmp_addr = H5MF_alloc(f, btype, (hsize_t)TBLOCK_SIZE7)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (tmp_addr != baddr7)
- TEST_ERROR
+ TEST_ERROR;
/* There should still be block #5 of H5FD_MEM_BTREE in H5FD_MEM_BTREE free-space manager */
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_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;
/* Verify that the H5FD_MEM_SUPER free-space manager is there */
if (!H5F_addr_defined(f->shared->fs_addr[type]))
- TEST_ERROR
+ TEST_ERROR;
/* Start up H5FD_MEM_SUPER free-space manager */
if (H5MF__open_fstype(f, (H5F_mem_page_t)type) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get free-space info */
if (H5FS_stat_info(f, f->shared->fs_man[type], &fs_stat) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Verify free-space info */
if (fs_stat.tot_space < TBLOCK_SIZE5)
- TEST_ERROR
+ TEST_ERROR;
/* Closing */
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Pclose(fapl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Pclose(fcpl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
PASSED();
@@ -6652,13 +6652,13 @@ test_mf_fs_persist_multi(void)
/* File creation property list template */
if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, TRUE, (hsize_t)1) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
MULTI_SETUP(memb_map, memb_fapl, memb_name, memb_addr, sv)
@@ -6670,247 +6670,247 @@ test_mf_fs_persist_multi(void)
/* Create the file to work on */
if ((file = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, 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;
/* Allocate 4 blocks of type H5FD_MEM_SUPER */
type = H5FD_MEM_SUPER;
if (HADDR_UNDEF == (addr1 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE1)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (HADDR_UNDEF == (addr2 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE2)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (HADDR_UNDEF == (addr3 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE3)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (HADDR_UNDEF == (addr4 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE4)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Put block #1, #3 into H5FD_MEM_SUPER free-space manager */
if (H5MF_xfree(f, type, addr1, (hsize_t)TBLOCK_SIZE1) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5MF_xfree(f, type, addr3, (hsize_t)TBLOCK_SIZE3) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Allocate 4 blocks of type H5FD_MEM_DRAW */
stype = H5FD_MEM_DRAW;
if (HADDR_UNDEF == (saddr1 = H5MF_alloc(f, stype, (hsize_t)TBLOCK_SIZE1)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (HADDR_UNDEF == (saddr2 = H5MF_alloc(f, stype, (hsize_t)TBLOCK_SIZE2)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (HADDR_UNDEF == (saddr3 = H5MF_alloc(f, stype, (hsize_t)TBLOCK_SIZE3)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (HADDR_UNDEF == (saddr4 = H5MF_alloc(f, stype, (hsize_t)TBLOCK_SIZE4)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Put block #1, #3 into H5FD_MEM_DRAW free-space manager */
if (H5MF_xfree(f, stype, saddr1, (hsize_t)TBLOCK_SIZE1) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5MF_xfree(f, stype, saddr3, (hsize_t)TBLOCK_SIZE3) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_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;
/* Verify that the H5FD_MEM_SUPER free-space manager is there */
if (!H5F_addr_defined(f->shared->fs_addr[type]))
- TEST_ERROR
+ TEST_ERROR;
/* Start up H5FD_MEM_SUPER free-space manager */
if (H5MF__open_fstype(f, (H5F_mem_page_t)type) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get free-space info */
if (H5FS_stat_info(f, f->shared->fs_man[type], &fs_stat) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Verify free-space info */
if (fs_stat.tot_space < (TBLOCK_SIZE1 + TBLOCK_SIZE3))
- TEST_ERROR
+ TEST_ERROR;
if (fs_stat.serial_sect_count < 2)
- TEST_ERROR
+ TEST_ERROR;
/* Retrieve block #1 from H5FD_MEM_SUPER free-space manager; block #3 still in free-space */
if (HADDR_UNDEF == (tmp_addr = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE1)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (tmp_addr != addr1)
- TEST_ERROR
+ TEST_ERROR;
/* Verify that the free-space manager for H5FD_MEM_DRAW is there */
if (!H5F_addr_defined(f->shared->fs_addr[stype]))
- TEST_ERROR
+ TEST_ERROR;
/* Start up H5FD_MEM_DRAW free-space manager */
if (H5MF__open_fstype(f, (H5F_mem_page_t)stype) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get free-space info */
if (H5FS_stat_info(f, f->shared->fs_man[stype], &fs_stat) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Verify free-space info */
if (fs_stat.tot_space < (TBLOCK_SIZE1 + TBLOCK_SIZE3))
- TEST_ERROR
+ TEST_ERROR;
if (fs_stat.serial_sect_count < 2)
- TEST_ERROR
+ TEST_ERROR;
/* Retrieve blocks #1 from H5FD_MEM_DRAW free-space manager */
if (HADDR_UNDEF == (tmp_addr = H5MF_alloc(f, stype, (hsize_t)TBLOCK_SIZE1)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (tmp_addr != saddr1)
- TEST_ERROR
+ TEST_ERROR;
/* Retrieve blocks #3 from H5FD_MEM_DRAW free-space manager */
if (HADDR_UNDEF == (tmp_addr = H5MF_alloc(f, stype, (hsize_t)TBLOCK_SIZE3)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (tmp_addr != saddr3)
- TEST_ERROR
+ TEST_ERROR;
/* Allocate 4 blocks of type H5FD_MEM_BTREE */
btype = H5FD_MEM_BTREE;
if (HADDR_UNDEF == (baddr1 = H5MF_alloc(f, btype, (hsize_t)TBLOCK_SIZE1)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (HADDR_UNDEF == (baddr2 = H5MF_alloc(f, btype, (hsize_t)TBLOCK_SIZE2)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (HADDR_UNDEF == (baddr3 = H5MF_alloc(f, btype, (hsize_t)TBLOCK_SIZE3)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (HADDR_UNDEF == (baddr4 = H5MF_alloc(f, btype, (hsize_t)TBLOCK_SIZE4)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Put block #1 & #3 into H5FD_MEM_BTREE free-space manager */
if (H5MF_xfree(f, btype, baddr1, (hsize_t)TBLOCK_SIZE1) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5MF_xfree(f, btype, baddr3, (hsize_t)TBLOCK_SIZE3) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_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;
/* Verify that the free-space manager for H5FD_MEM_SUPER is there */
if (!H5F_addr_defined(f->shared->fs_addr[type]))
- TEST_ERROR
+ TEST_ERROR;
/* Start up H5FD_MEM_SUPER free-space manager */
if (H5MF__open_fstype(f, (H5F_mem_page_t)type) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get free-space info */
if (H5FS_stat_info(f, f->shared->fs_man[type], &fs_stat) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Verify free-space info */
if (fs_stat.tot_space < TBLOCK_SIZE3)
- TEST_ERROR
+ TEST_ERROR;
/* Retrieve block #3 from H5FD_MEM_SUPER free-space manager */
if (HADDR_UNDEF == (tmp_addr = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE3)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (tmp_addr != addr3)
- TEST_ERROR
+ TEST_ERROR;
/* Verify that the free-space manager for H5FD_MEM_DRAW is not there */
if (H5F_addr_defined(f->shared->fs_addr[stype]))
- TEST_ERROR
+ TEST_ERROR;
/* Verify that the free-space manager for H5FD_MEM_BTREE is there */
if (!H5F_addr_defined(f->shared->fs_addr[btype]))
- TEST_ERROR
+ TEST_ERROR;
/* Start up H5FD_MEM_BTREE free-space manager */
if (H5MF__open_fstype(f, (H5F_mem_page_t)btype) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get free-space info */
if (H5FS_stat_info(f, f->shared->fs_man[btype], &fs_stat) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Verify free-space info */
if (fs_stat.tot_space < (TBLOCK_SIZE1 + TBLOCK_SIZE3))
- TEST_ERROR
+ TEST_ERROR;
if (fs_stat.serial_sect_count < 2)
- TEST_ERROR
+ TEST_ERROR;
/* Allocate 2 blocks of type H5FD_MEM_GHEAP */
gtype = H5FD_MEM_GHEAP;
if (HADDR_UNDEF == (gaddr2 = H5MF_alloc(f, gtype, (hsize_t)TBLOCK_SIZE2)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (HADDR_UNDEF == (gaddr1 = H5MF_alloc(f, gtype, (hsize_t)TBLOCK_SIZE1)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Put block #2 into H5FD_MEM_GHEAP free-space manager */
if (H5MF_xfree(f, gtype, gaddr2, (hsize_t)TBLOCK_SIZE2) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_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;
/* If H5FD_MEM_SUPER is there, should not find block #1 & #3 */
if (H5F_addr_defined(f->shared->fs_addr[type])) {
/* Start up H5FD_MEM_SUPER free-space manager */
if (H5MF__open_fstype(f, (H5F_mem_page_t)type) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if ((node_found = H5FS_sect_find(f, f->shared->fs_man[type], (hsize_t)TBLOCK_SIZE1,
(H5FS_section_info_t **)&node)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (node_found)
- TEST_ERROR
+ TEST_ERROR;
if ((node_found = H5FS_sect_find(f, f->shared->fs_man[type], (hsize_t)TBLOCK_SIZE3,
(H5FS_section_info_t **)&node)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (node_found)
- TEST_ERROR
+ TEST_ERROR;
}
/* Verify that the H5FD_MEM_GHEAP free-space manager is there */
if (!H5F_addr_defined(f->shared->fs_addr[gtype]))
- TEST_ERROR
+ TEST_ERROR;
/* Start up H5FD_MEM_GHEAP free-space manager */
if (H5MF__open_fstype(f, (H5F_mem_page_t)gtype) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get free-space info */
if (H5FS_stat_info(f, f->shared->fs_man[gtype], &fs_stat) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Verify free-space info */
if (fs_stat.tot_space < TBLOCK_SIZE2)
- TEST_ERROR
+ TEST_ERROR;
/* Closing */
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Pclose(fapl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Pclose(fcpl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
PASSED();
@@ -6948,32 +6948,32 @@ test_mf_fs_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
haddr_t tmp_addr; /* Temporary variable for address */
if (new_format)
- TESTING("File's free-space is persistent with new library format")
+ TESTING("File's free-space is persistent with new library format");
else
- TESTING("File's free-space is persistent with old library format")
+ TESTING("File's free-space is persistent with old library format");
if (HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0) {
/* File creation property list template */
if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Copy the file access property list */
if ((fapl2 = H5Pcopy(fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (new_format) {
/* Latest format */
if (H5Pset_libver_bounds(fapl2, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Set to paged aggregation and persisting free-space */
if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, TRUE, (hsize_t)1) < 0)
- TEST_ERROR
+ TEST_ERROR;
}
else {
/* Setting: aggregation with persisting free-space */
if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, TRUE, (hsize_t)1) < 0)
- TEST_ERROR
+ TEST_ERROR;
}
/* Set the filename to use for this test (dependent on fapl) */
@@ -6981,107 +6981,107 @@ test_mf_fs_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
/* Create the file to work on */
if ((file = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl2)) < 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;
/* Allocate 6 blocks */
type = H5FD_MEM_SUPER;
if (HADDR_UNDEF == (addr1 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE1)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (HADDR_UNDEF == (addr2 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE2)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (HADDR_UNDEF == (addr3 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE3)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (HADDR_UNDEF == (addr4 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE4)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (HADDR_UNDEF == (addr5 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE5)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (HADDR_UNDEF == (addr6 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE6)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Put block #1, #3, #5 to H5FD_MEM_SUPER free-space manager */
if (H5MF_xfree(f, type, addr1, (hsize_t)TBLOCK_SIZE1) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5MF_xfree(f, type, addr3, (hsize_t)TBLOCK_SIZE3) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5MF_xfree(f, type, addr5, (hsize_t)TBLOCK_SIZE5) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Re-open the file */
if ((file = H5Fopen(filename, H5F_ACC_RDWR, fapl2)) < 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;
H5MF__alloc_to_fs_type(f->shared, type, TBLOCK_SIZE6, (H5F_mem_page_t *)&tt);
/* Verify that H5FD_MEM_SUPER free-space manager is there */
if (!H5F_addr_defined(f->shared->fs_addr[tt]))
- TEST_ERROR
+ TEST_ERROR;
/* Start up H5FD_MEM_SUPER free-space manager */
if (!(f->shared->fs_man[tt]))
if (H5MF__open_fstype(f, (H5F_mem_page_t)tt) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get info for free-space manager */
if (H5FS_stat_info(f, f->shared->fs_man[tt], &fs_stat) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Verify free-space info */
if (fs_stat.tot_space < (TBLOCK_SIZE1 + TBLOCK_SIZE3 + TBLOCK_SIZE5))
- TEST_ERROR
+ TEST_ERROR;
if (fs_stat.serial_sect_count < 3)
- TEST_ERROR
+ TEST_ERROR;
/* Retrieve block #3 from H5FD_MEM_SUPER free-space manager */
if (HADDR_UNDEF == (tmp_addr = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE3)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (tmp_addr != addr3)
- TEST_ERROR
+ TEST_ERROR;
/* Retrieve block #1 from H5FD_MEM_SUPER free-space manager */
if (HADDR_UNDEF == (tmp_addr = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE1)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (tmp_addr != addr1)
- TEST_ERROR
+ TEST_ERROR;
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_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;
/* Verify that H5FD_MEM_SUPER free-space manager is there */
if (!H5F_addr_defined(f->shared->fs_addr[tt]))
- TEST_ERROR
+ TEST_ERROR;
/* Retrieve block #5 from H5FD_MEM_SUPER free-space manager */
if (HADDR_UNDEF == (tmp_addr = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE5)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (tmp_addr != addr5)
- TEST_ERROR
+ TEST_ERROR;
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Pclose(fcpl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Pclose(fapl2) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
PASSED();
}
@@ -7124,9 +7124,9 @@ test_mf_fs_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
hbool_t contig_addr_vfd;
if (new_format)
- TESTING("File's free-space is going away with new library format")
+ TESTING("File's free-space is going away with new library format");
else
- TESTING("File's free-space is going away with old library format")
+ TESTING("File's free-space is going away with old library format");
/* Current VFD that does not support contiguous address space */
contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
@@ -7135,142 +7135,142 @@ test_mf_fs_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
/* File creation property list template */
if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Copy the file access property list */
if ((fapl2 = H5Pcopy(fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (new_format) {
if (H5Pset_libver_bounds(fapl2, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
}
else {
if (H5Pset_libver_bounds(fapl2, H5F_LIBVER_V18, H5F_LIBVER_LATEST) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
}
/* Set to aggregation and persisting free-space */
if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, TRUE, (hsize_t)1) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl2, filename, sizeof(filename));
/* Create the file to work on */
if ((file = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl2)) < 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;
/* Allocate 4 blocks */
type = H5FD_MEM_SUPER;
if (HADDR_UNDEF == (addr1 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE1)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (HADDR_UNDEF == (addr2 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE2)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (HADDR_UNDEF == (addr3 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE3)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (HADDR_UNDEF == (addr4 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE4)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Put block #1, #3 to H5FD_MEM_SUPER free-space manager */
if (H5MF_xfree(f, type, addr1, (hsize_t)TBLOCK_SIZE1) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5MF_xfree(f, type, addr3, (hsize_t)TBLOCK_SIZE3) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Retrieve block #1, #3 from H5FD_MEM_SUPER free-space manager */
if (HADDR_UNDEF == (addr3 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE3)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (HADDR_UNDEF == (addr1 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE1)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Re-open the file */
if ((file = H5Fopen(filename, H5F_ACC_RDWR, fapl2)) < 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;
H5MF__alloc_to_fs_type(f->shared, type, TBLOCK_SIZE4, (H5F_mem_page_t *)&fs_type);
/* Verify that the H5FD_MEM_SUPER free-space manager is not there */
if (H5F_addr_defined(f->shared->fs_addr[fs_type]))
- TEST_ERROR
+ TEST_ERROR;
/* Put block #3 to H5FD_MEM_SUPER free-space manager */
if (H5MF_xfree(f, type, addr3, (hsize_t)TBLOCK_SIZE3) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Re-open the file */
if ((file = H5Fopen(filename, H5F_ACC_RDWR, fapl2)) < 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;
/* Verify that H5FD_MEM_SUPER free-space manager is there */
if (!H5F_addr_defined(f->shared->fs_addr[fs_type]))
- TEST_ERROR
+ TEST_ERROR;
/* Start up H5FD_MEM_SUPER free-space manager */
if (!(f->shared->fs_man[fs_type]))
if (H5MF__open_fstype(f, (H5F_mem_page_t)fs_type) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get info for H5FD_MEM_SUPER free-space manager */
if (H5FS_stat_info(f, f->shared->fs_man[fs_type], &fs_stat) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (!H5F_addr_defined(fs_stat.addr))
- TEST_ERROR
+ TEST_ERROR;
if (fs_stat.tot_space < TBLOCK_SIZE3)
- TEST_ERROR
+ TEST_ERROR;
/* Allocate/free space accordingly so that the free-space manager will go away */
if (new_format) {
if (H5MF_xfree(f, type, addr4, (hsize_t)TBLOCK_SIZE4) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
}
else {
if (HADDR_UNDEF == (addrx = H5MF_alloc(f, type, (hsize_t)3)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
}
/* The H5FD_MEM_SUPER free-space manager will go away at H5MF_close() */
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Re-open the file */
if ((file = H5Fopen(filename, H5F_ACC_RDWR, fapl2)) < 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;
/* Verify that the H5FD_MEM_SUPER free-space manager is not there */
if (H5F_addr_defined(f->shared->fs_addr[fs_type]))
- TEST_ERROR
+ TEST_ERROR;
/* Closing */
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Pclose(fcpl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Pclose(fapl2) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
PASSED();
}
@@ -7315,9 +7315,9 @@ test_mf_strat_thres_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_for
hbool_t contig_addr_vfd;
if (new_format)
- TESTING("File space strategy/persisting/threshold with new library format")
+ TESTING("File space strategy/persisting/threshold with new library format");
else
- TESTING("File space strategy/persisting/threshold with old library format")
+ TESTING("File space strategy/persisting/threshold with old library format");
/* Current VFD that does not support contiguous address space */
contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
@@ -7327,11 +7327,11 @@ test_mf_strat_thres_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_for
/* Copy the file access property list */
if ((fapl2 = H5Pcopy(fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (new_format)
if (H5Pset_libver_bounds(fapl2, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Test with TRUE or FALSE for persisting free-space */
for (fs_persist = FALSE; fs_persist <= TRUE; fs_persist++) {
@@ -7346,60 +7346,60 @@ test_mf_strat_thres_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_for
/* Create file-creation template */
if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Set default file space information */
if (H5Pset_file_space_strategy(fcpl, fs_type, (hbool_t)fs_persist, fs_threshold) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Create the file to work on */
if ((file = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl2)) < 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;
/* Allocate 6 blocks */
type = H5FD_MEM_SUPER;
if (HADDR_UNDEF == (addr1 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE1)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (HADDR_UNDEF == (addr2 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE2)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (HADDR_UNDEF == (addr3 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE3)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (HADDR_UNDEF == (addr4 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE4)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (HADDR_UNDEF == (addr5 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE5)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (HADDR_UNDEF == (addr6 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE6)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Put block #1, #3, #5 to H5FD_MEM_SUPER free-space manager */
if (H5MF_xfree(f, type, addr1, (hsize_t)TBLOCK_SIZE1) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5MF_xfree(f, type, addr3, (hsize_t)TBLOCK_SIZE3) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5MF_xfree(f, type, addr5, (hsize_t)TBLOCK_SIZE5) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close the file */
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Re-open the file */
if ((file = H5Fopen(filename, H5F_ACC_RDWR, fapl2)) < 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;
H5MF__alloc_to_fs_type(f->shared, type, TBLOCK_SIZE6, (H5F_mem_page_t *)&tt);
/* Get a pointer to the internal file object */
if (NULL == (f = (H5F_t *)H5VL_object(file)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (f->shared->fs_persist) {
hssize_t nsects; /* # of free-space sections */
@@ -7408,12 +7408,12 @@ test_mf_strat_thres_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_for
/* Get the # of free-space sections in the file */
if ((nsects = H5Fget_free_sections(file, H5FD_MEM_DEFAULT, (size_t)0, NULL)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Verify no free-space sections */
/* paged aggregation has 1 section for last_small */
if (fs_threshold > TBLOCK_SIZE5 && nsects && fs_type != H5F_FSPACE_STRATEGY_PAGE)
- TEST_ERROR
+ TEST_ERROR;
if (nsects) {
/* Allocate storage for the free space section information */
@@ -7424,27 +7424,27 @@ test_mf_strat_thres_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_for
/* Verify the size of free-space sections */
for (i = 0; i < nsects; i++)
if (sect_info[i].size < fs_threshold)
- TEST_ERROR
+ TEST_ERROR;
if (sect_info)
HDfree(sect_info);
}
}
else {
if (H5F_addr_defined(f->shared->fs_addr[tt]))
- TEST_ERROR
+ TEST_ERROR;
}
/* Closing */
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Pclose(fcpl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
} /* end for fs_type */
} /* end for fs_threshold */
} /* end for fs_persist */
if (H5Pclose(fapl2) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
PASSED();
@@ -7485,9 +7485,9 @@ test_mf_strat_thres_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format
hbool_t contig_addr_vfd;
if (new_format)
- TESTING("File space merge/shrink for section size < threshold with new library format")
+ TESTING("File space merge/shrink for section size < threshold with new library format");
else
- TESTING("File space merge/shrink for section size < threshold with old library format")
+ TESTING("File space merge/shrink for section size < threshold with old library format");
/* Current VFD that does not support contiguous address space */
contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
@@ -7499,11 +7499,11 @@ test_mf_strat_thres_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format
/* Copy the file access property list */
if ((fapl2 = H5Pcopy(fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (new_format)
if (H5Pset_libver_bounds(fapl2, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Test with TRUE or FALSE for persisting free-space */
for (fs_persist = FALSE; fs_persist <= TRUE; fs_persist++) {
@@ -7519,68 +7519,68 @@ test_mf_strat_thres_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format
/* Create file-creation template */
if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Set default file space information */
if (H5Pset_file_space_strategy(fcpl, fs_type, fs_persist, (hsize_t)TEST_THRESHOLD3) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Create the file to work on */
if ((file = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl2)) < 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;
/* Allocate 6 blocks */
type = H5FD_MEM_SUPER;
if (HADDR_UNDEF == (addr1 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE1)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (HADDR_UNDEF == (addr2 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE2)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (HADDR_UNDEF == (addr3 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE3)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (HADDR_UNDEF == (addr4 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE4)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (HADDR_UNDEF == (addr5 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE5)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (HADDR_UNDEF == (addr6 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE6)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
H5MF__alloc_to_fs_type(f->shared, type, TBLOCK_SIZE6, (H5F_mem_page_t *)&tt);
/* For paged aggregation, the section in the page at EOF for small meta fs is not shrunk away */
if (fs_type == H5F_FSPACE_STRATEGY_PAGE)
if (H5FS_stat_info(f, f->shared->fs_man[tt], &fs_state) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Put block #3, #5 to H5FD_MEM_SUPER free-space manager */
if (H5MF_xfree(f, type, addr3, (hsize_t)TBLOCK_SIZE3) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5MF_xfree(f, type, addr5, (hsize_t)TBLOCK_SIZE5) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
fs_state.tot_space += TBLOCK_SIZE3 + TBLOCK_SIZE5;
fs_state.tot_sect_count += 2;
fs_state.serial_sect_count += 2;
if (check_stats(f, f->shared->fs_man[tt], &fs_state))
- TEST_ERROR
+ TEST_ERROR;
/* section #2 is less than threshold but is merged into section #3 */
if (H5MF_xfree(f, type, addr2, (hsize_t)TBLOCK_SIZE2) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
fs_state.tot_space += TBLOCK_SIZE2;
if (check_stats(f, f->shared->fs_man[tt], &fs_state))
- TEST_ERROR
+ TEST_ERROR;
if (H5MF_xfree(f, type, addr4, (hsize_t)TBLOCK_SIZE4) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5MF_xfree(f, type, addr6, (hsize_t)TBLOCK_SIZE6) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* For paged aggregation, the sections in the page at EOF for small meta fs are merged but are not
* shrunk away */
@@ -7592,11 +7592,11 @@ test_mf_strat_thres_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format
/* For old format: the sections at EOF are shrunk away */
if (check_stats(f, f->shared->fs_man[tt],
(fs_type == H5F_FSPACE_STRATEGY_PAGE) ? &fs_state : &fs_state_zero))
- TEST_ERROR
+ TEST_ERROR;
/* section #1 is less than threshold but is shrunk away */
if (H5MF_xfree(f, type, addr1, (hsize_t)TBLOCK_SIZE1) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* For paged aggregation, the section in the page at EOF for small meta fs is not shrunk away */
if (fs_type == H5F_FSPACE_STRATEGY_PAGE)
@@ -7605,35 +7605,35 @@ test_mf_strat_thres_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format
/* For old format: the sections at EOF are shrunk away */
if (check_stats(f, f->shared->fs_man[tt],
(fs_type == H5F_FSPACE_STRATEGY_PAGE) ? &fs_state : &fs_state_zero))
- TEST_ERROR
+ TEST_ERROR;
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Re-open the file */
if ((file = H5Fopen(filename, H5F_ACC_RDWR, fapl2)) < 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;
/* Free-space manager should be empty */
if (!(fs_type == H5F_FSPACE_STRATEGY_PAGE && fs_persist))
if (H5F_addr_defined(f->shared->fs_addr[tt]))
- TEST_ERROR
+ TEST_ERROR;
/* Closing */
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Pclose(fcpl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
} /* end for fs_type */
} /* end for fs_persist */
if (H5Pclose(fapl2) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
PASSED();
@@ -7688,11 +7688,11 @@ test_dichotomy(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;
/* Allocate the first block of type H5FD_MEM_SUPER */
type = H5FD_MEM_SUPER;
@@ -7713,7 +7713,7 @@ test_dichotomy(hid_t fapl)
/* Verify that saddr1 is not addr1 */
if (saddr2 == addr1)
- TEST_ERROR
+ TEST_ERROR;
/* Free the first block of type H5FD_MEM_DRAW */
H5MF_xfree(f, stype, saddr1, (hsize_t)TBLOCK_SIZE30);
@@ -7723,10 +7723,10 @@ test_dichotomy(hid_t fapl)
/* Verify that addr3 is not saddr1 */
if (addr3 == saddr1)
- TEST_ERROR
+ TEST_ERROR;
if (H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
PASSED();
@@ -7764,7 +7764,7 @@ set_multi_split(hid_t fapl, hsize_t pagesize, hbool_t is_multi_or_split)
/* Get current split settings */
if (H5Pget_fapl_multi(fapl, memb_map, memb_fapl_arr, memb_name, memb_addr, &relax) < 0)
- TEST_ERROR
+ TEST_ERROR;
if (is_multi_or_split) {
/* Set memb_addr aligned */
@@ -7780,7 +7780,7 @@ set_multi_split(hid_t fapl, hsize_t pagesize, hbool_t is_multi_or_split)
/* Set multi driver with new FAPLs */
if (H5Pset_fapl_multi(fapl, memb_map, memb_fapl_arr, (const char *const *)memb_name, memb_addr, relax) <
0)
- TEST_ERROR
+ TEST_ERROR;
/* Free memb_name */
for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt++)
@@ -7835,7 +7835,7 @@ test_page_alloc_xfree(const char *env_h5_drvr, hid_t fapl)
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
if ((fapl_new = H5Pcopy(fapl)) < 0)
- TEST_ERROR
+ TEST_ERROR;
if (multi || split)
if (set_multi_split(fapl_new, 4096, split) < 0)
@@ -7847,19 +7847,19 @@ test_page_alloc_xfree(const char *env_h5_drvr, hid_t fapl)
/* File creation property list */
if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Set the strategy to paged aggregation */
if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, fs_persist, (hsize_t)1) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Create the file to work on */
if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl_new)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Get a pointer to the internal file object */
if (NULL == (f = (H5F_t *)H5VL_object(fid)))
- TEST_ERROR
+ TEST_ERROR;
/* Allocate 3 small metadata blocks: addr1, addr2, addr3 */
H5MF_alloc(f, H5FD_MEM_OHDR, (hsize_t)TBLOCK_SIZE30);
@@ -7875,9 +7875,9 @@ test_page_alloc_xfree(const char *env_h5_drvr, hid_t fapl)
/* Verify that the freed block with addr2 is found from the small metadata manager */
if (H5MF__find_sect(f, H5FD_MEM_OHDR, (hsize_t)TBLOCK_SIZE1034, f->shared->fs_man[fs_type],
&found_addr) < 0)
- TEST_ERROR
+ TEST_ERROR;
if (found_addr != addr2)
- TEST_ERROR
+ TEST_ERROR;
} /* end if */
/* Allocate 2 small raw data blocks: saddr1, saddr2 */
@@ -7891,9 +7891,9 @@ test_page_alloc_xfree(const char *env_h5_drvr, hid_t fapl)
/* Verify that the freed block with saddr1 is found from the small raw data manager */
if (H5MF__find_sect(f, H5FD_MEM_DRAW, (hsize_t)TBLOCK_SIZE30,
f->shared->fs_man[H5F_MEM_PAGE_DRAW], &found_addr) < 0)
- TEST_ERROR
+ TEST_ERROR;
if (found_addr != saddr1)
- TEST_ERROR
+ TEST_ERROR;
} /* end if */
/* Allocate 2 large data blocks: gaddr1, gaddr2 */
@@ -7909,29 +7909,29 @@ test_page_alloc_xfree(const char *env_h5_drvr, hid_t fapl)
/* Verify that the freed block with gaddr1 is found from the large data manager */
if (H5MF__find_sect(f, H5FD_MEM_DRAW, (hsize_t)TBLOCK_SIZE8192, f->shared->fs_man[fs_type],
&found_addr) < 0)
- TEST_ERROR
+ TEST_ERROR;
if (found_addr != gaddr1)
- TEST_ERROR
+ TEST_ERROR;
} /* end if */
/* Close file */
if (H5Fclose(fid) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Close the property list */
if (H5Pclose(fcpl) < 0)
- TEST_ERROR
+ TEST_ERROR;
if (fs_persist) {
haddr_t prv_tag = HADDR_UNDEF;
/* Re-open the file */
if ((fid = H5Fopen(filename, H5F_ACC_RDWR, fapl_new)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Get a pointer to the internal file object */
if (NULL == (f = (H5F_t *)H5VL_object(fid)))
- TEST_ERROR
+ TEST_ERROR;
/* Set the freespace tag for the metadata cache */
H5AC_tag(H5AC__FREESPACE_TAG, &prv_tag);
@@ -7939,69 +7939,69 @@ test_page_alloc_xfree(const char *env_h5_drvr, hid_t fapl)
/* Verify that the large generic manager is there */
H5MF__alloc_to_fs_type(f->shared, H5FD_MEM_DRAW, TBLOCK_SIZE5000, (H5F_mem_page_t *)&fs_type);
if (!H5F_addr_defined(f->shared->fs_addr[fs_type]))
- TEST_ERROR
+ TEST_ERROR;
/* Verify that the small metadata manager is there */
H5MF__alloc_to_fs_type(f->shared, H5FD_MEM_OHDR, f->shared->fs_page_size - 1,
(H5F_mem_page_t *)&fs_type);
if (!H5F_addr_defined(f->shared->fs_addr[fs_type]))
- TEST_ERROR
+ TEST_ERROR;
/* Set up to use the small metadata manager */
if (!(f->shared->fs_man[fs_type]))
if (H5MF__open_fstype(f, fs_type) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Verify that the freed block with addr2 is found from the small metadata manager */
if (H5MF__find_sect(f, H5FD_MEM_OHDR,
(hsize_t)(f->shared->fs_page_size - (addr3 + TBLOCK_SIZE50)),
f->shared->fs_man[fs_type], &found_addr) < 0)
- TEST_ERROR
+ TEST_ERROR;
if (found_addr != (addr3 + TBLOCK_SIZE50))
- TEST_ERROR
+ TEST_ERROR;
/* Verify that the small raw data manager is there */
if (!H5F_addr_defined(f->shared->fs_addr[H5F_MEM_PAGE_DRAW]))
- TEST_ERROR
+ TEST_ERROR;
/* Set up to use the small raw data manager */
if (!(f->shared->fs_man[H5F_MEM_PAGE_DRAW]))
if (H5MF__open_fstype(f, H5F_MEM_PAGE_DRAW) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Verify that the freed block with saddr1 is found from the small raw data manager */
if (H5MF__find_sect(f, H5FD_MEM_DRAW, (hsize_t)TBLOCK_SIZE30,
f->shared->fs_man[H5F_MEM_PAGE_DRAW], &found_addr) < 0)
- TEST_ERROR
+ TEST_ERROR;
if (found_addr != saddr1)
- TEST_ERROR
+ TEST_ERROR;
H5MF__alloc_to_fs_type(f->shared, H5FD_MEM_DRAW, TBLOCK_SIZE5000, (H5F_mem_page_t *)&fs_type);
if (!(f->shared->fs_man[fs_type]))
/* Set up to use the large data manager */
if (H5MF__open_fstype(f, fs_type) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Verify that the freed block with gaddr1 is found from the large data manager */
if (H5MF__find_sect(f, H5FD_MEM_DRAW, (hsize_t)TBLOCK_SIZE8192, f->shared->fs_man[fs_type],
&found_addr) < 0)
- TEST_ERROR
+ TEST_ERROR;
if (found_addr != gaddr1)
- TEST_ERROR
+ TEST_ERROR;
/* Reset the previous tag */
H5AC_tag(prv_tag, NULL);
/* Close file */
if (H5Fclose(fid) < 0)
- TEST_ERROR
+ TEST_ERROR;
} /* end if fs_persist */
} /* end for */
if (H5Pclose(fapl_new) < 0)
- TEST_ERROR
+ TEST_ERROR;
PASSED();
}
@@ -8064,55 +8064,55 @@ test_page_try_shrink(const char *env_h5_drvr, hid_t fapl)
/* File creation property list */
if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Set the strategy to paged aggregation */
if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, FALSE, (hsize_t)1) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Create the file to work on */
if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get a pointer to the internal file object */
if (NULL == (f = (H5F_t *)H5VL_object(fid)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Allocate a small metadata block with addr1 */
addr1 = H5MF_alloc(f, H5FD_MEM_OHDR, (hsize_t)TBLOCK_SIZE50);
/* Try to shrink the block with addr1 */
if ((status = H5MF_try_shrink(f, H5FD_MEM_OHDR, addr1, (hsize_t)TBLOCK_SIZE50)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Couldn't shrink due to the section (remaining space in the page) is in the small metadata
* free-space manager */
if (status == TRUE)
- TEST_ERROR
+ TEST_ERROR;
/* Allocate a small raw data block with saddr1 */
saddr1 = H5MF_alloc(f, H5FD_MEM_DRAW, (hsize_t)TBLOCK_SIZE50);
/* Try to shrink the block with saddr1 */
if ((status = H5MF_try_shrink(f, H5FD_MEM_DRAW, saddr1, (hsize_t)TBLOCK_SIZE50)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Couldn't shrink due to the section (remaining space in the page) is in the small raw data
* free-space manager */
if (status == TRUE)
- TEST_ERROR
+ TEST_ERROR;
/* Allocate a large data block with gaddr1 */
gaddr1 = H5MF_alloc(f, H5FD_MEM_DRAW, (hsize_t)TBLOCK_SIZE5000);
/* Try to shrink the block with gaddr1 */
if ((status = H5MF_try_shrink(f, H5FD_MEM_DRAW, gaddr1, (hsize_t)TBLOCK_SIZE5000)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Couldn't shrink due to the section (remaining space in the page) is in the large-sized free-space
* manager */
if (status == TRUE)
- TEST_ERROR
+ TEST_ERROR;
/* Free the block with saddr1--merge to become 1 page, then return to the large manager */
H5MF_xfree(f, H5FD_MEM_DRAW, saddr1, (hsize_t)TBLOCK_SIZE50);
@@ -8121,19 +8121,19 @@ test_page_try_shrink(const char *env_h5_drvr, hid_t fapl)
H5MF_xfree(f, H5FD_MEM_OHDR, gaddr1, (hsize_t)TBLOCK_SIZE5000);
if (H5Fclose(fid) < 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;
/* Should be on page boundary */
if (file_size % TBLOCK_SIZE4096)
- TEST_ERROR
+ TEST_ERROR;
/* Close the property list */
if (H5Pclose(fcpl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
PASSED();
}
@@ -8194,19 +8194,19 @@ test_page_small_try_extend(const char *env_h5_drvr, hid_t fapl)
/* File creation property list */
if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Set the strategy to paged aggregation */
if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, FALSE, (hsize_t)1) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Create the file to work on */
if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get a pointer to the internal file object */
if (NULL == (f = (H5F_t *)H5VL_object(fid)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Allocate a small metadata block with addr1 */
addr1 = H5MF_alloc(f, H5FD_MEM_OHDR, (hsize_t)TBLOCK_SIZE98);
@@ -8216,7 +8216,7 @@ test_page_small_try_extend(const char *env_h5_drvr, hid_t fapl)
H5MF_try_extend(f, H5FD_MEM_OHDR, (haddr_t)addr1, (hsize_t)TBLOCK_SIZE98, (hsize_t)3100);
/* Should succeed */
if (was_extended != TRUE)
- TEST_ERROR
+ TEST_ERROR;
/* Allocate 2 small metadata blocks with addr2 and addr3--will be on another metadata page */
addr2 = H5MF_alloc(f, H5FD_MEM_OHDR, (hsize_t)TBLOCK_SIZE100);
@@ -8225,9 +8225,9 @@ test_page_small_try_extend(const char *env_h5_drvr, hid_t fapl)
/* The block with addr2 should be page aligned */
/* The block with addr3 resides right next to the block with addr2 */
if (addr2 % TBLOCK_SIZE4096)
- TEST_ERROR
+ TEST_ERROR;
if (addr3 != (addr2 + TBLOCK_SIZE100))
- TEST_ERROR
+ TEST_ERROR;
/* Free the block with addr2 */
H5MF_xfree(f, H5FD_MEM_OHDR, addr2, (hsize_t)TBLOCK_SIZE100);
@@ -8238,7 +8238,7 @@ test_page_small_try_extend(const char *env_h5_drvr, hid_t fapl)
(hsize_t)TBLOCK_SIZE100);
/* Shouldn't succeed--should not cross page boundary */
if (was_extended == TRUE)
- TEST_ERROR
+ TEST_ERROR;
/* Try extending the block with addr1 into the free-space section that is big enough to fulfill the
* request */
@@ -8246,7 +8246,7 @@ test_page_small_try_extend(const char *env_h5_drvr, hid_t fapl)
(hsize_t)TBLOCK_SIZE50);
/* Should succeed */
if (was_extended != TRUE)
- TEST_ERROR
+ TEST_ERROR;
/* Free the block with addr1 */
H5MF_xfree(f, H5FD_MEM_OHDR, addr1, (hsize_t)TBLOCK_SIZE3248);
@@ -8261,14 +8261,14 @@ test_page_small_try_extend(const char *env_h5_drvr, hid_t fapl)
(hsize_t)TBLOCK_SIZE11);
/* Shouldn't succeed */
if (was_extended == TRUE)
- TEST_ERROR
+ TEST_ERROR;
/* Try extending the block into the threshold with size < H5F_FILE_SPACE_PGEND_META_THRES */
was_extended = H5MF_try_extend(f, H5FD_MEM_OHDR, (haddr_t)addr1, (hsize_t)TBLOCK_SIZE3286,
(hsize_t)TBLOCK_SIZE2);
/* Should succeed */
if (was_extended != TRUE)
- TEST_ERROR
+ TEST_ERROR;
/* Free the block with addr3--will merge with the remaining sections to become a page and then free
* the page */
@@ -8282,14 +8282,14 @@ test_page_small_try_extend(const char *env_h5_drvr, hid_t fapl)
(hsize_t)TBLOCK_SIZE11);
/* Shouldn't succeed */
if (was_extended == TRUE)
- TEST_ERROR
+ TEST_ERROR;
/* Try extending the block not crossing page boundary */
was_extended = H5MF_try_extend(f, H5FD_MEM_DRAW, (haddr_t)saddr1, (hsize_t)TBLOCK_SIZE4086,
(hsize_t)TBLOCK_SIZE10);
/* Should succeed */
if (was_extended != TRUE)
- TEST_ERROR
+ TEST_ERROR;
/* The extended block is now "large" in size */
/* Try extending the block */
@@ -8297,7 +8297,7 @@ test_page_small_try_extend(const char *env_h5_drvr, hid_t fapl)
(hsize_t)TBLOCK_SIZE10);
/* Should succeed */
if (was_extended != TRUE)
- TEST_ERROR
+ TEST_ERROR;
/* Try extending the large-sized block */
was_extended = H5MF_try_extend(f, H5FD_MEM_DRAW, (haddr_t)saddr1, (hsize_t)TBLOCK_SIZE4106,
@@ -8305,15 +8305,15 @@ test_page_small_try_extend(const char *env_h5_drvr, hid_t fapl)
/* Should not succeed because the mis-aligned fragment in the page is in the large-sized free-space
* manager */
if (was_extended == TRUE)
- TEST_ERROR
+ TEST_ERROR;
/* Close the file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close the property list */
if (H5Pclose(fcpl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
PASSED();
}
@@ -8372,52 +8372,52 @@ test_page_large_try_extend(const char *env_h5_drvr, hid_t fapl)
/* File creation property list */
if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Set the strategy to paged aggregation */
if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, FALSE, (hsize_t)1) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Create the file to work on */
if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get a pointer to the internal file object */
if (NULL == (f = (H5F_t *)H5VL_object(fid)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Allocate a large data block with gaddr1 */
gaddr1 = H5MF_alloc(f, H5FD_MEM_DRAW, (hsize_t)6000);
/* Should be page aligned */
if (gaddr1 % TBLOCK_SIZE4096)
- TEST_ERROR
+ TEST_ERROR;
/* Extending the block with gaddr1 at EOF to become 2 pages */
was_extended = H5MF_try_extend(f, H5FD_MEM_DRAW, (haddr_t)gaddr1, (hsize_t)TBLOCK_SIZE6000,
(hsize_t)TBLOCK_SIZE2192);
/* Should succeed */
if (was_extended != TRUE)
- TEST_ERROR
+ TEST_ERROR;
/* Allocate a large data block with gaddr2 */
gaddr2 = H5MF_alloc(f, H5FD_MEM_DRAW, (hsize_t)TBLOCK_SIZE8000);
/* Should be page aligned */
if (gaddr2 % TBLOCK_SIZE4096)
- TEST_ERROR
+ TEST_ERROR;
/* Try extending the block with gaddr1 */
was_extended = H5MF_try_extend(f, H5FD_MEM_DRAW, (haddr_t)gaddr1, (hsize_t)TBLOCK_SIZE8192,
(hsize_t)TBLOCK_SIZE50);
/* Should not succeed */
if (was_extended == TRUE)
- TEST_ERROR
+ TEST_ERROR;
/* Allocate a large data block with gaddr3 */
gaddr3 = H5MF_alloc(f, H5FD_MEM_DRAW, (hsize_t)TBLOCK_SIZE8000);
/* Should be page aligned */
if (gaddr3 % TBLOCK_SIZE4096)
- TEST_ERROR
+ TEST_ERROR;
/* Try extending the block with gaddr2--there is a free-space section big enough to fulfill the
* request */
@@ -8425,7 +8425,7 @@ test_page_large_try_extend(const char *env_h5_drvr, hid_t fapl)
(hsize_t)TBLOCK_SIZE100);
/* Should succeed */
if (was_extended == FALSE)
- TEST_ERROR
+ TEST_ERROR;
/* Try extending the block with gaddr2--there is no free-space section big enough to fulfill the
* request */
@@ -8433,7 +8433,7 @@ test_page_large_try_extend(const char *env_h5_drvr, hid_t fapl)
(hsize_t)TBLOCK_SIZE100);
/* Should not succeed */
if (was_extended == TRUE)
- TEST_ERROR
+ TEST_ERROR;
/* Try extending the block with gaddr2--there is a free-space section big enough to fulfill the
* request */
@@ -8441,7 +8441,7 @@ test_page_large_try_extend(const char *env_h5_drvr, hid_t fapl)
(hsize_t)TBLOCK_SIZE90);
/* Should succeed */
if (was_extended == FALSE)
- TEST_ERROR
+ TEST_ERROR;
/* Try extending the block with gaddr2 */
/* There is no free-space section big enough to fulfill the request (request is <
@@ -8450,13 +8450,13 @@ test_page_large_try_extend(const char *env_h5_drvr, hid_t fapl)
(hsize_t)TBLOCK_SIZE5);
/* Should not succeed */
if (was_extended == TRUE)
- TEST_ERROR
+ TEST_ERROR;
/* Allocate a large data block with gaddr4 */
gaddr4 = H5MF_alloc(f, H5FD_MEM_DRAW, (hsize_t)TBLOCK_SIZE5000);
/* Should be page aligned */
if (gaddr4 % TBLOCK_SIZE4096)
- TEST_ERROR
+ TEST_ERROR;
/* Free the block with gaddr3--will merge with remaining free space to become 2 pages + section (size
* 2) in previous page */
@@ -8468,15 +8468,15 @@ test_page_large_try_extend(const char *env_h5_drvr, hid_t fapl)
(hsize_t)TBLOCK_SIZE5);
/* Should succeed */
if (was_extended == FALSE)
- TEST_ERROR
+ TEST_ERROR;
/* Close file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close the property list */
if (H5Pclose(fcpl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
PASSED();
}
@@ -8536,19 +8536,19 @@ test_page_large(const char *env_h5_drvr, hid_t fapl)
/* File creation property list */
if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Set the strategy to paged aggregation */
if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, FALSE, (hsize_t)1) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Create the file to work on */
if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get a pointer to the internal file object */
if (NULL == (f = (H5F_t *)H5VL_object(fid)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Allocate a large data block with gaddr1 */
/* 1 page + 1904 bytes; 2192 bytes in free-space manager */
@@ -8556,20 +8556,20 @@ test_page_large(const char *env_h5_drvr, hid_t fapl)
/* Should be page aligned */
if (gaddr1 % TBLOCK_SIZE4096)
- TEST_ERROR
+ TEST_ERROR;
/* Allocate a large data block with gaddr2--should be on another page */
/* Allocate 1 page + 3904 bytes; 192 bytes in free-space manager */
gaddr2 = H5MF_alloc(f, H5FD_MEM_DRAW, (hsize_t)TBLOCK_SIZE8000);
/* Should be page aligned */
if (gaddr2 % TBLOCK_SIZE4096)
- TEST_ERROR
+ TEST_ERROR;
/* Allocate a large data block with gaddr3--should be on another page */
/* Allocate 2 pages + 3808 bytes; 288 bytes in free-space manager */
gaddr3 = H5MF_alloc(f, H5FD_MEM_DRAW, (hsize_t)TBLOCK_SIZE12000);
if (!H5F_addr_defined(gaddr3))
- TEST_ERROR
+ TEST_ERROR;
/* Free the block with gaddr2 */
/* Merged sections: 2192 + 8000 + 192 = 10384 */
@@ -8577,13 +8577,13 @@ test_page_large(const char *env_h5_drvr, hid_t fapl)
/* Get free-space info */
if (H5FS_stat_info(f, f->shared->fs_man[H5F_MEM_PAGE_GENERIC], &fs_stat) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Verify that the manager contains 2 free-space sections: 10384 and 288 */
if (fs_stat.tot_sect_count != 2)
- TEST_ERROR
+ TEST_ERROR;
if (fs_stat.tot_space != (10384 + 288))
- TEST_ERROR
+ TEST_ERROR;
/* Allocate a large data block with gaddr4--there is a free-space section able to fulfill the request
*/
@@ -8592,18 +8592,18 @@ test_page_large(const char *env_h5_drvr, hid_t fapl)
/* Should be page aligned */
if (gaddr4 % TBLOCK_SIZE4096)
- TEST_ERROR
+ TEST_ERROR;
if (gaddr4 != gaddr2)
- TEST_ERROR
+ TEST_ERROR;
/* Get free-space info */
if (H5FS_stat_info(f, f->shared->fs_man[H5F_MEM_PAGE_GENERIC], &fs_stat) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Verify that that there are 3 free-space sections */
if (fs_stat.tot_sect_count != 3)
- TEST_ERROR
+ TEST_ERROR;
if (fs_stat.tot_space != (2192 + 3192 + 288))
- TEST_ERROR
+ TEST_ERROR;
/* Free the two blocks with gaddr1 and gaddr4 */
H5MF_xfree(f, H5FD_MEM_DRAW, gaddr1, (hsize_t)TBLOCK_SIZE6000);
@@ -8611,28 +8611,28 @@ test_page_large(const char *env_h5_drvr, hid_t fapl)
/* Get free-space info */
if (H5FS_stat_info(f, f->shared->fs_man[H5F_MEM_PAGE_GENERIC], &fs_stat) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Verify that that there are 2 free-space sections: 16384 (4 pages) + 288 */
if (fs_stat.tot_sect_count != 2)
- TEST_ERROR
+ TEST_ERROR;
if (fs_stat.tot_space != (16384 + 288))
- TEST_ERROR
+ TEST_ERROR;
/* Close file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close the property list */
if (H5Pclose(fcpl) < 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 that file size end on a page boundary */
if (file_size % TBLOCK_SIZE4096)
- TEST_ERROR
+ TEST_ERROR;
PASSED();
}
@@ -8695,19 +8695,19 @@ test_page_small(const char *env_h5_drvr, hid_t fapl)
/* File creation property list */
if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Set the strategy to paged aggregation */
if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, FALSE, (hsize_t)1) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Create the file to work on */
if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get a pointer to the internal file object */
if (NULL == (f = (H5F_t *)H5VL_object(fid)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Allocate 2 small metadata blocks: addr1, addr2 */
H5MF_alloc(f, H5FD_MEM_OHDR, (hsize_t)TBLOCK_SIZE30);
@@ -8717,44 +8717,44 @@ test_page_small(const char *env_h5_drvr, hid_t fapl)
saddr1 = H5MF_alloc(f, H5FD_MEM_DRAW, (hsize_t)TBLOCK_SIZE30);
/* Should be on the second page and page aligned */
if (saddr1 % TBLOCK_SIZE4096)
- TEST_ERROR
+ TEST_ERROR;
/* Allocate a small raw data block with saddr2 */
saddr2 = H5MF_alloc(f, H5FD_MEM_DRAW, (hsize_t)TBLOCK_SIZE50);
/* Should not be page aligned */
if (!(saddr2 % TBLOCK_SIZE4096))
- TEST_ERROR
+ TEST_ERROR;
/* Should be next to the block with saddr1 */
if (saddr2 != (saddr1 + TBLOCK_SIZE30))
- TEST_ERROR
+ TEST_ERROR;
/* Allocate a small metadata block with addr3--there is no free-space section big enough to fulfill
* the request */
addr3 = H5MF_alloc(f, H5FD_MEM_OHDR, (hsize_t)TBLOCK_SIZE4020);
/* Should be on the third page and page aligned */
if (addr3 % TBLOCK_SIZE4096)
- TEST_ERROR
+ TEST_ERROR;
/* Allocate a small metadata block with addr4--there is a free-space section big enough to fulfill the
* request */
addr4 = H5MF_alloc(f, H5FD_MEM_OHDR, (hsize_t)TBLOCK_SIZE80);
/* Should not be page aligned */
if (!(addr4 % TBLOCK_SIZE4096))
- TEST_ERROR
+ TEST_ERROR;
/* Should be next to the block with addr2 */
if (addr4 != (addr2 + TBLOCK_SIZE50))
- TEST_ERROR
+ TEST_ERROR;
/* Allocate a small metadata block with addr5--there is a free-space section big enough to fulfill the
* request */
addr5 = H5MF_alloc(f, H5FD_MEM_OHDR, (hsize_t)TBLOCK_SIZE40);
/* Should not be page aligned */
if (!(addr5 % TBLOCK_SIZE4096))
- TEST_ERROR
+ TEST_ERROR;
/* Should be next to the block with addr3 */
if (addr5 != (addr3 + TBLOCK_SIZE4020))
- TEST_ERROR
+ TEST_ERROR;
/* Allocate a small metadata block with addr6--taking up the remaining space in the first page */
if (family)
@@ -8776,18 +8776,18 @@ test_page_small(const char *env_h5_drvr, hid_t fapl)
/* Verify that the large manager does contain a section with file space page size (default is 4096) */
if (!f->shared->fs_man[H5F_MEM_PAGE_GENERIC])
- TEST_ERROR
+ TEST_ERROR;
if (H5FS_stat_info(f, f->shared->fs_man[H5F_MEM_PAGE_GENERIC], &fs_stat) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (fs_stat.tot_space != TBLOCK_SIZE4096)
- TEST_ERROR
+ TEST_ERROR;
/* Allocate a small metadata block with addr10--there is a free-space section big enough to fulfill
* the request */
addr10 = H5MF_alloc(f, H5FD_MEM_OHDR, (hsize_t)TBLOCK_SIZE3900);
/* The block should be next to the block with addr9 */
if (addr10 != (addr9 + TBLOCK_SIZE80))
- TEST_ERROR
+ TEST_ERROR;
/* Allocate a small metadata block with addr11 */
/* The current free-space section is unable to fulfill the request; obtain a page from the large
@@ -8795,15 +8795,15 @@ test_page_small(const char *env_h5_drvr, hid_t fapl)
addr11 = H5MF_alloc(f, H5FD_MEM_OHDR, (hsize_t)TBLOCK_SIZE80);
/* The address of the block should be the same the freed block with saddr1 */
if (addr11 != saddr1)
- TEST_ERROR
+ TEST_ERROR;
/* Close file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close the property list */
if (H5Pclose(fcpl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
PASSED();
}
@@ -8872,15 +8872,15 @@ test_page_alignment(const char *env_h5_drvr, hid_t fapl)
*/
if ((fapl_new = H5Pcopy(fapl)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* The alignment to use will be the library's default file space page size */
if (H5Pset_libver_bounds(fapl_new, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Set alignment value to 16 */
if (H5Pset_alignment(fapl_new, (hsize_t)0, (hsize_t)TEST_ALIGN16) < 0)
- TEST_ERROR
+ TEST_ERROR;
if (split || multi) {
hid_t memb_fapl;
@@ -8893,22 +8893,22 @@ test_page_alignment(const char *env_h5_drvr, hid_t fapl)
/* Create fapl */
if ((memb_fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Set alignment */
if (H5Pset_alignment(memb_fapl, 0, (hsize_t)TEST_ALIGN16) < 0)
- TEST_ERROR
+ TEST_ERROR;
HDmemset(memb_name, 0, sizeof memb_name);
if (split) {
/* Set split driver with new FAPLs */
if (H5Pset_fapl_split(fapl_new, "-m.h5", memb_fapl, "-r.h5", memb_fapl) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Get current multi settings */
if (H5Pget_fapl_multi(fapl_new, memb_map, memb_fapl_arr, memb_name, memb_addr, &relax) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Set memb_addr aligned */
memb_addr[H5FD_MEM_SUPER] =
@@ -8919,12 +8919,12 @@ test_page_alignment(const char *env_h5_drvr, hid_t fapl)
/* Set split driver with new FAPLs */
if (H5Pset_fapl_multi(fapl_new, memb_map, memb_fapl_arr, (const char *const *)memb_name,
memb_addr, relax) < 0)
- TEST_ERROR
+ TEST_ERROR;
}
else {
/* Get current multi settings */
if (H5Pget_fapl_multi(fapl_new, memb_map, NULL, memb_name, memb_addr, &relax) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Populate memb_fapl_arr */
/* Set memb_addr aligned */
@@ -8937,7 +8937,7 @@ test_page_alignment(const char *env_h5_drvr, hid_t fapl)
/* Set multi driver with new FAPLs */
if (H5Pset_fapl_multi(fapl_new, memb_map, memb_fapl_arr, (const char *const *)memb_name,
memb_addr, relax) < 0)
- TEST_ERROR
+ TEST_ERROR;
} /* end else */
@@ -8947,25 +8947,25 @@ test_page_alignment(const char *env_h5_drvr, hid_t fapl)
/* Close memb_fapl */
if (H5Pclose(memb_fapl) < 0)
- TEST_ERROR
+ TEST_ERROR;
} /* end if */
/* File creation property list */
if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Set the strategy to paged aggregation and persisting free space */
/* The alignment to use will be the library's default file space page size */
if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, TRUE, (hsize_t)1) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Create the file to work on */
if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl_new)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Get a pointer to the internal file object */
if (NULL == (f = (H5F_t *)H5VL_object(fid)))
- TEST_ERROR
+ TEST_ERROR;
/* Allocate 2 small raw data blocks */
saddr1 = H5MF_alloc(f, H5FD_MEM_DRAW, (hsize_t)TBLOCK_SIZE30);
@@ -8973,11 +8973,11 @@ test_page_alignment(const char *env_h5_drvr, hid_t fapl)
/* Should be on the second page and page aligned on 4096 (default file space page size) */
if (saddr1 % TBLOCK_SIZE4096)
- TEST_ERROR
+ TEST_ERROR;
/* Should be next to the block with saddr1 */
if (saddr2 != (saddr1 + TBLOCK_SIZE30))
- TEST_ERROR
+ TEST_ERROR;
/* Allocate 2 large raw data blocks */
gaddr1 = H5MF_alloc(f, H5FD_MEM_DRAW, (hsize_t)TBLOCK_SIZE5000);
@@ -8985,19 +8985,19 @@ test_page_alignment(const char *env_h5_drvr, hid_t fapl)
/* Should be on the 3rd page and page aligned */
if (gaddr1 % TBLOCK_SIZE4096)
- TEST_ERROR
+ TEST_ERROR;
/* Should be on the 4th page and page aligned */
if (gaddr2 % TBLOCK_SIZE4096)
- TEST_ERROR
+ TEST_ERROR;
/* Close the file creation property list */
if (H5Pclose(fcpl) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Close file */
if (H5Fclose(fid) < 0)
- TEST_ERROR
+ TEST_ERROR;
/*
* Case 2: Verify that the alignment in use is the alignment set
@@ -9006,18 +9006,18 @@ test_page_alignment(const char *env_h5_drvr, hid_t fapl)
/* fapl_new has latest format and H5Pset_alignment set */
/* Disable small data block mechanism */
if (H5Pset_small_data_block_size(fapl_new, (hsize_t)0) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Disable metadata block mechanism */
if (H5Pset_meta_block_size(fapl_new, (hsize_t)0) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Create the file to work on */
if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_new)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Get a pointer to the internal file object */
if (NULL == (f = (H5F_t *)H5VL_object(fid)))
- TEST_ERROR
+ TEST_ERROR;
/* Allocate 2 small metadata blocks */
addr1 = H5MF_alloc(f, H5FD_MEM_SUPER, (hsize_t)TBLOCK_SIZE30);
@@ -9025,12 +9025,12 @@ test_page_alignment(const char *env_h5_drvr, hid_t fapl)
/* Should be aligned on 16 */
if (addr1 % TEST_ALIGN16 || addr2 % TEST_ALIGN16)
- TEST_ERROR
+ TEST_ERROR;
/* addr2 should be right next to the block with addr1 */
if ((addr1 + TBLOCK_SIZE30) % TEST_ALIGN16)
if (addr2 != (((addr1 + TBLOCK_SIZE30) / TEST_ALIGN16) + 1) * TEST_ALIGN16)
- TEST_ERROR
+ TEST_ERROR;
/* Allocate 2 small raw data blocks */
saddr1 = H5MF_alloc(f, H5FD_MEM_DRAW, (hsize_t)TBLOCK_SIZE80);
@@ -9038,23 +9038,23 @@ test_page_alignment(const char *env_h5_drvr, hid_t fapl)
/* Should be aligned on 16 */
if (saddr1 % TEST_ALIGN16 || saddr2 % TEST_ALIGN16)
- TEST_ERROR
+ TEST_ERROR;
if (!multi && !split) {
/* saddr1 should be right next to the block with addr2 */
if ((addr2 + TBLOCK_SIZE50) % TEST_ALIGN16)
if (saddr1 != (((addr2 + TBLOCK_SIZE50) / TEST_ALIGN16) + 1) * TEST_ALIGN16)
- TEST_ERROR
+ TEST_ERROR;
}
/* saddr2 should be right next to the block with saddr1 */
if ((saddr1 + TBLOCK_SIZE80) % TEST_ALIGN16)
if (saddr2 != (((saddr1 + TBLOCK_SIZE80) / TEST_ALIGN16) + 1) * TEST_ALIGN16)
- TEST_ERROR
+ TEST_ERROR;
/* Close file */
if (H5Fclose(fid) < 0)
- TEST_ERROR
+ TEST_ERROR;
/*
* Case 3: Verify that the alignment in use is the alignment set
@@ -9062,23 +9062,23 @@ test_page_alignment(const char *env_h5_drvr, hid_t fapl)
*/
/* File creation property list */
if ((fcpl2 = H5Pcreate(H5P_FILE_CREATE)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Set file space page size */
if (H5Pset_file_space_page_size(fcpl2, (hsize_t)TBLOCK_SIZE8192) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Set strategy to H5F_FSPACE_STRATEGY_AGGR but meta/raw data block is 0 as set in fapl_new */
if (H5Pset_file_space_strategy(fcpl2, H5F_FSPACE_STRATEGY_AGGR, FALSE, (hsize_t)1) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* fapl_new has latest format, H5Pset_alignment set, and disable meta/raw block */
if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl2, fapl_new)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Get a pointer to the internal file object */
if (NULL == (f = (H5F_t *)H5VL_object(fid)))
- TEST_ERROR
+ TEST_ERROR;
/* Allocate 2 small raw data blocks */
saddr1 = H5MF_alloc(f, H5FD_MEM_DRAW, (hsize_t)TBLOCK_SIZE30);
@@ -9086,38 +9086,38 @@ test_page_alignment(const char *env_h5_drvr, hid_t fapl)
/* Should be aligned on 16 */
if (saddr1 % TEST_ALIGN16)
- TEST_ERROR
+ TEST_ERROR;
if (saddr2 % TEST_ALIGN16)
- TEST_ERROR
+ TEST_ERROR;
/* saddr2 should be right next to the block with saddr1 */
if ((saddr1 + TBLOCK_SIZE30) % TEST_ALIGN16)
if (saddr2 != (((saddr1 + TBLOCK_SIZE30) / TEST_ALIGN16) + 1) * TEST_ALIGN16)
- TEST_ERROR
+ TEST_ERROR;
/* Allocate a large raw data block */
gaddr1 = H5MF_alloc(f, H5FD_MEM_DRAW, (hsize_t)TBLOCK_SIZE5000);
/* Should be aligned on 16 */
if (gaddr1 % TEST_ALIGN16)
- TEST_ERROR
+ TEST_ERROR;
/* gaddr1 is right next to the block with saddr2 */
if ((saddr2 + TBLOCK_SIZE50) % TEST_ALIGN16)
if (gaddr1 != (((saddr2 + TBLOCK_SIZE50) / TEST_ALIGN16) + 1) * TEST_ALIGN16)
- TEST_ERROR
+ TEST_ERROR;
/* There is no free-space manager involved for H5F_FSPACE_STRATEGY_AGGR strategy */
if (f->shared->fs_man[H5FD_MEM_DRAW] || f->shared->fs_man[H5FD_MEM_SUPER])
- TEST_ERROR
+ TEST_ERROR;
/* Closing */
if (H5Fclose(fid) < 0)
- TEST_ERROR
+ TEST_ERROR;
if (H5Pclose(fcpl2) < 0)
- TEST_ERROR
+ TEST_ERROR;
if (H5Pclose(fapl_new) < 0)
- TEST_ERROR
+ TEST_ERROR;
PASSED();
}
@@ -9161,12 +9161,12 @@ main(void)
/* Push API context */
if (H5CX_push() < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
api_ctx_pushed = TRUE;
/* Make a copy of the FAPL before adjusting the alignment */
if ((new_fapl = H5Pcopy(fapl)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* For old library format--interaction with file allocation */
nerrors += test_mf_eoa(env_h5_drvr, fapl);
nerrors += test_mf_eoa_shrink(env_h5_drvr, fapl);
@@ -9198,12 +9198,12 @@ main(void)
switch (curr_test) {
case TEST_NORMAL: /* set alignment = 1024 */
if (H5Pset_alignment(new_fapl, (hsize_t)0, (hsize_t)TEST_ALIGN1024) < 0)
- TEST_ERROR
+ TEST_ERROR;
break;
case TEST_AGGR_SMALL: /* set alignment = 4096 */
if (H5Pset_alignment(new_fapl, (hsize_t)0, (hsize_t)TEST_ALIGN4096) < 0)
- TEST_ERROR
+ TEST_ERROR;
break;
case TEST_NTESTS:
@@ -9275,12 +9275,12 @@ main(void)
nerrors += test_mf_bug1(env_h5_drvr, fapl);
if (H5Pclose(new_fapl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
h5_cleanup(FILENAME, fapl);
/* Pop API context */
if (api_ctx_pushed && H5CX_pop(FALSE) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
api_ctx_pushed = FALSE;
if (nerrors)