summaryrefslogtreecommitdiffstats
path: root/test/API/H5_api_file_test.c
diff options
context:
space:
mode:
authorLarry Knox <lrknox@hdfgroup.org>2023-08-04 21:47:50 (GMT)
committerGitHub <noreply@github.com>2023-08-04 21:47:50 (GMT)
commitf3de9ee39d9c5d24389cb652ce1a583e61d40af2 (patch)
tree70b5bf96bfc853daf565b20114b22c7f1124c95a /test/API/H5_api_file_test.c
parent4cab7b08a0892a4fc92808e069084fdcf0931b4f (diff)
downloadhdf5-f3de9ee39d9c5d24389cb652ce1a583e61d40af2.zip
hdf5-f3de9ee39d9c5d24389cb652ce1a583e61d40af2.tar.gz
hdf5-f3de9ee39d9c5d24389cb652ce1a583e61d40af2.tar.bz2
Merge hdf5_1_14 changes 07-29 to 08-04 (#3355)
* Fix loading plugin fails with missing directory GH issue #3248 (#3323) * Switch parallel compression to use vector I/O (#3245) (#3327) Updates parallel compression feature to use vector I/O instead of creating and passing down MPI derived types to VFD * Fix incorrect error check in H5Ofill.c for undefined fill values (#3312) (#3328) * Fix H5Otoken_to_str call in h5dump and other minor cleanup (#3314) (#3329) * Fix h5repack for variable-length datatyped datasets (#3331) (#3333) * Merge Made HGOTO_ERROR a do-while loop changes from develop (#3334) * Merge Fixes the last of the -Wextra-semi-stmt warnings #3326 (#3338) * Fix assertion failure in H5D__mpio_collective_filtered_vec_io (#3340) (#3350) * Merges from develop Aug 2-4 (#3354) * Fix CVE-2018-11202 (#3330) A malformed file could result in chunk index memory leaks. Under most conditions (i.e., when the --enable-using-memchecker option is NOT used), this would result in a small memory leak and and infinite loop and abort when shutting down the library. The infinite loop would be due to the "free list" package not being able to clear its resources so the library couldn't shut down. When the "using a memory checker" option is used, the free lists are disabled so there is just a memory leak with no abort on library shutdown. The chunk index resources are now correctly cleaned up when reading misparsed files and valgrind confirms no memory leaks. * Fix CVE-2018-13867 (#3336) * Windows runtime items go into the bin folder (#3320) * Commit changes to generated file generated by autogen.sh: configure, H5Einit.h, and H5Tconv.c. * Committing clang-format changes
Diffstat (limited to 'test/API/H5_api_file_test.c')
-rw-r--r--test/API/H5_api_file_test.c110
1 files changed, 55 insertions, 55 deletions
diff --git a/test/API/H5_api_file_test.c b/test/API/H5_api_file_test.c
index 1455f64..5f3af25 100644
--- a/test/API/H5_api_file_test.c
+++ b/test/API/H5_api_file_test.c
@@ -98,7 +98,7 @@ error:
{
H5Fclose(file_id);
}
- H5E_END_TRY;
+ H5E_END_TRY
free(prefixed_filename);
@@ -140,7 +140,7 @@ test_create_file_invalid_params(void)
{
file_id = H5Fcreate(NULL, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (file_id >= 0) {
H5_FAILED();
@@ -153,7 +153,7 @@ test_create_file_invalid_params(void)
{
file_id = H5Fcreate("", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (file_id >= 0) {
H5_FAILED();
@@ -174,7 +174,7 @@ test_create_file_invalid_params(void)
{
file_id = H5Fcreate(prefixed_filename, H5F_ACC_RDWR, H5P_DEFAULT, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (file_id >= 0) {
H5_FAILED();
@@ -187,7 +187,7 @@ test_create_file_invalid_params(void)
{
file_id = H5Fcreate(prefixed_filename, H5F_ACC_CREAT, H5P_DEFAULT, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (file_id >= 0) {
H5_FAILED();
@@ -200,7 +200,7 @@ test_create_file_invalid_params(void)
{
file_id = H5Fcreate(prefixed_filename, H5F_ACC_SWMR_READ, H5P_DEFAULT, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (file_id >= 0) {
H5_FAILED();
@@ -221,7 +221,7 @@ test_create_file_invalid_params(void)
{
file_id = H5Fcreate(prefixed_filename, H5F_ACC_TRUNC, H5I_INVALID_HID, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (file_id >= 0) {
H5_FAILED();
@@ -249,7 +249,7 @@ error:
H5Fclose(file_id);
}
- H5E_END_TRY;
+ H5E_END_TRY
free(prefixed_filename);
@@ -299,7 +299,7 @@ test_create_file_excl(void)
{
file_id = H5Fcreate(prefixed_filename, H5F_ACC_EXCL, H5P_DEFAULT, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (file_id >= 0) {
H5_FAILED();
@@ -330,7 +330,7 @@ error:
H5Fclose(file_id);
H5Fclose(file_id2);
}
- H5E_END_TRY;
+ H5E_END_TRY
free(prefixed_filename);
@@ -375,7 +375,7 @@ test_open_file(void)
{
H5Fclose(file_id);
}
- H5E_END_TRY;
+ H5E_END_TRY
file_id = H5I_INVALID_HID;
}
@@ -398,7 +398,7 @@ test_open_file(void)
{
H5Fclose(file_id);
}
- H5E_END_TRY;
+ H5E_END_TRY
file_id = H5I_INVALID_HID;
}
@@ -415,7 +415,7 @@ error:
{
H5Fclose(file_id);
}
- H5E_END_TRY;
+ H5E_END_TRY
return 1;
}
@@ -448,7 +448,7 @@ test_open_file_invalid_params(void)
{
file_id = H5Fopen(NULL, H5F_ACC_RDWR, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (file_id >= 0) {
H5_FAILED();
@@ -461,7 +461,7 @@ test_open_file_invalid_params(void)
{
file_id = H5Fopen("", H5F_ACC_RDWR, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (file_id >= 0) {
H5_FAILED();
@@ -482,7 +482,7 @@ test_open_file_invalid_params(void)
{
file_id = H5Fopen(H5_api_test_filename, H5F_ACC_TRUNC, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (file_id >= 0) {
H5_FAILED();
@@ -495,7 +495,7 @@ test_open_file_invalid_params(void)
{
file_id = H5Fopen(H5_api_test_filename, H5F_ACC_EXCL, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (file_id >= 0) {
H5_FAILED();
@@ -517,7 +517,7 @@ error:
{
H5Fclose(file_id);
}
- H5E_END_TRY;
+ H5E_END_TRY
return 1;
}
@@ -552,7 +552,7 @@ test_open_nonexistent_file(void)
{
file_id = H5Fopen(prefixed_filename, H5F_ACC_RDWR, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (file_id >= 0) {
H5_FAILED();
@@ -572,7 +572,7 @@ error:
{
H5Fclose(file_id);
}
- H5E_END_TRY;
+ H5E_END_TRY
free(prefixed_filename);
@@ -660,7 +660,7 @@ test_file_permission(void)
group_id =
H5Gcreate2(file_id, FILE_PERMISSION_TEST_GRP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (group_id >= 0) {
H5_FAILED();
@@ -672,7 +672,7 @@ test_file_permission(void)
{
group_id = H5Gcreate_anon(file_id, H5P_DEFAULT, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (group_id >= 0) {
H5_FAILED();
@@ -694,7 +694,7 @@ test_file_permission(void)
dset_id = H5Dcreate2(file_id, FILE_PERMISSION_TEST_DSET2_NAME, H5T_STD_U32LE, dspace_id,
H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (dset_id >= 0) {
H5_FAILED();
@@ -706,7 +706,7 @@ test_file_permission(void)
{
dset_id = H5Dcreate_anon(file_id, H5T_STD_U32LE, dspace_id, H5P_DEFAULT, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (dset_id >= 0) {
H5_FAILED();
@@ -728,7 +728,7 @@ test_file_permission(void)
attr_id = H5Acreate2(file_id, FILE_PERMISSION_TEST_ATTR_NAME, H5T_NATIVE_INT, dspace_id,
H5P_DEFAULT, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (attr_id >= 0) {
H5_FAILED();
@@ -756,7 +756,7 @@ test_file_permission(void)
h5_ret = H5Tcommit2(file_id, FILE_PERMISSION_TEST_NAMED_DTYPE, dtype_id, H5P_DEFAULT,
H5P_DEFAULT, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (h5_ret >= 0) {
H5_FAILED();
@@ -768,7 +768,7 @@ test_file_permission(void)
{
h5_ret = H5Tcommit_anon(file_id, dtype_id, H5P_DEFAULT, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (h5_ret >= 0) {
H5_FAILED();
@@ -808,7 +808,7 @@ error:
H5Gclose(group_id);
H5Fclose(file_id);
}
- H5E_END_TRY;
+ H5E_END_TRY
free(prefixed_filename);
@@ -860,7 +860,7 @@ error:
H5Fclose(file_id);
H5Fclose(file_id2);
}
- H5E_END_TRY;
+ H5E_END_TRY
return 1;
}
@@ -886,7 +886,7 @@ test_close_file_invalid_id(void)
{
err_ret = H5Fclose(H5I_INVALID_HID);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (err_ret >= 0) {
H5_FAILED();
@@ -1016,7 +1016,7 @@ error:
H5Dclose(dset_id);
H5Fclose(file_id);
}
- H5E_END_TRY;
+ H5E_END_TRY
free(prefixed_filename);
@@ -1081,7 +1081,7 @@ test_file_is_accessible(void)
{
is_accessible = H5Fis_accessible(prefixed_filename, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (is_accessible > 0) {
H5_FAILED();
@@ -1268,7 +1268,7 @@ test_file_property_lists(void)
{
H5Pclose(fcpl_id1);
}
- H5E_END_TRY;
+ H5E_END_TRY
fcpl_id1 = H5I_INVALID_HID;
}
if (fcpl_id2 >= 0) {
@@ -1276,7 +1276,7 @@ test_file_property_lists(void)
{
H5Pclose(fcpl_id2);
}
- H5E_END_TRY;
+ H5E_END_TRY
fcpl_id2 = H5I_INVALID_HID;
}
if (fapl_id1 >= 0) {
@@ -1284,7 +1284,7 @@ test_file_property_lists(void)
{
H5Pclose(fapl_id1);
}
- H5E_END_TRY;
+ H5E_END_TRY
fapl_id1 = H5I_INVALID_HID;
}
if (fapl_id2 >= 0) {
@@ -1292,7 +1292,7 @@ test_file_property_lists(void)
{
H5Pclose(fapl_id2);
}
- H5E_END_TRY;
+ H5E_END_TRY
fapl_id2 = H5I_INVALID_HID;
}
if (file_id1 >= 0) {
@@ -1300,7 +1300,7 @@ test_file_property_lists(void)
{
H5Fclose(file_id1);
}
- H5E_END_TRY;
+ H5E_END_TRY
file_id1 = H5I_INVALID_HID;
}
if (file_id2 >= 0) {
@@ -1308,7 +1308,7 @@ test_file_property_lists(void)
{
H5Fclose(file_id2);
}
- H5E_END_TRY;
+ H5E_END_TRY
file_id2 = H5I_INVALID_HID;
}
@@ -1405,7 +1405,7 @@ error:
H5Fclose(file_id1);
H5Fclose(file_id2);
}
- H5E_END_TRY;
+ H5E_END_TRY
free(prefixed_filename1);
free(prefixed_filename2);
@@ -1476,7 +1476,7 @@ test_get_file_intent(void)
{
H5Fclose(file_id);
}
- H5E_END_TRY;
+ H5E_END_TRY
file_id = H5I_INVALID_HID;
}
@@ -1512,7 +1512,7 @@ test_get_file_intent(void)
{
H5Fclose(file_id);
}
- H5E_END_TRY;
+ H5E_END_TRY
file_id = H5I_INVALID_HID;
}
@@ -1547,7 +1547,7 @@ test_get_file_intent(void)
{
H5Fclose(file_id);
}
- H5E_END_TRY;
+ H5E_END_TRY
file_id = H5I_INVALID_HID;
}
}
@@ -1563,7 +1563,7 @@ error:
{
H5Fclose(file_id);
}
- H5E_END_TRY;
+ H5E_END_TRY
free(prefixed_filename);
@@ -1907,7 +1907,7 @@ error:
H5Fclose(file_id);
H5Fclose(file_id2);
}
- H5E_END_TRY;
+ H5E_END_TRY
free(prefixed_filename1);
free(prefixed_filename2);
@@ -2046,7 +2046,7 @@ error:
H5Fclose(file_id);
H5Fclose(file_id2);
}
- H5E_END_TRY;
+ H5E_END_TRY
free(prefixed_filename);
@@ -2135,7 +2135,7 @@ error:
H5Fclose(file_id);
H5Fclose(child_fid);
}
- H5E_END_TRY;
+ H5E_END_TRY
free(prefixed_filename);
@@ -2254,7 +2254,7 @@ test_get_file_name(void)
{
H5Gclose(group_id);
}
- H5E_END_TRY;
+ H5E_END_TRY
group_id = H5I_INVALID_HID;
}
@@ -2299,7 +2299,7 @@ test_get_file_name(void)
{
H5Sclose(dspace_id);
}
- H5E_END_TRY;
+ H5E_END_TRY
dspace_id = H5I_INVALID_HID;
}
if (dset_id >= 0) {
@@ -2307,7 +2307,7 @@ test_get_file_name(void)
{
H5Dclose(dset_id);
}
- H5E_END_TRY;
+ H5E_END_TRY
dset_id = H5I_INVALID_HID;
}
@@ -2352,7 +2352,7 @@ test_get_file_name(void)
{
H5Sclose(dspace_id);
}
- H5E_END_TRY;
+ H5E_END_TRY
dspace_id = H5I_INVALID_HID;
}
if (attr_id >= 0) {
@@ -2360,7 +2360,7 @@ test_get_file_name(void)
{
H5Aclose(attr_id);
}
- H5E_END_TRY;
+ H5E_END_TRY
attr_id = H5I_INVALID_HID;
}
@@ -2405,7 +2405,7 @@ test_get_file_name(void)
{
H5Tclose(named_dtype_id);
}
- H5E_END_TRY;
+ H5E_END_TRY
named_dtype_id = H5I_INVALID_HID;
}
@@ -2431,7 +2431,7 @@ test_get_file_name(void)
{
name_len = H5Fget_name(dspace_id, file_name_buf, (size_t)file_name_buf_len + 1);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (name_len >= 0) {
H5_FAILED();
@@ -2444,7 +2444,7 @@ test_get_file_name(void)
{
H5Sclose(dspace_id);
}
- H5E_END_TRY;
+ H5E_END_TRY
dspace_id = H5I_INVALID_HID;
}
@@ -2483,7 +2483,7 @@ error:
H5Gclose(group_id);
H5Fclose(file_id);
}
- H5E_END_TRY;
+ H5E_END_TRY
free(prefixed_filename);