diff options
author | jhendersonHDF <jhenderson@hdfgroup.org> | 2023-05-26 20:29:02 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-26 20:29:02 (GMT) |
commit | 79bb60c3f6f67411e5d70b84743fc9f6b6143cbc (patch) | |
tree | dce0c97c567cb20eeb65de917e21347376979f18 /src | |
parent | 77e64e0df46bb7498be014b1005efd49c4ad7518 (diff) | |
download | hdf5-79bb60c3f6f67411e5d70b84743fc9f6b6143cbc.zip hdf5-79bb60c3f6f67411e5d70b84743fc9f6b6143cbc.tar.gz hdf5-79bb60c3f6f67411e5d70b84743fc9f6b6143cbc.tar.bz2 |
API test updates (#3018)
* Remove macros from api tests (#2929)
* Remove macros and undefined callbacks (#2959)
* Remove remaining macros from H5_api_tests_disabled.h (#2968)
* Put some vol capability checks in testpar tests and remove remaining warnings (#2995)
* API tests datatype generation cleanup
* Clean up API tests' random datatype generation and fix bug with enum
datatype generation
* Init parallel API tests with MPI_THREAD_MULTIPLE
* HDF5 API tests - Check VOL connector registration
* Determine whether a VOL connector failed to load before running API
tests
* Cleanup some usages of H5VL_CAP_FLAG_CREATION_ORDER in API tests
* Remove some now-unused macros from H5_api_tests_disabled.h
* Enable HDF5 API tests by default
* Implement CMake option to install HDF5 API tests
* Check for invalid AAPL from H5Acreate
* Enable building of VOL connectors alongside HDF5 in CMake
* Prepend CMake VOL URL option indices with 0s so they come in order
* Don't turn on API tests by default yet
* Document VOL connector FetchContent functionality
* Add release note for API test updates
* Only install testing library if API tests are installed
* Fix grammar
Diffstat (limited to 'src')
-rw-r--r-- | src/H5VLnative_attr.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/H5VLnative_attr.c b/src/H5VLnative_attr.c index d83b6bd..4c27f51 100644 --- a/src/H5VLnative_attr.c +++ b/src/H5VLnative_attr.c @@ -76,13 +76,14 @@ H5VL__native_attr_create(void *obj, const H5VL_loc_params_t *loc_params, const c hid_t space_id, hid_t acpl_id, hid_t H5_ATTR_UNUSED aapl_id, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR_UNUSED **req) { - H5G_loc_t loc; /* Object location */ - H5G_loc_t obj_loc; /* Location used to open group */ - hbool_t loc_found = FALSE; - H5T_t *type, *dt; /* Datatype to use for attribute */ - H5S_t *space; /* Dataspace to use for attribute */ - H5A_t *attr = NULL; - void *ret_value = NULL; + H5P_genplist_t *plist; + H5G_loc_t loc; /* Object location */ + H5G_loc_t obj_loc; /* Location used to open group */ + hbool_t loc_found = FALSE; + H5T_t *type, *dt; /* Datatype to use for attribute */ + H5S_t *space; /* Dataspace to use for attribute */ + H5A_t *attr = NULL; + void *ret_value = NULL; FUNC_ENTER_PACKAGE @@ -91,6 +92,9 @@ H5VL__native_attr_create(void *obj, const H5VL_loc_params_t *loc_params, const c if (0 == (H5F_INTENT(loc.oloc->file) & H5F_ACC_RDWR)) HGOTO_ERROR(H5E_ARGS, H5E_WRITEERROR, NULL, "no write intent on file") + if (NULL == (plist = H5P_object_verify(aapl_id, H5P_ATTRIBUTE_ACCESS))) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "AAPL is not an attribute access property list") + if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a datatype") /* If this is a named datatype, get the connector's pointer to the datatype */ |