diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2018-03-15 21:54:30 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2018-03-15 21:54:30 (GMT) |
commit | 4a17aff4085ad6ee265b95730aca3f493056dec8 (patch) | |
tree | 8bfb665c6d95a2e3520fa1bb0ff54d95aff3923f /test/btree2.c | |
parent | 853ae26333592faf69cd8c454ef92ffea8549df5 (diff) | |
download | hdf5-4a17aff4085ad6ee265b95730aca3f493056dec8.zip hdf5-4a17aff4085ad6ee265b95730aca3f493056dec8.tar.gz hdf5-4a17aff4085ad6ee265b95730aca3f493056dec8.tar.bz2 |
Add API context interface and use it throughout the library.
Diffstat (limited to 'test/btree2.c')
-rw-r--r-- | test/btree2.c | 1832 |
1 files changed, 895 insertions, 937 deletions
diff --git a/test/btree2.c b/test/btree2.c index 4c820b3..fb0156c 100644 --- a/test/btree2.c +++ b/test/btree2.c @@ -25,6 +25,7 @@ #include "H5B2pkg.h" /* Other private headers that this test requires */ +#include "H5CXprivate.h" /* API Contexts */ #include "H5Iprivate.h" const char *FILENAME[] = { @@ -145,11 +146,11 @@ error: *------------------------------------------------------------------------- */ static int -create_btree(H5F_t *f, hid_t dxpl, const H5B2_create_t *cparam, +create_btree(H5F_t *f, const H5B2_create_t *cparam, H5B2_t **bt2, haddr_t *bt2_addr) { /* Create the v2 B-tree & get its address */ - if(NULL == (*bt2 = H5B2_create(f, dxpl, cparam, f))) + if(NULL == (*bt2 = H5B2_create(f, cparam, f))) FAIL_STACK_ERROR if(H5B2_get_addr(*bt2, bt2_addr/*out*/) < 0) FAIL_STACK_ERROR @@ -219,17 +220,17 @@ error: *------------------------------------------------------------------------- */ static int -reopen_btree(H5F_t *f, hid_t dxpl, H5B2_t **bt2, haddr_t bt2_addr, +reopen_btree(H5F_t *f, H5B2_t **bt2, haddr_t bt2_addr, const bt2_test_param_t *tparam) { /* Check for closing & re-opening the B-tree */ if(tparam->reopen_btree) { /* Close (empty) v2 B-tree */ - if(H5B2_close(*bt2, dxpl) < 0) + if(H5B2_close(*bt2) < 0) FAIL_STACK_ERROR /* Re-open v2 B-tree */ - if(NULL == (*bt2 = H5B2_open(f, dxpl, bt2_addr, f))) + if(NULL == (*bt2 = H5B2_open(f, bt2_addr, f))) FAIL_STACK_ERROR } /* end if */ @@ -289,11 +290,11 @@ error: *------------------------------------------------------------------------- */ static int -check_node_depth(H5B2_t *bt2, hid_t dxpl, void *record, unsigned depth) +check_node_depth(H5B2_t *bt2, void *record, unsigned depth) { int rec_depth; /* Depth of record in B-tree */ - if((rec_depth = H5B2_get_node_depth_test(bt2, dxpl, record)) < 0) + if((rec_depth = H5B2__get_node_depth_test(bt2, record)) < 0) FAIL_STACK_ERROR if((unsigned)rec_depth != depth) TEST_ERROR @@ -320,12 +321,12 @@ error: *------------------------------------------------------------------------- */ static int -check_node_info(H5B2_t *bt2, hid_t dxpl, hsize_t record, +check_node_info(H5B2_t *bt2, hsize_t record, H5B2_node_info_test_t *ninfo) { H5B2_node_info_test_t rec_ninfo; /* Node info for record in B-tree */ - if(H5B2_get_node_info_test(bt2, dxpl, &record, &rec_ninfo) < 0) + if(H5B2__get_node_info_test(bt2, &record, &rec_ninfo) < 0) FAIL_STACK_ERROR if(rec_ninfo.depth != ninfo->depth) TEST_ERROR @@ -655,7 +656,6 @@ test_insert_basic(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -672,7 +672,7 @@ test_insert_basic(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR PASSED(); @@ -683,12 +683,12 @@ test_insert_basic(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree iteration: empty B-tree"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Attempt to iterate over a B-tree with no records */ idx = 0; - if(H5B2_iterate(bt2, dxpl, iter_cb, &idx) < 0) + if(H5B2_iterate(bt2, iter_cb, &idx) < 0) FAIL_STACK_ERROR /* Make certain that the index hasn't changed */ if(idx != 0) @@ -696,13 +696,13 @@ test_insert_basic(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to find record in B-tree with no records */ idx = 0; - if(H5B2_find(bt2, dxpl, &idx, find_cb, NULL) != FALSE) + if(H5B2_find(bt2, &idx, find_cb, NULL) != FALSE) TEST_ERROR /* Attempt to index record in B-tree with no records */ idx = 0; H5E_BEGIN_TRY { - ret = H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)0, find_cb, NULL); + ret = H5B2_index(bt2, H5_ITER_INC, (hsize_t)0, find_cb, NULL); } H5E_END_TRY; /* Should fail */ if(ret != FAIL) @@ -716,37 +716,37 @@ test_insert_basic(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree insert: first record"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR record = 42; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR /* Attempt to find non-existant record in B-tree with 1 record */ /* (Should not be found, but not fail) */ idx = 41; - if(H5B2_find(bt2, dxpl, &idx, find_cb, &idx) != FALSE) + if(H5B2_find(bt2, &idx, find_cb, &idx) != FALSE) TEST_ERROR /* Try again with NULL 'op' */ /* (Should not be found, but not fail) */ - if(H5B2_find(bt2, dxpl, &idx, NULL, NULL) != FALSE) + if(H5B2_find(bt2, &idx, NULL, NULL) != FALSE) TEST_ERROR /* Attempt to find existant record in B-tree with 1 record */ idx = 42; - if(H5B2_find(bt2, dxpl, &idx, find_cb, &idx) != TRUE) + if(H5B2_find(bt2, &idx, find_cb, &idx) != TRUE) TEST_ERROR /* Try again with NULL 'op' */ - if(H5B2_find(bt2, dxpl, &idx, NULL, NULL) != TRUE) + if(H5B2_find(bt2, &idx, NULL, NULL) != TRUE) TEST_ERROR /* Attempt to index non-existant record in B-tree with 1 record */ idx = 0; H5E_BEGIN_TRY { - ret = H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)1, find_cb, NULL); + ret = H5B2_index(bt2, H5_ITER_INC, (hsize_t)1, find_cb, NULL); } H5E_END_TRY; /* Should fail */ if(ret != FAIL) @@ -754,7 +754,7 @@ test_insert_basic(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to index existing record in B-tree with 1 record */ idx = 42; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)0, find_cb, &idx) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)0, find_cb, &idx) < 0) TEST_ERROR PASSED(); @@ -765,45 +765,45 @@ test_insert_basic(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree insert: several records"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* * Test inserting second record into v2 B-tree, before all other records */ record = 34; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR /* * Test inserting third record into v2 B-tree, after all other records */ record = 56; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR /* * Test inserting fourth record into v2 B-tree, in the middle of other records */ record = 38; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR /* Attempt to find non-existant record in level-0 B-tree with several records */ /* (Should not be found, but not fail) */ idx = 41; - if(H5B2_find(bt2, dxpl, &idx, find_cb, &idx) != FALSE) + if(H5B2_find(bt2, &idx, find_cb, &idx) != FALSE) TEST_ERROR /* Attempt to find existant record in level-0 B-tree with several record */ idx = 56; - if(H5B2_find(bt2, dxpl, &idx, find_cb, &idx) != TRUE) + if(H5B2_find(bt2, &idx, find_cb, &idx) != TRUE) TEST_ERROR /* Attempt to index non-existant record in B-tree with several records */ idx = 0; H5E_BEGIN_TRY { - ret = H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)4, find_cb, NULL); + ret = H5B2_index(bt2, H5_ITER_INC, (hsize_t)4, find_cb, NULL); } H5E_END_TRY; /* Should fail */ if(ret != FAIL) @@ -811,20 +811,20 @@ test_insert_basic(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to index existing record in B-tree with several records */ idx = 34; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)0, find_cb, &idx) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)0, find_cb, &idx) < 0) TEST_ERROR idx = 38; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)1, find_cb, &idx) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)1, find_cb, &idx) < 0) TEST_ERROR idx = 42; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)2, find_cb, &idx) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)2, find_cb, &idx) < 0) TEST_ERROR idx = 56; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)3, find_cb, &idx) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)3, find_cb, &idx) < 0) TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -840,7 +840,7 @@ test_insert_basic(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return(1); @@ -869,7 +869,6 @@ test_insert_split_root(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -888,13 +887,13 @@ test_insert_split_root(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Insert records to fill root leaf node */ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC - 1); u++) { record = u + 2; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -904,16 +903,16 @@ test_insert_split_root(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = (hsize_t)33; - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Insert record to split root leaf node */ record = INSERT_SPLIT_ROOT_NREC + 1; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR /* Check up on B-tree */ @@ -922,20 +921,20 @@ test_insert_split_root(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = (hsize_t)33; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Insert a couple more records, on the left side of the B-tree */ record = 0; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR record = 1; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR /* Check up on B-tree */ @@ -944,17 +943,17 @@ test_insert_split_root(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = (hsize_t)33; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Iterate over B-tree to check records have been inserted correctly */ idx = 0; - if(H5B2_iterate(bt2, dxpl, iter_cb, &idx) < 0) + if(H5B2_iterate(bt2, iter_cb, &idx) < 0) FAIL_STACK_ERROR /* Make certain that the index is correct */ @@ -964,23 +963,23 @@ test_insert_split_root(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to find non-existant record in level-1 B-tree */ /* (Should not be found, but not fail) */ idx = INSERT_SPLIT_ROOT_NREC + 10; - if(H5B2_find(bt2, dxpl, &idx, find_cb, &idx) != FALSE) + if(H5B2_find(bt2, &idx, find_cb, &idx) != FALSE) TEST_ERROR /* Attempt to find existant record in root of level-1 B-tree */ idx = 33; - if(H5B2_find(bt2, dxpl, &idx, find_cb, &idx) != TRUE) + if(H5B2_find(bt2, &idx, find_cb, &idx) != TRUE) FAIL_STACK_ERROR /* Attempt to find existant record in leaf of level-1 B-tree */ idx = 56; - if(H5B2_find(bt2, dxpl, &idx, find_cb, &idx) != TRUE) + if(H5B2_find(bt2, &idx, find_cb, &idx) != TRUE) FAIL_STACK_ERROR /* Attempt to index non-existant record in level-1 B-tree */ idx = 0; H5E_BEGIN_TRY { - ret = H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)(INSERT_SPLIT_ROOT_NREC+2), find_cb, NULL); + ret = H5B2_index(bt2, H5_ITER_INC, (hsize_t)(INSERT_SPLIT_ROOT_NREC+2), find_cb, NULL); } H5E_END_TRY; /* Should fail */ if(ret != FAIL) @@ -988,21 +987,21 @@ test_insert_split_root(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to index existing record in root of level-1 B-tree */ idx = 33; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)33, find_cb, &idx) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)33, find_cb, &idx) < 0) FAIL_STACK_ERROR /* Attempt to index existing record in left leaf of level-1 B-tree */ idx = 0; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)0, find_cb, &idx) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)0, find_cb, &idx) < 0) FAIL_STACK_ERROR /* Attempt to index existing record in right leaf of level-1 B-tree */ idx = 50; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)50, find_cb, &idx) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)50, find_cb, &idx) < 0) FAIL_STACK_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -1016,7 +1015,7 @@ test_insert_split_root(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -1046,7 +1045,6 @@ test_insert_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -1063,13 +1061,13 @@ test_insert_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Insert enough records to force root to split into 2 leaves */ for(u = 0; u < INSERT_SPLIT_ROOT_NREC; u++) { record = u + (INSERT_SPLIT_ROOT_NREC/2) + 1; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -1079,18 +1077,18 @@ test_insert_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = (hsize_t)INSERT_SPLIT_ROOT_NREC; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Force redistribution from left node into right node */ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC / 2) + 1; u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -1100,11 +1098,11 @@ test_insert_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = (hsize_t)((INSERT_SPLIT_ROOT_NREC / 2) + (INSERT_SPLIT_ROOT_NREC / 4) + 1); - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -1116,13 +1114,13 @@ test_insert_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree insert: redistribute 2 leaves in level 1 B-tree (r->l)"); /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Insert enough records to force root to split into 2 leaves */ for(u = 0; u < INSERT_SPLIT_ROOT_NREC; u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -1132,17 +1130,17 @@ test_insert_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = (hsize_t)(INSERT_SPLIT_ROOT_NREC / 2); - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Force redistribution from left node into right node */ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC / 2) + 1; u++) { record = u + INSERT_SPLIT_ROOT_NREC; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -1152,11 +1150,11 @@ test_insert_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = (hsize_t)((INSERT_SPLIT_ROOT_NREC / 2) + (INSERT_SPLIT_ROOT_NREC / 4) + 1); - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -1171,7 +1169,7 @@ test_insert_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -1201,7 +1199,6 @@ test_insert_level1_side_split(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -1218,13 +1215,13 @@ test_insert_level1_side_split(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Insert enough records to force root to split into 2 leaves */ for(u = 0; u < INSERT_SPLIT_ROOT_NREC; u++) { record = u + INSERT_SPLIT_ROOT_NREC; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -1234,17 +1231,17 @@ test_insert_level1_side_split(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = INSERT_SPLIT_ROOT_NREC + (INSERT_SPLIT_ROOT_NREC / 2); - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Force left node to split */ for(u = 0; u < INSERT_SPLIT_ROOT_NREC; u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -1254,14 +1251,14 @@ test_insert_level1_side_split(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = 31; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 63; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -1273,13 +1270,13 @@ test_insert_level1_side_split(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree insert: split side leaf into 2 leaves in level 1 B-tree (r->l)"); /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Insert enough records to force root to split into 2 leaves */ for(u = 0; u < INSERT_SPLIT_ROOT_NREC; u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -1289,17 +1286,17 @@ test_insert_level1_side_split(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = (INSERT_SPLIT_ROOT_NREC / 2); - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Force right node to split */ for(u = 0; u < INSERT_SPLIT_ROOT_NREC; u++) { record = u + INSERT_SPLIT_ROOT_NREC; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -1309,14 +1306,14 @@ test_insert_level1_side_split(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = 62; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 94; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -1331,7 +1328,7 @@ test_insert_level1_side_split(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -1363,7 +1360,6 @@ test_insert_level1_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -1381,13 +1377,13 @@ test_insert_level1_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Insert enough records to force root to split into 2 leaves */ for(u = 0; u < INSERT_SPLIT_ROOT_NREC; u++) { record = u + (INSERT_SPLIT_ROOT_NREC + (INSERT_SPLIT_ROOT_NREC / 2) + 1); - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -1397,17 +1393,17 @@ test_insert_level1_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = (2 * INSERT_SPLIT_ROOT_NREC); - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Force left node to split */ for(u = 0; u < INSERT_SPLIT_ROOT_NREC; u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -1417,20 +1413,20 @@ test_insert_level1_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = (INSERT_SPLIT_ROOT_NREC / 2); - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = (INSERT_SPLIT_ROOT_NREC + (INSERT_SPLIT_ROOT_NREC / 2) + 1); - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Insert records to force middle node to redistribute */ for(u = 0; u < ((INSERT_SPLIT_ROOT_NREC / 2) + 1); u++) { record = u + INSERT_SPLIT_ROOT_NREC; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -1440,19 +1436,19 @@ test_insert_level1_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = 52; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 105; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Iterate over B-tree to check records have been inserted correctly */ idx = 0; - if(H5B2_iterate(bt2, dxpl, iter_cb, &idx) < 0) + if(H5B2_iterate(bt2, iter_cb, &idx) < 0) FAIL_STACK_ERROR /* Make certain that the index is correct */ @@ -1460,7 +1456,7 @@ test_insert_level1_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -1475,7 +1471,7 @@ test_insert_level1_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -1506,7 +1502,6 @@ test_insert_level1_middle_split(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -1524,13 +1519,13 @@ test_insert_level1_middle_split(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Insert enough records to force root to split into 2 leaves */ for(u = 0; u < INSERT_SPLIT_ROOT_NREC; u++) { record = u + (INSERT_SPLIT_ROOT_NREC * 2); - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -1540,17 +1535,17 @@ test_insert_level1_middle_split(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = (2 * INSERT_SPLIT_ROOT_NREC) + (INSERT_SPLIT_ROOT_NREC / 2); - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Force split from left node into right node */ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC * 2); u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -1560,22 +1555,22 @@ test_insert_level1_middle_split(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = 62; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 94; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 126; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Iterate over B-tree to check records have been inserted correctly */ idx = 0; - if(H5B2_iterate(bt2, dxpl, iter_cb, &idx) < 0) + if(H5B2_iterate(bt2, iter_cb, &idx) < 0) FAIL_STACK_ERROR /* Make certain that the index is correct */ @@ -1583,7 +1578,7 @@ test_insert_level1_middle_split(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -1598,7 +1593,7 @@ test_insert_level1_middle_split(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -1625,7 +1620,6 @@ test_insert_make_level2(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -1644,18 +1638,18 @@ test_insert_make_level2(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Insert enough records to force root to split into 2 internal nodes */ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC * 9); u++) { record = u + 2; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ for(; u < ((INSERT_SPLIT_ROOT_NREC * 29) + 1); u++) { record = u + 4; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -1665,37 +1659,37 @@ test_insert_make_level2(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = 948; - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Add some extra records to left-most leaf */ record = 0; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR record = 1; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR /* Add some extra records to middle leaf */ record = (INSERT_SPLIT_ROOT_NREC * 9) + 2; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR record = (INSERT_SPLIT_ROOT_NREC * 9) + 3; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Iterate over B-tree to check records have been inserted correctly */ idx = 0; - if(H5B2_iterate(bt2, dxpl, iter_cb, &idx) < 0) + if(H5B2_iterate(bt2, iter_cb, &idx) < 0) FAIL_STACK_ERROR /* Make certain that the index is correct */ @@ -1705,43 +1699,43 @@ test_insert_make_level2(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to find non-existant record in level-2 B-tree */ /* (Should not be found, but not fail) */ idx = INSERT_SPLIT_ROOT_NREC * 30; - if(H5B2_find(bt2, dxpl, &idx, find_cb, &idx) != FALSE) + if(H5B2_find(bt2, &idx, find_cb, &idx) != FALSE) TEST_ERROR /* Attempt to find existant record in root of level-2 B-tree */ idx = 948; - if(H5B2_find(bt2, dxpl, &idx, find_cb, &idx) != TRUE) + if(H5B2_find(bt2, &idx, find_cb, &idx) != TRUE) FAIL_STACK_ERROR /* Check with B-tree */ record = 948; - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR /* Attempt to find existant record in internal node of level-2 B-tree */ idx = 505; - if(H5B2_find(bt2, dxpl, &idx, find_cb, &idx) != TRUE) + if(H5B2_find(bt2, &idx, find_cb, &idx) != TRUE) FAIL_STACK_ERROR /* Check with B-tree */ record = 505; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Attempt to find existant record in leaf of level-2 B-tree */ idx = 555; - if(H5B2_find(bt2, dxpl, &idx, find_cb, &idx) != TRUE) + if(H5B2_find(bt2, &idx, find_cb, &idx) != TRUE) FAIL_STACK_ERROR /* Check with B-tree */ record = 555; - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR /* Attempt to index non-existant record in level-2 B-tree */ idx = 0; H5E_BEGIN_TRY { - ret = H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)(INSERT_SPLIT_ROOT_NREC * 30), find_cb, NULL); + ret = H5B2_index(bt2, H5_ITER_INC, (hsize_t)(INSERT_SPLIT_ROOT_NREC * 30), find_cb, NULL); } H5E_END_TRY; /* Should fail */ if(ret != FAIL) @@ -1749,21 +1743,21 @@ test_insert_make_level2(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to index existing record in root of level-2 B-tree */ idx = 948; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)948, find_cb, &idx) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)948, find_cb, &idx) < 0) FAIL_STACK_ERROR /* Attempt to index existing record in internal node of level-2 B-tree */ idx = 505; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)505, find_cb, &idx) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)505, find_cb, &idx) < 0) FAIL_STACK_ERROR /* Attempt to index existing record in leaf of level-2 B-tree */ idx = 555; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)555, find_cb, &idx) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)555, find_cb, &idx) < 0) FAIL_STACK_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -1778,7 +1772,7 @@ test_insert_make_level2(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -1807,7 +1801,6 @@ test_insert_level2_leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -1825,19 +1818,19 @@ test_insert_level2_leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Insert enough records to force root to split into 2 internal nodes */ /* And fill rightmost leaf */ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC * 8); u++) { record = u + (INSERT_SPLIT_ROOT_NREC / 2) + 1; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ for(; u < ((INSERT_SPLIT_ROOT_NREC * 29) + (INSERT_SPLIT_ROOT_NREC / 2)); u++) { record = u + INSERT_SPLIT_ROOT_NREC + 1; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -1847,22 +1840,22 @@ test_insert_level2_leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = 1008; - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR record = 1859; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 1921; - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Insert record to force redistribution of rightmost leaf */ record = u + INSERT_SPLIT_ROOT_NREC + 1; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR /* Check up on B-tree */ @@ -1871,13 +1864,13 @@ test_insert_level2_leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = 1008; - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR record = 1875; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 1922; - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR PASSED(); @@ -1885,7 +1878,7 @@ test_insert_level2_leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree insert: redistrib left-most leaf in level 2 B-tree"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Check up on B-tree */ @@ -1894,13 +1887,13 @@ test_insert_level2_leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = 1008; - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR record = 94; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 32; - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR /* Add more records to left-most leaf, to force a 2->1 split and then a @@ -1908,7 +1901,7 @@ test_insert_level2_leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, */ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC / 2) + 1; u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -1918,13 +1911,13 @@ test_insert_level2_leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = 1008; - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR record = 47; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 0; - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR PASSED(); @@ -1932,7 +1925,7 @@ test_insert_level2_leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree insert: redistrib middle leaf in level 2 B-tree"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Check up on B-tree */ @@ -1941,22 +1934,22 @@ test_insert_level2_leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = 1008; - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) /* Record in root node */ + if(check_node_depth(bt2, &record, (unsigned)2) < 0) /* Record in root node */ TEST_ERROR record = 535; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) /* Record in middle node before insertion point */ + if(check_node_depth(bt2, &record, (unsigned)1) < 0) /* Record in middle node before insertion point */ TEST_ERROR record = 630; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) /* Record in middle node after insertion point */ + if(check_node_depth(bt2, &record, (unsigned)1) < 0) /* Record in middle node after insertion point */ TEST_ERROR record = 568; - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) /* Record in leaf node just after insertion point */ + if(check_node_depth(bt2, &record, (unsigned)0) < 0) /* Record in leaf node just after insertion point */ TEST_ERROR /* Add more records to middle leaf, to force a split and a 3 node redistribution on middle leaf */ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC / 2) + 1; u++) { record = u + (INSERT_SPLIT_ROOT_NREC * 8) + (INSERT_SPLIT_ROOT_NREC / 2) + 1; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -1966,25 +1959,25 @@ test_insert_level2_leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = 1008; - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) /* Record in root node */ + if(check_node_depth(bt2, &record, (unsigned)2) < 0) /* Record in root node */ TEST_ERROR record = 524; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) /* Record in middle node before insertion point */ + if(check_node_depth(bt2, &record, (unsigned)1) < 0) /* Record in middle node before insertion point */ TEST_ERROR record = 577; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) /* Record in middle node after insertion point */ + if(check_node_depth(bt2, &record, (unsigned)1) < 0) /* Record in middle node after insertion point */ TEST_ERROR record = 568; - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) /* Record in leaf node just after insertion point */ + if(check_node_depth(bt2, &record, (unsigned)0) < 0) /* Record in leaf node just after insertion point */ TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Iterate over B-tree to check records have been inserted correctly */ idx = 0; - if(H5B2_iterate(bt2, dxpl, iter_cb, &idx) < 0) + if(H5B2_iterate(bt2, iter_cb, &idx) < 0) FAIL_STACK_ERROR /* Make certain that the index is correct */ @@ -1992,7 +1985,7 @@ test_insert_level2_leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -2007,7 +2000,7 @@ test_insert_level2_leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -2036,7 +2029,6 @@ test_insert_level2_leaf_split(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -2054,18 +2046,18 @@ test_insert_level2_leaf_split(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Insert enough records to force root to split into 2 internal nodes */ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC * 8); u++) { record = u + 1; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ for(; u < ((INSERT_SPLIT_ROOT_NREC * 29) + (INSERT_SPLIT_ROOT_NREC / 2)); u++) { record = u + 2; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -2075,23 +2067,23 @@ test_insert_level2_leaf_split(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = 946; /* Record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR record = 1797; /* Right-most record in right internal node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 1859; /* Right-most record in right-most leaf */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Insert enough records to force right-most leaf to split */ for(u = 0; u < ((INSERT_SPLIT_ROOT_NREC / 2) + 1); u++) { record = u + (INSERT_SPLIT_ROOT_NREC * 29) + (INSERT_SPLIT_ROOT_NREC / 2) + 2; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -2101,16 +2093,16 @@ test_insert_level2_leaf_split(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = 946; /* Record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR record = 1828; /* Next-to-right-most record in right-most internal node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 1860; /* Right-most record in right-most internal node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 1891; /* Right-most record in right-most leaf */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR PASSED(); @@ -2118,7 +2110,7 @@ test_insert_level2_leaf_split(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree insert: split left-most leaf in level 2 B-tree"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Check up on B-tree */ @@ -2127,18 +2119,18 @@ test_insert_level2_leaf_split(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = 946; /* Record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR record = 63; /* Left-most record in left-most internal node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 1; /* Left-most record in left-most leaf */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR /* Add another record to left-most leaf, to force a 1->2 node split on left leaf */ record = 0; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR /* Check up on B-tree */ @@ -2147,16 +2139,16 @@ test_insert_level2_leaf_split(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = 946; /* Record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR record = 63; /* Left-most record in left-most internal node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 32; /* Left-most record in left internal node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 0; /* Left-most record in left-most leaf */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR PASSED(); @@ -2164,7 +2156,7 @@ test_insert_level2_leaf_split(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree insert: split middle leaf in level 2 B-tree"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Check up on B-tree */ @@ -2173,21 +2165,21 @@ test_insert_level2_leaf_split(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = 946; /* Record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR record = 504; /* Record in internal node just before insertion point */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 568; /* Record in internal node just after insertion point */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 506; /* Record in leaf node just after insertion point */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR /* Add another record to middle leaf, to force a node split on middle leaf */ record = (INSERT_SPLIT_ROOT_NREC * 8) + 1; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR /* Check up on B-tree */ @@ -2196,28 +2188,28 @@ test_insert_level2_leaf_split(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = 946; /* Record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR record = 504; /* Left-most record of split in left internal node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 537; /* Middle record of split in left internal node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 568; /* Right-most record of split in left internal node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 506; /* Record in leaf node just after insertion point */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Iterate over B-tree to check records have been inserted correctly */ idx = 0; - if(H5B2_iterate(bt2, dxpl, iter_cb, &idx) < 0) + if(H5B2_iterate(bt2, iter_cb, &idx) < 0) FAIL_STACK_ERROR /* Make certain that the index is correct */ @@ -2225,7 +2217,7 @@ test_insert_level2_leaf_split(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -2240,7 +2232,7 @@ test_insert_level2_leaf_split(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -2270,7 +2262,6 @@ test_insert_level2_2internal_redistrib(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -2288,14 +2279,14 @@ test_insert_level2_2internal_redistrib(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Insert enough records to force root to split into 2 internal nodes */ /* And fill up right internal node, to just before to redistribute it */ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC * 44); u++) { record = u + (INSERT_SPLIT_ROOT_NREC * 6) - 4; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -2305,22 +2296,22 @@ test_insert_level2_2internal_redistrib(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = 1318; /* Record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR record = 3114; /* Right-most record in right internal node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 3145; /* Right-most record in right leaf node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Insert record to redistribute right-most internal node */ record = u + (INSERT_SPLIT_ROOT_NREC * 6) - 4; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR /* Check up on B-tree */ @@ -2329,13 +2320,13 @@ test_insert_level2_2internal_redistrib(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = 1822; /* Record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR record = 3114; /* Right-most record in right internal node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 3146; /* Right-most record in right leaf node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR PASSED(); @@ -2343,7 +2334,7 @@ test_insert_level2_2internal_redistrib(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree insert: redist. 2 internal (l->r) in level 2 B-tree"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Check up on B-tree */ @@ -2352,19 +2343,19 @@ test_insert_level2_2internal_redistrib(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = 1822; /* Record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR record = 436; /* Left-most record in left internal node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 374; /* Left-most record in left leaf node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR /* Force left-most internal node to redistribute */ for(u = 0; u < ((INSERT_SPLIT_ROOT_NREC * 6) - 4); u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -2374,22 +2365,22 @@ test_insert_level2_2internal_redistrib(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = 1570; /* Record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR record = 61; /* Left-most record in left internal node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 0; /* Left-most record in left leaf node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Iterate over B-tree to check records have been inserted correctly */ idx = 0; - if(H5B2_iterate(bt2, dxpl, iter_cb, &idx) < 0) + if(H5B2_iterate(bt2, iter_cb, &idx) < 0) FAIL_STACK_ERROR /* Make certain that the index is correct */ @@ -2397,7 +2388,7 @@ test_insert_level2_2internal_redistrib(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -2412,7 +2403,7 @@ test_insert_level2_2internal_redistrib(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -2442,7 +2433,6 @@ test_insert_level2_2internal_split(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -2460,14 +2450,14 @@ test_insert_level2_2internal_split(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Insert enough records to force root to split into 2 internal nodes */ /* (And fill up two child internal nodes) */ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC * 59); u++) { record = u + (INSERT_SPLIT_ROOT_NREC * 14) - (INSERT_SPLIT_ROOT_NREC / 4) + 3; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -2477,22 +2467,22 @@ test_insert_level2_2internal_split(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = 2759; /* Record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR record = 4555; /* Right-most record in right internal node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 4586; /* Right-most record in right leaf node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Insert record to split right-most internal node */ record = u + (INSERT_SPLIT_ROOT_NREC * 14) - (INSERT_SPLIT_ROOT_NREC / 4) + 3; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR /* Check up on B-tree */ @@ -2501,16 +2491,16 @@ test_insert_level2_2internal_split(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = 2759; /* Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR record = 3704; /* Right record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR record = 4555; /* Right-most record in right internal node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 4387; /* Right-most record in right leaf node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR PASSED(); @@ -2518,7 +2508,7 @@ test_insert_level2_2internal_split(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree insert: split side internal node to 2 in level 2 B-tree (l->2)"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Check up on B-tree */ @@ -2527,19 +2517,19 @@ test_insert_level2_2internal_split(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = 2759; /* Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR record = 932; /* Left-most record in left internal node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 870; /* Left-most record in left leaf node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR /* Force left-most internal node to split */ for(u = 0; u < ((INSERT_SPLIT_ROOT_NREC * 14) - (INSERT_SPLIT_ROOT_NREC / 4) + 3); u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -2549,25 +2539,25 @@ test_insert_level2_2internal_split(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = 870; /* Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR record = 1814; /* Next-to-left-most record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR record = 61; /* Left-most record in left internal node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 0; /* Left-most record in left leaf node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Iterate over B-tree to check records have been inserted correctly */ idx = 0; - if(H5B2_iterate(bt2, dxpl, iter_cb, &idx) < 0) + if(H5B2_iterate(bt2, iter_cb, &idx) < 0) FAIL_STACK_ERROR /* Make certain that the index is correct */ @@ -2575,7 +2565,7 @@ test_insert_level2_2internal_split(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -2590,7 +2580,7 @@ test_insert_level2_2internal_split(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -2621,7 +2611,6 @@ test_insert_level2_3internal_redistrib(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -2639,18 +2628,18 @@ test_insert_level2_3internal_redistrib(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Insert enough records to force root to split into 3 internal nodes */ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC * 36); u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ for(; u < ((INSERT_SPLIT_ROOT_NREC * 59) + 1); u++) { record = u + (INSERT_SPLIT_ROOT_NREC * 13) + ((3 * INSERT_SPLIT_ROOT_NREC) / 4) + 3; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -2660,29 +2649,29 @@ test_insert_level2_3internal_redistrib(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = 1889; /* Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR record = 3703; /* Right record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR record = 2267; /* Record to left of insertion point in middle internal node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 3199; /* Record to right of insertion point in middle internal node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 3137; /* Record just above insertion point in leaf node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Insert records to fill up middle internal node */ for(u = 0; u < ((INSERT_SPLIT_ROOT_NREC * 13) + ((3 * INSERT_SPLIT_ROOT_NREC) / 4) + 2); u++) { record = u + (INSERT_SPLIT_ROOT_NREC * 36); - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -2692,28 +2681,28 @@ test_insert_level2_3internal_redistrib(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = 1889; /* Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR record = 3703; /* Right record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR record = 3104; /* Record to left of insertion point in middle internal node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 3137; /* Record to right of insertion point in middle internal node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 3135; /* Record just above insertion point in leaf node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Insert another record, forcing the middle internal node to redistribute */ record = u + (INSERT_SPLIT_ROOT_NREC * 36); - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR /* Check up on B-tree */ @@ -2722,30 +2711,30 @@ test_insert_level2_3internal_redistrib(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = 1574; /* Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR record = 3104; /* Right record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR #ifdef NONE record = 2862; /* Record to left of insertion point in right internal node (now) */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR #endif /* NONE */ record = 3137; /* Record to right of insertion point in right internal node (now) */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 3135; /* Record just above insertion point in leaf node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Iterate over B-tree to check records have been inserted correctly */ idx = 0; - if(H5B2_iterate(bt2, dxpl, iter_cb, &idx) < 0) + if(H5B2_iterate(bt2, iter_cb, &idx) < 0) FAIL_STACK_ERROR /* Make certain that the index is correct */ @@ -2753,7 +2742,7 @@ test_insert_level2_3internal_redistrib(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -2768,7 +2757,7 @@ test_insert_level2_3internal_redistrib(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -2799,7 +2788,6 @@ test_insert_level2_3internal_split(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -2817,24 +2805,24 @@ test_insert_level2_3internal_split(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Insert enough records to force root to split into 3 internal nodes */ /* (and fill right internal node) */ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC * 31); u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ for(; u < (INSERT_SPLIT_ROOT_NREC * 74); u++) { record = u + ((INSERT_SPLIT_ROOT_NREC * 13) + ((3 * INSERT_SPLIT_ROOT_NREC) / 4) + 3); - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Check up on B-tree */ @@ -2843,25 +2831,25 @@ test_insert_level2_3internal_split(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = 1889; /* Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR record = 3703; /* Right record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR record = 1952; /* Record to left of insertion point in middle internal node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 2884; /* Record to right of insertion point in middle internal node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 2822; /* Record just after insertion point in leaf node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR /* Insert records to fill up middle internal node */ for(u = 0; u < ((INSERT_SPLIT_ROOT_NREC * 13) + ((3 * INSERT_SPLIT_ROOT_NREC) / 4) + 2); u++) { record = u + (INSERT_SPLIT_ROOT_NREC * 31); - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -2871,28 +2859,28 @@ test_insert_level2_3internal_split(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = 1889; /* Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR record = 3703; /* Right record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR record = 2789; /* Record to left of insertion point in middle internal node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 2822; /* Record to right of insertion point in middle internal node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 2823; /* Record just above insertion point in leaf node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Insert record to split middle internal node */ record = u + (INSERT_SPLIT_ROOT_NREC * 31); - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR /* Check up on B-tree */ @@ -2901,33 +2889,33 @@ test_insert_level2_3internal_split(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record = 1889; /* Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR record = 2789; /* Middle record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR record = 3703; /* Right record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR #ifdef NONE record = 3049; /* Record to left of insertion point in middle internal node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR #endif /* NONE */ record = 2822; /* Record to right of insertion point in middle internal node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 2823; /* Record just above insertion point in leaf node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Iterate over B-tree to check records have been inserted correctly */ idx = 0; - if(H5B2_iterate(bt2, dxpl, iter_cb, &idx) < 0) + if(H5B2_iterate(bt2, iter_cb, &idx) < 0) FAIL_STACK_ERROR /* Make certain that the index is correct */ @@ -2935,7 +2923,7 @@ test_insert_level2_3internal_split(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -2950,7 +2938,7 @@ test_insert_level2_3internal_split(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -2979,7 +2967,6 @@ test_insert_lots(hid_t fapl, const H5B2_create_t *cparam, hid_t file = -1; /* File ID */ char filename[1024]; /* Filename to use */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -3038,13 +3025,13 @@ HDfprintf(stderr,"curr_time=%lu\n",(unsigned long)curr_time); STACK_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Insert random records */ for(u = 0; u < INSERT_MANY; u++) { record = records[u]; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -3055,7 +3042,7 @@ HDfprintf(stderr,"curr_time=%lu\n",(unsigned long)curr_time); TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -3076,7 +3063,7 @@ HDfprintf(stderr,"curr_time=%lu\n",(unsigned long)curr_time); STACK_ERROR /* Re-open v2 B-tree */ - if(NULL == (bt2 = H5B2_open(f, dxpl, bt2_addr, f))) + if(NULL == (bt2 = H5B2_open(f, bt2_addr, f))) FAIL_STACK_ERROR /* Check up on B-tree after re-open */ @@ -3087,7 +3074,7 @@ HDfprintf(stderr,"curr_time=%lu\n",(unsigned long)curr_time); /* Iterate over B-tree to check records have been inserted correctly */ idx = 0; - if(H5B2_iterate(bt2, dxpl, iter_cb, &idx) < 0) + if(H5B2_iterate(bt2, iter_cb, &idx) < 0) FAIL_STACK_ERROR /* Make certain that the index is correct */ @@ -3097,7 +3084,7 @@ HDfprintf(stderr,"curr_time=%lu\n",(unsigned long)curr_time); /* Attempt to find non-existant record in level-4 B-tree */ /* (Should not be found, but not fail) */ idx = INSERT_MANY * 2; - if(H5B2_find(bt2, dxpl, &idx, find_cb, &idx) != FALSE) + if(H5B2_find(bt2, &idx, find_cb, &idx) != FALSE) TEST_ERROR /* Find random records */ @@ -3106,19 +3093,19 @@ HDfprintf(stderr,"curr_time=%lu\n",(unsigned long)curr_time); idx = (hsize_t)(HDrandom()%INSERT_MANY); /* Attempt to find existant record in root of level-4 B-tree */ - if(H5B2_find(bt2, dxpl, &idx, find_cb, &idx) != TRUE) + if(H5B2_find(bt2, &idx, find_cb, &idx) != TRUE) FAIL_STACK_ERROR } /* end for */ /* Attempt to index non-existant record in level-4 B-tree, in increasing & decreasing order */ H5E_BEGIN_TRY { - ret = H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)(INSERT_MANY*3), find_cb, NULL); + ret = H5B2_index(bt2, H5_ITER_INC, (hsize_t)(INSERT_MANY*3), find_cb, NULL); } H5E_END_TRY; /* Should fail */ if(ret != FAIL) TEST_ERROR H5E_BEGIN_TRY { - ret = H5B2_index(bt2, dxpl, H5_ITER_DEC, (hsize_t)(INSERT_MANY*3), find_cb, NULL); + ret = H5B2_index(bt2, H5_ITER_DEC, (hsize_t)(INSERT_MANY*3), find_cb, NULL); } H5E_END_TRY; /* Should fail */ if(ret != FAIL) @@ -3131,12 +3118,12 @@ HDfprintf(stderr,"curr_time=%lu\n",(unsigned long)curr_time); /* Attempt to find existant record in root of level-4 B-tree */ /* (in increasing order) */ - if(H5B2_index(bt2, dxpl, H5_ITER_INC, idx, find_cb, &idx) < 0) + if(H5B2_index(bt2, H5_ITER_INC, idx, find_cb, &idx) < 0) FAIL_STACK_ERROR /* Attempt to find existant record in root of level-4 B-tree */ /* (in decreasing order) */ - if(H5B2_index(bt2, dxpl, H5_ITER_DEC, idx, find_dec_cb, &idx) < 0) + if(H5B2_index(bt2, H5_ITER_DEC, idx, find_dec_cb, &idx) < 0) FAIL_STACK_ERROR } /* end for */ @@ -3145,12 +3132,12 @@ HDfprintf(stderr,"curr_time=%lu\n",(unsigned long)curr_time); TESTING("B-tree insert: attempt duplicate record in level 4 B-tree"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR record = INSERT_MANY / 2; H5E_BEGIN_TRY { - ret = H5B2_insert(bt2, dxpl, &record); + ret = H5B2_insert(bt2, &record); } H5E_END_TRY; /* Should fail */ if(ret != FAIL) @@ -3165,7 +3152,7 @@ HDfprintf(stderr,"curr_time=%lu\n",(unsigned long)curr_time); TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -3182,7 +3169,7 @@ HDfprintf(stderr,"curr_time=%lu\n",(unsigned long)curr_time); error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; HDfree(records); @@ -3209,7 +3196,6 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ H5B2_test_rec_t record; /* Record to insert into tree */ @@ -3222,7 +3208,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* @@ -3231,47 +3217,47 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree update: inserting first record in empty B-tree"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR record.key = 42; record.val = 72; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR /* Attempt to find non-existant record in B-tree with 1 record */ /* (Should not be found, but not fail) */ find.key = 10; find.val = (hsize_t)-1; - if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != FALSE) + if(H5B2_find(bt2, &find, find_rec_cb, &find) != FALSE) FAIL_STACK_ERROR if(find.val != (hsize_t)-1) TEST_ERROR /* Try again with NULL 'op' */ /* (Should not be found, but not fail) */ - if(H5B2_find(bt2, dxpl, &find, NULL, NULL) != FALSE) + if(H5B2_find(bt2, &find, NULL, NULL) != FALSE) FAIL_STACK_ERROR if(find.val != (hsize_t)-1) TEST_ERROR /* Attempt to find existant record in B-tree with 1 record */ find.key = 42; - if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE) + if(H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE) FAIL_STACK_ERROR if(find.val != 72) TEST_ERROR /* Try again with NULL 'op' */ find.val = (hsize_t)-1; - if(H5B2_find(bt2, dxpl, &find, NULL, NULL) != TRUE) + if(H5B2_find(bt2, &find, NULL, NULL) != TRUE) FAIL_STACK_ERROR if(find.val != (hsize_t)-1) TEST_ERROR /* Attempt to index non-existant record in B-tree with 1 record */ H5E_BEGIN_TRY { - ret = H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)1, index_rec_cb, NULL); + ret = H5B2_index(bt2, H5_ITER_INC, (hsize_t)1, index_rec_cb, NULL); } H5E_END_TRY; /* Should fail */ if(ret != FAIL) @@ -3279,7 +3265,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to index existing record in B-tree with 1 record */ find.key = (hsize_t)-1; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)0, index_rec_cb, &find) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)0, index_rec_cb, &find) < 0) FAIL_STACK_ERROR if(find.key != 42) TEST_ERROR @@ -3295,47 +3281,47 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree update: update only record in B-tree"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR modify.key = 42; modify.val = 43; - if(H5B2_update(bt2, dxpl, &modify, modify_rec_cb, &modify) < 0) + if(H5B2_update(bt2, &modify, modify_rec_cb, &modify) < 0) FAIL_STACK_ERROR /* Attempt to find non-existant record in B-tree with 1 record */ /* (Should not be found, but not fail) */ find.key = 10; find.val = (hsize_t)-1; - if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != FALSE) + if(H5B2_find(bt2, &find, find_rec_cb, &find) != FALSE) FAIL_STACK_ERROR if(find.val != (hsize_t)-1) TEST_ERROR /* Try again with NULL 'op' */ /* (Should not be found, but not fail) */ - if(H5B2_find(bt2, dxpl, &find, NULL, NULL) != FALSE) + if(H5B2_find(bt2, &find, NULL, NULL) != FALSE) FAIL_STACK_ERROR if(find.val != (hsize_t)-1) TEST_ERROR /* Attempt to find modified record in B-tree with 1 record */ find.key = 42; - if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE) + if(H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE) FAIL_STACK_ERROR if(find.val != 43) TEST_ERROR /* Try again with NULL 'op' */ find.val = (hsize_t)-1; - if(H5B2_find(bt2, dxpl, &find, NULL, NULL) != TRUE) + if(H5B2_find(bt2, &find, NULL, NULL) != TRUE) FAIL_STACK_ERROR if(find.val != (hsize_t)-1) TEST_ERROR /* Attempt to index non-existant record in B-tree with 1 record */ H5E_BEGIN_TRY { - ret = H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)1, index_rec_cb, NULL); + ret = H5B2_index(bt2, H5_ITER_INC, (hsize_t)1, index_rec_cb, NULL); } H5E_END_TRY; /* Should fail */ if(ret != FAIL) @@ -3344,7 +3330,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to index existing record in B-tree with 1 record */ find.key = (hsize_t)-1; find.val = (hsize_t)-1; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)0, index_rec_cb, &find) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)0, index_rec_cb, &find) < 0) FAIL_STACK_ERROR if(find.key != 42) TEST_ERROR @@ -3360,7 +3346,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree update: insert several records"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* @@ -3368,7 +3354,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, */ record.key = 34; record.val = 11; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR /* @@ -3376,7 +3362,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, */ record.key = 56; record.val = 12; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR /* @@ -3384,28 +3370,28 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, */ record.key = 38; record.val = 13; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR /* Attempt to find non-existant record in level-0 B-tree with several records */ /* (Should not be found, but not fail) */ find.key = 10; find.val = (hsize_t)-1; - if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != FALSE) + if(H5B2_find(bt2, &find, find_rec_cb, &find) != FALSE) TEST_ERROR if(find.val != (hsize_t)-1) TEST_ERROR /* Attempt to find existant record in level-0 B-tree with several records */ find.key = 56; - if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE) + if(H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE) TEST_ERROR if(find.val != 12) TEST_ERROR /* Attempt to index non-existant record in B-tree with several records */ H5E_BEGIN_TRY { - ret = H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)4, index_rec_cb, NULL); + ret = H5B2_index(bt2, H5_ITER_INC, (hsize_t)4, index_rec_cb, NULL); } H5E_END_TRY; /* Should fail */ if(ret != FAIL) @@ -3414,7 +3400,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to index existing record in B-tree with several records */ find.key = (hsize_t)-1; find.val = (hsize_t)-1; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)0, index_rec_cb, &find) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)0, index_rec_cb, &find) < 0) TEST_ERROR if(find.key != 34) TEST_ERROR @@ -3422,7 +3408,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR find.key = (hsize_t)-1; find.val = (hsize_t)-1; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)1, index_rec_cb, &find) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)1, index_rec_cb, &find) < 0) TEST_ERROR if(find.key != 38) TEST_ERROR @@ -3430,7 +3416,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR find.key = (hsize_t)-1; find.val = (hsize_t)-1; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)2, index_rec_cb, &find) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)2, index_rec_cb, &find) < 0) TEST_ERROR if(find.key != 42) TEST_ERROR @@ -3438,7 +3424,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR find.key = (hsize_t)-1; find.val = (hsize_t)-1; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)3, index_rec_cb, &find) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)3, index_rec_cb, &find) < 0) TEST_ERROR if(find.key != 56) TEST_ERROR @@ -3456,43 +3442,43 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, record.key = 34; modify.key = 34; modify.val = 21; - if(H5B2_update(bt2, dxpl, &record, modify_rec_cb, &modify) < 0) + if(H5B2_update(bt2, &record, modify_rec_cb, &modify) < 0) FAIL_STACK_ERROR record.key = 38; modify.key = 38; modify.val = 23; - if(H5B2_update(bt2, dxpl, &record, modify_rec_cb, &modify) < 0) + if(H5B2_update(bt2, &record, modify_rec_cb, &modify) < 0) FAIL_STACK_ERROR record.key = 42; modify.key = 42; modify.val = 24; - if(H5B2_update(bt2, dxpl, &record, modify_rec_cb, &modify) < 0) + if(H5B2_update(bt2, &record, modify_rec_cb, &modify) < 0) FAIL_STACK_ERROR record.key = 56; modify.key = 56; modify.val = 22; - if(H5B2_update(bt2, dxpl, &record, modify_rec_cb, &modify) < 0) + if(H5B2_update(bt2, &record, modify_rec_cb, &modify) < 0) FAIL_STACK_ERROR /* Attempt to find non-existant record in level-0 B-tree with several records */ /* (Should not be found, but not fail) */ find.key = 41; find.val = (hsize_t)-1; - if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != FALSE) + if(H5B2_find(bt2, &find, find_rec_cb, &find) != FALSE) TEST_ERROR if(find.val != (hsize_t)-1) TEST_ERROR /* Attempt to find existant record in level-0 B-tree with several record */ find.key = 56; - if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE) + if(H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE) TEST_ERROR if(find.val != 22) TEST_ERROR /* Attempt to index non-existant record in B-tree with several records */ H5E_BEGIN_TRY { - ret = H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)4, index_rec_cb, NULL); + ret = H5B2_index(bt2, H5_ITER_INC, (hsize_t)4, index_rec_cb, NULL); } H5E_END_TRY; /* Should fail */ if(ret != FAIL) @@ -3501,7 +3487,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to index existing record in B-tree with several records */ find.key = (hsize_t)-1; find.val = (hsize_t)-1; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)0, index_rec_cb, &find) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)0, index_rec_cb, &find) < 0) TEST_ERROR if(find.key != 34) TEST_ERROR @@ -3509,7 +3495,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR find.key = (hsize_t)-1; find.val = (hsize_t)-1; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)1, index_rec_cb, &find) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)1, index_rec_cb, &find) < 0) TEST_ERROR if(find.key != 38) TEST_ERROR @@ -3517,7 +3503,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR find.key = (hsize_t)-1; find.val = (hsize_t)-1; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)2, index_rec_cb, &find) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)2, index_rec_cb, &find) < 0) TEST_ERROR if(find.key != 42) TEST_ERROR @@ -3525,7 +3511,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR find.key = (hsize_t)-1; find.val = (hsize_t)-1; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)3, index_rec_cb, &find) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)3, index_rec_cb, &find) < 0) TEST_ERROR if(find.key != 56) TEST_ERROR @@ -3533,7 +3519,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -3550,7 +3536,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return(1); @@ -3579,7 +3565,6 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ H5B2_test_rec_t record; /* Record to insert into tree */ @@ -3600,14 +3585,14 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Insert records to fill root leaf node */ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC_REC - 1); u++) { record.key = u + 2; record.val = u * 2 + 4; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR } /* end for */ @@ -3617,17 +3602,17 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record.key = 33; - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Insert record to split root leaf node */ record.key = INSERT_SPLIT_ROOT_NREC_REC + 1; record.val = (INSERT_SPLIT_ROOT_NREC_REC - 1) * 2 + 4; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR /* Check up on B-tree */ @@ -3636,13 +3621,13 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record.key = 33; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Iterate over B-tree to check records have been inserted correctly */ idx.key = 2; idx.val = 4; - if(H5B2_iterate(bt2, dxpl, iter_rec_cb, &idx) < 0) + if(H5B2_iterate(bt2, iter_rec_cb, &idx) < 0) FAIL_STACK_ERROR /* Make certain that the index is correct */ @@ -3650,7 +3635,7 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Modify all records */ @@ -3658,7 +3643,7 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam, record.key = u + 2; modify.key = u + 2; modify.val = u * 2 + 5; - if(H5B2_update(bt2, dxpl, &record, modify_rec_cb, &modify) < 0) + if(H5B2_update(bt2, &record, modify_rec_cb, &modify) < 0) FAIL_STACK_ERROR } /* end for */ @@ -3668,13 +3653,13 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record.key = 33; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Iterate over B-tree to check records have been inserted correctly */ idx.key = 2; idx.val = 5; - if(H5B2_iterate(bt2, dxpl, iter_rec_cb, &idx) < 0) + if(H5B2_iterate(bt2, iter_rec_cb, &idx) < 0) FAIL_STACK_ERROR /* Make certain that the index is correct */ @@ -3683,17 +3668,17 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam, /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Insert a couple more records, on the left side of the B-tree */ record.key = 0; record.val = 1; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR record.key = 1; record.val = 3; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR /* Check up on B-tree */ @@ -3702,18 +3687,18 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record.key = 33; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Iterate over B-tree to check records have been inserted correctly */ idx.key = 0; idx.val = 1; - if(H5B2_iterate(bt2, dxpl, iter_rec_cb, &idx) < 0) + if(H5B2_iterate(bt2, iter_rec_cb, &idx) < 0) FAIL_STACK_ERROR /* Make certain that the index is correct */ @@ -3724,7 +3709,7 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam, /* (Should not be found, but not fail) */ find.key = 800; find.val = (hsize_t)-1; - if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != FALSE) + if(H5B2_find(bt2, &find, find_rec_cb, &find) != FALSE) TEST_ERROR if(find.val != (hsize_t)-1) TEST_ERROR @@ -3732,7 +3717,7 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to find existant record in root of level-1 B-tree */ find.key = 33; find.val = (hsize_t)-1; - if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE) + if(H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE) FAIL_STACK_ERROR if(find.key != 33) TEST_ERROR @@ -3742,7 +3727,7 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to find existant record in leaf of level-1 B-tree */ find.key = 56; find.val = (hsize_t)-1; - if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE) + if(H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE) FAIL_STACK_ERROR if(find.key != 56) TEST_ERROR @@ -3751,7 +3736,7 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to index non-existant record in level-1 B-tree */ H5E_BEGIN_TRY { - ret = H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)(INSERT_SPLIT_ROOT_NREC_REC + 2), index_rec_cb, NULL); + ret = H5B2_index(bt2, H5_ITER_INC, (hsize_t)(INSERT_SPLIT_ROOT_NREC_REC + 2), index_rec_cb, NULL); } H5E_END_TRY; /* Should fail */ if(ret != FAIL) @@ -3760,7 +3745,7 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to index existing record in root of level-1 B-tree */ find.key = (hsize_t)-1; find.val = (hsize_t)-1; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)33, index_rec_cb, &find) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)33, index_rec_cb, &find) < 0) FAIL_STACK_ERROR if(find.key != 33) TEST_ERROR @@ -3770,7 +3755,7 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to index existing record in left leaf of level-1 B-tree */ find.key = (hsize_t)-1; find.val = (hsize_t)-1; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)0, index_rec_cb, &find) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)0, index_rec_cb, &find) < 0) FAIL_STACK_ERROR if(find.key != 0) TEST_ERROR @@ -3780,7 +3765,7 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to index existing record in right leaf of level-1 B-tree */ find.key = (hsize_t)-1; find.val = (hsize_t)-1; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)50, index_rec_cb, &find) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)50, index_rec_cb, &find) < 0) FAIL_STACK_ERROR if(find.key != 50) TEST_ERROR @@ -3788,7 +3773,7 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -3802,7 +3787,7 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -3832,7 +3817,6 @@ test_update_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ H5B2_test_rec_t record; /* Record to insert into tree */ @@ -3849,14 +3833,14 @@ test_update_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Insert enough records to force root to split into 2 leaves */ for(u = 0; u < INSERT_SPLIT_ROOT_NREC_REC; u++) { record.key = u + (INSERT_SPLIT_ROOT_NREC_REC / 2) + 1; record.val = u + (INSERT_SPLIT_ROOT_NREC_REC / 2) + 10; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR } /* end for */ @@ -3866,11 +3850,11 @@ test_update_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record.key = INSERT_SPLIT_ROOT_NREC_REC; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR @@ -3878,7 +3862,7 @@ test_update_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, for(u = 0; u < (INSERT_SPLIT_ROOT_NREC_REC / 2) + 1; u++) { record.key = u; record.val = u + 9; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR } /* end for */ @@ -3888,11 +3872,11 @@ test_update_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record.key = (INSERT_SPLIT_ROOT_NREC_REC / 2) + (INSERT_SPLIT_ROOT_NREC_REC / 4); - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -3904,14 +3888,14 @@ test_update_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree update: redistribute 2 leaves in level 1 B-tree (r->l)"); /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Insert enough records to force root to split into 2 leaves */ for(u = 0; u < INSERT_SPLIT_ROOT_NREC_REC; u++) { record.key = u; record.val = u + 9; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR } /* end for */ @@ -3921,18 +3905,18 @@ test_update_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record.key = (INSERT_SPLIT_ROOT_NREC_REC / 2) - 1; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Force redistribution from left node into right node */ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC_REC / 2) + 1; u++) { record.key = u + INSERT_SPLIT_ROOT_NREC_REC; record.val = u + INSERT_SPLIT_ROOT_NREC_REC + 9; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR } /* end for */ @@ -3942,11 +3926,11 @@ test_update_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record.key = (INSERT_SPLIT_ROOT_NREC_REC / 2) + (INSERT_SPLIT_ROOT_NREC_REC / 4) - 1; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -3961,7 +3945,7 @@ test_update_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -3991,7 +3975,6 @@ test_update_level1_side_split(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ H5B2_test_rec_t record; /* Record to insert into tree */ @@ -4008,14 +3991,14 @@ test_update_level1_side_split(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Insert enough records to force root to split into 2 leaves */ for(u = 0; u < INSERT_SPLIT_ROOT_NREC_REC; u++) { record.key = u + INSERT_SPLIT_ROOT_NREC_REC; record.val = u + INSERT_SPLIT_ROOT_NREC_REC + 10; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR } /* end for */ @@ -4025,18 +4008,18 @@ test_update_level1_side_split(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record.key = INSERT_SPLIT_ROOT_NREC_REC + (INSERT_SPLIT_ROOT_NREC_REC / 2) - 1; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Force left node to split */ for(u = 0; u < INSERT_SPLIT_ROOT_NREC_REC; u++) { record.key = u; record.val = u + 10; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR } /* end for */ @@ -4046,14 +4029,14 @@ test_update_level1_side_split(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record.key = 31; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record.key = 64; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -4065,14 +4048,14 @@ test_update_level1_side_split(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree update: split side leaf into 2 leaves in level 1 B-tree (r->l)"); /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Insert enough records to force root to split into 2 leaves */ for(u = 0; u < INSERT_SPLIT_ROOT_NREC_REC; u++) { record.key = u; record.val = u + 10; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR } /* end for */ @@ -4082,18 +4065,18 @@ test_update_level1_side_split(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record.key = (INSERT_SPLIT_ROOT_NREC_REC / 2) - 1; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Force right node to split */ for(u = 0; u < INSERT_SPLIT_ROOT_NREC_REC; u++) { record.key = u + INSERT_SPLIT_ROOT_NREC_REC; record.val = u + INSERT_SPLIT_ROOT_NREC_REC + 10; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR } /* end for */ @@ -4103,14 +4086,14 @@ test_update_level1_side_split(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record.key = 63; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record.key = 95; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -4125,7 +4108,7 @@ test_update_level1_side_split(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -4157,7 +4140,6 @@ test_update_level1_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ H5B2_test_rec_t record; /* Record to insert into tree */ @@ -4175,14 +4157,14 @@ test_update_level1_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Insert enough records to force root to split into 2 leaves */ for(u = 0; u < INSERT_SPLIT_ROOT_NREC_REC; u++) { record.key = u + (INSERT_SPLIT_ROOT_NREC_REC + (INSERT_SPLIT_ROOT_NREC_REC / 2) + 1); record.val = record.key * 2; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR } /* end for */ @@ -4192,18 +4174,18 @@ test_update_level1_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record.key = (2 * INSERT_SPLIT_ROOT_NREC_REC); - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Force left node to split */ for(u = 0; u < INSERT_SPLIT_ROOT_NREC_REC; u++) { record.key = u; record.val = record.key * 2; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR } /* end for */ @@ -4213,21 +4195,21 @@ test_update_level1_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record.key = (INSERT_SPLIT_ROOT_NREC_REC / 2) - 1; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record.key = INSERT_SPLIT_ROOT_NREC_REC + (INSERT_SPLIT_ROOT_NREC_REC / 2) + 1; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Insert records to force middle node to redistribute */ for(u = 0; u < ((INSERT_SPLIT_ROOT_NREC_REC / 2) + 1); u++) { record.key = u + INSERT_SPLIT_ROOT_NREC_REC; record.val = record.key * 2; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR } /* end for */ @@ -4237,20 +4219,20 @@ test_update_level1_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record.key = 52; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record.key = 107; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Iterate over B-tree to check records have been inserted correctly */ idx.key = 0; idx.val = 0; - if(H5B2_iterate(bt2, dxpl, iter_rec_cb, &idx) < 0) + if(H5B2_iterate(bt2, iter_rec_cb, &idx) < 0) FAIL_STACK_ERROR /* Make certain that the index is correct */ @@ -4258,7 +4240,7 @@ test_update_level1_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -4273,7 +4255,7 @@ test_update_level1_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -4304,7 +4286,6 @@ test_update_level1_middle_split(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ H5B2_test_rec_t record; /* Record to insert into tree */ @@ -4322,14 +4303,14 @@ test_update_level1_middle_split(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Insert enough records to force root to split into 2 leaves */ for(u = 0; u < INSERT_SPLIT_ROOT_NREC_REC; u++) { record.key = u + (INSERT_SPLIT_ROOT_NREC_REC * 2); record.val = record.key * 2; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR } /* end for */ @@ -4339,18 +4320,18 @@ test_update_level1_middle_split(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record.key = (2 * INSERT_SPLIT_ROOT_NREC_REC) + (INSERT_SPLIT_ROOT_NREC_REC / 2) - 1; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Force split from left node into right node */ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC_REC * 2); u++) { record.key = u; record.val = record.key * 2; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR } /* end for */ @@ -4360,23 +4341,23 @@ test_update_level1_middle_split(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record.key = 63; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record.key = 95; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record.key = 128; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Iterate over B-tree to check records have been inserted correctly */ idx.key = 0; idx.val = 0; - if(H5B2_iterate(bt2, dxpl, iter_rec_cb, &idx) < 0) + if(H5B2_iterate(bt2, iter_rec_cb, &idx) < 0) FAIL_STACK_ERROR /* Make certain that the index is correct */ @@ -4384,7 +4365,7 @@ test_update_level1_middle_split(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -4399,7 +4380,7 @@ test_update_level1_middle_split(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -4426,7 +4407,6 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ H5B2_test_rec_t record; /* Record to insert into tree */ @@ -4446,20 +4426,20 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Insert enough records to force root to split into 2 internal nodes */ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC_REC * 9); u++) { record.key = u + 2; /* Leave a gap for later insertion */ record.val = record.key * 2; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR } /* end for */ for(; u < (INSERT_SPLIT_ROOT_NREC_REC * 41); u++) { record.key = u + 4; /* Leave a gap for later insertion */ record.val = record.key * 2; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR } /* end for */ @@ -4469,42 +4449,42 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record.key = 1347; - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Add some extra records to left-most leaf */ record.key = 0; record.val = record.key * 2; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR record.key = 1; record.val = record.key * 2; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR /* Add some extra records to middle leaf */ record.key = (INSERT_SPLIT_ROOT_NREC_REC * 9) + 2; record.val = record.key * 2; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR record.key = (INSERT_SPLIT_ROOT_NREC_REC * 9) + 3; record.val = record.key * 2; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Iterate over B-tree to check records have been inserted correctly */ idx.key = 0; idx.val = 0; - if(H5B2_iterate(bt2, dxpl, iter_rec_cb, &idx) < 0) + if(H5B2_iterate(bt2, iter_rec_cb, &idx) < 0) FAIL_STACK_ERROR /* Make certain that the index is correct */ @@ -4515,7 +4495,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, /* (Should not be found, but not fail) */ find.key = INSERT_SPLIT_ROOT_NREC_REC * 42; find.val = (hsize_t)-1; - if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != FALSE) + if(H5B2_find(bt2, &find, find_rec_cb, &find) != FALSE) TEST_ERROR if(find.val != (hsize_t)-1) TEST_ERROR @@ -4523,45 +4503,45 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to find existant record in root of level-2 B-tree */ find.key = 1347; find.val = (hsize_t)-1; - if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE) + if(H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE) FAIL_STACK_ERROR if(find.val != (1347 * 2)) TEST_ERROR /* Check with B-tree */ record.key = 1347; - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR /* Attempt to find existant record in internal node of level-2 B-tree */ find.key = 513; find.val = (hsize_t)-1; - if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE) + if(H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE) FAIL_STACK_ERROR if(find.val != (513 * 2)) TEST_ERROR /* Check with B-tree */ record.key = 513; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Attempt to find existant record in leaf of level-2 B-tree */ find.key = 555; find.val = (hsize_t)-1; - if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE) + if(H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE) FAIL_STACK_ERROR if(find.val != (555 * 2)) TEST_ERROR /* Check with B-tree */ record.key = 555; - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR /* Attempt to index non-existant record in level-2 B-tree */ H5E_BEGIN_TRY { - ret = H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)(INSERT_SPLIT_ROOT_NREC_REC * 42), index_rec_cb, NULL); + ret = H5B2_index(bt2, H5_ITER_INC, (hsize_t)(INSERT_SPLIT_ROOT_NREC_REC * 42), index_rec_cb, NULL); } H5E_END_TRY; /* Should fail */ if(ret != FAIL) @@ -4570,7 +4550,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to index existing record in root of level-2 B-tree */ find.key = (hsize_t)-1; find.val = (hsize_t)-1; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)1347, index_rec_cb, &find) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)1347, index_rec_cb, &find) < 0) FAIL_STACK_ERROR if(find.key != 1347) TEST_ERROR @@ -4580,7 +4560,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to index existing record in internal node of level-2 B-tree */ find.key = (hsize_t)-1; find.val = (hsize_t)-1; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)513, index_rec_cb, &find) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)513, index_rec_cb, &find) < 0) FAIL_STACK_ERROR if(find.key != 513) TEST_ERROR @@ -4590,7 +4570,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to index existing record in leaf of level-2 B-tree */ find.key = (hsize_t)-1; find.val = (hsize_t)-1; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)555, index_rec_cb, &find) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)555, index_rec_cb, &find) < 0) FAIL_STACK_ERROR if(find.key != 555) TEST_ERROR @@ -4598,7 +4578,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -4611,20 +4591,20 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree update: make level 2 B-tree (r->l)"); /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Insert enough records to force root to split into 2 internal nodes */ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC_REC * 9); u++) { record.key = ((INSERT_SPLIT_ROOT_NREC_REC * 41) + 1) - u; record.val = record.key * 2; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR } /* end for */ for(; u < (INSERT_SPLIT_ROOT_NREC_REC * 41); u++) { record.key = ((INSERT_SPLIT_ROOT_NREC_REC * 41) + 1) - (u +2); /* Leave a gap for later insertion */ record.val = record.key * 2; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR } /* end for */ @@ -4634,42 +4614,42 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record.key = 1344; - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Add some extra records to right-most leaf */ record.key = (INSERT_SPLIT_ROOT_NREC_REC * 41) + 2; record.val = record.key * 2; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR record.key = (INSERT_SPLIT_ROOT_NREC_REC * 41) + 3; record.val = record.key * 2; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR /* Add some extra records to middle leaf */ record.key = ((INSERT_SPLIT_ROOT_NREC_REC * 41) - (INSERT_SPLIT_ROOT_NREC_REC * 9)); record.val = record.key * 2; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR record.key = ((INSERT_SPLIT_ROOT_NREC_REC * 41) - (INSERT_SPLIT_ROOT_NREC_REC * 9)) + 1; record.val = record.key * 2; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Iterate over B-tree to check records have been inserted correctly */ idx.key = 0; idx.val = 0; - if(H5B2_iterate(bt2, dxpl, iter_rec_cb, &idx) < 0) + if(H5B2_iterate(bt2, iter_rec_cb, &idx) < 0) FAIL_STACK_ERROR /* Make certain that the index is correct */ @@ -4680,7 +4660,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, /* (Should not be found, but not fail) */ find.key = INSERT_SPLIT_ROOT_NREC_REC * 42; find.val = (hsize_t)-1; - if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != FALSE) + if(H5B2_find(bt2, &find, find_rec_cb, &find) != FALSE) TEST_ERROR if(find.val != (hsize_t)-1) TEST_ERROR @@ -4688,45 +4668,45 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to find existant record in root of level-2 B-tree */ find.key = 1344; find.val = (hsize_t)-1; - if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE) + if(H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE) FAIL_STACK_ERROR if(find.val != (1344 * 2)) TEST_ERROR /* Check with B-tree */ record.key = 1344; - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR /* Attempt to find existant record in internal node of level-2 B-tree */ find.key = 512; find.val = (hsize_t)-1; - if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE) + if(H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE) FAIL_STACK_ERROR if(find.val != (512 * 2)) TEST_ERROR /* Check with B-tree */ record.key = 512; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Attempt to find existant record in leaf of level-2 B-tree */ find.key = 555; find.val = (hsize_t)-1; - if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE) + if(H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE) FAIL_STACK_ERROR if(find.val != (555 * 2)) TEST_ERROR /* Check with B-tree */ record.key = 555; - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR /* Attempt to index non-existant record in level-2 B-tree */ H5E_BEGIN_TRY { - ret = H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)(INSERT_SPLIT_ROOT_NREC_REC * 42), index_rec_cb, NULL); + ret = H5B2_index(bt2, H5_ITER_INC, (hsize_t)(INSERT_SPLIT_ROOT_NREC_REC * 42), index_rec_cb, NULL); } H5E_END_TRY; /* Should fail */ if(ret != FAIL) @@ -4735,7 +4715,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to index existing record in root of level-2 B-tree */ find.key = (hsize_t)-1; find.val = (hsize_t)-1; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)1344, index_rec_cb, &find) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)1344, index_rec_cb, &find) < 0) FAIL_STACK_ERROR if(find.key != 1344) TEST_ERROR @@ -4745,7 +4725,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to index existing record in internal node of level-2 B-tree */ find.key = (hsize_t)-1; find.val = (hsize_t)-1; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)512, index_rec_cb, &find) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)512, index_rec_cb, &find) < 0) FAIL_STACK_ERROR if(find.key != 512) TEST_ERROR @@ -4755,7 +4735,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to index existing record in leaf of level-2 B-tree */ find.key = (hsize_t)-1; find.val = (hsize_t)-1; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)555, index_rec_cb, &find) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)555, index_rec_cb, &find) < 0) FAIL_STACK_ERROR if(find.key != 555) TEST_ERROR @@ -4763,7 +4743,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -4776,20 +4756,20 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree update: make level 2 B-tree (l+r->middle)"); /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Insert enough records to force root to split into 2 internal nodes */ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC_REC * 9); u++) { record.key = ((INSERT_SPLIT_ROOT_NREC_REC * 41) + 3) - u; record.val = record.key * 2; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR } /* end for */ for(; u < (INSERT_SPLIT_ROOT_NREC_REC * 41); u++) { record.key = u - ((INSERT_SPLIT_ROOT_NREC_REC * 9) - 2); /* Leave a gap for later insertion */ record.val = record.key * 2; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR } /* end for */ @@ -4799,52 +4779,52 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, if(check_stats(bt2, &bt2_stat) < 0) TEST_ERROR record.key = 1345; - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Add some extra records to right-most leaf */ record.key = (INSERT_SPLIT_ROOT_NREC_REC * 41) + 4; record.val = record.key * 2; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR record.key = (INSERT_SPLIT_ROOT_NREC_REC * 41) + 5; record.val = record.key * 2; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR /* Add some extra records to middle leaf */ record.key = ((INSERT_SPLIT_ROOT_NREC_REC * 41) - (INSERT_SPLIT_ROOT_NREC_REC * 9)) + 2; record.val = record.key * 2; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR record.key = ((INSERT_SPLIT_ROOT_NREC_REC * 41) - (INSERT_SPLIT_ROOT_NREC_REC * 9)) + 3; record.val = record.key * 2; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR /* Add some extra records to left-most leaf */ record.key = 0; record.val = record.key * 2; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR record.key = 1; record.val = record.key * 2; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Iterate over B-tree to check records have been inserted correctly */ idx.key = 0; idx.val = 0; - if(H5B2_iterate(bt2, dxpl, iter_rec_cb, &idx) < 0) + if(H5B2_iterate(bt2, iter_rec_cb, &idx) < 0) FAIL_STACK_ERROR /* Make certain that the index is correct */ @@ -4855,7 +4835,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, /* (Should not be found, but not fail) */ find.key = INSERT_SPLIT_ROOT_NREC_REC * 42; find.val = (hsize_t)-1; - if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != FALSE) + if(H5B2_find(bt2, &find, find_rec_cb, &find) != FALSE) TEST_ERROR if(find.val != (hsize_t)-1) TEST_ERROR @@ -4863,45 +4843,45 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to find existant record in root of level-2 B-tree */ find.key = 1345; find.val = (hsize_t)-1; - if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE) + if(H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE) FAIL_STACK_ERROR if(find.val != (1345 * 2)) TEST_ERROR /* Check with B-tree */ record.key = 1345; - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR /* Attempt to find existant record in internal node of level-2 B-tree */ find.key = 513; find.val = (hsize_t)-1; - if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE) + if(H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE) FAIL_STACK_ERROR if(find.val != (513 * 2)) TEST_ERROR /* Check with B-tree */ record.key = 513; - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Attempt to find existant record in leaf of level-2 B-tree */ find.key = 555; find.val = (hsize_t)-1; - if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE) + if(H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE) FAIL_STACK_ERROR if(find.val != (555 * 2)) TEST_ERROR /* Check with B-tree */ record.key = 555; - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR /* Attempt to index non-existant record in level-2 B-tree */ H5E_BEGIN_TRY { - ret = H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)(INSERT_SPLIT_ROOT_NREC_REC * 42), index_rec_cb, NULL); + ret = H5B2_index(bt2, H5_ITER_INC, (hsize_t)(INSERT_SPLIT_ROOT_NREC_REC * 42), index_rec_cb, NULL); } H5E_END_TRY; /* Should fail */ if(ret != FAIL) @@ -4910,7 +4890,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to index existing record in level-2 B-tree */ find.key = (hsize_t)-1; find.val = (hsize_t)-1; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)1345, index_rec_cb, &find) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)1345, index_rec_cb, &find) < 0) FAIL_STACK_ERROR if(find.key != 1345) TEST_ERROR @@ -4920,7 +4900,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to index existing record in internal node of level-2 B-tree */ find.key = (hsize_t)-1; find.val = (hsize_t)-1; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)513, index_rec_cb, &find) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)513, index_rec_cb, &find) < 0) FAIL_STACK_ERROR if(find.key != 513) TEST_ERROR @@ -4930,7 +4910,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to index existing record in leaf of level-2 B-tree */ find.key = (hsize_t)-1; find.val = (hsize_t)-1; - if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)555, index_rec_cb, &find) < 0) + if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)555, index_rec_cb, &find) < 0) FAIL_STACK_ERROR if(find.key != 555) TEST_ERROR @@ -4938,7 +4918,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -4953,7 +4933,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -4980,7 +4960,6 @@ test_update_lots(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ time_t curr_time; /* Current time, for seeding random number generator */ @@ -5033,13 +5012,13 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time); TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Insert random records */ for(u = 0; u < INSERT_MANY_REC; u++) { record = records[u]; - if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0) + if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0) FAIL_STACK_ERROR } /* end for */ @@ -5050,7 +5029,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time); TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -5064,7 +5043,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time); TEST_ERROR /* Re-open v2 B-tree */ - if(NULL == (bt2 = H5B2_open(f, dxpl, bt2_addr, f))) + if(NULL == (bt2 = H5B2_open(f, bt2_addr, f))) FAIL_STACK_ERROR /* Check up on B-tree after re-open */ @@ -5076,7 +5055,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time); /* Iterate over B-tree to check records have been inserted correctly */ iter.key = 0; iter.val = 0; - if(H5B2_iterate(bt2, dxpl, iter_rec_cb, &iter) < 0) + if(H5B2_iterate(bt2, iter_rec_cb, &iter) < 0) FAIL_STACK_ERROR /* Make certain that the index is correct */ @@ -5087,7 +5066,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time); /* (Should not be found, but not fail) */ find.key = INSERT_MANY_REC * 2; find.val = (hsize_t)-1; - if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != FALSE) + if(H5B2_find(bt2, &find, find_rec_cb, &find) != FALSE) TEST_ERROR if(find.val != (hsize_t)-1) TEST_ERROR @@ -5099,7 +5078,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time); find.val = (hsize_t)-1; /* Attempt to find existant record in level-4 B-tree */ - if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE) + if(H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE) FAIL_STACK_ERROR if(find.val != (find.key * 2)) TEST_ERROR @@ -5107,13 +5086,13 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time); /* Attempt to index non-existant record in level-4 B-tree, in increasing & decreasing order */ H5E_BEGIN_TRY { - ret = H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)(INSERT_MANY_REC * 3), find_rec_cb, NULL); + ret = H5B2_index(bt2, H5_ITER_INC, (hsize_t)(INSERT_MANY_REC * 3), find_rec_cb, NULL); } H5E_END_TRY; /* Should fail */ if(ret != FAIL) TEST_ERROR H5E_BEGIN_TRY { - ret = H5B2_index(bt2, dxpl, H5_ITER_DEC, (hsize_t)(INSERT_MANY_REC * 3), find_rec_cb, NULL); + ret = H5B2_index(bt2, H5_ITER_DEC, (hsize_t)(INSERT_MANY_REC * 3), find_rec_cb, NULL); } H5E_END_TRY; /* Should fail */ if(ret != FAIL) @@ -5132,7 +5111,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time); /* Attempt to find existant record in level-4 B-tree */ /* (in increasing order) */ - if(H5B2_index(bt2, dxpl, H5_ITER_INC, idx, index_rec_cb, &find) < 0) + if(H5B2_index(bt2, H5_ITER_INC, idx, index_rec_cb, &find) < 0) FAIL_STACK_ERROR if(find.key != idx) TEST_ERROR @@ -5145,7 +5124,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time); /* Attempt to find existant record in level-4 B-tree */ /* (in decreasing order) */ - if(H5B2_index(bt2, dxpl, H5_ITER_DEC, idx, index_rec_cb, &find) < 0) + if(H5B2_index(bt2, H5_ITER_DEC, idx, index_rec_cb, &find) < 0) FAIL_STACK_ERROR if(find.key != (INSERT_MANY_REC - (idx + 1))) TEST_ERROR @@ -5158,13 +5137,13 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time); TESTING("B-tree update: update record in level 4 B-tree"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR record.key = INSERT_MANY_REC / 2; modify.key = INSERT_MANY_REC / 2; modify.val = record.key * 3; - if(H5B2_update(bt2, dxpl, &record, modify_rec_cb, &modify) < 0) + if(H5B2_update(bt2, &record, modify_rec_cb, &modify) < 0) FAIL_STACK_ERROR /* Query the number of records in the B-tree */ @@ -5176,7 +5155,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time); TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -5194,7 +5173,7 @@ error: HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time); H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; HDfree(records); @@ -5222,7 +5201,6 @@ test_remove_basic(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -5239,7 +5217,7 @@ test_remove_basic(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -5253,7 +5231,7 @@ test_remove_basic(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to remove a record from a B-tree with no records */ record = 0; H5E_BEGIN_TRY { - ret = H5B2_remove(bt2, dxpl, &record, NULL, NULL); + ret = H5B2_remove(bt2, &record, NULL, NULL); } H5E_END_TRY; /* Should fail */ if(ret != FAIL) @@ -5264,12 +5242,12 @@ test_remove_basic(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree remove: non-existant record from 1 record B-tree"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Insert one record into B-tree */ record = 42; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR /* Query the number of records in the B-tree */ @@ -5291,7 +5269,7 @@ test_remove_basic(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to remove a non-existant record from a B-tree with 1 record */ record = 0; H5E_BEGIN_TRY { - ret = H5B2_remove(bt2, dxpl, &record, NULL, NULL); + ret = H5B2_remove(bt2, &record, NULL, NULL); } H5E_END_TRY; /* Should fail */ if(ret != FAIL) @@ -5303,12 +5281,12 @@ test_remove_basic(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree remove: existant record from 1 record B-tree"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR record = 42; rrecord = 0; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -5337,21 +5315,21 @@ test_remove_basic(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree remove: adding records to B-tree after removal"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Insert several records into B-tree again */ record = 42; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR record = 34; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR record = 56; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR record = 38; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR /* Query the number of records in the B-tree */ @@ -5368,12 +5346,12 @@ test_remove_basic(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree remove: non-existant record from level-0 B-tree"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR record = 0; H5E_BEGIN_TRY { - ret = H5B2_remove(bt2, dxpl, &record, NULL, NULL); + ret = H5B2_remove(bt2, &record, NULL, NULL); } H5E_END_TRY; /* Should fail */ if(ret != FAIL) @@ -5385,12 +5363,12 @@ test_remove_basic(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree remove: mult. existant records from level-0 B-tree"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR record = 42; rrecord = 0; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -5415,7 +5393,7 @@ test_remove_basic(hid_t fapl, const H5B2_create_t *cparam, record = 34; rrecord = 0; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -5440,7 +5418,7 @@ test_remove_basic(hid_t fapl, const H5B2_create_t *cparam, record = 56; rrecord = 0; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -5465,7 +5443,7 @@ test_remove_basic(hid_t fapl, const H5B2_create_t *cparam, record = 38; rrecord = 0; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -5489,7 +5467,7 @@ test_remove_basic(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -5504,7 +5482,7 @@ test_remove_basic(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -5530,7 +5508,6 @@ test_remove_level1_noredistrib(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -5548,13 +5525,13 @@ test_remove_level1_noredistrib(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Create level-1 B-tree with 3 leaves */ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC * 2); u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -5577,7 +5554,7 @@ test_remove_level1_noredistrib(hid_t fapl, const H5B2_create_t *cparam, /* Attempt to remove a non-existant record from a B-tree with 1 record */ record = (INSERT_SPLIT_ROOT_NREC * 2) + 1; H5E_BEGIN_TRY { - ret = H5B2_remove(bt2, dxpl, &record, NULL, NULL); + ret = H5B2_remove(bt2, &record, NULL, NULL); } H5E_END_TRY; /* Should fail */ if(ret != FAIL) @@ -5597,22 +5574,22 @@ test_remove_level1_noredistrib(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree remove: record from right leaf of level-1 B-tree"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Check up on B-tree */ record = 62; /* Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 94; /* Right record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = (INSERT_SPLIT_ROOT_NREC * 2) - 2; - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR rrecord = 0; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -5621,10 +5598,10 @@ test_remove_level1_noredistrib(hid_t fapl, const H5B2_create_t *cparam, /* Make certain that the leaf nodes didn't redistribute */ record = 62; /* Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 94; /* Right record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -5641,16 +5618,16 @@ test_remove_level1_noredistrib(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree remove: record from left leaf of level-1 B-tree"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Check up on B-tree */ record = 0; - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR rrecord = 1; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -5659,10 +5636,10 @@ test_remove_level1_noredistrib(hid_t fapl, const H5B2_create_t *cparam, /* Make certain that the leaf nodes didn't redistribute */ record = 62; /* Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 94; /* Right record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -5679,16 +5656,16 @@ test_remove_level1_noredistrib(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree remove: record from middle leaf of level-1 B-tree"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Check up on B-tree */ record = INSERT_SPLIT_ROOT_NREC; - if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) + if(check_node_depth(bt2, &record, (unsigned)0) < 0) TEST_ERROR rrecord = 0; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -5697,10 +5674,10 @@ test_remove_level1_noredistrib(hid_t fapl, const H5B2_create_t *cparam, /* Make certain that the leaf nodes didn't redistribute */ record = 62; /* Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 94; /* Right record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -5712,7 +5689,7 @@ test_remove_level1_noredistrib(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -5727,7 +5704,7 @@ test_remove_level1_noredistrib(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -5753,7 +5730,6 @@ test_remove_level1_redistrib(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -5770,22 +5746,22 @@ test_remove_level1_redistrib(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Create level-1 B-tree with 3 leaves */ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC * 2); u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ /* Check record values in root of B-tree */ record = 62; /* Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 94; /* Right record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -5805,14 +5781,14 @@ test_remove_level1_redistrib(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Attempt to remove enough records from right leaf of a level-1 B-tree to force redistribution */ for(u = 0; u < 8; u++) { record = (INSERT_SPLIT_ROOT_NREC * 2) - (u + 1); rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -5830,10 +5806,10 @@ test_remove_level1_redistrib(hid_t fapl, const H5B2_create_t *cparam, /* Check record values in root of B-tree */ record = 62; /* Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 90; /* Right record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR PASSED(); @@ -5842,13 +5818,13 @@ test_remove_level1_redistrib(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree remove: redistribute 2 leaves in level-1 B-tree (l->r)"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR for(u = 0; u < 39; u++) { record = u; rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -5866,10 +5842,10 @@ test_remove_level1_redistrib(hid_t fapl, const H5B2_create_t *cparam, /* Check record values in root of B-tree */ record = 64; /* Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 90; /* Right record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR PASSED(); @@ -5878,13 +5854,13 @@ test_remove_level1_redistrib(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree remove: redistribute 3 leaves in level-1 B-tree"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR for(u = 0; u < 2; u++) { record = INSERT_SPLIT_ROOT_NREC + 2 + u; rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -5902,14 +5878,14 @@ test_remove_level1_redistrib(hid_t fapl, const H5B2_create_t *cparam, /* Check record values in root of B-tree */ record = 64; /* Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 91; /* Right record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -5924,7 +5900,7 @@ test_remove_level1_redistrib(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -5950,7 +5926,6 @@ test_remove_level1_2leaf_merge(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -5967,24 +5942,24 @@ test_remove_level1_2leaf_merge(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Create level-1 B-tree with 3 leaves */ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC * 2); u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ /* Check record values in root of B-tree */ record = 62; /* Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR ninfo.depth = 1; ninfo.nrec = 2; record = 94; /* Right record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -6004,14 +5979,14 @@ test_remove_level1_2leaf_merge(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Attempt to remove enough records from right leaf of a level-1 B-tree to force redistribution */ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC / 4); u++) { record = (INSERT_SPLIT_ROOT_NREC * 2) - (u + 1); rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -6031,7 +6006,7 @@ test_remove_level1_2leaf_merge(hid_t fapl, const H5B2_create_t *cparam, ninfo.depth = 1; ninfo.nrec = 1; record = 62; /* Left record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR PASSED(); @@ -6040,31 +6015,31 @@ test_remove_level1_2leaf_merge(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree remove: merge 2 leaves to 1 in level-1 B-tree (l->r)"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Fill B-tree back up */ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC / 4); u++) { record = (INSERT_SPLIT_ROOT_NREC * 2) - (u + 1); - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ /* Check record values in root of B-tree */ record = 62; /* Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR ninfo.depth = 1; ninfo.nrec = 2; record = 94; /* Right record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Remove records */ for(u = 0; u < ((3 * INSERT_SPLIT_ROOT_NREC) / 4) - 1; u++) { record = u; rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -6084,11 +6059,11 @@ test_remove_level1_2leaf_merge(hid_t fapl, const H5B2_create_t *cparam, ninfo.depth = 1; ninfo.nrec = 1; record = 94; /* Left record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -6103,7 +6078,7 @@ test_remove_level1_2leaf_merge(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -6129,7 +6104,6 @@ test_remove_level1_3leaf_merge(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -6146,24 +6120,24 @@ test_remove_level1_3leaf_merge(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Create level-1 B-tree with 3 leaves */ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC * 2); u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ /* Check record values in root of B-tree */ record = 62; /* Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR ninfo.depth = 1; ninfo.nrec = 2; record = 94; /* Right record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -6183,14 +6157,14 @@ test_remove_level1_3leaf_merge(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Attempt to remove enough records from middle leaf of a level-1 B-tree to force merge */ for(u = 0; u < ((5 * INSERT_SPLIT_ROOT_NREC) / 6) - 1; u++) { record = ((3 * INSERT_SPLIT_ROOT_NREC) / 2) - (u + 1); rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -6210,11 +6184,11 @@ test_remove_level1_3leaf_merge(hid_t fapl, const H5B2_create_t *cparam, ninfo.depth = 1; ninfo.nrec = 1; record = 37; /* Only record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -6229,7 +6203,7 @@ test_remove_level1_3leaf_merge(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -6255,7 +6229,6 @@ test_remove_level1_promote(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -6272,30 +6245,30 @@ test_remove_level1_promote(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Create level-1 B-tree with 5 leaves */ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC * 4); u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ /* Check record values in root of B-tree */ record = 62; /* Left-most record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 125; /* Center-Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 188; /* Center-Right record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR ninfo.depth = 1; ninfo.nrec = 4; record = 220; /* Right-most record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -6315,13 +6288,13 @@ test_remove_level1_promote(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Attempt to remove record from root node of a level-1 B-tree to force promotion from right leaf */ record = 220; rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -6330,18 +6303,18 @@ test_remove_level1_promote(hid_t fapl, const H5B2_create_t *cparam, /* Check record values in root of B-tree */ record = 62; /* Left-most record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 125; /* Center-Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 188; /* Center-Right record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR ninfo.depth = 1; ninfo.nrec = 4; record = 221; /* Right-most record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -6362,12 +6335,12 @@ test_remove_level1_promote(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree remove: promote from left leaf of level-1 B-tree"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR record = 62; rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -6376,18 +6349,18 @@ test_remove_level1_promote(hid_t fapl, const H5B2_create_t *cparam, /* Check record values in root of B-tree */ record = 63; /* Left-most record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 125; /* Center-Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 188; /* Center-Right record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR ninfo.depth = 1; ninfo.nrec = 4; record = 221; /* Right-most record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -6404,12 +6377,12 @@ test_remove_level1_promote(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree remove: promote from middle leaf of level-1 B-tree"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR record = 125; rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -6418,18 +6391,18 @@ test_remove_level1_promote(hid_t fapl, const H5B2_create_t *cparam, /* Check record values in root of B-tree */ record = 63; /* Left-most record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 126; /* Center-Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR record = 188; /* Center-Right record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR ninfo.depth = 1; ninfo.nrec = 4; record = 221; /* Right-most record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -6441,7 +6414,7 @@ test_remove_level1_promote(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -6456,7 +6429,7 @@ test_remove_level1_promote(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -6482,7 +6455,6 @@ test_remove_level1_promote_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cpar { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -6499,24 +6471,24 @@ test_remove_level1_promote_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cpar TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Create level-1 B-tree with 3 leaves */ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC * 2); u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ /* Check record values in root of B-tree */ record = 62; /* Left-most record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR ninfo.depth = 1; ninfo.nrec = 2; record = 94; /* Right record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -6536,7 +6508,7 @@ test_remove_level1_promote_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cpar TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Attempt to remove record from root node of a level-1 B-tree to force promotion from right leaf */ @@ -6545,7 +6517,7 @@ test_remove_level1_promote_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cpar for(u = 0; u < 7; u++) { record = (INSERT_SPLIT_ROOT_NREC * 2) - (u + 1); rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -6563,7 +6535,7 @@ test_remove_level1_promote_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cpar record = 94; rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -6572,12 +6544,12 @@ test_remove_level1_promote_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cpar /* Check record values in root of B-tree */ record = 62; /* Left-most record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR ninfo.depth = 1; ninfo.nrec = 2; record = 90; /* Right record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -6589,7 +6561,7 @@ test_remove_level1_promote_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cpar TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -6604,7 +6576,7 @@ test_remove_level1_promote_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cpar error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -6630,7 +6602,6 @@ test_remove_level1_promote_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cpar { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -6647,24 +6618,24 @@ test_remove_level1_promote_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cpar TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Create level-1 B-tree with 3 leaves */ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC * 2); u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ /* Check record values in root of B-tree */ record = 62; /* Left-most record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR ninfo.depth = 1; ninfo.nrec = 2; record = 94; /* Right record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -6684,7 +6655,7 @@ test_remove_level1_promote_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cpar TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Attempt to remove record from root node of a level-1 B-tree to force promotion from middle leaf */ @@ -6693,7 +6664,7 @@ test_remove_level1_promote_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cpar for(u = 0; u < 7; u++) { record = 63 + u; rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -6711,7 +6682,7 @@ test_remove_level1_promote_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cpar record = 62; rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -6720,12 +6691,12 @@ test_remove_level1_promote_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cpar /* Check record values in root of B-tree */ record = 39; /* Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR ninfo.depth = 1; ninfo.nrec = 2; record = 86; /* Right record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -6737,7 +6708,7 @@ test_remove_level1_promote_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cpar TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -6752,7 +6723,7 @@ test_remove_level1_promote_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cpar error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -6778,7 +6749,6 @@ test_remove_level1_promote_2leaf_merge(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -6795,24 +6765,24 @@ test_remove_level1_promote_2leaf_merge(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Create level-1 B-tree with 3 leaves */ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC * 2); u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ /* Check record values in root of B-tree */ record = 62; /* Left-most record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR ninfo.depth = 1; ninfo.nrec = 2; record = 94; /* Right record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -6832,7 +6802,7 @@ test_remove_level1_promote_2leaf_merge(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Attempt to remove record from root node of a level-1 B-tree to force promotion from right leaf */ @@ -6841,7 +6811,7 @@ test_remove_level1_promote_2leaf_merge(hid_t fapl, const H5B2_create_t *cparam, for(u = 0; u < 14; u++) { record = (INSERT_SPLIT_ROOT_NREC * 2) - (u + 1); rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -6859,7 +6829,7 @@ test_remove_level1_promote_2leaf_merge(hid_t fapl, const H5B2_create_t *cparam, record = 87; rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -6870,7 +6840,7 @@ test_remove_level1_promote_2leaf_merge(hid_t fapl, const H5B2_create_t *cparam, ninfo.depth = 1; ninfo.nrec = 1; record = 62; /* Middle record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -6882,7 +6852,7 @@ test_remove_level1_promote_2leaf_merge(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -6897,7 +6867,7 @@ test_remove_level1_promote_2leaf_merge(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -6923,7 +6893,6 @@ test_remove_level1_promote_3leaf_merge(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -6940,24 +6909,24 @@ test_remove_level1_promote_3leaf_merge(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Create level-2 B-tree with 3 leaves */ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC * 2); u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ /* Check record values in root of B-tree */ record = 62; /* Left-most record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) + if(check_node_depth(bt2, &record, (unsigned)1) < 0) TEST_ERROR ninfo.depth = 1; ninfo.nrec = 2; record = 94; /* Right record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -6977,7 +6946,7 @@ test_remove_level1_promote_3leaf_merge(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Attempt to remove record from root node of a level-1 B-tree to force promotion from middle leaf */ @@ -6986,7 +6955,7 @@ test_remove_level1_promote_3leaf_merge(hid_t fapl, const H5B2_create_t *cparam, for(u = 0; u < 50; u++) { record = ((3 * INSERT_SPLIT_ROOT_NREC) / 2) - (u + 1); rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -7004,7 +6973,7 @@ test_remove_level1_promote_3leaf_merge(hid_t fapl, const H5B2_create_t *cparam, record = 25; rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -7015,7 +6984,7 @@ test_remove_level1_promote_3leaf_merge(hid_t fapl, const H5B2_create_t *cparam, ninfo.depth = 1; ninfo.nrec = 1; record = 37; /* Right record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -7027,7 +6996,7 @@ test_remove_level1_promote_3leaf_merge(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -7042,7 +7011,7 @@ test_remove_level1_promote_3leaf_merge(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -7068,7 +7037,6 @@ test_remove_level1_collapse(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -7085,13 +7053,13 @@ test_remove_level1_collapse(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Create level-1 B-tree with 2 leaves */ for(u = 0; u < INSERT_SPLIT_ROOT_NREC; u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -7099,7 +7067,7 @@ test_remove_level1_collapse(hid_t fapl, const H5B2_create_t *cparam, ninfo.depth = 1; ninfo.nrec = 1; record = 31; /* Middle record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -7119,14 +7087,14 @@ test_remove_level1_collapse(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Attempt to remove records from B-tree to force a single leaf for the B-tree */ for(u = 0; u < 14; u++) { record = INSERT_SPLIT_ROOT_NREC - (u + 1); rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -7146,7 +7114,7 @@ test_remove_level1_collapse(hid_t fapl, const H5B2_create_t *cparam, ninfo.depth = 0; ninfo.nrec = (uint16_t)(INSERT_SPLIT_ROOT_NREC - u); record = 31; /* Middle record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -7166,7 +7134,7 @@ test_remove_level1_collapse(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -7181,7 +7149,7 @@ test_remove_level1_collapse(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -7207,7 +7175,6 @@ test_remove_level2_promote(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -7224,24 +7191,24 @@ test_remove_level2_promote(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Create level-2 B-tree with 3 internal nodes */ for(u = 0; u < ((INSERT_SPLIT_ROOT_NREC * 59) + 1); u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ /* Check record values in root of B-tree */ record = 1889; /* Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR ninfo.depth = 2; ninfo.nrec = 2; record = 2834; /* Right record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -7261,20 +7228,20 @@ test_remove_level2_promote(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Check information about record in right internal node */ ninfo.depth = 1; ninfo.nrec = 14; record = 2960; /* Record in right internal node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Attempt to remove record from right internal node of a level-2 B-tree to force promotion */ record = 2960; rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -7285,7 +7252,7 @@ test_remove_level2_promote(hid_t fapl, const H5B2_create_t *cparam, ninfo.depth = 1; ninfo.nrec = 14; record = 2961; /* Record in right internal node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -7302,19 +7269,19 @@ test_remove_level2_promote(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree remove: promote from left internal of level-2 B-tree"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Check information about record in left internal node */ ninfo.depth = 1; ninfo.nrec = 29; record = 1133; /* Record in left internal node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR record = 1133; rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -7325,7 +7292,7 @@ test_remove_level2_promote(hid_t fapl, const H5B2_create_t *cparam, ninfo.depth = 1; ninfo.nrec = 29; record = 1134; /* Record in left internal node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -7342,19 +7309,19 @@ test_remove_level2_promote(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree remove: promote from middle internal of level-2 B-tree"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Check information about record in middle internal node */ ninfo.depth = 1; ninfo.nrec = 14; record = 2267; /* Record in middle internal node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR record = 2267; rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -7365,7 +7332,7 @@ test_remove_level2_promote(hid_t fapl, const H5B2_create_t *cparam, ninfo.depth = 1; ninfo.nrec = 14; record = 2268; /* Record in middle internal node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -7382,19 +7349,19 @@ test_remove_level2_promote(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree remove: promote record from root of level-2 B-tree"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Check information about record in root node */ ninfo.depth = 2; ninfo.nrec = 2; record = 1889; /* Left record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR record = 1889; rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -7405,7 +7372,7 @@ test_remove_level2_promote(hid_t fapl, const H5B2_create_t *cparam, ninfo.depth = 2; ninfo.nrec = 2; record = 1890; /* Left record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -7417,19 +7384,19 @@ test_remove_level2_promote(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Check information about record in root node */ ninfo.depth = 2; ninfo.nrec = 2; record = 2834; /* Right record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR record = 2834; rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -7440,7 +7407,7 @@ test_remove_level2_promote(hid_t fapl, const H5B2_create_t *cparam, ninfo.depth = 2; ninfo.nrec = 2; record = 2835; /* Right record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -7452,7 +7419,7 @@ test_remove_level2_promote(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -7467,7 +7434,7 @@ test_remove_level2_promote(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -7493,7 +7460,6 @@ test_remove_level2_promote_2internal_redistrib(hid_t fapl, const H5B2_create_t * { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -7510,24 +7476,24 @@ test_remove_level2_promote_2internal_redistrib(hid_t fapl, const H5B2_create_t * TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Create level-2 B-tree with 3 internal nodes */ for(u = 0; u < ((INSERT_SPLIT_ROOT_NREC * 59) + 1); u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ /* Check record values in root of B-tree */ record = 1889; /* Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR ninfo.depth = 2; ninfo.nrec = 2; record = 2834; /* Right record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -7547,21 +7513,21 @@ test_remove_level2_promote_2internal_redistrib(hid_t fapl, const H5B2_create_t * TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Check status of B-tree */ ninfo.depth = 1; ninfo.nrec = 14; record = 3685; /* Right-most record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Attempt to remove record from right internal node of a level-2 B-tree to force promotion w/redistribution */ for(u = 0; u < 8; u++) { record = ((INSERT_SPLIT_ROOT_NREC * 59) + 1) - (u + 1); rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -7579,7 +7545,7 @@ test_remove_level2_promote_2internal_redistrib(hid_t fapl, const H5B2_create_t * record = 3685; rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -7590,7 +7556,7 @@ test_remove_level2_promote_2internal_redistrib(hid_t fapl, const H5B2_create_t * ninfo.depth = 1; ninfo.nrec = 14; record = 3681; /* Right-most record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -7602,7 +7568,7 @@ test_remove_level2_promote_2internal_redistrib(hid_t fapl, const H5B2_create_t * TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -7617,7 +7583,7 @@ test_remove_level2_promote_2internal_redistrib(hid_t fapl, const H5B2_create_t * error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -7643,7 +7609,6 @@ test_remove_level2_promote_3internal_redistrib(hid_t fapl, const H5B2_create_t * { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -7660,24 +7625,24 @@ test_remove_level2_promote_3internal_redistrib(hid_t fapl, const H5B2_create_t * TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Create level-2 B-tree with 3 internal nodes */ for(u = 0; u < ((INSERT_SPLIT_ROOT_NREC * 59) + 1); u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ /* Check record values in root of B-tree */ record = 1889; /* Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR ninfo.depth = 2; ninfo.nrec = 2; record = 2834; /* Right record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -7697,21 +7662,21 @@ test_remove_level2_promote_3internal_redistrib(hid_t fapl, const H5B2_create_t * TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Check status of B-tree */ ninfo.depth = 1; ninfo.nrec = 29; record = 62; /* Left-most record in left node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Attempt to remove record from left internal node of a level-2 B-tree to force promotion w/redistribution */ for(u = 0; u < 38; u++) { record = 63 + u; rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -7729,7 +7694,7 @@ test_remove_level2_promote_3internal_redistrib(hid_t fapl, const H5B2_create_t * record = 62; rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -7740,7 +7705,7 @@ test_remove_level2_promote_3internal_redistrib(hid_t fapl, const H5B2_create_t * ninfo.depth = 1; ninfo.nrec = 29; record = 49; /* Left-most record in left node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -7752,7 +7717,7 @@ test_remove_level2_promote_3internal_redistrib(hid_t fapl, const H5B2_create_t * TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -7767,7 +7732,7 @@ test_remove_level2_promote_3internal_redistrib(hid_t fapl, const H5B2_create_t * error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -7793,7 +7758,6 @@ test_remove_level2_promote_2internal_merge(hid_t fapl, const H5B2_create_t *cpar { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -7810,24 +7774,24 @@ test_remove_level2_promote_2internal_merge(hid_t fapl, const H5B2_create_t *cpar TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Create level-2 B-tree with 3 internal nodes */ for(u = 0; u < ((INSERT_SPLIT_ROOT_NREC * 59) + 1); u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ /* Check record values in root of B-tree */ record = 1889; /* Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR ninfo.depth = 2; ninfo.nrec = 2; record = 2834; /* Right record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -7847,21 +7811,21 @@ test_remove_level2_promote_2internal_merge(hid_t fapl, const H5B2_create_t *cpar TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Check information about record in right internal node */ ninfo.depth = 1; ninfo.nrec = 14; record = 3685; /* Right-most record in right internal node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Attempt to remove record from right internal node of a level-2 B-tree to force promotion w/redistribution */ for(u = 0; u < 15; u++) { record = ((INSERT_SPLIT_ROOT_NREC * 59) + 1) - (u + 1); rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -7880,7 +7844,7 @@ test_remove_level2_promote_2internal_merge(hid_t fapl, const H5B2_create_t *cpar /* Force merge by promoting current right-most record */ record = 3678; rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -7891,7 +7855,7 @@ test_remove_level2_promote_2internal_merge(hid_t fapl, const H5B2_create_t *cpar ninfo.depth = 1; ninfo.nrec = 13; record = 3653; /* Right-most record in right internal node (now) */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -7903,7 +7867,7 @@ test_remove_level2_promote_2internal_merge(hid_t fapl, const H5B2_create_t *cpar TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -7918,7 +7882,7 @@ test_remove_level2_promote_2internal_merge(hid_t fapl, const H5B2_create_t *cpar error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -7944,7 +7908,6 @@ test_remove_level2_promote_3internal_merge(hid_t fapl, const H5B2_create_t *cpar { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -7961,24 +7924,24 @@ test_remove_level2_promote_3internal_merge(hid_t fapl, const H5B2_create_t *cpar TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Create level-2 B-tree with 3 internal nodes */ for(u = 0; u < ((INSERT_SPLIT_ROOT_NREC * 59) + 1); u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ /* Check record values in root of B-tree */ record = 1889; /* Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR ninfo.depth = 2; ninfo.nrec = 2; record = 2834; /* Right record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -7998,21 +7961,21 @@ test_remove_level2_promote_3internal_merge(hid_t fapl, const H5B2_create_t *cpar TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Check information about record in left internal node */ ninfo.depth = 1; ninfo.nrec = 29; record = 62; /* Left-most record in left internal node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Attempt to remove record from left internal node of a level-2 B-tree to force promotion w/redistribution */ for(u = 0; u < 112; u++) { record = 48 + u; rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -8031,7 +7994,7 @@ test_remove_level2_promote_3internal_merge(hid_t fapl, const H5B2_create_t *cpar /* Force merge of left-most internal nodes by promotion */ record = 25; rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -8042,7 +8005,7 @@ test_remove_level2_promote_3internal_merge(hid_t fapl, const H5B2_create_t *cpar ninfo.depth = 1; ninfo.nrec = 28; record = 37; /* Left-most record in left internal node (now) */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -8054,7 +8017,7 @@ test_remove_level2_promote_3internal_merge(hid_t fapl, const H5B2_create_t *cpar TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -8069,7 +8032,7 @@ test_remove_level2_promote_3internal_merge(hid_t fapl, const H5B2_create_t *cpar error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -8095,7 +8058,6 @@ test_remove_level2_2internal_merge_left(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -8112,24 +8074,24 @@ test_remove_level2_2internal_merge_left(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Create level-2 B-tree with 3 internal nodes */ for(u = 0; u < ((INSERT_SPLIT_ROOT_NREC * 59) + 1); u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ /* Check record values in root of B-tree */ record = 1889; /* Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR ninfo.depth = 2; ninfo.nrec = 2; record = 2834; /* Right record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -8149,14 +8111,14 @@ test_remove_level2_2internal_merge_left(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Attempt to remove records from a level-2 B-tree to force 2 internal nodes to merge */ for(u = 0; u < ((INSERT_SPLIT_ROOT_NREC * 21) + 15); u++) { record = u; rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -8176,11 +8138,11 @@ test_remove_level2_2internal_merge_left(hid_t fapl, const H5B2_create_t *cparam, ninfo.depth = 2; ninfo.nrec = 1; record = 2834; /* Middle record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -8195,7 +8157,7 @@ test_remove_level2_2internal_merge_left(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -8221,7 +8183,6 @@ test_remove_level2_2internal_merge_right(hid_t fapl, const H5B2_create_t *cparam { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -8238,24 +8199,24 @@ test_remove_level2_2internal_merge_right(hid_t fapl, const H5B2_create_t *cparam TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Create level-2 B-tree with 3 internal nodes */ for(u = 0; u < ((INSERT_SPLIT_ROOT_NREC * 59) + 1); u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ /* Check record values in root of B-tree */ record = 1889; /* Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR ninfo.depth = 2; ninfo.nrec = 2; record = 2834; /* Right record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -8275,14 +8236,14 @@ test_remove_level2_2internal_merge_right(hid_t fapl, const H5B2_create_t *cparam TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Attempt to remove records from a level-2 B-tree to force 2 internal nodes to merge */ for(u = 0; u < ((INSERT_SPLIT_ROOT_NREC * 5) + 17); u++) { record = ((INSERT_SPLIT_ROOT_NREC * 59) + 1) - (u + 1); rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -8302,11 +8263,11 @@ test_remove_level2_2internal_merge_right(hid_t fapl, const H5B2_create_t *cparam ninfo.depth = 2; ninfo.nrec = 1; record = 1889; /* Middle record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -8321,7 +8282,7 @@ test_remove_level2_2internal_merge_right(hid_t fapl, const H5B2_create_t *cparam error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -8347,7 +8308,6 @@ test_remove_level2_3internal_merge(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -8364,24 +8324,24 @@ test_remove_level2_3internal_merge(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Create level-2 B-tree with 3 internal nodes */ for(u = 0; u < ((INSERT_SPLIT_ROOT_NREC * 59) + 1); u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ /* Check record values in root of B-tree */ record = 1889; /* Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR ninfo.depth = 2; ninfo.nrec = 2; record = 2834; /* Right record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -8401,14 +8361,14 @@ test_remove_level2_3internal_merge(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Attempt to remove record from middle internal node of a level-2 B-tree to force promotion w/redistribution */ for(u = 0; u < ((INSERT_SPLIT_ROOT_NREC * 23) + 15); u++) { record = (INSERT_SPLIT_ROOT_NREC * 20) + u; rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -8428,11 +8388,11 @@ test_remove_level2_3internal_merge(hid_t fapl, const H5B2_create_t *cparam, ninfo.depth = 2; ninfo.nrec = 1; record = 1196; /* Right record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -8447,7 +8407,7 @@ test_remove_level2_3internal_merge(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -8473,7 +8433,6 @@ test_remove_level2_collapse_right(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -8491,24 +8450,24 @@ test_remove_level2_collapse_right(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Create level-2 B-tree with 3 internal nodes */ for(u = 0; u < ((INSERT_SPLIT_ROOT_NREC * 59) + 1); u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ /* Check record values in root of B-tree */ record = 1889; /* Left record in root node */ - if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) + if(check_node_depth(bt2, &record, (unsigned)2) < 0) TEST_ERROR ninfo.depth = 2; ninfo.nrec = 2; record = 2834; /* Right record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Query the number of records in the B-tree */ @@ -8528,14 +8487,14 @@ test_remove_level2_collapse_right(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Attempt to remove records from a level-2 B-tree to force back to level-1 */ for(u = 0; u < (INSERT_SPLIT_ROOT_NREC * 34) + 17; u++) { record = ((INSERT_SPLIT_ROOT_NREC * 59) + 1) - (u + 1); rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -8558,7 +8517,7 @@ test_remove_level2_collapse_right(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -8573,7 +8532,7 @@ test_remove_level2_collapse_right(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -8599,7 +8558,6 @@ gen_l4_btree2(const char *filename, hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ hsize_t record; /* Record to insert into tree */ unsigned u; /* Local index variable */ @@ -8618,13 +8576,13 @@ gen_l4_btree2(const char *filename, hid_t fapl, const H5B2_create_t *cparam, STACK_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, bt2_addr) < 0) TEST_ERROR /* Insert random records */ for(u = 0; u < INSERT_MANY; u++) { record = records[u]; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -8635,7 +8593,7 @@ gen_l4_btree2(const char *filename, hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -8648,7 +8606,7 @@ gen_l4_btree2(const char *filename, hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; @@ -8680,7 +8638,6 @@ test_remove_lots(const char *env_h5_drvr, hid_t fapl, const H5B2_create_t *cpara int fd = -1; /* File descriptor */ h5_stat_t sb; /* Stat buffer for file */ void *file_data = NULL; /* Copy of file data */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -8784,14 +8741,14 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time); } /* end for */ /* Re-open v2 B-tree */ - if(NULL == (bt2 = H5B2_open(f, dxpl, bt2_addr, f))) + if(NULL == (bt2 = H5B2_open(f, bt2_addr, f))) FAIL_STACK_ERROR /* Remove all records */ for(u = 0; u < INSERT_MANY; u++) { record = records[u]; rrecord = HSIZET_MAX; - if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0) + if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -8816,7 +8773,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time); TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -8868,7 +8825,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time); STACK_ERROR /* Re-open v2 B-tree */ - if(NULL == (bt2 = H5B2_open(f, dxpl, bt2_addr, f))) + if(NULL == (bt2 = H5B2_open(f, bt2_addr, f))) FAIL_STACK_ERROR /* Remove all records */ @@ -8878,7 +8835,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time); rrecord = HSIZET_MAX; /* Remove random record */ - if(H5B2_remove_by_idx(bt2, dxpl, H5_ITER_INC, (hsize_t)rem_idx, remove_cb, &rrecord) < 0) + if(H5B2_remove_by_idx(bt2, H5_ITER_INC, (hsize_t)rem_idx, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -8903,7 +8860,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time); TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -8956,14 +8913,14 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time); STACK_ERROR /* Re-open v2 B-tree */ - if(NULL == (bt2 = H5B2_open(f, dxpl, bt2_addr, f))) + if(NULL == (bt2 = H5B2_open(f, bt2_addr, f))) FAIL_STACK_ERROR /* Remove all records */ for(u = 0; u < INSERT_MANY; u++) { /* Remove first record */ rrecord = HSIZET_MAX; - if(H5B2_remove_by_idx(bt2, dxpl, H5_ITER_INC, (hsize_t)0, remove_cb, &rrecord) < 0) + if(H5B2_remove_by_idx(bt2, H5_ITER_INC, (hsize_t)0, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -8988,7 +8945,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time); TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -9041,14 +8998,14 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time); STACK_ERROR /* Re-open v2 B-tree */ - if(NULL == (bt2 = H5B2_open(f, dxpl, bt2_addr, f))) + if(NULL == (bt2 = H5B2_open(f, bt2_addr, f))) FAIL_STACK_ERROR /* Remove all records */ for(u = 0; u < INSERT_MANY; u++) { /* Remove last record */ rrecord = HSIZET_MAX; - if(H5B2_remove_by_idx(bt2, dxpl, H5_ITER_DEC, (hsize_t)0, remove_cb, &rrecord) < 0) + if(H5B2_remove_by_idx(bt2, H5_ITER_DEC, (hsize_t)0, remove_cb, &rrecord) < 0) FAIL_STACK_ERROR /* Make certain that the record value is correct */ @@ -9073,7 +9030,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time); TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -9093,7 +9050,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time); error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; @@ -9128,7 +9085,6 @@ test_find_neighbor(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -9156,45 +9112,45 @@ test_find_neighbor(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Insert records */ for(u = 0; u < FIND_NEIGHBOR; u++) { record = records[u]; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ /* Attempt to find record B-tree less than a value */ search = 0; H5E_BEGIN_TRY { - ret = H5B2_neighbor(bt2, dxpl, H5B2_COMPARE_LESS, &search, neighbor_cb, &record); + ret = H5B2_neighbor(bt2, H5B2_COMPARE_LESS, &search, neighbor_cb, &record); } H5E_END_TRY; /* Should fail */ if(ret != FAIL) TEST_ERROR search = 1; - if(H5B2_neighbor(bt2, dxpl, H5B2_COMPARE_LESS, &search, neighbor_cb, &record) < 0) + if(H5B2_neighbor(bt2, H5B2_COMPARE_LESS, &search, neighbor_cb, &record) < 0) FAIL_STACK_ERROR if(record != 0) TEST_ERROR search = 2; - if(H5B2_neighbor(bt2, dxpl, H5B2_COMPARE_LESS, &search, neighbor_cb, &record) < 0) + if(H5B2_neighbor(bt2, H5B2_COMPARE_LESS, &search, neighbor_cb, &record) < 0) FAIL_STACK_ERROR if(record != 0) TEST_ERROR search = 3; - if(H5B2_neighbor(bt2, dxpl, H5B2_COMPARE_LESS, &search, neighbor_cb, &record) < 0) + if(H5B2_neighbor(bt2, H5B2_COMPARE_LESS, &search, neighbor_cb, &record) < 0) FAIL_STACK_ERROR if(record != 2) TEST_ERROR search = 4; - if(H5B2_neighbor(bt2, dxpl, H5B2_COMPARE_LESS, &search, neighbor_cb, &record) < 0) + if(H5B2_neighbor(bt2, H5B2_COMPARE_LESS, &search, neighbor_cb, &record) < 0) FAIL_STACK_ERROR if(record != 2) TEST_ERROR @@ -9203,12 +9159,12 @@ test_find_neighbor(hid_t fapl, const H5B2_create_t *cparam, ninfo.depth = 1; ninfo.nrec = 14; record = 250; /* Record in left internal node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Neighbor is in internal node */ search = 251; - if(H5B2_neighbor(bt2, dxpl, H5B2_COMPARE_LESS, &search, neighbor_cb, &record) < 0) + if(H5B2_neighbor(bt2, H5B2_COMPARE_LESS, &search, neighbor_cb, &record) < 0) FAIL_STACK_ERROR if(record != 250) TEST_ERROR @@ -9217,18 +9173,18 @@ test_find_neighbor(hid_t fapl, const H5B2_create_t *cparam, ninfo.depth = 2; ninfo.nrec = 1; record = 1888; /* Record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Neighbor is in root node */ search = 1889; - if(H5B2_neighbor(bt2, dxpl, H5B2_COMPARE_LESS, &search, neighbor_cb, &record) < 0) + if(H5B2_neighbor(bt2, H5B2_COMPARE_LESS, &search, neighbor_cb, &record) < 0) FAIL_STACK_ERROR if(record != 1888) TEST_ERROR search = (FIND_NEIGHBOR * 2) + 1; - if(H5B2_neighbor(bt2, dxpl, H5B2_COMPARE_LESS, &search, neighbor_cb, &record) < 0) + if(H5B2_neighbor(bt2, H5B2_COMPARE_LESS, &search, neighbor_cb, &record) < 0) FAIL_STACK_ERROR if(record != ((FIND_NEIGHBOR - 1) * 2)) TEST_ERROR @@ -9241,38 +9197,38 @@ test_find_neighbor(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree find: nearest neighbor greater than a value"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Attempt to find record B-tree less than a value */ search = (FIND_NEIGHBOR * 2) + 1; H5E_BEGIN_TRY { - ret = H5B2_neighbor(bt2, dxpl, H5B2_COMPARE_GREATER, &search, neighbor_cb, &record); + ret = H5B2_neighbor(bt2, H5B2_COMPARE_GREATER, &search, neighbor_cb, &record); } H5E_END_TRY; /* Should fail */ if(ret != FAIL) TEST_ERROR search = 0; - if(H5B2_neighbor(bt2, dxpl, H5B2_COMPARE_GREATER, &search, neighbor_cb, &record) < 0) + if(H5B2_neighbor(bt2, H5B2_COMPARE_GREATER, &search, neighbor_cb, &record) < 0) FAIL_STACK_ERROR if(record != 2) TEST_ERROR search = 1; - if(H5B2_neighbor(bt2, dxpl, H5B2_COMPARE_GREATER, &search, neighbor_cb, &record) < 0) + if(H5B2_neighbor(bt2, H5B2_COMPARE_GREATER, &search, neighbor_cb, &record) < 0) FAIL_STACK_ERROR if(record != 2) TEST_ERROR search = 2; - if(H5B2_neighbor(bt2, dxpl, H5B2_COMPARE_GREATER, &search, neighbor_cb, &record) < 0) + if(H5B2_neighbor(bt2, H5B2_COMPARE_GREATER, &search, neighbor_cb, &record) < 0) FAIL_STACK_ERROR if(record != 4) TEST_ERROR search = 3; - if(H5B2_neighbor(bt2, dxpl, H5B2_COMPARE_GREATER, &search, neighbor_cb, &record) < 0) + if(H5B2_neighbor(bt2, H5B2_COMPARE_GREATER, &search, neighbor_cb, &record) < 0) FAIL_STACK_ERROR if(record != 4) TEST_ERROR @@ -9281,31 +9237,31 @@ test_find_neighbor(hid_t fapl, const H5B2_create_t *cparam, ninfo.depth = 1; ninfo.nrec = 16; record = 2896; /* Record in right internal node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Neighbor is in internal node */ search = 2895; - if(H5B2_neighbor(bt2, dxpl, H5B2_COMPARE_GREATER, &search, neighbor_cb, &record) < 0) + if(H5B2_neighbor(bt2, H5B2_COMPARE_GREATER, &search, neighbor_cb, &record) < 0) FAIL_STACK_ERROR if(record != 2896) TEST_ERROR /* Neighbor is in root node */ search = 1887; - if(H5B2_neighbor(bt2, dxpl, H5B2_COMPARE_GREATER, &search, neighbor_cb, &record) < 0) + if(H5B2_neighbor(bt2, H5B2_COMPARE_GREATER, &search, neighbor_cb, &record) < 0) FAIL_STACK_ERROR if(record != 1888) TEST_ERROR search = ((FIND_NEIGHBOR - 1) * 2) - 1; - if(H5B2_neighbor(bt2, dxpl, H5B2_COMPARE_GREATER, &search, neighbor_cb, &record) < 0) + if(H5B2_neighbor(bt2, H5B2_COMPARE_GREATER, &search, neighbor_cb, &record) < 0) FAIL_STACK_ERROR if(record != ((FIND_NEIGHBOR - 1) * 2)) TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -9322,7 +9278,7 @@ test_find_neighbor(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; HDfree(records); @@ -9352,7 +9308,6 @@ test_delete(hid_t fapl, const H5B2_create_t *cparam) H5F_t *f = NULL; /* Internal file object pointer */ h5_stat_size_t empty_size; /* Size of an empty file */ h5_stat_size_t file_size; /* Size of each file created */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -9391,18 +9346,18 @@ test_delete(hid_t fapl, const H5B2_create_t *cparam) STACK_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; /* * Delete v2 B-tree */ - if(H5B2_delete(f, dxpl, bt2_addr, f, NULL, NULL) < 0) + if(H5B2_delete(f, bt2_addr, f, NULL, NULL) < 0) FAIL_STACK_ERROR /* Close the file */ @@ -9435,13 +9390,13 @@ test_delete(hid_t fapl, const H5B2_create_t *cparam) STACK_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Insert records */ for(u = 0; u < DELETE_SMALL; u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -9452,14 +9407,14 @@ test_delete(hid_t fapl, const H5B2_create_t *cparam) TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; /* * Delete v2 B-tree */ - if(H5B2_delete(f, H5AC_ind_read_dxpl_id, bt2_addr, f, NULL, NULL) < 0) + if(H5B2_delete(f, bt2_addr, f, NULL, NULL) < 0) FAIL_STACK_ERROR /* Close file */ @@ -9492,13 +9447,13 @@ test_delete(hid_t fapl, const H5B2_create_t *cparam) STACK_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Insert records */ for(u = 0; u < DELETE_MEDIUM; u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -9509,14 +9464,14 @@ test_delete(hid_t fapl, const H5B2_create_t *cparam) TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; /* * Delete v2 B-tree */ - if(H5B2_delete(f, dxpl, bt2_addr, f, NULL, NULL) < 0) + if(H5B2_delete(f, bt2_addr, f, NULL, NULL) < 0) FAIL_STACK_ERROR /* Close file */ @@ -9549,13 +9504,13 @@ test_delete(hid_t fapl, const H5B2_create_t *cparam) STACK_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Insert records */ for(u = 0; u < DELETE_LARGE; u++) { record = u; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -9566,14 +9521,14 @@ test_delete(hid_t fapl, const H5B2_create_t *cparam) TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; /* * Delete v2 B-tree */ - if(H5B2_delete(f, dxpl, bt2_addr, f, NULL, NULL) < 0) + if(H5B2_delete(f, bt2_addr, f, NULL, NULL) < 0) FAIL_STACK_ERROR /* Close file */ @@ -9595,7 +9550,7 @@ test_delete(hid_t fapl, const H5B2_create_t *cparam) error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -9622,7 +9577,6 @@ test_modify(hid_t fapl, const H5B2_create_t *cparam, { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ hsize_t record; /* Record to insert into tree */ @@ -9643,13 +9597,13 @@ test_modify(hid_t fapl, const H5B2_create_t *cparam, TEST_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Create level-2 B-tree with 3 internal nodes */ for(u = 0; u < ((INSERT_SPLIT_ROOT_NREC * 59) + 1); u++) { record = u * 5; - if(H5B2_insert(bt2, dxpl, &record) < 0) + if(H5B2_insert(bt2, &record) < 0) FAIL_STACK_ERROR } /* end for */ @@ -9663,7 +9617,7 @@ test_modify(hid_t fapl, const H5B2_create_t *cparam, record = 3; modify = 4; H5E_BEGIN_TRY { - ret = H5B2_modify(bt2, dxpl, &record, modify_cb, &modify); + ret = H5B2_modify(bt2, &record, modify_cb, &modify); } H5E_END_TRY; /* Should fail */ if(ret != FAIL) @@ -9674,33 +9628,33 @@ test_modify(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree modify: modify record in leaf node"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Check status of B-tree */ ninfo.depth = 0; ninfo.nrec = 62; record = 4330; /* Record in leaf node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Attempt to modify a record in a leaf node */ record = 4330; modify = 4331; - if(H5B2_modify(bt2, dxpl, &record, modify_cb, &modify) < 0) + if(H5B2_modify(bt2, &record, modify_cb, &modify) < 0) FAIL_STACK_ERROR /* Check status of B-tree */ ninfo.depth = 0; ninfo.nrec = 62; record = 4331; /* Record in leaf node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Attempt to find modified record */ record = 4331; found = 4331; - if(H5B2_find(bt2, dxpl, &record, find_cb, &found) != TRUE) + if(H5B2_find(bt2, &record, find_cb, &found) != TRUE) FAIL_STACK_ERROR if(found != 4331) TEST_ERROR @@ -9709,7 +9663,7 @@ test_modify(hid_t fapl, const H5B2_create_t *cparam, record = 4330; found = HSIZET_MAX; H5E_BEGIN_TRY { - ret = H5B2_modify(bt2, dxpl, &record, modify_cb, &modify); + ret = H5B2_modify(bt2, &record, modify_cb, &modify); } H5E_END_TRY; /* Should fail */ if(ret != FAIL) @@ -9720,33 +9674,33 @@ test_modify(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree modify: modify record in internal node"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Check status of B-tree */ ninfo.depth = 1; ninfo.nrec = 29; record = 5350; /* Record in internal node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Attempt to modify a record in an internal node */ record = 5350; modify = 5352; - if(H5B2_modify(bt2, dxpl, &record, modify_cb, &modify) < 0) + if(H5B2_modify(bt2, &record, modify_cb, &modify) < 0) FAIL_STACK_ERROR /* Check status of B-tree */ ninfo.depth = 1; ninfo.nrec = 29; record = 5352; /* Record in internal node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Attempt to find modified record */ record = 5352; found = 5352; - if(H5B2_find(bt2, dxpl, &record, find_cb, &found) != TRUE) + if(H5B2_find(bt2, &record, find_cb, &found) != TRUE) STACK_ERROR if(found != 5352) TEST_ERROR @@ -9755,7 +9709,7 @@ test_modify(hid_t fapl, const H5B2_create_t *cparam, record = 5350; found = 5350; H5E_BEGIN_TRY { - ret = H5B2_modify(bt2, dxpl, &record, modify_cb, &modify); + ret = H5B2_modify(bt2, &record, modify_cb, &modify); } H5E_END_TRY; /* Should fail */ if(ret != FAIL) @@ -9766,33 +9720,33 @@ test_modify(hid_t fapl, const H5B2_create_t *cparam, TESTING("B-tree modify: modify record in root node"); /* Check for closing & re-opening the B-tree */ - if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0) + if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0) TEST_ERROR /* Check status of B-tree */ ninfo.depth = 2; ninfo.nrec = 2; record = 9445; /* Record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Attempt to modify a record in a root node */ record = 9445; modify = 9448; - if(H5B2_modify(bt2, dxpl, &record, modify_cb, &modify) < 0) + if(H5B2_modify(bt2, &record, modify_cb, &modify) < 0) FAIL_STACK_ERROR /* Check status of B-tree */ ninfo.depth = 2; ninfo.nrec = 2; record = 9448; /* Record in root node */ - if(check_node_info(bt2, dxpl, record, &ninfo) < 0) + if(check_node_info(bt2, record, &ninfo) < 0) TEST_ERROR /* Attempt to find modified record */ record = 9448; found = 9448; - if(H5B2_find(bt2, dxpl, &record, find_cb, &found) != TRUE) + if(H5B2_find(bt2, &record, find_cb, &found) != TRUE) STACK_ERROR if(found != 9448) TEST_ERROR @@ -9801,14 +9755,14 @@ test_modify(hid_t fapl, const H5B2_create_t *cparam, record = 9445; found = 9445; H5E_BEGIN_TRY { - ret = H5B2_modify(bt2, dxpl, &record, modify_cb, &modify); + ret = H5B2_modify(bt2, &record, modify_cb, &modify); } H5E_END_TRY; /* Should fail */ if(ret != FAIL) TEST_ERROR /* Close the v2 B-tree */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -9823,7 +9777,7 @@ test_modify(hid_t fapl, const H5B2_create_t *cparam, error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); H5Fclose(file); } H5E_END_TRY; return 1; @@ -9856,7 +9810,6 @@ test_open_twice_diff(hid_t fapl, const H5B2_create_t *cparam) hid_t file00 = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ H5F_t *f2 = NULL; /* Internal file object pointer */ - hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */ H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */ H5B2_t *bt2_2 = NULL; /* Second v2 B-tree wrapper */ haddr_t bt2_addr; /* Address of B-tree created */ @@ -9881,15 +9834,15 @@ test_open_twice_diff(hid_t fapl, const H5B2_create_t *cparam) FAIL_STACK_ERROR /* Create the v2 B-tree & get its address */ - if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0) + if(create_btree(f, cparam, &bt2, &bt2_addr) < 0) TEST_ERROR /* Re-open v2 B-tree */ - if(NULL == (bt2_2 = H5B2_open(f, dxpl, bt2_addr, f))) + if(NULL == (bt2_2 = H5B2_open(f, bt2_addr, f))) FAIL_STACK_ERROR /* Close the second v2 B-tree wrapper */ - if(H5B2_close(bt2_2, dxpl) < 0) + if(H5B2_close(bt2_2) < 0) FAIL_STACK_ERROR bt2_2 = NULL; @@ -9901,7 +9854,7 @@ test_open_twice_diff(hid_t fapl, const H5B2_create_t *cparam) FAIL_STACK_ERROR /* Close the first v2 B-tree wrapper */ - if(H5B2_close(bt2, dxpl) < 0) + if(H5B2_close(bt2) < 0) FAIL_STACK_ERROR bt2 = NULL; @@ -9931,7 +9884,7 @@ test_open_twice_diff(hid_t fapl, const H5B2_create_t *cparam) FAIL_STACK_ERROR /* Open the B-tree through the second file handle */ - if(NULL == (bt2_2 = H5B2_open(f2, dxpl, bt2_addr, f2))) + if(NULL == (bt2_2 = H5B2_open(f2, bt2_addr, f2))) FAIL_STACK_ERROR /* Close the extra file handles */ @@ -9941,7 +9894,7 @@ test_open_twice_diff(hid_t fapl, const H5B2_create_t *cparam) FAIL_STACK_ERROR /* Close the second v2 B-tree */ - if(H5B2_close(bt2_2, dxpl) < 0) + if(H5B2_close(bt2_2) < 0) FAIL_STACK_ERROR bt2_2 = NULL; @@ -9958,9 +9911,9 @@ test_open_twice_diff(hid_t fapl, const H5B2_create_t *cparam) error: H5E_BEGIN_TRY { if(bt2) - H5B2_close(bt2, dxpl); + H5B2_close(bt2); if(bt2) - H5B2_close(bt2_2, dxpl); + H5B2_close(bt2_2); H5Fclose(file); H5Fclose(file2); H5Fclose(file0); @@ -9994,6 +9947,7 @@ main(void) unsigned reopen; /* Whether to reopen B-tree during tests */ int ExpressMode; const char *envval = NULL; +hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */ envval = HDgetenv("HDF5_DRIVER"); if(envval == NULL) @@ -10008,6 +9962,8 @@ main(void) /* Initialize v2 B-tree creation parameters */ init_cparam(&cparam, &cparam2); +if(H5CX_push() < 0) FAIL_STACK_ERROR +api_ctx_pushed = TRUE; /* Loop over re-opening B-tree during tests */ for(reopen = FALSE; reopen <= TRUE; reopen++) { @@ -10096,6 +10052,8 @@ main(void) /* Verify symbol table messages are cached */ nerrors += (h5_verify_cached_stabs(FILENAME, fapl) < 0 ? 1 : 0); +if(api_ctx_pushed && H5CX_pop() < 0) FAIL_STACK_ERROR +api_ctx_pushed = FALSE; if(nerrors) goto error; |