summaryrefslogtreecommitdiffstats
path: root/test/swmr.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/swmr.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/swmr.c')
-rw-r--r--test/swmr.c1764
1 files changed, 882 insertions, 882 deletions
diff --git a/test/swmr.c b/test/swmr.c
index dccd945..07dd33b 100644
--- a/test/swmr.c
+++ b/test/swmr.c
@@ -132,20 +132,20 @@ test_metadata_read_attempts(hid_t in_fapl)
* fapl (e.g.: split/multi), we just skip this entire test.
*/
if ((driver_id = H5Pget_driver(in_fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5FDdriver_query(driver_id, &driver_flags) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
compat_w_default_vfd = (driver_flags & H5FD_FEAT_DEFAULT_VFD_COMPATIBLE) ? TRUE : FALSE;
if (!compat_w_default_vfd) {
- SKIPPED()
+ SKIPPED();
HDputs(" The current VFD is not compatible with the default VFD.");
return 0;
}
/* Get a copy of the parameter fapl */
if ((fapl = H5Pcopy(in_fapl)) < 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));
@@ -158,9 +158,9 @@ test_metadata_read_attempts(hid_t in_fapl)
*/
/* Get # of read attempts -- should be the default: 1 */
if (H5Pget_metadata_read_attempts(fapl, &attempts) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (attempts != 1)
- TEST_ERROR
+ TEST_ERROR;
/* Set the # of read attempts to 0--should fail */
H5E_BEGIN_TRY
@@ -169,43 +169,43 @@ test_metadata_read_attempts(hid_t in_fapl)
}
H5E_END_TRY;
if (ret >= 0)
- TEST_ERROR
+ TEST_ERROR;
/* Set the # of read attempts to a # > 0--should succeed */
if (H5Pset_metadata_read_attempts(fapl, 9) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Retrieve the # of read attempts -- should be 9 */
if (H5Pget_metadata_read_attempts(fapl, &attempts) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (attempts != 9)
- TEST_ERROR
+ TEST_ERROR;
/* Set the # of read attempts to the default for non-SWMR access: H5F_METADATA_READ_ATTEMPTS --should
* succeed */
if (H5Pset_metadata_read_attempts(fapl, H5F_METADATA_READ_ATTEMPTS) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Retrieve the # of read attempts -- should be H5F_METADATA_READ_ATTEMPTS */
if (H5Pget_metadata_read_attempts(fapl, &attempts) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (attempts != H5F_METADATA_READ_ATTEMPTS)
- TEST_ERROR
+ TEST_ERROR;
/* Set the # of read attempts to the default for SWMR access: H5F_SWMR_METADATA_READ_ATEMPTS --should
* succeed */
if (H5Pset_metadata_read_attempts(fapl, H5F_SWMR_METADATA_READ_ATTEMPTS) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Retrieve the # of read attempts -- should be H5F_SWMR_METADATA_READ_ATTEMPTS */
if (H5Pget_metadata_read_attempts(fapl, &attempts) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (attempts != H5F_SWMR_METADATA_READ_ATTEMPTS)
- TEST_ERROR
+ TEST_ERROR;
/* Close the property list */
if (H5Pclose(fapl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/*
* Set B:
@@ -217,173 +217,173 @@ test_metadata_read_attempts(hid_t in_fapl)
/* Test 1 */
/* Create a file with non-SWMR access and default fapl */
if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get file's fapl */
if ((file_fapl = H5Fget_access_plist(fid)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Retrieve the # of read attempts from file's fapl -- should be H5F_METADATA_READ_ATTEMPTS */
if (H5Pget_metadata_read_attempts(file_fapl, &attempts) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (attempts != H5F_METADATA_READ_ATTEMPTS)
- TEST_ERROR
+ TEST_ERROR;
/* Close the file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close file's fapl */
if (H5Pclose(file_fapl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Test 2 */
/* Get a copy of the parameter fapl */
if ((fapl = H5Pcopy(in_fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Set to use latest library format */
if (H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Open the file with SWMR access and default read attempts */
if ((fid = H5Fopen(filename, (H5F_ACC_RDONLY | H5F_ACC_SWMR_READ), fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close fapl */
if (H5Pclose(fapl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get file's fapl */
if ((file_fapl = H5Fget_access_plist(fid)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Retrieve the # of read attempts from file's fapl -- should be H5F_SWMR_METADATA_READ_ATTEMPTS */
if (H5Pget_metadata_read_attempts(file_fapl, &attempts) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (attempts != H5F_SWMR_METADATA_READ_ATTEMPTS)
- TEST_ERROR
+ TEST_ERROR;
/* Close the file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close file's fapl */
if (H5Pclose(file_fapl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Test 3 */
/* Get a copy of the parameter fapl */
if ((fapl = H5Pcopy(in_fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Set to use latest library format */
if (H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Set the # of read attempts */
if (H5Pset_metadata_read_attempts(fapl, 9) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Open the file with SWMR access and fapl (non-default & set to 9) */
if ((fid = H5Fopen(filename, (H5F_ACC_RDONLY | H5F_ACC_SWMR_READ), fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close fapl */
if (H5Pclose(fapl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get file's fapl */
if ((file_fapl = H5Fget_access_plist(fid)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Retrieve the # of read attempts from file's fapl -- should be 9 */
if (H5Pget_metadata_read_attempts(file_fapl, &attempts) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (attempts != 9)
- TEST_ERROR
+ TEST_ERROR;
/* Close the file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close file's fapl */
if (H5Pclose(file_fapl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Test 4 */
/* Get a copy of the parameter fapl */
if ((fapl = H5Pcopy(in_fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Set to use latest library format */
if (H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Set the # of read attempts */
if (H5Pset_metadata_read_attempts(fapl, 1) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Open the file with SWMR access and fapl (non-default & set to 1) */
if ((fid = H5Fopen(filename, (H5F_ACC_RDONLY | H5F_ACC_SWMR_READ), fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close fapl */
if (H5Pclose(fapl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get file's fapl */
if ((file_fapl = H5Fget_access_plist(fid)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Retrieve the # of read attempts from file fapl -- should be 1 */
if (H5Pget_metadata_read_attempts(file_fapl, &attempts) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (attempts != 1)
- TEST_ERROR
+ TEST_ERROR;
/* Close the file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close file's fapl */
if (H5Pclose(file_fapl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Test 5 */
/* Get a copy of the parameter fapl */
if ((fapl = H5Pcopy(in_fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Set to use latest library format */
if (H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Open the file with SWMR_READ and fapl (non-default read attempts but unset) */
if ((fid = H5Fopen(filename, (H5F_ACC_RDONLY | H5F_ACC_SWMR_READ), fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close fapl */
if (H5Pclose(fapl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get file's fapl */
if ((file_fapl = H5Fget_access_plist(fid)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Retrieve the # of read attempts from file's fapl -- should be H5F_SWMR_METADATA_READ_ATTEMPTS */
if (H5Pget_metadata_read_attempts(file_fapl, &attempts) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (attempts != H5F_SWMR_METADATA_READ_ATTEMPTS)
- TEST_ERROR
+ TEST_ERROR;
/* Close the file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close file's fapl */
if (H5Pclose(file_fapl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/*
* Set C:
@@ -395,241 +395,241 @@ test_metadata_read_attempts(hid_t in_fapl)
/* Test 1 */
/* Get a copy of the parameter fapl */
if ((fapl = H5Pcopy(in_fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Set to use latest library format */
if (H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Create a file with non-SWMR access and default read attempts */
if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC | H5F_ACC_SWMR_WRITE, H5P_DEFAULT, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close fapl */
if (H5Pclose(fapl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get file's fapl */
if ((file_fapl = H5Fget_access_plist(fid)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Retrieve the # of read attempts from file's fapl -- should be H5F_SWMR_METADATA_READ_ATTEMPTS */
if (H5Pget_metadata_read_attempts(file_fapl, &attempts) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (attempts != H5F_SWMR_METADATA_READ_ATTEMPTS)
- TEST_ERROR
+ TEST_ERROR;
/* Close the file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close file's fapl */
if (H5Pclose(file_fapl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Test 2 */
/* Open the file with non-SWMR access and default fapl */
if ((fid = H5Fopen(filename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get file's fapl */
if ((file_fapl = H5Fget_access_plist(fid)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Retrieve the # of read attempts from file's fapl -- should be H5F_METADATA_READ_ATTEMPTS */
if (H5Pget_metadata_read_attempts(file_fapl, &attempts) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (attempts != H5F_METADATA_READ_ATTEMPTS)
- TEST_ERROR
+ TEST_ERROR;
/* Close the file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close file's fapl */
if (H5Pclose(file_fapl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Test 3 */
/* Get a copy of the parameter fapl */
if ((fapl = H5Pcopy(in_fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Set the # of read attempts */
if (H5Pset_metadata_read_attempts(fapl, 9) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Open the file with non-SWMR access and fapl (non-default & set to 9) */
if ((fid = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close fapl */
if (H5Pclose(fapl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get file's fapl */
if ((file_fapl = H5Fget_access_plist(fid)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Retrieve the # of read attempts from file's fapl -- should be 9 */
if (H5Pget_metadata_read_attempts(file_fapl, &attempts) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (attempts != 9)
- TEST_ERROR
+ TEST_ERROR;
/* Close the file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close file's fapl */
if (H5Pclose(file_fapl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Test 4 */
/* Get a copy of the parameter fapl */
if ((fapl = H5Pcopy(in_fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Set the # of read attempts */
if (H5Pset_metadata_read_attempts(fapl, 1) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Open the file with non-SWMR access and fapl (non-default & set to 1) */
if ((fid = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close fapl */
if (H5Pclose(fapl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get file's fapl */
if ((file_fapl = H5Fget_access_plist(fid)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Retrieve the # of read attempts from file fapl -- should be 1 */
if (H5Pget_metadata_read_attempts(file_fapl, &attempts) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (attempts != 1)
- TEST_ERROR
+ TEST_ERROR;
/* Close the file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close file's fapl */
if (H5Pclose(file_fapl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Test 5 */
/* Get a copy of the parameter fapl */
if ((fapl = H5Pcopy(in_fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Open the file with non-SWMR_READ and fapl (non-default but unset) */
if ((fid = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close fapl */
if (H5Pclose(fapl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get file's fapl */
if ((file_fapl = H5Fget_access_plist(fid)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Retrieve the # of read attempts from file's fapl -- should be H5F_METADATA_READ_ATTEMPTS */
if (H5Pget_metadata_read_attempts(file_fapl, &attempts) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (attempts != H5F_METADATA_READ_ATTEMPTS)
- TEST_ERROR
+ TEST_ERROR;
/* Close the file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close file's fapl */
if (H5Pclose(file_fapl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get a copy of the parameter fapl */
if ((fapl = H5Pcopy(in_fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Set to use latest library format */
if (H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Set the # of read attempts */
if (H5Pset_metadata_read_attempts(fapl, 9) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Create a file */
if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC | H5F_ACC_SWMR_WRITE, H5P_DEFAULT, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close fapl */
if (H5Pclose(fapl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close the file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Open file again with non-SWMR access and default fapl */
if ((fid = H5Fopen(filename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get file's fapl */
if ((file_fapl = H5Fget_access_plist(fid)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Retrieve the # of read attempts from file fapl -- should be H5F_METADATA_READ_ATTEMPTS */
if (H5Pget_metadata_read_attempts(file_fapl, &attempts) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (attempts != H5F_METADATA_READ_ATTEMPTS)
- TEST_ERROR
+ TEST_ERROR;
/* Close the file's fapl */
if (H5Pclose(file_fapl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close the file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get a copy of the parameter fapl */
if ((fapl = H5Pcopy(in_fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Set to use latest library format */
if (H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Open file again with SWMR access and default read attempts */
if ((fid = H5Fopen(filename, H5F_ACC_SWMR_READ, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close fapl */
if (H5Pclose(fapl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get file's fapl */
if ((file_fapl = H5Fget_access_plist(fid)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Retrieve the # of read attempts from file fapl -- should be H5F_SWMR_METADATA_READ_ATTEMPTS */
if (H5Pget_metadata_read_attempts(file_fapl, &attempts) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (attempts != H5F_SWMR_METADATA_READ_ATTEMPTS)
- TEST_ERROR
+ TEST_ERROR;
/* Close the file's fapl */
if (H5Pclose(file_fapl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close the file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/*
* Set D:
@@ -641,85 +641,85 @@ test_metadata_read_attempts(hid_t in_fapl)
/* Create a file */
if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close the file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get a copy of the parameter fapl */
if ((fapl = H5Pcopy(in_fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Set to use latest library format */
if (H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Open file again with SWMR access and default read attempts */
if ((fid1 = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Set the # of read attempts */
if (H5Pset_metadata_read_attempts(fapl, 9) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Open file again with SWMR access and fapl (non-default & set to 9) */
if ((fid2 = H5Fopen(filename, (H5F_ACC_RDONLY | H5F_ACC_SWMR_READ), fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close fapl */
if (H5Pclose(fapl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Re-open fid1 */
if ((fid = H5Freopen(fid1)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get file's fapl */
if ((file_fapl = H5Fget_access_plist(fid)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Retrieve the # of read attempts from file fapl -- should be H5F_SWMR_METADATA_READ_ATTEMPTS */
if (H5Pget_metadata_read_attempts(file_fapl, &attempts) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (attempts != H5F_SWMR_METADATA_READ_ATTEMPTS)
- TEST_ERROR
+ TEST_ERROR;
/* Close the file's fapl */
if (H5Pclose(file_fapl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close the file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Re-open fid2 */
if ((fid = H5Freopen(fid2)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get file's fapl */
if ((file_fapl = H5Fget_access_plist(fid)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Retrieve the # of read attempts from file fapl -- should be H5F_SWMR_METADATA_READ_ATTEMPTS, not 9 */
if (H5Pget_metadata_read_attempts(file_fapl, &attempts) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (attempts != H5F_SWMR_METADATA_READ_ATTEMPTS)
- TEST_ERROR
+ TEST_ERROR;
/* Close the file's fapl */
if (H5Pclose(file_fapl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close the file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close all the files */
if (H5Fclose(fid1) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Fclose(fid2) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/*
* Set E:
@@ -731,93 +731,93 @@ test_metadata_read_attempts(hid_t in_fapl)
/* Get a copy of the parameter fapl */
if ((fapl = H5Pcopy(in_fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Set to use latest library format */
if (H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Create a file */
if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC | H5F_ACC_SWMR_WRITE, H5P_DEFAULT, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close fapl */
if (H5Pclose(fapl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close the file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Open file again with non-SWMR access and default fapl */
if ((fid1 = H5Fopen(filename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get a copy of the parameter fapl */
if ((fapl = H5Pcopy(in_fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Set the # of read attempts */
if (H5Pset_metadata_read_attempts(fapl, 9) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Open file again with non-SWMR access and fapl (non-default & set to 9) */
if ((fid2 = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close fapl */
if (H5Pclose(fapl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Re-open fid1 */
if ((fid = H5Freopen(fid1)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get file's fapl */
if ((file_fapl = H5Fget_access_plist(fid)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Retrieve the # of read attempts from file fapl -- should be H5F_METADATA_READ_ATTEMPTS */
if (H5Pget_metadata_read_attempts(file_fapl, &attempts) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (attempts != H5F_METADATA_READ_ATTEMPTS)
- TEST_ERROR
+ TEST_ERROR;
/* Close the file's fapl */
if (H5Pclose(file_fapl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close the file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Re-open fid2 */
if ((fid = H5Freopen(fid2)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get file's fapl */
if ((file_fapl = H5Fget_access_plist(fid)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Retrieve the # of read attempts from file fapl -- should be H5F_METADATA_READ_ATTEMPTS */
if (H5Pget_metadata_read_attempts(file_fapl, &attempts) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (attempts != H5F_METADATA_READ_ATTEMPTS)
- TEST_ERROR
+ TEST_ERROR;
/* Close the file's fapl */
if (H5Pclose(file_fapl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close the file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close all the files */
if (H5Fclose(fid1) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Fclose(fid2) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
PASSED();
return 0;
@@ -870,38 +870,38 @@ test_metadata_read_retry_info(hid_t in_fapl)
/* Get a copy of the parameter in_fapl */
if ((fapl = H5Pcopy(in_fapl)) < 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));
/* Set to use latest library format */
if (H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Create a file without SWMR access */
if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Create a chunked dataset with 1 unlimited dimension: extensible array indexing will be used */
if ((sid = H5Screate_simple(2, dims, max_dims_1un)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Pset_chunk(dcpl, 2, chunk_dims) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if ((did1 = H5Dcreate2(fid, "DSET_1UNLIM", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Create a chunked dataset with 2 unlimited dimension: v2 Btree indexing will be used */
if ((sid = H5Screate_simple(2, dims, max_dims_2un)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Pset_chunk(dcpl, 2, chunk_dims) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if ((did2 = H5Dcreate2(fid, "DSET_2UNLIM", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Initialize buffer data */
for (i = n = 0; i < 6; i++)
@@ -910,21 +910,21 @@ test_metadata_read_retry_info(hid_t in_fapl)
/* Write to the 2 datasets */
if (H5Dwrite(did1, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Dwrite(did2, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Closing */
if (H5Dclose(did1) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Dclose(did2) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Sclose(sid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Pclose(dcpl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/*
* Case 1: tests on nbins
@@ -936,41 +936,41 @@ test_metadata_read_retry_info(hid_t in_fapl)
*/
/* Open the file without SWMR access */
if ((fid = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Open the dataset */
if ((did1 = H5Dopen2(fid, "DSET_1UNLIM", H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Dread(did1, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, chkbuf1) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Open the dataset */
if ((did2 = H5Dopen2(fid, "DSET_2UNLIM", H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Dread(did2, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, chkbuf2) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Retrieve retries information */
if (H5Fget_metadata_read_retry_info(fid, &info) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Should be 0 */
if (info.nbins != 0)
- TEST_ERROR
+ TEST_ERROR;
/* Should be all NULL */
for (i = 0; i < H5F_NUM_METADATA_READ_RETRY_TYPES; i++)
if (info.retries[i] != NULL)
- TEST_ERROR
+ TEST_ERROR;
/* Closing */
if (H5Dclose(did1) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Dclose(did2) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/*
* Open a file with SWMR access, default # of read attempts--
@@ -979,24 +979,24 @@ test_metadata_read_retry_info(hid_t in_fapl)
*/
/* Open the file with SWMR access */
if ((fid = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Retrieve retries information */
if (H5Fget_metadata_read_retry_info(fid, &info) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Should be 2 */
if (info.nbins != 2)
- TEST_ERROR
+ TEST_ERROR;
/* Should be all NULL */
for (i = 0; i < H5F_NUM_METADATA_READ_RETRY_TYPES; i++)
if (info.retries[i] != NULL)
- TEST_ERROR
+ TEST_ERROR;
/* Closing */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/*
* Open a file with SWMR access, # of read_attempts is 10:
@@ -1004,33 +1004,33 @@ test_metadata_read_retry_info(hid_t in_fapl)
* info.retries should all be NULL
*/
if ((new_fapl = H5Pcopy(fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Pset_metadata_read_attempts(new_fapl, 10) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Open the file with SWMR access */
if ((fid = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, new_fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Retrieve retry information */
if (H5Fget_metadata_read_retry_info(fid, &info) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Should be 1 */
if (info.nbins != 1)
- TEST_ERROR
+ TEST_ERROR;
/* Should be all NULL */
for (i = 0; i < H5F_NUM_METADATA_READ_RETRY_TYPES; i++)
if (info.retries[i] != NULL)
- TEST_ERROR
+ TEST_ERROR;
/* Closing */
if (H5Pclose(new_fapl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/*
* Open a file with SWMR access, # of read attempts is 101:
@@ -1038,32 +1038,32 @@ test_metadata_read_retry_info(hid_t in_fapl)
* info.retries should all be NULL
*/
if ((new_fapl = H5Pcopy(fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Pset_metadata_read_attempts(new_fapl, 101) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Open the file with SWMR access */
if ((fid = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, new_fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Retrieve retry information */
if (H5Fget_metadata_read_retry_info(fid, &info) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Should be 3 */
if (info.nbins != 3)
- TEST_ERROR
+ TEST_ERROR;
/* Should be all NULL */
for (i = 0; i < H5F_NUM_METADATA_READ_RETRY_TYPES; i++)
if (info.retries[i] != NULL)
- TEST_ERROR
+ TEST_ERROR;
/* Closing */
if (H5Pclose(new_fapl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/*
* Open a file with SWMR access, # of read_attempts is 10000:
@@ -1071,33 +1071,33 @@ test_metadata_read_retry_info(hid_t in_fapl)
* info.retries should all be NULL
*/
if ((new_fapl = H5Pcopy(fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Pset_metadata_read_attempts(new_fapl, 10000) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Open the file with SWMR access */
if ((fid = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, new_fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Retrieve retry information */
if (H5Fget_metadata_read_retry_info(fid, &info) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Should be 4 */
if (info.nbins != 4)
- TEST_ERROR
+ TEST_ERROR;
/* Should be all NULL */
for (i = 0; i < H5F_NUM_METADATA_READ_RETRY_TYPES; i++)
if (info.retries[i] != NULL)
- TEST_ERROR
+ TEST_ERROR;
/* Closing */
if (H5Pclose(new_fapl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/*
* Open a file with SWMR access, # of read_attempts is 1:
@@ -1105,33 +1105,33 @@ test_metadata_read_retry_info(hid_t in_fapl)
* info.retries should all be NULL
*/
if ((new_fapl = H5Pcopy(fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Pset_metadata_read_attempts(new_fapl, 1) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Open the file with SWMR access */
if ((fid = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, new_fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Retrieve retry information */
if (H5Fget_metadata_read_retry_info(fid, &info) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Should be 0 */
if (info.nbins != 0)
- TEST_ERROR
+ TEST_ERROR;
/* Should be all NULL */
for (i = 0; i < H5F_NUM_METADATA_READ_RETRY_TYPES; i++)
if (info.retries[i] != NULL)
- TEST_ERROR
+ TEST_ERROR;
/* Closing */
if (H5Pclose(new_fapl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/*
* Case 2: tests on retries info
@@ -1139,40 +1139,40 @@ test_metadata_read_retry_info(hid_t in_fapl)
/* Open the file with SWMR access */
if ((fid = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Open the dataset */
if ((did1 = H5Dopen2(fid, "DSET_1UNLIM", H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Read data from the dataset */
if (H5Dread(did1, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, chkbuf1) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Open the dataset */
if ((did2 = H5Dopen2(fid, "DSET_2UNLIM", H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Read data from the dataset */
if (H5Dread(did2, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, chkbuf2) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Retrieve retry information */
if (H5Fget_metadata_read_retry_info(fid, &info) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Should be 2 */
if (info.nbins != 2)
- TEST_ERROR
+ TEST_ERROR;
/* Should be all NULL */
for (i = 0; i < H5F_NUM_METADATA_READ_RETRY_TYPES; i++)
if (info.retries[i] != NULL)
- TEST_ERROR
+ TEST_ERROR;
/* Get a pointer to the internal file object */
if ((f = (H5F_t *)H5VL_object(fid)) == NULL)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/*
* Increment 1st set of retries for metadata items:
@@ -1184,39 +1184,39 @@ test_metadata_read_retry_info(hid_t in_fapl)
/* v2 B-tree leaf node: log retry 99 for 500 times */
for (i = 0; i < 500; i++) {
if (H5F_track_metadata_read_retries(f, H5AC_BT2_LEAF_ID, 99) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
}
/* Extensive array data block: log retry 10 for 1000 times */
for (i = 0; i < 1000; i++)
if (H5F_track_metadata_read_retries(f, H5AC_EARRAY_DBLOCK_ID, 10) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* File's superblock: log retry 1 for 1 time */
if (H5F_track_metadata_read_retries(f, H5AC_SUPERBLOCK_ID, 1) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Retrieve the collection of metadata read retries */
if (H5Fget_metadata_read_retry_info(fid, &info) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Verify retries for v2 B-tree leaf node */
if (info.retries[4][0] != 0)
- TEST_ERROR
+ TEST_ERROR;
if (info.retries[4][1] != 500)
- TEST_ERROR
+ TEST_ERROR;
/* Verify retries for extensive array data block */
if (info.retries[15][0] != 0)
- TEST_ERROR
+ TEST_ERROR;
if (info.retries[15][1] != 1000)
- TEST_ERROR
+ TEST_ERROR;
/* Verify retries for file's superblock */
if (info.retries[20][0] != 1)
- TEST_ERROR
+ TEST_ERROR;
if (info.retries[20][1] != 0)
- TEST_ERROR
+ TEST_ERROR;
/* Free memory for info.retries */
for (i = 0; i < H5F_NUM_METADATA_READ_RETRY_TYPES; i++) {
@@ -1235,26 +1235,26 @@ test_metadata_read_retry_info(hid_t in_fapl)
/* Object header: log retry 5 for 5 times */
for (i = 0; i < 5; i++) {
if (H5F_track_metadata_read_retries(f, H5AC_OHDR_ID, 5) < 0)
- TEST_ERROR
+ TEST_ERROR;
}
/* Extensive array data block: log retry 4 for 1 time */
if (H5F_track_metadata_read_retries(f, H5AC_EARRAY_DBLOCK_ID, 4) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Fixed array header : log retry 50 for 10000 times */
for (i = 0; i < 10000; i++) {
if (H5F_track_metadata_read_retries(f, H5AC_FARRAY_HDR_ID, 50) < 0)
- TEST_ERROR
+ TEST_ERROR;
}
/* File's superblock: log retry 1 for 1 more time */
if (H5F_track_metadata_read_retries(f, H5AC_SUPERBLOCK_ID, 1) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Retrieve the collection of metadata read retries */
if (H5Fget_metadata_read_retry_info(fid, &info) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/*
* Verify info has both previous + current retries information:
@@ -1263,42 +1263,42 @@ test_metadata_read_retry_info(hid_t in_fapl)
switch (i) {
case 0: /* Object header */
if (info.retries[i][0] != 5)
- TEST_ERROR
+ TEST_ERROR;
if (info.retries[i][1] != 0)
- TEST_ERROR
+ TEST_ERROR;
break;
case 4: /* v2 B-tree leaf node */
if (info.retries[i][0] != 0)
- TEST_ERROR
+ TEST_ERROR;
if (info.retries[i][1] != 500)
- TEST_ERROR
+ TEST_ERROR;
break;
case 15: /* Extensive array data block */
if (info.retries[i][0] != 1)
- TEST_ERROR
+ TEST_ERROR;
if (info.retries[i][1] != 1000)
- TEST_ERROR
+ TEST_ERROR;
break;
case 17: /* Fixed array header */
if (info.retries[i][0] != 0)
- TEST_ERROR
+ TEST_ERROR;
if (info.retries[i][1] != 10000)
- TEST_ERROR
+ TEST_ERROR;
break;
case 20: /* File's superblock */
if (info.retries[i][0] != 2)
- TEST_ERROR
+ TEST_ERROR;
if (info.retries[i][1] != 0)
- TEST_ERROR
+ TEST_ERROR;
break;
default:
if (info.retries[i] != NULL)
- TEST_ERROR
+ TEST_ERROR;
break;
}
}
@@ -1310,55 +1310,55 @@ test_metadata_read_retry_info(hid_t in_fapl)
/* Closing */
if (H5Dclose(did1) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Dclose(did2) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get a copy of the file access property list */
if ((new_fapl = H5Pcopy(fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Set the number of metadata read attempts to 101 */
if (H5Pset_metadata_read_attempts(new_fapl, 101) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Open the file with SWMR access */
if ((fid = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, new_fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get a pointer to the internal file object */
if ((f = (H5F_t *)H5VL_object(fid)) == NULL)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* File's superblock: log retry 1 for 1 time */
if (H5F_track_metadata_read_retries(f, H5AC_SUPERBLOCK_ID, 1) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Retrieve the collection of metadata read retries */
if (H5Fget_metadata_read_retry_info(fid, &info) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Should be 3 */
if (info.nbins != 3)
- TEST_ERROR
+ TEST_ERROR;
/* Verify retries info */
for (i = 0; i < H5F_NUM_METADATA_READ_RETRY_TYPES; i++) {
switch (i) {
case 20: /* File's superblock */
if (info.retries[i][0] != 1)
- TEST_ERROR
+ TEST_ERROR;
if (info.retries[i][1] != 0)
- TEST_ERROR
+ TEST_ERROR;
if (info.retries[i][2] != 0)
- TEST_ERROR
+ TEST_ERROR;
break;
default:
if (info.retries[i] != NULL)
- TEST_ERROR
+ TEST_ERROR;
break;
}
}
@@ -1370,9 +1370,9 @@ test_metadata_read_retry_info(hid_t in_fapl)
/* Closing */
if (H5Pclose(new_fapl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/*
* Case 3: Tests on retrieving the collection of retries
@@ -1388,39 +1388,39 @@ test_metadata_read_retry_info(hid_t in_fapl)
*/
/* Open the file without SWMR access */
if ((fid = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Re-open fid */
if ((fid1 = H5Freopen(fid)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Retrieve retries information for fid */
if (H5Fget_metadata_read_retry_info(fid, &info) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Retrieve retries information for fid1*/
if (H5Fget_metadata_read_retry_info(fid1, &info1) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Should be 0 */
if (info.nbins != 0)
- TEST_ERROR
+ TEST_ERROR;
if (info1.nbins != 0)
- TEST_ERROR
+ TEST_ERROR;
/* Should be all NULL */
for (i = 0; i < H5F_NUM_METADATA_READ_RETRY_TYPES; i++) {
if (info.retries[i] != NULL)
- TEST_ERROR
+ TEST_ERROR;
if (info1.retries[i] != NULL)
- TEST_ERROR
+ TEST_ERROR;
}
/* Closing */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Fclose(fid1) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/*
* Open a file with SWMR access, default # of read attempts:
@@ -1430,71 +1430,71 @@ test_metadata_read_retry_info(hid_t in_fapl)
*/
/* Open the file with SWMR access */
if ((fid = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get a pointer to the internal file object for fid */
if ((f = (H5F_t *)H5VL_object(fid)) == NULL)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Re-open fid */
if ((fid1 = H5Freopen(fid)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get a pointer to the internal file object for fid1 */
if ((f1 = (H5F_t *)H5VL_object(fid1)) == NULL)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* For fid: fixed array data block page--log retry 9 for 500 times */
for (i = 0; i < 500; i++) {
if (H5F_track_metadata_read_retries(f, H5AC_FARRAY_DBLK_PAGE_ID, 9) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
}
/* For fid1: free-space sections--log retry 99 for 1000 times */
for (i = 0; i < 1000; i++) {
if (H5F_track_metadata_read_retries(f1, H5AC_FSPACE_SINFO_ID, 99) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
}
/* Retrieve the collection of metadata read retries for fid */
if (H5Fget_metadata_read_retry_info(fid, &info) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Retrieve the collection of metadata read retries for fid1 */
if (H5Fget_metadata_read_retry_info(fid1, &info1) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Verify nbins for fid & fid1: should be 2 */
if (info.nbins != 2)
- TEST_ERROR
+ TEST_ERROR;
if (info1.nbins != 2)
- TEST_ERROR
+ TEST_ERROR;
/* Verify retries for fid: fixed array data block page */
if (info.retries[19][0] != 500)
- TEST_ERROR
+ TEST_ERROR;
if (info.retries[19][1] != 0)
- TEST_ERROR
+ TEST_ERROR;
/* Verify retries for fid: free-space sections */
/* (Since file was re-opened) */
if (info.retries[9][0] != 0)
- TEST_ERROR
+ TEST_ERROR;
if (info.retries[9][1] != 1000)
- TEST_ERROR
+ TEST_ERROR;
/* Verify retries for fid1: free-space sections */
if (info1.retries[9][0] != 0)
- TEST_ERROR
+ TEST_ERROR;
if (info1.retries[9][1] != 1000)
- TEST_ERROR
+ TEST_ERROR;
/* Verify retries for fid1: fixed array data block page */
/* (Since file was re-opened) */
if (info1.retries[19][0] != 500)
- TEST_ERROR
+ TEST_ERROR;
if (info1.retries[19][1] != 0)
- TEST_ERROR
+ TEST_ERROR;
/* Free memory for info.retries and info1.retries */
for (i = 0; i < H5F_NUM_METADATA_READ_RETRY_TYPES; i++) {
@@ -1506,12 +1506,12 @@ test_metadata_read_retry_info(hid_t in_fapl)
/* Closing */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Fclose(fid1) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Pclose(fapl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
PASSED();
return 0;
@@ -1592,14 +1592,14 @@ test_start_swmr_write(hid_t in_fapl, hbool_t new_format)
/* Get a copy of the parameter fapl (non-latest-format) */
if ((fapl = H5Pcopy(in_fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (new_format) {
TESTING("H5Fstart_swmr_write() when creating/opening a file with latest format");
/* Set to use the latest library format */
if (H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
}
else {
TESTING("H5Fstart_swmr_write() when creating/opening a file without latest format");
@@ -1615,15 +1615,15 @@ test_start_swmr_write(hid_t in_fapl, hbool_t new_format)
/* Create the file with SWMR write + non-latest-format */
if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC | (new_format ? 0 : H5F_ACC_SWMR_WRITE), H5P_DEFAULT,
fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get the file's access_property list */
if ((file_fapl = H5Fget_access_plist(fid)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Retrieve the # of read attempts from the file's fapl */
if (H5Pget_metadata_read_attempts(file_fapl, &attempts) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Should be 100 */
if (attempts != (unsigned int)(new_format ? H5F_METADATA_READ_ATTEMPTS : H5F_SWMR_METADATA_READ_ATTEMPTS))
@@ -1631,13 +1631,13 @@ test_start_swmr_write(hid_t in_fapl, hbool_t new_format)
/* Close the property list */
if (H5Pclose(file_fapl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Create "dataset1" */
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Pset_chunk(dcpl, 1, chunk_dim) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if ((sid1 = H5Screate_simple(1, dim, max_dim)) < 0)
FAIL_STACK_ERROR;
if ((did1 = H5Dcreate2(fid, "dataset1", H5T_NATIVE_INT, sid1, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
@@ -1662,10 +1662,10 @@ test_start_swmr_write(hid_t in_fapl, hbool_t new_format)
H5E_END_TRY;
if (new_format) {
if (ret < 0)
- TEST_ERROR
+ TEST_ERROR;
}
else if (ret >= 0)
- TEST_ERROR
+ TEST_ERROR;
/* Read from the dataset */
if (H5Dread(did1, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &rdata) < 0)
@@ -1673,7 +1673,7 @@ test_start_swmr_write(hid_t in_fapl, hbool_t new_format)
/* Verify the data is correct */
if (wdata != rdata)
- TEST_ERROR
+ TEST_ERROR;
/* Close "dataset1", dataspace, dataset creation property list */
if (H5Dclose(did1) < 0)
@@ -1685,11 +1685,11 @@ test_start_swmr_write(hid_t in_fapl, hbool_t new_format)
/* Get the file's access_property list */
if ((file_fapl = H5Fget_access_plist(fid)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Retrieve the # of read attempts */
if (H5Pget_metadata_read_attempts(file_fapl, &attempts) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Should be 100 */
if (attempts != H5F_SWMR_METADATA_READ_ATTEMPTS)
@@ -1713,11 +1713,11 @@ test_start_swmr_write(hid_t in_fapl, hbool_t new_format)
/* Get the file's access_property list */
if ((file_fapl = H5Fget_access_plist(fid)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Retrieve the # of read attempts */
if (H5Pget_metadata_read_attempts(file_fapl, &attempts) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Should be 1 */
if (attempts != H5F_METADATA_READ_ATTEMPTS)
@@ -1746,13 +1746,13 @@ test_start_swmr_write(hid_t in_fapl, hbool_t new_format)
/* Create a group */
if ((gid = H5Gcreate2(fid, "group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Create "dataset2" in the group, keep it open */
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Pset_chunk(dcpl, 2, chunk_dim2) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if ((sid2 = H5Screate_simple(2, dim2, max_dim2)) < 0)
FAIL_STACK_ERROR;
if ((did2 = H5Dcreate2(gid, "dataset2", H5T_NATIVE_INT, sid2, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
@@ -1770,11 +1770,11 @@ test_start_swmr_write(hid_t in_fapl, hbool_t new_format)
/* Get the file's access_property list */
if ((file_fapl = H5Fget_access_plist(fid)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Retrieve the # of read attempts */
if (H5Pget_metadata_read_attempts(file_fapl, &attempts) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Should be 100 */
if (attempts != H5F_SWMR_METADATA_READ_ATTEMPTS)
@@ -1821,9 +1821,9 @@ test_start_swmr_write(hid_t in_fapl, hbool_t new_format)
/* Create "dataset3" */
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Pset_chunk(dcpl, 2, chunk_dim2) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if ((sid3 = H5Screate_simple(2, dim2, max_dim2)) < 0)
FAIL_STACK_ERROR;
if ((did3 = H5Dcreate2(fid, "dataset3", H5T_NATIVE_INT, sid3, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
@@ -1952,19 +1952,19 @@ test_err_start_swmr_write(hid_t in_fapl, hbool_t new_format)
/* Create a copy of the input parameter in_fapl */
if ((fapl = H5Pcopy(in_fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if ((new_fapl = H5Pcopy(in_fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Set to use the latest library format */
if (H5Pset_libver_bounds(new_fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (new_format) {
TESTING("H5Fstart_swmr_write() on failure conditions for latest format");
if ((fapl = H5Pcopy(new_fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
}
else {
TESTING("H5Fstart_swmr_write() on failure conditions for without latest format");
@@ -1989,7 +1989,7 @@ test_err_start_swmr_write(hid_t in_fapl, hbool_t new_format)
}
H5E_END_TRY;
if (ret >= 0)
- TEST_ERROR
+ TEST_ERROR;
if (H5Fclose(fid) < 0)
FAIL_STACK_ERROR;
@@ -2000,7 +2000,7 @@ test_err_start_swmr_write(hid_t in_fapl, hbool_t new_format)
/* Create the file with write + latest format */
if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Create and commit a named datatype */
if ((tid = H5Tcopy(H5T_NATIVE_INT)) < 0)
@@ -2015,7 +2015,7 @@ test_err_start_swmr_write(hid_t in_fapl, hbool_t new_format)
}
H5E_END_TRY;
if (ret >= 0)
- TEST_ERROR
+ TEST_ERROR;
/* Close the datatype */
if (H5Tclose(tid) < 0)
@@ -2033,7 +2033,7 @@ test_err_start_swmr_write(hid_t in_fapl, hbool_t new_format)
/* Create a file with write + non-latest-format */
if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Should fail to enable SWMR writing because the file's superblock version is not at least 3 */
H5E_BEGIN_TRY
@@ -2042,7 +2042,7 @@ test_err_start_swmr_write(hid_t in_fapl, hbool_t new_format)
}
H5E_END_TRY;
if (ret >= 0)
- TEST_ERROR
+ TEST_ERROR;
if (H5Fclose(fid) < 0)
FAIL_STACK_ERROR;
@@ -2071,7 +2071,7 @@ test_err_start_swmr_write(hid_t in_fapl, hbool_t new_format)
}
H5E_END_TRY;
if (ret >= 0)
- TEST_ERROR
+ TEST_ERROR;
/* Close the file */
if (H5Fclose(fid) < 0)
@@ -2090,7 +2090,7 @@ test_err_start_swmr_write(hid_t in_fapl, hbool_t new_format)
}
H5E_END_TRY;
if (ret >= 0)
- TEST_ERROR
+ TEST_ERROR;
/* Close the file */
if (H5Fclose(fid) < 0)
@@ -2109,7 +2109,7 @@ test_err_start_swmr_write(hid_t in_fapl, hbool_t new_format)
}
H5E_END_TRY;
if (ret >= 0)
- TEST_ERROR
+ TEST_ERROR;
/* Close the file */
if (H5Fclose(fid) < 0)
@@ -2142,7 +2142,7 @@ test_err_start_swmr_write(hid_t in_fapl, hbool_t new_format)
}
H5E_END_TRY;
if (ret >= 0)
- TEST_ERROR
+ TEST_ERROR;
/* Close the datatype */
if (H5Tclose(tid) < 0)
@@ -2155,7 +2155,7 @@ test_err_start_swmr_write(hid_t in_fapl, hbool_t new_format)
}
H5E_END_TRY;
if (ret >= 0)
- TEST_ERROR
+ TEST_ERROR;
/* Close the attribute */
if (H5Aclose(aid) < 0)
@@ -2194,7 +2194,7 @@ test_err_start_swmr_write(hid_t in_fapl, hbool_t new_format)
/* Should succeed in enabling SWMR writing mode */
if (H5Fstart_swmr_write(fid) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Should fail for a second call to enable SWMR writing mode */
H5E_BEGIN_TRY
@@ -2203,7 +2203,7 @@ test_err_start_swmr_write(hid_t in_fapl, hbool_t new_format)
}
H5E_END_TRY;
if (ret >= 0)
- TEST_ERROR
+ TEST_ERROR;
/* Close the file */
if (H5Fclose(fid) < 0)
@@ -2217,7 +2217,7 @@ test_err_start_swmr_write(hid_t in_fapl, hbool_t new_format)
/* Should succeed in enabling SWMR writing mode */
if (H5Fstart_swmr_write(fid) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Re-open the same file */
if ((fid2 = H5Freopen(fid)) < 0)
@@ -2230,7 +2230,7 @@ test_err_start_swmr_write(hid_t in_fapl, hbool_t new_format)
}
H5E_END_TRY;
if (ret >= 0)
- TEST_ERROR
+ TEST_ERROR;
/* Close the files */
if (H5Fclose(fid) < 0)
@@ -2250,7 +2250,7 @@ test_err_start_swmr_write(hid_t in_fapl, hbool_t new_format)
/* Should succeed in enabling SWMR writing for fid */
if (H5Fstart_swmr_write(fid) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Should fail to enable SWMR writing for fid2 */
H5E_BEGIN_TRY
@@ -2259,7 +2259,7 @@ test_err_start_swmr_write(hid_t in_fapl, hbool_t new_format)
}
H5E_END_TRY;
if (ret >= 0)
- TEST_ERROR
+ TEST_ERROR;
/* Close the files */
if (H5Fclose(fid) < 0)
@@ -2289,7 +2289,7 @@ test_err_start_swmr_write(hid_t in_fapl, hbool_t new_format)
}
H5E_END_TRY;
if (bad_fid >= 0)
- TEST_ERROR
+ TEST_ERROR;
/* Case 2 */
@@ -2301,7 +2301,7 @@ test_err_start_swmr_write(hid_t in_fapl, hbool_t new_format)
}
H5E_END_TRY;
if (bad_fid >= 0)
- TEST_ERROR
+ TEST_ERROR;
/* Case 3 */
@@ -2316,7 +2316,7 @@ test_err_start_swmr_write(hid_t in_fapl, hbool_t new_format)
}
H5E_END_TRY;
if (ret >= 0)
- TEST_ERROR
+ TEST_ERROR;
if (H5Fclose(fid) < 0)
FAIL_STACK_ERROR;
@@ -2334,7 +2334,7 @@ test_err_start_swmr_write(hid_t in_fapl, hbool_t new_format)
}
H5E_END_TRY;
if (ret >= 0)
- TEST_ERROR
+ TEST_ERROR;
if (H5Fclose(fid) < 0)
FAIL_STACK_ERROR;
@@ -2447,7 +2447,7 @@ test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format)
}
if ((fapl = H5Pcopy(in_fapl)) < 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));
@@ -2455,23 +2455,23 @@ test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format)
if (new_format) {
/* Set to use the latest library format */
if (H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Create the test file */
if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
}
else {
/* Create the test file without latest format but with SWMR write */
if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC | H5F_ACC_SWMR_WRITE, H5P_DEFAULT, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
} /* end if */
/* Create a chunked dataset with 1 extendible dimension */
if ((sid = H5Screate_simple(1, dims, maxdims)) < 0)
FAIL_STACK_ERROR;
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Pset_chunk(dcpl, 1, chunk_dims) < 0)
FAIL_STACK_ERROR;
if ((did = H5Dcreate2(fid, "dataset", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
@@ -2479,17 +2479,17 @@ test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format)
/* Close the dataset */
if (H5Dclose(did) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Sclose(sid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close the file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Create 1 pipe */
if (HDpipe(out_pdf) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/*
* Case (1):
@@ -2499,7 +2499,7 @@ test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format)
/* Fork child process */
if ((childpid = HDfork()) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (childpid == 0) { /* Child process */
int child_notify = 0;
@@ -2533,11 +2533,11 @@ test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format)
/* close unused read end for out_pdf */
if (HDclose(out_pdf[0]) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Open the test file */
if ((fid = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Notify child process */
notify = 1;
@@ -2550,19 +2550,19 @@ test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format)
/* Wait for child process to complete */
if ((tmppid = HDwaitpid(childpid, &child_status, child_wait_option)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Check exit status of child process */
if (WIFEXITED(child_status)) {
if ((child_exit_val = WEXITSTATUS(child_status)) != 0)
- TEST_ERROR
+ TEST_ERROR;
}
else /* child process terminated abnormally */
- TEST_ERROR
+ TEST_ERROR;
/* Close the file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/*
* Case (2):
@@ -2572,13 +2572,13 @@ test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format)
/* Create 2 pipes */
if (HDpipe(out_pdf) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (HDpipe(in_pdf) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Fork child process */
if ((childpid = HDfork()) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (childpid == 0) { /* Child process */
hid_t child_fid1 = -1, child_fid2; /* File IDs */
@@ -2670,16 +2670,16 @@ test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format)
/* close unused read end for out_pdf */
if (HDclose(out_pdf[0]) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close unused write end for in_pdf */
if (HDclose(in_pdf[1]) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Open the test file */
if ((fid1 = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if ((fid2 = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* open "dataset", keep it open */
if ((did1 = H5Dopen2(fid1, "dataset", H5P_DEFAULT)) < 0)
@@ -2700,7 +2700,7 @@ test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format)
/* Enable SWMR writing mode */
if (H5Fstart_swmr_write(fid1) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Notify child process */
notify = 1;
@@ -2729,11 +2729,11 @@ test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format)
/* Close the dataset */
if (H5Dclose(did1) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Dclose(did2) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Dclose(did3) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close the pipes */
if (HDclose(out_pdf[1]) < 0)
@@ -2743,21 +2743,21 @@ test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format)
/* Wait for child process to complete */
if ((tmppid = HDwaitpid(childpid, &child_status, child_wait_option)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Check exit status of child process */
if (WIFEXITED(child_status)) {
if ((child_exit_val = WEXITSTATUS(child_status)) != 0)
- TEST_ERROR
+ TEST_ERROR;
}
else /* Child process terminated abnormally */
- TEST_ERROR
+ TEST_ERROR;
/* Close the file */
if (H5Fclose(fid1) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Fclose(fid2) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/*
* Case (3):
@@ -2766,11 +2766,11 @@ test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format)
*/
/* Create 1 pipe */
if (HDpipe(out_pdf) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Fork child process */
if ((childpid = HDfork()) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (childpid == 0) { /* Child process */
int child_notify = 0;
@@ -2799,15 +2799,15 @@ test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format)
/* close unused read end for out_pdf */
if (HDclose(out_pdf[0]) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Open the test file */
if ((fid = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Enable SWMR writing mode */
if (H5Fstart_swmr_write(fid) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Notify child process */
notify = 1;
@@ -2820,19 +2820,19 @@ test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format)
/* Wait for child process to complete */
if ((tmppid = HDwaitpid(childpid, &child_status, child_wait_option)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Check exit status of child process */
if (WIFEXITED(child_status)) {
if ((child_exit_val = WEXITSTATUS(child_status)) != 0)
- TEST_ERROR
+ TEST_ERROR;
}
else /* Child process terminated abnormally */
- TEST_ERROR
+ TEST_ERROR;
/* Close the file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/*
* Case (4):
@@ -2842,11 +2842,11 @@ test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format)
/* Create 1 pipe */
if (HDpipe(out_pdf) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Fork child process */
if ((childpid = HDfork()) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (childpid == 0) { /* Child process */
int child_notify = 0;
@@ -2879,15 +2879,15 @@ test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format)
/* close unused read end for out_pdf */
if (HDclose(out_pdf[0]) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Open the test file */
if ((fid = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Enable SWMR writing mode */
if (H5Fstart_swmr_write(fid) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Notify child process */
notify = 1;
@@ -2896,23 +2896,23 @@ test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format)
/* Close the pipe */
if (HDclose(out_pdf[1]) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Wait for child process to complete */
if ((tmppid = HDwaitpid(childpid, &child_status, child_wait_option)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Check exit status of child process */
if (WIFEXITED(child_status)) {
if ((child_exit_val = WEXITSTATUS(child_status)) != 0)
- TEST_ERROR
+ TEST_ERROR;
}
else /* Child process terminated abnormally */
- TEST_ERROR
+ TEST_ERROR;
/* Close the file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/*
* Case (5):
@@ -2922,11 +2922,11 @@ test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format)
/* Create 1 pipe */
if (HDpipe(out_pdf) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Fork child process */
if ((childpid = HDfork()) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (childpid == 0) { /* Child process */
int child_notify = 0;
@@ -2959,15 +2959,15 @@ test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format)
/* close unused read end for out_pdf */
if (HDclose(out_pdf[0]) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Open the test file */
if ((fid = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Enable SWMR writing mode */
if (H5Fstart_swmr_write(fid) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Notify child process */
notify = 1;
@@ -2980,23 +2980,23 @@ test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format)
/* Wait for child process to complete */
if ((tmppid = HDwaitpid(childpid, &child_status, child_wait_option)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Check exit status of child process */
if (WIFEXITED(child_status)) {
if ((child_exit_val = WEXITSTATUS(child_status)) != 0)
- TEST_ERROR
+ TEST_ERROR;
}
else /* Child process terminated abnormally */
- TEST_ERROR
+ TEST_ERROR;
/* Close the file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close the property list */
if (H5Pclose(fapl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
PASSED();
return 0;
@@ -3049,18 +3049,18 @@ test_start_swmr_write_stress_ohdr(hid_t in_fapl)
HDmemset(attr_data, 0, sizeof(attr_data));
if ((fapl = H5Pcopy(in_fapl)) < 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));
/* Set to use the latest library format */
if (H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Create the test file */
if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Create a chunked dataset with 2 extendible dimensions */
if ((sid = H5Screate_simple(1, dims, maxdims)) < 0)
@@ -3070,7 +3070,7 @@ test_start_swmr_write_stress_ohdr(hid_t in_fapl)
if (H5Tset_size(tid, 256) < 0)
FAIL_STACK_ERROR;
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Pset_chunk(dcpl, 1, chunk_dims) < 0)
FAIL_STACK_ERROR;
if (H5Pset_fill_value(dcpl, tid, &fill) < 0)
@@ -3095,7 +3095,7 @@ test_start_swmr_write_stress_ohdr(hid_t in_fapl)
if (H5Tset_size(tid, 256) < 0)
FAIL_STACK_ERROR;
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Pset_chunk(dcpl, 1, chunk_dims) < 0)
FAIL_STACK_ERROR;
if (H5Pset_fill_value(dcpl, tid, &fill) < 0)
@@ -3105,15 +3105,15 @@ test_start_swmr_write_stress_ohdr(hid_t in_fapl)
/* Close the second dataset */
if (H5Dclose(did2) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close the objects for the dataset creation */
if (H5Sclose(sid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Tclose(tid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Pclose(dcpl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Create attribute on original dataset, to push dataspace header message out of header chunk #0 */
if ((sid = H5Screate(H5S_SCALAR)) < 0)
@@ -3129,11 +3129,11 @@ test_start_swmr_write_stress_ohdr(hid_t in_fapl)
if (H5Awrite(aid, tid, attr_data) < 0)
FAIL_STACK_ERROR;
if (H5Sclose(sid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Tclose(tid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Aclose(aid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Retrieve the chunk # for the dataspace message */
chunk_num = UINT_MAX;
@@ -3149,15 +3149,15 @@ test_start_swmr_write_stress_ohdr(hid_t in_fapl)
/* Close the dataset */
if (H5Dclose(did) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close the file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close the FAPL */
if (H5Pclose(fapl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
PASSED();
return 0;
@@ -3239,7 +3239,7 @@ test_object_flush_cb(hid_t in_fapl)
}
H5E_END_TRY;
if (ret >= 0)
- TEST_ERROR
+ TEST_ERROR;
/*
* Case (2)
@@ -3249,14 +3249,14 @@ test_object_flush_cb(hid_t in_fapl)
/* Create a copy of file access property list */
if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Retrieve object flush property values for the default file access property list */
if (H5Pget_object_flush_cb(fapl, &ret_cb, &ret_ct) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Should be null */
if (ret_cb != NULL || ret_ct != NULL)
- TEST_ERROR
+ TEST_ERROR;
/*
* Case (3)
@@ -3265,18 +3265,18 @@ test_object_flush_cb(hid_t in_fapl)
*/
/* Set the object flush property */
if (H5Pset_object_flush_cb(fapl, flush_cb, &flush_ct) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Increment the counter */
++flush_ct;
/* Retrieve object flush property values for the non-default file access property list */
if (H5Pget_object_flush_cb(fapl, &ret_cb, &ret_ct) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Verify expected values */
if (ret_cb != flush_cb || *(unsigned *)ret_ct != 1)
- TEST_ERROR
+ TEST_ERROR;
/* Close the property list */
if (H5Pclose(fapl) < 0)
@@ -3295,18 +3295,18 @@ test_object_flush_cb(hid_t in_fapl)
/* Make a copy of the input parameter in_fapl */
if ((fapl = H5Pcopy(in_fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Set to use the latest library format */
if (H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 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 test file: without setting object flush property in fapl */
if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get the file's file access property list */
if ((ffapl = H5Fget_access_plist(fid)) < 0)
@@ -3314,11 +3314,11 @@ test_object_flush_cb(hid_t in_fapl)
/* Retrieve the object flush property values */
if (H5Pget_object_flush_cb(ffapl, &ret_cb, &ret_ct) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Verify expected values */
if (ret_cb != NULL || ret_ct != NULL)
- TEST_ERROR
+ TEST_ERROR;
/* Closing */
if (H5Pclose(ffapl) < 0)
@@ -3340,7 +3340,7 @@ test_object_flush_cb(hid_t in_fapl)
/* Set the object flush property */
if (H5Pset_object_flush_cb(fapl, flush_cb, &flush_ct) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Open the test file: with object flush property setting in fapl */
if ((fid = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0)
@@ -3352,7 +3352,7 @@ test_object_flush_cb(hid_t in_fapl)
/* Create a dataset */
if ((did1 = H5Dcreate2(fid, "dataset1", H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Initialize data buffer */
for (i = 0; i < 50; i++)
@@ -3372,31 +3372,31 @@ test_object_flush_cb(hid_t in_fapl)
/* Retrieve the object flush property values */
if (H5Pget_object_flush_cb(ffapl, &ret_cb, &ret_ct) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Verify expected values */
if (ret_cb != flush_cb || *(unsigned *)ret_ct != 1)
- TEST_ERROR
+ TEST_ERROR;
/* Create a group */
if ((gid = H5Gcreate2(fid, "group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Flush the group */
if (H5Gflush(gid) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Retrieve the object flush property values */
if (H5Pget_object_flush_cb(ffapl, &ret_cb, &ret_ct) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Verify expected values */
if (ret_cb != flush_cb || *(unsigned *)ret_ct != 2)
- TEST_ERROR
+ TEST_ERROR;
/* Create a dataset */
if ((did2 = H5Dcreate2(gid, "dataset2", H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Flush the dataset */
if (H5Dflush(did2) < 0)
@@ -3404,11 +3404,11 @@ test_object_flush_cb(hid_t in_fapl)
/* Retrieve the object flush property values */
if (H5Pget_object_flush_cb(ffapl, &ret_cb, &ret_ct) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Verify expected values */
if (ret_cb != flush_cb || *(unsigned *)ret_ct != 3)
- TEST_ERROR
+ TEST_ERROR;
/* Closing */
if (H5Sclose(sid) < 0)
@@ -3507,17 +3507,17 @@ test_append_flush_generic(void)
/* Create a copy of dataset access property list */
if ((dapl = H5Pcreate(H5P_DATASET_ACCESS)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Retrieve the append flush property values */
if (H5Pget_append_flush(dapl, 2, ret_boundary, &ret_cb, (void **)&ret_count) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Verify expected values */
if (ret_boundary[0] != 0 || ret_boundary[1] != 0)
TEST_ERROR;
if (ret_cb != NULL || ret_count != NULL)
- TEST_ERROR
+ TEST_ERROR;
/* Close the property list */
if (H5Pclose(dapl) < 0)
@@ -3534,7 +3534,7 @@ test_append_flush_generic(void)
/* Create a copy of dataset access property list */
if ((dapl = H5Pcreate(H5P_DATASET_ACCESS)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Invalid dataset rank: zero value */
H5E_BEGIN_TRY
@@ -3543,7 +3543,7 @@ test_append_flush_generic(void)
}
H5E_END_TRY;
if (ret >= 0)
- TEST_ERROR
+ TEST_ERROR;
/* Invalid dataset rank: > H5S_MAX_RANK */
H5E_BEGIN_TRY
@@ -3552,7 +3552,7 @@ test_append_flush_generic(void)
}
H5E_END_TRY;
if (ret >= 0)
- TEST_ERROR
+ TEST_ERROR;
/* No boundary specified */
H5E_BEGIN_TRY
@@ -3561,7 +3561,7 @@ test_append_flush_generic(void)
}
H5E_END_TRY;
if (ret >= 0)
- TEST_ERROR
+ TEST_ERROR;
/* Set up a valid boundary */
boundary[0] = 1;
@@ -3574,7 +3574,7 @@ test_append_flush_generic(void)
}
H5E_END_TRY;
if (ret >= 0)
- TEST_ERROR
+ TEST_ERROR;
/* Invalid boundary size: negative value */
boundary[0] = (hsize_t)-1;
@@ -3585,7 +3585,7 @@ test_append_flush_generic(void)
}
H5E_END_TRY;
if (ret >= 0)
- TEST_ERROR
+ TEST_ERROR;
/* Invalid boundary size: H5S_UNLIMITED */
boundary[0] = 1;
@@ -3596,7 +3596,7 @@ test_append_flush_generic(void)
}
H5E_END_TRY;
if (ret >= 0)
- TEST_ERROR
+ TEST_ERROR;
/*
* Case (3)
@@ -3614,16 +3614,16 @@ test_append_flush_generic(void)
/* Verify expected values: with boundary rank > set boundary rank */
if (H5Pget_append_flush(dapl, 3, ret_boundary, &ret_cb, (void **)&ret_count) < 0)
- TEST_ERROR
+ TEST_ERROR;
if (ret_boundary[0] != 1 || ret_boundary[1] != 1 || boundary[2] != 0)
TEST_ERROR;
if (ret_cb == NULL || ret_count == NULL || *ret_count != 2)
- TEST_ERROR
+ TEST_ERROR;
/* Verify expected values: with boundary rank < set boundary rank */
HDmemset(ret_boundary, 0, sizeof(ret_boundary));
if (H5Pget_append_flush(dapl, 1, ret_boundary, NULL, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR;
if (ret_boundary[0] != 1 || ret_boundary[1] != 0 || boundary[2] != 0)
TEST_ERROR;
@@ -3697,42 +3697,42 @@ test_append_flush_dataset_chunked(hid_t in_fapl)
/* Get a copy of the input parameter in_fapl */
if ((fapl = H5Pcopy(in_fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Set to use the latest library format */
if (H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 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 test file to work on */
if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Create a chunked dataset with 1 extendible dimension */
if ((sid = H5Screate_simple(2, dims, maxdims)) < 0)
FAIL_STACK_ERROR;
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Pset_chunk(dcpl, 2, chunk_dims) < 0)
FAIL_STACK_ERROR;
if ((did1 = H5Dcreate2(fid, "dataset1", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Get the dataset's access property list */
if ((ddapl = H5Dget_access_plist(did1)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Retrieve the append flush property values */
if (H5Pget_append_flush(ddapl, 3, ret_boundary, &ret_cb, (void **)&ret_count) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Verify expected values */
if (ret_boundary[0] != 0 || ret_boundary[1] != 0 || ret_boundary[2] != 0)
TEST_ERROR;
if (ret_cb != NULL || ret_count != NULL)
- TEST_ERROR
+ TEST_ERROR;
/* Close the dataset's access property list */
if (H5Pclose(ddapl) < 0)
@@ -3749,12 +3749,12 @@ test_append_flush_dataset_chunked(hid_t in_fapl)
*/
/* Create a copy of dataset access property list */
if ((dapl = H5Pcreate(H5P_DATASET_ACCESS)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Set boundary dimension rank > the rank of dataset to be created */
HDmemset(boundary, 0, sizeof(boundary));
if (H5Pset_append_flush(dapl, 3, boundary, NULL, NULL) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Should fail to Create the dataset */
H5E_BEGIN_TRY
@@ -3763,12 +3763,12 @@ test_append_flush_dataset_chunked(hid_t in_fapl)
}
H5E_END_TRY;
if (did2 >= 0)
- TEST_ERROR
+ TEST_ERROR;
/* Set boundary for a non-extendible dimension */
boundary[0] = boundary[1] = 1;
if (H5Pset_append_flush(dapl, 2, boundary, NULL, NULL) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Should fail to create the dataset */
H5E_BEGIN_TRY
@@ -3777,7 +3777,7 @@ test_append_flush_dataset_chunked(hid_t in_fapl)
}
H5E_END_TRY;
if (did2 >= 0)
- TEST_ERROR
+ TEST_ERROR;
/* Create and close the dataset */
if ((did2 = H5Dcreate2(fid, "dataset2", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
@@ -3792,7 +3792,7 @@ test_append_flush_dataset_chunked(hid_t in_fapl)
}
H5E_END_TRY;
if (did2 >= 0)
- TEST_ERROR
+ TEST_ERROR;
/*
* Case (3)--
@@ -3806,33 +3806,33 @@ test_append_flush_dataset_chunked(hid_t in_fapl)
boundary[0] = 0;
boundary[1] = 1;
if (H5Pset_append_flush(dapl, 2, boundary, append_cb, &count) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if ((did2 = H5Dopen2(fid, "dataset2", dapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get the dataset's access property list */
if ((ddapl = H5Dget_access_plist(did2)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
HDmemset(ret_boundary, 0, sizeof(ret_boundary));
ret_cb = NULL;
ret_count = NULL;
/* Retrieve the append flush property values */
if (H5Pget_append_flush(ddapl, 3, ret_boundary, &ret_cb, (void **)&ret_count) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Verify expected values */
if (ret_cb != append_cb || ret_count != &count)
- TEST_ERROR
+ TEST_ERROR;
if (ret_boundary[0] != 0 || ret_boundary[1] != 1 || ret_boundary[2] != 0)
- TEST_ERROR
+ TEST_ERROR;
HDmemset(ret_boundary, 0, sizeof(ret_boundary));
/* Retrieve the append flush property values */
if (H5Pget_append_flush(ddapl, 1, ret_boundary, NULL, NULL) < 0)
- TEST_ERROR
+ TEST_ERROR;
if (ret_boundary[0] != 0 || ret_boundary[1] != 0 || ret_boundary[2] != 0)
- TEST_ERROR
+ TEST_ERROR;
/* Closing */
if (H5Pclose(ddapl) < 0)
@@ -3917,38 +3917,38 @@ test_append_flush_dataset_fixed(hid_t in_fapl)
/* Get a copy of the input parameter in_fapl */
if ((fapl = H5Pcopy(in_fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Set to use the latest library format */
if (H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 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 test file to work on */
if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Create a dataset */
if ((sid = H5Screate_simple(1, dims, dims)) < 0)
FAIL_STACK_ERROR;
if ((did1 = H5Dcreate2(fid, "dataset1", H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Get the dataset's access property list */
if ((ddapl = H5Dget_access_plist(did1)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Retrieve the append flush property values */
if (H5Pget_append_flush(ddapl, 3, ret_boundary, &ret_cb, (void **)&ret_count) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Verify expected values */
if (ret_boundary[0] != 0 || ret_boundary[1] != 0 || ret_boundary[2] != 0)
TEST_ERROR;
if (ret_cb != NULL || ret_count != NULL)
- TEST_ERROR
+ TEST_ERROR;
/* Close the dataset's access property list */
if (H5Pclose(ddapl) < 0)
@@ -3966,30 +3966,30 @@ test_append_flush_dataset_fixed(hid_t in_fapl)
*/
/* Create a copy of dataset access property list */
if ((dapl = H5Pcreate(H5P_DATASET_ACCESS)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
boundary[0] = 1;
boundary[1] = boundary[2] = 0;
if (H5Pset_append_flush(dapl, 3, boundary, append_cb, &count) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Should succeed to create the dataset: append flush property has no effect */
if ((did2 = H5Dcreate2(fid, "dataset2", H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Get the dataset's access property list */
if ((ddapl = H5Dget_access_plist(did2)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Retrieve the append flush property values */
if (H5Pget_append_flush(ddapl, 3, ret_boundary, &ret_cb, (void **)&ret_count) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Verify expected values */
if (ret_cb != NULL || ret_count != NULL)
- TEST_ERROR
+ TEST_ERROR;
if (ret_boundary[0] != 0 || ret_boundary[1] != 0 || ret_boundary[2] != 0)
- TEST_ERROR
+ TEST_ERROR;
/* Closing */
if (H5Pclose(ddapl) < 0)
@@ -3999,24 +3999,24 @@ test_append_flush_dataset_fixed(hid_t in_fapl)
/* Should succeed in opening the dataset: append flush property has no effect */
if ((did2 = H5Dopen2(fid, "dataset2", dapl)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Get the dataset's access property list */
if ((ddapl = H5Dget_access_plist(did2)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Retrieve the append flush property values */
if (H5Pget_append_flush(ddapl, 3, ret_boundary, &ret_cb, (void **)&ret_count) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Verify expected values */
if (ret_cb != NULL || ret_count != NULL)
- TEST_ERROR
+ TEST_ERROR;
if (ret_boundary[0] != 0 || ret_boundary[1] != 0 || ret_boundary[2] != 0)
- TEST_ERROR
+ TEST_ERROR;
if (H5Dclose(did2) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/*
* Case (3)--
* For a non-chunked dataset's access property list:
@@ -4027,23 +4027,23 @@ test_append_flush_dataset_fixed(hid_t in_fapl)
HDmemset(boundary, 0, sizeof(boundary));
if (H5Pset_append_flush(dapl, 1, boundary, append_cb, &count) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if ((did2 = H5Dopen2(fid, "dataset2", dapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get the dataset's access property list */
if ((ddapl = H5Dget_access_plist(did2)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Retrieve the append flush property values */
if (H5Pget_append_flush(ddapl, 1, ret_boundary, &ret_cb, (void **)&ret_count) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Verify expected values */
if (ret_cb != NULL || ret_count != NULL)
- TEST_ERROR
+ TEST_ERROR;
if (ret_boundary[0] != 0 || ret_boundary[1] != 0 || ret_boundary[2] != 0)
- TEST_ERROR
+ TEST_ERROR;
/* Closing */
if (H5Pclose(ddapl) < 0)
@@ -4143,41 +4143,41 @@ test_append_flush_dataset_multiple(hid_t in_fapl)
/* Create a copy of dataset access property list */
if ((dapl1 = H5Pcreate(H5P_DATASET_ACCESS)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if ((dapl2 = H5Pcreate(H5P_DATASET_ACCESS)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
boundary1[0] = 0;
boundary1[1] = 1;
count1 = 0;
if (H5Pset_append_flush(dapl1, 2, boundary1, append_cb, &count1) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
boundary2[0] = 1;
boundary2[1] = 0;
count2 = 0;
if (H5Pset_append_flush(dapl2, 2, boundary2, append_cb2, &count2) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get a copy of the input parameter in_fapl */
if ((fapl = H5Pcopy(in_fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Set to use the latest library format */
if (H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 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 test file to work on */
if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Create a chunked dataset with 2 extendible dimensions */
if ((sid = H5Screate_simple(2, dims, maxdims)) < 0)
FAIL_STACK_ERROR;
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Pset_chunk(dcpl, 2, chunk_dims) < 0)
FAIL_STACK_ERROR;
if ((did1 = H5Dcreate2(fid, "dataset1", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, dapl1)) < 0)
@@ -4189,17 +4189,17 @@ test_append_flush_dataset_multiple(hid_t in_fapl)
/* Get the dataset's access property list for did1 */
if ((ddapl = H5Dget_access_plist(did1)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Retrieve the append flush property values */
if (H5Pget_append_flush(ddapl, 3, ret_boundary, &ret_cb, (void **)&ret_count) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Verify expected values: should be the setting in dapl1 */
if (ret_boundary[0] != 0 || ret_boundary[1] != 1 || ret_boundary[2] != 0)
TEST_ERROR;
if (ret_cb != append_cb || ret_count != &count1)
- TEST_ERROR
+ TEST_ERROR;
/* Close the dataset's access property list */
if (H5Pclose(ddapl) < 0)
@@ -4207,17 +4207,17 @@ test_append_flush_dataset_multiple(hid_t in_fapl)
/* Get the dataset's access property list for did2 */
if ((ddapl = H5Dget_access_plist(did2)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Retrieve the append flush property values */
if (H5Pget_append_flush(ddapl, 3, ret_boundary, &ret_cb, (void **)&ret_count) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Verify expected values: should be the setting in dapl1 */
if (ret_boundary[0] != 0 || ret_boundary[1] != 1 || ret_boundary[2] != 0)
TEST_ERROR;
if (ret_cb != append_cb || ret_count != &count1)
- TEST_ERROR
+ TEST_ERROR;
/* Close the dataset's access property list */
if (H5Pclose(ddapl) < 0)
@@ -4251,17 +4251,17 @@ test_append_flush_dataset_multiple(hid_t in_fapl)
/* Get the dataset's access property list for did1 */
if ((ddapl = H5Dget_access_plist(did1)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Retrieve the append flush property values */
if (H5Pget_append_flush(ddapl, 3, ret_boundary, &ret_cb, (void **)&ret_count) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Verify expected values: should be the setting in dapl2 */
if (ret_boundary[0] != 1 || ret_boundary[1] != 0 || ret_boundary[2] != 0)
TEST_ERROR;
if (ret_cb != append_cb2 || ret_count != &count2)
- TEST_ERROR
+ TEST_ERROR;
/* Close the access property list */
if (H5Pclose(ddapl) < 0)
@@ -4269,17 +4269,17 @@ test_append_flush_dataset_multiple(hid_t in_fapl)
/* Get the dataset's access property list for did2 */
if ((ddapl = H5Dget_access_plist(did2)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Retrieve the append flush property values */
if (H5Pget_append_flush(ddapl, 3, ret_boundary, &ret_cb, (void **)&ret_count) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Verify expected values: should be the setting in dapl2 */
if (ret_boundary[0] != 1 || ret_boundary[1] != 0 || ret_boundary[2] != 0)
TEST_ERROR;
if (ret_cb != append_cb2 || ret_count != &count2)
- TEST_ERROR
+ TEST_ERROR;
/* Closing */
if (H5Pclose(ddapl) < 0)
@@ -4344,9 +4344,9 @@ test_file_lock_same(hid_t in_fapl)
/* Set locking in the fapl */
if ((fapl = H5Pcopy(in_fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Pset_file_locking(fapl, TRUE, TRUE) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[1], fapl, filename, sizeof(filename));
@@ -4356,76 +4356,76 @@ test_file_lock_same(hid_t in_fapl)
*/
/* Create file */
if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get and check file intent */
if (H5Fget_intent(fid, &intent) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (intent != H5F_ACC_RDWR)
- TEST_ERROR
+ TEST_ERROR;
/* Open the same file with RDWR */
if ((fid2 = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get and check the intent */
if (H5Fget_intent(fid2, &intent) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (intent != H5F_ACC_RDWR)
- TEST_ERROR
+ TEST_ERROR;
/* Close file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close file */
if (H5Fclose(fid2) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/*
* Case 2: 1) RDWR 2) RDONLY : should succeed
*/
/* Open file with RDWR */
if ((fid = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get and check the intent */
if (H5Fget_intent(fid, &intent) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (intent != H5F_ACC_RDWR)
- TEST_ERROR
+ TEST_ERROR;
/* Open file with RDONLY */
if ((fid2 = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get and check the intent: should get intent from 1st open */
if (H5Fget_intent(fid2, &intent) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (intent != H5F_ACC_RDWR)
- TEST_ERROR
+ TEST_ERROR;
/* Close file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close file */
if (H5Fclose(fid2) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/*
* Case 3: 1) RDONLY 2) RDWR : should fail
*/
/* Open file with RDONLY */
if ((fid = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get and check the intent */
if (H5Fget_intent(fid, &intent) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (intent != H5F_ACC_RDONLY)
- TEST_ERROR
+ TEST_ERROR;
/* Open file with RDWR should fail */
H5E_BEGIN_TRY
@@ -4434,46 +4434,46 @@ test_file_lock_same(hid_t in_fapl)
}
H5E_END_TRY;
if (fid2 >= 0)
- TEST_ERROR
+ TEST_ERROR;
/* Close first file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/*
* Case 4: 1) RDONLY 2) RDONLY : should succeed
*/
/* Open file with RDONLY */
if ((fid = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get and check the intent */
if (H5Fget_intent(fid, &intent) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (intent != H5F_ACC_RDONLY)
- TEST_ERROR
+ TEST_ERROR;
/* Open file with RDONLY */
if ((fid2 = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Get and check the intent */
if (H5Fget_intent(fid2, &intent) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (intent != H5F_ACC_RDONLY)
- TEST_ERROR
+ TEST_ERROR;
/* Close file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close file */
if (H5Fclose(fid2) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close the property list */
if (H5Pclose(fapl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
PASSED();
@@ -4512,22 +4512,22 @@ test_file_lock_swmr_same(hid_t in_fapl)
/* Set locking in the fapl */
if ((fapl = H5Pcopy(in_fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[1], fapl, filename, sizeof(filename));
/* Set to use latest library format */
if (H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Create a file */
if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/*
* Cases a, b, c, d: H5Fopen failure cases
@@ -4542,7 +4542,7 @@ test_file_lock_swmr_same(hid_t in_fapl)
}
H5E_END_TRY;
if (fid >= 0)
- TEST_ERROR
+ TEST_ERROR;
/*
* Case b: RDWR|SWMM_WRTE|SWMR_READ : should fail
@@ -4553,7 +4553,7 @@ test_file_lock_swmr_same(hid_t in_fapl)
}
H5E_END_TRY;
if (fid >= 0)
- TEST_ERROR
+ TEST_ERROR;
/*
* Case c: RDONLY|SWMM_WRITE : should fail
@@ -4564,7 +4564,7 @@ test_file_lock_swmr_same(hid_t in_fapl)
}
H5E_END_TRY;
if (fid >= 0)
- TEST_ERROR
+ TEST_ERROR;
/*
* Case d: RDONLY|SWMM_WRITE|SWMR_READ : should fail
@@ -4575,7 +4575,7 @@ test_file_lock_swmr_same(hid_t in_fapl)
}
H5E_END_TRY;
if (fid >= 0)
- TEST_ERROR
+ TEST_ERROR;
/*
* Cases 1 - 12: combinations of different flags for 1st and 2nd opens
@@ -4585,7 +4585,7 @@ test_file_lock_swmr_same(hid_t in_fapl)
* Case 1: 1) RDWR 2) RDWR|SWMR_WRITE : should fail
*/
if ((fid = H5Fopen(filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
H5E_BEGIN_TRY
{
@@ -4593,95 +4593,95 @@ test_file_lock_swmr_same(hid_t in_fapl)
}
H5E_END_TRY;
if (fid2 >= 0)
- TEST_ERROR
+ TEST_ERROR;
/* Close file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/*
* Case 2: 1) RDWR 2) RDONLY|SWMR_READ : should succeed
*/
if ((fid = H5Fopen(filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR;
if ((fid2 = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, fapl)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Close file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Fclose(fid2) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/*
* Case 3: 1) RDWR|SWMR_WRITE 2)RDWR : should succeed
*/
if ((fid = H5Fopen(filename, H5F_ACC_RDWR | H5F_ACC_SWMR_WRITE, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if ((fid2 = H5Fopen(filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close file */
if (H5Fclose(fid2) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/*
* Case 4: 1) RDWR|SWMR_WRITE 2) RDWR|SWMR_WRITE : should succeed
*/
if ((fid = H5Fopen(filename, H5F_ACC_RDWR | H5F_ACC_SWMR_WRITE, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if ((fid2 = H5Fopen(filename, H5F_ACC_RDWR | H5F_ACC_SWMR_WRITE, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close file */
if (H5Fclose(fid2) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/*
* Case 5: 1) RDWR|SWMR_WRITE 2) RDONLY|SWMR_READ : should succeed
*/
if ((fid = H5Fopen(filename, H5F_ACC_RDWR | H5F_ACC_SWMR_WRITE, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if ((fid2 = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close file */
if (H5Fclose(fid2) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/*
* Case 6: 1) RDWR|SWMR_WRITE 2) RDONLY : should succeed
*/
if ((fid = H5Fopen(filename, H5F_ACC_RDWR | H5F_ACC_SWMR_WRITE, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if ((fid2 = H5Fopen(filename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close file */
if (H5Fclose(fid2) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/*
* Case 7: 1) RDONLY|SWMR_READ 2)RDWR : should fail
*/
if ((fid = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
H5E_BEGIN_TRY
{
@@ -4689,17 +4689,17 @@ test_file_lock_swmr_same(hid_t in_fapl)
}
H5E_END_TRY;
if (fid2 >= 0)
- TEST_ERROR
+ TEST_ERROR;
/* Close file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/*
* Case 8: 1) RDONLY|SWMR_READ 2) RDWR|SWMR_WRITE : should fail
*/
if ((fid = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
H5E_BEGIN_TRY
{
@@ -4707,49 +4707,49 @@ test_file_lock_swmr_same(hid_t in_fapl)
}
H5E_END_TRY;
if (fid2 >= 0)
- TEST_ERROR
+ TEST_ERROR;
/* Close file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/*
* Case 9: 1) RDONLY|SWMR_READ 2) RDONLY|SWMR_READ : should succeed
*/
if ((fid = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if ((fid2 = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close file */
if (H5Fclose(fid2) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/*
* Case 10: 1) RDONLY|SWMR_READ 2) RDONLY : should succeed
*/
if ((fid = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, fapl)) < 0)
- TEST_ERROR
+ TEST_ERROR;
if ((fid2 = H5Fopen(filename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Close file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close file */
if (H5Fclose(fid2) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/*
* Case 11: 1) RDONLY 2) RDWR|SWMR_WRITE: should fail
*/
if ((fid = H5Fopen(filename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
H5E_BEGIN_TRY
{
@@ -4757,17 +4757,17 @@ test_file_lock_swmr_same(hid_t in_fapl)
}
H5E_END_TRY;
if (fid2 >= 0)
- TEST_ERROR
+ TEST_ERROR;
/* Close file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/*
* Case 12: 1) RDONLY 2) RDONLY|SWMR_READ : should fail
*/
if ((fid = H5Fopen(filename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
H5E_BEGIN_TRY
{
@@ -4775,15 +4775,15 @@ test_file_lock_swmr_same(hid_t in_fapl)
}
H5E_END_TRY;
if (fid2 >= 0)
- TEST_ERROR
+ TEST_ERROR;
/* Close file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close the property list */
if (H5Pclose(fapl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
PASSED();
@@ -4841,20 +4841,20 @@ test_file_lock_concur(hid_t in_fapl)
/* Set locking in the fapl */
if ((fapl = H5Pcopy(in_fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Pset_file_locking(fapl, TRUE, TRUE) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[1], fapl, filename, sizeof(filename));
/* Create the test file */
if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close the file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/*
* Case 1: 1) RDWR 2) RDWR : should fail
@@ -4862,11 +4862,11 @@ test_file_lock_concur(hid_t in_fapl)
/* Create 1 pipe */
if (HDpipe(out_pdf) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Fork child process */
if ((childpid = HDfork()) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (childpid == 0) { /* Child process */
hid_t child_fid; /* File ID */
@@ -4902,11 +4902,11 @@ test_file_lock_concur(hid_t in_fapl)
/* close unused read end for out_pdf */
if (HDclose(out_pdf[0]) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Open the test file */
if ((fid = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Notify child process */
notify = 1;
@@ -4919,31 +4919,31 @@ test_file_lock_concur(hid_t in_fapl)
/* Wait for child process to complete */
if (HDwaitpid(childpid, &child_status, child_wait_option) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Check if child terminated normally */
if (WIFEXITED(child_status)) {
/* Check exit status of the child */
if (WEXITSTATUS(child_status) != 0)
- TEST_ERROR
+ TEST_ERROR;
}
else
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close the file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/*
* Case 2: 1) RDWR 2) RDONLY : should fail
*/
/* Create 1 pipe */
if (HDpipe(out_pdf) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Fork child process */
if ((childpid = HDfork()) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (childpid == 0) { /* Child process */
hid_t child_fid; /* File ID */
@@ -4979,11 +4979,11 @@ test_file_lock_concur(hid_t in_fapl)
/* close unused read end for out_pdf */
if (HDclose(out_pdf[0]) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Opens the test file */
if ((fid = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Notify child process */
notify = 1;
@@ -4996,20 +4996,20 @@ test_file_lock_concur(hid_t in_fapl)
/* Wait for child process to complete */
if (HDwaitpid(childpid, &child_status, child_wait_option) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Check if child terminated normally */
if (WIFEXITED(child_status)) {
/* Check exit status of the child */
if (WEXITSTATUS(child_status) != 0)
- TEST_ERROR
+ TEST_ERROR;
}
else
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close the file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/*
* Case 3: 1) RDONLY 2) RDWR : should fail
@@ -5017,11 +5017,11 @@ test_file_lock_concur(hid_t in_fapl)
/* Create 1 pipe */
if (HDpipe(out_pdf) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Fork child process */
if ((childpid = HDfork()) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (childpid == 0) { /* Child process */
hid_t child_fid; /* File ID */
@@ -5057,11 +5057,11 @@ test_file_lock_concur(hid_t in_fapl)
/* close unused read end for out_pdf */
if (HDclose(out_pdf[0]) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Opens the test file */
if ((fid = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Notify child process */
notify = 1;
@@ -5074,20 +5074,20 @@ test_file_lock_concur(hid_t in_fapl)
/* Wait for child process to complete */
if (HDwaitpid(childpid, &child_status, child_wait_option) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Check if child terminated normally */
if (WIFEXITED(child_status)) {
/* Check exit status of the child */
if (WEXITSTATUS(child_status) != 0)
- TEST_ERROR
+ TEST_ERROR;
}
else
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close the file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/*
* Case 4: 1) RDONLY 2) RDONLY : should succeed
@@ -5095,11 +5095,11 @@ test_file_lock_concur(hid_t in_fapl)
/* Create 1 pipe */
if (HDpipe(out_pdf) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Fork child process */
if ((childpid = HDfork()) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (childpid == 0) { /* Child process */
hid_t child_fid; /* File ID */
@@ -5140,11 +5140,11 @@ test_file_lock_concur(hid_t in_fapl)
/* close unused read end for out_pdf */
if (HDclose(out_pdf[0]) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Create file */
if ((fid = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Notify child process */
notify = 1;
@@ -5157,24 +5157,24 @@ test_file_lock_concur(hid_t in_fapl)
/* Wait for child process to complete */
if (HDwaitpid(childpid, &child_status, child_wait_option) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Check if child terminated normally */
if (WIFEXITED(child_status)) {
/* Check exit status of the child */
if (WEXITSTATUS(child_status) != 0)
- TEST_ERROR
+ TEST_ERROR;
}
else
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close the file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close the property list */
if (H5Pclose(fapl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
PASSED();
@@ -5234,24 +5234,24 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Set locking in the fapl */
if ((fapl = H5Pcopy(in_fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Pset_file_locking(fapl, TRUE, TRUE) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[2], fapl, filename, sizeof(filename));
/* Set to use latest library format */
if (H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Create the test file */
if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close the file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/*
* Case 1: 1) RDWR 2) RDWR|SWMR_WRITE : should fail
@@ -5259,11 +5259,11 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Create 1 pipe */
if (HDpipe(out_pdf) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Fork child process */
if ((childpid = HDfork()) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (childpid == 0) { /* Child process */
hid_t child_fid; /* File ID */
@@ -5299,11 +5299,11 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* close unused read end for out_pdf */
if (HDclose(out_pdf[0]) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Open the test file */
if ((fid = H5Fopen(filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Notify child process */
notify = 1;
@@ -5316,20 +5316,20 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Wait for child process to complete */
if (HDwaitpid(childpid, &child_status, child_wait_option) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Check if child terminated normally */
if (WIFEXITED(child_status)) {
/* Check exit status of the child */
if (WEXITSTATUS(child_status) != 0)
- TEST_ERROR
+ TEST_ERROR;
}
else
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close the file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/*
* Case 2: 1) RDWR 2) RDONLY|SWMR_READ: should fail
@@ -5337,11 +5337,11 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Create 1 pipe */
if (HDpipe(out_pdf) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Fork child process */
if ((childpid = HDfork()) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (childpid == 0) { /* Child process */
hid_t child_fid; /* File ID */
@@ -5377,11 +5377,11 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* close unused read end for out_pdf */
if (HDclose(out_pdf[0]) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Open the test file */
if ((fid = H5Fopen(filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Notify child process */
notify = 1;
@@ -5394,20 +5394,20 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Wait for child process to complete */
if (HDwaitpid(childpid, &child_status, child_wait_option) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Check if child terminated normally */
if (WIFEXITED(child_status)) {
/* Check exit status of the child */
if (WEXITSTATUS(child_status) != 0)
- TEST_ERROR
+ TEST_ERROR;
}
else
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close the file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/*
* Case 3: 1) RDWR|SWMR_WRITE 2) RDWR : should fail
@@ -5415,11 +5415,11 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Create 1 pipe */
if (HDpipe(out_pdf) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Fork child process */
if ((childpid = HDfork()) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (childpid == 0) { /* Child process */
hid_t child_fid; /* File ID */
@@ -5455,11 +5455,11 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* close unused read end for out_pdf */
if (HDclose(out_pdf[0]) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Open the test file */
if ((fid = H5Fopen(filename, H5F_ACC_RDWR | H5F_ACC_SWMR_WRITE, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Notify child process */
notify = 1;
@@ -5472,31 +5472,31 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Wait for child process to complete */
if (HDwaitpid(childpid, &child_status, child_wait_option) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Check if child terminated normally */
if (WIFEXITED(child_status)) {
/* Check exit status of the child */
if (WEXITSTATUS(child_status) != 0)
- TEST_ERROR
+ TEST_ERROR;
}
else
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close the file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/*
* Case 4: 1) RDWR|SWMR_WRITE 2) RDWR|SWMR_WRITE : should fail
*/
if (HDpipe(out_pdf) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Fork child process */
if ((childpid = HDfork()) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (childpid == 0) { /* Child process */
hid_t child_fid; /* File ID */
@@ -5532,11 +5532,11 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* close unused read end for out_pdf */
if (HDclose(out_pdf[0]) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Open the test file */
if ((fid = H5Fopen(filename, H5F_ACC_RDWR | H5F_ACC_SWMR_WRITE, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Notify child process */
notify = 1;
@@ -5549,31 +5549,31 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Wait for child process to complete */
if (HDwaitpid(childpid, &child_status, child_wait_option) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Check if child terminated normally */
if (WIFEXITED(child_status)) {
/* Check exit status of the child */
if (WEXITSTATUS(child_status) != 0)
- TEST_ERROR
+ TEST_ERROR;
}
else
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close the file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/*
* Case 5: 1) RDWR|SWMR_WRITE 2) RDONLY|SWMR_READ : should succeed
*/
if (HDpipe(out_pdf) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Fork child process */
if ((childpid = HDfork()) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (childpid == 0) { /* Child process */
hid_t child_fid; /* File ID */
@@ -5599,7 +5599,7 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Should succeed */
if (child_fid >= 0) {
if (H5Fclose(child_fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
HDexit(EXIT_SUCCESS);
}
@@ -5612,11 +5612,11 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* close unused read end for out_pdf */
if (HDclose(out_pdf[0]) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Open the test file */
if ((fid = H5Fopen(filename, H5F_ACC_RDWR | H5F_ACC_SWMR_WRITE, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Notify child process */
notify = 1;
@@ -5629,31 +5629,31 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Wait for child process to complete */
if (HDwaitpid(childpid, &child_status, child_wait_option) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Check if child terminated normally */
if (WIFEXITED(child_status)) {
/* Check exit status of the child */
if (WEXITSTATUS(child_status) != 0)
- TEST_ERROR
+ TEST_ERROR;
}
else
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close the file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/*
* Case 6: 1) RDWR|SWMR_WRITE 2) RDONLY : should fail
*/
if (HDpipe(out_pdf) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Fork child process */
if ((childpid = HDfork()) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (childpid == 0) { /* Child process */
hid_t child_fid; /* File ID */
@@ -5689,11 +5689,11 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* close unused read end for out_pdf */
if (HDclose(out_pdf[0]) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Open the test file */
if ((fid = H5Fopen(filename, H5F_ACC_RDWR | H5F_ACC_SWMR_WRITE, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Notify child process */
notify = 1;
@@ -5706,20 +5706,20 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Wait for child process to complete */
if (HDwaitpid(childpid, &child_status, child_wait_option) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Check if child terminated normally */
if (WIFEXITED(child_status)) {
/* Check exit status of the child */
if (WEXITSTATUS(child_status) != 0)
- TEST_ERROR
+ TEST_ERROR;
}
else
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close the file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/*
* Case 7: 1) RDONLY|SWMR_READ 2) RDWR : should fail
@@ -5727,11 +5727,11 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Create 1 pipe */
if (HDpipe(out_pdf) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Fork child process */
if ((childpid = HDfork()) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (childpid == 0) { /* Child process */
hid_t child_fid; /* File ID */
@@ -5767,11 +5767,11 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* close unused read end for out_pdf */
if (HDclose(out_pdf[0]) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Open the test file */
if ((fid = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Notify child process */
notify = 1;
@@ -5784,20 +5784,20 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Wait for child process to complete */
if (HDwaitpid(childpid, &child_status, child_wait_option) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Check if child terminated normally */
if (WIFEXITED(child_status)) {
/* Check exit status of the child */
if (WEXITSTATUS(child_status) != 0)
- TEST_ERROR
+ TEST_ERROR;
}
else
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close the file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/*
* Case 8: 1) RDONLY|SWMR_READ 2) RDWR|SWMR_WRITE : should fail
@@ -5805,11 +5805,11 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Create 1 pipe */
if (HDpipe(out_pdf) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Fork child process */
if ((childpid = HDfork()) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (childpid == 0) { /* Child process */
hid_t child_fid; /* File ID */
@@ -5845,11 +5845,11 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* close unused read end for out_pdf */
if (HDclose(out_pdf[0]) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Open the test file */
if ((fid = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Notify child process */
notify = 1;
@@ -5862,20 +5862,20 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Wait for child process to complete */
if (HDwaitpid(childpid, &child_status, child_wait_option) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Check if child terminated normally */
if (WIFEXITED(child_status)) {
/* Check exit status of the child */
if (WEXITSTATUS(child_status) != 0)
- TEST_ERROR
+ TEST_ERROR;
}
else
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close the file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/*
* Case 9: 1) RDONLY|SWMR_READ 2) RDONLY|SWMR_READ : should succeed
@@ -5883,11 +5883,11 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Create 1 pipe */
if (HDpipe(out_pdf) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Fork child process */
if ((childpid = HDfork()) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (childpid == 0) { /* Child process */
hid_t child_fid; /* File ID */
@@ -5913,7 +5913,7 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Should succeed */
if (child_fid >= 0) {
if (H5Fclose(child_fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
HDexit(EXIT_SUCCESS);
}
@@ -5926,11 +5926,11 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* close unused read end for out_pdf */
if (HDclose(out_pdf[0]) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Open the test file */
if ((fid = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Notify child process */
notify = 1;
@@ -5943,20 +5943,20 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Wait for child process to complete */
if (HDwaitpid(childpid, &child_status, child_wait_option) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Check if child terminated normally */
if (WIFEXITED(child_status)) {
/* Check exit status of the child */
if (WEXITSTATUS(child_status) != 0)
- TEST_ERROR
+ TEST_ERROR;
}
else
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close the file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/*
* Case 10: 1) RDONLY|SWMR_READ 2) RDONLY : should succeed
@@ -5964,11 +5964,11 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Create 1 pipe */
if (HDpipe(out_pdf) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Fork child process */
if ((childpid = HDfork()) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (childpid == 0) { /* Child process */
hid_t child_fid; /* File ID */
@@ -5986,12 +5986,12 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Open the test file */
if ((child_fid = H5Fopen(filename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Should succeed */
if (child_fid >= 0) {
if (H5Fclose(child_fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
HDexit(EXIT_SUCCESS);
}
@@ -6004,11 +6004,11 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* close unused read end for out_pdf */
if (HDclose(out_pdf[0]) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Open the test file */
if ((fid = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Notify child process */
notify = 1;
@@ -6021,20 +6021,20 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Wait for child process to complete */
if (HDwaitpid(childpid, &child_status, child_wait_option) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Check if child terminated normally */
if (WIFEXITED(child_status)) {
/* Check exit status of the child */
if (WEXITSTATUS(child_status) != 0)
- TEST_ERROR
+ TEST_ERROR;
}
else
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close the file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/*
* Case 11: 1) RDONLY 2) RDWR|SWMR_WRITE : should fail
@@ -6042,11 +6042,11 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Create 1 pipe */
if (HDpipe(out_pdf) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Fork child process */
if ((childpid = HDfork()) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (childpid == 0) { /* Child process */
hid_t child_fid; /* File ID */
@@ -6082,11 +6082,11 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Close unused read end for out_pdf */
if (HDclose(out_pdf[0]) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Open the test file */
if ((fid = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Notify child process */
notify = 1;
@@ -6099,20 +6099,20 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Wait for child process to complete */
if (HDwaitpid(childpid, &child_status, child_wait_option) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Check if child terminated normally */
if (WIFEXITED(child_status)) {
/* Check exit status of the child */
if (WEXITSTATUS(child_status) != 0)
- TEST_ERROR
+ TEST_ERROR;
}
else
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close the file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/*
* Case 12: 1) RDONLY 2) RDONLY|SWMR_READ : should succeed
@@ -6120,11 +6120,11 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Create 1 pipe */
if (HDpipe(out_pdf) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Fork child process */
if ((childpid = HDfork()) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (childpid == 0) { /* Child process */
hid_t child_fid; /* File ID */
@@ -6150,7 +6150,7 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Should succeed */
if (child_fid >= 0) {
if (H5Fclose(child_fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
HDexit(EXIT_SUCCESS);
}
@@ -6163,11 +6163,11 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* close unused read end for out_pdf */
if (HDclose(out_pdf[0]) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Open the test file */
if ((fid = H5Fopen(filename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Notify child process */
notify = 1;
@@ -6180,24 +6180,24 @@ test_file_lock_swmr_concur(hid_t in_fapl)
/* Wait for child process to complete */
if (HDwaitpid(childpid, &child_status, child_wait_option) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Check if child terminated normally */
if (WIFEXITED(child_status)) {
/* Check exit status of the child */
if (WEXITSTATUS(child_status) != 0)
- TEST_ERROR
+ TEST_ERROR;
}
else
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close the file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close the property list */
if (H5Pclose(fapl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
PASSED();
@@ -6229,13 +6229,13 @@ test_file_locking(hid_t in_fapl, hbool_t turn_locking_on, hbool_t env_var_overri
{
#if !(defined(H5_HAVE_FORK) && defined(H5_HAVE_WAITPID))
if (turn_locking_on && env_var_override)
- TESTING("File locking: ON w/ env var override")
+ TESTING("File locking: ON w/ env var override");
else if (turn_locking_on && !env_var_override)
- TESTING("File locking: ON")
+ TESTING("File locking: ON");
else if (!turn_locking_on && env_var_override)
- TESTING("File locking: OFF w/ env var override")
+ TESTING("File locking: OFF w/ env var override");
else
- TESTING("File locking: OFF")
+ TESTING("File locking: OFF");
SKIPPED();
HDputs(" Test skipped due to fork or waitpid not defined.");
return 0;
@@ -6252,34 +6252,34 @@ test_file_locking(hid_t in_fapl, hbool_t turn_locking_on, hbool_t env_var_overri
herr_t ret;
if (turn_locking_on && env_var_override)
- TESTING("File locking: ON w/ env var override")
+ TESTING("File locking: ON w/ env var override");
else if (turn_locking_on && !env_var_override)
- TESTING("File locking: ON")
+ TESTING("File locking: ON");
else if (!turn_locking_on && env_var_override)
- TESTING("File locking: OFF w/ env var override")
+ TESTING("File locking: OFF w/ env var override");
else
- TESTING("File locking: OFF")
+ TESTING("File locking: OFF");
/* Copy the incoming fapl */
if ((fapl = H5Pcopy(in_fapl)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Set locking in the fapl */
if (H5Pset_file_locking(fapl, turn_locking_on ? TRUE : FALSE, TRUE) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* If requested, set the environment variable */
if (env_var_override) {
if (HDsetenv(HDF5_USE_FILE_LOCKING, turn_locking_on ? "FALSE" : "TRUE", TRUE) < 0)
- TEST_ERROR
+ TEST_ERROR;
if (H5F__reparse_file_lock_variable_test() < 0)
- TEST_ERROR
+ TEST_ERROR;
}
else {
if (HDsetenv(HDF5_USE_FILE_LOCKING, "", TRUE) < 0)
- TEST_ERROR
+ TEST_ERROR;
if (H5F__reparse_file_lock_variable_test() < 0)
- TEST_ERROR
+ TEST_ERROR;
}
/* Set the filename to use for this test (dependent on fapl) */
@@ -6287,11 +6287,11 @@ test_file_locking(hid_t in_fapl, hbool_t turn_locking_on, hbool_t env_var_overri
/* Create the test file */
if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Close the file */
if (H5Fclose(fid) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Open a file for read-only and then read-write. This will fail
* when the locking scheme is turned on.
@@ -6299,11 +6299,11 @@ test_file_locking(hid_t in_fapl, hbool_t turn_locking_on, hbool_t env_var_overri
/* Create 1 pipe */
if (HDpipe(out_pdf) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Fork child process */
if ((childpid = HDfork()) < 0)
- TEST_ERROR
+ TEST_ERROR;
if (childpid == 0) {
@@ -6342,11 +6342,11 @@ test_file_locking(hid_t in_fapl, hbool_t turn_locking_on, hbool_t env_var_overri
/* close unused read end for out_pdf */
if (HDclose(out_pdf[0]) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Open the test file */
if ((fid = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Notify child process */
notify = 1;
@@ -6359,13 +6359,13 @@ test_file_locking(hid_t in_fapl, hbool_t turn_locking_on, hbool_t env_var_overri
/* Wait for child process to complete */
if (HDwaitpid(childpid, &child_status, child_wait_option) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Check exit status of the child */
if (WIFEXITED(child_status))
exit_status = WEXITSTATUS(child_status);
else
- TEST_ERROR
+ TEST_ERROR;
/* The child process should have passed or failed as follows:
*
@@ -6375,21 +6375,21 @@ test_file_locking(hid_t in_fapl, hbool_t turn_locking_on, hbool_t env_var_overri
* locks off, env var override: FAIL
*/
if (turn_locking_on && !env_var_override && (0 == exit_status))
- TEST_ERROR
+ TEST_ERROR;
else if (!turn_locking_on && !env_var_override && (0 != exit_status))
- TEST_ERROR
+ TEST_ERROR;
else if (turn_locking_on && env_var_override && (0 != exit_status))
- TEST_ERROR
+ TEST_ERROR;
else if (!turn_locking_on && env_var_override && (0 == exit_status))
- TEST_ERROR
+ TEST_ERROR;
/* Close the file */
if (H5Fclose(fid) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Close the copied property list */
if (H5Pclose(fapl) < 0)
- TEST_ERROR
+ TEST_ERROR;
PASSED();
@@ -6425,30 +6425,30 @@ test_different_lock_flags(hid_t in_fapl)
hid_t fapl_id = H5I_INVALID_HID; /* File access property list */
char filename[NAME_BUF_SIZE]; /* File name */
- TESTING("Using different lock flags")
+ TESTING("Using different lock flags");
/* Copy the incoming fapl */
if ((fapl_id = H5Pcopy(in_fapl)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Set locking in the fapl */
if (H5Pset_file_locking(fapl_id, TRUE, TRUE) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[1], fapl_id, filename, sizeof(filename));
/* Create the test file */
if ((fid1 = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Open the test file with the same flags (should pass) */
if ((fid2 = H5Fopen(filename, H5F_ACC_RDWR, fapl_id)) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Unset locking in the fapl */
if (H5Pset_file_locking(fapl_id, FALSE, FALSE) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Open the test file with different flags (should FAIL) */
H5E_BEGIN_TRY
@@ -6457,17 +6457,17 @@ test_different_lock_flags(hid_t in_fapl)
}
H5E_END_TRY;
if (H5I_INVALID_HID != fid3)
- FAIL_PUTS_ERROR("Should not have been able to open a file with different locking flags")
+ FAIL_PUTS_ERROR("Should not have been able to open a file with different locking flags");
/* Close the files */
if (H5Fclose(fid1) < 0)
- TEST_ERROR
+ TEST_ERROR;
if (H5Fclose(fid2) < 0)
- TEST_ERROR
+ TEST_ERROR;
/* Close the copied property list */
if (H5Pclose(fapl_id) < 0)
- TEST_ERROR
+ TEST_ERROR;
PASSED();
@@ -6503,7 +6503,7 @@ test_swmr_vfd_flag(void)
if (H5Pset_fapl_sec2(sec2_fapl) < 0)
FAIL_STACK_ERROR;
if (H5Pset_libver_bounds(sec2_fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
h5_fixname(FILENAME[0], sec2_fapl, filename, sizeof(filename));
if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC | H5F_ACC_SWMR_WRITE, H5P_DEFAULT, sec2_fapl)) < 0)
@@ -6518,7 +6518,7 @@ test_swmr_vfd_flag(void)
if (H5Pset_fapl_stdio(bad_fapl) < 0)
FAIL_STACK_ERROR;
if (H5Pset_libver_bounds(bad_fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
fid = -1;
h5_fixname(FILENAME[0], bad_fapl, filename, sizeof(filename));
@@ -6576,11 +6576,11 @@ test_bug_refresh(hid_t in_fapl)
/* Create a copy of the input parameter in_fapl */
if ((fapl = H5Pcopy(in_fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Set to use the latest library format */
if (H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 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));
@@ -6589,11 +6589,11 @@ test_bug_refresh(hid_t in_fapl)
/* Create a file with the latest format */
if ((fid = 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(fid)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Create groups: compact to dense storage */
if ((gid1 = H5Gcreate2(fid, "group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -6616,26 +6616,26 @@ test_bug_refresh(hid_t in_fapl)
FAIL_STACK_ERROR;
if (H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0)
- TEST_ERROR
+ TEST_ERROR;
if (H5Grefresh(gid1) < 0)
- TEST_ERROR
+ TEST_ERROR;
if (H5Grefresh(gid2) < 0)
- TEST_ERROR
+ TEST_ERROR;
if (H5Grefresh(gid3) < 0)
- TEST_ERROR
+ TEST_ERROR;
if (H5Grefresh(gid4) < 0)
- TEST_ERROR
+ TEST_ERROR;
if (H5Grefresh(gid5) < 0)
- TEST_ERROR
+ TEST_ERROR;
if (H5Grefresh(gid6) < 0)
- TEST_ERROR
+ TEST_ERROR;
if (H5Grefresh(gid7) < 0)
- TEST_ERROR
+ TEST_ERROR;
if (H5Grefresh(gid8) < 0)
- TEST_ERROR
+ TEST_ERROR;
if (H5Grefresh(gid9) < 0)
- TEST_ERROR
+ TEST_ERROR;
H5Gclose(gid1);
H5Gclose(gid2);
@@ -6752,7 +6752,7 @@ test_refresh_concur(hid_t in_fapl, hbool_t new_format)
} /* end if */
if ((fapl = H5Pcopy(in_fapl)) < 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));
@@ -6760,23 +6760,23 @@ test_refresh_concur(hid_t in_fapl, hbool_t new_format)
if (new_format) {
/* Set to use the latest library format */
if (H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Create the test file */
if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
}
else {
/* Create the test file without latest format but with SWMR write */
if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC | H5F_ACC_SWMR_WRITE, H5P_DEFAULT, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
} /* end if */
/* Create a chunked dataset with 1 extendible dimension */
if ((sid = H5Screate_simple(1, dims, maxdims)) < 0)
FAIL_STACK_ERROR;
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Pset_chunk(dcpl, 1, chunk_dims) < 0)
FAIL_STACK_ERROR;
if ((did = H5Dcreate2(fid, "dataset", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
@@ -6784,25 +6784,25 @@ test_refresh_concur(hid_t in_fapl, hbool_t new_format)
/* Closing */
if (H5Dclose(did) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Sclose(sid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Pclose(dcpl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close the file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Create 2 pipes */
if (HDpipe(out_pdf) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (HDpipe(in_pdf) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Fork child process */
if ((childpid = HDfork()) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (childpid == 0) { /* Child process */
hid_t child_fid1 = -1; /* File ID */
@@ -6909,14 +6909,14 @@ test_refresh_concur(hid_t in_fapl, hbool_t new_format)
/* Close unused read end for out_pdf */
if (HDclose(out_pdf[0]) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close unused write end for in_pdf */
if (HDclose(in_pdf[1]) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Open the test file */
if ((fid = H5Fopen(filename, H5F_ACC_RDWR | H5F_ACC_SWMR_WRITE, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Open the dataset */
if ((did = H5Dopen2(fid, "dataset", H5P_DEFAULT)) < 0)
@@ -6977,27 +6977,27 @@ test_refresh_concur(hid_t in_fapl, hbool_t new_format)
/* Wait for child process to complete */
if ((tmppid = HDwaitpid(childpid, &child_status, child_wait_option)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Check exit status of child process */
if (WIFEXITED(child_status)) {
if ((child_exit_val = WEXITSTATUS(child_status)) != 0)
- TEST_ERROR
+ TEST_ERROR;
}
else /* Child process terminated abnormally */
- TEST_ERROR
+ TEST_ERROR;
/* Close the dataset */
if (H5Dclose(did) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close the file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close the property list */
if (H5Pclose(fapl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
PASSED();
return 0;
@@ -7055,7 +7055,7 @@ test_multiple_same(hid_t in_fapl, hbool_t new_format)
} /* end if */
if ((fapl = H5Pcopy(in_fapl)) < 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));
@@ -7063,23 +7063,23 @@ test_multiple_same(hid_t in_fapl, hbool_t new_format)
if (new_format) {
/* Set to use the latest library format */
if (H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Create the test file */
if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
}
else {
/* Create the test file without latest format but with SWMR write */
if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC | H5F_ACC_SWMR_WRITE, H5P_DEFAULT, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
} /* end if */
/* Create a chunked dataset with 1 extendible dimension */
if ((sid = H5Screate_simple(2, dims, maxdims)) < 0)
FAIL_STACK_ERROR;
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Pset_chunk(dcpl, 2, chunk_dims) < 0)
FAIL_STACK_ERROR;
if ((did = H5Dcreate2(fid, "dataset", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
@@ -7087,33 +7087,33 @@ test_multiple_same(hid_t in_fapl, hbool_t new_format)
/* Closing */
if (H5Dclose(did) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Sclose(sid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Pclose(dcpl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close the file */
if (H5Fclose(fid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Case 1 */
/* Open the file 3 times: SWMR-write, read-write, read-only */
if ((fid1 = H5Fopen(filename, H5F_ACC_RDWR | H5F_ACC_SWMR_WRITE, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if ((fid2 = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if ((fid3 = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Open the dataset 3 times with fid1, fid2, fid3 */
if ((did1 = H5Dopen2(fid1, "dataset", H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if ((did2 = H5Dopen2(fid2, "dataset", H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if ((did3 = H5Dopen2(fid3, "dataset", H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Write to the dataset via did1 */
wbuf = 88;
@@ -7159,29 +7159,29 @@ test_multiple_same(hid_t in_fapl, hbool_t new_format)
/* Close files */
if (H5Fclose(fid1) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Fclose(fid2) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Fclose(fid3) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Case 2 */
/* Open the file 3 times: read-write, read-only, read-write */
if ((fid1 = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if ((fid2 = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if ((fid3 = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Open the dataset 3 times with fid1, fid2, fid3 */
if ((did1 = H5Dopen2(fid1, "dataset", H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if ((did2 = H5Dopen2(fid2, "dataset", H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if ((did3 = H5Dopen2(fid3, "dataset", H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Write to the dataset via did1 */
wbuf = 88;
@@ -7241,29 +7241,29 @@ test_multiple_same(hid_t in_fapl, hbool_t new_format)
/* Close files */
if (H5Fclose(fid1) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if (H5Fclose(fid2) < 0)
FAIL_STACK_ERROR;
if (H5Fclose(fid3) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Case 3 */
/* Open the file 3 times: read-write, read-only, read-only */
if ((fid1 = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if ((fid2 = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if ((fid3 = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Open the dataset 3 times with fid1, fid2, fid3 */
if ((did1 = H5Dopen2(fid1, "dataset", H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if ((did2 = H5Dopen2(fid2, "dataset", H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
if ((did3 = H5Dopen2(fid3, "dataset", H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Write to the dataset via did1 */
wbuf = 88;
@@ -7287,7 +7287,7 @@ test_multiple_same(hid_t in_fapl, hbool_t new_format)
/* Close file via fid2 */
if (H5Fclose(fid2) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Write to dataset via did3 */
wbuf = 99;
@@ -7300,7 +7300,7 @@ test_multiple_same(hid_t in_fapl, hbool_t new_format)
/* Close file via fid3 */
if (H5Fclose(fid3) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Enable SWMR writing */
if (H5Fstart_swmr_write(fid1) < 0)
@@ -7319,11 +7319,11 @@ test_multiple_same(hid_t in_fapl, hbool_t new_format)
/* Close file via fid1 */
if (H5Fclose(fid1) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
/* Close the property list */
if (H5Pclose(fapl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR;
PASSED();
return 0;