summaryrefslogtreecommitdiffstats
path: root/test/swmr.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@lbl.gov>2021-03-17 15:25:39 (GMT)
committerGitHub <noreply@github.com>2021-03-17 15:25:39 (GMT)
commitc6e4e535469beaa3418b34863d455c8f17ade3f5 (patch)
tree11c5cf08959881ee6cff2df81b1d9f873ddd3dcf /test/swmr.c
parentf6d919a2ab0034a1ee76ca2d5f59f4d8114c4952 (diff)
downloadhdf5-c6e4e535469beaa3418b34863d455c8f17ade3f5.zip
hdf5-c6e4e535469beaa3418b34863d455c8f17ade3f5.tar.gz
hdf5-c6e4e535469beaa3418b34863d455c8f17ade3f5.tar.bz2
Update clang config (#473)
* Update clang config to put H5E_BEGIN_TRY / H5E_END_TRY on separate lines, empty C++ methods on separate lines, understand that ALL_MEMBERS / UNIQUE_MEMBERS are foreach macros, and properly skip the 'config' directory in the find command without emiting a warning * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'test/swmr.c')
-rw-r--r--test/swmr.c290
1 files changed, 232 insertions, 58 deletions
diff --git a/test/swmr.c b/test/swmr.c
index 2f90114..607b448 100644
--- a/test/swmr.c
+++ b/test/swmr.c
@@ -163,7 +163,10 @@ test_metadata_read_attempts(hid_t in_fapl)
TEST_ERROR
/* Set the # of read attempts to 0--should fail */
- H5E_BEGIN_TRY { ret = H5Pset_metadata_read_attempts(fapl, 0); }
+ H5E_BEGIN_TRY
+ {
+ ret = H5Pset_metadata_read_attempts(fapl, 0);
+ }
H5E_END_TRY;
if (ret >= 0)
TEST_ERROR
@@ -1649,7 +1652,10 @@ test_start_swmr_write(hid_t in_fapl, hbool_t new_format)
/* Should fail to enable SWMR for non-latest-format */
/* Should succeed in enabling SWMR for latest format */
- H5E_BEGIN_TRY { ret = H5Fstart_swmr_write(fid); }
+ H5E_BEGIN_TRY
+ {
+ ret = H5Fstart_swmr_write(fid);
+ }
H5E_END_TRY;
if (new_format) {
if (ret < 0)
@@ -1974,7 +1980,10 @@ test_err_start_swmr_write(hid_t in_fapl, hbool_t new_format)
fid = H5Fcreate(filename, H5F_ACC_TRUNC | H5F_ACC_SWMR_WRITE, H5P_DEFAULT, fapl);
/* Should fail to enable SWMR writing when the file is already in SWMR writing mode */
- H5E_BEGIN_TRY { ret = H5Fstart_swmr_write(fid); }
+ H5E_BEGIN_TRY
+ {
+ ret = H5Fstart_swmr_write(fid);
+ }
H5E_END_TRY;
if (ret >= 0)
TEST_ERROR
@@ -1997,7 +2006,10 @@ test_err_start_swmr_write(hid_t in_fapl, hbool_t new_format)
FAIL_STACK_ERROR;
/* Should fail to enable SWMR writing when there is an opened named datatype */
- H5E_BEGIN_TRY { ret = H5Fstart_swmr_write(fid); }
+ H5E_BEGIN_TRY
+ {
+ ret = H5Fstart_swmr_write(fid);
+ }
H5E_END_TRY;
if (ret >= 0)
TEST_ERROR
@@ -2021,7 +2033,10 @@ test_err_start_swmr_write(hid_t in_fapl, hbool_t new_format)
TEST_ERROR
/* Should fail to enable SWMR writing because the file's superblock version is not at least 3 */
- H5E_BEGIN_TRY { ret = H5Fstart_swmr_write(fid); }
+ H5E_BEGIN_TRY
+ {
+ ret = H5Fstart_swmr_write(fid);
+ }
H5E_END_TRY;
if (ret >= 0)
TEST_ERROR
@@ -2047,7 +2062,10 @@ test_err_start_swmr_write(hid_t in_fapl, hbool_t new_format)
FAIL_STACK_ERROR;
/* Should fail to enable SWMR writing when the file is already in SWMR writing mode */
- H5E_BEGIN_TRY { ret = H5Fstart_swmr_write(fid); }
+ H5E_BEGIN_TRY
+ {
+ ret = H5Fstart_swmr_write(fid);
+ }
H5E_END_TRY;
if (ret >= 0)
TEST_ERROR
@@ -2063,7 +2081,10 @@ test_err_start_swmr_write(hid_t in_fapl, hbool_t new_format)
FAIL_STACK_ERROR;
/* Should fail to enable SWMR writing when the file is opened with read only access */
- H5E_BEGIN_TRY { ret = H5Fstart_swmr_write(fid); }
+ H5E_BEGIN_TRY
+ {
+ ret = H5Fstart_swmr_write(fid);
+ }
H5E_END_TRY;
if (ret >= 0)
TEST_ERROR
@@ -2079,7 +2100,10 @@ test_err_start_swmr_write(hid_t in_fapl, hbool_t new_format)
FAIL_STACK_ERROR;
/* Should fail to enable SWMR writing when the file is opened with SWMR read access only */
- H5E_BEGIN_TRY { ret = H5Fstart_swmr_write(fid); }
+ H5E_BEGIN_TRY
+ {
+ ret = H5Fstart_swmr_write(fid);
+ }
H5E_END_TRY;
if (ret >= 0)
TEST_ERROR
@@ -2109,7 +2133,10 @@ test_err_start_swmr_write(hid_t in_fapl, hbool_t new_format)
FAIL_STACK_ERROR;
/* Should fail to enable SWMR writing when there are opened named datatype and attribute */
- H5E_BEGIN_TRY { ret = H5Fstart_swmr_write(fid); }
+ H5E_BEGIN_TRY
+ {
+ ret = H5Fstart_swmr_write(fid);
+ }
H5E_END_TRY;
if (ret >= 0)
TEST_ERROR
@@ -2119,7 +2146,10 @@ test_err_start_swmr_write(hid_t in_fapl, hbool_t new_format)
FAIL_STACK_ERROR;
/* Still fail to enable SWMR writing when the attribute is still opened */
- H5E_BEGIN_TRY { ret = H5Fstart_swmr_write(fid); }
+ H5E_BEGIN_TRY
+ {
+ ret = H5Fstart_swmr_write(fid);
+ }
H5E_END_TRY;
if (ret >= 0)
TEST_ERROR
@@ -2164,7 +2194,10 @@ test_err_start_swmr_write(hid_t in_fapl, hbool_t new_format)
TEST_ERROR
/* Should fail for a second call to enable SWMR writing mode */
- H5E_BEGIN_TRY { ret = H5Fstart_swmr_write(fid); }
+ H5E_BEGIN_TRY
+ {
+ ret = H5Fstart_swmr_write(fid);
+ }
H5E_END_TRY;
if (ret >= 0)
TEST_ERROR
@@ -2188,7 +2221,10 @@ test_err_start_swmr_write(hid_t in_fapl, hbool_t new_format)
FAIL_STACK_ERROR;
/* Should fail to enable SWMR writing mode for fid2 */
- H5E_BEGIN_TRY { ret = H5Fstart_swmr_write(fid2); }
+ H5E_BEGIN_TRY
+ {
+ ret = H5Fstart_swmr_write(fid2);
+ }
H5E_END_TRY;
if (ret >= 0)
TEST_ERROR
@@ -2214,7 +2250,10 @@ test_err_start_swmr_write(hid_t in_fapl, hbool_t new_format)
TEST_ERROR
/* Should fail to enable SWMR writing for fid2 */
- H5E_BEGIN_TRY { ret = H5Fstart_swmr_write(fid2); }
+ H5E_BEGIN_TRY
+ {
+ ret = H5Fstart_swmr_write(fid2);
+ }
H5E_END_TRY;
if (ret >= 0)
TEST_ERROR
@@ -2241,7 +2280,10 @@ test_err_start_swmr_write(hid_t in_fapl, hbool_t new_format)
/* Should fail to open the file with SWMR write + latest format due to superblock version not at least
* 3 */
- H5E_BEGIN_TRY { bad_fid = H5Fopen(filename, H5F_ACC_RDWR | H5F_ACC_SWMR_WRITE, new_fapl); }
+ H5E_BEGIN_TRY
+ {
+ bad_fid = H5Fopen(filename, H5F_ACC_RDWR | H5F_ACC_SWMR_WRITE, new_fapl);
+ }
H5E_END_TRY;
if (bad_fid >= 0)
TEST_ERROR
@@ -2250,7 +2292,10 @@ test_err_start_swmr_write(hid_t in_fapl, hbool_t new_format)
/* Should fail to open the file with SWMR write + non-latest-format due to superblock version not at
* least 3 */
- H5E_BEGIN_TRY { bad_fid = H5Fopen(filename, H5F_ACC_RDWR | H5F_ACC_SWMR_WRITE, fapl); }
+ H5E_BEGIN_TRY
+ {
+ bad_fid = H5Fopen(filename, H5F_ACC_RDWR | H5F_ACC_SWMR_WRITE, fapl);
+ }
H5E_END_TRY;
if (bad_fid >= 0)
TEST_ERROR
@@ -2262,7 +2307,10 @@ test_err_start_swmr_write(hid_t in_fapl, hbool_t new_format)
FAIL_STACK_ERROR;
/* Should fail to enable SWMR writing due to superblock version not at least 3 */
- H5E_BEGIN_TRY { ret = H5Fstart_swmr_write(fid); }
+ H5E_BEGIN_TRY
+ {
+ ret = H5Fstart_swmr_write(fid);
+ }
H5E_END_TRY;
if (ret >= 0)
TEST_ERROR
@@ -2277,7 +2325,10 @@ test_err_start_swmr_write(hid_t in_fapl, hbool_t new_format)
FAIL_STACK_ERROR;
/* Should fail to enable SWMR writing because the file's superblock version is not at least 3 */
- H5E_BEGIN_TRY { ret = H5Fstart_swmr_write(fid); }
+ H5E_BEGIN_TRY
+ {
+ ret = H5Fstart_swmr_write(fid);
+ }
H5E_END_TRY;
if (ret >= 0)
TEST_ERROR
@@ -2732,7 +2783,10 @@ test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format)
}
/* Should fail in opening the test file */
- H5E_BEGIN_TRY { fid = H5Fopen(filename, H5F_ACC_RDONLY, fapl); }
+ H5E_BEGIN_TRY
+ {
+ fid = H5Fopen(filename, H5F_ACC_RDONLY, fapl);
+ }
H5E_END_TRY;
if (fid >= 0)
HDexit(EXIT_FAILURE);
@@ -2805,7 +2859,10 @@ test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format)
}
/* Should fail in opening the test file */
- H5E_BEGIN_TRY { fid = H5Fopen(filename, H5F_ACC_RDWR, fapl); }
+ H5E_BEGIN_TRY
+ {
+ fid = H5Fopen(filename, H5F_ACC_RDWR, fapl);
+ }
H5E_END_TRY;
if (fid >= 0)
HDexit(EXIT_FAILURE);
@@ -2882,7 +2939,10 @@ test_start_swmr_write_concur(hid_t in_fapl, hbool_t new_format)
}
/* Should fail in opening the test file */
- H5E_BEGIN_TRY { fid = H5Fopen(filename, H5F_ACC_RDWR | H5F_ACC_SWMR_WRITE, fapl); }
+ H5E_BEGIN_TRY
+ {
+ fid = H5Fopen(filename, H5F_ACC_RDWR | H5F_ACC_SWMR_WRITE, fapl);
+ }
H5E_END_TRY;
if (fid >= 0)
HDexit(EXIT_FAILURE);
@@ -3170,7 +3230,10 @@ test_object_flush_cb(hid_t in_fapl)
* To verify the failure condition in setting object flush property
*/
/* Should fail if the callback function is not defined but user data is defined */
- H5E_BEGIN_TRY { ret = H5Pset_object_flush_cb(fapl, NULL, &flush_ct); }
+ H5E_BEGIN_TRY
+ {
+ ret = H5Pset_object_flush_cb(fapl, NULL, &flush_ct);
+ }
H5E_END_TRY;
if (ret >= 0)
TEST_ERROR
@@ -3471,19 +3534,28 @@ test_append_flush_generic(void)
FAIL_STACK_ERROR
/* Invalid dataset rank: zero value */
- H5E_BEGIN_TRY { ret = H5Pset_append_flush(dapl, 0, NULL, NULL, &count); }
+ H5E_BEGIN_TRY
+ {
+ ret = H5Pset_append_flush(dapl, 0, NULL, NULL, &count);
+ }
H5E_END_TRY;
if (ret >= 0)
TEST_ERROR
/* Invalid dataset rank: > H5S_MAX_RANK */
- H5E_BEGIN_TRY { ret = H5Pset_append_flush(dapl, H5S_MAX_RANK + 1, NULL, NULL, &count); }
+ H5E_BEGIN_TRY
+ {
+ ret = H5Pset_append_flush(dapl, H5S_MAX_RANK + 1, NULL, NULL, &count);
+ }
H5E_END_TRY;
if (ret >= 0)
TEST_ERROR
/* No boundary specified */
- H5E_BEGIN_TRY { ret = H5Pset_append_flush(dapl, 2, NULL, NULL, &count); }
+ H5E_BEGIN_TRY
+ {
+ ret = H5Pset_append_flush(dapl, 2, NULL, NULL, &count);
+ }
H5E_END_TRY;
if (ret >= 0)
TEST_ERROR
@@ -3493,7 +3565,10 @@ test_append_flush_generic(void)
boundary[1] = 1;
/* Undefined callback function but defined user data */
- H5E_BEGIN_TRY { ret = H5Pset_append_flush(dapl, 2, boundary, NULL, &count); }
+ H5E_BEGIN_TRY
+ {
+ ret = H5Pset_append_flush(dapl, 2, boundary, NULL, &count);
+ }
H5E_END_TRY;
if (ret >= 0)
TEST_ERROR
@@ -3501,7 +3576,10 @@ test_append_flush_generic(void)
/* Invalid boundary size: negative value */
boundary[0] = (hsize_t)-1;
boundary[1] = 1;
- H5E_BEGIN_TRY { ret = H5Pset_append_flush(dapl, 2, boundary, append_cb, &count); }
+ H5E_BEGIN_TRY
+ {
+ ret = H5Pset_append_flush(dapl, 2, boundary, append_cb, &count);
+ }
H5E_END_TRY;
if (ret >= 0)
TEST_ERROR
@@ -3509,7 +3587,10 @@ test_append_flush_generic(void)
/* Invalid boundary size: H5S_UNLIMITED */
boundary[0] = 1;
boundary[1] = H5S_UNLIMITED;
- H5E_BEGIN_TRY { ret = H5Pset_append_flush(dapl, 2, boundary, append_cb, &count); }
+ H5E_BEGIN_TRY
+ {
+ ret = H5Pset_append_flush(dapl, 2, boundary, append_cb, &count);
+ }
H5E_END_TRY;
if (ret >= 0)
TEST_ERROR
@@ -3552,7 +3633,10 @@ test_append_flush_generic(void)
return 0;
error:
- H5E_BEGIN_TRY { H5Pclose(dapl); }
+ H5E_BEGIN_TRY
+ {
+ H5Pclose(dapl);
+ }
H5E_END_TRY;
return -1;
@@ -3670,7 +3754,10 @@ test_append_flush_dataset_chunked(hid_t in_fapl)
FAIL_STACK_ERROR
/* Should fail to Create the dataset */
- H5E_BEGIN_TRY { did2 = H5Dcreate2(fid, "dataset2", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, dapl); }
+ H5E_BEGIN_TRY
+ {
+ did2 = H5Dcreate2(fid, "dataset2", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, dapl);
+ }
H5E_END_TRY;
if (did2 >= 0)
TEST_ERROR
@@ -3681,7 +3768,10 @@ test_append_flush_dataset_chunked(hid_t in_fapl)
FAIL_STACK_ERROR
/* Should fail to create the dataset */
- H5E_BEGIN_TRY { did2 = H5Dcreate2(fid, "dataset2", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, dapl); }
+ H5E_BEGIN_TRY
+ {
+ did2 = H5Dcreate2(fid, "dataset2", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, dapl);
+ }
H5E_END_TRY;
if (did2 >= 0)
TEST_ERROR
@@ -3693,7 +3783,10 @@ test_append_flush_dataset_chunked(hid_t in_fapl)
FAIL_STACK_ERROR;
/* Should fail to open the dataset */
- H5E_BEGIN_TRY { did2 = H5Dopen2(fid, "dataset2", dapl); }
+ H5E_BEGIN_TRY
+ {
+ did2 = H5Dopen2(fid, "dataset2", dapl);
+ }
H5E_END_TRY;
if (did2 >= 0)
TEST_ERROR
@@ -4332,7 +4425,10 @@ test_file_lock_same(hid_t in_fapl)
TEST_ERROR
/* Open file with RDWR should fail */
- H5E_BEGIN_TRY { fid2 = H5Fopen(filename, H5F_ACC_RDWR, fapl); }
+ H5E_BEGIN_TRY
+ {
+ fid2 = H5Fopen(filename, H5F_ACC_RDWR, fapl);
+ }
H5E_END_TRY;
if (fid2 >= 0)
TEST_ERROR
@@ -4436,7 +4532,10 @@ test_file_lock_swmr_same(hid_t in_fapl)
/*
* Case a: RDWR|SWRM_READ : should fail
*/
- H5E_BEGIN_TRY { fid = H5Fopen(filename, H5F_ACC_RDWR | H5F_ACC_SWMR_READ, fapl); }
+ H5E_BEGIN_TRY
+ {
+ fid = H5Fopen(filename, H5F_ACC_RDWR | H5F_ACC_SWMR_READ, fapl);
+ }
H5E_END_TRY;
if (fid >= 0)
TEST_ERROR
@@ -4444,7 +4543,10 @@ test_file_lock_swmr_same(hid_t in_fapl)
/*
* Case b: RDWR|SWMM_WRTE|SWMR_READ : should fail
*/
- H5E_BEGIN_TRY { fid = H5Fopen(filename, H5F_ACC_RDWR | H5F_ACC_SWMR_WRITE | H5F_ACC_SWMR_READ, fapl); }
+ H5E_BEGIN_TRY
+ {
+ fid = H5Fopen(filename, H5F_ACC_RDWR | H5F_ACC_SWMR_WRITE | H5F_ACC_SWMR_READ, fapl);
+ }
H5E_END_TRY;
if (fid >= 0)
TEST_ERROR
@@ -4452,7 +4554,10 @@ test_file_lock_swmr_same(hid_t in_fapl)
/*
* Case c: RDONLY|SWMM_WRITE : should fail
*/
- H5E_BEGIN_TRY { fid = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_WRITE, fapl); }
+ H5E_BEGIN_TRY
+ {
+ fid = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_WRITE, fapl);
+ }
H5E_END_TRY;
if (fid >= 0)
TEST_ERROR
@@ -4460,7 +4565,10 @@ test_file_lock_swmr_same(hid_t in_fapl)
/*
* Case d: RDONLY|SWMM_WRITE|SWMR_READ : should fail
*/
- H5E_BEGIN_TRY { fid = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_WRITE | H5F_ACC_SWMR_READ, fapl); }
+ H5E_BEGIN_TRY
+ {
+ fid = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_WRITE | H5F_ACC_SWMR_READ, fapl);
+ }
H5E_END_TRY;
if (fid >= 0)
TEST_ERROR
@@ -4475,7 +4583,10 @@ test_file_lock_swmr_same(hid_t in_fapl)
if ((fid = H5Fopen(filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR
- H5E_BEGIN_TRY { fid2 = H5Fopen(filename, H5F_ACC_RDWR | H5F_ACC_SWMR_WRITE, fapl); }
+ H5E_BEGIN_TRY
+ {
+ fid2 = H5Fopen(filename, H5F_ACC_RDWR | H5F_ACC_SWMR_WRITE, fapl);
+ }
H5E_END_TRY;
if (fid2 >= 0)
TEST_ERROR
@@ -4568,7 +4679,10 @@ test_file_lock_swmr_same(hid_t in_fapl)
if ((fid = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, fapl)) < 0)
FAIL_STACK_ERROR
- H5E_BEGIN_TRY { fid2 = H5Fopen(filename, H5F_ACC_RDWR, H5P_DEFAULT); }
+ H5E_BEGIN_TRY
+ {
+ fid2 = H5Fopen(filename, H5F_ACC_RDWR, H5P_DEFAULT);
+ }
H5E_END_TRY;
if (fid2 >= 0)
TEST_ERROR
@@ -4583,7 +4697,10 @@ test_file_lock_swmr_same(hid_t in_fapl)
if ((fid = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, fapl)) < 0)
FAIL_STACK_ERROR
- H5E_BEGIN_TRY { fid2 = H5Fopen(filename, H5F_ACC_RDWR | H5F_ACC_SWMR_WRITE, fapl); }
+ H5E_BEGIN_TRY
+ {
+ fid2 = H5Fopen(filename, H5F_ACC_RDWR | H5F_ACC_SWMR_WRITE, fapl);
+ }
H5E_END_TRY;
if (fid2 >= 0)
TEST_ERROR
@@ -4630,7 +4747,10 @@ test_file_lock_swmr_same(hid_t in_fapl)
if ((fid = H5Fopen(filename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR
- H5E_BEGIN_TRY { fid2 = H5Fopen(filename, H5F_ACC_RDWR | H5F_ACC_SWMR_WRITE, fapl); }
+ H5E_BEGIN_TRY
+ {
+ fid2 = H5Fopen(filename, H5F_ACC_RDWR | H5F_ACC_SWMR_WRITE, fapl);
+ }
H5E_END_TRY;
if (fid2 >= 0)
TEST_ERROR
@@ -4645,7 +4765,10 @@ test_file_lock_swmr_same(hid_t in_fapl)
if ((fid = H5Fopen(filename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR
- H5E_BEGIN_TRY { fid2 = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, fapl); }
+ H5E_BEGIN_TRY
+ {
+ fid2 = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, fapl);
+ }
H5E_END_TRY;
if (fid2 >= 0)
TEST_ERROR
@@ -4756,7 +4879,10 @@ test_file_lock_concur(hid_t in_fapl)
}
/* Open the test file */
- H5E_BEGIN_TRY { child_fid = H5Fopen(filename, H5F_ACC_RDWR, fapl); }
+ H5E_BEGIN_TRY
+ {
+ child_fid = H5Fopen(filename, H5F_ACC_RDWR, fapl);
+ }
H5E_END_TRY;
/* Should fail */
@@ -4830,7 +4956,10 @@ test_file_lock_concur(hid_t in_fapl)
}
/* Opens the test file */
- H5E_BEGIN_TRY { child_fid = H5Fopen(filename, H5F_ACC_RDONLY, fapl); }
+ H5E_BEGIN_TRY
+ {
+ child_fid = H5Fopen(filename, H5F_ACC_RDONLY, fapl);
+ }
H5E_END_TRY;
/* Should fail */
@@ -4905,7 +5034,10 @@ test_file_lock_concur(hid_t in_fapl)
}
/* Opens the test file */
- H5E_BEGIN_TRY { child_fid = H5Fopen(filename, H5F_ACC_RDWR, fapl); }
+ H5E_BEGIN_TRY
+ {
+ child_fid = H5Fopen(filename, H5F_ACC_RDWR, fapl);
+ }
H5E_END_TRY;
/* Should fail */
@@ -4980,7 +5112,10 @@ test_file_lock_concur(hid_t in_fapl)
}
/* Opens the test file */
- H5E_BEGIN_TRY { child_fid = H5Fopen(filename, H5F_ACC_RDONLY, fapl); }
+ H5E_BEGIN_TRY
+ {
+ child_fid = H5Fopen(filename, H5F_ACC_RDONLY, fapl);
+ }
H5E_END_TRY;
/* Should succeed */
@@ -5141,7 +5276,10 @@ test_file_lock_swmr_concur(hid_t in_fapl)
}
/* Open the test file */
- H5E_BEGIN_TRY { child_fid = H5Fopen(filename, H5F_ACC_RDWR | H5F_ACC_SWMR_WRITE, fapl); }
+ H5E_BEGIN_TRY
+ {
+ child_fid = H5Fopen(filename, H5F_ACC_RDWR | H5F_ACC_SWMR_WRITE, fapl);
+ }
H5E_END_TRY;
/* Should fail */
@@ -5216,7 +5354,10 @@ test_file_lock_swmr_concur(hid_t in_fapl)
}
/* Open the test file */
- H5E_BEGIN_TRY { child_fid = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, fapl); }
+ H5E_BEGIN_TRY
+ {
+ child_fid = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, fapl);
+ }
H5E_END_TRY;
/* Should fail */
@@ -5291,7 +5432,10 @@ test_file_lock_swmr_concur(hid_t in_fapl)
}
/* Open the test file */
- H5E_BEGIN_TRY { child_fid = H5Fopen(filename, H5F_ACC_RDWR, H5P_DEFAULT); }
+ H5E_BEGIN_TRY
+ {
+ child_fid = H5Fopen(filename, H5F_ACC_RDWR, H5P_DEFAULT);
+ }
H5E_END_TRY;
/* Should fail */
@@ -5365,7 +5509,10 @@ test_file_lock_swmr_concur(hid_t in_fapl)
}
/* Open the test file */
- H5E_BEGIN_TRY { child_fid = H5Fopen(filename, H5F_ACC_RDWR | H5F_ACC_SWMR_WRITE, fapl); }
+ H5E_BEGIN_TRY
+ {
+ child_fid = H5Fopen(filename, H5F_ACC_RDWR | H5F_ACC_SWMR_WRITE, fapl);
+ }
H5E_END_TRY;
/* Should fail */
@@ -5439,7 +5586,10 @@ test_file_lock_swmr_concur(hid_t in_fapl)
}
/* Open the test file */
- H5E_BEGIN_TRY { child_fid = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, fapl); }
+ H5E_BEGIN_TRY
+ {
+ child_fid = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, fapl);
+ }
H5E_END_TRY;
/* Should succeed */
@@ -5516,7 +5666,10 @@ test_file_lock_swmr_concur(hid_t in_fapl)
}
/* Open the test file */
- H5E_BEGIN_TRY { child_fid = H5Fopen(filename, H5F_ACC_RDONLY, H5P_DEFAULT); }
+ H5E_BEGIN_TRY
+ {
+ child_fid = H5Fopen(filename, H5F_ACC_RDONLY, H5P_DEFAULT);
+ }
H5E_END_TRY;
/* Should fail */
@@ -5591,7 +5744,10 @@ test_file_lock_swmr_concur(hid_t in_fapl)
}
/* Open the test file */
- H5E_BEGIN_TRY { child_fid = H5Fopen(filename, H5F_ACC_RDWR, fapl); }
+ H5E_BEGIN_TRY
+ {
+ child_fid = H5Fopen(filename, H5F_ACC_RDWR, fapl);
+ }
H5E_END_TRY;
/* Should fail */
@@ -5666,7 +5822,10 @@ test_file_lock_swmr_concur(hid_t in_fapl)
}
/* Open the test file */
- H5E_BEGIN_TRY { child_fid = H5Fopen(filename, H5F_ACC_RDWR | H5F_ACC_SWMR_WRITE, fapl); }
+ H5E_BEGIN_TRY
+ {
+ child_fid = H5Fopen(filename, H5F_ACC_RDWR | H5F_ACC_SWMR_WRITE, fapl);
+ }
H5E_END_TRY;
/* Should fail */
@@ -5741,7 +5900,10 @@ test_file_lock_swmr_concur(hid_t in_fapl)
}
/* Open the test file */
- H5E_BEGIN_TRY { child_fid = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, fapl); }
+ H5E_BEGIN_TRY
+ {
+ child_fid = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, fapl);
+ }
H5E_END_TRY;
/* Should succeed */
@@ -5897,7 +6059,10 @@ test_file_lock_swmr_concur(hid_t in_fapl)
}
/* Open the test file */
- H5E_BEGIN_TRY { child_fid = H5Fopen(filename, H5F_ACC_RDWR | H5F_ACC_SWMR_WRITE, fapl); }
+ H5E_BEGIN_TRY
+ {
+ child_fid = H5Fopen(filename, H5F_ACC_RDWR | H5F_ACC_SWMR_WRITE, fapl);
+ }
H5E_END_TRY;
/* Should fail */
@@ -5972,7 +6137,10 @@ test_file_lock_swmr_concur(hid_t in_fapl)
}
/* Open the test file */
- H5E_BEGIN_TRY { child_fid = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, fapl); }
+ H5E_BEGIN_TRY
+ {
+ child_fid = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, fapl);
+ }
H5E_END_TRY;
/* Should succeed */
@@ -6279,7 +6447,10 @@ test_different_lock_flags(hid_t in_fapl)
TEST_ERROR
/* Open the test file with different flags (should FAIL) */
- H5E_BEGIN_TRY { fid3 = H5Fopen(filename, H5F_ACC_RDWR, fapl_id); }
+ H5E_BEGIN_TRY
+ {
+ fid3 = H5Fopen(filename, H5F_ACC_RDWR, fapl_id);
+ }
H5E_END_TRY;
if (H5I_INVALID_HID != fid3)
FAIL_PUTS_ERROR("Should not have been able to open a file with different locking flags")
@@ -6347,7 +6518,10 @@ test_swmr_vfd_flag(void)
fid = -1;
h5_fixname(FILENAME[0], bad_fapl, filename, sizeof(filename));
- H5E_BEGIN_TRY { fid = H5Fcreate(filename, H5F_ACC_TRUNC | H5F_ACC_SWMR_WRITE, H5P_DEFAULT, bad_fapl); }
+ H5E_BEGIN_TRY
+ {
+ fid = H5Fcreate(filename, H5F_ACC_TRUNC | H5F_ACC_SWMR_WRITE, H5P_DEFAULT, bad_fapl);
+ }
H5E_END_TRY;
if (fid >= 0)
TEST_ERROR;