summaryrefslogtreecommitdiffstats
path: root/test/links.c
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2009-01-10 21:13:48 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2009-01-10 21:13:48 (GMT)
commitb5008f9e3f176fd53b75d8d9c2492002d5ae6c27 (patch)
tree03cdebcc04146fd3544415bb514d8a899d7ad6af /test/links.c
parent9dc5ebd07b4f352ff3267440ce5644f7a2cf55cd (diff)
downloadhdf5-b5008f9e3f176fd53b75d8d9c2492002d5ae6c27.zip
hdf5-b5008f9e3f176fd53b75d8d9c2492002d5ae6c27.tar.gz
hdf5-b5008f9e3f176fd53b75d8d9c2492002d5ae6c27.tar.bz2
[svn-r16294] 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 cc1cac6..092cdac 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