From 9181ed0fa4169e0442e257082f10c348d27042e5 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Thu, 17 Feb 2005 16:12:45 -0500 Subject: [svn-r10036] Purpose: New test Description: Add more regression tests for redistributing leafs in a level-2 B-tree Platforms tested: FreeBSD 4.11 (sleipnir) Too minor to require h5committest --- src/H5B2.c | 8 +-- test/btree2.c | 169 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 170 insertions(+), 7 deletions(-) diff --git a/src/H5B2.c b/src/H5B2.c index 35b806f..c9f4fb1 100644 --- a/src/H5B2.c +++ b/src/H5B2.c @@ -1706,18 +1706,18 @@ H5B2_iterate_node(H5F_t *f, hid_t dxpl_id, H5RC_t *bt2_shared, unsigned depth, /* Descend into child node, if current node is an internal node */ if(depth>0) { if((ret_value = H5B2_iterate_node(f,dxpl_id,bt2_shared,depth-1,&(node_ptrs[u]),op,op_data))<0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "node iteration failed") + HGOTO_ERROR(H5E_BTREE, H5E_CANTLIST, FAIL, "node iteration failed") } /* end if */ /* Make callback for current record */ if ((ret_value = (op)(H5B2_NAT_NREC(native,shared,u), op_data)) <0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "iterator function failed") + HGOTO_ERROR(H5E_BTREE, H5E_CANTLIST, FAIL, "iterator function failed") } /* end for */ /* Descend into last child node, if current node is an internal node */ if(depth>0) { if((ret_value = H5B2_iterate_node(f,dxpl_id,bt2_shared,depth-1,&(node_ptrs[u]),op,op_data))<0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "node iteration failed") + HGOTO_ERROR(H5E_BTREE, H5E_CANTLIST, FAIL, "node iteration failed") } /* end if */ done: @@ -1795,7 +1795,7 @@ H5B2_iterate(H5F_t *f, hid_t dxpl_id, const H5B2_class_t *type, haddr_t addr, if(root_ptr.node_nrec>0) { /* Iterate through nodes */ if((ret_value=H5B2_iterate_node(f,dxpl_id,bt2_shared,depth,&root_ptr,op,op_data))<0) - HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "node iteration failed") + HGOTO_ERROR(H5E_BTREE, H5E_CANTLIST, FAIL, "node iteration failed") } /* end if */ done: diff --git a/test/btree2.c b/test/btree2.c index 3283ff2..4526d96 100644 --- a/test/btree2.c +++ b/test/btree2.c @@ -770,14 +770,51 @@ test_insert_make_level2(hid_t fapl) TESTING("B-tree many - make level 2 B-tree"); /* Insert enough records to force root to split into 2 leaves */ - for(u=0; u