From 8276bdbe09504336d5a94458ec9ad1ce3b531fc9 Mon Sep 17 00:00:00 2001 From: mattjala <124107509+mattjala@users.noreply.github.com> Date: Mon, 4 Mar 2024 08:52:44 -0600 Subject: Fix VOL-compatibility issues in External Link API test (#4039) Fix link API tests with incorrect filename --- test/API/H5_api_link_test.c | 362 +++++++++++++++++++++++++++++++++----------- test/API/H5_api_link_test.h | 15 +- 2 files changed, 283 insertions(+), 94 deletions(-) diff --git a/test/API/H5_api_link_test.c b/test/API/H5_api_link_test.c index b6ae512..e681084 100644 --- a/test/API/H5_api_link_test.c +++ b/test/API/H5_api_link_test.c @@ -374,6 +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; + bool valid_name_matched = FALSE; char objname[HARD_LINK_TEST_GROUP_MANY_NAME_BUF_SIZE]; /* Object name */ TESTING("hard link creation of many links"); @@ -505,6 +506,7 @@ test_create_hard_link_many(void) HARD_LINK_TEST_GROUP_MANY_FINAL_NAME); goto error; } + /* Check name */ if (H5Iget_name(group_id2, objname, (size_t)HARD_LINK_TEST_GROUP_MANY_NAME_BUF_SIZE) < 0) { H5_FAILED(); @@ -512,9 +514,23 @@ test_create_hard_link_many(void) goto error; } - if (strcmp(objname, "/" LINK_TEST_GROUP_NAME "/" HARD_LINK_TEST_GROUP_MANY_NAME "/hard21")) { + for (size_t i = 1; (i < HARD_LINK_TEST_GROUP_MANY_NUM_HARD_LINKS + 1 && !valid_name_matched); i++) { + char name_possibility[H5_API_TEST_FILENAME_MAX_LENGTH]; + + snprintf(name_possibility, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%zu", + "/" LINK_TEST_GROUP_NAME "/" HARD_LINK_TEST_GROUP_MANY_NAME "/hard", i); + + valid_name_matched |= !strcmp(objname, name_possibility); + } + + valid_name_matched |= !strcmp(objname, "/" LINK_TEST_GROUP_NAME "/" HARD_LINK_TEST_GROUP_MANY_NAME + "/" HARD_LINK_TEST_GROUP_MANY_FINAL_NAME); + + if (!valid_name_matched) { H5_FAILED(); - printf(" wrong name of the object '%s'\n", objname); + printf(" H5Iget_name failed to retrieve a valid name for '%s'\n", + HARD_LINK_TEST_GROUP_MANY_FINAL_NAME); + goto error; } @@ -900,7 +916,8 @@ test_create_hard_link_invalid_params(void) { TESTING_2("H5Lcreate_hard across files"); - snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); + snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%s", test_path_prefix, + EXTERNAL_LINK_TEST_FILE_NAME); if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -1555,11 +1572,12 @@ error: static int test_create_soft_link_many(void) { - 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; + htri_t link_exists = FAIL; + bool valid_name_matched = FALSE; + 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; char objname[SOFT_LINK_TEST_GROUP_MANY_NAME_BUF_SIZE]; /* Object name */ TESTING("soft link creation of many links"); @@ -1709,9 +1727,23 @@ test_create_soft_link_many(void) goto error; } - if (strcmp(objname, "/" LINK_TEST_GROUP_NAME "/" SOFT_LINK_TEST_GROUP_MANY_NAME "/soft16")) { + for (size_t i = 1; (i < SOFT_LINK_TEST_GROUP_MANY_NAME_SOFT_LINK_COUNT + 1 && !valid_name_matched); i++) { + char name_possibility[H5_API_TEST_FILENAME_MAX_LENGTH]; + + snprintf(name_possibility, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%zu", + "/" LINK_TEST_GROUP_NAME "/" SOFT_LINK_TEST_GROUP_MANY_NAME "/soft", i); + + valid_name_matched |= !strcmp(objname, name_possibility); + } + + valid_name_matched |= !strcmp(objname, "/" LINK_TEST_GROUP_NAME "/" SOFT_LINK_TEST_GROUP_MANY_NAME + "/" SOFT_LINK_TEST_GROUP_MANY_FINAL_NAME); + + if (!valid_name_matched) { H5_FAILED(); - printf(" wrong name of the object '%s'\n", objname); + printf(" H5Iget_name failed to retrieve a valid name for '%s'\n", + "/" LINK_TEST_GROUP_NAME "/" SOFT_LINK_TEST_GROUP_MANY_NAME + "/" SOFT_LINK_TEST_GROUP_MANY_FINAL_NAME); goto error; } @@ -1999,7 +2031,8 @@ test_create_external_link(void) return 0; } - snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); + snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%s", test_path_prefix, + EXTERNAL_LINK_TEST_FILE_NAME); if ((file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -2107,7 +2140,8 @@ test_create_external_link_dangling(void) return 0; } - snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); + snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%s", test_path_prefix, + EXTERNAL_LINK_TEST_FILE_NAME); if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -2248,7 +2282,8 @@ test_create_external_link_multi(void) { TESTING_2("Create the first external file to be pointed to"); - snprintf(ext_link_filename1, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); + snprintf(ext_link_filename1, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%s", test_path_prefix, + EXTERNAL_LINK_TEST_FILE_NAME); if ((file_id = H5Fcreate(ext_link_filename1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -2308,7 +2343,7 @@ test_create_external_link_multi(void) { TESTING_2("Create the second external file to be pointed to"); - snprintf(ext_link_filename2, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", + snprintf(ext_link_filename2, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%s", test_path_prefix, EXTERNAL_LINK_TEST_FILE_NAME2); if ((file_id = H5Fcreate(ext_link_filename2, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -2365,7 +2400,7 @@ test_create_external_link_multi(void) { TESTING_2("Create the third external file to be pointed to"); - snprintf(ext_link_filename3, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", + snprintf(ext_link_filename3, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%s", test_path_prefix, EXTERNAL_LINK_TEST_FILE_NAME3); if ((file_id = H5Fcreate(ext_link_filename3, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -2462,9 +2497,10 @@ test_create_external_link_multi(void) PART_ERROR(H5Lcreate_external_final_file); } - if (strcmp(objname, "/A/B/C")) { + if (strcmp(objname, "/A/B/C") && strcmp(objname, "/D/E/F") && strcmp(objname, "/G/H/I") && + strcmp(objname, "/" LINK_TEST_GROUP_NAME "/" EXTERNAL_LINK_TEST_MULTI_NAME "/ext_link")) { H5_FAILED(); - printf(" wrong name of the object '%s'\n", objname); + printf(" H5Iget_name failed to retrieve a valid name for the object '%s'\n", "/A/B/C"); PART_ERROR(H5Lcreate_external_final_file); } @@ -2532,9 +2568,13 @@ test_create_external_link_multi(void) PART_ERROR(H5Lcreate_external_object_created); } - if (strcmp(objname, "/A/B/C/new_group")) { + if (strcmp(objname, "/A/B/C/new_group") && strcmp(objname, "/D/E/F/new_group") && + strcmp(objname, "/G/H/I/new_group") && + strcmp(objname, + "/" LINK_TEST_GROUP_NAME "/" EXTERNAL_LINK_TEST_MULTI_NAME "/ext_link/new_group")) { H5_FAILED(); - printf(" wrong name of the object '%s'\n", objname); + printf(" H5Iget_name was unable to retrieve a valid name for the object '%s'\n", + "/A/B/C/new_group"); PART_ERROR(H5Lcreate_external_object_created); } @@ -2587,9 +2627,10 @@ error: static int test_create_external_link_ping_pong(void) { - hid_t file_id = H5I_INVALID_HID; - hid_t group_id = H5I_INVALID_HID; - hid_t group_id2 = H5I_INVALID_HID; + hid_t file_id = H5I_INVALID_HID; + hid_t group_id = H5I_INVALID_HID; + hid_t group_id2 = H5I_INVALID_HID; + bool valid_name_matched = false; 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]; @@ -2605,8 +2646,10 @@ test_create_external_link_ping_pong(void) return 0; } - snprintf(ext_link_filename1, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_PING_PONG_NAME1); - snprintf(ext_link_filename2, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_PING_PONG_NAME2); + snprintf(ext_link_filename1, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%s", test_path_prefix, + EXTERNAL_LINK_TEST_PING_PONG_NAME1); + snprintf(ext_link_filename2, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%s", test_path_prefix, + EXTERNAL_LINK_TEST_PING_PONG_NAME2); BEGIN_MULTIPART { @@ -2735,9 +2778,19 @@ test_create_external_link_ping_pong(void) PART_ERROR(H5Lcreate_external_verify); } - if (strcmp(objname, "/final")) { + for (size_t i = 1; i < EXTERNAL_LINK_TEST_PING_PONG_NUM_LINKS + 1 && !valid_name_matched; i++) { + char name_possibility[H5_API_TEST_FILENAME_MAX_LENGTH]; + + snprintf(name_possibility, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%zu", "/link", i); + + valid_name_matched |= !strcmp(name_possibility, objname); + } + + valid_name_matched |= !strcmp(objname, "/final"); + + if (!valid_name_matched) { H5_FAILED(); - printf(" wrong name of the object '%s'\n", objname); + printf(" H5Iget_name was unable to retrieve a valid name for the object '%s'\n", "/final"); PART_ERROR(H5Lcreate_external_verify); } @@ -2795,9 +2848,20 @@ test_create_external_link_ping_pong(void) PART_ERROR(H5Lcreate_external_verify_again); } - if (strcmp(objname, "/final/new_group")) { + for (size_t i = 1; i < EXTERNAL_LINK_TEST_PING_PONG_NUM_LINKS + 1 && !valid_name_matched; i++) { + char name_possibility[H5_API_TEST_FILENAME_MAX_LENGTH]; + + snprintf(name_possibility, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%zu%s", "/link", i, + "/new_group"); + + valid_name_matched |= !strcmp(objname, name_possibility); + } + + valid_name_matched |= !strcmp(objname, "/final/new_group"); + + if (!valid_name_matched) { H5_FAILED(); - printf(" wrong name of the object '%s'\n", objname); + printf(" H5Iget_name was unable to find a valid name for '%s'\n", "/final/new_group"); PART_ERROR(H5Lcreate_external_verify_again); } @@ -2860,7 +2924,7 @@ test_create_external_link_invalid_params(void) TESTING_2("test setup"); - snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", + snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%s", test_path_prefix, EXTERNAL_LINK_INVALID_PARAMS_TEST_FILE_NAME); if ((file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { @@ -3751,7 +3815,8 @@ test_delete_link(void) { TESTING_2("H5Ldelete on external link"); - snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); + snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%s", test_path_prefix, + EXTERNAL_LINK_TEST_FILE_NAME); if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -5714,7 +5779,8 @@ test_delete_link(void) } /* Create file for external link to reference */ - snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); + snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%s", test_path_prefix, + EXTERNAL_LINK_TEST_FILE_NAME); if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -5995,7 +6061,8 @@ test_delete_link(void) } /* Create file for external link to reference */ - snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); + snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%s", test_path_prefix, + EXTERNAL_LINK_TEST_FILE_NAME); if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -6270,7 +6337,8 @@ test_delete_link(void) TESTING_2("H5Ldelete_by_idx on external link by alphabetical order in increasing order"); /* Create file for external link to reference */ - snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); + snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%s", test_path_prefix, + EXTERNAL_LINK_TEST_FILE_NAME); if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -6545,7 +6613,8 @@ test_delete_link(void) TESTING_2("H5Ldelete_by_idx on external link by alphabetical order in decreasing order"); /* Create file for external link to reference */ - snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); + snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%s", test_path_prefix, + EXTERNAL_LINK_TEST_FILE_NAME); if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -8253,7 +8322,8 @@ test_copy_link(void) { TESTING_2("H5Lcopy on external link (copied link's properties not checked)"); - snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); + snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%s", test_path_prefix, + EXTERNAL_LINK_TEST_FILE_NAME); if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -8361,7 +8431,8 @@ test_copy_link(void) TESTING_2("H5Lcopy on external link (copied link's properties checked)"); - snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); + snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%s", test_path_prefix, + EXTERNAL_LINK_TEST_FILE_NAME); if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -8564,7 +8635,8 @@ test_copy_link(void) { TESTING_2("H5Lcopy on external link using H5L_SAME_LOC"); - snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); + snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%s", test_path_prefix, + EXTERNAL_LINK_TEST_FILE_NAME); if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -9081,7 +9153,8 @@ test_copy_link_invalid_params(void) { TESTING_2("H5Lcopy invalid across files"); - snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); + snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%s", test_path_prefix, + EXTERNAL_LINK_TEST_FILE_NAME); if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -9175,7 +9248,8 @@ test_move_link(void) TESTING_2("test setup"); - snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); + snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%s", test_path_prefix, + EXTERNAL_LINK_TEST_FILE_NAME); if ((file_id = H5Fopen(H5_api_test_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -10056,7 +10130,8 @@ test_move_link(void) { TESTING_2("H5Lmove on external link (moved link's properties not checked)"); - snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); + snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%s", test_path_prefix, + EXTERNAL_LINK_TEST_FILE_NAME); if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -10164,7 +10239,8 @@ test_move_link(void) TESTING_2("H5Lmove on external link (moved link's properties checked)"); - snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); + snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%s", test_path_prefix, + EXTERNAL_LINK_TEST_FILE_NAME); if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -10367,7 +10443,8 @@ test_move_link(void) { TESTING_2("H5Lmove on external link using H5L_SAME_LOC"); - snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); + snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%s", test_path_prefix, + EXTERNAL_LINK_TEST_FILE_NAME); if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -10505,7 +10582,8 @@ test_move_link(void) { TESTING_2("H5Lmove to rename external link without moving it"); - snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); + snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%s", test_path_prefix, + EXTERNAL_LINK_TEST_FILE_NAME); if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -11389,7 +11467,8 @@ test_move_link_invalid_params(void) { TESTING_2("H5Lmove into another file"); - snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); + snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%s", test_path_prefix, + EXTERNAL_LINK_TEST_FILE_NAME); if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -11628,7 +11707,8 @@ test_get_link_val(void) memset(&link_info, 0, sizeof(link_info)); - snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); + snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%s", test_path_prefix, + EXTERNAL_LINK_TEST_FILE_NAME); if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -12526,7 +12606,8 @@ test_get_link_val(void) PART_EMPTY(H5Lget_val_by_idx_external_crt_order_increasing); } - snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); + snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%s", test_path_prefix, + EXTERNAL_LINK_TEST_FILE_NAME); if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -12775,7 +12856,8 @@ test_get_link_val(void) PART_EMPTY(H5Lget_val_by_idx_external_crt_order_decreasing); } - snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); + snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%s", test_path_prefix, + EXTERNAL_LINK_TEST_FILE_NAME); if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -13018,7 +13100,8 @@ test_get_link_val(void) TESTING_2("H5Lget_val_by_idx on external link by alphabetical order in increasing order"); - snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); + snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%s", test_path_prefix, + EXTERNAL_LINK_TEST_FILE_NAME); if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -13261,7 +13344,8 @@ test_get_link_val(void) TESTING_2("H5Lget_val_by_idx on external link by alphabetical order in decreasing order"); - snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); + snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%s", test_path_prefix, + EXTERNAL_LINK_TEST_FILE_NAME); if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -14168,7 +14252,8 @@ test_get_link_info(void) memset(&link_info, 0, sizeof(link_info)); - snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); + snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%s", test_path_prefix, + EXTERNAL_LINK_TEST_FILE_NAME); if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -15733,7 +15818,8 @@ test_get_link_info(void) PART_EMPTY(H5Lget_info_by_idx_external_crt_order_increasing); } - snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); + snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%s", test_path_prefix, + EXTERNAL_LINK_TEST_FILE_NAME); if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -15936,7 +16022,8 @@ test_get_link_info(void) PART_EMPTY(H5Lget_info_by_idx_external_crt_order_decreasing); } - snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); + snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%s", test_path_prefix, + EXTERNAL_LINK_TEST_FILE_NAME); if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -16133,7 +16220,8 @@ test_get_link_info(void) { TESTING_2("H5Lget_info_by_idx2 on external link by alphabetical order in increasing order"); - snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); + snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%s", test_path_prefix, + EXTERNAL_LINK_TEST_FILE_NAME); if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -16336,7 +16424,8 @@ test_get_link_info(void) { TESTING_2("H5Lget_info_by_idx2 on external link by alphabetical order in decreasing order"); - snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); + snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%s", test_path_prefix, + EXTERNAL_LINK_TEST_FILE_NAME); if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -18362,7 +18451,8 @@ test_get_link_name(void) } /* Create file for external link to reference */ - snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); + snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%s", test_path_prefix, + EXTERNAL_LINK_TEST_FILE_NAME); if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -18550,7 +18640,8 @@ test_get_link_name(void) } /* Create file for external link to reference */ - snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); + snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%s", test_path_prefix, + EXTERNAL_LINK_TEST_FILE_NAME); if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -18732,7 +18823,8 @@ test_get_link_name(void) TESTING_2("H5Lget_name_by_idx on external link by alphabetical order in increasing order"); /* Create file for external link to reference */ - snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); + snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%s", test_path_prefix, + EXTERNAL_LINK_TEST_FILE_NAME); if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -18914,7 +19006,8 @@ test_get_link_name(void) TESTING_2("H5Lget_name_by_idx on external link by alphabetical order in decreasing order"); /* Create file for external link to reference */ - snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); + snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%s", test_path_prefix, + EXTERNAL_LINK_TEST_FILE_NAME); if ((ext_file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -19580,6 +19673,14 @@ test_link_iterate_hard_links(void) { TESTING_2("H5Literate2 by link name in increasing order"); + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) || + !(vol_cap_flags_g & H5VL_CAP_FLAG_UD_LINKS)) { + SKIPPED(); + printf(" API functions for external or user-defined link aren't supported with this " + "connector\n"); + PART_EMPTY(H5Literate_link_name_increasing); + } + i = 0; /* Test basic link iteration capability using both index types and both index orders */ @@ -20215,7 +20316,8 @@ test_link_iterate_external_links(void) TESTING_2("test setup"); - snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); + snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%s", test_path_prefix, + EXTERNAL_LINK_TEST_FILE_NAME); if ((file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -20301,6 +20403,12 @@ test_link_iterate_external_links(void) { TESTING_2("H5Literate2 by link name in increasing order"); + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS)) { + SKIPPED(); + printf(" external link API is not supported with this VOL connector\n"); + PART_EMPTY(H5Literate_link_name_increasing); + } + i = 0; /* Test basic link iteration capability using both index types and both index orders */ @@ -20325,6 +20433,12 @@ test_link_iterate_external_links(void) { TESTING_2("H5Literate2 by link name in decreasing order"); + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS)) { + SKIPPED(); + printf(" external link API is not supported with this VOL connector\n"); + PART_EMPTY(H5Literate_link_name_decreasing); + } + /* Reset the counter to the appropriate value for the next test */ i = LINK_ITER_EXT_LINKS_TEST_NUM_LINKS; @@ -20349,9 +20463,11 @@ 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)) { + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) || + !(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS)) { SKIPPED(); - printf(" creation order tracking isn't supported with this VOL connector\n"); + printf(" creation order tracking or the external link API aren't supported with this VOL " + "connector\n"); PART_EMPTY(H5Literate_link_creation_increasing); } @@ -20379,9 +20495,11 @@ 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)) { + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) || + !(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS)) { SKIPPED(); - printf(" creation order tracking isn't supported with this VOL connector\n"); + printf(" creation order tracking or the external link API aren't supported with this VOL " + "connector\n"); PART_EMPTY(H5Literate_link_creation_decreasing); } @@ -20409,6 +20527,12 @@ test_link_iterate_external_links(void) { TESTING_2("H5Literate_by_name2 by link name in increasing order"); + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS)) { + SKIPPED(); + printf(" the external link API is not supported with this VOL connector\n"); + PART_EMPTY(H5Literate_by_name_link_name_increasing); + } + /* Reset the counter to the appropriate value for the next test */ i = 0; @@ -20434,6 +20558,13 @@ test_link_iterate_external_links(void) { TESTING_2("H5Literate_by_name2 by link name in decreasing order"); + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS)) { + SKIPPED(); + printf(" creation order tracking or the external link API aren'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 = LINK_ITER_EXT_LINKS_TEST_NUM_LINKS; @@ -20459,9 +20590,11 @@ 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)) { + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) || + !(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS)) { SKIPPED(); - printf(" creation order tracking isn't supported with this VOL connector\n"); + printf(" creation order tracking or the external link API aren't supported with this VOL " + "connector\n"); PART_EMPTY(H5Literate_by_name_creation_increasing); } @@ -20491,9 +20624,11 @@ 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)) { + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER) || + !(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS)) { SKIPPED(); - printf(" creation order tracking isn't supported with this VOL connector\n"); + printf(" creation order tracking or the external link API are not supported with this VOL " + "connector\n"); PART_EMPTY(H5Literate_by_name_creation_decreasing); } @@ -20612,7 +20747,8 @@ test_link_iterate_mixed_links(void) TESTING_2("test setup"); - snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); + snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%s", test_path_prefix, + EXTERNAL_LINK_TEST_FILE_NAME); if ((file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -20737,6 +20873,14 @@ test_link_iterate_mixed_links(void) { TESTING_2("H5Literate2 by link name in increasing order"); + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) || + !(vol_cap_flags_g & H5VL_CAP_FLAG_UD_LINKS)) { + SKIPPED(); + printf(" creation order tracking, external links, or user-defined links aren't supported " + "with this VOL connector\n"); + PART_EMPTY(H5Literate_link_name_increasing); + } + i = 0; /* Test basic link iteration capability using both index types and both index orders */ @@ -20760,6 +20904,14 @@ test_link_iterate_mixed_links(void) { TESTING_2("H5Literate2 by link name in decreasing order"); + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) || + !(vol_cap_flags_g & H5VL_CAP_FLAG_UD_LINKS)) { + SKIPPED(); + printf(" creation order tracking, external links, or user-defined links aren't supported " + "with this VOL connector\n"); + PART_EMPTY(H5Literate_link_name_decreasing); + } + /* Reset the counter to the appropriate value for the next test */ i = LINK_ITER_MIXED_LINKS_TEST_NUM_LINKS; @@ -20783,9 +20935,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)) { + if (!(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_UD_LINKS)) { SKIPPED(); - printf(" creation order tracking isn't supported with this VOL connector\n"); + printf(" creation order tracking, external links, or user-defined links aren't supported " + "with this VOL connector\n"); PART_EMPTY(H5Literate_link_creation_increasing); } @@ -20813,9 +20968,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)) { + if (!(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_UD_LINKS)) { SKIPPED(); - printf(" creation order tracking isn't supported with this VOL connector\n"); + printf(" creation order tracking, external links, or user-defined links aren't supported " + "with this VOL connector\n"); PART_EMPTY(H5Literate_link_creation_decreasing); } @@ -20843,6 +21001,13 @@ test_link_iterate_mixed_links(void) { TESTING_2("H5Literate_by_name2 by link name in increasing order"); + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) || + !(vol_cap_flags_g & H5VL_CAP_FLAG_UD_LINKS)) { + SKIPPED(); + printf(" external links or user-defined links aren't supported with this VOL connector\n"); + PART_EMPTY(H5Literate_by_name_link_name_increasing); + } + i = 0; if (H5Literate_by_name2( @@ -20867,6 +21032,13 @@ test_link_iterate_mixed_links(void) { TESTING_2("H5Literate_by_name2 by link name in decreasing order"); + if (!(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS) || + !(vol_cap_flags_g & H5VL_CAP_FLAG_UD_LINKS)) { + SKIPPED(); + printf(" external links or user-defined links aren't supported with this VOL connector\n"); + PART_EMPTY(H5Literate_by_name_link_name_decreasing); + } + /* Reset the counter to the appropriate value for the next test */ i = LINK_ITER_MIXED_LINKS_TEST_NUM_LINKS; @@ -20892,9 +21064,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)) { + if (!(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_UD_LINKS)) { SKIPPED(); - printf(" creation order tracking isn't supported with this VOL connector\n"); + printf(" creation order tracking, external links, or user-defined links aren't supported " + "with this VOL connector\n"); PART_EMPTY(H5Literate_by_name_creation_increasing); } @@ -20923,9 +21098,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)) { + if (!(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_UD_LINKS)) { SKIPPED(); - printf(" creation order tracking isn't supported with this VOL connector\n"); + printf(" creation order tracking, external links, or user-defined links aren't supported " + "with this VOL connector\n"); PART_EMPTY(H5Literate_by_name_creation_decreasing); } @@ -20954,9 +21132,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)) { + if (!(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_UD_LINKS)) { SKIPPED(); - printf(" creation order tracking isn't supported with this VOL connector\n"); + printf(" creation order tracking, external links, or user-defined links aren't supported " + "with this VOL connector\n"); PART_EMPTY(H5Literate_index_saving_increasing); } @@ -20992,9 +21173,12 @@ test_link_iterate_mixed_links(void) { TESTING_2("H5Literate2 index-saving capabilities in decreasing order"); - if (!(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { + if (!(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_UD_LINKS)) { SKIPPED(); - printf(" creation order tracking isn't supported with this VOL connector\n"); + printf(" creation order tracking, external links, or user-defined links aren't supported " + "with this VOL connector\n"); PART_EMPTY(H5Literate_index_saving_decreasing); } @@ -21098,7 +21282,8 @@ test_link_iterate_invalid_params(void) TESTING_2("test setup"); - snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); + snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%s", test_path_prefix, + EXTERNAL_LINK_TEST_FILE_NAME); if ((file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -22525,7 +22710,8 @@ test_link_visit_external_links_no_cycles(void) TESTING_2("test setup"); - snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); + snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%s", test_path_prefix, + EXTERNAL_LINK_TEST_FILE_NAME); if ((file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -22953,7 +23139,8 @@ test_link_visit_mixed_links_no_cycles(void) TESTING_2("test setup"); - snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); + snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%s", test_path_prefix, + EXTERNAL_LINK_TEST_FILE_NAME); if ((file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -24593,7 +24780,8 @@ test_link_visit_mixed_links_cycles(void) TESTING_2("test setup"); - snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); + snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%s", test_path_prefix, + EXTERNAL_LINK_TEST_FILE_NAME); if ((file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -25030,7 +25218,8 @@ test_link_visit_invalid_params(void) TESTING_2("test setup"); - snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s", EXTERNAL_LINK_TEST_FILE_NAME); + snprintf(ext_link_filename, H5_API_TEST_FILENAME_MAX_LENGTH, "%s%s", test_path_prefix, + EXTERNAL_LINK_TEST_FILE_NAME); if ((file_id = H5Fcreate(ext_link_filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); @@ -25829,7 +26018,6 @@ link_iter_external_links_cb(hid_t group_id, const char *name, const H5L_info2_t herr_t ret_val = H5_ITER_CONT; if (!(vol_cap_flags_g & H5VL_CAP_FLAG_EXTERNAL_LINKS)) { - SKIPPED(); printf(" API functions for external links aren't supported with this " "connector\n"); return 1; @@ -25894,7 +26082,6 @@ link_iter_mixed_links_cb(hid_t group_id, const char *name, const H5L_info2_t *in 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(); printf(" API functions for external or user-defined link aren't supported with this " "connector\n"); return 1; @@ -25983,7 +26170,6 @@ link_iter_idx_saving_cb(hid_t group_id, const char *name, const H5L_info2_t *inf 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(); printf(" API functions for external or user-defined link aren't supported with this " "connector\n"); return 1; diff --git a/test/API/H5_api_link_test.h b/test/API/H5_api_link_test.h index c068f4f..02514cd 100644 --- a/test/API/H5_api_link_test.h +++ b/test/API/H5_api_link_test.h @@ -29,9 +29,10 @@ int H5_api_link_test(void); #define HARD_LINK_TEST_GROUP_LONG_NAME "hard_link_long_name" #define MAX_NAME_LEN ((64 * 1024) + 1024) -#define HARD_LINK_TEST_GROUP_MANY_NAME "hard_link_many_name" -#define HARD_LINK_TEST_GROUP_MANY_FINAL_NAME "hard_link_final" -#define HARD_LINK_TEST_GROUP_MANY_NAME_BUF_SIZE 1024 +#define HARD_LINK_TEST_GROUP_MANY_NAME "hard_link_many_name" +#define HARD_LINK_TEST_GROUP_MANY_FINAL_NAME "hard_link_final" +#define HARD_LINK_TEST_GROUP_MANY_NAME_BUF_SIZE 1024 +#define HARD_LINK_TEST_GROUP_MANY_NUM_HARD_LINKS 21 #define H5L_SAME_LOC_TEST_GROUP_NAME "h5l_same_loc_test_group" #define H5L_SAME_LOC_TEST_LINK_NAME1 "h5l_same_loc_test_link1" @@ -58,9 +59,10 @@ int H5_api_link_test(void); #define SOFT_LINK_TEST_GROUP_LONG_NAME "soft_link_long_name" #define SOFT_LINK_TEST_LONG_OBJECT_NAME "soft_link_object_name" -#define SOFT_LINK_TEST_GROUP_MANY_NAME "soft_link_many_name" -#define SOFT_LINK_TEST_GROUP_MANY_FINAL_NAME "soft_link_final" -#define SOFT_LINK_TEST_GROUP_MANY_NAME_BUF_SIZE 1024 +#define SOFT_LINK_TEST_GROUP_MANY_NAME "soft_link_many_name" +#define SOFT_LINK_TEST_GROUP_MANY_FINAL_NAME "soft_link_final" +#define SOFT_LINK_TEST_GROUP_MANY_NAME_BUF_SIZE 1024 +#define SOFT_LINK_TEST_GROUP_MANY_NAME_SOFT_LINK_COUNT 16 #define SOFT_LINK_INVALID_PARAMS_TEST_GROUP_NAME "soft_link_creation_invalid_params_test" #define SOFT_LINK_INVALID_PARAMS_TEST_LINK_NAME "soft_link_to_root" @@ -82,6 +84,7 @@ int H5_api_link_test(void); #define EXTERNAL_LINK_TEST_PING_PONG_NAME1 "ext_link_file_ping_pong_1.h5" #define EXTERNAL_LINK_TEST_PING_PONG_NAME2 "ext_link_file_ping_pong_2.h5" #define EXTERNAL_LINK_TEST_PING_PONG_NAME_BUF_SIZE 1024 +#define EXTERNAL_LINK_TEST_PING_PONG_NUM_LINKS 6 #define EXTERNAL_LINK_INVALID_PARAMS_TEST_GROUP_NAME "external_link_creation_invalid_params_test" #define EXTERNAL_LINK_INVALID_PARAMS_TEST_FILE_NAME "ext_link_invalid_params_file.h5" -- cgit v0.12