diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-06-28 15:31:32 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-28 15:31:32 (GMT) |
commit | 187ea8a9ae1405b5b46ca47a32fb1fb9e2686c98 (patch) | |
tree | baffa167d0796786241aef6b0ce76d4adec3b66e /test/API/H5_api_test_util.c | |
parent | 7a44581a84778a1346a2fd5b6cca7d9db905a321 (diff) | |
download | hdf5-187ea8a9ae1405b5b46ca47a32fb1fb9e2686c98.zip hdf5-187ea8a9ae1405b5b46ca47a32fb1fb9e2686c98.tar.gz hdf5-187ea8a9ae1405b5b46ca47a32fb1fb9e2686c98.tar.bz2 |
Rename HD(f)printf() to (f)printf() (#3194)
Diffstat (limited to 'test/API/H5_api_test_util.c')
-rw-r--r-- | test/API/H5_api_test_util.c | 104 |
1 files changed, 52 insertions, 52 deletions
diff --git a/test/API/H5_api_test_util.c b/test/API/H5_api_test_util.c index c37a9ed..cab1de3 100644 --- a/test/API/H5_api_test_util.c +++ b/test/API/H5_api_test_util.c @@ -167,13 +167,13 @@ roll_datatype: gen_func = generate_random_datatype_array; break; default: - HDprintf(" invalid datatype class\n"); + printf(" invalid datatype class\n"); goto done; break; } if ((datatype = (gen_func)(parent_class, is_compact)) < 0) { - HDprintf(" couldn't generate datatype\n"); + printf(" couldn't generate datatype\n"); goto done; } @@ -185,7 +185,7 @@ roll_datatype: */ if (depth == 1) { if (0 == (type_size = H5Tget_size(datatype))) { - HDprintf(" failed to retrieve datatype's size\n"); + printf(" failed to retrieve datatype's size\n"); H5Tclose(datatype); datatype = H5I_INVALID_HID; goto done; @@ -267,12 +267,12 @@ generate_random_datatype_integer(H5T_class_t H5_ATTR_UNUSED parent_class, hbool_ type_to_copy = H5T_STD_U64LE; break; default: - HDprintf(" invalid value for predefined integer type; should not happen\n"); + printf(" invalid value for predefined integer type; should not happen\n"); goto done; } if ((datatype = H5Tcopy(type_to_copy)) < 0) { - HDprintf(" couldn't copy predefined integer type\n"); + printf(" couldn't copy predefined integer type\n"); goto done; } @@ -281,7 +281,7 @@ generate_random_datatype_integer(H5T_class_t H5_ATTR_UNUSED parent_class, hbool_ done: if ((ret_value == H5I_INVALID_HID) && (datatype >= 0)) { if (H5Tclose(datatype) < 0) - HDprintf(" couldn't close datatype\n"); + printf(" couldn't close datatype\n"); } return ret_value; @@ -309,12 +309,12 @@ generate_random_datatype_float(H5T_class_t H5_ATTR_UNUSED parent_class, hbool_t break; default: - HDprintf(" invalid value for floating point type; should not happen\n"); + printf(" invalid value for floating point type; should not happen\n"); goto done; } if ((datatype = H5Tcopy(type_to_copy)) < 0) { - HDprintf(" couldn't copy predefined floating-point type\n"); + printf(" couldn't copy predefined floating-point type\n"); goto done; } @@ -323,7 +323,7 @@ generate_random_datatype_float(H5T_class_t H5_ATTR_UNUSED parent_class, hbool_t done: if ((ret_value == H5I_INVALID_HID) && (datatype >= 0)) { if (H5Tclose(datatype) < 0) - HDprintf(" couldn't close datatype\n"); + printf(" couldn't close datatype\n"); } return ret_value; @@ -344,12 +344,12 @@ generate_random_datatype_string(H5T_class_t H5_ATTR_UNUSED parent_class, hbool_t if (0 == (rand() % 2)) { #endif if ((datatype = H5Tcreate(H5T_STRING, (size_t)(rand() % STRING_TYPE_MAX_SIZE) + 1)) < 0) { - HDprintf(" couldn't create fixed-length string datatype\n"); + printf(" couldn't create fixed-length string datatype\n"); goto done; } if (H5Tset_strpad(datatype, H5T_STR_NULLPAD) < 0) { - HDprintf(" couldn't set H5T_STR_NULLPAD for fixed-length string type\n"); + printf(" couldn't set H5T_STR_NULLPAD for fixed-length string type\n"); goto done; } #if 0 /* Currently, all VL types are disabled */ @@ -358,20 +358,20 @@ generate_random_datatype_string(H5T_class_t H5_ATTR_UNUSED parent_class, hbool_t if ((datatype = H5Tcreate(H5T_STRING, H5T_VARIABLE)) < 0) { H5_FAILED(); - HDprintf(" couldn't create variable-length string datatype\n"); + printf(" couldn't create variable-length string datatype\n"); goto done; } if (H5Tset_strpad(datatype, H5T_STR_NULLTERM) < 0) { H5_FAILED(); - HDprintf(" couldn't set H5T_STR_NULLTERM for variable-length string type\n"); + printf(" couldn't set H5T_STR_NULLTERM for variable-length string type\n"); goto done; } } #endif if (H5Tset_cset(datatype, H5T_CSET_ASCII) < 0) { - HDprintf(" couldn't set string datatype character set\n"); + printf(" couldn't set string datatype character set\n"); goto done; } @@ -380,7 +380,7 @@ generate_random_datatype_string(H5T_class_t H5_ATTR_UNUSED parent_class, hbool_t done: if ((ret_value == H5I_INVALID_HID) && (datatype >= 0)) { if (H5Tclose(datatype) < 0) - HDprintf(" couldn't close datatype\n"); + printf(" couldn't close datatype\n"); } return ret_value; @@ -400,7 +400,7 @@ generate_random_datatype_compound(H5T_class_t H5_ATTR_UNUSED parent_class, hbool compound_members[i] = H5I_INVALID_HID; if ((datatype = H5Tcreate(H5T_COMPOUND, 1)) < 0) { - HDprintf(" couldn't create compound datatype\n"); + printf(" couldn't create compound datatype\n"); goto done; } @@ -413,24 +413,24 @@ generate_random_datatype_compound(H5T_class_t H5_ATTR_UNUSED parent_class, hbool HDsnprintf(member_name, 256, "compound_member%zu", i); if ((compound_members[i] = generate_random_datatype(H5T_COMPOUND, is_compact)) < 0) { - HDprintf(" couldn't create compound datatype member %zu\n", i); + printf(" couldn't create compound datatype member %zu\n", i); goto done; } if (!(member_size = H5Tget_size(compound_members[i]))) { - HDprintf(" couldn't get compound member %zu size\n", i); + printf(" couldn't get compound member %zu size\n", i); goto done; } compound_size += member_size; if (H5Tset_size(datatype, compound_size) < 0) { - HDprintf(" couldn't set size for compound datatype\n"); + printf(" couldn't set size for compound datatype\n"); goto done; } if (H5Tinsert(datatype, member_name, next_offset, compound_members[i]) < 0) { - HDprintf(" couldn't insert compound datatype member %zu\n", i); + printf(" couldn't insert compound datatype member %zu\n", i); goto done; } @@ -442,13 +442,13 @@ generate_random_datatype_compound(H5T_class_t H5_ATTR_UNUSED parent_class, hbool done: for (size_t i = 0; i < COMPOUND_TYPE_MAX_MEMBERS; i++) { if (compound_members[i] > 0 && H5Tclose(compound_members[i]) < 0) { - HDprintf(" couldn't close compound member %zu\n", i); + printf(" couldn't close compound member %zu\n", i); } } if ((ret_value == H5I_INVALID_HID) && (datatype >= 0)) { if (H5Tclose(datatype) < 0) - HDprintf(" couldn't close datatype\n"); + printf(" couldn't close datatype\n"); } return ret_value; @@ -464,7 +464,7 @@ generate_random_datatype_reference(H5T_class_t H5_ATTR_UNUSED parent_class, hboo if (0 == (rand() % 2)) { #endif if ((datatype = H5Tcopy(H5T_STD_REF_OBJ)) < 0) { - HDprintf(" couldn't copy object reference datatype\n"); + printf(" couldn't copy object reference datatype\n"); goto done; } #if 0 /* Region references are currently unsupported */ @@ -472,7 +472,7 @@ generate_random_datatype_reference(H5T_class_t H5_ATTR_UNUSED parent_class, hboo else { if ((datatype = H5Tcopy(H5T_STD_REF_DSETREG)) < 0) { H5_FAILED(); - HDprintf(" couldn't copy region reference datatype\n"); + printf(" couldn't copy region reference datatype\n"); goto done; } } @@ -483,7 +483,7 @@ generate_random_datatype_reference(H5T_class_t H5_ATTR_UNUSED parent_class, hboo done: if ((ret_value == H5I_INVALID_HID) && (datatype >= 0)) { if (H5Tclose(datatype) < 0) - HDprintf(" couldn't close datatype\n"); + printf(" couldn't close datatype\n"); } return ret_value; @@ -498,14 +498,14 @@ generate_random_datatype_enum(H5T_class_t H5_ATTR_UNUSED parent_class, hbool_t H hid_t ret_value = H5I_INVALID_HID; if ((datatype = H5Tenum_create(H5T_NATIVE_INT)) < 0) { - HDprintf(" couldn't create enum datatype\n"); + printf(" couldn't create enum datatype\n"); goto done; } num_members = (size_t)(rand() % ENUM_TYPE_MAX_MEMBERS + 1); if (NULL == (enum_member_vals = HDmalloc(num_members * sizeof(int)))) { - HDprintf(" couldn't allocate space for enum members\n"); + printf(" couldn't allocate space for enum members\n"); goto done; } @@ -529,7 +529,7 @@ generate_random_datatype_enum(H5T_class_t H5_ATTR_UNUSED parent_class, hbool_t H enum_member_vals[i] = enum_val; if (H5Tenum_insert(datatype, name, &enum_val) < 0) { - HDprintf(" couldn't insert member into enum datatype\n"); + printf(" couldn't insert member into enum datatype\n"); goto done; } } @@ -541,7 +541,7 @@ done: if ((ret_value == H5I_INVALID_HID) && (datatype >= 0)) { if (H5Tclose(datatype) < 0) - HDprintf(" couldn't close datatype\n"); + printf(" couldn't close datatype\n"); } return ret_value; @@ -559,7 +559,7 @@ generate_random_datatype_array(H5T_class_t H5_ATTR_UNUSED parent_class, hbool_t ndims = (unsigned)(rand() % ARRAY_TYPE_MAX_DIMS + 1); if (NULL == (array_dims = HDmalloc(ndims * sizeof(*array_dims)))) { - HDprintf(" couldn't allocate space for array datatype dims\n"); + printf(" couldn't allocate space for array datatype dims\n"); goto done; } @@ -567,12 +567,12 @@ generate_random_datatype_array(H5T_class_t H5_ATTR_UNUSED parent_class, hbool_t array_dims[i] = (hsize_t)(rand() % MAX_DIM_SIZE + 1); if ((base_datatype = generate_random_datatype(H5T_ARRAY, is_compact)) < 0) { - HDprintf(" couldn't create array base datatype\n"); + printf(" couldn't create array base datatype\n"); goto done; } if ((datatype = H5Tarray_create2(base_datatype, ndims, array_dims)) < 0) { - HDprintf(" couldn't create array datatype\n"); + printf(" couldn't create array datatype\n"); goto done; } @@ -583,12 +583,12 @@ done: if (base_datatype >= 0) { if (H5Tclose(base_datatype) < 0) - HDprintf(" couldn't close array base datatype\n"); + printf(" couldn't close array base datatype\n"); } if ((ret_value == H5I_INVALID_HID) && (datatype >= 0)) { if (H5Tclose(datatype) < 0) - HDprintf(" couldn't close datatype\n"); + printf(" couldn't close datatype\n"); } return ret_value; @@ -608,8 +608,8 @@ generate_random_dataspace(int rank, const hsize_t *max_dims, hsize_t *dims_out, if (rank < 0) TEST_ERROR; if (is_compact && (rank > COMPACT_SPACE_MAX_DIMS)) { - HDprintf(" current rank of compact dataspace (%lld) exceeds maximum dimensionality (%lld)\n", - (long long)rank, (long long)COMPACT_SPACE_MAX_DIMS); + printf(" current rank of compact dataspace (%lld) exceeds maximum dimensionality (%lld)\n", + (long long)rank, (long long)COMPACT_SPACE_MAX_DIMS); TEST_ERROR; } @@ -643,12 +643,12 @@ create_test_container(char *filename, uint64_t vol_cap_flags) hid_t group_id = H5I_INVALID_HID; if (!(vol_cap_flags & H5VL_CAP_FLAG_FILE_BASIC)) { - HDprintf(" VOL connector doesn't support file creation\n"); + printf(" VOL connector doesn't support file creation\n"); goto error; } if ((file_id = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { - HDprintf(" couldn't create testing container file '%s'\n", filename); + printf(" couldn't create testing container file '%s'\n", filename); goto error; } @@ -658,49 +658,49 @@ create_test_container(char *filename, uint64_t vol_cap_flags) */ if ((group_id = H5Gcreate2(file_id, GROUP_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) { - HDprintf(" created container group for Group tests\n"); + printf(" created container group for Group tests\n"); H5Gclose(group_id); } if ((group_id = H5Gcreate2(file_id, ATTRIBUTE_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) { - HDprintf(" created container group for Attribute tests\n"); + printf(" created container group for Attribute tests\n"); H5Gclose(group_id); } if ((group_id = H5Gcreate2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) { - HDprintf(" created container group for Dataset tests\n"); + printf(" created container group for Dataset tests\n"); H5Gclose(group_id); } if ((group_id = H5Gcreate2(file_id, DATATYPE_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) { - HDprintf(" created container group for Datatype tests\n"); + printf(" created container group for Datatype tests\n"); H5Gclose(group_id); } if ((group_id = H5Gcreate2(file_id, LINK_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) { - HDprintf(" created container group for Link tests\n"); + printf(" created container group for Link tests\n"); H5Gclose(group_id); } if ((group_id = H5Gcreate2(file_id, OBJECT_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) { - HDprintf(" created container group for Object tests\n"); + printf(" created container group for Object tests\n"); H5Gclose(group_id); } if ((group_id = H5Gcreate2(file_id, MISCELLANEOUS_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) { - HDprintf(" created container group for Miscellaneous tests\n"); + printf(" created container group for Miscellaneous tests\n"); H5Gclose(group_id); } } if (H5Fclose(file_id) < 0) { - HDprintf(" failed to close testing container\n"); + printf(" failed to close testing container\n"); goto error; } @@ -729,23 +729,23 @@ prefix_filename(const char *prefix, const char *filename, char **filename_out) herr_t ret_value = SUCCEED; if (!prefix) { - HDprintf(" invalid file prefix\n"); + printf(" invalid file prefix\n"); ret_value = FAIL; goto done; } if (!filename || (*filename == '\0')) { - HDprintf(" invalid filename\n"); + printf(" invalid filename\n"); ret_value = FAIL; goto done; } if (!filename_out) { - HDprintf(" invalid filename_out buffer\n"); + printf(" invalid filename_out buffer\n"); ret_value = FAIL; goto done; } if (NULL == (out_buf = HDmalloc(H5_API_TEST_FILENAME_MAX_LENGTH))) { - HDprintf(" couldn't allocated filename buffer\n"); + printf(" couldn't allocated filename buffer\n"); ret_value = FAIL; goto done; } @@ -772,7 +772,7 @@ remove_test_file(const char *prefix, const char *filename) if (prefix) { if (prefix_filename(prefix, filename, &prefixed_filename) < 0) { - HDprintf(" couldn't prefix filename\n"); + printf(" couldn't prefix filename\n"); ret_value = FAIL; goto done; } @@ -783,7 +783,7 @@ remove_test_file(const char *prefix, const char *filename) test_file = filename; if (H5Fdelete(test_file, H5P_DEFAULT) < 0) { - HDprintf(" couldn't remove file '%s'\n", test_file); + printf(" couldn't remove file '%s'\n", test_file); ret_value = FAIL; goto done; } |