summaryrefslogtreecommitdiffstats
path: root/test/API/H5_api_link_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/API/H5_api_link_test.c')
-rw-r--r--test/API/H5_api_link_test.c2269
1 files changed, 1200 insertions, 1069 deletions
diff --git a/test/API/H5_api_link_test.c b/test/API/H5_api_link_test.c
index 9a8c65a..65a3277 100644
--- a/test/API/H5_api_link_test.c
+++ b/test/API/H5_api_link_test.c
@@ -77,57 +77,31 @@ static herr_t link_iter_hard_links_cb(hid_t group_id, const char *name, const H5
void *op_data);
static herr_t link_iter_soft_links_cb(hid_t group_id, const char *name, const H5L_info2_t *info,
void *op_data);
-#ifndef NO_EXTERNAL_LINKS
static herr_t link_iter_external_links_cb(hid_t group_id, const char *name, const H5L_info2_t *info,
void *op_data);
-#endif
-#ifndef NO_USER_DEFINED_LINKS
-static herr_t link_iter_ud_links_cb(hid_t group_id, const char *name, const H5L_info2_t *info, void *op_data);
-#endif
-#if !defined(NO_EXTERNAL_LINKS) && !defined(NO_USER_DEFINED_LINKS)
static herr_t link_iter_mixed_links_cb(hid_t group_id, const char *name, const H5L_info2_t *info,
void *op_data);
-#endif
static herr_t link_iter_invalid_params_cb(hid_t group_id, const char *name, const H5L_info2_t *info,
void *op_data);
static herr_t link_iter_0_links_cb(hid_t group_id, const char *name, const H5L_info2_t *info, void *op_data);
-#if !defined(NO_EXTERNAL_LINKS) && !defined(NO_USER_DEFINED_LINKS)
static herr_t link_iter_idx_saving_cb(hid_t group_id, const char *name, const H5L_info2_t *info,
void *op_data);
-#endif
-
static herr_t link_visit_hard_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_info2_t *info,
void *op_data);
static herr_t link_visit_soft_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_info2_t *info,
void *op_data);
-#ifndef NO_EXTERNAL_LINKS
static herr_t link_visit_external_links_no_cycles_cb(hid_t group_id, const char *name,
const H5L_info2_t *info, void *op_data);
-#endif
-#ifndef NO_USER_DEFINED_LINKS
-static herr_t link_visit_ud_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_info2_t *info,
- void *op_data);
-#endif
-#if !defined(NO_EXTERNAL_LINKS) && !defined(NO_USER_DEFINED_LINKS)
static herr_t link_visit_mixed_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_info2_t *info,
void *op_data);
-#endif
static herr_t link_visit_hard_links_cycles_cb(hid_t group_id, const char *name, const H5L_info2_t *info,
void *op_data);
static herr_t link_visit_soft_links_cycles_cb(hid_t group_id, const char *name, const H5L_info2_t *info,
void *op_data);
-#ifndef NO_EXTERNAL_LINKS
static herr_t link_visit_external_links_cycles_cb(hid_t group_id, const char *name, const H5L_info2_t *info,
void *op_data);
-#endif
-#ifndef NO_USER_DEFINED_LINKS
-static herr_t link_visit_ud_links_cycles_cb(hid_t group_id, const char *name, const H5L_info2_t *info,
- void *op_data);
-#endif
-#if !defined(NO_EXTERNAL_LINKS) && !defined(NO_USER_DEFINED_LINKS)
static herr_t link_visit_mixed_links_cycles_cb(hid_t group_id, const char *name, const H5L_info2_t *info,
void *op_data);
-#endif
static herr_t link_visit_invalid_params_cb(hid_t group_id, const char *name, const H5L_info2_t *info,
void *op_data);
static herr_t link_visit_0_links_cb(hid_t group_id, const char *name, const H5L_info2_t *info, void *op_data);
@@ -211,7 +185,7 @@ test_create_hard_link(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_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_HARD_LINKS)) {
SKIPPED();
- HDprintf(" API functions for basic file or group, basic or hard link aren't supported with this "
+ HDprintf(" API functions for basic file, group, link, or hard link aren't supported with this "
"connector\n");
return 0;
}
@@ -298,7 +272,7 @@ test_create_hard_link_long_name(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_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_HARD_LINKS)) {
SKIPPED();
- HDprintf(" API functions for basic file or group, basic or hard link aren't supported with this "
+ HDprintf(" API functions for basic file, group, link, or hard link aren't supported with this "
"connector\n");
return 0;
}
@@ -400,9 +374,7 @@ test_create_hard_link_many(void)
hid_t file_id = H5I_INVALID_HID;
hid_t container_group = H5I_INVALID_HID;
hid_t group_id = H5I_INVALID_HID, group_id2 = H5I_INVALID_HID;
-#ifndef NO_OBJECT_GET_NAME
- char objname[HARD_LINK_TEST_GROUP_MANY_NAME_BUF_SIZE]; /* Object name */
-#endif
+ char objname[HARD_LINK_TEST_GROUP_MANY_NAME_BUF_SIZE]; /* Object name */
TESTING("hard link creation of many links");
@@ -411,7 +383,7 @@ test_create_hard_link_many(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_HARD_LINKS)) {
SKIPPED();
HDprintf(
- " API functions for basic file or group, or hard link aren't supported with this connector\n");
+ " API functions for basic file, group, or hard link aren't supported with this connector\n");
return 0;
}
@@ -533,7 +505,6 @@ test_create_hard_link_many(void)
HARD_LINK_TEST_GROUP_MANY_FINAL_NAME);
goto error;
}
-#ifndef NO_OBJECT_GET_NAME
/* Check name */
if (H5Iget_name(group_id2, objname, (size_t)HARD_LINK_TEST_GROUP_MANY_NAME_BUF_SIZE) < 0) {
H5_FAILED();
@@ -546,7 +517,6 @@ test_create_hard_link_many(void)
HDprintf(" wrong name of the object '%s'\n", objname);
goto error;
}
-#endif
if (H5Gclose(group_id) < 0)
TEST_ERROR;
@@ -591,7 +561,7 @@ test_create_hard_link_same_loc(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_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_HARD_LINKS)) {
SKIPPED();
- HDprintf(" API functions for basic file or group, basic or hard link aren't supported with this "
+ HDprintf(" API functions for basic file, group, link, or hard link aren't supported with this "
"connector\n");
return 0;
}
@@ -716,10 +686,8 @@ test_create_hard_link_invalid_params(void)
htri_t link_exists;
hid_t file_id = H5I_INVALID_HID;
hid_t container_group = H5I_INVALID_HID, group_id = H5I_INVALID_HID;
-#ifndef NO_PREVENT_HARD_LINKS_ACROSS_FILES
- char ext_link_filename[H5_API_TEST_FILENAME_MAX_LENGTH];
-#endif
- hid_t ext_file_id = H5I_INVALID_HID;
+ char ext_link_filename[H5_API_TEST_FILENAME_MAX_LENGTH];
+ hid_t ext_file_id = H5I_INVALID_HID;
TESTING_MULTIPART("hard link creation with invalid parameters");
@@ -727,7 +695,7 @@ test_create_hard_link_invalid_params(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_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_HARD_LINKS)) {
SKIPPED();
- HDprintf(" API functions for basic file or group, basic or hard link aren't supported with this "
+ HDprintf(" API functions for basic file, group, link, or hard link aren't supported with this "
"connector\n");
return 0;
}
@@ -931,7 +899,7 @@ test_create_hard_link_invalid_params(void)
PART_BEGIN(H5Lcreate_hard_across_files)
{
TESTING_2("H5Lcreate_hard across files");
-#ifndef NO_PREVENT_HARD_LINKS_ACROSS_FILES
+
HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
EXTERNAL_LINK_TEST_FILE_NAME);
@@ -968,10 +936,6 @@ test_create_hard_link_invalid_params(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Lcreate_hard_across_files);
-#endif
}
PART_END(H5Lcreate_hard_across_files);
@@ -1001,10 +965,9 @@ test_create_hard_link_invalid_params(void)
END_MULTIPART;
TESTING_2("test cleanup");
-#ifndef NO_PREVENT_HARD_LINKS_ACROSS_FILES
+
if (H5Fclose(ext_file_id) < 0)
TEST_ERROR;
-#endif
if (H5Gclose(group_id) < 0)
TEST_ERROR;
if (H5Gclose(container_group) < 0)
@@ -1047,7 +1010,7 @@ test_create_soft_link_existing_relative(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_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS)) {
SKIPPED();
- HDprintf(" API functions for basic file or group, basic or soft link aren't supported with this "
+ HDprintf(" API functions for basic file, group, link, or soft link aren't supported with this "
"connector\n");
return 0;
}
@@ -1153,7 +1116,7 @@ test_create_soft_link_existing_absolute(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_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS)) {
SKIPPED();
- HDprintf(" API functions for basic file or group, basic or soft link aren't supported with this "
+ HDprintf(" API functions for basic file, group, link, or soft link aren't supported with this "
"connector\n");
return 0;
}
@@ -1250,7 +1213,7 @@ test_create_soft_link_dangling_relative(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_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS)) {
SKIPPED();
- HDprintf(" API functions for basic file or group, basic or soft link aren't supported with this "
+ HDprintf(" API functions for basic file, group, link, or soft link aren't supported with this "
"connector\n");
return 0;
}
@@ -1371,7 +1334,7 @@ test_create_soft_link_dangling_absolute(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_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS)) {
SKIPPED();
- HDprintf(" API functions for basic file or group, basic or soft link aren't supported with this "
+ HDprintf(" API functions for basic file, group, link, or soft link aren't supported with this "
"connector\n");
return 0;
}
@@ -1495,7 +1458,7 @@ test_create_soft_link_long_name(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_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS)) {
SKIPPED();
- HDprintf(" API functions for basic file or group, basic or soft link aren't supported with this "
+ HDprintf(" API functions for basic file, group, link, or soft link aren't supported with this "
"connector\n");
return 0;
}
@@ -1593,16 +1556,12 @@ error:
static int
test_create_soft_link_many(void)
{
-#ifndef NO_SOFT_LINK_MANY_DANGLING
htri_t link_exists;
hid_t file_id = H5I_INVALID_HID;
hid_t container_group = H5I_INVALID_HID;
hid_t group_id = H5I_INVALID_HID;
hid_t object_id = H5I_INVALID_HID;
-#ifndef NO_OBJECT_GET_NAME
- char objname[SOFT_LINK_TEST_GROUP_MANY_NAME_BUF_SIZE]; /* Object name */
-#endif
-#endif
+ char objname[SOFT_LINK_TEST_GROUP_MANY_NAME_BUF_SIZE]; /* Object name */
TESTING("soft link creation of many links");
@@ -1610,12 +1569,11 @@ test_create_soft_link_many(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_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS)) {
SKIPPED();
- HDprintf(" API functions for basic file or group, basic or soft link aren't supported with this "
+ HDprintf(" API functions for basic file, group, link, or soft link aren't supported with this "
"connector\n");
return 0;
}
-#ifndef NO_SOFT_LINK_MANY_DANGLING
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
@@ -1745,7 +1703,6 @@ test_create_soft_link_many(void)
HDprintf(" failed to open object pointed to by soft link '%s'\n", SOFT_LINK_TEST_GROUP_MANY_NAME);
goto error;
}
-#ifndef NO_OBJECT_GET_NAME
/* Check name */
if (H5Iget_name(object_id, objname, (size_t)SOFT_LINK_TEST_GROUP_MANY_NAME_BUF_SIZE) < 0) {
H5_FAILED();
@@ -1758,7 +1715,6 @@ test_create_soft_link_many(void)
HDprintf(" wrong name of the object '%s'\n", objname);
goto error;
}
-#endif
if (H5Gclose(object_id) < 0)
TEST_ERROR;
@@ -1784,10 +1740,6 @@ error:
H5E_END_TRY;
return 1;
-#else
- SKIPPED();
- return 0;
-#endif
}
/*
@@ -1808,7 +1760,8 @@ test_create_soft_link_invalid_params(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_SOFT_LINKS)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, or link aren't supported with this connector\n");
+ HDprintf(
+ " API functions for basic file, group, or soft link aren't supported with this connector\n");
return 0;
}
@@ -1954,7 +1907,7 @@ test_create_soft_link_invalid_params(void)
PART_BEGIN(H5Lcreate_soft_invalid_lapl)
{
TESTING_2("H5Lcreate_soft with an invalid LAPL");
-#ifndef NO_INVALID_PROPERTY_LIST_TESTS
+
H5E_BEGIN_TRY
{
err_ret = H5Lcreate_soft("/", group_id, SOFT_LINK_INVALID_PARAMS_TEST_LINK_NAME, H5P_DEFAULT,
@@ -1970,10 +1923,6 @@ test_create_soft_link_invalid_params(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Lcreate_soft_invalid_lapl);
-#endif
}
PART_END(H5Lcreate_soft_invalid_lapl);
@@ -2034,13 +1983,11 @@ error:
static int
test_create_external_link(void)
{
-#ifndef NO_EXTERNAL_LINKS
htri_t link_exists;
hid_t file_id = H5I_INVALID_HID;
hid_t container_group = H5I_INVALID_HID, group_id = H5I_INVALID_HID;
hid_t root_id = H5I_INVALID_HID;
char ext_link_filename[H5_API_TEST_FILENAME_MAX_LENGTH];
-#endif
TESTING("external link creation to existing object");
@@ -2048,12 +1995,11 @@ test_create_external_link(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_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, basic link, or external link aren't supported "
+ HDprintf(" API functions for basic file, group, link, or external link aren't supported "
"with this connector\n");
return 0;
}
-#ifndef NO_EXTERNAL_LINKS
HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
if ((file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
@@ -2135,10 +2081,6 @@ error:
H5E_END_TRY;
return 1;
-#else
- SKIPPED();
- return 0;
-#endif
}
/*
@@ -2149,22 +2091,19 @@ error:
static int
test_create_external_link_dangling(void)
{
-#ifndef NO_EXTERNAL_LINKS
htri_t link_exists;
hid_t file_id = H5I_INVALID_HID, ext_file_id = H5I_INVALID_HID;
hid_t container_group = H5I_INVALID_HID, group_id = H5I_INVALID_HID;
hid_t object_id = H5I_INVALID_HID;
char ext_link_filename[H5_API_TEST_FILENAME_MAX_LENGTH];
-#endif
TESTING("dangling external link creation");
-#ifndef NO_EXTERNAL_LINKS
/* 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_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, basic link, or external link aren't supported "
+ HDprintf(" API functions for basic file, group, link, or external link aren't supported "
"with this connector\n");
return 0;
}
@@ -2275,10 +2214,6 @@ error:
H5E_END_TRY;
return 1;
-#else
- SKIPPED();
- return 0;
-#endif
}
/*
@@ -2288,7 +2223,6 @@ error:
static int
test_create_external_link_multi(void)
{
-#ifndef NO_EXTERNAL_LINKS
hid_t file_id = H5I_INVALID_HID;
hid_t container_group = H5I_INVALID_HID, group_id = H5I_INVALID_HID;
hid_t group_id2 = H5I_INVALID_HID, group_id3 = H5I_INVALID_HID;
@@ -2297,11 +2231,9 @@ test_create_external_link_multi(void)
char ext_link_filename2[H5_API_TEST_FILENAME_MAX_LENGTH];
char ext_link_filename3[H5_API_TEST_FILENAME_MAX_LENGTH];
char objname[EXTERNAL_LINK_TEST_MULTI_NAME_BUF_SIZE];
-#endif
TESTING_MULTIPART("external link creation to an object across several files");
-#ifndef NO_EXTERNAL_LINKS
/* 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_EXTERNAL_LINKS)) {
@@ -2644,10 +2576,6 @@ error:
H5E_END_TRY;
return 1;
-#else
- SKIPPED();
- return 0;
-#endif
}
/*
@@ -2664,18 +2592,15 @@ error:
static int
test_create_external_link_ping_pong(void)
{
-#ifndef NO_EXTERNAL_LINKS
hid_t file_id = H5I_INVALID_HID;
hid_t group_id = H5I_INVALID_HID;
hid_t group_id2 = H5I_INVALID_HID;
char ext_link_filename1[H5_API_TEST_FILENAME_MAX_LENGTH];
char ext_link_filename2[H5_API_TEST_FILENAME_MAX_LENGTH];
char objname[EXTERNAL_LINK_TEST_MULTI_NAME_BUF_SIZE];
-#endif
TESTING_MULTIPART("external link creation to an object in ping pong style");
-#ifndef NO_EXTERNAL_LINKS
/* 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_EXTERNAL_LINKS)) {
@@ -2913,10 +2838,6 @@ error:
H5E_END_TRY;
return 1;
-#else
- SKIPPED();
- return 0;
-#endif
}
/*
@@ -2938,7 +2859,7 @@ test_create_external_link_invalid_params(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_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, or basic link or external link aren't supported "
+ HDprintf(" API functions for basic file, group, link, or external link aren't supported "
"with this connector\n");
return 0;
}
@@ -3215,23 +3136,21 @@ error:
static int
test_create_user_defined_link(void)
{
-#ifndef NO_USER_DEFINED_LINKS
ssize_t udata_size;
htri_t link_exists;
hid_t file_id = H5I_INVALID_HID;
hid_t container_group = H5I_INVALID_HID, group_id = H5I_INVALID_HID;
char udata[UD_LINK_TEST_UDATA_MAX_SIZE];
-#endif
TESTING("user-defined link creation");
-#ifndef NO_USER_DEFINED_LINKS
/* 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_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_UD_LINKS)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, or user-defined link aren't supported with this "
- "connector\n");
+ HDprintf(
+ " API functions for basic file, group, link, or user-defined link aren't supported with this "
+ "connector\n");
return 0;
}
@@ -3298,10 +3217,6 @@ error:
H5E_END_TRY;
return 1;
-#else
- SKIPPED();
- return 0;
-#endif
}
/*
@@ -3324,7 +3239,8 @@ test_create_user_defined_link_invalid_params(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_UD_LINKS)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, or link aren't supported with this connector\n");
+ HDprintf(" API functions for basic file, group, or user-defined link aren't supported with this "
+ "connector\n");
return 0;
}
@@ -3565,9 +3481,7 @@ test_delete_link(void)
hid_t subgroup_id = H5I_INVALID_HID;
hid_t nested_grp_id = H5I_INVALID_HID;
hid_t gcpl_id = H5I_INVALID_HID;
-#ifndef NO_EXTERNAL_LINKS
- char ext_link_filename[H5_API_TEST_FILENAME_MAX_LENGTH];
-#endif
+ char ext_link_filename[H5_API_TEST_FILENAME_MAX_LENGTH];
TESTING_MULTIPART("link deletion");
@@ -3575,10 +3489,10 @@ test_delete_link(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_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_MORE) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_HARD_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) ||
- !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
+ !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, or link, hard, soft, or external link aren't "
- "supported with this connector\n");
+ HDprintf(" API functions for basic file, group, link, hard link, soft link, or external link "
+ "aren't supported with this connector\n");
return 0;
}
@@ -3602,10 +3516,12 @@ test_delete_link(void)
goto error;
}
- if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) {
- H5_FAILED();
- HDprintf(" couldn't set link creation order tracking\n");
- goto error;
+ if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
+ if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) {
+ H5_FAILED();
+ HDprintf(" couldn't set link creation order tracking\n");
+ goto error;
+ }
}
if ((group_id = H5Gcreate2(container_group, LINK_DELETE_TEST_SUBGROUP_NAME, H5P_DEFAULT, gcpl_id,
@@ -3842,7 +3758,7 @@ test_delete_link(void)
PART_BEGIN(H5Ldelete_external)
{
TESTING_2("H5Ldelete on external link");
-#ifndef NO_EXTERNAL_LINKS
+
HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
EXTERNAL_LINK_TEST_FILE_NAME);
@@ -3915,10 +3831,6 @@ test_delete_link(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Ldelete_external);
-#endif
}
PART_END(H5Ldelete_external);
@@ -3953,6 +3865,12 @@ test_delete_link(void)
{
TESTING_2("H5Ldelete_by_idx on hard link 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(H5Ldelete_by_idx_hard_crt_order_increasing);
+ }
+
if ((subgroup_id = H5Gcreate2(group_id, LINK_DELETE_TEST_SUBGROUP5_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -4193,6 +4111,12 @@ test_delete_link(void)
{
TESTING_2("H5Ldelete_by_idx on hard link 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(H5Ldelete_by_idx_hard_crt_order_decreasing);
+ }
+
if ((subgroup_id = H5Gcreate2(group_id, LINK_DELETE_TEST_SUBGROUP6_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -4672,7 +4596,7 @@ test_delete_link(void)
PART_BEGIN(H5Ldelete_by_idx_hard_name_order_decreasing)
{
TESTING_2("H5Ldelete_by_idx on hard link by alphabetical order in decreasing order");
-#ifndef NO_DECREASING_ALPHA_ITER_ORDER
+
if ((subgroup_id = H5Gcreate2(group_id, LINK_DELETE_TEST_SUBGROUP8_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -4899,10 +4823,6 @@ test_delete_link(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Ldelete_by_idx_hard_name_order_decreasing);
-#endif
}
PART_END(H5Ldelete_by_idx_hard_name_order_decreasing);
@@ -4917,6 +4837,12 @@ test_delete_link(void)
{
TESTING_2("H5Ldelete_by_idx on soft link 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(H5Ldelete_by_idx_soft_crt_order_increasing);
+ }
+
if ((subgroup_id = H5Gcreate2(group_id, LINK_DELETE_TEST_SUBGROUP9_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -5160,6 +5086,12 @@ test_delete_link(void)
{
TESTING_2("H5Ldelete_by_idx on soft link 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(H5Ldelete_by_idx_soft_crt_order_decreasing);
+ }
+
if ((subgroup_id = H5Gcreate2(group_id, LINK_DELETE_TEST_SUBGROUP10_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -5645,7 +5577,7 @@ test_delete_link(void)
PART_BEGIN(H5Ldelete_by_idx_soft_name_order_decreasing)
{
TESTING_2("H5Ldelete_by_idx on soft link by alphabetical order in decreasing order");
-#ifndef NO_DECREASING_ALPHA_ITER_ORDER
+
if ((subgroup_id = H5Gcreate2(group_id, LINK_DELETE_TEST_SUBGROUP12_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -5875,10 +5807,6 @@ test_delete_link(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Ldelete_by_idx_soft_name_order_decreasing);
-#endif
}
PART_END(H5Ldelete_by_idx_soft_name_order_decreasing);
@@ -5892,7 +5820,13 @@ test_delete_link(void)
PART_BEGIN(H5Ldelete_by_idx_external_crt_order_increasing)
{
TESTING_2("H5Ldelete_by_idx on external link by creation order in increasing order");
-#ifndef NO_EXTERNAL_LINKS
+
+ 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(H5Ldelete_by_idx_external_crt_order_increasing);
+ }
+
/* Create file for external link to reference */
HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
EXTERNAL_LINK_TEST_FILE_NAME);
@@ -6153,10 +6087,6 @@ test_delete_link(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Ldelete_by_idx_external_crt_order_increasing);
-#endif
}
PART_END(H5Ldelete_by_idx_external_crt_order_increasing);
@@ -6172,7 +6102,13 @@ test_delete_link(void)
PART_BEGIN(H5Ldelete_by_idx_external_crt_order_decreasing)
{
TESTING_2("H5Ldelete_by_idx on external link by creation order in decreasing order");
-#ifndef NO_EXTERNAL_LINKS
+
+ 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(H5Ldelete_by_idx_external_crt_order_decreasing);
+ }
+
/* Create file for external link to reference */
HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
EXTERNAL_LINK_TEST_FILE_NAME);
@@ -6433,10 +6369,6 @@ test_delete_link(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Ldelete_by_idx_external_crt_order_decreasing);
-#endif
}
PART_END(H5Ldelete_by_idx_external_crt_order_decreasing);
@@ -6452,7 +6384,7 @@ test_delete_link(void)
PART_BEGIN(H5Ldelete_by_idx_external_name_order_increasing)
{
TESTING_2("H5Ldelete_by_idx on external link by alphabetical order in increasing order");
-#ifndef NO_EXTERNAL_LINKS
+
/* Create file for external link to reference */
HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
EXTERNAL_LINK_TEST_FILE_NAME);
@@ -6713,10 +6645,6 @@ test_delete_link(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Ldelete_by_idx_external_name_order_increasing);
-#endif
}
PART_END(H5Ldelete_by_idx_external_name_order_increasing);
@@ -6732,7 +6660,7 @@ test_delete_link(void)
PART_BEGIN(H5Ldelete_by_idx_external_name_order_decreasing)
{
TESTING_2("H5Ldelete_by_idx on external link by alphabetical order in decreasing order");
-#ifndef NO_DECREASING_ALPHA_ITER_ORDER
+
/* Create file for external link to reference */
HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
EXTERNAL_LINK_TEST_FILE_NAME);
@@ -6993,10 +6921,6 @@ test_delete_link(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Ldelete_by_idx_external_name_order_decreasing);
-#endif
}
PART_END(H5Ldelete_by_idx_external_name_order_decreasing);
@@ -7121,7 +7045,6 @@ error:
static int
test_delete_link_reset_grp_max_crt_order(void)
{
-#ifndef NO_MAX_LINK_CRT_ORDER_RESET
H5G_info_t grp_info;
size_t i;
hid_t file_id = H5I_INVALID_HID;
@@ -7129,20 +7052,19 @@ test_delete_link_reset_grp_max_crt_order(void)
hid_t subgroup_id = H5I_INVALID_HID;
hid_t gcpl_id = H5I_INVALID_HID;
char link_name[LINK_DELETE_RESET_MAX_CRT_ORDER_TEST_BUF_SIZE];
-#endif
TESTING_MULTIPART("H5Ldelete of all links in group resets group's maximum link creation order value");
/* 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_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_MORE)) {
+ !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_MORE) ||
+ !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" API functions for basic file, basic and more group, or basic link aren't supported "
- "with this connector\n");
+ HDprintf(" API functions for basic file, group, link, or creation order "
+ "aren't supported with this connector\n");
return 0;
}
-#ifndef NO_MAX_LINK_CRT_ORDER_RESET
TESTING_2("test setup");
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
@@ -7217,7 +7139,7 @@ test_delete_link_reset_grp_max_crt_order(void)
if (grp_info.max_corder != LINK_DELETE_RESET_MAX_CRT_ORDER_TEST_NUM_LINKS) {
H5_FAILED();
HDprintf(" group's maximum creation order value got adjusted to %lld during link "
- "deletion; value should have remained at %lld\n",
+ "deletion; value should have remained at %d\n",
(long long)grp_info.max_corder, LINK_DELETE_RESET_MAX_CRT_ORDER_TEST_NUM_LINKS);
PART_ERROR(H5Ldelete_links_bottom_up);
}
@@ -7296,7 +7218,7 @@ test_delete_link_reset_grp_max_crt_order(void)
if (grp_info.max_corder != LINK_DELETE_RESET_MAX_CRT_ORDER_TEST_NUM_LINKS) {
H5_FAILED();
HDprintf(" group's maximum creation order value got adjusted to %lld during link "
- "deletion; value should have remained at %lld\n",
+ "deletion; value should have remained at %d\n",
(long long)grp_info.max_corder, LINK_DELETE_RESET_MAX_CRT_ORDER_TEST_NUM_LINKS);
PART_ERROR(H5Ldelete_links_top_down);
}
@@ -7369,10 +7291,6 @@ error:
H5E_END_TRY;
return 1;
-#else
- SKIPPED();
- return 0;
-#endif
}
static int
@@ -7390,7 +7308,8 @@ test_delete_link_invalid_params(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_BY_IDX) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_HARD_LINKS)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, or link aren't supported with this connector\n");
+ HDprintf(" API functions for basic file, group, link, flag by index, or hard link aren't "
+ "supported with this connector\n");
return 0;
}
@@ -7497,7 +7416,7 @@ test_delete_link_invalid_params(void)
PART_BEGIN(H5Ldelete_invalid_lapl)
{
TESTING_2("H5Ldelete with an invalid LAPL");
-#ifndef NO_INVALID_PROPERTY_LIST_TESTS
+
H5E_BEGIN_TRY
{
err_ret =
@@ -7512,10 +7431,6 @@ test_delete_link_invalid_params(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Ldelete_invalid_lapl);
-#endif
}
PART_END(H5Ldelete_invalid_lapl);
@@ -7638,7 +7553,7 @@ test_delete_link_invalid_params(void)
PART_BEGIN(H5Ldelete_by_idx_invalid_lapl)
{
TESTING_2("H5Ldelete_by_idx with an invalid LAPL");
-#ifndef NO_INVALID_PROPERTY_LIST_TESTS
+
H5E_BEGIN_TRY
{
err_ret = H5Ldelete_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, 0, H5I_INVALID_HID);
@@ -7652,10 +7567,6 @@ test_delete_link_invalid_params(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Ldelete_by_idx_invalid_lapl);
-#endif
}
PART_END(H5Ldelete_by_idx_invalid_lapl);
@@ -7719,9 +7630,7 @@ test_copy_link(void)
hid_t file_id = H5I_INVALID_HID, ext_file_id = H5I_INVALID_HID;
hid_t container_group = H5I_INVALID_HID, group_id = H5I_INVALID_HID;
hid_t src_grp_id = H5I_INVALID_HID, dst_grp_id = H5I_INVALID_HID;
-#ifndef NO_EXTERNAL_LINKS
- char ext_link_filename[H5_API_TEST_FILENAME_MAX_LENGTH];
-#endif
+ char ext_link_filename[H5_API_TEST_FILENAME_MAX_LENGTH];
TESTING_MULTIPART("link copying");
@@ -7731,8 +7640,9 @@ test_copy_link(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_HARD_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, or link, hard, soft, or external link aren't "
- "supported with this connector\n");
+ HDprintf(
+ " API functions for basic file, group, link, hard link, soft link, or external link aren't "
+ "supported with this connector\n");
return 0;
}
@@ -7960,19 +7870,22 @@ test_copy_link(void)
PART_ERROR(H5Lcopy_hard_check);
}
- if (new_info.corder_valid != orig_info.corder_valid) {
- H5_FAILED();
- HDprintf(" copied link's 'corder_valid' field doesn't match original link's "
- "'corder_valid' field\n");
- PART_ERROR(H5Lcopy_hard_check);
- }
+ if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
+ if (new_info.corder_valid != orig_info.corder_valid) {
+ H5_FAILED();
+ HDprintf(" copied link's 'corder_valid' field doesn't match original link's "
+ "'corder_valid' field\n");
+ PART_ERROR(H5Lcopy_hard_check);
+ }
- if (new_info.corder_valid && orig_info.corder_valid && (new_info.corder != orig_info.corder)) {
- H5_FAILED();
- HDprintf(" copied link's creation order value %" PRId64
- " doesn't match original link's creation order value %" PRId64 "\n",
- new_info.corder, orig_info.corder);
- PART_ERROR(H5Lcopy_hard_check);
+ if (new_info.corder_valid && orig_info.corder_valid &&
+ (new_info.corder != orig_info.corder)) {
+ H5_FAILED();
+ HDprintf(" copied link's creation order value %" PRId64
+ " doesn't match original link's creation order value %" PRId64 "\n",
+ new_info.corder, orig_info.corder);
+ PART_ERROR(H5Lcopy_hard_check);
+ }
}
if (new_info.cset != orig_info.cset) {
@@ -8295,19 +8208,22 @@ test_copy_link(void)
PART_ERROR(H5Lcopy_soft_check);
}
- if (new_info.corder_valid != orig_info.corder_valid) {
- H5_FAILED();
- HDprintf(" copied link's 'corder_valid' field doesn't match original link's "
- "'corder_valid' field\n");
- PART_ERROR(H5Lcopy_soft_check);
- }
+ if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
+ if (new_info.corder_valid != orig_info.corder_valid) {
+ H5_FAILED();
+ HDprintf(" copied link's 'corder_valid' field doesn't match original link's "
+ "'corder_valid' field\n");
+ PART_ERROR(H5Lcopy_soft_check);
+ }
- if (new_info.corder_valid && orig_info.corder_valid && (new_info.corder != orig_info.corder)) {
- H5_FAILED();
- HDprintf(" copied link's creation order value %" PRId64
- " doesn't match original link's creation order value %" PRId64 "\n",
- new_info.corder, orig_info.corder);
- PART_ERROR(H5Lcopy_soft_check);
+ if (new_info.corder_valid && orig_info.corder_valid &&
+ (new_info.corder != orig_info.corder)) {
+ H5_FAILED();
+ HDprintf(" copied link's creation order value %" PRId64
+ " doesn't match original link's creation order value %" PRId64 "\n",
+ new_info.corder, orig_info.corder);
+ PART_ERROR(H5Lcopy_soft_check);
+ }
}
if (new_info.cset != orig_info.cset) {
@@ -8459,7 +8375,7 @@ test_copy_link(void)
PART_BEGIN(H5Lcopy_external_no_check)
{
TESTING_2("H5Lcopy on external link (copied link's properties not checked)");
-#ifndef NO_EXTERNAL_LINKS
+
HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
EXTERNAL_LINK_TEST_FILE_NAME);
@@ -8548,10 +8464,6 @@ test_copy_link(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Lcopy_external_no_check);
-#endif
}
PART_END(H5Lcopy_external_no_check);
@@ -8564,17 +8476,15 @@ test_copy_link(void)
PART_BEGIN(H5Lcopy_external_check)
{
-#ifndef NO_EXTERNAL_LINKS
H5L_info2_t orig_info, new_info;
const char *orig_filename, *new_filename;
const char *orig_objname, *new_objname;
unsigned unpack_flags = 0;
char orig_link_val[COPY_LINK_TEST_LINK_VAL_BUF_SIZE];
char new_link_val[COPY_LINK_TEST_LINK_VAL_BUF_SIZE];
-#endif
TESTING_2("H5Lcopy on external link (copied link's properties checked)");
-#ifndef NO_EXTERNAL_LINKS
+
HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
EXTERNAL_LINK_TEST_FILE_NAME);
@@ -8708,19 +8618,23 @@ test_copy_link(void)
PART_ERROR(H5Lcopy_external_check);
}
- if (new_info.corder_valid != orig_info.corder_valid) {
- H5_FAILED();
- HDprintf(" copied link's 'corder_valid' field doesn't match original link's "
- "'corder_valid' field\n");
- PART_ERROR(H5Lcopy_external_check);
- }
+ if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
+ if (new_info.corder_valid != orig_info.corder_valid) {
+ H5_FAILED();
+ HDprintf(" copied link's 'corder_valid' field doesn't match original link's "
+ "'corder_valid' field\n");
+ PART_ERROR(H5Lcopy_external_check);
+ }
- if (new_info.corder_valid && orig_info.corder_valid && (new_info.corder != orig_info.corder)) {
- H5_FAILED();
- HDprintf(" copied link's creation order value %lld doesn't match original link's creation "
- "order value %lld\n",
- new_info.corder, orig_info.corder);
- PART_ERROR(H5Lcopy_external_check);
+ if (new_info.corder_valid && orig_info.corder_valid &&
+ (new_info.corder != orig_info.corder)) {
+ H5_FAILED();
+ HDprintf(" copied link's creation order value %" PRId64
+ " doesn't match original link's creation "
+ "order value %" PRId64 "\n",
+ new_info.corder, orig_info.corder);
+ PART_ERROR(H5Lcopy_external_check);
+ }
}
if (new_info.cset != orig_info.cset) {
@@ -8762,10 +8676,6 @@ test_copy_link(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Lcopy_external_check);
-#endif
}
PART_END(H5Lcopy_external_check);
@@ -8779,7 +8689,7 @@ test_copy_link(void)
PART_BEGIN(H5Lcopy_external_same_loc)
{
TESTING_2("H5Lcopy on external link using H5L_SAME_LOC");
-#ifndef NO_EXTERNAL_LINKS
+
HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
EXTERNAL_LINK_TEST_FILE_NAME);
@@ -8909,10 +8819,6 @@ test_copy_link(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Lcopy_external_same_loc);
-#endif
}
PART_END(H5Lcopy_external_same_loc);
@@ -9052,7 +8958,7 @@ test_copy_link_invalid_params(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_MORE) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_HARD_LINKS)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, or basic and more link aren't supported with this "
+ HDprintf(" API functions for basic file, group, link, or hard links aren't supported with this "
"connector\n");
return 0;
}
@@ -9257,7 +9163,7 @@ test_copy_link_invalid_params(void)
PART_BEGIN(H5Lcopy_invalid_lapl)
{
TESTING_2("H5Lcopy with an invalid LAPL");
-#ifndef NO_INVALID_PROPERTY_LIST_TESTS
+
H5E_BEGIN_TRY
{
err_ret =
@@ -9273,10 +9179,6 @@ test_copy_link_invalid_params(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Lcopy_invalid_lapl);
-#endif
}
PART_END(H5Lcopy_invalid_lapl);
@@ -9394,8 +9296,9 @@ test_move_link(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_HARD_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, or link, hard, soft, or external link aren't "
- "supported with this connector\n");
+ HDprintf(
+ " API functions for basic file, group, link, hard link, soft link, or external link aren't "
+ "supported with this connector\n");
return 0;
}
@@ -9625,19 +9528,23 @@ test_move_link(void)
PART_ERROR(H5Lmove_hard_check);
}
- if (new_info.corder_valid != orig_info.corder_valid) {
- H5_FAILED();
- HDprintf(" moved link's 'corder_valid' field doesn't match original link's 'corder_valid' "
- "field\n");
- PART_ERROR(H5Lmove_hard_check);
- }
+ if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
+ if (new_info.corder_valid != orig_info.corder_valid) {
+ H5_FAILED();
+ HDprintf(
+ " moved link's 'corder_valid' field doesn't match original link's 'corder_valid' "
+ "field\n");
+ PART_ERROR(H5Lmove_hard_check);
+ }
- if (new_info.corder_valid && orig_info.corder_valid && (new_info.corder != orig_info.corder)) {
- H5_FAILED();
- HDprintf(" moved link's creation order value %" PRId64
- " doesn't match original link's creation order value %" PRId64 "\n",
- new_info.corder, orig_info.corder);
- PART_ERROR(H5Lmove_hard_check);
+ if (new_info.corder_valid && orig_info.corder_valid &&
+ (new_info.corder != orig_info.corder)) {
+ H5_FAILED();
+ HDprintf(" moved link's creation order value %" PRId64
+ " doesn't match original link's creation order value %" PRId64 "\n",
+ new_info.corder, orig_info.corder);
+ PART_ERROR(H5Lmove_hard_check);
+ }
}
if (new_info.cset != orig_info.cset) {
@@ -10035,19 +9942,23 @@ test_move_link(void)
PART_ERROR(H5Lmove_soft_check);
}
- if (new_info.corder_valid != orig_info.corder_valid) {
- H5_FAILED();
- HDprintf(" moved link's 'corder_valid' field doesn't match original link's 'corder_valid' "
- "field\n");
- PART_ERROR(H5Lmove_soft_check);
- }
+ if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
+ if (new_info.corder_valid != orig_info.corder_valid) {
+ H5_FAILED();
+ HDprintf(
+ " moved link's 'corder_valid' field doesn't match original link's 'corder_valid' "
+ "field\n");
+ PART_ERROR(H5Lmove_soft_check);
+ }
- if (new_info.corder_valid && orig_info.corder_valid && (new_info.corder != orig_info.corder)) {
- H5_FAILED();
- HDprintf(" moved link's creation order value %" PRId64
- " doesn't match original link's creation order value %" PRId64 "\n",
- new_info.corder, orig_info.corder);
- PART_ERROR(H5Lmove_soft_check);
+ if (new_info.corder_valid && orig_info.corder_valid &&
+ (new_info.corder != orig_info.corder)) {
+ H5_FAILED();
+ HDprintf(" moved link's creation order value %" PRId64
+ " doesn't match original link's creation order value %" PRId64 "\n",
+ new_info.corder, orig_info.corder);
+ PART_ERROR(H5Lmove_soft_check);
+ }
}
if (new_info.cset != orig_info.cset) {
@@ -10273,7 +10184,7 @@ test_move_link(void)
PART_BEGIN(H5Lmove_external_no_check)
{
TESTING_2("H5Lmove on external link (moved link's properties not checked)");
-#ifndef NO_EXTERNAL_LINKS
+
HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
EXTERNAL_LINK_TEST_FILE_NAME);
@@ -10362,10 +10273,6 @@ test_move_link(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Lmove_external_no_check);
-#endif
}
PART_END(H5Lmove_external_no_check);
@@ -10378,17 +10285,15 @@ test_move_link(void)
PART_BEGIN(H5Lmove_external_check)
{
-#ifndef NO_EXTERNAL_LINKS
H5L_info2_t orig_info, new_info;
const char *orig_filename, *new_filename;
const char *orig_objname, *new_objname;
unsigned unpack_flags = 0;
char orig_link_val[MOVE_LINK_TEST_LINK_VAL_BUF_SIZE];
char new_link_val[MOVE_LINK_TEST_LINK_VAL_BUF_SIZE];
-#endif
TESTING_2("H5Lmove on external link (moved link's properties checked)");
-#ifndef NO_EXTERNAL_LINKS
+
HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
EXTERNAL_LINK_TEST_FILE_NAME);
@@ -10520,19 +10425,24 @@ test_move_link(void)
PART_ERROR(H5Lmove_external_check);
}
- if (new_info.corder_valid != orig_info.corder_valid) {
- H5_FAILED();
- HDprintf(" moved link's 'corder_valid' field doesn't match original link's 'corder_valid' "
- "field\n");
- PART_ERROR(H5Lmove_external_check);
- }
+ if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
+ if (new_info.corder_valid != orig_info.corder_valid) {
+ H5_FAILED();
+ HDprintf(
+ " moved link's 'corder_valid' field doesn't match original link's 'corder_valid' "
+ "field\n");
+ PART_ERROR(H5Lmove_external_check);
+ }
- if (new_info.corder_valid && orig_info.corder_valid && (new_info.corder != orig_info.corder)) {
- H5_FAILED();
- HDprintf(" moved link's creation order value %lld doesn't match original link's creation "
- "order value %lld\n",
- new_info.corder, orig_info.corder);
- PART_ERROR(H5Lmove_external_check);
+ if (new_info.corder_valid && orig_info.corder_valid &&
+ (new_info.corder != orig_info.corder)) {
+ H5_FAILED();
+ HDprintf(" moved link's creation order value %" PRId64
+ " doesn't match original link's creation "
+ "order value %" PRId64 "\n",
+ new_info.corder, orig_info.corder);
+ PART_ERROR(H5Lmove_external_check);
+ }
}
if (new_info.cset != orig_info.cset) {
@@ -10574,10 +10484,6 @@ test_move_link(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Lmove_external_check);
-#endif
}
PART_END(H5Lmove_external_check);
@@ -10591,7 +10497,7 @@ test_move_link(void)
PART_BEGIN(H5Lmove_external_same_loc)
{
TESTING_2("H5Lmove on external link using H5L_SAME_LOC");
-#ifndef NO_EXTERNAL_LINKS
+
HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
EXTERNAL_LINK_TEST_FILE_NAME);
@@ -10717,10 +10623,6 @@ test_move_link(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Lmove_external_same_loc);
-#endif
}
PART_END(H5Lmove_external_same_loc);
@@ -10734,7 +10636,7 @@ test_move_link(void)
PART_BEGIN(H5Lmove_external_rename)
{
TESTING_2("H5Lmove to rename external link without moving it");
-#ifndef NO_EXTERNAL_LINKS
+
HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
EXTERNAL_LINK_TEST_FILE_NAME);
@@ -10823,10 +10725,6 @@ test_move_link(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Lmove_external_rename);
-#endif
}
PART_END(H5Lmove_external_rename);
@@ -10942,7 +10840,7 @@ test_move_links_into_group_with_links(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_MORE) || !(vol_cap_flags_g & H5VL_CAP_FLAG_HARD_LINKS) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, or basic or hard link, or creation order aren't "
+ HDprintf(" API functions for basic file, group, link, hard link, or creation order aren't "
"supported with this connector\n");
return 0;
}
@@ -11130,7 +11028,6 @@ test_move_link_across_files(void)
static int
test_move_link_reset_grp_max_crt_order(void)
{
-#ifndef NO_MAX_LINK_CRT_ORDER_RESET
H5G_info_t grp_info;
size_t i;
hid_t file_id = H5I_INVALID_HID;
@@ -11138,7 +11035,6 @@ test_move_link_reset_grp_max_crt_order(void)
hid_t src_grp_id = H5I_INVALID_HID, dst_grp_id = H5I_INVALID_HID;
hid_t gcpl_id = H5I_INVALID_HID;
char link_name[MOVE_LINK_RESET_MAX_CRT_ORDER_TEST_BUF_SIZE];
-#endif
TESTING("H5Lmove of all links out of group resets group's maximum link creation order value");
@@ -11147,12 +11043,11 @@ test_move_link_reset_grp_max_crt_order(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_MORE) || !(vol_cap_flags_g & H5VL_CAP_FLAG_HARD_LINKS) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_MORE) || !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, more or hard link, or creation order aren't "
+ HDprintf(" API functions for basic file, group, link, hard link, or creation order aren't "
"supported with this connector\n");
return 0;
}
-#ifndef NO_MAX_LINK_CRT_ORDER_RESET
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
H5_FAILED();
HDprintf(" couldn't open file '%s'\n", H5_api_test_filename);
@@ -11226,7 +11121,7 @@ test_move_link_reset_grp_max_crt_order(void)
if (grp_info.max_corder != MOVE_LINK_RESET_MAX_CRT_ORDER_TEST_NUM_LINKS) {
H5_FAILED();
HDprintf(" source group's maximum creation order value got adjusted to %lld during link "
- "moving; value should have remained at %lld\n",
+ "moving; value should have remained at %d\n",
(long long)grp_info.max_corder, MOVE_LINK_RESET_MAX_CRT_ORDER_TEST_NUM_LINKS);
goto error;
}
@@ -11272,7 +11167,7 @@ test_move_link_reset_grp_max_crt_order(void)
if (grp_info.max_corder != MOVE_LINK_RESET_MAX_CRT_ORDER_TEST_NUM_LINKS) {
H5_FAILED();
HDprintf(" destination group's maximum creation order value of %lld didn't match expected value "
- "of %lld after moving all links into it\n",
+ "of %d after moving all links into it\n",
(long long)grp_info.max_corder, MOVE_LINK_RESET_MAX_CRT_ORDER_TEST_NUM_LINKS);
goto error;
}
@@ -11307,10 +11202,6 @@ error:
H5E_END_TRY;
return 1;
-#else
- SKIPPED();
- return 0;
-#endif
}
/*
@@ -11334,7 +11225,7 @@ test_move_link_invalid_params(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_LINK_MORE) || !(vol_cap_flags_g & H5VL_CAP_FLAG_HARD_LINKS)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, more or hard link aren't supported with this "
+ HDprintf(" API functions for basic file, group, link, or hard link aren't supported with this "
"connector\n");
return 0;
}
@@ -11549,7 +11440,7 @@ test_move_link_invalid_params(void)
PART_BEGIN(H5Lmove_invalid_lapl)
{
TESTING_2("H5Lmove with an invalid LAPL");
-#ifndef NO_INVALID_PROPERTY_LIST_TESTS
+
H5E_BEGIN_TRY
{
err_ret = H5Lmove(src_grp_id, MOVE_LINK_INVALID_PARAMS_TEST_HARD_LINK_NAME, dst_grp_id,
@@ -11564,10 +11455,6 @@ test_move_link_invalid_params(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Lmove_invalid_lapl);
-#endif
}
PART_END(H5Lmove_invalid_lapl);
@@ -11726,31 +11613,26 @@ static int
test_get_link_val(void)
{
H5L_info2_t link_info;
-#ifndef NO_EXTERNAL_LINKS
const char *ext_link_filepath;
const char *ext_link_val;
unsigned ext_link_flags;
-#endif
- htri_t link_exists;
- size_t link_val_size;
- char link_val_buf[GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE];
- hid_t file_id = H5I_INVALID_HID, ext_file_id = H5I_INVALID_HID;
- hid_t container_group = H5I_INVALID_HID, group_id = H5I_INVALID_HID;
- hid_t subgroup_id = H5I_INVALID_HID;
- hid_t gcpl_id = H5I_INVALID_HID;
-#ifndef NO_EXTERNAL_LINKS
- char ext_link_filename[H5_API_TEST_FILENAME_MAX_LENGTH];
-#endif
+ htri_t link_exists;
+ size_t link_val_size;
+ char link_val_buf[GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE];
+ hid_t file_id = H5I_INVALID_HID, ext_file_id = H5I_INVALID_HID;
+ hid_t container_group = H5I_INVALID_HID, group_id = H5I_INVALID_HID;
+ hid_t subgroup_id = H5I_INVALID_HID;
+ hid_t gcpl_id = H5I_INVALID_HID;
+ char ext_link_filename[H5_API_TEST_FILENAME_MAX_LENGTH];
TESTING_MULTIPART("link value retrieval");
/* 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_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_MORE) ||
- !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, basic, more, soft, external link, or creation "
+ HDprintf(" API functions for basic file, group, link, soft link, external link, or creation "
"order aren't supported with this connector\n");
return 0;
}
@@ -11775,10 +11657,12 @@ test_get_link_val(void)
goto error;
}
- if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) {
- H5_FAILED();
- HDprintf(" couldn't set link creation order tracking\n");
- goto error;
+ if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
+ if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) {
+ H5_FAILED();
+ HDprintf(" couldn't set link creation order tracking\n");
+ goto error;
+ }
}
if ((group_id = H5Gcreate2(container_group, GET_LINK_VAL_TEST_SUBGROUP_NAME, H5P_DEFAULT, gcpl_id,
@@ -11872,12 +11756,10 @@ test_get_link_val(void)
PART_BEGIN(H5Lget_val_external)
{
-#ifndef NO_EXTERNAL_LINKS
const char *ext_obj_name = "/";
-#endif
TESTING_2("H5Lget_val on external link");
-#ifndef NO_EXTERNAL_LINKS
+
HDmemset(&link_info, 0, sizeof(link_info));
HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
@@ -11931,8 +11813,8 @@ test_get_link_val(void)
link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_obj_name) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link value size %lld did not match expected size of %lld\n",
- link_info.u.val_size, link_val_size);
+ HDprintf(" link value size %zu did not match expected size of %zu\n", link_info.u.val_size,
+ link_val_size);
PART_ERROR(H5Lget_val_external);
}
@@ -11971,10 +11853,6 @@ test_get_link_val(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Lget_val_external);
-#endif
}
PART_END(H5Lget_val_external);
@@ -12016,6 +11894,12 @@ test_get_link_val(void)
TESTING_2("H5Lget_val_by_idx on soft link 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(H5Lget_val_by_idx_soft_crt_order_increasing);
+ }
+
if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_VAL_TEST_SUBGROUP4_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -12204,6 +12088,12 @@ test_get_link_val(void)
TESTING_2("H5Lget_val_by_idx on soft link 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(H5Lget_val_by_idx_soft_crt_order_decreasing);
+ }
+
if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_VAL_TEST_SUBGROUP5_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -12571,17 +12461,15 @@ test_get_link_val(void)
PART_BEGIN(H5Lget_val_by_idx_soft_name_order_decreasing)
{
-#ifndef NO_DECREASING_ALPHA_ITER_ORDER
const char *link_target_a = "/" LINK_TEST_GROUP_NAME "/" GET_LINK_VAL_TEST_SUBGROUP_NAME
"/" GET_LINK_VAL_TEST_SUBGROUP7_NAME "A";
const char *link_target_b = "/" LINK_TEST_GROUP_NAME "/" GET_LINK_VAL_TEST_SUBGROUP_NAME
"/" GET_LINK_VAL_TEST_SUBGROUP7_NAME "B";
const char *link_target_c = "/" LINK_TEST_GROUP_NAME "/" GET_LINK_VAL_TEST_SUBGROUP_NAME
"/" GET_LINK_VAL_TEST_SUBGROUP7_NAME "C";
-#endif
TESTING_2("H5Lget_val_by_idx on soft link by alphabetical order in decreasing order");
-#ifndef NO_DECREASING_ALPHA_ITER_ORDER
+
if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_VAL_TEST_SUBGROUP7_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -12653,16 +12541,15 @@ test_get_link_val(void)
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 2, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve soft link's info at index %lld\n", 2);
+ HDprintf(" failed to retrieve soft link's info at index %d\n", 2);
PART_ERROR(H5Lget_val_by_idx_soft_name_order_decreasing);
}
link_val_size = strlen(link_target_a) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(
- " link value size %lld for link at index %lld did not match expected size of %lld\n",
- link_info.u.val_size, 2, link_val_size);
+ HDprintf(" link value size %zu for link at index %d did not match expected size of %zu\n",
+ link_info.u.val_size, 2, link_val_size);
PART_ERROR(H5Lget_val_by_idx_soft_name_order_decreasing);
}
@@ -12670,13 +12557,13 @@ test_get_link_val(void)
if (H5Lget_val_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 2, link_val_buf,
GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get soft link value at index %lld\n", 2);
+ HDprintf(" couldn't get soft link value at index %d\n", 2);
PART_ERROR(H5Lget_val_by_idx_soft_name_order_decreasing);
}
if (HDstrncmp(link_val_buf, link_target_a, strlen(link_target_a) + 1)) {
H5_FAILED();
- HDprintf(" link value '%s' for link at index %lld did not match expected value '%s'\n",
+ HDprintf(" link value '%s' for link at index %d did not match expected value '%s'\n",
link_val_buf, 2, link_target_a);
PART_ERROR(H5Lget_val_by_idx_soft_name_order_decreasing);
}
@@ -12685,16 +12572,15 @@ test_get_link_val(void)
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 1, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve soft link's info at index %lld\n", 1);
+ HDprintf(" failed to retrieve soft link's info at index %d\n", 1);
PART_ERROR(H5Lget_val_by_idx_soft_name_order_decreasing);
}
link_val_size = strlen(link_target_b) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(
- " link value size %lld for link at index %lld did not match expected size of %lld\n",
- link_info.u.val_size, 1, link_val_size);
+ HDprintf(" link value size %zu for link at index %d did not match expected size of %zu\n",
+ link_info.u.val_size, 1, link_val_size);
PART_ERROR(H5Lget_val_by_idx_soft_name_order_decreasing);
}
@@ -12702,13 +12588,13 @@ test_get_link_val(void)
if (H5Lget_val_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 1, link_val_buf,
GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get soft link value at index %lld\n", 1);
+ HDprintf(" couldn't get soft link value at index %d\n", 1);
PART_ERROR(H5Lget_val_by_idx_soft_name_order_decreasing);
}
if (HDstrncmp(link_val_buf, link_target_b, strlen(link_target_b) + 1)) {
H5_FAILED();
- HDprintf(" link value '%s' for link at index %lld did not match expected value '%s'\n",
+ HDprintf(" link value '%s' for link at index %d did not match expected value '%s'\n",
link_val_buf, 1, link_target_b);
PART_ERROR(H5Lget_val_by_idx_soft_name_order_decreasing);
}
@@ -12717,16 +12603,15 @@ test_get_link_val(void)
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 0, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve soft link's info at index %lld\n", 0);
+ HDprintf(" failed to retrieve soft link's info at index %d\n", 0);
PART_ERROR(H5Lget_val_by_idx_soft_name_order_decreasing);
}
link_val_size = strlen(link_target_c) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(
- " link value size %lld for link at index %lld did not match expected size of %lld\n",
- link_info.u.val_size, 0, link_val_size);
+ HDprintf(" link value size %zu for link at index %d did not match expected size of %zu\n",
+ link_info.u.val_size, 0, link_val_size);
PART_ERROR(H5Lget_val_by_idx_soft_name_order_decreasing);
}
@@ -12734,13 +12619,13 @@ test_get_link_val(void)
if (H5Lget_val_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 0, link_val_buf,
GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get soft link value at index %lld\n", 0);
+ HDprintf(" couldn't get soft link value at index %d\n", 0);
PART_ERROR(H5Lget_val_by_idx_soft_name_order_decreasing);
}
if (HDstrncmp(link_val_buf, link_target_c, strlen(link_target_c) + 1)) {
H5_FAILED();
- HDprintf(" link value '%s' for link at index %lld did not match expected value '%s'\n",
+ HDprintf(" link value '%s' for link at index %d did not match expected value '%s'\n",
link_val_buf, 0, link_target_c);
PART_ERROR(H5Lget_val_by_idx_soft_name_order_decreasing);
}
@@ -12752,10 +12637,6 @@ test_get_link_val(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Lget_val_by_idx_soft_name_order_decreasing);
-#endif
}
PART_END(H5Lget_val_by_idx_soft_name_order_decreasing);
@@ -12768,14 +12649,18 @@ test_get_link_val(void)
PART_BEGIN(H5Lget_val_by_idx_external_crt_order_increasing)
{
-#ifndef NO_EXTERNAL_LINKS
const char *ext_obj_name_a = "/A";
const char *ext_obj_name_b = "/B";
const char *ext_obj_name_c = "/C";
-#endif
TESTING_2("H5Lget_val_by_idx on external link by creation order in increasing order");
-#ifndef NO_EXTERNAL_LINKS
+
+ 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(H5Lget_val_by_idx_external_crt_order_increasing);
+ }
+
HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
EXTERNAL_LINK_TEST_FILE_NAME);
@@ -12862,16 +12747,15 @@ test_get_link_val(void)
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 0, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve external link's info at index %lld\n", 0);
+ HDprintf(" failed to retrieve external link's info at index %d\n", 0);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing);
}
link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_obj_name_a) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(
- " link value size %lld for link at index %lld did not match expected size of %lld\n",
- link_info.u.val_size, 0, link_val_size);
+ HDprintf(" link value size %zu for link at index %d did not match expected size of %zu\n",
+ link_info.u.val_size, 0, link_val_size);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing);
}
@@ -12879,7 +12763,7 @@ test_get_link_val(void)
if (H5Lget_val_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 0, link_val_buf,
GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get external link value at index %lld\n", 0);
+ HDprintf(" couldn't get external link value at index %d\n", 0);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing);
}
@@ -12908,16 +12792,15 @@ test_get_link_val(void)
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 1, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve external link's info at index %lld\n", 1);
+ HDprintf(" failed to retrieve external link's info at index %d\n", 1);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing);
}
link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_obj_name_b) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(
- " link value size %lld for link at index %lld did not match expected size of %lld\n",
- link_info.u.val_size, 1, link_val_size);
+ HDprintf(" link value size %zu for link at index %d did not match expected size of %zu\n",
+ link_info.u.val_size, 1, link_val_size);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing);
}
@@ -12925,7 +12808,7 @@ test_get_link_val(void)
if (H5Lget_val_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 1, link_val_buf,
GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get external link value at index %lld\n", 1);
+ HDprintf(" couldn't get external link value at index %d\n", 1);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing);
}
@@ -12954,16 +12837,15 @@ test_get_link_val(void)
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 2, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve external link's info at index %lld\n", 2);
+ HDprintf(" failed to retrieve external link's info at index %d\n", 2);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing);
}
link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_obj_name_c) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(
- " link value size %lld for link at index %lld did not match expected size of %lld\n",
- link_info.u.val_size, 2, link_val_size);
+ HDprintf(" link value size %zu for link at index %d did not match expected size of %zu\n",
+ link_info.u.val_size, 2, link_val_size);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing);
}
@@ -12971,7 +12853,7 @@ test_get_link_val(void)
if (H5Lget_val_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 2, link_val_buf,
GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get external link value at index %lld\n", 2);
+ HDprintf(" couldn't get external link value at index %d\n", 2);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_increasing);
}
@@ -13003,10 +12885,6 @@ test_get_link_val(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Lget_val_by_idx_external_crt_order_increasing);
-#endif
}
PART_END(H5Lget_val_by_idx_external_crt_order_increasing);
@@ -13021,14 +12899,18 @@ test_get_link_val(void)
PART_BEGIN(H5Lget_val_by_idx_external_crt_order_decreasing)
{
-#ifndef NO_EXTERNAL_LINKS
const char *ext_obj_name_a = "/A";
const char *ext_obj_name_b = "/B";
const char *ext_obj_name_c = "/C";
-#endif
TESTING_2("H5Lget_val_by_idx on external link by creation order in decreasing order");
-#ifndef NO_EXTERNAL_LINKS
+
+ 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(H5Lget_val_by_idx_external_crt_order_decreasing);
+ }
+
HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
EXTERNAL_LINK_TEST_FILE_NAME);
@@ -13115,16 +12997,15 @@ test_get_link_val(void)
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 2, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve external link's info at index %lld\n", 2);
+ HDprintf(" failed to retrieve external link's info at index %d\n", 2);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing);
}
link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_obj_name_a) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(
- " link value size %lld for link at index %lld did not match expected size of %lld\n",
- link_info.u.val_size, 2, link_val_size);
+ HDprintf(" link value size %zu for link at index %d not match expected size of %zu\n",
+ link_info.u.val_size, 2, link_val_size);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing);
}
@@ -13132,7 +13013,7 @@ test_get_link_val(void)
if (H5Lget_val_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 2, link_val_buf,
GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get external link value at index %lld\n", 2);
+ HDprintf(" couldn't get external link value at index %d\n", 2);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing);
}
@@ -13161,16 +13042,15 @@ test_get_link_val(void)
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 1, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve external link's info at index %lld\n", 1);
+ HDprintf(" failed to retrieve external link's info at index %d\n", 1);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing);
}
link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_obj_name_b) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(
- " link value size %lld for link at index %lld did not match expected size of %lld\n",
- link_info.u.val_size, 1, link_val_size);
+ HDprintf(" link value size %zu for link at index %d did not match expected size of %zu\n",
+ link_info.u.val_size, 1, link_val_size);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing);
}
@@ -13178,7 +13058,7 @@ test_get_link_val(void)
if (H5Lget_val_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 1, link_val_buf,
GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get external link value at index %lld\n", 1);
+ HDprintf(" couldn't get external link value at index %d\n", 1);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing);
}
@@ -13207,16 +13087,15 @@ test_get_link_val(void)
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 0, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve external link's info at index %lld\n", 0);
+ HDprintf(" failed to retrieve external link's info at index %d\n", 0);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing);
}
link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_obj_name_c) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(
- " link value size %lld for link at index %lld did not match expected size of %lld\n",
- link_info.u.val_size, 0, link_val_size);
+ HDprintf(" link value size %zu for link at index %d did not match expected size of %zu\n",
+ link_info.u.val_size, 0, link_val_size);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing);
}
@@ -13224,7 +13103,7 @@ test_get_link_val(void)
if (H5Lget_val_by_idx(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 0, link_val_buf,
GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get external link value at index %lld\n", 0);
+ HDprintf(" couldn't get external link value at index %d\n", 0);
PART_ERROR(H5Lget_val_by_idx_external_crt_order_decreasing);
}
@@ -13256,10 +13135,6 @@ test_get_link_val(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Lget_val_by_idx_external_crt_order_decreasing);
-#endif
}
PART_END(H5Lget_val_by_idx_external_crt_order_decreasing);
@@ -13274,14 +13149,12 @@ test_get_link_val(void)
PART_BEGIN(H5Lget_val_by_idx_external_name_order_increasing)
{
-#ifndef NO_EXTERNAL_LINKS
const char *ext_obj_name_a = "/A";
const char *ext_obj_name_b = "/B";
const char *ext_obj_name_c = "/C";
-#endif
TESTING_2("H5Lget_val_by_idx on external link by alphabetical order in increasing order");
-#ifndef NO_EXTERNAL_LINKS
+
HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
EXTERNAL_LINK_TEST_FILE_NAME);
@@ -13368,16 +13241,15 @@ test_get_link_val(void)
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 0, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve external link's info at index %lld\n", 0);
+ HDprintf(" failed to retrieve external link's info at index %d\n", 0);
PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing);
}
link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_obj_name_a) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(
- " link value size %lld for link at index %lld did not match expected size of %lld\n",
- link_info.u.val_size, 0, link_val_size);
+ HDprintf(" link value size %zu for link at index %d did not match expected size of %zu\n",
+ link_info.u.val_size, 0, link_val_size);
PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing);
}
@@ -13385,7 +13257,7 @@ test_get_link_val(void)
if (H5Lget_val_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 0, link_val_buf,
GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get external link value at index %lld\n", 0);
+ HDprintf(" couldn't get external link value at index %d\n", 0);
PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing);
}
@@ -13414,16 +13286,15 @@ test_get_link_val(void)
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 1, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve external link's info at index %lld\n", 1);
+ HDprintf(" failed to retrieve external link's info at index %d\n", 1);
PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing);
}
link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_obj_name_b) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(
- " link value size %lld for link at index %lld did not match expected size of %lld\n",
- link_info.u.val_size, 1, link_val_size);
+ HDprintf(" link value size %zu for link at index %d did not match expected size of %zu\n",
+ link_info.u.val_size, 1, link_val_size);
PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing);
}
@@ -13431,7 +13302,7 @@ test_get_link_val(void)
if (H5Lget_val_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 1, link_val_buf,
GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get external link value at index %lld\n", 1);
+ HDprintf(" couldn't get external link value at index %d\n", 1);
PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing);
}
@@ -13460,16 +13331,15 @@ test_get_link_val(void)
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 2, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve external link's info at index %lld\n", 2);
+ HDprintf(" failed to retrieve external link's info at index %d\n", 2);
PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing);
}
link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_obj_name_c) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(
- " link value size %lld for link at index %lld did not match expected size of %lld\n",
- link_info.u.val_size, 2, link_val_size);
+ HDprintf(" link value size %zu for link at index %d did not match expected size of %zu\n",
+ link_info.u.val_size, 2, link_val_size);
PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing);
}
@@ -13477,7 +13347,7 @@ test_get_link_val(void)
if (H5Lget_val_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 2, link_val_buf,
GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get external link value at index %lld\n", 2);
+ HDprintf(" couldn't get external link value at index %d\n", 2);
PART_ERROR(H5Lget_val_by_idx_external_name_order_increasing);
}
@@ -13509,10 +13379,6 @@ test_get_link_val(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Lget_val_by_idx_external_name_order_increasing);
-#endif
}
PART_END(H5Lget_val_by_idx_external_name_order_increasing);
@@ -13527,14 +13393,12 @@ test_get_link_val(void)
PART_BEGIN(H5Lget_val_by_idx_external_name_order_decreasing)
{
-#ifndef NO_DECREASING_ALPHA_ITER_ORDER
const char *ext_obj_name_a = "/A";
const char *ext_obj_name_b = "/B";
const char *ext_obj_name_c = "/C";
-#endif
TESTING_2("H5Lget_val_by_idx on external link by alphabetical order in decreasing order");
-#ifndef NO_DECREASING_ALPHA_ITER_ORDER
+
HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
EXTERNAL_LINK_TEST_FILE_NAME);
@@ -13621,16 +13485,15 @@ test_get_link_val(void)
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 2, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve external link's info at index %lld\n", 2);
+ HDprintf(" failed to retrieve external link's info at index %d\n", 2);
PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing);
}
link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_obj_name_a) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(
- " link value size %lld for link at index %lld did not match expected size of %lld\n",
- link_info.u.val_size, 2, link_val_size);
+ HDprintf(" link value size %zu for link at index %d did not match expected size of %zu\n",
+ link_info.u.val_size, 2, link_val_size);
PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing);
}
@@ -13638,7 +13501,7 @@ test_get_link_val(void)
if (H5Lget_val_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 2, link_val_buf,
GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get external link value at index %lld\n", 2);
+ HDprintf(" couldn't get external link value at index %d\n", 2);
PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing);
}
@@ -13667,16 +13530,15 @@ test_get_link_val(void)
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 1, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve external link's info at index %lld\n", 1);
+ HDprintf(" failed to retrieve external link's info at index %d\n", 1);
PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing);
}
link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_obj_name_b) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(
- " link value size %lld for link at index %lld did not match expected size of %lld\n",
- link_info.u.val_size, 1, link_val_size);
+ HDprintf(" link value size %zu for link at index %d did not match expected size of %zu\n",
+ link_info.u.val_size, 1, link_val_size);
PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing);
}
@@ -13684,7 +13546,7 @@ test_get_link_val(void)
if (H5Lget_val_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 1, link_val_buf,
GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get external link value at index %lld\n", 1);
+ HDprintf(" couldn't get external link value at index %d\n", 1);
PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing);
}
@@ -13713,16 +13575,15 @@ test_get_link_val(void)
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 0, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" failed to retrieve external link's info at index %lld\n", 0);
+ HDprintf(" failed to retrieve external link's info at index %d\n", 0);
PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing);
}
link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_obj_name_c) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(
- " link value size %lld for link at index %lld did not match expected size of %lld\n",
- link_info.u.val_size, 0, link_val_size);
+ HDprintf(" link value size %zu for link at index %d did not match expected size of %zu\n",
+ link_info.u.val_size, 0, link_val_size);
PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing);
}
@@ -13730,7 +13591,7 @@ test_get_link_val(void)
if (H5Lget_val_by_idx(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 0, link_val_buf,
GET_LINK_VAL_TEST_LINK_VAL_BUF_SIZE, H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get external link value at index %lld\n", 0);
+ HDprintf(" couldn't get external link value at index %d\n", 0);
PART_ERROR(H5Lget_val_by_idx_external_name_order_decreasing);
}
@@ -13762,10 +13623,6 @@ test_get_link_val(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Lget_val_by_idx_external_name_order_decreasing);
-#endif
}
PART_END(H5Lget_val_by_idx_external_name_order_decreasing);
@@ -13895,9 +13752,9 @@ test_get_link_val_invalid_params(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_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_MORE) ||
- !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) || !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS)) {
+ !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, basic, more, soft, external link, or creation "
+ HDprintf(" API functions for basic file, group, link, soft link, external link, or creation "
"order aren't supported with this connector\n");
return 0;
}
@@ -13922,12 +13779,6 @@ test_get_link_val_invalid_params(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 ((group_id = H5Gcreate2(container_group, GET_LINK_VAL_INVALID_PARAMS_TEST_GROUP_NAME, H5P_DEFAULT,
gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -14053,8 +13904,8 @@ test_get_link_val_invalid_params(void)
H5E_BEGIN_TRY
{
- err_ret = H5Lget_val_by_idx(H5I_INVALID_HID, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 0,
- link_val_buf, link_val_buf_size, H5P_DEFAULT);
+ err_ret = H5Lget_val_by_idx(H5I_INVALID_HID, ".", H5_INDEX_NAME, H5_ITER_INC, 0, link_val_buf,
+ link_val_buf_size, H5P_DEFAULT);
}
H5E_END_TRY;
@@ -14074,7 +13925,7 @@ test_get_link_val_invalid_params(void)
H5E_BEGIN_TRY
{
- err_ret = H5Lget_val_by_idx(group_id, NULL, H5_INDEX_CRT_ORDER, H5_ITER_INC, 0, link_val_buf,
+ err_ret = H5Lget_val_by_idx(group_id, NULL, H5_INDEX_NAME, H5_ITER_INC, 0, link_val_buf,
link_val_buf_size, H5P_DEFAULT);
}
H5E_END_TRY;
@@ -14087,7 +13938,7 @@ test_get_link_val_invalid_params(void)
H5E_BEGIN_TRY
{
- err_ret = H5Lget_val_by_idx(group_id, "", H5_INDEX_CRT_ORDER, H5_ITER_INC, 0, link_val_buf,
+ err_ret = H5Lget_val_by_idx(group_id, "", H5_INDEX_NAME, H5_ITER_INC, 0, link_val_buf,
link_val_buf_size, H5P_DEFAULT);
}
H5E_END_TRY;
@@ -14142,8 +13993,8 @@ test_get_link_val_invalid_params(void)
H5E_BEGIN_TRY
{
- err_ret = H5Lget_val_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_UNKNOWN, 0,
- link_val_buf, link_val_buf_size, H5P_DEFAULT);
+ err_ret = H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_UNKNOWN, 0, link_val_buf,
+ link_val_buf_size, H5P_DEFAULT);
}
H5E_END_TRY;
@@ -14156,7 +14007,7 @@ test_get_link_val_invalid_params(void)
H5E_BEGIN_TRY
{
- err_ret = H5Lget_val_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_N, 0, link_val_buf,
+ err_ret = H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_N, 0, link_val_buf,
link_val_buf_size, H5P_DEFAULT);
}
H5E_END_TRY;
@@ -14177,7 +14028,7 @@ test_get_link_val_invalid_params(void)
H5E_BEGIN_TRY
{
- err_ret = H5Lget_val_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 0, link_val_buf,
+ err_ret = H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, 0, link_val_buf,
link_val_buf_size, H5I_INVALID_HID);
}
H5E_END_TRY;
@@ -14237,16 +14088,14 @@ static int
test_get_link_info(void)
{
H5L_info2_t link_info;
+ const char *ext_objname = "/";
htri_t link_exists;
size_t link_val_size;
hid_t file_id = H5I_INVALID_HID, ext_file_id = H5I_INVALID_HID;
hid_t container_group = H5I_INVALID_HID, group_id = H5I_INVALID_HID;
hid_t subgroup_id = H5I_INVALID_HID;
hid_t gcpl_id = H5I_INVALID_HID;
-#ifndef NO_EXTERNAL_LINKS
- char *ext_objname;
- char ext_link_filename[H5_API_TEST_FILENAME_MAX_LENGTH];
-#endif
+ char ext_link_filename[H5_API_TEST_FILENAME_MAX_LENGTH];
TESTING_MULTIPART("link info retrieval");
@@ -14254,10 +14103,10 @@ test_get_link_info(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_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_MORE) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_HARD_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) ||
- !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
+ !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, basic, more, soft, hard, external link, or "
- "creation order aren't supported with this connector\n");
+ HDprintf(" API functions for basic file, group, link, soft link, hard link, or external link "
+ "aren't supported with this connector\n");
return 0;
}
@@ -14281,10 +14130,12 @@ test_get_link_info(void)
goto error;
}
- if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) {
- H5_FAILED();
- HDprintf(" couldn't set link creation order tracking\n");
- goto error;
+ if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
+ if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) {
+ H5_FAILED();
+ HDprintf(" couldn't set link creation order tracking\n");
+ goto error;
+ }
}
if ((group_id = H5Gcreate2(container_group, GET_LINK_INFO_TEST_GROUP_NAME, H5P_DEFAULT, gcpl_id,
@@ -14343,11 +14194,13 @@ test_get_link_info(void)
PART_ERROR(H5Lget_info_hard);
}
- if (link_info.corder_valid && (link_info.corder != 0)) {
- H5_FAILED();
- HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)link_info.corder, (long long)0);
- PART_ERROR(H5Lget_info_hard);
+ if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
+ if (link_info.corder_valid && (link_info.corder != 0)) {
+ H5_FAILED();
+ HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)link_info.corder, (long long)0);
+ PART_ERROR(H5Lget_info_hard);
+ }
}
if (H5Gclose(subgroup_id) < 0) {
@@ -14424,11 +14277,13 @@ test_get_link_info(void)
PART_ERROR(H5Lget_info_soft);
}
- if (link_info.corder_valid && (link_info.corder != 0)) {
- H5_FAILED();
- HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)link_info.corder, (long long)0);
- PART_ERROR(H5Lget_info_soft);
+ if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
+ if (link_info.corder_valid && (link_info.corder != 0)) {
+ H5_FAILED();
+ HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)link_info.corder, (long long)0);
+ PART_ERROR(H5Lget_info_soft);
+ }
}
if (H5Gclose(subgroup_id) < 0) {
@@ -14451,7 +14306,7 @@ test_get_link_info(void)
PART_BEGIN(H5Lget_info_external)
{
TESTING_2("H5Lget_info2 on external link");
-#ifndef NO_EXTERNAL_LINKS
+
HDmemset(&link_info, 0, sizeof(link_info));
HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
@@ -14476,7 +14331,6 @@ test_get_link_info(void)
PART_ERROR(H5Lget_info_external);
}
- ext_objname = "/";
if (H5Lcreate_external(ext_link_filename, ext_objname, subgroup_id,
GET_LINK_INFO_TEST_EXT_LINK_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
@@ -14512,16 +14366,18 @@ test_get_link_info(void)
link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_objname) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link's value size '%lld' did not match expected value '%lld'\n",
+ HDprintf(" link's value size '%lld' did not match expected value '%zu'\n",
(long long)link_info.u.val_size, link_val_size);
PART_ERROR(H5Lget_info_external);
}
- if (link_info.corder_valid && (link_info.corder != 0)) {
- H5_FAILED();
- HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)link_info.corder, (long long)0);
- PART_ERROR(H5Lget_info_external);
+ if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
+ if (link_info.corder_valid && (link_info.corder != 0)) {
+ H5_FAILED();
+ HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)link_info.corder, (long long)0);
+ PART_ERROR(H5Lget_info_external);
+ }
}
if (H5Gclose(subgroup_id) < 0) {
@@ -14531,10 +14387,6 @@ test_get_link_info(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Lget_info_external);
-#endif
}
PART_END(H5Lget_info_external);
@@ -14569,6 +14421,12 @@ test_get_link_info(void)
{
TESTING_2("H5Lget_info_by_idx2 on hard link 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(H5Lget_info_by_idx_hard_crt_order_increasing);
+ }
+
if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_INFO_TEST_SUBGROUP5_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -14726,6 +14584,12 @@ test_get_link_info(void)
{
TESTING_2("H5Lget_info_by_idx2 on hard link 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(H5Lget_info_by_idx_hard_crt_order_decreasing);
+ }
+
if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_INFO_TEST_SUBGROUP6_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -14970,11 +14834,13 @@ test_get_link_info(void)
PART_ERROR(H5Lget_info_by_idx_hard_name_order_increasing);
}
- if (link_info.corder_valid && (link_info.corder != 0)) {
- H5_FAILED();
- HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)link_info.corder, (long long)0);
- PART_ERROR(H5Lget_info_by_idx_hard_name_order_increasing);
+ if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
+ if (link_info.corder_valid && (link_info.corder != 0)) {
+ H5_FAILED();
+ HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)link_info.corder, (long long)0);
+ PART_ERROR(H5Lget_info_by_idx_hard_name_order_increasing);
+ }
}
HDmemset(&link_info, 0, sizeof(link_info));
@@ -14991,11 +14857,13 @@ test_get_link_info(void)
PART_ERROR(H5Lget_info_by_idx_hard_name_order_increasing);
}
- if (link_info.corder_valid && (link_info.corder != 1)) {
- H5_FAILED();
- HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)link_info.corder, (long long)1);
- PART_ERROR(H5Lget_info_by_idx_hard_name_order_increasing);
+ if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
+ if (link_info.corder_valid && (link_info.corder != 1)) {
+ H5_FAILED();
+ HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)link_info.corder, (long long)1);
+ PART_ERROR(H5Lget_info_by_idx_hard_name_order_increasing);
+ }
}
HDmemset(&link_info, 0, sizeof(link_info));
@@ -15012,11 +14880,13 @@ test_get_link_info(void)
PART_ERROR(H5Lget_info_by_idx_hard_name_order_increasing);
}
- if (link_info.corder_valid && (link_info.corder != 2)) {
- H5_FAILED();
- HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)link_info.corder, (long long)2);
- PART_ERROR(H5Lget_info_by_idx_hard_name_order_increasing);
+ if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
+ if (link_info.corder_valid && (link_info.corder != 2)) {
+ H5_FAILED();
+ HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)link_info.corder, (long long)2);
+ PART_ERROR(H5Lget_info_by_idx_hard_name_order_increasing);
+ }
}
if (H5Gclose(subgroup_id) < 0) {
@@ -15039,7 +14909,7 @@ test_get_link_info(void)
PART_BEGIN(H5Lget_info_by_idx_hard_name_order_decreasing)
{
TESTING_2("H5Lget_info_by_idx2 on hard link by alphabetical order in decreasing order");
-#ifndef NO_DECREASING_ALPHA_ITER_ORDER
+
if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_INFO_TEST_SUBGROUP8_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -15117,7 +14987,7 @@ test_get_link_info(void)
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 2, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get hard link info for index %lld\n", 2);
+ HDprintf(" couldn't get hard link info for index %d\n", 2);
PART_ERROR(H5Lget_info_by_idx_hard_name_order_decreasing);
}
@@ -15127,18 +14997,20 @@ test_get_link_info(void)
PART_ERROR(H5Lget_info_by_idx_hard_name_order_decreasing);
}
- if (link_info.corder_valid && (link_info.corder != 0)) {
- H5_FAILED();
- HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)link_info.corder, (long long)0);
- PART_ERROR(H5Lget_info_by_idx_hard_name_order_decreasing);
+ if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
+ if (link_info.corder_valid && (link_info.corder != 0)) {
+ H5_FAILED();
+ HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)link_info.corder, (long long)0);
+ PART_ERROR(H5Lget_info_by_idx_hard_name_order_decreasing);
+ }
}
HDmemset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 1, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get hard link info for index %lld\n", 1);
+ HDprintf(" couldn't get hard link info for index %d\n", 1);
PART_ERROR(H5Lget_info_by_idx_hard_name_order_decreasing);
}
@@ -15148,18 +15020,20 @@ test_get_link_info(void)
PART_ERROR(H5Lget_info_by_idx_hard_name_order_decreasing);
}
- if (link_info.corder_valid && (link_info.corder != 1)) {
- H5_FAILED();
- HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)link_info.corder, (long long)1);
- PART_ERROR(H5Lget_info_by_idx_hard_name_order_decreasing);
+ if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
+ if (link_info.corder_valid && (link_info.corder != 1)) {
+ H5_FAILED();
+ HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)link_info.corder, (long long)1);
+ PART_ERROR(H5Lget_info_by_idx_hard_name_order_decreasing);
+ }
}
HDmemset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 0, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get hard link info for index %lld\n", 0);
+ HDprintf(" couldn't get hard link info for index %d\n", 0);
PART_ERROR(H5Lget_info_by_idx_hard_name_order_decreasing);
}
@@ -15169,11 +15043,13 @@ test_get_link_info(void)
PART_ERROR(H5Lget_info_by_idx_hard_name_order_decreasing);
}
- if (link_info.corder_valid && (link_info.corder != 2)) {
- H5_FAILED();
- HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)link_info.corder, (long long)2);
- PART_ERROR(H5Lget_info_by_idx_hard_name_order_decreasing);
+ if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
+ if (link_info.corder_valid && (link_info.corder != 2)) {
+ H5_FAILED();
+ HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)link_info.corder, (long long)2);
+ PART_ERROR(H5Lget_info_by_idx_hard_name_order_decreasing);
+ }
}
if (H5Gclose(subgroup_id) < 0) {
@@ -15183,10 +15059,6 @@ test_get_link_info(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Lget_info_by_idx_hard_name_order_decreasing);
-#endif
}
PART_END(H5Lget_info_by_idx_hard_name_order_decreasing);
@@ -15201,6 +15073,12 @@ test_get_link_info(void)
{
TESTING_2("H5Lget_info_by_idx2 on soft link 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(H5Lget_info_by_idx_soft_crt_order_increasing);
+ }
+
if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_INFO_TEST_SUBGROUP9_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -15394,6 +15272,12 @@ test_get_link_info(void)
{
TESTING_2("H5Lget_info_by_idx2 on soft link 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(H5Lget_info_by_idx_soft_crt_order_decreasing);
+ }
+
if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_INFO_TEST_SUBGROUP10_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -15690,11 +15574,13 @@ test_get_link_info(void)
PART_ERROR(H5Lget_info_by_idx_soft_name_order_increasing);
}
- if (link_info.corder_valid && (link_info.corder != 0)) {
- H5_FAILED();
- HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)link_info.corder, (long long)0);
- PART_ERROR(H5Lget_info_by_idx_soft_name_order_increasing);
+ if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
+ if (link_info.corder_valid && (link_info.corder != 0)) {
+ H5_FAILED();
+ HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)link_info.corder, (long long)0);
+ PART_ERROR(H5Lget_info_by_idx_soft_name_order_increasing);
+ }
}
HDmemset(&link_info, 0, sizeof(link_info));
@@ -15721,11 +15607,13 @@ test_get_link_info(void)
PART_ERROR(H5Lget_info_by_idx_soft_name_order_increasing);
}
- if (link_info.corder_valid && (link_info.corder != 1)) {
- H5_FAILED();
- HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)link_info.corder, (long long)1);
- PART_ERROR(H5Lget_info_by_idx_soft_name_order_increasing);
+ if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
+ if (link_info.corder_valid && (link_info.corder != 1)) {
+ H5_FAILED();
+ HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)link_info.corder, (long long)1);
+ PART_ERROR(H5Lget_info_by_idx_soft_name_order_increasing);
+ }
}
HDmemset(&link_info, 0, sizeof(link_info));
@@ -15752,11 +15640,13 @@ test_get_link_info(void)
PART_ERROR(H5Lget_info_by_idx_soft_name_order_increasing);
}
- if (link_info.corder_valid && (link_info.corder != 2)) {
- H5_FAILED();
- HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)link_info.corder, (long long)2);
- PART_ERROR(H5Lget_info_by_idx_soft_name_order_increasing);
+ if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
+ if (link_info.corder_valid && (link_info.corder != 2)) {
+ H5_FAILED();
+ HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)link_info.corder, (long long)2);
+ PART_ERROR(H5Lget_info_by_idx_soft_name_order_increasing);
+ }
}
if (H5Gclose(subgroup_id) < 0) {
@@ -15779,7 +15669,7 @@ test_get_link_info(void)
PART_BEGIN(H5Lget_info_by_idx_soft_name_order_decreasing)
{
TESTING_2("H5Lget_info_by_idx2 on soft link by alphabetical order in decreasing order");
-#ifndef NO_DECREASING_ALPHA_ITER_ORDER
+
if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_INFO_TEST_SUBGROUP12_NAME, H5P_DEFAULT, gcpl_id,
H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -15863,7 +15753,7 @@ test_get_link_info(void)
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 2, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get soft link info for index %lld\n", 2);
+ HDprintf(" couldn't get soft link info for index %d\n", 2);
PART_ERROR(H5Lget_info_by_idx_soft_name_order_decreasing);
}
@@ -15878,23 +15768,25 @@ test_get_link_info(void)
1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link's value size '%lld' did not match expected value '%lld'\n",
+ HDprintf(" link's value size '%lld' did not match expected value '%zu'\n",
(long long)link_info.u.val_size, link_val_size);
PART_ERROR(H5Lget_info_by_idx_soft_name_order_decreasing);
}
- if (link_info.corder_valid && (link_info.corder != 0)) {
- H5_FAILED();
- HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)link_info.corder, (long long)0);
- PART_ERROR(H5Lget_info_by_idx_soft_name_order_decreasing);
+ if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
+ if (link_info.corder_valid && (link_info.corder != 0)) {
+ H5_FAILED();
+ HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)link_info.corder, (long long)0);
+ PART_ERROR(H5Lget_info_by_idx_soft_name_order_decreasing);
+ }
}
HDmemset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 1, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get soft link info for index %lld\n", 1);
+ HDprintf(" couldn't get soft link info for index %d\n", 1);
PART_ERROR(H5Lget_info_by_idx_soft_name_order_decreasing);
}
@@ -15909,23 +15801,25 @@ test_get_link_info(void)
1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link's value size '%lld' did not match expected value '%lld'\n",
+ HDprintf(" link's value size '%lld' did not match expected value '%zu'\n",
(long long)link_info.u.val_size, link_val_size);
PART_ERROR(H5Lget_info_by_idx_soft_name_order_decreasing);
}
- if (link_info.corder_valid && (link_info.corder != 1)) {
- H5_FAILED();
- HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)link_info.corder, (long long)1);
- PART_ERROR(H5Lget_info_by_idx_soft_name_order_decreasing);
+ if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
+ if (link_info.corder_valid && (link_info.corder != 1)) {
+ H5_FAILED();
+ HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)link_info.corder, (long long)1);
+ PART_ERROR(H5Lget_info_by_idx_soft_name_order_decreasing);
+ }
}
HDmemset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 0, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get soft link info for index %lld\n", 0);
+ HDprintf(" couldn't get soft link info for index %d\n", 0);
PART_ERROR(H5Lget_info_by_idx_soft_name_order_decreasing);
}
@@ -15940,16 +15834,18 @@ test_get_link_info(void)
1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link's value size '%lld' did not match expected value '%lld'\n",
+ HDprintf(" link's value size '%lld' did not match expected value '%zu'\n",
(long long)link_info.u.val_size, link_val_size);
PART_ERROR(H5Lget_info_by_idx_soft_name_order_decreasing);
}
- if (link_info.corder_valid && (link_info.corder != 2)) {
- H5_FAILED();
- HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)link_info.corder, (long long)2);
- PART_ERROR(H5Lget_info_by_idx_soft_name_order_decreasing);
+ if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
+ if (link_info.corder_valid && (link_info.corder != 2)) {
+ H5_FAILED();
+ HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)link_info.corder, (long long)2);
+ PART_ERROR(H5Lget_info_by_idx_soft_name_order_decreasing);
+ }
}
if (H5Gclose(subgroup_id) < 0) {
@@ -15959,10 +15855,6 @@ test_get_link_info(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Lget_info_by_idx_soft_name_order_decreasing);
-#endif
}
PART_END(H5Lget_info_by_idx_soft_name_order_decreasing);
@@ -15976,7 +15868,13 @@ test_get_link_info(void)
PART_BEGIN(H5Lget_info_by_idx_external_crt_order_increasing)
{
TESTING_2("H5Lget_info_by_idx2 on external link by creation order in increasing order");
-#ifndef NO_EXTERNAL_LINKS
+
+ 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(H5Lget_info_by_idx_external_crt_order_increasing);
+ }
+
HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
EXTERNAL_LINK_TEST_FILE_NAME);
@@ -16000,7 +15898,6 @@ test_get_link_info(void)
}
/* Create several external links */
- ext_objname = "/";
if (H5Lcreate_external(ext_link_filename, ext_objname, subgroup_id,
GET_LINK_INFO_TEST_EXT_LINK_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
@@ -16070,7 +15967,7 @@ test_get_link_info(void)
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 0, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get external link info for index %lld\n", 0);
+ HDprintf(" couldn't get external link info for index %d\n", 0);
PART_ERROR(H5Lget_info_by_idx_external_crt_order_increasing);
}
@@ -16083,7 +15980,7 @@ test_get_link_info(void)
link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_objname) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link's value size '%lld' did not match expected value '%lld'\n",
+ HDprintf(" link's value size '%lld' did not match expected value '%zu'\n",
(long long)link_info.u.val_size, link_val_size);
PART_ERROR(H5Lget_info_by_idx_external_crt_order_increasing);
}
@@ -16099,7 +15996,7 @@ test_get_link_info(void)
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 1, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get external link info for index %lld\n", 1);
+ HDprintf(" couldn't get external link info for index %d\n", 1);
PART_ERROR(H5Lget_info_by_idx_external_crt_order_increasing);
}
@@ -16112,7 +16009,7 @@ test_get_link_info(void)
link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_objname) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link's value size '%lld' did not match expected value '%lld'\n",
+ HDprintf(" link's value size '%lld' did not match expected value '%zu'\n",
(long long)link_info.u.val_size, link_val_size);
PART_ERROR(H5Lget_info_by_idx_external_crt_order_increasing);
}
@@ -16128,7 +16025,7 @@ test_get_link_info(void)
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 2, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get external link info for index %lld\n", 2);
+ HDprintf(" couldn't get external link info for index %d\n", 2);
PART_ERROR(H5Lget_info_by_idx_external_crt_order_increasing);
}
@@ -16141,7 +16038,7 @@ test_get_link_info(void)
link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_objname) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link's value size '%lld' did not match expected value '%lld'\n",
+ HDprintf(" link's value size '%lld' did not match expected value '%zu'\n",
(long long)link_info.u.val_size, link_val_size);
PART_ERROR(H5Lget_info_by_idx_external_crt_order_increasing);
}
@@ -16160,10 +16057,6 @@ test_get_link_info(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Lget_info_by_idx_external_crt_order_increasing);
-#endif
}
PART_END(H5Lget_info_by_idx_external_crt_order_increasing);
@@ -16179,7 +16072,13 @@ test_get_link_info(void)
PART_BEGIN(H5Lget_info_by_idx_external_crt_order_decreasing)
{
TESTING_2("H5Lget_info_by_idx2 on external link by creation order in decreasing order");
-#ifndef NO_EXTERNAL_LINKS
+
+ 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(H5Lget_info_by_idx_external_crt_order_decreasing);
+ }
+
HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
EXTERNAL_LINK_TEST_FILE_NAME);
@@ -16203,7 +16102,6 @@ test_get_link_info(void)
}
/* Create several external links */
- ext_objname = "/";
if (H5Lcreate_external(ext_link_filename, ext_objname, subgroup_id,
GET_LINK_INFO_TEST_EXT_LINK_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
@@ -16273,7 +16171,7 @@ test_get_link_info(void)
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 2, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get external link info for index %lld\n", 2);
+ HDprintf(" couldn't get external link info for index %d\n", 2);
PART_ERROR(H5Lget_info_by_idx_external_crt_order_decreasing);
}
@@ -16286,7 +16184,7 @@ test_get_link_info(void)
link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_objname) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link's value size '%lld' did not match expected value '%lld'\n",
+ HDprintf(" link's value size '%lld' did not match expected value '%zu'\n",
(long long)link_info.u.val_size, link_val_size);
PART_ERROR(H5Lget_info_by_idx_external_crt_order_decreasing);
}
@@ -16302,7 +16200,7 @@ test_get_link_info(void)
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 1, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get external link info for index %lld\n", 1);
+ HDprintf(" couldn't get external link info for index %d\n", 1);
PART_ERROR(H5Lget_info_by_idx_external_crt_order_decreasing);
}
@@ -16315,7 +16213,7 @@ test_get_link_info(void)
link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_objname) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link's value size '%lld' did not match expected value '%lld'\n",
+ HDprintf(" link's value size '%lld' did not match expected value '%zu'\n",
(long long)link_info.u.val_size, link_val_size);
PART_ERROR(H5Lget_info_by_idx_external_crt_order_decreasing);
}
@@ -16331,7 +16229,7 @@ test_get_link_info(void)
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, 0, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get external link info for index %lld\n", 0);
+ HDprintf(" couldn't get external link info for index %d\n", 0);
PART_ERROR(H5Lget_info_by_idx_external_crt_order_decreasing);
}
@@ -16344,7 +16242,7 @@ test_get_link_info(void)
link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_objname) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link's value size '%lld' did not match expected value '%lld'\n",
+ HDprintf(" link's value size '%lld' did not match expected value '%zu'\n",
(long long)link_info.u.val_size, link_val_size);
PART_ERROR(H5Lget_info_by_idx_external_crt_order_decreasing);
}
@@ -16363,10 +16261,6 @@ test_get_link_info(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Lget_info_by_idx_external_crt_order_decreasing);
-#endif
}
PART_END(H5Lget_info_by_idx_external_crt_order_decreasing);
@@ -16382,7 +16276,7 @@ test_get_link_info(void)
PART_BEGIN(H5Lget_info_by_idx_external_name_order_increasing)
{
TESTING_2("H5Lget_info_by_idx2 on external link by alphabetical order in increasing order");
-#ifndef NO_EXTERNAL_LINKS
+
HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
EXTERNAL_LINK_TEST_FILE_NAME);
@@ -16406,7 +16300,6 @@ test_get_link_info(void)
}
/* Create several external links */
- ext_objname = "/";
if (H5Lcreate_external(ext_link_filename, ext_objname, subgroup_id,
GET_LINK_INFO_TEST_EXT_LINK_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
@@ -16476,7 +16369,7 @@ test_get_link_info(void)
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 0, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get external link info for index %lld\n", 0);
+ HDprintf(" couldn't get external link info for index %d\n", 0);
PART_ERROR(H5Lget_info_by_idx_external_name_order_increasing);
}
@@ -16489,23 +16382,25 @@ test_get_link_info(void)
link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_objname) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link's value size '%lld' did not match expected value '%lld'\n",
+ HDprintf(" link's value size '%lld' did not match expected value '%zu'\n",
(long long)link_info.u.val_size, link_val_size);
PART_ERROR(H5Lget_info_by_idx_external_name_order_increasing);
}
- if (link_info.corder_valid && (link_info.corder != 0)) {
- H5_FAILED();
- HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)link_info.corder, (long long)0);
- PART_ERROR(H5Lget_info_by_idx_external_name_order_increasing);
+ if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
+ if (link_info.corder_valid && (link_info.corder != 0)) {
+ H5_FAILED();
+ HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)link_info.corder, (long long)0);
+ PART_ERROR(H5Lget_info_by_idx_external_name_order_increasing);
+ }
}
HDmemset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 1, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get external link info for index %lld\n", 1);
+ HDprintf(" couldn't get external link info for index %d\n", 1);
PART_ERROR(H5Lget_info_by_idx_external_name_order_increasing);
}
@@ -16518,23 +16413,25 @@ test_get_link_info(void)
link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_objname) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link's value size '%lld' did not match expected value '%lld'\n",
+ HDprintf(" link's value size '%lld' did not match expected value '%zu'\n",
(long long)link_info.u.val_size, link_val_size);
PART_ERROR(H5Lget_info_by_idx_external_name_order_increasing);
}
- if (link_info.corder_valid && (link_info.corder != 1)) {
- H5_FAILED();
- HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)link_info.corder, (long long)1);
- PART_ERROR(H5Lget_info_by_idx_external_name_order_increasing);
+ if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
+ if (link_info.corder_valid && (link_info.corder != 1)) {
+ H5_FAILED();
+ HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)link_info.corder, (long long)1);
+ PART_ERROR(H5Lget_info_by_idx_external_name_order_increasing);
+ }
}
HDmemset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_INC, 2, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get external link info for index %lld\n", 2);
+ HDprintf(" couldn't get external link info for index %d\n", 2);
PART_ERROR(H5Lget_info_by_idx_external_name_order_increasing);
}
@@ -16547,16 +16444,18 @@ test_get_link_info(void)
link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_objname) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link's value size '%lld' did not match expected value '%lld'\n",
+ HDprintf(" link's value size '%lld' did not match expected value '%zu'\n",
(long long)link_info.u.val_size, link_val_size);
PART_ERROR(H5Lget_info_by_idx_external_name_order_increasing);
}
- if (link_info.corder_valid && (link_info.corder != 2)) {
- H5_FAILED();
- HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)link_info.corder, (long long)2);
- PART_ERROR(H5Lget_info_by_idx_external_name_order_increasing);
+ if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
+ if (link_info.corder_valid && (link_info.corder != 2)) {
+ H5_FAILED();
+ HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)link_info.corder, (long long)2);
+ PART_ERROR(H5Lget_info_by_idx_external_name_order_increasing);
+ }
}
if (H5Gclose(subgroup_id) < 0) {
@@ -16566,10 +16465,6 @@ test_get_link_info(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Lget_info_by_idx_external_name_order_increasing);
-#endif
}
PART_END(H5Lget_info_by_idx_external_name_order_increasing);
@@ -16585,7 +16480,7 @@ test_get_link_info(void)
PART_BEGIN(H5Lget_info_by_idx_external_name_order_decreasing)
{
TESTING_2("H5Lget_info_by_idx2 on external link by alphabetical order in decreasing order");
-#ifndef NO_DECREASING_ALPHA_ITER_ORDER
+
HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
EXTERNAL_LINK_TEST_FILE_NAME);
@@ -16609,7 +16504,6 @@ test_get_link_info(void)
}
/* Create several external links */
- ext_objname = "/";
if (H5Lcreate_external(ext_link_filename, ext_objname, subgroup_id,
GET_LINK_INFO_TEST_EXT_LINK_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
@@ -16679,7 +16573,7 @@ test_get_link_info(void)
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 2, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get external link info for index %lld\n", 2);
+ HDprintf(" couldn't get external link info for index %d\n", 2);
PART_ERROR(H5Lget_info_by_idx_external_name_order_decreasing);
}
@@ -16692,23 +16586,25 @@ test_get_link_info(void)
link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_objname) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link's value size '%lld' did not match expected value '%lld'\n",
+ HDprintf(" link's value size '%lld' did not match expected value '%zu'\n",
(long long)link_info.u.val_size, link_val_size);
PART_ERROR(H5Lget_info_by_idx_external_name_order_decreasing);
}
- if (link_info.corder_valid && (link_info.corder != 0)) {
- H5_FAILED();
- HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)link_info.corder, (long long)0);
- PART_ERROR(H5Lget_info_by_idx_external_name_order_decreasing);
+ if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
+ if (link_info.corder_valid && (link_info.corder != 0)) {
+ H5_FAILED();
+ HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)link_info.corder, (long long)0);
+ PART_ERROR(H5Lget_info_by_idx_external_name_order_decreasing);
+ }
}
HDmemset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 1, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get external link info for index %lld\n", 1);
+ HDprintf(" couldn't get external link info for index %d\n", 1);
PART_ERROR(H5Lget_info_by_idx_external_name_order_decreasing);
}
@@ -16721,23 +16617,25 @@ test_get_link_info(void)
link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_objname) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link's value size '%lld' did not match expected value '%lld'\n",
+ HDprintf(" link's value size '%lld' did not match expected value '%zu'\n",
(long long)link_info.u.val_size, link_val_size);
PART_ERROR(H5Lget_info_by_idx_external_name_order_decreasing);
}
- if (link_info.corder_valid && (link_info.corder != 1)) {
- H5_FAILED();
- HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)link_info.corder, (long long)1);
- PART_ERROR(H5Lget_info_by_idx_external_name_order_decreasing);
+ if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
+ if (link_info.corder_valid && (link_info.corder != 1)) {
+ H5_FAILED();
+ HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)link_info.corder, (long long)1);
+ PART_ERROR(H5Lget_info_by_idx_external_name_order_decreasing);
+ }
}
HDmemset(&link_info, 0, sizeof(link_info));
if (H5Lget_info_by_idx2(subgroup_id, ".", H5_INDEX_NAME, H5_ITER_DEC, 0, &link_info,
H5P_DEFAULT) < 0) {
H5_FAILED();
- HDprintf(" couldn't get external link info for index %lld\n", 0);
+ HDprintf(" couldn't get external link info for index %d\n", 0);
PART_ERROR(H5Lget_info_by_idx_external_name_order_decreasing);
}
@@ -16750,16 +16648,18 @@ test_get_link_info(void)
link_val_size = 1 + strlen(ext_link_filename) + 1 + strlen(ext_objname) + 1;
if (link_info.u.val_size != link_val_size) {
H5_FAILED();
- HDprintf(" link's value size '%lld' did not match expected value '%lld'\n",
+ HDprintf(" link's value size '%lld' did not match expected value '%zu'\n",
(long long)link_info.u.val_size, link_val_size);
PART_ERROR(H5Lget_info_by_idx_external_name_order_decreasing);
}
- if (link_info.corder_valid && (link_info.corder != 2)) {
- H5_FAILED();
- HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
- (long long)link_info.corder, (long long)2);
- PART_ERROR(H5Lget_info_by_idx_external_name_order_decreasing);
+ if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
+ if (link_info.corder_valid && (link_info.corder != 2)) {
+ H5_FAILED();
+ HDprintf(" link's creation order value '%lld' did not match expected value '%lld'\n",
+ (long long)link_info.corder, (long long)2);
+ PART_ERROR(H5Lget_info_by_idx_external_name_order_decreasing);
+ }
}
if (H5Gclose(subgroup_id) < 0) {
@@ -16769,10 +16669,6 @@ test_get_link_info(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Lget_info_by_idx_external_name_order_decreasing);
-#endif
}
PART_END(H5Lget_info_by_idx_external_name_order_decreasing);
@@ -16900,10 +16796,10 @@ test_get_link_info_invalid_params(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_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_MORE) ||
- !(vol_cap_flags_g & H5VL_CAP_FLAG_HARD_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
+ !(vol_cap_flags_g & H5VL_CAP_FLAG_HARD_LINKS)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, basic, more, soft, hard, external link, or "
- "creation order aren't supported with this connector\n");
+ HDprintf(" API functions for basic file, group, link, or hard link "
+ "aren't supported with this connector\n");
return 0;
}
@@ -16927,12 +16823,6 @@ test_get_link_info_invalid_params(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 ((group_id = H5Gcreate2(container_group, GET_LINK_INFO_INVALID_PARAMS_TEST_GROUP_NAME, H5P_DEFAULT,
gcpl_id, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -17051,8 +16941,8 @@ test_get_link_info_invalid_params(void)
H5E_BEGIN_TRY
{
- err_ret = H5Lget_info_by_idx2(H5I_INVALID_HID, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 0,
- &link_info, H5P_DEFAULT);
+ err_ret = H5Lget_info_by_idx2(H5I_INVALID_HID, ".", H5_INDEX_NAME, H5_ITER_INC, 0, &link_info,
+ H5P_DEFAULT);
}
H5E_END_TRY;
@@ -17072,7 +16962,7 @@ test_get_link_info_invalid_params(void)
H5E_BEGIN_TRY
{
- err_ret = H5Lget_info_by_idx2(group_id, NULL, H5_INDEX_CRT_ORDER, H5_ITER_INC, 0, &link_info,
+ err_ret = H5Lget_info_by_idx2(group_id, NULL, H5_INDEX_NAME, H5_ITER_INC, 0, &link_info,
H5P_DEFAULT);
}
H5E_END_TRY;
@@ -17085,8 +16975,8 @@ test_get_link_info_invalid_params(void)
H5E_BEGIN_TRY
{
- err_ret = H5Lget_info_by_idx2(group_id, "", H5_INDEX_CRT_ORDER, H5_ITER_INC, 0, &link_info,
- H5P_DEFAULT);
+ err_ret =
+ H5Lget_info_by_idx2(group_id, "", H5_INDEX_NAME, H5_ITER_INC, 0, &link_info, H5P_DEFAULT);
}
H5E_END_TRY;
@@ -17140,8 +17030,8 @@ test_get_link_info_invalid_params(void)
H5E_BEGIN_TRY
{
- err_ret = H5Lget_info_by_idx2(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_UNKNOWN, 0,
- &link_info, H5P_DEFAULT);
+ err_ret = H5Lget_info_by_idx2(group_id, ".", H5_INDEX_NAME, H5_ITER_UNKNOWN, 0, &link_info,
+ H5P_DEFAULT);
}
H5E_END_TRY;
@@ -17154,8 +17044,8 @@ test_get_link_info_invalid_params(void)
H5E_BEGIN_TRY
{
- err_ret = H5Lget_info_by_idx2(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_N, 0, &link_info,
- H5P_DEFAULT);
+ err_ret =
+ H5Lget_info_by_idx2(group_id, ".", H5_INDEX_NAME, H5_ITER_N, 0, &link_info, H5P_DEFAULT);
}
H5E_END_TRY;
@@ -17175,7 +17065,7 @@ test_get_link_info_invalid_params(void)
H5E_BEGIN_TRY
{
- err_ret = H5Lget_info_by_idx2(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, 0, &link_info,
+ err_ret = H5Lget_info_by_idx2(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, 0, &link_info,
H5I_INVALID_HID);
}
H5E_END_TRY;
@@ -17234,9 +17124,7 @@ test_get_link_name(void)
hid_t subgroup_id = H5I_INVALID_HID;
hid_t gcpl_id = H5I_INVALID_HID;
char link_name_buf[GET_LINK_NAME_TEST_BUF_SIZE];
-#ifndef NO_EXTERNAL_LINKS
- char ext_link_filename[H5_API_TEST_FILENAME_MAX_LENGTH];
-#endif
+ char ext_link_filename[H5_API_TEST_FILENAME_MAX_LENGTH];
TESTING_MULTIPART("link name retrieval");
@@ -17244,10 +17132,10 @@ test_get_link_name(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_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_MORE) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_HARD_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) ||
- !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
+ !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, basic, more, soft, hard, external link, or "
- "creation order aren't supported with this connector\n");
+ HDprintf(" API functions for basic file, group, link, soft link, hard link, or external link "
+ "aren't supported with this connector\n");
return 0;
}
@@ -17271,10 +17159,12 @@ test_get_link_name(void)
goto error;
}
- if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) {
- H5_FAILED();
- HDprintf(" couldn't set link creation order tracking\n");
- goto error;
+ if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
+ if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) {
+ H5_FAILED();
+ HDprintf(" couldn't set link creation order tracking\n");
+ goto error;
+ }
}
if ((group_id = H5Gcreate2(container_group, GET_LINK_NAME_TEST_GROUP_NAME, H5P_DEFAULT, gcpl_id,
@@ -17292,6 +17182,12 @@ test_get_link_name(void)
{
TESTING_2("H5Lget_name_by_idx on hard link 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(H5Lget_name_by_idx_hard_crt_order_increasing);
+ }
+
/* Create group to hold some links */
if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_NAME_TEST_HARD_SUBGROUP_NAME, H5P_DEFAULT,
gcpl_id, H5P_DEFAULT)) < 0) {
@@ -17454,6 +17350,12 @@ test_get_link_name(void)
{
TESTING_2("H5Lget_name_by_idx on hard link 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(H5Lget_name_by_idx_hard_crt_order_decreasing);
+ }
+
/* Create group to hold some links */
if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_NAME_TEST_HARD_SUBGROUP_NAME2, H5P_DEFAULT,
gcpl_id, H5P_DEFAULT)) < 0) {
@@ -17777,7 +17679,7 @@ test_get_link_name(void)
PART_BEGIN(H5Lget_name_by_idx_hard_name_order_decreasing)
{
TESTING_2("H5Lget_name_by_idx on hard link by alphabetical order in decreasing order");
-#ifndef NO_DECREASING_ALPHA_ITER_ORDER
+
/* Create group to hold some links */
if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_NAME_TEST_HARD_SUBGROUP_NAME4, H5P_DEFAULT,
gcpl_id, H5P_DEFAULT)) < 0) {
@@ -17926,10 +17828,6 @@ test_get_link_name(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Lget_name_by_idx_hard_name_order_decreasing);
-#endif
}
PART_END(H5Lget_name_by_idx_hard_name_order_decreasing);
@@ -17944,6 +17842,12 @@ test_get_link_name(void)
{
TESTING_2("H5Lget_name_by_idx on soft link 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(H5Lget_name_by_idx_soft_crt_order_increasing);
+ }
+
/* Create group to hold some links */
if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_NAME_TEST_SOFT_SUBGROUP_NAME, H5P_DEFAULT,
gcpl_id, H5P_DEFAULT)) < 0) {
@@ -18106,6 +18010,12 @@ test_get_link_name(void)
{
TESTING_2("H5Lget_name_by_idx on soft link 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(H5Lget_name_by_idx_soft_crt_order_decreasing);
+ }
+
/* Create group to hold some links */
if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_NAME_TEST_SOFT_SUBGROUP_NAME2, H5P_DEFAULT,
gcpl_id, H5P_DEFAULT)) < 0) {
@@ -18429,7 +18339,7 @@ test_get_link_name(void)
PART_BEGIN(H5Lget_name_by_idx_soft_name_order_decreasing)
{
TESTING_2("H5Lget_name_by_idx on soft link by alphabetical order in decreasing order");
-#ifndef NO_DECREASING_ALPHA_ITER_ORDER
+
/* Create group to hold some links */
if ((subgroup_id = H5Gcreate2(group_id, GET_LINK_NAME_TEST_SOFT_SUBGROUP_NAME4, H5P_DEFAULT,
gcpl_id, H5P_DEFAULT)) < 0) {
@@ -18578,10 +18488,6 @@ test_get_link_name(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Lget_name_by_idx_soft_name_order_decreasing);
-#endif
}
PART_END(H5Lget_name_by_idx_soft_name_order_decreasing);
@@ -18595,7 +18501,13 @@ test_get_link_name(void)
PART_BEGIN(H5Lget_name_by_idx_external_crt_order_increasing)
{
TESTING_2("H5Lget_name_by_idx on external link by creation order in increasing order");
-#ifndef NO_EXTERNAL_LINKS
+
+ 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(H5Lget_name_by_idx_external_crt_order_increasing);
+ }
+
/* Create file for external link to reference */
HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
EXTERNAL_LINK_TEST_FILE_NAME);
@@ -18763,10 +18675,6 @@ test_get_link_name(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Lget_name_by_idx_external_crt_order_increasing);
-#endif
}
PART_END(H5Lget_name_by_idx_external_crt_order_increasing);
@@ -18782,7 +18690,13 @@ test_get_link_name(void)
PART_BEGIN(H5Lget_name_by_idx_external_crt_order_decreasing)
{
TESTING_2("H5Lget_name_by_idx on external link by creation order in decreasing order");
-#ifndef NO_EXTERNAL_LINKS
+
+ 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(H5Lget_name_by_idx_external_crt_order_decreasing);
+ }
+
/* Create file for external link to reference */
HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
EXTERNAL_LINK_TEST_FILE_NAME);
@@ -18950,10 +18864,6 @@ test_get_link_name(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Lget_name_by_idx_external_crt_order_decreasing);
-#endif
}
PART_END(H5Lget_name_by_idx_external_crt_order_decreasing);
@@ -18969,7 +18879,7 @@ test_get_link_name(void)
PART_BEGIN(H5Lget_name_by_idx_external_name_order_increasing)
{
TESTING_2("H5Lget_name_by_idx on external link by alphabetical order in increasing order");
-#ifndef NO_EXTERNAL_LINKS
+
/* Create file for external link to reference */
HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
EXTERNAL_LINK_TEST_FILE_NAME);
@@ -19137,10 +19047,6 @@ test_get_link_name(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Lget_name_by_idx_external_name_order_increasing);
-#endif
}
PART_END(H5Lget_name_by_idx_external_name_order_increasing);
@@ -19156,7 +19062,7 @@ test_get_link_name(void)
PART_BEGIN(H5Lget_name_by_idx_external_name_order_decreasing)
{
TESTING_2("H5Lget_name_by_idx on external link by alphabetical order in decreasing order");
-#ifndef NO_DECREASING_ALPHA_ITER_ORDER
+
/* Create file for external link to reference */
HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s",
EXTERNAL_LINK_TEST_FILE_NAME);
@@ -19324,10 +19230,6 @@ test_get_link_name(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Lget_name_by_idx_external_name_order_decreasing);
-#endif
}
PART_END(H5Lget_name_by_idx_external_name_order_decreasing);
@@ -19455,8 +19357,9 @@ test_get_link_name_invalid_params(void)
htri_t link_exists;
size_t link_name_buf_size = 0;
hid_t file_id = H5I_INVALID_HID;
- hid_t container_group = H5I_INVALID_HID, group_id = H5I_INVALID_HID;
- char *link_name_buf = NULL;
+ hid_t container_group = H5I_INVALID_HID;
+ hid_t group_id = H5I_INVALID_HID;
+ char *link_name_buf = NULL;
TESTING_MULTIPART("link name retrieval with invalid parameters");
@@ -19464,10 +19367,10 @@ test_get_link_name_invalid_params(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_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_MORE) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_HARD_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) ||
- !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
+ !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, basic, more, soft, hard, external link, or "
- "creation order aren't supported with this connector\n");
+ HDprintf(" API functions for basic file, group, link, soft link, hard link, or external link "
+ "aren't supported with this connector\n");
return 0;
}
@@ -19732,10 +19635,10 @@ test_link_iterate_hard_links(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_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) ||
- !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE) || !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
+ !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, dataset, link, or iterate aren't supported with "
- "this connector\n");
+ HDprintf(" API functions for basic file, group, dataset, link, or iterate aren't "
+ "supported with this connector\n");
return 0;
}
@@ -19759,10 +19662,12 @@ test_link_iterate_hard_links(void)
goto error;
}
- if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) {
- H5_FAILED();
- HDprintf(" couldn't set link creation order tracking\n");
- goto error;
+ if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
+ if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) {
+ H5_FAILED();
+ HDprintf(" couldn't set link creation order tracking\n");
+ goto error;
+ }
}
if ((group_id = H5Gcreate2(container_group, LINK_ITER_HARD_LINKS_TEST_SUBGROUP_NAME, H5P_DEFAULT, gcpl_id,
@@ -19850,7 +19755,7 @@ test_link_iterate_hard_links(void)
PART_BEGIN(H5Literate_link_name_decreasing)
{
TESTING_2("H5Literate2 by link name in decreasing order");
-#ifndef NO_DECREASING_ALPHA_ITER_ORDER
+
/* Reset the counter to the appropriate value for the next test */
i = LINK_ITER_HARD_LINKS_TEST_NUM_LINKS;
@@ -19867,10 +19772,6 @@ test_link_iterate_hard_links(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Literate_link_name_decreasing);
-#endif
}
PART_END(H5Literate_link_name_decreasing);
@@ -19878,6 +19779,12 @@ test_link_iterate_hard_links(void)
{
TESTING_2("H5Literate2 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(H5Literate_link_creation_increasing);
+ }
+
/* Reset the counter to the appropriate value for the next test */
i = 2 * LINK_ITER_HARD_LINKS_TEST_NUM_LINKS;
@@ -19902,6 +19809,12 @@ test_link_iterate_hard_links(void)
{
TESTING_2("H5Literate2 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(H5Literate_link_creation_decreasing);
+ }
+
/* Reset the counter to the appropriate value for the next test */
i = 3 * LINK_ITER_HARD_LINKS_TEST_NUM_LINKS;
@@ -19950,7 +19863,7 @@ test_link_iterate_hard_links(void)
PART_BEGIN(H5Literate_by_name_link_name_decreasing)
{
TESTING_2("H5Literate_by_name2 by link name in decreasing order");
-#ifndef NO_DECREASING_ALPHA_ITER_ORDER
+
/* Reset the counter to the appropriate value for the next test */
i = LINK_ITER_HARD_LINKS_TEST_NUM_LINKS;
@@ -19969,10 +19882,6 @@ test_link_iterate_hard_links(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Literate_by_name_link_name_decreasing);
-#endif
}
PART_END(H5Literate_by_name_link_name_decreasing);
@@ -19980,6 +19889,12 @@ test_link_iterate_hard_links(void)
{
TESTING_2("H5Literate_by_name2 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(H5Literate_by_name_creation_increasing);
+ }
+
/* Reset the counter to the appropriate value for the next test */
i = 2 * LINK_ITER_HARD_LINKS_TEST_NUM_LINKS;
@@ -20005,6 +19920,12 @@ test_link_iterate_hard_links(void)
{
TESTING_2("H5Literate_by_name2 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(H5Literate_by_name_creation_decreasing);
+ }
+
/* Reset the counter to the appropriate value for the next test */
i = 3 * LINK_ITER_HARD_LINKS_TEST_NUM_LINKS;
@@ -20084,10 +20005,10 @@ test_link_iterate_soft_links(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_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS) ||
- !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE) || !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
+ !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, link, or iterate aren't supported with this "
- "connector\n");
+ HDprintf(" API functions for basic file, group, link, soft link, or iterate "
+ "aren't supported with this connector\n");
return 0;
}
@@ -20111,10 +20032,12 @@ test_link_iterate_soft_links(void)
goto error;
}
- if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) {
- H5_FAILED();
- HDprintf(" couldn't set link creation order tracking\n");
- goto error;
+ if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
+ if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) {
+ H5_FAILED();
+ HDprintf(" couldn't set link creation order tracking\n");
+ goto error;
+ }
}
if ((group_id = H5Gcreate2(container_group, LINK_ITER_SOFT_LINKS_TEST_SUBGROUP_NAME, H5P_DEFAULT, gcpl_id,
@@ -20192,7 +20115,7 @@ test_link_iterate_soft_links(void)
PART_BEGIN(H5Literate_link_name_decreasing)
{
TESTING_2("H5Literate2 by link name in decreasing order");
-#ifndef NO_DECREASING_ALPHA_ITER_ORDER
+
/* Reset the counter to the appropriate value for the next test */
i = LINK_ITER_SOFT_LINKS_TEST_NUM_LINKS;
@@ -20209,10 +20132,6 @@ test_link_iterate_soft_links(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Literate_link_name_decreasing);
-#endif
}
PART_END(H5Literate_link_name_decreasing);
@@ -20220,6 +20139,12 @@ test_link_iterate_soft_links(void)
{
TESTING_2("H5Literate2 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(H5Literate_link_creation_increasing);
+ }
+
/* Reset the counter to the appropriate value for the next test */
i = 2 * LINK_ITER_SOFT_LINKS_TEST_NUM_LINKS;
@@ -20244,6 +20169,12 @@ test_link_iterate_soft_links(void)
{
TESTING_2("H5Literate2 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(H5Literate_link_creation_decreasing);
+ }
+
/* Reset the counter to the appropriate value for the next test */
i = 3 * LINK_ITER_SOFT_LINKS_TEST_NUM_LINKS;
@@ -20292,7 +20223,7 @@ test_link_iterate_soft_links(void)
PART_BEGIN(H5Literate_by_name_link_name_decreasing)
{
TESTING_2("H5Literate_by_name2 by link name in decreasing order");
-#ifndef NO_DECREASING_ALPHA_ITER_ORDER
+
/* Reset the counter to the appropriate value for the next test */
i = LINK_ITER_SOFT_LINKS_TEST_NUM_LINKS;
@@ -20311,10 +20242,6 @@ test_link_iterate_soft_links(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Literate_by_name_link_name_decreasing);
-#endif
}
PART_END(H5Literate_by_name_link_name_decreasing);
@@ -20322,6 +20249,12 @@ test_link_iterate_soft_links(void)
{
TESTING_2("H5Literate_by_name2 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(H5Literate_by_name_creation_increasing);
+ }
+
/* Reset the counter to the appropriate value for the next test */
i = 2 * LINK_ITER_SOFT_LINKS_TEST_NUM_LINKS;
@@ -20347,6 +20280,12 @@ test_link_iterate_soft_links(void)
{
TESTING_2("H5Literate_by_name2 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(H5Literate_by_name_creation_decreasing);
+ }
+
/* Reset the counter to the appropriate value for the next test */
i = 3 * LINK_ITER_SOFT_LINKS_TEST_NUM_LINKS;
@@ -20408,28 +20347,25 @@ error:
static int
test_link_iterate_external_links(void)
{
-#ifndef NO_EXTERNAL_LINKS
size_t i;
htri_t link_exists;
hid_t file_id = H5I_INVALID_HID;
hid_t container_group = H5I_INVALID_HID, group_id = H5I_INVALID_HID;
hid_t gcpl_id = H5I_INVALID_HID;
char ext_link_filename[H5_API_TEST_FILENAME_MAX_LENGTH];
-#endif
TESTING_MULTIPART("link iteration (only external links)");
/* 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_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) ||
- !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE) || !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
+ !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, link, or iterate aren't supported with this "
- "connector\n");
+ HDprintf(" API functions for basic file, group, link, external link, or iterate "
+ "aren't supported with this connector\n");
return 0;
}
-#ifndef NO_EXTERNAL_LINKS
TESTING_2("test setup");
HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
@@ -20461,10 +20397,12 @@ test_link_iterate_external_links(void)
goto error;
}
- if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) {
- H5_FAILED();
- HDprintf(" couldn't set link creation order tracking\n");
- goto error;
+ if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
+ if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) {
+ H5_FAILED();
+ HDprintf(" couldn't set link creation order tracking\n");
+ goto error;
+ }
}
if ((group_id = H5Gcreate2(container_group, LINK_ITER_EXT_LINKS_TEST_SUBGROUP_NAME, H5P_DEFAULT, gcpl_id,
@@ -20539,7 +20477,7 @@ test_link_iterate_external_links(void)
PART_BEGIN(H5Literate_link_name_decreasing)
{
TESTING_2("H5Literate2 by link name in decreasing order");
-#ifndef NO_DECREASING_ALPHA_ITER_ORDER
+
/* Reset the counter to the appropriate value for the next test */
i = LINK_ITER_EXT_LINKS_TEST_NUM_LINKS;
@@ -20557,10 +20495,6 @@ test_link_iterate_external_links(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Literate_link_name_decreasing);
-#endif
}
PART_END(H5Literate_link_name_decreasing);
@@ -20568,6 +20502,12 @@ test_link_iterate_external_links(void)
{
TESTING_2("H5Literate2 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(H5Literate_link_creation_increasing);
+ }
+
/* Reset the counter to the appropriate value for the next test */
i = 2 * LINK_ITER_EXT_LINKS_TEST_NUM_LINKS;
@@ -20592,6 +20532,12 @@ test_link_iterate_external_links(void)
{
TESTING_2("H5Literate2 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(H5Literate_link_creation_decreasing);
+ }
+
/* Reset the counter to the appropriate value for the next test */
i = 3 * LINK_ITER_EXT_LINKS_TEST_NUM_LINKS;
@@ -20640,7 +20586,7 @@ test_link_iterate_external_links(void)
PART_BEGIN(H5Literate_by_name_link_name_decreasing)
{
TESTING_2("H5Literate_by_name2 by link name in decreasing order");
-#ifndef NO_DECREASING_ALPHA_ITER_ORDER
+
/* Reset the counter to the appropriate value for the next test */
i = LINK_ITER_EXT_LINKS_TEST_NUM_LINKS;
@@ -20659,10 +20605,6 @@ test_link_iterate_external_links(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Literate_by_name_link_name_decreasing);
-#endif
}
PART_END(H5Literate_by_name_link_name_decreasing);
@@ -20670,6 +20612,12 @@ test_link_iterate_external_links(void)
{
TESTING_2("H5Literate_by_name2 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(H5Literate_by_name_creation_increasing);
+ }
+
/* Reset the counter to the appropriate value for the next test */
i = 2 * LINK_ITER_EXT_LINKS_TEST_NUM_LINKS;
@@ -20696,6 +20644,12 @@ test_link_iterate_external_links(void)
{
TESTING_2("H5Literate_by_name2 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(H5Literate_by_name_creation_decreasing);
+ }
+
/* Reset the counter to the appropriate value for the next test */
i = 3 * LINK_ITER_EXT_LINKS_TEST_NUM_LINKS;
@@ -20746,10 +20700,6 @@ error:
H5E_END_TRY;
return 1;
-#else
- SKIPPED();
- return 0;
-#endif
}
/*
@@ -20789,7 +20739,6 @@ test_link_iterate_ud_links(void)
static int
test_link_iterate_mixed_links(void)
{
-#if !defined(NO_EXTERNAL_LINKS) && !defined(NO_USER_DEFINED_LINKS)
hsize_t saved_idx;
size_t i;
htri_t link_exists;
@@ -20801,22 +20750,19 @@ test_link_iterate_mixed_links(void)
hid_t dset_dspace = H5I_INVALID_HID;
int halted;
char ext_link_filename[H5_API_TEST_FILENAME_MAX_LENGTH];
-#endif
TESTING_MULTIPART("link iteration (mixed link types)");
/* 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_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) ||
- !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE) ||
- !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
+ !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, link, soft or external link, iterate, or creation "
- "order aren't supported with this connector\n");
+ HDprintf(" API functions for basic file, group, link, soft link, external link, or iterate "
+ "aren't supported with this connector\n");
return 0;
}
-#if !defined(NO_EXTERNAL_LINKS) && !defined(NO_USER_DEFINED_LINKS)
TESTING_2("test setup");
HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
@@ -20848,10 +20794,12 @@ test_link_iterate_mixed_links(void)
goto error;
}
- if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) {
- H5_FAILED();
- HDprintf(" couldn't set link creation order tracking\n");
- goto error;
+ if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
+ if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) {
+ H5_FAILED();
+ HDprintf(" couldn't set link creation order tracking\n");
+ goto error;
+ }
}
if ((group_id = H5Gcreate2(container_group, LINK_ITER_MIXED_LINKS_TEST_SUBGROUP_NAME, H5P_DEFAULT,
@@ -20964,7 +20912,7 @@ test_link_iterate_mixed_links(void)
PART_BEGIN(H5Literate_link_name_decreasing)
{
TESTING_2("H5Literate2 by link name in decreasing order");
-#ifndef NO_DECREASING_ALPHA_ITER_ORDER
+
/* Reset the counter to the appropriate value for the next test */
i = LINK_ITER_MIXED_LINKS_TEST_NUM_LINKS;
@@ -20981,10 +20929,6 @@ test_link_iterate_mixed_links(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Literate_link_name_decreasing);
-#endif
}
PART_END(H5Literate_link_name_decreasing);
@@ -20992,6 +20936,12 @@ test_link_iterate_mixed_links(void)
{
TESTING_2("H5Literate2 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(H5Literate_link_creation_increasing);
+ }
+
/* Reset the counter to the appropriate value for the next test */
i = 2 * LINK_ITER_MIXED_LINKS_TEST_NUM_LINKS;
@@ -21016,6 +20966,12 @@ test_link_iterate_mixed_links(void)
{
TESTING_2("H5Literate2 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(H5Literate_link_creation_decreasing);
+ }
+
/* Reset the counter to the appropriate value for the next test */
i = 3 * LINK_ITER_MIXED_LINKS_TEST_NUM_LINKS;
@@ -21063,7 +21019,7 @@ test_link_iterate_mixed_links(void)
PART_BEGIN(H5Literate_by_name_link_name_decreasing)
{
TESTING_2("H5Literate_by_name2 by link name in decreasing order");
-#ifndef NO_DECREASING_ALPHA_ITER_ORDER
+
/* Reset the counter to the appropriate value for the next test */
i = LINK_ITER_MIXED_LINKS_TEST_NUM_LINKS;
@@ -21082,10 +21038,6 @@ test_link_iterate_mixed_links(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Literate_by_name_link_name_decreasing);
-#endif
}
PART_END(H5Literate_by_name_link_name_decreasing);
@@ -21093,6 +21045,12 @@ test_link_iterate_mixed_links(void)
{
TESTING_2("H5Literate_by_name2 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(H5Literate_by_name_creation_increasing);
+ }
+
/* Reset the counter to the appropriate value for the next test */
i = 2 * LINK_ITER_MIXED_LINKS_TEST_NUM_LINKS;
@@ -21118,6 +21076,12 @@ test_link_iterate_mixed_links(void)
{
TESTING_2("H5Literate_by_name2 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(H5Literate_by_name_creation_decreasing);
+ }
+
/* Reset the counter to the appropriate value for the next test */
i = 3 * LINK_ITER_MIXED_LINKS_TEST_NUM_LINKS;
@@ -21143,6 +21107,12 @@ test_link_iterate_mixed_links(void)
{
TESTING_2("H5Literate2 index-saving capabilities 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(H5Literate_index_saving_increasing);
+ }
+
/* Test the H5Literate2 index-saving capabilities */
saved_idx = 0;
halted = 0;
@@ -21170,11 +21140,17 @@ test_link_iterate_mixed_links(void)
PASSED();
}
PART_END(H5Literate_index_saving_increasing);
-
+#ifdef BROKEN
PART_BEGIN(H5Literate_index_saving_decreasing)
{
TESTING_2("H5Literate2 index-saving capabilities 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(H5Literate_index_saving_decreasing);
+ }
+
saved_idx = LINK_ITER_MIXED_LINKS_TEST_NUM_LINKS - 1;
halted = 0;
@@ -21201,6 +21177,7 @@ test_link_iterate_mixed_links(void)
PASSED();
}
PART_END(H5Literate_index_saving_decreasing);
+#endif
}
END_MULTIPART;
@@ -21239,10 +21216,6 @@ error:
H5E_END_TRY;
return 1;
-#else
- SKIPPED();
- return 0;
-#endif
}
/*
@@ -21256,11 +21229,11 @@ test_link_iterate_invalid_params(void)
size_t i;
htri_t link_exists;
hid_t file_id = H5I_INVALID_HID;
- hid_t container_group = H5I_INVALID_HID, group_id = H5I_INVALID_HID;
- hid_t gcpl_id = H5I_INVALID_HID;
- hid_t dset_id = H5I_INVALID_HID;
- hid_t dset_dtype = H5I_INVALID_HID;
- hid_t dset_dspace = H5I_INVALID_HID;
+ hid_t container_group = H5I_INVALID_HID;
+ hid_t group_id = H5I_INVALID_HID;
+ hid_t dset_id = H5I_INVALID_HID;
+ hid_t dset_dtype = H5I_INVALID_HID;
+ hid_t dset_dspace = H5I_INVALID_HID;
char ext_link_filename[H5_API_TEST_FILENAME_MAX_LENGTH];
TESTING_MULTIPART("link iteration with invalid parameters");
@@ -21269,11 +21242,11 @@ test_link_iterate_invalid_params(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_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE) ||
- !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) ||
- !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
+ !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, dataset, link, soft or external link, iterate, or "
- "creation order aren't supported with this connector\n");
+ HDprintf(
+ " API functions for basic file, group, dataset, link, soft link, external link, or iterate "
+ "aren't supported with this connector\n");
return 0;
}
@@ -21302,20 +21275,8 @@ test_link_iterate_invalid_params(void)
goto error;
}
- if ((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0) {
- H5_FAILED();
- HDprintf(" couldn't create GCPL for link creation order tracking\n");
- goto error;
- }
-
- if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) {
- H5_FAILED();
- HDprintf(" couldn't set link creation order tracking\n");
- goto error;
- }
-
if ((group_id = H5Gcreate2(container_group, LINK_ITER_INVALID_PARAMS_TEST_SUBGROUP_NAME, H5P_DEFAULT,
- gcpl_id, H5P_DEFAULT)) < 0) {
+ H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5_FAILED();
HDprintf(" couldn't create container subgroup '%s'\n",
LINK_ITER_INVALID_PARAMS_TEST_SUBGROUP_NAME);
@@ -21344,14 +21305,12 @@ test_link_iterate_invalid_params(void)
HDprintf(" couldn't create soft link '%s'\n", LINK_ITER_INVALID_PARAMS_TEST_SOFT_LINK_NAME);
goto error;
}
-#ifndef NO_EXTERNAL_LINKS
if (H5Lcreate_external(ext_link_filename, "/", group_id, LINK_ITER_INVALID_PARAMS_TEST_EXT_LINK_NAME,
H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
HDprintf(" couldn't create external link '%s'\n", LINK_ITER_INVALID_PARAMS_TEST_EXT_LINK_NAME);
goto error;
}
-#endif
/* Verify the links have been created */
if ((link_exists = H5Lexists(group_id, LINK_ITER_INVALID_PARAMS_TEST_HARD_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
@@ -21378,7 +21337,6 @@ test_link_iterate_invalid_params(void)
HDprintf(" second link did not exist\n");
goto error;
}
-#ifndef NO_EXTERNAL_LINKS
if ((link_exists = H5Lexists(group_id, LINK_ITER_INVALID_PARAMS_TEST_EXT_LINK_NAME, H5P_DEFAULT)) < 0) {
H5_FAILED();
HDprintf(" couldn't determine if link '%s' exists\n", LINK_ITER_INVALID_PARAMS_TEST_EXT_LINK_NAME);
@@ -21390,7 +21348,6 @@ test_link_iterate_invalid_params(void)
HDprintf(" third link did not exist\n");
goto error;
}
-#endif
PASSED();
@@ -21648,8 +21605,6 @@ test_link_iterate_invalid_params(void)
TEST_ERROR;
if (H5Dclose(dset_id) < 0)
TEST_ERROR;
- if (H5Pclose(gcpl_id) < 0)
- TEST_ERROR;
if (H5Gclose(group_id) < 0)
TEST_ERROR;
if (H5Gclose(container_group) < 0)
@@ -21667,7 +21622,6 @@ error:
H5Sclose(dset_dspace);
H5Tclose(dset_dtype);
H5Dclose(dset_id);
- H5Pclose(gcpl_id);
H5Gclose(group_id);
H5Gclose(container_group);
H5Fclose(file_id);
@@ -21692,9 +21646,9 @@ test_link_iterate_0_links(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_ITERATE) || !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
+ !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, link iterate, or creation order aren't supported "
+ HDprintf(" API functions for basic file, group, or iterate aren't supported "
"with this connector\n");
return 0;
}
@@ -21719,10 +21673,12 @@ test_link_iterate_0_links(void)
goto error;
}
- if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) {
- H5_FAILED();
- HDprintf(" couldn't set link creation order tracking\n");
- goto error;
+ if (vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) {
+ if (H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0) {
+ H5_FAILED();
+ HDprintf(" couldn't set link creation order tracking\n");
+ goto error;
+ }
}
if ((group_id = H5Gcreate2(container_group, LINK_ITER_0_LINKS_TEST_SUBGROUP_NAME, H5P_DEFAULT, gcpl_id,
@@ -21754,7 +21710,7 @@ test_link_iterate_0_links(void)
PART_BEGIN(H5Literate_0_links_name_decreasing)
{
TESTING_2("H5Literate2 by link name in decreasing order");
-#ifndef NO_DECREASING_ALPHA_ITER_ORDER
+
if (H5Literate2(group_id, H5_INDEX_NAME, H5_ITER_DEC, NULL, link_iter_0_links_cb, NULL) < 0) {
H5_FAILED();
HDprintf(" H5Literate2 by index type name in decreasing order failed\n");
@@ -21762,10 +21718,6 @@ test_link_iterate_0_links(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Literate_0_links_name_decreasing);
-#endif
}
PART_END(H5Literate_0_links_name_decreasing);
@@ -21773,6 +21725,12 @@ test_link_iterate_0_links(void)
{
TESTING_2("H5Literate2 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(H5Literate_0_links_creation_increasing);
+ }
+
if (H5Literate2(group_id, H5_INDEX_CRT_ORDER, H5_ITER_INC, NULL, link_iter_0_links_cb, NULL) <
0) {
H5_FAILED();
@@ -21788,6 +21746,12 @@ test_link_iterate_0_links(void)
{
TESTING_2("H5Literate2 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(H5Literate_0_links_creation_decreasing);
+ }
+
if (H5Literate2(group_id, H5_INDEX_CRT_ORDER, H5_ITER_DEC, NULL, link_iter_0_links_cb, NULL) <
0) {
H5_FAILED();
@@ -21818,7 +21782,7 @@ test_link_iterate_0_links(void)
PART_BEGIN(H5Literate_by_name_0_links_name_decreasing)
{
TESTING_2("H5Literate_by_name2 by link name in decreasing order");
-#ifndef NO_DECREASING_ALPHA_ITER_ORDER
+
if (H5Literate_by_name2(
file_id, "/" LINK_TEST_GROUP_NAME "/" LINK_ITER_0_LINKS_TEST_SUBGROUP_NAME, H5_INDEX_NAME,
H5_ITER_DEC, NULL, link_iter_0_links_cb, NULL, H5P_DEFAULT) < 0) {
@@ -21828,10 +21792,6 @@ test_link_iterate_0_links(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Literate_by_name_0_links_name_decreasing);
-#endif
}
PART_END(H5Literate_by_name_0_links_name_decreasing);
@@ -21839,6 +21799,12 @@ test_link_iterate_0_links(void)
{
TESTING_2("H5Literate_by_name2 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(H5Literate_by_name_0_links_creation_increasing);
+ }
+
if (H5Literate_by_name2(
file_id, "/" LINK_TEST_GROUP_NAME "/" LINK_ITER_0_LINKS_TEST_SUBGROUP_NAME,
H5_INDEX_CRT_ORDER, H5_ITER_INC, NULL, link_iter_0_links_cb, NULL, H5P_DEFAULT) < 0) {
@@ -21855,6 +21821,12 @@ test_link_iterate_0_links(void)
{
TESTING_2("H5Literate_by_name2 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(H5Literate_by_name_0_links_creation_decreasing);
+ }
+
if (H5Literate_by_name2(
file_id, "/" LINK_TEST_GROUP_NAME "/" LINK_ITER_0_LINKS_TEST_SUBGROUP_NAME,
H5_INDEX_CRT_ORDER, H5_ITER_DEC, NULL, link_iter_0_links_cb, NULL, H5P_DEFAULT) < 0) {
@@ -21922,11 +21894,10 @@ test_link_visit_hard_links_no_cycles(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_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE) ||
- !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
+ !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, link iterate, or creation order aren't supported "
- "with this connector\n");
+ HDprintf(" API functions for basic file, group, dataset, or link iterate aren't "
+ "supported with this connector\n");
return 0;
}
@@ -21950,10 +21921,12 @@ test_link_visit_hard_links_no_cycles(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 ((group_id = H5Gcreate2(container_group, LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME,
@@ -22064,7 +22037,7 @@ test_link_visit_hard_links_no_cycles(void)
PART_BEGIN(H5Lvisit_no_cycles_link_name_decreasing)
{
TESTING_2("H5Lvisit2 by link name in decreasing order");
-#ifndef NO_DECREASING_ALPHA_ITER_ORDER
+
/* Reset the counter to the appropriate value for the next test */
i = LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_TEST;
@@ -22081,10 +22054,6 @@ test_link_visit_hard_links_no_cycles(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Lvisit_no_cycles_link_name_decreasing);
-#endif
}
PART_END(H5Lvisit_no_cycles_link_name_decreasing);
@@ -22092,6 +22061,12 @@ test_link_visit_hard_links_no_cycles(void)
{
TESTING_2("H5Lvisit2 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(H5Lvisit_no_cycles_link_creation_increasing);
+ }
+
/* Reset the counter to the appropriate value for the next test */
i = 2 * LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_TEST;
@@ -22116,6 +22091,12 @@ test_link_visit_hard_links_no_cycles(void)
{
TESTING_2("H5Lvisit2 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(H5Lvisit_no_cycles_link_creation_decreasing);
+ }
+
/* Reset the counter to the appropriate value for the next test */
i = 3 * LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_TEST;
@@ -22164,7 +22145,7 @@ test_link_visit_hard_links_no_cycles(void)
PART_BEGIN(H5Lvisit_by_name_no_cycles_link_name_decreasing)
{
TESTING_2("H5Lvisit_by_name2 by link name in decreasing order");
-#ifndef NO_DECREASING_ALPHA_ITER_ORDER
+
/* Reset the counter to the appropriate value for the next test */
i = LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_TEST;
@@ -22183,10 +22164,6 @@ test_link_visit_hard_links_no_cycles(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Lvisit_by_name_no_cycles_link_name_decreasing);
-#endif
}
PART_END(H5Lvisit_by_name_no_cycles_link_name_decreasing);
@@ -22194,6 +22171,12 @@ test_link_visit_hard_links_no_cycles(void)
{
TESTING_2("H5Lvisit_by_name2 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(H5Lvisit_by_name_no_cycles_link_creation_increasing);
+ }
+
/* Reset the counter to the appropriate value for the next test */
i = 2 * LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_TEST;
@@ -22220,6 +22203,12 @@ test_link_visit_hard_links_no_cycles(void)
{
TESTING_2("H5Lvisit_by_name2 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(H5Lvisit_by_name_no_cycles_link_creation_decreasing);
+ }
+
/* Reset the counter to the appropriate value for the next test */
i = 3 * LINK_VISIT_HARD_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_TEST;
@@ -22303,9 +22292,9 @@ test_link_visit_soft_links_no_cycles(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_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS) ||
- !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE) || !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
+ !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, link, soft link, iterate, or creation order "
+ HDprintf(" API functions for basic file, group, link, soft link, or iterate "
"aren't supported with this connector\n");
return 0;
}
@@ -22330,10 +22319,12 @@ test_link_visit_soft_links_no_cycles(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 ((group_id = H5Gcreate2(container_group, LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME,
@@ -22434,7 +22425,7 @@ test_link_visit_soft_links_no_cycles(void)
PART_BEGIN(H5Lvisit_no_cycles_link_name_decreasing)
{
TESTING_2("H5Lvisit2 by link name in decreasing order");
-#ifndef NO_DECREASING_ALPHA_ITER_ORDER
+
/* Reset the counter to the appropriate value for the next test */
i = LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_TEST;
@@ -22451,10 +22442,6 @@ test_link_visit_soft_links_no_cycles(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Lvisit_no_cycles_link_name_decreasing);
-#endif
}
PART_END(H5Lvisit_no_cycles_link_name_decreasing);
@@ -22462,6 +22449,12 @@ test_link_visit_soft_links_no_cycles(void)
{
TESTING_2("H5Lvisit2 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(H5Lvisit_no_cycles_link_creation_increasing);
+ }
+
/* Reset the counter to the appropriate value for the next test */
i = 2 * LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_TEST;
@@ -22486,6 +22479,12 @@ test_link_visit_soft_links_no_cycles(void)
{
TESTING_2("H5Lvisit2 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(H5Lvisit_no_cycles_link_creation_decreasing);
+ }
+
/* Reset the counter to the appropriate value for the next test */
i = 3 * LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_TEST;
@@ -22533,7 +22532,7 @@ test_link_visit_soft_links_no_cycles(void)
PART_BEGIN(H5Lvisit_by_name_no_cycles_link_name_decreasing)
{
TESTING_2("H5Lvisit_by_name2 by link name in decreasing order");
-#ifndef NO_DECREASING_ALPHA_ITER_ORDER
+
/* Reset the counter to the appropriate value for the next test */
i = LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_TEST;
@@ -22552,10 +22551,6 @@ test_link_visit_soft_links_no_cycles(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Lvisit_by_name_no_cycles_link_name_decreasing);
-#endif
}
PART_END(H5Lvisit_by_name_no_cycles_link_name_decreasing);
@@ -22563,6 +22558,12 @@ test_link_visit_soft_links_no_cycles(void)
{
TESTING_2("H5Lvisit_by_name2 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(H5Lvisit_by_name_no_cycles_link_creation_increasing);
+ }
+
/* Reset the counter to the appropriate value for the next test */
i = 2 * LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_TEST;
@@ -22589,6 +22590,12 @@ test_link_visit_soft_links_no_cycles(void)
{
TESTING_2("H5Lvisit_by_name2 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(H5Lvisit_by_name_no_cycles_link_creation_decreasing);
+ }
+
/* Reset the counter to the appropriate value for the next test */
i = 3 * LINK_VISIT_SOFT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_TEST;
@@ -22653,7 +22660,6 @@ error:
static int
test_link_visit_external_links_no_cycles(void)
{
-#ifndef NO_EXTERNAL_LINKS
size_t i;
htri_t link_exists;
hid_t file_id = H5I_INVALID_HID;
@@ -22661,21 +22667,19 @@ test_link_visit_external_links_no_cycles(void)
hid_t subgroup_id = H5I_INVALID_HID;
hid_t gcpl_id = H5I_INVALID_HID;
char ext_link_filename[H5_API_TEST_FILENAME_MAX_LENGTH];
-#endif
TESTING_MULTIPART("link visiting without cycles (only external links)");
/* 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_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) ||
- !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE) || !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
+ !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, link, external link, iterate, or creation order "
+ HDprintf(" API functions for basic file, group, link, external link, or iterate "
"aren't supported with this connector\n");
return 0;
}
-#ifndef NO_EXTERNAL_LINKS
TESTING_2("test setup");
HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
@@ -22707,10 +22711,12 @@ test_link_visit_external_links_no_cycles(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 ((group_id = H5Gcreate2(container_group, LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME, H5P_DEFAULT,
@@ -22809,7 +22815,7 @@ test_link_visit_external_links_no_cycles(void)
PART_BEGIN(H5Lvisit_no_cycles_link_name_decreasing)
{
TESTING_2("H5Lvisit2 by link name in decreasing order");
-#ifndef NO_DECREASING_ALPHA_ITER_ORDER
+
/* Reset the counter to the appropriate value for the next test */
i = LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_TEST;
@@ -22827,10 +22833,6 @@ test_link_visit_external_links_no_cycles(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Lvisit_no_cycles_link_name_decreasing);
-#endif
}
PART_END(H5Lvisit_no_cycles_link_name_decreasing);
@@ -22838,6 +22840,12 @@ test_link_visit_external_links_no_cycles(void)
{
TESTING_2("H5Lvisit2 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(H5Lvisit_no_cycles_link_creation_increasing);
+ }
+
/* Reset the counter to the appropriate value for the next test */
i = 2 * LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_TEST;
@@ -22862,6 +22870,12 @@ test_link_visit_external_links_no_cycles(void)
{
TESTING_2("H5Lvisit2 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(H5Lvisit_no_cycles_link_creation_decreasing);
+ }
+
/* Reset the counter to the appropriate value for the next test */
i = 3 * LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_TEST;
@@ -22911,7 +22925,7 @@ test_link_visit_external_links_no_cycles(void)
PART_BEGIN(H5Lvisit_by_name_no_cycles_link_name_decreasing)
{
TESTING_2("H5Lvisit_by_name2 by link name in decreasing order");
-#ifndef NO_DECREASING_ALPHA_ITER_ORDER
+
/* Reset the counter to the appropriate value for the next test */
i = LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_TEST;
@@ -22931,10 +22945,6 @@ test_link_visit_external_links_no_cycles(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Lvisit_by_name_no_cycles_link_name_decreasing);
-#endif
}
PART_END(H5Lvisit_by_name_no_cycles_link_name_decreasing);
@@ -22942,6 +22952,12 @@ test_link_visit_external_links_no_cycles(void)
{
TESTING_2("H5Lvisit_by_name2 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(H5Lvisit_by_name_no_cycles_link_creation_increasing);
+ }
+
/* Reset the counter to the appropriate value for the next test */
i = 2 * LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_TEST;
@@ -22968,6 +22984,12 @@ test_link_visit_external_links_no_cycles(void)
{
TESTING_2("H5Lvisit_by_name2 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(H5Lvisit_by_name_no_cycles_link_creation_decreasing);
+ }
+
/* Reset the counter to the appropriate value for the next test */
i = 3 * LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_NUM_LINKS_PER_TEST;
@@ -23019,10 +23041,6 @@ error:
H5E_END_TRY;
return 1;
-#else
- SKIPPED();
- return 0;
-#endif
}
/*
@@ -23064,7 +23082,6 @@ test_link_visit_ud_links_no_cycles(void)
static int
test_link_visit_mixed_links_no_cycles(void)
{
-#if !defined(NO_EXTERNAL_LINKS) && !defined(NO_USER_DEFINED_LINKS)
size_t i;
htri_t link_exists;
hid_t file_id = H5I_INVALID_HID;
@@ -23075,7 +23092,6 @@ test_link_visit_mixed_links_no_cycles(void)
hid_t dset_dtype = H5I_INVALID_HID;
hid_t fspace_id = H5I_INVALID_HID;
char ext_link_filename[H5_API_TEST_FILENAME_MAX_LENGTH];
-#endif
TESTING_MULTIPART("link visiting without cycles (mixed link types)");
@@ -23084,14 +23100,14 @@ test_link_visit_mixed_links_no_cycles(void)
!(vol_cap_flags_g & H5VL_CAP_FLAG_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_HARD_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE) ||
- !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
+ !(vol_cap_flags_g & H5VL_CAP_FLAG_UD_LINKS)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, link, hard, soft, external link, iterate, or "
- "creation order aren't supported with this connector\n");
+ HDprintf(
+ " API functions for basic file, group, link, hard link, soft link, external link, or iterate "
+ "aren't supported with this connector\n");
return 0;
}
-#if !defined(NO_EXTERNAL_LINKS) && !defined(NO_USER_DEFINED_LINKS)
TESTING_2("test setup");
HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
@@ -23123,10 +23139,12 @@ test_link_visit_mixed_links_no_cycles(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 ((group_id = H5Gcreate2(container_group, LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_SUBGROUP_NAME,
@@ -23302,7 +23320,7 @@ test_link_visit_mixed_links_no_cycles(void)
PART_BEGIN(H5Lvisit_no_cycles_link_name_decreasing)
{
TESTING_2("H5Lvisit2 by link name in decreasing order");
-#ifndef NO_DECREASING_ALPHA_ITER_ORDER
+
/* Reset the counter to the appropriate value for the next test */
i = LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_NUM_LINKS;
@@ -23320,10 +23338,6 @@ test_link_visit_mixed_links_no_cycles(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Lvisit_no_cycles_link_name_decreasing);
-#endif
}
PART_END(H5Lvisit_no_cycles_link_name_decreasing);
@@ -23331,6 +23345,12 @@ test_link_visit_mixed_links_no_cycles(void)
{
TESTING_2("H5Lvisit2 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(H5Lvisit_no_cycles_link_creation_increasing);
+ }
+
/* Reset the counter to the appropriate value for the next test */
i = 2 * LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_NUM_LINKS;
@@ -23355,6 +23375,12 @@ test_link_visit_mixed_links_no_cycles(void)
{
TESTING_2("H5Lvisit2 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(H5Lvisit_no_cycles_link_creation_decreasing);
+ }
+
/* Reset the counter to the appropriate value for the next test */
i = 3 * LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_NUM_LINKS;
@@ -23402,7 +23428,7 @@ test_link_visit_mixed_links_no_cycles(void)
PART_BEGIN(H5Lvisit_by_name_no_cycles_link_name_decreasing)
{
TESTING_2("H5Lvisit_by_name2 by link name in decreasing order");
-#ifndef NO_DECREASING_ALPHA_ITER_ORDER
+
/* Reset the counter to the appropriate value for the next test */
i = LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_NUM_LINKS;
@@ -23421,10 +23447,6 @@ test_link_visit_mixed_links_no_cycles(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Lvisit_by_name_no_cycles_link_name_decreasing);
-#endif
}
PART_END(H5Lvisit_by_name_no_cycles_link_name_decreasing);
@@ -23432,6 +23454,12 @@ test_link_visit_mixed_links_no_cycles(void)
{
TESTING_2("H5Lvisit_by_name2 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(H5Lvisit_by_name_no_cycles_link_creation_increasing);
+ }
+
/* Reset the counter to the appropriate value for the next test */
i = 2 * LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_NUM_LINKS;
@@ -23458,6 +23486,12 @@ test_link_visit_mixed_links_no_cycles(void)
{
TESTING_2("H5Lvisit_by_name2 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(H5Lvisit_by_name_no_cycles_link_creation_decreasing);
+ }
+
/* Reset the counter to the appropriate value for the next test */
i = 3 * LINK_VISIT_MIXED_LINKS_NO_CYCLE_TEST_NUM_LINKS;
@@ -23521,10 +23555,6 @@ error:
H5E_END_TRY;
return 1;
-#else
- SKIPPED();
- return 0;
-#endif
}
/*
@@ -23549,9 +23579,9 @@ test_link_visit_hard_links_cycles(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_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_HARD_LINKS) ||
- !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE) || !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
+ !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, link, hard link, iterate, or creation order "
+ HDprintf(" API functions for basic file, group, link, hard link, or iterate "
"aren't supported with this connector\n");
return 0;
}
@@ -23576,10 +23606,12 @@ test_link_visit_hard_links_cycles(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 ((group_id = H5Gcreate2(container_group, LINK_VISIT_HARD_LINKS_CYCLE_TEST_SUBGROUP_NAME, H5P_DEFAULT,
@@ -23676,7 +23708,7 @@ test_link_visit_hard_links_cycles(void)
PART_BEGIN(H5Lvisit_cycles_link_name_decreasing)
{
TESTING_2("H5Lvisit2 by link name in decreasing order");
-#ifndef NO_DECREASING_ALPHA_ITER_ORDER
+
/* Reset the counter to the appropriate value for the next test */
i = LINK_VISIT_HARD_LINKS_CYCLE_TEST_NUM_LINKS_PER_TEST;
@@ -23693,10 +23725,6 @@ test_link_visit_hard_links_cycles(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Lvisit_cycles_link_name_decreasing);
-#endif
}
PART_END(H5Lvisit_cycles_link_name_decreasing);
@@ -23704,6 +23732,12 @@ test_link_visit_hard_links_cycles(void)
{
TESTING_2("H5Lvisit2 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(H5Lvisit_cycles_link_creation_increasing);
+ }
+
/* Reset the counter to the appropriate value for the next test */
i = 2 * LINK_VISIT_HARD_LINKS_CYCLE_TEST_NUM_LINKS_PER_TEST;
@@ -23728,6 +23762,12 @@ test_link_visit_hard_links_cycles(void)
{
TESTING_2("H5Lvisit2 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(H5Lvisit_cycles_link_creation_decreasing);
+ }
+
/* Reset the counter to the appropriate value for the next test */
i = 3 * LINK_VISIT_HARD_LINKS_CYCLE_TEST_NUM_LINKS_PER_TEST;
@@ -23775,7 +23815,7 @@ test_link_visit_hard_links_cycles(void)
PART_BEGIN(H5Lvisit_by_name_cycles_link_name_decreasing)
{
TESTING_2("H5Lvisit_by_name2 by link name in decreasing order");
-#ifndef NO_DECREASING_ALPHA_ITER_ORDER
+
/* Reset the counter to the appropriate value for the next test */
i = LINK_VISIT_HARD_LINKS_CYCLE_TEST_NUM_LINKS_PER_TEST;
@@ -23794,10 +23834,6 @@ test_link_visit_hard_links_cycles(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Lvisit_by_name_cycles_link_name_decreasing);
-#endif
}
PART_END(H5Lvisit_by_name_cycles_link_name_decreasing);
@@ -23805,6 +23841,12 @@ test_link_visit_hard_links_cycles(void)
{
TESTING_2("H5Lvisit_by_name2 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(H5Lvisit_by_name_cycles_link_creation_increasing);
+ }
+
/* Reset the counter to the appropriate value for the next test */
i = 2 * LINK_VISIT_HARD_LINKS_CYCLE_TEST_NUM_LINKS_PER_TEST;
@@ -23830,6 +23872,12 @@ test_link_visit_hard_links_cycles(void)
{
TESTING_2("H5Lvisit_by_name2 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(H5Lvisit_by_name_cycles_link_creation_decreasing);
+ }
+
/* Reset the counter to the appropriate value for the next test */
i = 3 * LINK_VISIT_HARD_LINKS_CYCLE_TEST_NUM_LINKS_PER_TEST;
@@ -23904,9 +23952,9 @@ test_link_visit_soft_links_cycles(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_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS) ||
- !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE) || !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
+ !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, link, soft link, iterate, or creation order "
+ HDprintf(" API functions for basic file, group, link, soft link, or iterate "
"aren't supported with this connector\n");
return 0;
}
@@ -23931,10 +23979,12 @@ test_link_visit_soft_links_cycles(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 ((group_id = H5Gcreate2(container_group, LINK_VISIT_SOFT_LINKS_CYCLE_TEST_SUBGROUP_NAME, H5P_DEFAULT,
@@ -24036,7 +24086,7 @@ test_link_visit_soft_links_cycles(void)
PART_BEGIN(H5Lvisit_cycles_link_name_decreasing)
{
TESTING_2("H5Lvisit2 by link name in decreasing order");
-#ifndef NO_DECREASING_ALPHA_ITER_ORDER
+
/* Reset the counter to the appropriate value for the next test */
i = LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NUM_LINKS_PER_TEST;
@@ -24053,10 +24103,6 @@ test_link_visit_soft_links_cycles(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Lvisit_cycles_link_name_decreasing);
-#endif
}
PART_END(H5Lvisit_cycles_link_name_decreasing);
@@ -24064,6 +24110,12 @@ test_link_visit_soft_links_cycles(void)
{
TESTING_2("H5Lvisit2 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(H5Lvisit_cycles_link_creation_increasing);
+ }
+
/* Reset the counter to the appropriate value for the next test */
i = 2 * LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NUM_LINKS_PER_TEST;
@@ -24088,6 +24140,12 @@ test_link_visit_soft_links_cycles(void)
{
TESTING_2("H5Lvisit2 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(H5Lvisit_cycles_link_creation_decreasing);
+ }
+
/* Reset the counter to the appropriate value for the next test */
i = 3 * LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NUM_LINKS_PER_TEST;
@@ -24136,7 +24194,7 @@ test_link_visit_soft_links_cycles(void)
PART_BEGIN(H5Lvisit_by_name_cycles_link_name_decreasing)
{
TESTING_2("H5Lvisit_by_name2 by link name in decreasing order");
-#ifndef NO_DECREASING_ALPHA_ITER_ORDER
+
/* Reset the counter to the appropriate value for the next test */
i = LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NUM_LINKS_PER_TEST;
@@ -24155,10 +24213,6 @@ test_link_visit_soft_links_cycles(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Lvisit_by_name_cycles_link_name_decreasing);
-#endif
}
PART_END(H5Lvisit_by_name_cycles_link_name_decreasing);
@@ -24166,6 +24220,12 @@ test_link_visit_soft_links_cycles(void)
{
TESTING_2("H5Lvisit_by_name2 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(H5Lvisit_by_name_cycles_link_creation_increasing);
+ }
+
/* Reset the counter to the appropriate value for the next test */
i = 2 * LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NUM_LINKS_PER_TEST;
@@ -24191,6 +24251,12 @@ test_link_visit_soft_links_cycles(void)
{
TESTING_2("H5Lvisit_by_name2 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(H5Lvisit_by_name_cycles_link_creation_decreasing);
+ }
+
/* Reset the counter to the appropriate value for the next test */
i = 3 * LINK_VISIT_SOFT_LINKS_CYCLE_TEST_NUM_LINKS_PER_TEST;
@@ -24254,28 +24320,25 @@ error:
static int
test_link_visit_external_links_cycles(void)
{
-#ifndef NO_EXTERNAL_LINKS
size_t i;
htri_t link_exists;
hid_t file_id = H5I_INVALID_HID;
hid_t container_group = H5I_INVALID_HID, group_id = H5I_INVALID_HID;
hid_t subgroup_id = H5I_INVALID_HID;
hid_t gcpl_id = H5I_INVALID_HID;
-#endif
TESTING_MULTIPART("link visiting with cycles (only external links)");
/* 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_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) ||
- !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE) || !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
+ !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, link, external link, iterate, or creation order "
+ HDprintf(" API functions for basic file, group, link, external link, or iterate "
"aren't supported with this connector\n");
return 0;
}
-#ifndef NO_EXTERNAL_LINKS
TESTING_2("test setup");
if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
@@ -24296,10 +24359,12 @@ test_link_visit_external_links_cycles(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 ((group_id = H5Gcreate2(container_group, LINK_VISIT_EXT_LINKS_CYCLE_TEST_SUBGROUP_NAME, H5P_DEFAULT,
@@ -24403,7 +24468,7 @@ test_link_visit_external_links_cycles(void)
PART_BEGIN(H5Lvisit_cycles_link_name_decreasing)
{
TESTING_2("H5Lvisit2 by link name in decreasing order");
-#ifndef NO_DECREASING_ALPHA_ITER_ORDER
+
/* Reset the counter to the appropriate value for the next test */
i = LINK_VISIT_EXT_LINKS_CYCLE_TEST_NUM_LINKS_PER_TEST;
@@ -24421,10 +24486,6 @@ test_link_visit_external_links_cycles(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Lvisit_cycles_link_name_decreasing);
-#endif
}
PART_END(H5Lvisit_cycles_link_name_decreasing);
@@ -24432,6 +24493,12 @@ test_link_visit_external_links_cycles(void)
{
TESTING_2("H5Lvisit2 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(H5Lvisit_cycles_link_creation_increasing);
+ }
+
/* Reset the counter to the appropriate value for the next test */
i = 2 * LINK_VISIT_EXT_LINKS_CYCLE_TEST_NUM_LINKS_PER_TEST;
@@ -24456,6 +24523,12 @@ test_link_visit_external_links_cycles(void)
{
TESTING_2("H5Lvisit2 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(H5Lvisit_cycles_link_creation_decreasing);
+ }
+
/* Reset the counter to the appropriate value for the next test */
i = 3 * LINK_VISIT_EXT_LINKS_CYCLE_TEST_NUM_LINKS_PER_TEST;
@@ -24504,7 +24577,7 @@ test_link_visit_external_links_cycles(void)
PART_BEGIN(H5Lvisit_by_name_cycles_link_name_decreasing)
{
TESTING_2("H5Lvisit_by_name2 by link name in decreasing order");
-#ifndef NO_DECREASING_ALPHA_ITER_ORDER
+
/* Reset the counter to the appropriate value for the next test */
i = LINK_VISIT_EXT_LINKS_CYCLE_TEST_NUM_LINKS_PER_TEST;
@@ -24523,10 +24596,6 @@ test_link_visit_external_links_cycles(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Lvisit_by_name_cycles_link_name_decreasing);
-#endif
}
PART_END(H5Lvisit_by_name_cycles_link_name_decreasing);
@@ -24534,6 +24603,12 @@ test_link_visit_external_links_cycles(void)
{
TESTING_2("H5Lvisit_by_name2 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(H5Lvisit_by_name_cycles_link_creation_increasing);
+ }
+
/* Reset the counter to the appropriate value for the next test */
i = 2 * LINK_VISIT_EXT_LINKS_CYCLE_TEST_NUM_LINKS_PER_TEST;
@@ -24560,6 +24635,12 @@ test_link_visit_external_links_cycles(void)
{
TESTING_2("H5Lvisit_by_name2 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(H5Lvisit_by_name_cycles_link_creation_decreasing);
+ }
+
/* Reset the counter to the appropriate value for the next test */
i = 3 * LINK_VISIT_EXT_LINKS_CYCLE_TEST_NUM_LINKS_PER_TEST;
@@ -24611,10 +24692,6 @@ error:
H5E_END_TRY;
return 1;
-#else
- SKIPPED();
- return 0;
-#endif
}
/*
@@ -24651,7 +24728,6 @@ test_link_visit_ud_links_cycles(void)
static int
test_link_visit_mixed_links_cycles(void)
{
-#if !defined(NO_EXTERNAL_LINKS) && !defined(NO_USER_DEFINED_LINKS)
htri_t link_exists;
size_t i;
hid_t file_id = H5I_INVALID_HID;
@@ -24659,7 +24735,6 @@ test_link_visit_mixed_links_cycles(void)
hid_t subgroup1 = H5I_INVALID_HID, subgroup2 = H5I_INVALID_HID;
hid_t gcpl_id = H5I_INVALID_HID;
char ext_link_filename[H5_API_TEST_FILENAME_MAX_LENGTH];
-#endif
TESTING_MULTIPART("link visiting with cycles (mixed link types)");
@@ -24667,14 +24742,14 @@ test_link_visit_mixed_links_cycles(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_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) ||
!(vol_cap_flags_g & H5VL_CAP_FLAG_HARD_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_SOFT_LINKS) ||
- !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE) || !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
+ !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE) || !(vol_cap_flags_g & H5VL_CAP_FLAG_UD_LINKS)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, link, hard, soft, external link, iterate, or "
- "creation order aren't supported with this connector\n");
+ HDprintf(
+ " API functions for basic file, group, link, hard link, soft link, external link, iterate, "
+ "or user defined link aren't supported with this connector\n");
return 0;
}
-#if !defined(NO_EXTERNAL_LINKS) && !defined(NO_USER_DEFINED_LINKS)
TESTING_2("test setup");
HDsnprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME);
@@ -24706,10 +24781,12 @@ test_link_visit_mixed_links_cycles(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 ((group_id = H5Gcreate2(container_group, LINK_VISIT_MIXED_LINKS_CYCLE_TEST_SUBGROUP_NAME, H5P_DEFAULT,
@@ -24855,7 +24932,7 @@ test_link_visit_mixed_links_cycles(void)
PART_BEGIN(H5Lvisit_cycles_link_name_decreasing)
{
TESTING_2("H5Lvisit2 by link name in decreasing order");
-#ifndef NO_DECREASING_ALPHA_ITER_ORDER
+
/* Reset the counter to the appropriate value for the next test */
i = LINK_VISIT_MIXED_LINKS_CYCLE_TEST_NUM_LINKS;
@@ -24872,10 +24949,6 @@ test_link_visit_mixed_links_cycles(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Lvisit_cycles_link_name_decreasing);
-#endif
}
PART_END(H5Lvisit_cycles_link_name_decreasing);
@@ -24883,6 +24956,12 @@ test_link_visit_mixed_links_cycles(void)
{
TESTING_2("H5Lvisit2 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(H5Lvisit_cycles_link_creation_increasing);
+ }
+
/* Reset the counter to the appropriate value for the next test */
i = 2 * LINK_VISIT_MIXED_LINKS_CYCLE_TEST_NUM_LINKS;
@@ -24907,6 +24986,12 @@ test_link_visit_mixed_links_cycles(void)
{
TESTING_2("H5Lvisit2 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(H5Lvisit_cycles_link_creation_decreasing);
+ }
+
/* Reset the counter to the appropriate value for the next test */
i = 3 * LINK_VISIT_MIXED_LINKS_CYCLE_TEST_NUM_LINKS;
@@ -24954,7 +25039,7 @@ test_link_visit_mixed_links_cycles(void)
PART_BEGIN(H5Lvisit_by_name_cycles_link_name_decreasing)
{
TESTING_2("H5Lvisit_by_name2 by link name in decreasing order");
-#ifndef NO_DECREASING_ALPHA_ITER_ORDER
+
/* Reset the counter to the appropriate value for the next test */
i = LINK_VISIT_MIXED_LINKS_CYCLE_TEST_NUM_LINKS;
@@ -24973,10 +25058,6 @@ test_link_visit_mixed_links_cycles(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Lvisit_by_name_cycles_link_name_decreasing);
-#endif
}
PART_END(H5Lvisit_by_name_cycles_link_name_decreasing);
@@ -24984,6 +25065,12 @@ test_link_visit_mixed_links_cycles(void)
{
TESTING_2("H5Lvisit_by_name2 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(H5Lvisit_by_name_cycles_link_creation_increasing);
+ }
+
/* Reset the counter to the appropriate value for the next test */
i = 2 * LINK_VISIT_MIXED_LINKS_CYCLE_TEST_NUM_LINKS;
@@ -25009,6 +25096,12 @@ test_link_visit_mixed_links_cycles(void)
{
TESTING_2("H5Lvisit_by_name2 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(H5Lvisit_by_name_cycles_link_creation_decreasing);
+ }
+
/* Reset the counter to the appropriate value for the next test */
i = 3 * LINK_VISIT_MIXED_LINKS_CYCLE_TEST_NUM_LINKS;
@@ -25064,10 +25157,6 @@ error:
H5E_END_TRY;
return 1;
-#else
- SKIPPED();
- return 0;
-#endif
}
/*
@@ -25092,11 +25181,10 @@ test_link_visit_invalid_params(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_LINK_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) ||
- !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE) ||
- !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
+ !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, dataset, link, external link, iterate, or "
- "creation order aren't supported with this connector\n");
+ HDprintf(" API functions for basic file, group, dataset, link, external link, or iterate "
+ "aren't supported with this connector\n");
return 0;
}
@@ -25185,14 +25273,12 @@ test_link_visit_invalid_params(void)
HDprintf(" couldn't create soft link '%s'\n", LINK_VISIT_INVALID_PARAMS_TEST_LINK_NAME2);
goto error;
}
-#ifndef NO_EXTERNAL_LINKS
if (H5Lcreate_external(ext_link_filename, "/", subgroup2, LINK_VISIT_INVALID_PARAMS_TEST_LINK_NAME3,
H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
HDprintf(" couldn't create external link '%s'\n", LINK_VISIT_INVALID_PARAMS_TEST_LINK_NAME3);
goto error;
}
-#endif
if (H5Lcreate_hard(subgroup2, LINK_VISIT_INVALID_PARAMS_TEST_DSET_NAME, subgroup2,
LINK_VISIT_INVALID_PARAMS_TEST_LINK_NAME4, H5P_DEFAULT, H5P_DEFAULT) < 0) {
H5_FAILED();
@@ -25226,7 +25312,7 @@ test_link_visit_invalid_params(void)
HDprintf(" link 2 did not exist\n");
goto error;
}
-#ifndef NO_EXTERNAL_LINKS
+
if ((link_exists = H5Lexists(subgroup2, LINK_VISIT_INVALID_PARAMS_TEST_LINK_NAME3, H5P_DEFAULT)) < 0) {
H5_FAILED();
HDprintf(" couldn't determine if third link '%s' exists\n",
@@ -25239,7 +25325,7 @@ test_link_visit_invalid_params(void)
HDprintf(" link 3 did not exist\n");
goto error;
}
-#endif
+
if ((link_exists = H5Lexists(subgroup2, LINK_VISIT_INVALID_PARAMS_TEST_LINK_NAME4, H5P_DEFAULT)) < 0) {
H5_FAILED();
HDprintf(" couldn't determine if fourth link '%s' exists\n",
@@ -25552,9 +25638,9 @@ test_link_visit_0_links(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_ITERATE) || !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) {
+ !(vol_cap_flags_g & H5VL_CAP_FLAG_ITERATE)) {
SKIPPED();
- HDprintf(" API functions for basic file, group, link iterate, or creation order aren't supported "
+ HDprintf(" API functions for basic file, group, or link iterate aren't supported "
"with this connector\n");
return 0;
}
@@ -25579,10 +25665,12 @@ test_link_visit_0_links(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 ((group_id = H5Gcreate2(container_group, LINK_VISIT_0_LINKS_TEST_SUBGROUP_NAME, H5P_DEFAULT, gcpl_id,
@@ -25613,7 +25701,7 @@ test_link_visit_0_links(void)
PART_BEGIN(H5Lvisit_0_links_name_decreasing)
{
TESTING_2("H5Lvisit2 by link name in decreasing order");
-#ifndef NO_DECREASING_ALPHA_ITER_ORDER
+
if (H5Lvisit2(group_id, H5_INDEX_NAME, H5_ITER_DEC, link_visit_0_links_cb, NULL) < 0) {
H5_FAILED();
HDprintf(" H5Lvisit2 by index type name in decreasing order failed\n");
@@ -25621,10 +25709,6 @@ test_link_visit_0_links(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Lvisit_0_links_name_decreasing);
-#endif
}
PART_END(H5Lvisit_0_links_name_decreasing);
@@ -25632,6 +25716,12 @@ test_link_visit_0_links(void)
{
TESTING_2("H5Lvisit2 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(H5Lvisit_0_links_creation_increasing);
+ }
+
if (H5Lvisit2(group_id, H5_INDEX_CRT_ORDER, H5_ITER_INC, link_visit_0_links_cb, NULL) < 0) {
H5_FAILED();
HDprintf(" H5Lvisit2 by index type creation order in increasing order failed\n");
@@ -25646,6 +25736,12 @@ test_link_visit_0_links(void)
{
TESTING_2("H5Lvisit2 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(H5Lvisit_0_links_creation_decreasing);
+ }
+
if (H5Lvisit2(group_id, H5_INDEX_CRT_ORDER, H5_ITER_DEC, link_visit_0_links_cb, NULL) < 0) {
H5_FAILED();
HDprintf(" H5Lvisit2 by index type creation order in decreasing order failed\n");
@@ -25674,7 +25770,7 @@ test_link_visit_0_links(void)
PART_BEGIN(H5Lvisit_by_name_0_links_name_decreasing)
{
TESTING_2("H5Lvisit_by_name2 by link name in decreasing order");
-#ifndef NO_DECREASING_ALPHA_ITER_ORDER
+
if (H5Lvisit_by_name2(file_id, "/" LINK_TEST_GROUP_NAME "/" LINK_VISIT_0_LINKS_TEST_SUBGROUP_NAME,
H5_INDEX_NAME, H5_ITER_DEC, link_visit_0_links_cb, NULL, H5P_DEFAULT) < 0) {
H5_FAILED();
@@ -25683,10 +25779,6 @@ test_link_visit_0_links(void)
}
PASSED();
-#else
- SKIPPED();
- PART_EMPTY(H5Lvisit_by_name_0_links_name_decreasing);
-#endif
}
PART_END(H5Lvisit_by_name_0_links_name_decreasing);
@@ -25694,6 +25786,12 @@ test_link_visit_0_links(void)
{
TESTING_2("H5Lvisit_by_name2 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(H5Lvisit_by_name_0_links_creation_increasing);
+ }
+
if (H5Lvisit_by_name2(file_id, "/" LINK_TEST_GROUP_NAME "/" LINK_VISIT_0_LINKS_TEST_SUBGROUP_NAME,
H5_INDEX_CRT_ORDER, H5_ITER_INC, link_visit_0_links_cb, NULL,
H5P_DEFAULT) < 0) {
@@ -25710,6 +25808,12 @@ test_link_visit_0_links(void)
{
TESTING_2("H5Lvisit_by_name2 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(H5Lvisit_by_name_0_links_creation_decreasing);
+ }
+
if (H5Lvisit_by_name2(file_id, "/" LINK_TEST_GROUP_NAME "/" LINK_VISIT_0_LINKS_TEST_SUBGROUP_NAME,
H5_INDEX_CRT_ORDER, H5_ITER_DEC, link_visit_0_links_cb, NULL,
H5P_DEFAULT) < 0) {
@@ -25877,7 +25981,6 @@ done:
* through all of the links in the test group and checks to make sure
* their names and link classes match what is expected.
*/
-#ifndef NO_EXTERNAL_LINKS
static herr_t
link_iter_external_links_cb(hid_t group_id, const char *name, const H5L_info2_t *info, void *op_data)
{
@@ -25887,6 +25990,13 @@ link_iter_external_links_cb(hid_t group_id, const char *name, const H5L_info2_t
char expected_link_name[LINK_ITER_EXT_LINKS_TEST_BUF_SIZE];
herr_t ret_val = H5_ITER_CONT;
+ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS)) {
+ SKIPPED();
+ HDprintf(" API functions for external links aren't supported with this "
+ "connector\n");
+ return 1;
+ }
+
UNUSED(group_id);
UNUSED(op_data);
@@ -25932,16 +26042,12 @@ done:
return ret_val;
}
-#endif
-#ifndef NO_USER_DEFINED_LINKS
-static herr_t link_iter_ud_links_cb(hid_t group_id, const char *name, const H5L_info2_t *info, void *op_data);
-#endif
+
/*
* Link iteration callback for the mixed link types test which iterates
* through all of the links in the test group and checks to make sure
* their names and link classes match what is expected.
*/
-#if !defined(NO_EXTERNAL_LINKS) && !defined(NO_USER_DEFINED_LINKS)
static herr_t
link_iter_mixed_links_cb(hid_t group_id, const char *name, const H5L_info2_t *info, void *op_data)
{
@@ -25949,6 +26055,13 @@ link_iter_mixed_links_cb(hid_t group_id, const char *name, const H5L_info2_t *in
size_t counter_val = *((size_t *)op_data);
herr_t ret_val = 0;
+ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_UD_LINKS)) {
+ SKIPPED();
+ HDprintf(" API functions for external or user-defined link aren't supported with this "
+ "connector\n");
+ return 1;
+ }
+
UNUSED(group_id);
if (!HDstrncmp(name, LINK_ITER_MIXED_LINKS_TEST_HARD_LINK_NAME,
@@ -25991,7 +26104,6 @@ done:
return ret_val;
}
-#endif
/*
* Link iteration callback for the H5Literate(_by_name)2 invalid
@@ -26027,12 +26139,18 @@ link_iter_0_links_cb(hid_t group_id, const char *name, const H5L_info2_t *info,
* Link iteration callback to test that the index-saving behavior of H5Literate2
* works correctly.
*/
-#if !defined(NO_EXTERNAL_LINKS) && !defined(NO_USER_DEFINED_LINKS)
static herr_t
link_iter_idx_saving_cb(hid_t group_id, const char *name, const H5L_info2_t *info, void *op_data)
{
int *broken = (int *)op_data;
+ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_UD_LINKS)) {
+ SKIPPED();
+ HDprintf(" API functions for external or user-defined link aren't supported with this "
+ "connector\n");
+ return 1;
+ }
+
UNUSED(group_id);
if (broken && !*broken &&
@@ -26076,7 +26194,6 @@ link_iter_idx_saving_cb(hid_t group_id, const char *name, const H5L_info2_t *inf
error:
return -1;
}
-#endif
/*
* Link visiting callback for the hard links + no cycles test which
@@ -26299,7 +26416,6 @@ done:
* iterates recursively through all of the links in the test group and
* checks to make sure their names and link classes match what is expected.
*/
-#ifndef NO_EXTERNAL_LINKS
static herr_t
link_visit_external_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_info2_t *info,
void *op_data)
@@ -26313,6 +26429,13 @@ link_visit_external_links_no_cycles_cb(hid_t group_id, const char *name, const H
char expected_link_name[LINK_VISIT_EXT_LINKS_NO_CYCLE_TEST_BUF_SIZE];
herr_t ret_val = H5_ITER_CONT;
+ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS)) {
+ SKIPPED();
+ HDprintf(" API functions for external links aren't supported with this "
+ "connector\n");
+ return 1;
+ }
+
UNUSED(group_id);
UNUSED(op_data);
@@ -26408,17 +26531,12 @@ done:
return ret_val;
}
-#endif
-#ifndef NO_USER_DEFINED_LINKS
-static herr_t link_visit_ud_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_info2_t *info,
- void *op_data);
-#endif
+
/*
* Link visiting callback for the mixed link types + no cycles test which
* iterates recursively through all of the links in the test group and
* checks to make sure their names and link classes match what is expected.
*/
-#if !defined(NO_EXTERNAL_LINKS) && !defined(NO_USER_DEFINED_LINKS)
static herr_t
link_visit_mixed_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_info2_t *info, void *op_data)
{
@@ -26426,6 +26544,13 @@ link_visit_mixed_links_no_cycles_cb(hid_t group_id, const char *name, const H5L_
size_t counter_val = *((size_t *)op_data);
herr_t ret_val = 0;
+ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_UD_LINKS)) {
+ SKIPPED();
+ HDprintf(" API functions for external or user-defined link aren't supported with this "
+ "connector\n");
+ return 1;
+ }
+
UNUSED(group_id);
UNUSED(op_data);
@@ -26557,7 +26682,6 @@ done:
return ret_val;
}
-#endif
/*
* Link visiting callback for the hard links + cycles test which
@@ -26780,7 +26904,6 @@ done:
* iterates recursively through all of the links in the test group and
* checks to make sure their names and link classes match what is expected.
*/
-#ifndef NO_EXTERNAL_LINKS
static herr_t
link_visit_external_links_cycles_cb(hid_t group_id, const char *name, const H5L_info2_t *info, void *op_data)
{
@@ -26793,6 +26916,13 @@ link_visit_external_links_cycles_cb(hid_t group_id, const char *name, const H5L_
char expected_link_name[LINK_VISIT_EXT_LINKS_CYCLE_TEST_BUF_SIZE];
herr_t ret_val = H5_ITER_CONT;
+ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS)) {
+ SKIPPED();
+ HDprintf(" API functions for external links aren't supported with this "
+ "connector\n");
+ return 1;
+ }
+
UNUSED(group_id);
UNUSED(op_data);
@@ -26888,17 +27018,12 @@ done:
return ret_val;
}
-#endif
-#ifndef NO_USER_DEFINED_LINKS
-static herr_t link_visit_ud_links_cycles_cb(hid_t group_id, const char *name, const H5L_info2_t *info,
- void *op_data);
-#endif
+
/*
* Link visiting callback for the mixed link types + cycles test which
* iterates recursively through all of the links in the test group and
* checks to make sure their names and link classes match what is expected.
*/
-#if !defined(NO_EXTERNAL_LINKS) && !defined(NO_USER_DEFINED_LINKS)
static herr_t
link_visit_mixed_links_cycles_cb(hid_t group_id, const char *name, const H5L_info2_t *info, void *op_data)
{
@@ -26906,6 +27031,13 @@ link_visit_mixed_links_cycles_cb(hid_t group_id, const char *name, const H5L_inf
size_t counter_val = *((size_t *)op_data);
herr_t ret_val = 0;
+ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) || !(vol_cap_flags_g & H5VL_CAP_FLAG_UD_LINKS)) {
+ SKIPPED();
+ HDprintf(" API functions for external or user-defined link aren't supported with this "
+ "connector\n");
+ return 1;
+ }
+
UNUSED(group_id);
UNUSED(op_data);
@@ -27005,7 +27137,6 @@ done:
return ret_val;
}
-#endif
/*
* Link visiting callback for the H5Lvisit(_by_name)2 invalid