summaryrefslogtreecommitdiffstats
path: root/test/links.c
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2009-01-10 21:16:12 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2009-01-10 21:16:12 (GMT)
commit5c204221e11199461a9fb189d4d903d24e97c251 (patch)
tree40cdbdc06818dd82faed207373ecdcf1a5d20c57 /test/links.c
parent7b9871bfa22bfde7dd524c3677416093e7425989 (diff)
downloadhdf5-5c204221e11199461a9fb189d4d903d24e97c251.zip
hdf5-5c204221e11199461a9fb189d4d903d24e97c251.tar.gz
hdf5-5c204221e11199461a9fb189d4d903d24e97c251.tar.bz2
[svn-r16295] Changes to links.c to prevent the core file driver from being used as the member
file driver for a family file. This was causing problems with check-vfd. Tested: jam
Diffstat (limited to 'test/links.c')
-rw-r--r--test/links.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/test/links.c b/test/links.c
index 07373fc..8014e1c 100644
--- a/test/links.c
+++ b/test/links.c
@@ -4134,9 +4134,17 @@ external_set_elink_cb(hid_t fapl, hbool_t new_format)
else
TESTING("H5Pset/get_elink_cb()")
+ /* Build user data for callback */
+ op_data.parent_file = filename1;
+ op_data.target_file = filename2;
+ /* Core file driver has issues when used as the member file driver for a family file */
+ op_data.base_fapl = H5Pget_driver(fapl) == H5FD_CORE ? H5P_DEFAULT : fapl;
+ op_data.fam_size = ELINK_CB_FAM_SIZE;
+ op_data.code = 0;
+
/* Create family fapl */
if ((fam_fapl = H5Pcopy(fapl)) < 0) TEST_ERROR
- if (H5Pset_fapl_family(fam_fapl, ELINK_CB_FAM_SIZE, fapl) < 0) TEST_ERROR
+ if (H5Pset_fapl_family(fam_fapl, op_data.fam_size, op_data.base_fapl) < 0) TEST_ERROR
/* Create parent and target files, group, and external link */
h5_fixname(FILENAME[40], fapl, filename1, sizeof filename1);
@@ -4151,13 +4159,6 @@ external_set_elink_cb(hid_t fapl, hbool_t new_format)
if (H5Fclose(file2) < 0) TEST_ERROR
if (H5Gclose(group) < 0) TEST_ERROR
- /* Build user data for callback */
- op_data.parent_file = filename1;
- op_data.target_file = filename2;
- op_data.base_fapl = fapl;
- op_data.fam_size = ELINK_CB_FAM_SIZE;
- op_data.code = 0;
-
/* Create new gapl, and set elink callback */
if ((gapl = H5Pcreate(H5P_GROUP_ACCESS)) < 0) TEST_ERROR
if (H5Pset_elink_cb(gapl, external_set_elink_cb_cb, &op_data) < 0) TEST_ERROR