diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-07-28 14:08:44 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-28 14:08:44 (GMT) |
commit | 9ef2f993cfc7173712729fb40b34d1edae8509d9 (patch) | |
tree | 937a98f4d50cf0cca08fa105ae37589aedb8975c /test/hdfs.c | |
parent | f563c2b926445f7a975553bc7742a38f42d3b6f4 (diff) | |
download | hdf5-9ef2f993cfc7173712729fb40b34d1edae8509d9.zip hdf5-9ef2f993cfc7173712729fb40b34d1edae8509d9.tar.gz hdf5-9ef2f993cfc7173712729fb40b34d1edae8509d9.tar.bz2 |
Sync test dir w/ develop (#3303)
Diffstat (limited to 'test/hdfs.c')
-rw-r--r-- | test/hdfs.c | 70 |
1 files changed, 34 insertions, 36 deletions
diff --git a/test/hdfs.c b/test/hdfs.c index 5e0caf9..3c4add5 100644 --- a/test/hdfs.c +++ b/test/hdfs.c @@ -510,7 +510,7 @@ test_fapl_config_validation(void) */ success = H5Pset_fapl_hdfs(fapl_id, &case_ptr->config); } - H5E_END_TRY; + H5E_END_TRY JSVERIFY(case_ptr->expected, success, case_ptr->msg) @@ -552,7 +552,7 @@ error: { (void)H5Pclose(fapl_id); } - H5E_END_TRY; + H5E_END_TRY } return 1; #endif /* H5_HAVE_LIBHDFS */ @@ -633,7 +633,7 @@ error: { (void)H5Pclose(fapl_id); } - H5E_END_TRY; + H5E_END_TRY return 1; #endif /* H5_HAVE_LIBHDFS */ @@ -818,7 +818,7 @@ test_vfd_open(void) { fd = H5FDopen(T.url, T.flags, fapl_id, T.maxaddr); } - H5E_END_TRY; + H5E_END_TRY if (NULL != fd) { if (TRUE == T.might_use_other_driver && H5FD_HDFS != fd->driver_id) { fprintf(stderr, "\n!!!!! WARNING !!!!!\n" @@ -882,7 +882,7 @@ error: (void)H5Pclose(fapl_unconfigured); } } - H5E_END_TRY; + H5E_END_TRY return 1; @@ -999,7 +999,7 @@ error: { (void)H5Pclose(fapl_id); } - H5E_END_TRY; + H5E_END_TRY } return 1; @@ -1062,19 +1062,17 @@ 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; @@ -1096,7 +1094,7 @@ error: { (void)H5Pclose(fapl_id); } - H5E_END_TRY; + H5E_END_TRY } return 1; @@ -1263,7 +1261,7 @@ test_read(void) { open_return = H5FDread(file_raven, H5FD_MEM_DRAW, H5P_DEFAULT, test.addr, test.len, buffer); } - H5E_END_TRY; + H5E_END_TRY JSVERIFY(test.success, open_return, test.message) @@ -1300,7 +1298,7 @@ error: { (void)H5Pclose(fapl_id); } - H5E_END_TRY; + H5E_END_TRY } return 1; @@ -1377,19 +1375,19 @@ test_noops_and_autofails(void) /* auto-fail calls to write and truncate */ H5E_BEGIN_TRY{JSVERIFY(FAIL, H5FDwrite(file, H5FD_MEM_DRAW, H5P_DEFAULT, 1000, 35, data), - "write must fail")} H5E_END_TRY; + "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; @@ -1408,7 +1406,7 @@ error: { (void)H5Pclose(fapl_id); } - H5E_END_TRY; + H5E_END_TRY } if (file != NULL) { (void)H5FDclose(file); @@ -1504,16 +1502,16 @@ test_H5F_integration(void) /* Read-Write Open access is not allowed with this file driver. */ - H5E_BEGIN_TRY{FAIL_IF(0 <= H5Fopen(filename_example_h5, H5F_ACC_RDWR, fapl_id))} H5E_END_TRY; + 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) /************ @@ -1544,7 +1542,7 @@ error: { (void)H5Pclose(fapl_id); } - H5E_END_TRY; + H5E_END_TRY } if (file > 0) { (void)H5Fclose(file); |