summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorjhendersonHDF <jhenderson@hdfgroup.org>2023-07-27 18:21:57 (GMT)
committerGitHub <noreply@github.com>2023-07-27 18:21:57 (GMT)
commit144bec301c874554cdd8651148dede93fd5279dc (patch)
tree2510235dbadec040883628b3cb30eec495bbac03 /src
parent6ab73579f801a95a33359bf6f81d62fea99333d4 (diff)
downloadhdf5-144bec301c874554cdd8651148dede93fd5279dc.zip
hdf5-144bec301c874554cdd8651148dede93fd5279dc.tar.gz
hdf5-144bec301c874554cdd8651148dede93fd5279dc.tar.bz2
API test updates (#3018) (#3287)
* 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.c18
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 */