diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-07-28 19:33:16 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-28 19:33:16 (GMT) |
commit | 8ddf2706f7e0cde59fad6624e2863960e62f6544 (patch) | |
tree | f090bb9fa368c90f67029f5d860ef39df3e8b038 /test/hdfs.c | |
parent | b1ab59d239c74cdbea7d518b1398458c4150655f (diff) | |
download | hdf5-8ddf2706f7e0cde59fad6624e2863960e62f6544.zip hdf5-8ddf2706f7e0cde59fad6624e2863960e62f6544.tar.gz hdf5-8ddf2706f7e0cde59fad6624e2863960e62f6544.tar.bz2 |
Sync of src w/ develop (#3307)
Diffstat (limited to 'test/hdfs.c')
-rw-r--r-- | test/hdfs.c | 43 |
1 files changed, 22 insertions, 21 deletions
diff --git a/test/hdfs.c b/test/hdfs.c index 3c4add5..52e2eae 100644 --- a/test/hdfs.c +++ b/test/hdfs.c @@ -1062,17 +1062,19 @@ test_H5FDread_without_eoa_set_fails(void) * TEST * ********/ - H5E_BEGIN_TRY{ - /* mute stack trace on expected failure */ - JSVERIFY(FAIL, H5FDread(file_shakespeare, H5FD_MEM_DRAW, H5P_DEFAULT, 1200699, 102, buffer), - "cannot read before eoa is set")} H5E_END_TRY for (i = 0; i < HDFS_TEST_MAX_BUF_SIZE; i++){ - JSVERIFY(0, (unsigned)buffer[i], "buffer was modified by write!")} + H5E_BEGIN_TRY{/* mute stack trace on expected failure */ + JSVERIFY(FAIL, H5FDread(file_shakespeare, H5FD_MEM_DRAW, H5P_DEFAULT, 1200699, 102, buffer), + "cannot read before eoa is set")} H5E_END_TRY + for (i = 0; i < HDFS_TEST_MAX_BUF_SIZE; i++) { + JSVERIFY(0, (unsigned)buffer[i], "buffer was modified by write!") + } /************ * TEARDOWN * ************/ - FAIL_IF(FAIL == H5FDclose(file_shakespeare)) file_shakespeare = NULL; + FAIL_IF(FAIL == H5FDclose(file_shakespeare)) + file_shakespeare = NULL; FAIL_IF(FAIL == H5Pclose(fapl_id)) fapl_id = -1; @@ -1377,17 +1379,17 @@ test_noops_and_autofails(void) H5E_BEGIN_TRY{JSVERIFY(FAIL, H5FDwrite(file, H5FD_MEM_DRAW, H5P_DEFAULT, 1000, 35, data), "write must fail")} H5E_END_TRY - H5E_BEGIN_TRY{ - JSVERIFY(FAIL, H5FDtruncate(file, H5P_DEFAULT, FALSE), "truncate must fail")} H5E_END_TRY + H5E_BEGIN_TRY{JSVERIFY(FAIL, H5FDtruncate(file, H5P_DEFAULT, FALSE), "truncate must fail")} H5E_END_TRY - H5E_BEGIN_TRY{JSVERIFY(FAIL, H5FDtruncate(file, H5P_DEFAULT, TRUE), - "truncate must fail (closing)")} H5E_END_TRY + H5E_BEGIN_TRY{ + JSVERIFY(FAIL, H5FDtruncate(file, H5P_DEFAULT, TRUE), "truncate must fail (closing)")} H5E_END_TRY - /************ - * TEARDOWN * - ************/ + /************ + * TEARDOWN * + ************/ - FAIL_IF(FAIL == H5FDclose(file)) file = NULL; + FAIL_IF(FAIL == H5FDclose(file)) + file = NULL; FAIL_IF(FAIL == H5Pclose(fapl_id)) fapl_id = -1; @@ -1504,14 +1506,13 @@ test_H5F_integration(void) */ H5E_BEGIN_TRY{FAIL_IF(0 <= H5Fopen(filename_example_h5, H5F_ACC_RDWR, fapl_id))} H5E_END_TRY - /* H5Fcreate() is not allowed with this file driver. - */ - H5E_BEGIN_TRY{ - FAIL_IF(0 <= H5Fcreate(filename_missing, H5F_ACC_RDONLY, H5P_DEFAULT, fapl_id))} H5E_END_TRY + /* H5Fcreate() is not allowed with this file driver. + */ + H5E_BEGIN_TRY{FAIL_IF(0 <= H5Fcreate(filename_missing, H5F_ACC_RDONLY, H5P_DEFAULT, fapl_id))} H5E_END_TRY - /* Successful open. - */ - file = H5Fopen(filename_example_h5, H5F_ACC_RDONLY, fapl_id); + /* Successful open. + */ + file = H5Fopen(filename_example_h5, H5F_ACC_RDONLY, fapl_id); FAIL_IF(file < 0) /************ |