summaryrefslogtreecommitdiffstats
path: root/test/API/H5_api_group_test.c
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 /test/API/H5_api_group_test.c
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 'test/API/H5_api_group_test.c')
-rw-r--r--test/API/H5_api_group_test.c51
1 files changed, 30 insertions, 21 deletions
diff --git a/test/API/H5_api_group_test.c b/test/API/H5_api_group_test.c
index f652202..016d988 100644
--- a/test/API/H5_api_group_test.c
+++ b/test/API/H5_api_group_test.c
@@ -1123,7 +1123,7 @@ test_group_property_lists(void)
if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_GET_PLIST) || !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, property list, creation order aren't supported "
+ HDprintf(" API functions for basic file, group, property list, or creation order aren't supported "
"with this connector\n");
return 0;
}
@@ -1393,10 +1393,9 @@ test_get_group_info(void)
/* Make sure the connector supports the API functions being tested */
if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
- !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_MORE) || !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
+ !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_MORE)) {
SKIPPED();
- HDprintf(" API functions for basic file or group, creation order aren't supported with this "
- "connector\n");
+ HDprintf(" API functions for basic file or group aren't supported with this connector\n");
return 0;
}
@@ -1420,10 +1419,12 @@ test_get_group_info(void)
goto error;
}
- if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED) < 0) {
- H5_FAILED();
- HDprintf(" couldn't enable link creation order tracking and indexing on GCPL\n");
- goto error;
+ if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
+ if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED) < 0) {
+ H5_FAILED();
+ HDprintf(" couldn't enable link creation order tracking and indexing on GCPL\n");
+ goto error;
+ }
}
if ((parent_group_id = H5Gcreate2(container_group, GROUP_GET_INFO_TEST_GROUP_NAME, H5P_DEFAULT, gcpl_id,
@@ -1562,6 +1563,12 @@ test_get_group_info(void)
{
TESTING_2("H5Gget_info_by_idx by creation order in increasing order");
+ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
+ SKIPPED();
+ HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ PART_EMPTY(H5Gget_info_by_idx_crt_order_increasing);
+ }
+
for (i = 0; i < GROUP_GET_INFO_TEST_GROUP_NUMB; i++) {
memset(&group_info, 0, sizeof(group_info));
@@ -1613,6 +1620,12 @@ test_get_group_info(void)
{
TESTING_2("H5Gget_info_by_idx by creation order in decreasing order");
+ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
+ SKIPPED();
+ HDprintf(" creation order tracking isn't supported with this VOL connector\n");
+ PART_EMPTY(H5Gget_info_by_idx_crt_order_decreasing);
+ }
+
for (i = 0; i < GROUP_GET_INFO_TEST_GROUP_NUMB; i++) {
memset(&group_info, 0, sizeof(group_info));
@@ -1714,7 +1727,7 @@ test_get_group_info(void)
PART_BEGIN(H5Gget_info_by_idx_name_order_decreasing)
{
TESTING_2("H5Gget_info_by_idx by alphabetical order in decreasing order");
-#ifndef NO_DECREASING_ALPHA_ITER_ORDER
+
for (i = 0; i < GROUP_GET_INFO_TEST_GROUP_NUMB; i++) {
memset(&group_info, 0, sizeof(group_info));
@@ -1728,14 +1741,15 @@ test_get_group_info(void)
if (group_info.nlinks != 0) {
H5_FAILED();
- HDprintf(" group's number of links '%lld' doesn't match expected value '%lld'\n",
+ HDprintf(" group's number of links '%" PRIuHSIZE
+ "' doesn't match expected value '%d'\n",
group_info.nlinks, 0);
PART_ERROR(H5Gget_info_by_idx_name_order_decreasing);
}
if (group_info.max_corder != 0) {
H5_FAILED();
- HDprintf(" group's max creation order '%lld' doesn't match expected value '%lld'\n",
+ HDprintf(" group's max creation order '%lld' doesn't match expected value '%d'\n",
(long long)group_info.max_corder, 0);
PART_ERROR(H5Gget_info_by_idx_name_order_decreasing);
}
@@ -1759,10 +1773,6 @@ test_get_group_info(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Gget_info_by_idx_name_order_decreasing);
-#endif
}
PART_END(H5Gget_info_by_idx_name_order_decreasing);
}
@@ -1811,10 +1821,9 @@ test_get_group_info_invalid_params(void)
TESTING_MULTIPART("retrieval of group info with invalid parameters");
/* Make sure the connector supports the API functions being tested */
- if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_MORE) ||
- !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
+ if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_MORE)) {
SKIPPED();
- HDprintf(" API functions for basic file, more group, creation order aren't supported with this "
+ HDprintf(" API functions for basic file, or more group aren't supported with this "
"connector\n");
return 0;
}
@@ -2172,7 +2181,7 @@ test_flush_group(void)
if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_FLUSH_REFRESH)) {
SKIPPED();
- HDprintf(" API functions for basic file, more group, creation order aren't supported with this "
+ HDprintf(" API functions for basic file, group, or flush refresh aren't supported with this "
"connector\n");
return 0;
}
@@ -2280,8 +2289,8 @@ test_refresh_group(void)
if (!(vol_cap_flags_g & (H5VL_CAP_FLAG_FILE_BASIC)) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_FLUSH_REFRESH)) {
SKIPPED();
- HDprintf(
- " API functions for basic file, group, or refresh aren't supported with this connector\n");
+ HDprintf(" API functions for basic file, group, or flush refresh aren't supported with this "
+ "connector\n");
return 0;
}