diff --git a/CMakeTests.cmake b/CMakeTests.cmake index 6b83d5652c1..2bd2ea19944 100644 --- a/CMakeTests.cmake +++ b/CMakeTests.cmake @@ -26,7 +26,7 @@ option (HDF5_DISABLE_TESTS_REGEX "Regex pattern to set execution of specific tests to DISABLED" "") mark_as_advanced (HDF5_DISABLE_TESTS_REGEX) - option (HDF5_TEST_API "Execute HDF5 API tests" OFF) + option (HDF5_TEST_API "Execute HDF5 API tests" ON) mark_as_advanced (HDF5_TEST_API) if (HDF5_TEST_API) option (HDF5_TEST_API_INSTALL "Install HDF5 API tests" OFF) diff --git a/test/API/H5_api_attribute_test.c b/test/API/H5_api_attribute_test.c index f44355f3bcb..0a11bdb6fb2 100644 --- a/test/API/H5_api_attribute_test.c +++ b/test/API/H5_api_attribute_test.c @@ -8641,15 +8641,15 @@ test_attribute_string_encodings(void H5_ATTR_UNUSED *params) goto error; } - if ((dset_id1 = H5Dcreate(container_group, ATTRIBUTE_STRING_ENCODINGS_DSET_NAME1, type_id1, space_id, - H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { + if ((dset_id1 = H5Dcreate2(container_group, ATTRIBUTE_STRING_ENCODINGS_DSET_NAME1, type_id1, space_id, + H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); printf(" couldn't create dataset with ascii string\n"); goto error; } - if ((attr_id1 = H5Acreate(dset_id1, ATTRIBUTE_STRING_ENCODINGS_ATTR_NAME1, type_id1, space_id, - H5P_DEFAULT, H5P_DEFAULT)) < 0) { + if ((attr_id1 = H5Acreate2(dset_id1, ATTRIBUTE_STRING_ENCODINGS_ATTR_NAME1, type_id1, space_id, + H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); printf(" couldn't create attribute with ascii string\n"); goto error; @@ -8673,15 +8673,15 @@ test_attribute_string_encodings(void H5_ATTR_UNUSED *params) goto error; } - if ((dset_id2 = H5Dcreate(container_group, ATTRIBUTE_STRING_ENCODINGS_DSET_NAME2, type_id2, space_id, - H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { + if ((dset_id2 = H5Dcreate2(container_group, ATTRIBUTE_STRING_ENCODINGS_DSET_NAME2, type_id2, space_id, + H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); printf(" couldn't create dataset with UTF-8 string\n"); goto error; } - if ((attr_id2 = H5Acreate(dset_id2, ATTRIBUTE_STRING_ENCODINGS_ATTR_NAME2, type_id2, space_id, - H5P_DEFAULT, H5P_DEFAULT)) < 0) { + if ((attr_id2 = H5Acreate2(dset_id2, ATTRIBUTE_STRING_ENCODINGS_ATTR_NAME2, type_id2, space_id, + H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); printf(" couldn't create attribute with ascii string\n"); goto error; diff --git a/test/API/H5_api_dataset_test.c b/test/API/H5_api_dataset_test.c index bc4efe60d25..1d5da8fb1ef 100644 --- a/test/API/H5_api_dataset_test.c +++ b/test/API/H5_api_dataset_test.c @@ -2385,9 +2385,9 @@ test_create_dataset_creation_properties(void H5_ATTR_UNUSED *params) PART_ERROR(DCPL_fill_value_test); } - if ((dset_id = - H5Dcreate(group_id, DATASET_FILL_VALUE_TEST_DSET_NAME1, DATASET_FILL_VALUE_TEST_INT_TYPE, - fspace_id, H5P_DEFAULT, dcpl_id, H5P_DEFAULT)) < 0) { + if ((dset_id = H5Dcreate2(group_id, DATASET_FILL_VALUE_TEST_DSET_NAME1, + DATASET_FILL_VALUE_TEST_INT_TYPE, fspace_id, H5P_DEFAULT, dcpl_id, + H5P_DEFAULT)) < 0) { H5_FAILED(); printf(" couldn't create dataset with integer fill value"); PART_ERROR(DCPL_fill_value_test); @@ -8218,8 +8218,8 @@ test_dataset_string_encodings(void H5_ATTR_UNUSED *params) goto error; } - if ((dset_id1 = H5Dcreate(container_group, DATASET_STRING_ENCODINGS_DSET_NAME1, type_id1, space_id, - H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { + if ((dset_id1 = H5Dcreate2(container_group, DATASET_STRING_ENCODINGS_DSET_NAME1, type_id1, space_id, + H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); printf(" couldn't create dataset with ascii string\n"); goto error; @@ -8243,8 +8243,8 @@ test_dataset_string_encodings(void H5_ATTR_UNUSED *params) goto error; } - if ((dset_id2 = H5Dcreate(container_group, DATASET_STRING_ENCODINGS_DSET_NAME2, type_id2, space_id, - H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { + if ((dset_id2 = H5Dcreate2(container_group, DATASET_STRING_ENCODINGS_DSET_NAME2, type_id2, space_id, + H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); printf(" couldn't create dataset with UTF-8 string\n"); goto error; diff --git a/test/API/H5_api_link_test.c b/test/API/H5_api_link_test.c index b3bcf871b3f..a88a65fec64 100644 --- a/test/API/H5_api_link_test.c +++ b/test/API/H5_api_link_test.c @@ -897,6 +897,12 @@ test_create_hard_link_invalid_params(void H5_ATTR_UNUSED *params) PART_ERROR(H5Lcreate_hard_across_files); } + if (H5Fclose(ext_file_id) < 0) { + H5_FAILED(); + printf(" couldn't close external file '%s'\n", ext_link_filename); + PART_ERROR(H5Lcreate_hard_across_files); + } + if (remove_test_file(NULL, ext_link_filename) < 0) { H5_FAILED(); printf(" failed to delete external file '%s'\n", ext_link_filename); @@ -934,8 +940,6 @@ test_create_hard_link_invalid_params(void H5_ATTR_UNUSED *params) TESTING_2("test cleanup"); - if (H5Fclose(ext_file_id) < 0) - TEST_ERROR; if (H5Gclose(group_id) < 0) TEST_ERROR; if (H5Gclose(container_group) < 0) diff --git a/test/API/H5_api_object_test.c b/test/API/H5_api_object_test.c index 1e1bad38192..200879907f6 100644 --- a/test/API/H5_api_object_test.c +++ b/test/API/H5_api_object_test.c @@ -5638,8 +5638,8 @@ test_object_visit(void H5_ATTR_UNUSED *params) i = 0; - if (H5Ovisit_by_name(attr_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, object_visit_simple_callback, - &i, H5O_INFO_ALL, H5P_DEFAULT) < 0) { + if (H5Ovisit_by_name3(attr_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, object_visit_simple_callback, + &i, H5O_INFO_ALL, H5P_DEFAULT) < 0) { H5_FAILED(); printf(" H5Ovisit_by_name on an attribute failed!\n"); PART_ERROR(H5Ovisit_by_name_attr);