summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/cmpd_dset.c25
-rw-r--r--test/links.c24
-rwxr-xr-xtest/objcopy.c4
-rw-r--r--test/titerate.c88
-rw-r--r--test/trefer.c7
-rw-r--r--test/tunicode.c2
-rw-r--r--test/unlink.c12
7 files changed, 94 insertions, 68 deletions
diff --git a/test/cmpd_dset.c b/test/cmpd_dset.c
index 0902cd3..53f9746 100644
--- a/test/cmpd_dset.c
+++ b/test/cmpd_dset.c
@@ -118,13 +118,8 @@ typedef struct {
long_long r, s, t;
} stype4;
-#if 1
-# define NX 100u
-# define NY 2000u
-#else
-# define NX 12u
-# define NY 9u
-#endif
+#define NX 100u
+#define NY 2000u
/*-------------------------------------------------------------------------
@@ -1254,19 +1249,19 @@ error:
*-------------------------------------------------------------------------
*/
static int
-compare_data(unsigned char *src_data, unsigned char *dst_data, hbool_t src_subset)
+compare_data(void *src_data, void *dst_data, hbool_t src_subset)
{
stype1 *s_ptr;
stype2 *d_ptr;
int i;
- for (i=0; i<(int)NX*NY; i++) {
+ for(i = 0; i < (int)(NX * NY); i++) {
if(src_subset) {
s_ptr = ((stype1*)src_data) + i;
- d_ptr = ((stype2*)dst_data) + i;
+ d_ptr = ((stype2*)dst_data) + i;
} else {
s_ptr = ((stype2*)src_data) + i;
- d_ptr = ((stype1*)dst_data) + i;
+ d_ptr = ((stype1*)dst_data) + i;
}
if (s_ptr->a != d_ptr->a ||
@@ -1469,7 +1464,7 @@ test_hdf5_src_subset(char *filename, hid_t fapl)
if(H5Dread(dataset, dst_tid, H5S_ALL, H5S_ALL, dxpl, rbuf)<0)
goto error;
- if(compare_data(orig, rbuf, TRUE)<0)
+ if(compare_data(orig, rbuf, TRUE) < 0)
goto error;
if(H5Dclose(dataset) < 0)
@@ -1482,7 +1477,7 @@ test_hdf5_src_subset(char *filename, hid_t fapl)
if(H5Dread(dataset, dst_tid, H5S_ALL, H5S_ALL, dxpl, rbuf)<0)
goto error;
- if(compare_data(orig, rbuf, TRUE)<0)
+ if(compare_data(orig, rbuf, TRUE) < 0)
goto error;
if(H5Dclose(dataset) < 0)
@@ -1673,7 +1668,7 @@ test_hdf5_dst_subset(char *filename, hid_t fapl)
if(H5Dread(dataset, dst_tid, H5S_ALL, H5S_ALL, dxpl, rbuf)<0)
goto error;
- if(compare_data(orig, rbuf, FALSE)<0)
+ if(compare_data(orig, rbuf, FALSE) < 0)
goto error;
if(H5Dclose(dataset) < 0)
@@ -1686,7 +1681,7 @@ test_hdf5_dst_subset(char *filename, hid_t fapl)
if(H5Dread(dataset, dst_tid, H5S_ALL, H5S_ALL, dxpl, rbuf)<0)
goto error;
- if(compare_data(orig, rbuf, FALSE)<0)
+ if(compare_data(orig, rbuf, FALSE) < 0)
goto error;
if(H5Dclose(dataset) < 0)
diff --git a/test/links.c b/test/links.c
index fe3ea79..96aa255 100644
--- a/test/links.c
+++ b/test/links.c
@@ -55,7 +55,7 @@ const char *FILENAME[] = {
#define UD_PLIST_TYPE 128
#define UD_CBFAIL_TYPE UD_PLIST_TYPE
#define UD_ERROR_TYPE 189
-#define UD_BAD_TYPE1 H5G_LINK_HARD
+#define UD_BAD_TYPE1 H5L_TYPE_HARD
#define UD_BAD_TYPE2 (H5L_TYPE_UD_MIN - 5)
#define UD_BAD_VERS (H5L_LINK_CLASS_T_VERS + 1)
@@ -5209,7 +5209,7 @@ linkinfo(hid_t fapl, hbool_t new_format)
if(H5Lget_info(fid, "ext_link", &li, H5P_DEFAULT) < 0) TEST_ERROR
if(li.type != H5L_TYPE_EXTERNAL) TEST_ERROR
if(H5Lget_info(fid, "softlink", &li, H5P_DEFAULT) < 0) TEST_ERROR
- if(li.type != H5G_LINK_SOFT) TEST_ERROR
+ if(li.type != H5L_TYPE_SOFT) TEST_ERROR
if(H5Lget_info(fid, "ud_link", &li, H5P_DEFAULT) < 0) TEST_ERROR
if(li.type != UD_PLIST_TYPE) TEST_ERROR
@@ -7148,6 +7148,7 @@ HDfprintf(stderr, "op_data->curr = %Hd\n", op_data->curr);
return(H5_ITER_CONT);
} /* end link_iterate_cb() */
+#ifndef H5_NO_DEPRECATED_SYMBOLS
/*-------------------------------------------------------------------------
* Function: group_iterate_cb
@@ -7168,6 +7169,7 @@ group_iterate_cb(hid_t group_id, const char *link_name, void *_op_data)
{
return(link_iterate_cb(group_id, link_name, NULL, _op_data));
} /* end group_iterate_cb() */
+#endif /* H5_NO_DEPRECATED_SYMBOLS */
/*-------------------------------------------------------------------------
@@ -7211,7 +7213,9 @@ link_iterate_check(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order,
{
unsigned v; /* Local index variable */
hsize_t skip; /* # of links to skip in group */
+#ifndef H5_NO_DEPRECATED_SYMBOLS
int gskip; /* # of links to skip in group, with H5Giterate */
+#endif /* H5_NO_DEPRECATED_SYMBOLS */
herr_t ret; /* Generic return value */
/* Iterate over links in group */
@@ -7229,6 +7233,7 @@ link_iterate_check(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order,
if(iter_info->visited[v] == FALSE) TEST_ERROR
+#ifndef H5_NO_DEPRECATED_SYMBOLS
/* Iterate over links in group, with H5Giterate */
iter_info->nskipped = gskip = 0;
iter_info->order = order;
@@ -7242,6 +7247,7 @@ link_iterate_check(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order,
if(gskip != (int)max_links) TEST_ERROR
for(v = 0; v < max_links; v++)
if(iter_info->visited[v] == FALSE) TEST_ERROR
+#endif /* H5_NO_DEPRECATED_SYMBOLS */
/* Skip over some links in group */
@@ -7275,6 +7281,7 @@ link_iterate_check(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order,
} /* end else */
+#ifndef H5_NO_DEPRECATED_SYMBOLS
/* Skip over some links in group, with H5Giterate */
iter_info->nskipped = gskip = max_links / 2;
iter_info->order = order;
@@ -7304,6 +7311,7 @@ link_iterate_check(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order,
if(nvisit != (max_links / 2)) TEST_ERROR
} /* end else */
+#endif /* H5_NO_DEPRECATED_SYMBOLS */
/* Iterate over links in group, stopping in the middle */
@@ -7318,6 +7326,7 @@ link_iterate_check(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order,
if(iter_info->ncalled != 3) TEST_ERROR
+#ifndef H5_NO_DEPRECATED_SYMBOLS
/* Iterate over links in group, stopping in the middle, with H5Giterate() */
iter_info->nskipped = gskip = 0;
iter_info->order = order;
@@ -7328,6 +7337,7 @@ link_iterate_check(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order,
if((ret = H5Giterate(group_id, ".", &gskip, group_iterate_cb, iter_info)) < 0) TEST_ERROR
if(ret != CORDER_ITER_STOP) TEST_ERROR
if(iter_info->ncalled != 3) TEST_ERROR
+#endif /* H5_NO_DEPRECATED_SYMBOLS */
/* Check for iteration routine indicating failure */
@@ -7617,6 +7627,7 @@ HDfprintf(stderr, "op_data->curr = %Hd\n", op_data->curr);
return(H5_ITER_CONT);
} /* end link_iterate_old_cb() */
+#ifndef H5_NO_DEPRECATED_SYMBOLS
/*-------------------------------------------------------------------------
* Function: group_iterate_old_cb
@@ -7637,6 +7648,7 @@ group_iterate_old_cb(hid_t group_id, const char *link_name, void *_op_data)
{
return(link_iterate_old_cb(group_id, link_name, NULL, _op_data));
} /* end group_iterate_old_cb() */
+#endif /* H5_NO_DEPRECATED_SYMBOLS */
/*-------------------------------------------------------------------------
@@ -7658,7 +7670,9 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order,
{
unsigned v; /* Local index variable */
hsize_t skip; /* # of links to skip in group */
+#ifndef H5_NO_DEPRECATED_SYMBOLS
int gskip; /* # of links to skip in group, with H5Giterate */
+#endif /* H5_NO_DEPRECATED_SYMBOLS */
herr_t ret; /* Generic return value */
/* Iterate over links in group */
@@ -7676,6 +7690,7 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order,
if(iter_info->visited[v] == FALSE) TEST_ERROR
+#ifndef H5_NO_DEPRECATED_SYMBOLS
/* Iterate over links in group, with H5Giterate */
iter_info->nskipped = gskip = 0;
iter_info->order = order;
@@ -7689,6 +7704,7 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order,
if(gskip != (int)max_links) TEST_ERROR
for(v = 0; v < max_links; v++)
if(iter_info->visited[v] == FALSE) TEST_ERROR
+#endif /* H5_NO_DEPRECATED_SYMBOLS */
/* Skip over some links in group */
@@ -7722,6 +7738,7 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order,
} /* end else */
+#ifndef H5_NO_DEPRECATED_SYMBOLS
/* Skip over some links in group, with H5Giterate */
iter_info->nskipped = gskip = max_links / 2;
iter_info->order = order;
@@ -7751,6 +7768,7 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order,
if(nvisit != (max_links / 2)) TEST_ERROR
} /* end else */
+#endif /* H5_NO_DEPRECATED_SYMBOLS */
/* Iterate over links in group, stopping in the middle */
@@ -7765,6 +7783,7 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order,
if(iter_info->ncalled != 3) TEST_ERROR
+#ifndef H5_NO_DEPRECATED_SYMBOLS
/* Iterate over links in group, stopping in the middle, with H5Giterate() */
iter_info->nskipped = gskip = 0;
iter_info->order = order;
@@ -7775,6 +7794,7 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order,
if((ret = H5Giterate(group_id, ".", &gskip, group_iterate_old_cb, iter_info)) < 0) TEST_ERROR
if(ret != CORDER_ITER_STOP) TEST_ERROR
if(iter_info->ncalled != 3) TEST_ERROR
+#endif /* H5_NO_DEPRECATED_SYMBOLS */
/* Check for iteration routine indicating failure */
diff --git a/test/objcopy.c b/test/objcopy.c
index 148eea4..3c6e03f 100755
--- a/test/objcopy.c
+++ b/test/objcopy.c
@@ -4979,7 +4979,7 @@ test_copy_group_links(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl)
if(H5Dclose(did) < 0) TEST_ERROR
/* make a hard link to the dataset */
- if(H5Lcreate_hard(fid_src, NAME_LINK_DATASET, H5G_SAME_LOC, NAME_LINK_HARD, H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if(H5Lcreate_hard(fid_src, NAME_LINK_DATASET, H5L_SAME_LOC, NAME_LINK_HARD, H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
/* make a soft link to the dataset */
if(H5Lcreate_soft(NAME_LINK_DATASET, fid_src, NAME_LINK_SOFT, H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
@@ -7019,7 +7019,7 @@ test_copy_option(hid_t fcpl_src, hid_t fcpl_dst, hid_t fapl, unsigned flag, hboo
/* Create group to compare with */
if((gid = H5Gcreate2(fid_src, NAME_GROUP_LINK2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
- if(H5Lcreate_hard(fid_src, NAME_DATASET_SUB_SUB, H5G_SAME_LOC, NAME_LINK_SOFT2, H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if(H5Lcreate_hard(fid_src, NAME_DATASET_SUB_SUB, H5L_SAME_LOC, NAME_LINK_SOFT2, H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
if(H5Lcreate_soft("nowhere", fid_src, NAME_LINK_SOFT_DANGLE2, H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
if(H5Gclose(gid) < 0) FAIL_STACK_ERROR
} /* end if */
diff --git a/test/titerate.c b/test/titerate.c
index 8f19c6c..c2a3b94 100644
--- a/test/titerate.c
+++ b/test/titerate.c
@@ -61,8 +61,10 @@ typedef struct {
/* Local functions */
int iter_strcmp(const void *s1, const void *s2);
int iter_strcmp2(const void *s1, const void *s2);
-herr_t giter_cb(hid_t group, const char *name, void *op_data);
-herr_t giter_cb2(hid_t group, const char *name, void *op_data);
+static herr_t liter_cb(hid_t group, const char *name, const H5L_info_t *info,
+ void *op_data);
+static herr_t liter_cb2(hid_t group, const char *name, const H5L_info_t *info,
+ void *op_data);
herr_t aiter_cb(hid_t loc_id, const char *name, void *op_data);
/****************************************************************
@@ -77,10 +79,12 @@ int iter_strcmp(const void *s1, const void *s2)
/****************************************************************
**
-** giter_cb(): Custom group iteration callback routine.
+** liter_cb(): Custom link iteration callback routine.
**
****************************************************************/
-herr_t giter_cb(hid_t UNUSED group, const char *name, void *op_data)
+static herr_t
+liter_cb(hid_t UNUSED group, const char *name, const H5L_info_t UNUSED *link_info,
+ void *op_data)
{
iter_info *info = (iter_info *)op_data;
static int count = 0;
@@ -107,14 +111,15 @@ herr_t giter_cb(hid_t UNUSED group, const char *name, void *op_data)
printf("invalid iteration command");
return(-1);
} /* end switch */
-} /* end giter_cb() */
+} /* end liter_cb() */
/****************************************************************
**
** test_iter_group(): Test group iteration functionality
**
****************************************************************/
-static void test_iter_group(hid_t fapl, hbool_t new_format)
+static void
+test_iter_group(hid_t fapl, hbool_t new_format)
{
hid_t file; /* File ID */
hid_t dataset; /* Dataset ID */
@@ -122,7 +127,7 @@ static void test_iter_group(hid_t fapl, hbool_t new_format)
hid_t filespace; /* Common dataspace ID */
hid_t root_group,grp; /* Root group ID */
int i; /* counting variable */
- int idx; /* Index in the group */
+ hsize_t idx; /* Index in the group */
char name[NAMELEN]; /* temporary name buffer */
char *lnames[NDATASETS + 2];/* Names of the links created */
char dataset_name[NAMELEN]; /* dataset name */
@@ -138,10 +143,10 @@ static void test_iter_group(hid_t fapl, hbool_t new_format)
CHECK(file, FAIL, "H5Fcreate");
/* Test iterating over empty group */
- info.command=RET_ZERO;
- idx=0;
- ret=H5Giterate(file,"/",&idx,giter_cb,&info);
- VERIFY(ret, SUCCEED, "H5Giterate");
+ info.command = RET_ZERO;
+ idx = 0;
+ ret = H5Literate(file, "/", H5_INDEX_NAME, H5_ITER_INC, &idx, liter_cb, &info, H5P_DEFAULT);
+ VERIFY(ret, SUCCEED, "H5Literate");
datatype = H5Tcopy(H5T_NATIVE_INT);
CHECK(datatype, FAIL, "H5Tcopy");
@@ -255,45 +260,45 @@ static void test_iter_group(hid_t fapl, hbool_t new_format)
/* Test invalid indices for starting iteration */
info.command = RET_ZERO;
- idx = -1;
+ idx = (hsize_t)-1;
H5E_BEGIN_TRY {
- ret = H5Giterate(file, "/", &idx, giter_cb, &info);
+ ret = H5Literate(file, "/", H5_INDEX_NAME, H5_ITER_INC, &idx, liter_cb, &info, H5P_DEFAULT);
} H5E_END_TRY;
- VERIFY(ret, FAIL, "H5Giterate");
+ VERIFY(ret, FAIL, "H5Literate");
/* Test skipping exactly as many entries as in the group */
idx = NDATASETS + 2;
H5E_BEGIN_TRY {
- ret = H5Giterate(file, "/", &idx, giter_cb, &info);
+ ret = H5Literate(file, "/", H5_INDEX_NAME, H5_ITER_INC, &idx, liter_cb, &info, H5P_DEFAULT);
} H5E_END_TRY;
- VERIFY(ret, FAIL, "H5Giterate");
+ VERIFY(ret, FAIL, "H5Literate");
/* Test skipping more entries than are in the group */
idx = NDATASETS + 3;
H5E_BEGIN_TRY {
- ret = H5Giterate(file, "/", &idx, giter_cb, &info);
+ ret = H5Literate(file, "/", H5_INDEX_NAME, H5_ITER_INC, &idx, liter_cb, &info, H5P_DEFAULT);
} H5E_END_TRY;
- VERIFY(ret, FAIL, "H5Giterate");
+ VERIFY(ret, FAIL, "H5Literate");
/* Test all objects in group, when callback always returns 0 */
info.command = RET_ZERO;
idx = 0;
- if((ret = H5Giterate(file, "/", &idx, giter_cb, &info)) > 0)
+ if((ret = H5Literate(file, "/", H5_INDEX_NAME, H5_ITER_INC, &idx, liter_cb, &info, H5P_DEFAULT)) > 0)
TestErrPrintf("Group iteration function didn't return zero correctly!\n");
/* Test all objects in group, when callback always returns 1 */
/* This also tests the "restarting" ability, because the index changes */
info.command = RET_TWO;
idx = i = 0;
- while((ret = H5Giterate(file, "/", &idx, giter_cb, &info)) > 0) {
+ while((ret = H5Literate(file, "/", H5_INDEX_NAME, H5_ITER_INC, &idx, liter_cb, &info, H5P_DEFAULT)) > 0) {
/* Verify return value from iterator gets propagated correctly */
- VERIFY(ret, 2, "H5Giterate");
+ VERIFY(ret, 2, "H5Literate");
/* Increment the number of times "2" is returned */
i++;
/* Verify that the index is the correct value */
- VERIFY(idx, i, "H5Giterate");
+ VERIFY(idx, (hsize_t)i, "H5Literate");
if(idx > (NDATASETS + 2))
TestErrPrintf("Group iteration function walked too far!\n");
@@ -301,7 +306,7 @@ static void test_iter_group(hid_t fapl, hbool_t new_format)
if(HDstrcmp(info.name, lnames[idx - 1]) != 0)
TestErrPrintf("Group iteration function didn't return name correctly for link - lnames[%u] = '%s'!\n", (idx - 1), lnames[idx - 1]);
} /* end while */
- VERIFY(ret, -1, "H5Giterate");
+ VERIFY(ret, -1, "H5Literate");
if(i != (NDATASETS + 2))
TestErrPrintf("%u: Group iteration function didn't perform multiple iterations correctly!\n", __LINE__);
@@ -310,15 +315,15 @@ static void test_iter_group(hid_t fapl, hbool_t new_format)
/* This also tests the "restarting" ability, because the index changes */
info.command = new_format ? RET_CHANGE2 : RET_CHANGE;
idx = i = 0;
- while((ret = H5Giterate(file, "/", &idx, giter_cb, &info)) >= 0) {
+ while((ret = H5Literate(file, "/", H5_INDEX_NAME, H5_ITER_INC, &idx, liter_cb, &info, H5P_DEFAULT)) >= 0) {
/* Verify return value from iterator gets propagated correctly */
- VERIFY(ret, 1, "H5Giterate");
+ VERIFY(ret, 1, "H5Literate");
/* Increment the number of times "1" is returned */
i++;
/* Verify that the index is the correct value */
- VERIFY(idx, (i + 10), "H5Giterate");
+ VERIFY(idx, (hsize_t)(i + 10), "H5Literate");
if(idx > (NDATASETS + 2))
TestErrPrintf("Group iteration function walked too far!\n");
@@ -326,7 +331,7 @@ static void test_iter_group(hid_t fapl, hbool_t new_format)
if(HDstrcmp(info.name, lnames[idx - 1]) != 0)
TestErrPrintf("Group iteration function didn't return name correctly for link - lnames[%u] = '%s'!\n", (idx - 1), lnames[idx - 1]);
} /* end while */
- VERIFY(ret, -1, "H5Giterate");
+ VERIFY(ret, -1, "H5Literate");
if(i != 42 || idx != 52)
TestErrPrintf("%u: Group iteration function didn't perform multiple iterations correctly!\n", __LINE__);
@@ -534,10 +539,12 @@ int iter_strcmp2(const void *s1, const void *s2)
/****************************************************************
**
-** giter_cb2(): Custom group iteration callback routine.
+** liter_cb2(): Custom link iteration callback routine.
**
****************************************************************/
-herr_t giter_cb2(hid_t loc_id, const char *name, void *opdata)
+static herr_t
+liter_cb2(hid_t loc_id, const char *name, const H5L_info_t UNUSED *link_info,
+ void *opdata)
{
const iter_info *test_info = (const iter_info *)opdata;
H5G_stat_t statbuf;
@@ -545,7 +552,7 @@ herr_t giter_cb2(hid_t loc_id, const char *name, void *opdata)
if(HDstrcmp(name, test_info->name)) {
TestErrPrintf("name = '%s', test_info = '%s'\n", name, test_info->name);
- return(-1);
+ return(H5_ITER_ERROR);
} /* end if */
/*
@@ -556,11 +563,11 @@ herr_t giter_cb2(hid_t loc_id, const char *name, void *opdata)
if(test_info->type != statbuf.type) {
TestErrPrintf("test_info->type = %d, statbuf.type = %d\n", test_info->type, statbuf.type);
- return(-1);
+ return(H5_ITER_ERROR);
} /* end if */
- return(1);
-} /* giter_cb2() */
+ return(H5_ITER_STOP);
+} /* liter_cb2() */
/****************************************************************
**
@@ -568,7 +575,8 @@ herr_t giter_cb2(hid_t loc_id, const char *name, void *opdata)
** for groups with large #'s of objects
**
****************************************************************/
-static void test_iter_group_large(hid_t fapl)
+static void
+test_iter_group_large(hid_t fapl)
{
hid_t file; /* HDF5 File IDs */
hid_t dataset; /* Dataset ID */
@@ -666,12 +674,14 @@ static void test_iter_group_large(hid_t fapl)
/* Iterate through the file to see members of the root group */
curr_name = &names[0];
- ret = H5Giterate(file, "/", NULL, giter_cb2, curr_name);
- CHECK(ret, FAIL, "H5Giterate");
- for(i = 1; i < 100; ) {
+ ret = H5Literate(file, "/", H5_INDEX_NAME, H5_ITER_INC, NULL, liter_cb2, curr_name, H5P_DEFAULT);
+ CHECK(ret, FAIL, "H5Literate");
+ for(i = 1; i < 100; i++) {
+ hsize_t idx = i;
+
curr_name = &names[i];
- ret = H5Giterate(file, "/", &i, giter_cb2, curr_name);
- CHECK(ret, FAIL, "H5Giterate");
+ ret = H5Literate(file, "/", H5_INDEX_NAME, H5_ITER_INC, &idx, liter_cb2, curr_name, H5P_DEFAULT);
+ CHECK(ret, FAIL, "H5Literate");
} /* end for */
/* Close file */
diff --git a/test/trefer.c b/test/trefer.c
index 6ea69fd..318858e 100644
--- a/test/trefer.c
+++ b/test/trefer.c
@@ -937,7 +937,8 @@ test_reference_obj_deleted(void)
**
****************************************************************/
static herr_t
-test_deref_iter_op(hid_t UNUSED group, const char *name, void *op_data)
+test_deref_iter_op(hid_t UNUSED group, const char *name, const H5L_info_t *info,
+ void *op_data)
{
int *count = (int *)op_data; /* Pointer to name counter */
herr_t ret_value;
@@ -1060,8 +1061,8 @@ test_reference_group(void)
CHECK(gid, FAIL, "H5Rdereference");
/* Iterate through objects in dereferenced group */
- ret = H5Giterate(gid, ".", NULL, test_deref_iter_op, &count);
- CHECK(ret, FAIL, "H5Giterate");
+ ret = H5Literate(gid, ".", H5_INDEX_NAME, H5_ITER_INC, NULL, test_deref_iter_op, &count, H5P_DEFAULT);
+ CHECK(ret, FAIL, "H5Literate");
/* Various queries on the group opened */
ret = H5Gget_num_objs(gid, &nobjs);
diff --git a/test/tunicode.c b/test/tunicode.c
index 788c8a3..66432a3 100644
--- a/test/tunicode.c
+++ b/test/tunicode.c
@@ -491,7 +491,7 @@ void test_objnames(hid_t fid, const char* string)
HDstrcpy(path_buf, GROUP2_NAME);
HDstrcat(path_buf, "/");
HDstrcat(path_buf, string);
- ret = H5Lcreate_hard(grp3_id, path_buf, H5G_SAME_LOC, string, H5P_DEFAULT, H5P_DEFAULT);
+ ret = H5Lcreate_hard(grp3_id, path_buf, H5L_SAME_LOC, string, H5P_DEFAULT, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Lcreate_hard");
/* Open named datatype using soft link */
diff --git a/test/unlink.c b/test/unlink.c
index 170c87d..a3a4213 100644
--- a/test/unlink.c
+++ b/test/unlink.c
@@ -181,7 +181,7 @@ test_many(hid_t file)
TESTING("forward unlink");
for(i = 0; i < how_many; i++) {
sprintf(name, "obj_%05d", i);
- if(H5Lcreate_hard(work, "/test_many_foo", H5G_SAME_LOC, name, H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if(H5Lcreate_hard(work, "/test_many_foo", H5L_SAME_LOC, name, H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
} /* end for */
for(i = 0; i < how_many; i++) {
sprintf(name, "obj_%05d", i);
@@ -193,7 +193,7 @@ test_many(hid_t file)
TESTING("backward unlink");
for(i = 0; i < how_many; i++) {
sprintf(name, "obj_%05d", i);
- if(H5Lcreate_hard(work, "/test_many_foo", H5G_SAME_LOC, name, H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if(H5Lcreate_hard(work, "/test_many_foo", H5L_SAME_LOC, name, H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
} /* end for */
for(i = (how_many - 1); i >= 0; --i) {
sprintf(name, "obj_%05d", i);
@@ -205,7 +205,7 @@ test_many(hid_t file)
TESTING("inward unlink");
for(i = 0; i < how_many; i++) {
sprintf(name, "obj_%05d", i);
- if(H5Lcreate_hard(work, "/test_many_foo", H5G_SAME_LOC, name, H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if(H5Lcreate_hard(work, "/test_many_foo", H5L_SAME_LOC, name, H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
} /* end for */
for(i = 0; i < how_many; i++) {
if(i % 2)
@@ -220,7 +220,7 @@ test_many(hid_t file)
TESTING("outward unlink");
for(i = 0; i < how_many; i++) {
sprintf(name, "obj_%05d", i);
- if(H5Lcreate_hard(work, "/test_many_foo", H5G_SAME_LOC, name, H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if(H5Lcreate_hard(work, "/test_many_foo", H5L_SAME_LOC, name, H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
} /* end for */
for(i = (how_many - 1); i >= 0; --i) {
if(i % 2)
@@ -380,9 +380,9 @@ test_new_move(hid_t fapl)
if(H5Lcreate_soft("/group1/group_move", grp_2, "soft", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
/* Move a group within the file. Both of source and destination use
- * H5G_SAME_LOC. Should fail. */
+ * H5L_SAME_LOC. Should fail. */
H5E_BEGIN_TRY {
- if(H5Lmove(H5G_SAME_LOC, "group_move", H5G_SAME_LOC, "group_new_name", H5P_DEFAULT, H5P_DEFAULT) != FAIL) TEST_ERROR
+ if(H5Lmove(H5L_SAME_LOC, "group_move", H5L_SAME_LOC, "group_new_name", H5P_DEFAULT, H5P_DEFAULT) != FAIL) TEST_ERROR
} H5E_END_TRY;
/* Move a group across files. Should fail. */