summaryrefslogtreecommitdiffstats
path: root/test/API/tmisc.c
diff options
context:
space:
mode:
authorjhendersonHDF <jhenderson@hdfgroup.org>2023-05-26 20:29:02 (GMT)
committerGitHub <noreply@github.com>2023-05-26 20:29:02 (GMT)
commit79bb60c3f6f67411e5d70b84743fc9f6b6143cbc (patch)
treedce0c97c567cb20eeb65de917e21347376979f18 /test/API/tmisc.c
parent77e64e0df46bb7498be014b1005efd49c4ad7518 (diff)
downloadhdf5-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 'test/API/tmisc.c')
-rw-r--r--test/API/tmisc.c45
1 files changed, 23 insertions, 22 deletions
diff --git a/test/API/tmisc.c b/test/API/tmisc.c
index 9013422..6e323e1 100644
--- a/test/API/tmisc.c
+++ b/test/API/tmisc.c
@@ -4175,15 +4175,11 @@ test_misc23(void)
hsize_t dims[] = {10};
hid_t file_id = 0, group_id = 0, type_id = 0, space_id = 0, tmp_id = 0, create_id = H5P_DEFAULT,
access_id = H5P_DEFAULT;
-#ifndef NO_OBJECT_GET_NAME
- char objname[MISC23_NAME_BUF_SIZE]; /* Name of object */
-#endif
+ char objname[MISC23_NAME_BUF_SIZE]; /* Name of object */
H5O_info2_t oinfo;
htri_t tri_status;
-#ifndef NO_OBJECT_GET_NAME
- ssize_t namelen;
-#endif
- herr_t status;
+ ssize_t namelen;
+ herr_t status;
/* Output message about test being performed */
MESSAGE(5, ("Testing intermediate group creation\n"));
@@ -4269,12 +4265,12 @@ test_misc23(void)
tmp_id = H5Gcreate2(file_id, "/A/B01/grp", create_id, H5P_DEFAULT, access_id);
CHECK(tmp_id, FAIL, "H5Gcreate2");
-#ifndef NO_OBJECT_GET_NAME
+
/* Query that the name of the new group is correct */
namelen = H5Iget_name(tmp_id, objname, (size_t)MISC23_NAME_BUF_SIZE);
CHECK(namelen, FAIL, "H5Iget_name");
VERIFY_STR(objname, "/A/B01/grp", "H5Iget_name");
-#endif
+
status = H5Gclose(tmp_id);
CHECK(status, FAIL, "H5Gclose");
@@ -4484,24 +4480,29 @@ test_misc23(void)
/**********************************************************************
* test H5Lcreate_external()
**********************************************************************/
-#ifndef NO_EXTERNAL_LINKS
- status = H5Lcreate_external("fake_filename", "fake_path", file_id, "/A/B20/grp", create_id, access_id);
- CHECK(status, FAIL, "H5Lcreate_external");
- tri_status = H5Lexists(file_id, "/A/B20/grp", access_id);
- VERIFY(tri_status, TRUE, "H5Lexists");
-#endif
+ if (vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) {
+ status =
+ H5Lcreate_external("fake_filename", "fake_path", file_id, "/A/B20/grp", create_id, access_id);
+ CHECK(status, FAIL, "H5Lcreate_external");
+
+ tri_status = H5Lexists(file_id, "/A/B20/grp", access_id);
+ VERIFY(tri_status, TRUE, "H5Lexists");
+ }
+
/**********************************************************************
* test H5Lcreate_ud()
**********************************************************************/
-#ifndef NO_USER_DEFINED_LINKS
- status =
- H5Lcreate_ud(file_id, "/A/B21/grp", H5L_TYPE_EXTERNAL, "file\0obj", (size_t)9, create_id, access_id);
- CHECK(status, FAIL, "H5Lcreate_ud");
- tri_status = H5Lexists(file_id, "/A/B21/grp", access_id);
- VERIFY(tri_status, TRUE, "H5Lexists");
-#endif
+ if (vol_cap_flags_g & H5VL_CAP_FLAG_UD_LINKS) {
+ status = H5Lcreate_ud(file_id, "/A/B21/grp", H5L_TYPE_EXTERNAL, "file\0obj", (size_t)9, create_id,
+ access_id);
+ CHECK(status, FAIL, "H5Lcreate_ud");
+
+ tri_status = H5Lexists(file_id, "/A/B21/grp", access_id);
+ VERIFY(tri_status, TRUE, "H5Lexists");
+ }
+
/**********************************************************************
* close
**********************************************************************/