summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/CMakeLists.txt18
-rw-r--r--test/Makefile.am4
-rw-r--r--test/accum.c6
-rw-r--r--test/btree2.c2708
-rw-r--r--test/cache.c104
-rw-r--r--test/cache_common.c20
-rw-r--r--test/cache_tagging.c14
-rw-r--r--test/dsets.c689
-rw-r--r--test/dtypes.c99
-rw-r--r--test/dynlib3.c4
-rw-r--r--test/earray.c439
-rw-r--r--test/efc.c4
-rw-r--r--test/error_test.c4
-rw-r--r--test/external.c1830
-rw-r--r--test/farray.c114
-rw-r--r--test/fheap.c342
-rw-r--r--test/file_image.c4
-rw-r--r--test/freespace.c298
-rw-r--r--test/gen_bogus.c68
-rw-r--r--test/gen_plist.c2
-rw-r--r--test/gen_udlinks.c3
-rw-r--r--test/gheap.c23
-rw-r--r--test/h5test.c308
-rw-r--r--test/h5test.h17
-rw-r--r--test/lheap.c8
-rw-r--r--test/links.c59
-rw-r--r--test/mf.c680
-rw-r--r--test/objcopy.c332
-rw-r--r--test/ohdr.c681
-rw-r--r--test/set_extent.c420
-rw-r--r--test/tarray.c772
-rw-r--r--test/tbogus.h5bin2216 -> 4512 bytes
-rw-r--r--test/tfile.c69
-rw-r--r--test/tgenprop.c4
-rw-r--r--test/tmisc.c16
-rw-r--r--test/tvlstr.c11
-rw-r--r--test/vds.c160
37 files changed, 7244 insertions, 3090 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index a4bc8e9..04b964d 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -51,7 +51,7 @@ if (BUILD_SHARED_LIBS)
target_link_libraries (${HDF5_TEST_LIBSH_TARGET} "wsock32.lib")
endif (MINGW)
target_link_libraries (${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
- H5_SET_LIB_OPTIONS (${HDF5_TEST_LIBSH_TARGET} ${HDF5_TEST_LIB_NAME} SHARED)
+ H5_SET_LIB_OPTIONS (${HDF5_TEST_LIBSH_TARGET} ${HDF5_TEST_LIB_NAME} SHARED ${HDF5_PACKAGE_SOVERSION})
set_target_properties (${HDF5_TEST_LIBSH_TARGET} PROPERTIES
FOLDER libraries/test
COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB"
@@ -74,7 +74,7 @@ endif (BUILD_SHARED_LIBS)
file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/testdir2")
#-----------------------------------------------------------------------------
- # Define Test Library Sources
+ # Define Plugin Test Sources
#-----------------------------------------------------------------------------
set (TEST_PLUGIN_LIBS
dynlib1
@@ -94,12 +94,7 @@ endif (BUILD_SHARED_LIBS)
add_library (${HDF5_TEST_PLUGIN_LIB_TARGET} SHARED ${HDF5_TEST_SOURCE_DIR}/${test_lib}.c)
TARGET_C_PROPERTIES (${HDF5_TEST_PLUGIN_LIB_TARGET} SHARED " " " ")
target_link_libraries (${HDF5_TEST_PLUGIN_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
- H5_SET_LIB_OPTIONS (
- ${HDF5_TEST_PLUGIN_LIB_TARGET} ${HDF5_TEST_PLUGIN_LIB_NAME}
- SHARED
- HDF5_TEST_PLUGIN_LIB_NAME_RELEASE
- HDF5_TEST_PLUGIN_LIB_NAME_DEBUG
- )
+ H5_SET_LIB_OPTIONS (${HDF5_TEST_PLUGIN_LIB_TARGET} ${HDF5_TEST_PLUGIN_LIB_NAME} SHARED ${HDF5_PACKAGE_SOVERSION})
set_target_properties (${HDF5_TEST_PLUGIN_LIB_TARGET} PROPERTIES FOLDER libraries/TEST_PLUGIN)
#-----------------------------------------------------------------------------
@@ -125,12 +120,7 @@ endif (BUILD_SHARED_LIBS)
add_library (${HDF5_TEST_PLUGIN_LIB_TARGET} SHARED ${HDF5_TEST_SOURCE_DIR}/${test_lib}.c)
TARGET_C_PROPERTIES (${HDF5_TEST_PLUGIN_LIB_TARGET} SHARED " " " ")
target_link_libraries (${HDF5_TEST_PLUGIN_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
- H5_SET_LIB_OPTIONS (
- ${HDF5_TEST_PLUGIN_LIB_TARGET} ${HDF5_TEST_PLUGIN_LIB_NAME}
- SHARED
- HDF5_TEST_PLUGIN_LIB_NAME_RELEASE
- HDF5_TEST_PLUGIN_LIB_NAME_DEBUG
- )
+ H5_SET_LIB_OPTIONS (${HDF5_TEST_PLUGIN_LIB_TARGET} ${HDF5_TEST_PLUGIN_LIB_NAME} SHARED ${HDF5_PACKAGE_SOVERSION})
set_target_properties (${HDF5_TEST_PLUGIN_LIB_TARGET} PROPERTIES FOLDER libraries/TEST_PLUGIN)
#-----------------------------------------------------------------------------
diff --git a/test/Makefile.am b/test/Makefile.am
index 0667be0..74371c9 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -135,7 +135,7 @@ CHECK_CLEANFILES+=accum.h5 cmpd_dset.h5 compact_dataset.h5 dataset.h5 dset_offse
huge_chunks.h5 chunk_cache.h5 big_chunk.h5 chunk_expand.h5 \
copy_dcpl_newfile.h5 extend.h5 istore.h5 extlinks*.h5 frspace.h5 links*.h5 \
sys_file1 tfile[1-7].h5 th5s[1-4].h5 lheap.h5 fheap.h5 ohdr.h5 \
- stab.h5 extern_[1-3].h5 extern_[1-4][ab].raw gheap[0-4].h5 \
+ stab.h5 extern_[1-5].h5 extern_[1-4][rw].raw gheap[0-4].h5 \
dt_arith[1-2] links.h5 links[0-6]*.h5 extlinks[0-15].h5 tmp \
big.data big[0-9][0-9][0-9][0-9][0-9].h5 \
stdio.h5 sec2.h5 dtypes[0-9].h5 dtypes1[0].h5 dt_arith[1-2].h5 tattr.h5 \
@@ -156,7 +156,7 @@ CHECK_CLEANFILES+=accum.h5 cmpd_dset.h5 compact_dataset.h5 dataset.h5 dset_offse
new_multi_file_v16-r.h5 new_multi_file_v16-s.h5 \
split_get_file_image_test-m.h5 split_get_file_image_test-r.h5 \
file_image_core_test.h5.copy unregister_filter_1.h5 unregister_filter_2.h5 \
- vds_virt.h5 vds_src_[0-1].h5
+ vds_virt.h5 vds_dapl.h5 vds_src_[0-1].h5
# Sources for testhdf5 executable
testhdf5_SOURCES=testhdf5.c tarray.c tattr.c tchecksum.c tconfig.c tfile.c \
diff --git a/test/accum.c b/test/accum.c
index 3fb290b..5a2aaf9 100644
--- a/test/accum.c
+++ b/test/accum.c
@@ -55,8 +55,8 @@ unsigned test_random_write(const H5F_io_info_t *fio_info);
void accum_printf(void);
/* Private Test H5Faccum Function Wrappers */
-#define accum_write(a,s,b) H5F_block_write(f, H5FD_MEM_DEFAULT, (haddr_t)(a), (size_t)(s), H5P_DATASET_XFER_DEFAULT, (b))
-#define accum_read(a,s,b) H5F_block_read(f, H5FD_MEM_DEFAULT, (haddr_t)(a), (size_t)(s), H5P_DATASET_XFER_DEFAULT, (b))
+#define accum_write(a,s,b) H5F_block_write(f, H5FD_MEM_DEFAULT, (haddr_t)(a), (size_t)(s), H5AC_ind_read_dxpl_id, (b))
+#define accum_read(a,s,b) H5F_block_read(f, H5FD_MEM_DEFAULT, (haddr_t)(a), (size_t)(s), H5AC_ind_read_dxpl_id, (b))
#define accum_free(fio_info,a,s) H5F__accum_free(fio_info, H5FD_MEM_DEFAULT, (haddr_t)(a), (hsize_t)(s))
#define accum_flush(fio_info) H5F__accum_flush(fio_info)
#define accum_reset(fio_info) H5F__accum_reset(fio_info, TRUE)
@@ -101,7 +101,7 @@ main(void)
/* Set up I/O info for operation */
fio_info.f = f;
- if(NULL == (fio_info.dxpl = (H5P_genplist_t *)H5I_object(H5P_DATASET_XFER_DEFAULT))) FAIL_STACK_ERROR
+ if(NULL == (fio_info.dxpl = (H5P_genplist_t *)H5I_object(H5AC_ind_read_dxpl_id))) FAIL_STACK_ERROR
/* Reset metadata accumulator for the file */
if(accum_reset(&fio_info) < 0) FAIL_STACK_ERROR
diff --git a/test/btree2.c b/test/btree2.c
index 3ac5ef4..81c5ea2 100644
--- a/test/btree2.c
+++ b/test/btree2.c
@@ -44,8 +44,11 @@ const char *FILENAME[] = {
};
#define INSERT_SPLIT_ROOT_NREC 63
-#define INSERT_MANY (1000*1000)
-#define FIND_MANY (INSERT_MANY/100)
+#define INSERT_SPLIT_ROOT_NREC_REC 64
+#define INSERT_MANY (1000 * 1000)
+#define INSERT_MANY_REC (2700 * 1000)
+#define FIND_MANY (INSERT_MANY / 100)
+#define FIND_MANY_REC (INSERT_MANY_REC / 100)
#define FIND_NEIGHBOR 2000
#define DELETE_SMALL 20
#define DELETE_MEDIUM 200
@@ -71,7 +74,7 @@ typedef struct bt2_test_param_t {
*-------------------------------------------------------------------------
*/
static int
-init_cparam(H5B2_create_t *cparam)
+init_cparam(H5B2_create_t *cparam, H5B2_create_t *cparam2)
{
/* Wipe out background */
HDmemset(cparam, 0, sizeof(*cparam));
@@ -83,6 +86,16 @@ init_cparam(H5B2_create_t *cparam)
cparam->split_percent = 100;
cparam->merge_percent = 40;
+ /* Wipe out background */
+ HDmemset(cparam2, 0, sizeof(*cparam2));
+
+ /* General parameters */
+ cparam2->cls = H5B2_TEST2;
+ cparam2->node_size = (size_t)1024;
+ cparam2->rrec_size = (size_t)16;
+ cparam2->split_percent = 100;
+ cparam2->merge_percent = 40;
+
return(0);
} /* init_cparam() */
@@ -162,6 +175,47 @@ error:
/*-------------------------------------------------------------------------
+ * Function: reopen_file
+ *
+ * Purpose: Re-open the file
+ *
+ * Return: Success: 0
+ * Failure: 1
+ *
+ * Programmer: Quincey Koziol
+ * Monday, December 28, 2015
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+reopen_file(hid_t *file, H5F_t **f, hid_t fapl)
+{
+ char filename[1024]; /* Filename to use */
+
+ /* Set the filename to use for this test (dependent on fapl) */
+ h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
+
+ /* Create the file to work on */
+ if((*file = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0)
+ TEST_ERROR
+
+ /* Get a pointer to the internal file object */
+ if(NULL == (*f = (H5F_t *)H5VL_object(*file)))
+ STACK_ERROR
+
+ /* Ignore metadata tags in the file's cache */
+ if(H5AC_ignore_tags(*f) < 0)
+ STACK_ERROR
+
+ /* Success */
+ return(0);
+
+error:
+ return(-1);
+} /* end create_file() */
+
+
+/*-------------------------------------------------------------------------
* Function: reopen_btree
*
* Purpose: Perform common "re-open" operations on B-tree for testing
@@ -245,11 +299,11 @@ error:
*-------------------------------------------------------------------------
*/
static int
-check_node_depth(H5B2_t *bt2, hid_t dxpl, hsize_t record, unsigned depth)
+check_node_depth(H5B2_t *bt2, hid_t dxpl, 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, dxpl, record)) < 0)
FAIL_STACK_ERROR
if((unsigned)rec_depth != depth)
TEST_ERROR
@@ -293,7 +347,7 @@ check_node_info(H5B2_t *bt2, hid_t dxpl, hsize_t record,
error:
return(-1);
-} /* end check_node_depth() */
+} /* end check_node_info() */
/*-------------------------------------------------------------------------
@@ -302,7 +356,6 @@ error:
* Purpose: v2 B-tree iterator callback
*
* Return: Success: 0
- *
* Failure: 1
*
* Programmer: Quincey Koziol
@@ -325,12 +378,41 @@ iter_cb(const void *_record, void *_op_data)
/*-------------------------------------------------------------------------
+ * Function: iter_rec_cb
+ *
+ * Purpose: v2 B-tree iterator callback for H5B2_test_rec_t records
+ *
+ * Return: Success: 0
+ * Failure: 1
+ *
+ * Programmer: Quincey Koziol
+ * Friday, December 25, 2015
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+iter_rec_cb(const void *_record, void *_op_data)
+{
+ const H5B2_test_rec_t *record = (const H5B2_test_rec_t *)_record;
+ H5B2_test_rec_t *idx = (H5B2_test_rec_t *)_op_data;
+
+ if(record->key != idx->key)
+ return(H5_ITER_ERROR);
+ if(record->val != idx->val)
+ return(H5_ITER_ERROR);
+
+ idx->key++;
+ idx->val += 2;
+ return(H5_ITER_CONT);
+} /* end iter_rec_cb() */
+
+
+/*-------------------------------------------------------------------------
* Function: find_cb
*
* Purpose: v2 B-tree find callback
*
* Return: Success: TRUE/FALSE
- *
* Failure: FAIL
*
* Programmer: Quincey Koziol
@@ -352,6 +434,33 @@ find_cb(const void *_record, void *_op_data)
/*-------------------------------------------------------------------------
+ * Function: find_rec_cb
+ *
+ * Purpose: v2 B-tree find callback for H5B2_test_rec_t records
+ *
+ * Return: Success: TRUE/FALSE
+ * Failure: FAIL
+ *
+ * Programmer: Quincey Koziol
+ * Friday, December 25, 2015
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+find_rec_cb(const void *_record, void *_op_data)
+{
+ const H5B2_test_rec_t *record = (const H5B2_test_rec_t *)_record;
+ H5B2_test_rec_t *search = (H5B2_test_rec_t *)_op_data;
+
+ if(record->key != search->key)
+ return(FALSE);
+
+ search->val = record->val;
+ return(TRUE);
+} /* end find_rec_cb() */
+
+
+/*-------------------------------------------------------------------------
* Function: find_dec_cb
*
* Purpose: v2 B-tree find callback for indexing in decreasing order
@@ -380,6 +489,34 @@ find_dec_cb(const void *_record, void *_op_data)
/*-------------------------------------------------------------------------
+ * Function: index_rec_cb
+ *
+ * Purpose: v2 B-tree index callback for H5B2_test_rec_t records
+ *
+ * Return: Success: TRUE/FALSE
+ * Failure: FAIL
+ *
+ * Programmer: Quincey Koziol
+ * Friday, December 25, 2015
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+index_rec_cb(const void *_record, void *_op_data)
+{
+ const H5B2_test_rec_t *record = (const H5B2_test_rec_t *)_record;
+ H5B2_test_rec_t *search = (H5B2_test_rec_t *)_op_data;
+
+ HDassert(record);
+ HDassert(search);
+
+ search->key = record->key;
+ search->val = record->val;
+ return(TRUE);
+} /* end index_rec_cb() */
+
+
+/*-------------------------------------------------------------------------
* Function: neighbor_cb
*
* Purpose: v2 B-tree neighbor callback
@@ -433,6 +570,57 @@ modify_cb(void *_record, void *_op_data, hbool_t *changed)
/*-------------------------------------------------------------------------
+ * Function: modify_rec_cb
+ *
+ * Purpose: v2 B-tree modify callback for H5B2_test_rec_t records
+ *
+ * Return: Success: 0
+ * Failure: 1
+ *
+ * Programmer: Quincey Koziol
+ * Friday, December 25, 2015
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+modify_rec_cb(void *_record, void *_op_data, hbool_t *changed)
+{
+ H5B2_test_rec_t *record = (H5B2_test_rec_t *)_record;
+ H5B2_test_rec_t *modify = (H5B2_test_rec_t *)_op_data;
+
+ HDassert(record->key == modify->key);
+ record->val = modify->val;
+ *changed = TRUE;
+
+ return(0);
+} /* end modify_rec_cb() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: no_modify_cb
+ *
+ * Purpose: v2 B-tree modify callback for updates which shouldn't change
+ * the record (ie. inserting not modifying)
+ *
+ * Return: Success: 0
+ * Failure: 1
+ *
+ * Programmer: Quincey Koziol
+ * Wednesday, December 23, 2015
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+no_modify_cb(void H5_ATTR_UNUSED *_record, void H5_ATTR_UNUSED *_op_data,
+ hbool_t *changed)
+{
+ *changed = FALSE;
+
+ return(1);
+} /* end no_modify_cb() */
+
+
+/*-------------------------------------------------------------------------
* Function: remove_cb
*
* Purpose: v2 B-tree remove callback
@@ -477,7 +665,7 @@ 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 = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ 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 */
@@ -691,7 +879,7 @@ 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 = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ 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 */
@@ -725,7 +913,8 @@ test_insert_split_root(hid_t fapl, const H5B2_create_t *cparam,
bt2_stat.nrecords = (INSERT_SPLIT_ROOT_NREC - 1);
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)33, (unsigned)0) < 0)
+ record = (hsize_t)33;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
@@ -742,7 +931,8 @@ test_insert_split_root(hid_t fapl, const H5B2_create_t *cparam,
bt2_stat.nrecords = INSERT_SPLIT_ROOT_NREC;
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)33, (unsigned)1) < 0)
+ record = (hsize_t)33;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
@@ -763,7 +953,8 @@ test_insert_split_root(hid_t fapl, const H5B2_create_t *cparam,
bt2_stat.nrecords = (INSERT_SPLIT_ROOT_NREC + 2);
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)33, (unsigned)1) < 0)
+ record = (hsize_t)33;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
@@ -865,7 +1056,7 @@ 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 = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ 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 */
@@ -897,7 +1088,8 @@ test_insert_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
bt2_stat.nrecords = INSERT_SPLIT_ROOT_NREC;
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)INSERT_SPLIT_ROOT_NREC, (unsigned)1) < 0)
+ record = (hsize_t)INSERT_SPLIT_ROOT_NREC;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
@@ -917,7 +1109,8 @@ test_insert_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
bt2_stat.nrecords = (INSERT_SPLIT_ROOT_NREC + (INSERT_SPLIT_ROOT_NREC / 2) + 1);
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)((INSERT_SPLIT_ROOT_NREC / 2) + (INSERT_SPLIT_ROOT_NREC / 4) + 1), (unsigned)1) < 0)
+ record = (hsize_t)((INSERT_SPLIT_ROOT_NREC / 2) + (INSERT_SPLIT_ROOT_NREC / 4) + 1);
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
/* Close the v2 B-tree */
@@ -948,7 +1141,8 @@ test_insert_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
bt2_stat.nrecords = INSERT_SPLIT_ROOT_NREC;
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)(INSERT_SPLIT_ROOT_NREC / 2), (unsigned)1) < 0)
+ record = (hsize_t)(INSERT_SPLIT_ROOT_NREC / 2);
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
@@ -967,7 +1161,8 @@ test_insert_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
bt2_stat.nrecords = INSERT_SPLIT_ROOT_NREC + (INSERT_SPLIT_ROOT_NREC / 2) + 1;
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)((INSERT_SPLIT_ROOT_NREC / 2) + (INSERT_SPLIT_ROOT_NREC / 4) + 1), (unsigned)1) < 0)
+ record = (hsize_t)((INSERT_SPLIT_ROOT_NREC / 2) + (INSERT_SPLIT_ROOT_NREC / 4) + 1);
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
/* Close the v2 B-tree */
@@ -1016,7 +1211,7 @@ 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 = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ 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 */
@@ -1049,7 +1244,7 @@ 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, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
@@ -1069,10 +1264,10 @@ 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, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
record = 63;
- if(check_node_depth(bt2, dxpl, record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
/* Close the v2 B-tree */
@@ -1104,7 +1299,7 @@ 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, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
@@ -1123,9 +1318,11 @@ test_insert_level1_side_split(hid_t fapl, const H5B2_create_t *cparam,
bt2_stat.nrecords = 2 * INSERT_SPLIT_ROOT_NREC;
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)62, (unsigned)1) < 0)
+ record = 62;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)94, (unsigned)1) < 0)
+ record = 94;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
/* Close the v2 B-tree */
@@ -1176,7 +1373,7 @@ 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 = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ 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 */
@@ -1210,7 +1407,7 @@ 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, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
@@ -1230,10 +1427,10 @@ 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, dxpl, &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, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
@@ -1252,9 +1449,11 @@ test_insert_level1_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
bt2_stat.nrecords = (2 * INSERT_SPLIT_ROOT_NREC) + (INSERT_SPLIT_ROOT_NREC / 2) + 1;
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)52, (unsigned)1) < 0)
+ record = 52;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)105, (unsigned)1) < 0)
+ record = 105;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
@@ -1317,7 +1516,7 @@ 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 = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ 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 */
@@ -1351,7 +1550,7 @@ 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, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
@@ -1370,11 +1569,14 @@ test_insert_level1_middle_split(hid_t fapl, const H5B2_create_t *cparam,
bt2_stat.nrecords = 3 * INSERT_SPLIT_ROOT_NREC;
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)62, (unsigned)1) < 0)
+ record = 62;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)94, (unsigned)1) < 0)
+ record = 94;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)126, (unsigned)1) < 0)
+ record = 126;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
@@ -1433,7 +1635,7 @@ 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 = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ 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 */
@@ -1472,7 +1674,8 @@ test_insert_make_level2(hid_t fapl, const H5B2_create_t *cparam,
bt2_stat.nrecords = (INSERT_SPLIT_ROOT_NREC * 29) + 1;
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)948, (unsigned)2) < 0)
+ record = 948;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
@@ -1521,7 +1724,8 @@ test_insert_make_level2(hid_t fapl, const H5B2_create_t *cparam,
FAIL_STACK_ERROR
/* Check with B-tree */
- if(check_node_depth(bt2, dxpl, (hsize_t)948, (unsigned)2) < 0)
+ record = 948;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
TEST_ERROR
/* Attempt to find existant record in internal node of level-2 B-tree */
@@ -1530,7 +1734,8 @@ test_insert_make_level2(hid_t fapl, const H5B2_create_t *cparam,
FAIL_STACK_ERROR
/* Check with B-tree */
- if(check_node_depth(bt2, dxpl, (hsize_t)505, (unsigned)1) < 0)
+ record = 505;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
/* Attempt to find existant record in leaf of level-2 B-tree */
@@ -1539,7 +1744,8 @@ test_insert_make_level2(hid_t fapl, const H5B2_create_t *cparam,
FAIL_STACK_ERROR
/* Check with B-tree */
- if(check_node_depth(bt2, dxpl, (hsize_t)555, (unsigned)0) < 0)
+ record = 555;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
TEST_ERROR
/* Attempt to index non-existant record in level-2 B-tree */
@@ -1611,7 +1817,7 @@ 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 = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ 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 */
@@ -1650,11 +1856,14 @@ test_insert_level2_leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
bt2_stat.nrecords = (INSERT_SPLIT_ROOT_NREC * 29) + (INSERT_SPLIT_ROOT_NREC / 2);
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)1008, (unsigned)2) < 0)
+ record = 1008;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)1859, (unsigned)1) < 0)
+ record = 1859;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)1921, (unsigned)0) < 0)
+ record = 1921;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
@@ -1671,11 +1880,14 @@ test_insert_level2_leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
bt2_stat.nrecords = (INSERT_SPLIT_ROOT_NREC * 29) + (INSERT_SPLIT_ROOT_NREC / 2) + 1;
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)1008, (unsigned)2) < 0)
+ record = 1008;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)1875, (unsigned)1) < 0)
+ record = 1875;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)1922, (unsigned)0) < 0)
+ record = 1922;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
TEST_ERROR
PASSED();
@@ -1691,11 +1903,14 @@ test_insert_level2_leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
bt2_stat.nrecords = (INSERT_SPLIT_ROOT_NREC * 29) + (INSERT_SPLIT_ROOT_NREC / 2) + 1;
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)1008, (unsigned)2) < 0)
+ record = 1008;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)94, (unsigned)1) < 0)
+ record = 94;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)32, (unsigned)0) < 0)
+ record = 32;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
TEST_ERROR
/* Add more records to left-most leaf, to force a 2->1 split and then a
@@ -1712,11 +1927,14 @@ test_insert_level2_leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
bt2_stat.nrecords = (INSERT_SPLIT_ROOT_NREC * 30) + 1;
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)1008, (unsigned)2) < 0)
+ record = 1008;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)47, (unsigned)1) < 0)
+ record = 47;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)0, (unsigned)0) < 0)
+ record = 0;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
TEST_ERROR
PASSED();
@@ -1732,13 +1950,17 @@ test_insert_level2_leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
bt2_stat.nrecords = (INSERT_SPLIT_ROOT_NREC * 30) + 1;
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)1008, (unsigned)2) < 0) /* Record in root node */
+ record = 1008;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) /* Record in root node */
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)535, (unsigned)1) < 0) /* Record in middle node before insertion point */
+ record = 535;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) /* Record in middle node before insertion point */
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)630, (unsigned)1) < 0) /* Record in middle node after insertion point */
+ record = 630;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) /* Record in middle node after insertion point */
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)568, (unsigned)0) < 0) /* Record in leaf node just after insertion point */
+ record = 568;
+ if(check_node_depth(bt2, dxpl, &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 */
@@ -1753,13 +1975,17 @@ test_insert_level2_leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
bt2_stat.nrecords = (INSERT_SPLIT_ROOT_NREC * 30) + (INSERT_SPLIT_ROOT_NREC / 2) + 2;
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)1008, (unsigned)2) < 0) /* Record in root node */
+ record = 1008;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) /* Record in root node */
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)524, (unsigned)1) < 0) /* Record in middle node before insertion point */
+ record = 524;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) /* Record in middle node before insertion point */
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)577, (unsigned)1) < 0) /* Record in middle node after insertion point */
+ record = 577;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) /* Record in middle node after insertion point */
TEST_ERROR
- if(check_node_depth(bt2, dxpl, (hsize_t)568, (unsigned)0) < 0) /* Record in leaf node just after insertion point */
+ record = 568;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) /* Record in leaf node just after insertion point */
TEST_ERROR
/* Check for closing & re-opening the B-tree */
@@ -1820,7 +2046,7 @@ 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 = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ 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 */
@@ -1859,13 +2085,13 @@ 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, dxpl, &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, dxpl, &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, dxpl, &record, (unsigned)0) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
@@ -1885,16 +2111,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, dxpl, &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, dxpl, &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, dxpl, &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, dxpl, &record, (unsigned)0) < 0)
TEST_ERROR
PASSED();
@@ -1911,13 +2137,13 @@ 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, dxpl, &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, dxpl, &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, dxpl, &record, (unsigned)0) < 0)
TEST_ERROR
/* Add another record to left-most leaf, to force a 1->2 node split on left leaf */
@@ -1931,16 +2157,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, dxpl, &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, dxpl, &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, dxpl, &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, dxpl, &record, (unsigned)0) < 0)
TEST_ERROR
PASSED();
@@ -1957,16 +2183,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, dxpl, &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, dxpl, &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, dxpl, &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, dxpl, &record, (unsigned)0) < 0)
TEST_ERROR
/* Add another record to middle leaf, to force a node split on middle leaf */
@@ -1980,19 +2206,19 @@ 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, dxpl, &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, dxpl, &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, dxpl, &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, dxpl, &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, dxpl, &record, (unsigned)0) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
@@ -2054,7 +2280,7 @@ 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 = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ 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 */
@@ -2089,13 +2315,13 @@ 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, dxpl, &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, dxpl, &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, dxpl, &record, (unsigned)0) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
@@ -2113,13 +2339,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, dxpl, &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, dxpl, &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, dxpl, &record, (unsigned)0) < 0)
TEST_ERROR
PASSED();
@@ -2136,13 +2362,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, dxpl, &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, dxpl, &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, dxpl, &record, (unsigned)0) < 0)
TEST_ERROR
/* Force left-most internal node to redistribute */
@@ -2158,13 +2384,13 @@ 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, dxpl, &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, dxpl, &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, dxpl, &record, (unsigned)0) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
@@ -2226,7 +2452,7 @@ 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 = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ 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 */
@@ -2261,13 +2487,13 @@ 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, dxpl, &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, dxpl, &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, dxpl, &record, (unsigned)0) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
@@ -2285,16 +2511,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, dxpl, &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, dxpl, &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, dxpl, &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, dxpl, &record, (unsigned)0) < 0)
TEST_ERROR
PASSED();
@@ -2311,13 +2537,13 @@ 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, dxpl, &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, dxpl, &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, dxpl, &record, (unsigned)0) < 0)
TEST_ERROR
/* Force left-most internal node to split */
@@ -2333,16 +2559,16 @@ 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, dxpl, &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, dxpl, &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, dxpl, &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, dxpl, &record, (unsigned)0) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
@@ -2405,7 +2631,7 @@ 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 = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ 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 */
@@ -2444,19 +2670,19 @@ 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, dxpl, &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, dxpl, &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, dxpl, &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, dxpl, &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, dxpl, &record, (unsigned)0) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
@@ -2476,19 +2702,19 @@ 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, dxpl, &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, dxpl, &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, dxpl, &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, dxpl, &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, dxpl, &record, (unsigned)0) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
@@ -2506,21 +2732,21 @@ 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, dxpl, &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, dxpl, &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, dxpl, &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, dxpl, &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, dxpl, &record, (unsigned)0) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
@@ -2583,7 +2809,7 @@ 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 = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ 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 */
@@ -2627,19 +2853,19 @@ 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, dxpl, &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, dxpl, &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, dxpl, &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, dxpl, &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, dxpl, &record, (unsigned)0) < 0)
TEST_ERROR
/* Insert records to fill up middle internal node */
@@ -2655,19 +2881,19 @@ 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, dxpl, &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, dxpl, &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, dxpl, &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, dxpl, &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, dxpl, &record, (unsigned)0) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
@@ -2685,24 +2911,24 @@ 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, dxpl, &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, dxpl, &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, dxpl, &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, dxpl, &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, dxpl, &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, dxpl, &record, (unsigned)0) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
@@ -2763,7 +2989,7 @@ 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 = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ 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 */
@@ -2975,6 +3201,2019 @@ error:
/*-------------------------------------------------------------------------
+ * Function: test_update_basic
+ *
+ * Purpose: Basic tests for the v2 B-tree update operation
+ *
+ * Return: Success: 0
+ * Failure: 1
+ *
+ * Programmer: Quincey Koziol
+ * Wednesday, December 23, 2015
+ *
+ *-------------------------------------------------------------------------
+ */
+static unsigned
+test_update_basic(hid_t fapl, const H5B2_create_t *cparam,
+ const bt2_test_param_t *tparam)
+{
+ 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 */
+ H5B2_test_rec_t modify; /* Modified value */
+ H5B2_test_rec_t find; /* Record to find */
+ herr_t ret; /* Generic error return value */
+
+ /* Create the file for the test */
+ if(create_file(&file, &f, fapl) < 0)
+ TEST_ERROR
+
+ /* Create the v2 B-tree & get its address */
+ if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ TEST_ERROR
+
+ /*
+ * Test insert record into empty v2 B-tree
+ */
+ 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)
+ TEST_ERROR
+
+ record.key = 42;
+ record.val = 72;
+ if(H5B2_update(bt2, dxpl, &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)
+ 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)
+ 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)
+ 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)
+ 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);
+ } H5E_END_TRY;
+ /* Should fail */
+ if(ret != FAIL)
+ TEST_ERROR
+
+ /* 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)
+ FAIL_STACK_ERROR
+ if(find.key != 42)
+ TEST_ERROR
+ if(find.val != 72)
+ TEST_ERROR
+
+ PASSED();
+
+
+ /*
+ * Test update only record into v2 B-tree
+ */
+ 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)
+ TEST_ERROR
+
+ modify.key = 42;
+ modify.val = 43;
+ if(H5B2_update(bt2, dxpl, &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)
+ 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)
+ 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)
+ 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)
+ 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);
+ } H5E_END_TRY;
+ /* Should fail */
+ if(ret != FAIL)
+ TEST_ERROR
+
+ /* 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)
+ FAIL_STACK_ERROR
+ if(find.key != 42)
+ TEST_ERROR
+ if(find.val != 43)
+ TEST_ERROR
+
+ PASSED();
+
+
+ /*
+ * Test inserting more records into v2 B-tree
+ */
+ 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)
+ TEST_ERROR
+
+ /*
+ * Test inserting second record into v2 B-tree, before all other records
+ */
+ record.key = 34;
+ record.val = 11;
+ if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ FAIL_STACK_ERROR
+
+ /*
+ * Test inserting third record into v2 B-tree, after all other records
+ */
+ record.key = 56;
+ record.val = 12;
+ if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ FAIL_STACK_ERROR
+
+ /*
+ * Test inserting fourth record into v2 B-tree, in the middle of other records
+ */
+ record.key = 38;
+ record.val = 13;
+ if(H5B2_update(bt2, dxpl, &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)
+ 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)
+ 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);
+ } H5E_END_TRY;
+ /* Should fail */
+ if(ret != FAIL)
+ TEST_ERROR
+
+ /* 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)
+ TEST_ERROR
+ if(find.key != 34)
+ TEST_ERROR
+ if(find.val != 11)
+ 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)
+ TEST_ERROR
+ if(find.key != 38)
+ TEST_ERROR
+ if(find.val != 13)
+ 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)
+ TEST_ERROR
+ if(find.key != 42)
+ TEST_ERROR
+ if(find.val != 43)
+ 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)
+ TEST_ERROR
+ if(find.key != 56)
+ TEST_ERROR
+ if(find.val != 12)
+ TEST_ERROR
+
+ PASSED();
+
+
+ /*
+ * Test updating all existing records in v2 B-tree
+ */
+ TESTING("B-tree update: update several records");
+
+ record.key = 34;
+ modify.key = 34;
+ modify.val = 21;
+ if(H5B2_update(bt2, dxpl, &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)
+ FAIL_STACK_ERROR
+ record.key = 42;
+ modify.key = 42;
+ modify.val = 24;
+ if(H5B2_update(bt2, dxpl, &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)
+ 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)
+ 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)
+ 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);
+ } H5E_END_TRY;
+ /* Should fail */
+ if(ret != FAIL)
+ TEST_ERROR
+
+ /* 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)
+ TEST_ERROR
+ if(find.key != 34)
+ TEST_ERROR
+ if(find.val != 21)
+ 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)
+ TEST_ERROR
+ if(find.key != 38)
+ TEST_ERROR
+ if(find.val != 23)
+ 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)
+ TEST_ERROR
+ if(find.key != 42)
+ TEST_ERROR
+ if(find.val != 24)
+ 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)
+ TEST_ERROR
+ if(find.key != 56)
+ TEST_ERROR
+ if(find.val != 22)
+ TEST_ERROR
+
+ /* Close the v2 B-tree */
+ if(H5B2_close(bt2, dxpl) < 0)
+ FAIL_STACK_ERROR
+ bt2 = NULL;
+
+ /* Close the file */
+ if(H5Fclose(file) < 0)
+ TEST_ERROR
+
+ PASSED();
+
+
+ /* All tests passed */
+ return(0);
+
+error:
+ H5E_BEGIN_TRY {
+ if(bt2)
+ H5B2_close(bt2, dxpl);
+ H5Fclose(file);
+ } H5E_END_TRY;
+ return(1);
+} /* test_update_basic() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: test_update_split_root
+ *
+ * Purpose: Basic tests for the B-tree v2 code. This test inserts enough
+ * records to split the root node and force the tree to depth 1.
+ * It also continues to add a few more records to each of the
+ * left and right leaf nodes after the split
+ *
+ * Return: Success: 0
+ * Failure: 1
+ *
+ * Programmer: Quincey Koziol
+ * Wednesday, December 23, 2015
+ *
+ *-------------------------------------------------------------------------
+ */
+static unsigned
+test_update_split_root(hid_t fapl, const H5B2_create_t *cparam,
+ const bt2_test_param_t *tparam)
+{
+ 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 */
+ H5B2_test_rec_t modify; /* Modified value */
+ H5B2_test_rec_t find; /* Record to find */
+ H5B2_test_rec_t idx; /* Index within B-tree, for iterator */
+ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
+ unsigned u; /* Local index variable */
+ herr_t ret; /* Generic error return value */
+
+ /*
+ * Test inserting enough records into v2 B-tree to split the root node
+ */
+ TESTING("B-tree update: split root");
+
+ /* Create the file for the test */
+ if(create_file(&file, &f, fapl) < 0)
+ TEST_ERROR
+
+ /* Create the v2 B-tree & get its address */
+ if(create_btree(f, dxpl, 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)
+ FAIL_STACK_ERROR
+ } /* end for */
+
+ /* Check up on B-tree */
+ bt2_stat.depth = 0;
+ bt2_stat.nrecords = (INSERT_SPLIT_ROOT_NREC_REC - 1);
+ if(check_stats(bt2, &bt2_stat) < 0)
+ TEST_ERROR
+ record.key = 33;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
+ TEST_ERROR
+
+ /* Check for closing & re-opening the B-tree */
+ if(reopen_btree(f, dxpl, &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)
+ FAIL_STACK_ERROR
+
+ /* Check up on B-tree */
+ bt2_stat.depth = 1;
+ bt2_stat.nrecords = INSERT_SPLIT_ROOT_NREC_REC;
+ if(check_stats(bt2, &bt2_stat) < 0)
+ TEST_ERROR
+ record.key = 33;
+ if(check_node_depth(bt2, dxpl, &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)
+ FAIL_STACK_ERROR
+
+ /* Make certain that the index is correct */
+ if(idx.key != (INSERT_SPLIT_ROOT_NREC_REC + 2))
+ TEST_ERROR
+
+ /* Check for closing & re-opening the B-tree */
+ if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ TEST_ERROR
+
+ /* Modify all records */
+ for(u = 0; u < INSERT_SPLIT_ROOT_NREC_REC; u++) {
+ record.key = u + 2;
+ modify.key = u + 2;
+ modify.val = u * 2 + 5;
+ if(H5B2_update(bt2, dxpl, &record, modify_rec_cb, &modify) < 0)
+ FAIL_STACK_ERROR
+ } /* end for */
+
+ /* Check up on B-tree */
+ bt2_stat.depth = 1;
+ bt2_stat.nrecords = INSERT_SPLIT_ROOT_NREC_REC;
+ if(check_stats(bt2, &bt2_stat) < 0)
+ TEST_ERROR
+ record.key = 33;
+ if(check_node_depth(bt2, dxpl, &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)
+ FAIL_STACK_ERROR
+
+ /* Make certain that the index is correct */
+ if(idx.key != (INSERT_SPLIT_ROOT_NREC_REC + 2))
+ TEST_ERROR
+
+
+ /* Check for closing & re-opening the B-tree */
+ if(reopen_btree(f, dxpl, &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)
+ FAIL_STACK_ERROR
+ record.key = 1;
+ record.val = 3;
+ if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ FAIL_STACK_ERROR
+
+ /* Check up on B-tree */
+ bt2_stat.depth = 1;
+ bt2_stat.nrecords = (INSERT_SPLIT_ROOT_NREC_REC + 2);
+ if(check_stats(bt2, &bt2_stat) < 0)
+ TEST_ERROR
+ record.key = 33;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ TEST_ERROR
+
+ /* Check for closing & re-opening the B-tree */
+ if(reopen_btree(f, dxpl, &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)
+ FAIL_STACK_ERROR
+
+ /* Make certain that the index is correct */
+ if(idx.key != (INSERT_SPLIT_ROOT_NREC_REC + 2))
+ TEST_ERROR
+
+ /* Attempt to find non-existant record in level-1 B-tree */
+ /* (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)
+ TEST_ERROR
+ if(find.val != (hsize_t)-1)
+ TEST_ERROR
+
+ /* 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)
+ FAIL_STACK_ERROR
+ if(find.key != 33)
+ TEST_ERROR
+ if(find.val != 67)
+ TEST_ERROR
+
+ /* 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)
+ FAIL_STACK_ERROR
+ if(find.key != 56)
+ TEST_ERROR
+ if(find.val != 113)
+ TEST_ERROR
+
+ /* 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);
+ } H5E_END_TRY;
+ /* Should fail */
+ if(ret != FAIL)
+ TEST_ERROR
+
+ /* 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)
+ FAIL_STACK_ERROR
+ if(find.key != 33)
+ TEST_ERROR
+ if(find.val != 67)
+ TEST_ERROR
+
+ /* 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)
+ FAIL_STACK_ERROR
+ if(find.key != 0)
+ TEST_ERROR
+ if(find.val != 1)
+ TEST_ERROR
+
+ /* 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)
+ FAIL_STACK_ERROR
+ if(find.key != 50)
+ TEST_ERROR
+ if(find.val != 101)
+ TEST_ERROR
+
+ /* Close the v2 B-tree */
+ if(H5B2_close(bt2, dxpl) < 0)
+ FAIL_STACK_ERROR
+ bt2 = NULL;
+
+ if(H5Fclose(file) < 0)
+ TEST_ERROR
+
+ PASSED();
+
+ return 0;
+
+error:
+ H5E_BEGIN_TRY {
+ if(bt2)
+ H5B2_close(bt2, dxpl);
+ H5Fclose(file);
+ } H5E_END_TRY;
+ return 1;
+} /* test_update_split_root() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: test_update_level1_2leaf_redistrib
+ *
+ * Purpose: Basic tests for the B-tree v2 code. This test inserts enough
+ * records to split the root node and force the tree to depth 1.
+ * It continues to add a more records to the each of the
+ * left and right leaf nodes after the split to force a 2 node
+ * redistribution
+ *
+ * Return: Success: 0
+ * Failure: 1
+ *
+ * Programmer: Quincey Koziol
+ * Saturday, December 26, 2015
+ *
+ *-------------------------------------------------------------------------
+ */
+static unsigned
+test_update_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
+ const bt2_test_param_t *tparam)
+{
+ 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 */
+ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
+ unsigned u; /* Local index variable */
+
+ /*
+ * Test inserting many records into v2 B-tree
+ */
+ TESTING("B-tree update: redistribute 2 leaves in level 1 B-tree (l->r)");
+
+ /* Create the file for the test */
+ if(create_file(&file, &f, fapl) < 0)
+ TEST_ERROR
+
+ /* Create the v2 B-tree & get its address */
+ if(create_btree(f, dxpl, 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)
+ FAIL_STACK_ERROR
+ } /* end for */
+
+ /* Check up on B-tree */
+ bt2_stat.depth = 1;
+ bt2_stat.nrecords = INSERT_SPLIT_ROOT_NREC_REC;
+ 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)
+ TEST_ERROR
+
+ /* Check for closing & re-opening the B-tree */
+ if(reopen_btree(f, dxpl, &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;
+ record.val = u + 9;
+ if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ FAIL_STACK_ERROR
+ } /* end for */
+
+ /* Check up on B-tree */
+ bt2_stat.depth = 1;
+ bt2_stat.nrecords = (INSERT_SPLIT_ROOT_NREC_REC + (INSERT_SPLIT_ROOT_NREC_REC / 2) + 1);
+ 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)
+ TEST_ERROR
+
+ /* Close the v2 B-tree */
+ if(H5B2_close(bt2, dxpl) < 0)
+ FAIL_STACK_ERROR
+ bt2 = NULL;
+
+ PASSED();
+
+ /*
+ * Test inserting many records into v2 B-tree
+ */
+ 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)
+ 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)
+ FAIL_STACK_ERROR
+ } /* end for */
+
+ /* Check up on B-tree */
+ bt2_stat.depth = 1;
+ bt2_stat.nrecords = INSERT_SPLIT_ROOT_NREC_REC;
+ 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)
+ TEST_ERROR
+
+ /* Check for closing & re-opening the B-tree */
+ if(reopen_btree(f, dxpl, &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)
+ FAIL_STACK_ERROR
+ } /* end for */
+
+ /* Check up on B-tree */
+ bt2_stat.depth = 1;
+ bt2_stat.nrecords = INSERT_SPLIT_ROOT_NREC_REC + (INSERT_SPLIT_ROOT_NREC_REC / 2) + 1;
+ 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)
+ TEST_ERROR
+
+ /* Close the v2 B-tree */
+ if(H5B2_close(bt2, dxpl) < 0)
+ FAIL_STACK_ERROR
+ bt2 = NULL;
+
+ /* Close file */
+ if(H5Fclose(file) < 0)
+ FAIL_STACK_ERROR
+
+ PASSED();
+
+ return 0;
+
+error:
+ H5E_BEGIN_TRY {
+ if(bt2)
+ H5B2_close(bt2, dxpl);
+ H5Fclose(file);
+ } H5E_END_TRY;
+ return 1;
+} /* test_update_level1_2leaf_redistrib() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: test_update_level1_side_split
+ *
+ * Purpose: Basic tests for the B-tree v2 code. This test inserts enough
+ * records to split the root node and force the tree to depth 1.
+ * It continues to add a more records to the each of the
+ * left and right leaf nodes after the split to force a 2 node
+ * split, adding another node to the B-tree
+ *
+ * Return: Success: 0
+ * Failure: 1
+ *
+ * Programmer: Quincey Koziol
+ * Saturday, December 26, 2015
+ *
+ *-------------------------------------------------------------------------
+ */
+static unsigned
+test_update_level1_side_split(hid_t fapl, const H5B2_create_t *cparam,
+ const bt2_test_param_t *tparam)
+{
+ 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 */
+ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
+ unsigned u; /* Local index variable */
+
+ /*
+ * Test inserting many records into v2 B-tree
+ */
+ TESTING("B-tree update: split side leaf into 2 leaves in level 1 B-tree (l->r)");
+
+ /* Create the file for the test */
+ if(create_file(&file, &f, fapl) < 0)
+ TEST_ERROR
+
+ /* Create the v2 B-tree & get its address */
+ if(create_btree(f, dxpl, 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)
+ FAIL_STACK_ERROR
+ } /* end for */
+
+ /* Check up on B-tree */
+ bt2_stat.depth = 1;
+ bt2_stat.nrecords = INSERT_SPLIT_ROOT_NREC_REC;
+ 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)
+ TEST_ERROR
+
+ /* Check for closing & re-opening the B-tree */
+ if(reopen_btree(f, dxpl, &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)
+ FAIL_STACK_ERROR
+ } /* end for */
+
+ /* Check up on B-tree */
+ bt2_stat.depth = 1;
+ bt2_stat.nrecords = 2 * INSERT_SPLIT_ROOT_NREC_REC;
+ if(check_stats(bt2, &bt2_stat) < 0)
+ TEST_ERROR
+ record.key = 31;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ TEST_ERROR
+ record.key = 64;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ TEST_ERROR
+
+ /* Close the v2 B-tree */
+ if(H5B2_close(bt2, dxpl) < 0)
+ FAIL_STACK_ERROR
+ bt2 = NULL;
+
+ PASSED();
+
+ /*
+ * Test inserting many records into v2 B-tree
+ */
+ 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)
+ 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)
+ FAIL_STACK_ERROR
+ } /* end for */
+
+ /* Check up on B-tree */
+ bt2_stat.depth = 1;
+ bt2_stat.nrecords = INSERT_SPLIT_ROOT_NREC_REC;
+ 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)
+ TEST_ERROR
+
+ /* Check for closing & re-opening the B-tree */
+ if(reopen_btree(f, dxpl, &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)
+ FAIL_STACK_ERROR
+ } /* end for */
+
+ /* Check up on B-tree */
+ bt2_stat.depth = 1;
+ bt2_stat.nrecords = 2 * INSERT_SPLIT_ROOT_NREC_REC;
+ if(check_stats(bt2, &bt2_stat) < 0)
+ TEST_ERROR
+ record.key = 63;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ TEST_ERROR
+ record.key = 95;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ TEST_ERROR
+
+ /* Close the v2 B-tree */
+ if(H5B2_close(bt2, dxpl) < 0)
+ FAIL_STACK_ERROR
+ bt2 = NULL;
+
+ /* Close file */
+ if(H5Fclose(file) < 0)
+ FAIL_STACK_ERROR
+
+ PASSED();
+
+ return 0;
+
+error:
+ H5E_BEGIN_TRY {
+ if(bt2)
+ H5B2_close(bt2, dxpl);
+ H5Fclose(file);
+ } H5E_END_TRY;
+ return 1;
+} /* test_update_level1_side_split() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: test_update_level1_3leaf_redistrib
+ *
+ * Purpose: Basic tests for the B-tree v2 code. This test inserts enough
+ * records to split the root node and force the tree to depth 1.
+ * It continues to add a more records to the each of the
+ * left and right leaf nodes after the split to force a 2 node
+ * split, adding another node to the B-tree, then continues to
+ * add records until a 3 node redistribution occurs
+ *
+ * Return: Success: 0
+ *
+ * Failure: 1
+ *
+ * Programmer: Quincey Koziol
+ * Saturday, December 26, 2015
+ *
+ *-------------------------------------------------------------------------
+ */
+static unsigned
+test_update_level1_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
+ const bt2_test_param_t *tparam)
+{
+ 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 */
+ H5B2_test_rec_t idx; /* Index within B-tree, for iterator */
+ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
+ unsigned u; /* Local index variable */
+
+ /*
+ * Test inserting many records into v2 B-tree
+ */
+ TESTING("B-tree update: redistribute 3 leaves in level 1 B-tree");
+
+ /* Create the file for the test */
+ if(create_file(&file, &f, fapl) < 0)
+ TEST_ERROR
+
+ /* Create the v2 B-tree & get its address */
+ if(create_btree(f, dxpl, 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)
+ FAIL_STACK_ERROR
+ } /* end for */
+
+ /* Check up on B-tree */
+ bt2_stat.depth = 1;
+ bt2_stat.nrecords = INSERT_SPLIT_ROOT_NREC_REC;
+ 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)
+ TEST_ERROR
+
+ /* Check for closing & re-opening the B-tree */
+ if(reopen_btree(f, dxpl, &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)
+ FAIL_STACK_ERROR
+ } /* end for */
+
+ /* Check up on B-tree */
+ bt2_stat.depth = 1;
+ bt2_stat.nrecords = 2 * INSERT_SPLIT_ROOT_NREC_REC;
+ 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)
+ 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)
+ TEST_ERROR
+
+ /* Check for closing & re-opening the B-tree */
+ if(reopen_btree(f, dxpl, &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)
+ FAIL_STACK_ERROR
+ } /* end for */
+
+ /* Check up on B-tree */
+ bt2_stat.depth = 1;
+ bt2_stat.nrecords = (2 * INSERT_SPLIT_ROOT_NREC_REC) + (INSERT_SPLIT_ROOT_NREC_REC / 2) + 1;
+ if(check_stats(bt2, &bt2_stat) < 0)
+ TEST_ERROR
+ record.key = 52;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ TEST_ERROR
+ record.key = 107;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ TEST_ERROR
+
+ /* Check for closing & re-opening the B-tree */
+ if(reopen_btree(f, dxpl, &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)
+ FAIL_STACK_ERROR
+
+ /* Make certain that the index is correct */
+ if(idx.key != ((INSERT_SPLIT_ROOT_NREC_REC * 2) + (INSERT_SPLIT_ROOT_NREC_REC / 2) + 1))
+ TEST_ERROR
+
+ /* Close the v2 B-tree */
+ if(H5B2_close(bt2, dxpl) < 0)
+ FAIL_STACK_ERROR
+ bt2 = NULL;
+
+ /* Close file */
+ if(H5Fclose(file) < 0)
+ FAIL_STACK_ERROR
+
+ PASSED();
+
+ return 0;
+
+error:
+ H5E_BEGIN_TRY {
+ if(bt2)
+ H5B2_close(bt2, dxpl);
+ H5Fclose(file);
+ } H5E_END_TRY;
+ return 1;
+} /* test_update_level1_3leaf_redistrib() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: test_update_level1_middle_split
+ *
+ * Purpose: Basic tests for the B-tree v2 code. This test inserts enough
+ * records to split the root node and force the tree to depth 1.
+ * It continues to add a more records to the each of the
+ * left and right leaf nodes after the split to force a 2 node
+ * split, adding another node to the B-tree, then continues to
+ * add records until a 3 node split occurs
+ *
+ * Return: Success: 0
+ * Failure: 1
+ *
+ * Programmer: Quincey Koziol
+ * Saturday, December 26, 2015
+ *
+ *-------------------------------------------------------------------------
+ */
+static unsigned
+test_update_level1_middle_split(hid_t fapl, const H5B2_create_t *cparam,
+ const bt2_test_param_t *tparam)
+{
+ 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 */
+ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
+ H5B2_test_rec_t idx; /* Index within B-tree, for iterator */
+ unsigned u; /* Local index variable */
+
+ /*
+ * Test inserting many records into v2 B-tree
+ */
+ TESTING("B-tree update: split middle leaf into 2 leaves in level 1 B-tree");
+
+ /* Create the file for the test */
+ if(create_file(&file, &f, fapl) < 0)
+ TEST_ERROR
+
+ /* Create the v2 B-tree & get its address */
+ if(create_btree(f, dxpl, 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)
+ FAIL_STACK_ERROR
+ } /* end for */
+
+ /* Check up on B-tree */
+ bt2_stat.depth = 1;
+ bt2_stat.nrecords = INSERT_SPLIT_ROOT_NREC_REC;
+ 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)
+ TEST_ERROR
+
+ /* Check for closing & re-opening the B-tree */
+ if(reopen_btree(f, dxpl, &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)
+ FAIL_STACK_ERROR
+ } /* end for */
+
+ /* Check up on B-tree */
+ bt2_stat.depth = 1;
+ bt2_stat.nrecords = 3 * INSERT_SPLIT_ROOT_NREC_REC;
+ if(check_stats(bt2, &bt2_stat) < 0)
+ TEST_ERROR
+ record.key = 63;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ TEST_ERROR
+ record.key = 95;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ TEST_ERROR
+ record.key = 128;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ TEST_ERROR
+
+ /* Check for closing & re-opening the B-tree */
+ if(reopen_btree(f, dxpl, &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)
+ FAIL_STACK_ERROR
+
+ /* Make certain that the index is correct */
+ if(idx.key != (INSERT_SPLIT_ROOT_NREC_REC * 3))
+ TEST_ERROR
+
+ /* Close the v2 B-tree */
+ if(H5B2_close(bt2, dxpl) < 0)
+ FAIL_STACK_ERROR
+ bt2 = NULL;
+
+ /* Close file */
+ if(H5Fclose(file) < 0)
+ STACK_ERROR
+
+ PASSED();
+
+ return 0;
+
+error:
+ H5E_BEGIN_TRY {
+ if(bt2)
+ H5B2_close(bt2, dxpl);
+ H5Fclose(file);
+ } H5E_END_TRY;
+ return 1;
+} /* test_update_level1_middle_split() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: test_update_make_level2
+ *
+ * Purpose: Basic tests for the B-tree v2 code. This test inserts enough
+ * records to make a level 2 B-tree
+ *
+ * Return: Success: 0
+ * Failure: 1
+ *
+ * Programmer: Quincey Koziol
+ * Saturday, December 26, 2015
+ *
+ *-------------------------------------------------------------------------
+ */
+static unsigned
+test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam,
+ const bt2_test_param_t *tparam)
+{
+ 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 */
+ H5B2_test_rec_t find; /* Record to find */
+ H5B2_test_rec_t idx; /* Index within B-tree, for iterator */
+ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
+ unsigned u; /* Local index variable */
+ herr_t ret; /* Generic error return value */
+
+ /*
+ * Test inserting many records into v2 B-tree
+ */
+ TESTING("B-tree update: make level 2 B-tree (l->r)");
+
+ /* Create the file for the test */
+ if(create_file(&file, &f, fapl) < 0)
+ TEST_ERROR
+
+ /* Create the v2 B-tree & get its address */
+ if(create_btree(f, dxpl, 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)
+ 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)
+ FAIL_STACK_ERROR
+ } /* end for */
+
+ /* Check up on B-tree */
+ bt2_stat.depth = 2;
+ bt2_stat.nrecords = (INSERT_SPLIT_ROOT_NREC_REC * 41);
+ if(check_stats(bt2, &bt2_stat) < 0)
+ TEST_ERROR
+ record.key = 1347;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
+ TEST_ERROR
+
+ /* Check for closing & re-opening the B-tree */
+ if(reopen_btree(f, dxpl, &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)
+ FAIL_STACK_ERROR
+ record.key = 1;
+ record.val = record.key * 2;
+ if(H5B2_update(bt2, dxpl, &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)
+ 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)
+ FAIL_STACK_ERROR
+
+ /* Check for closing & re-opening the B-tree */
+ if(reopen_btree(f, dxpl, &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)
+ FAIL_STACK_ERROR
+
+ /* Make certain that the index is correct */
+ if(idx.key != ((INSERT_SPLIT_ROOT_NREC_REC * 41) + 4))
+ TEST_ERROR
+
+ /* Attempt to find non-existant record in level-2 B-tree */
+ /* (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)
+ TEST_ERROR
+ if(find.val != (hsize_t)-1)
+ TEST_ERROR
+
+ /* 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)
+ 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)
+ 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)
+ 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)
+ 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)
+ 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)
+ 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);
+ } H5E_END_TRY;
+ /* Should fail */
+ if(ret != FAIL)
+ TEST_ERROR
+
+ /* 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)
+ FAIL_STACK_ERROR
+ if(find.key != 1347)
+ TEST_ERROR
+ if(find.val != (1347 * 2))
+ TEST_ERROR
+
+ /* 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)
+ FAIL_STACK_ERROR
+ if(find.key != 513)
+ TEST_ERROR
+ if(find.val != (513 * 2))
+ TEST_ERROR
+
+ /* 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)
+ FAIL_STACK_ERROR
+ if(find.key != 555)
+ TEST_ERROR
+ if(find.val != (555 * 2))
+ TEST_ERROR
+
+ /* Close the v2 B-tree */
+ if(H5B2_close(bt2, dxpl) < 0)
+ FAIL_STACK_ERROR
+ bt2 = NULL;
+
+ PASSED();
+
+
+ /*
+ * Test inserting many records into v2 B-tree
+ */
+ 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)
+ 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)
+ 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)
+ FAIL_STACK_ERROR
+ } /* end for */
+
+ /* Check up on B-tree */
+ bt2_stat.depth = 2;
+ bt2_stat.nrecords = (INSERT_SPLIT_ROOT_NREC_REC * 41);
+ if(check_stats(bt2, &bt2_stat) < 0)
+ TEST_ERROR
+ record.key = 1344;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
+ TEST_ERROR
+
+ /* Check for closing & re-opening the B-tree */
+ if(reopen_btree(f, dxpl, &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)
+ 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)
+ 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)
+ 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)
+ FAIL_STACK_ERROR
+
+ /* Check for closing & re-opening the B-tree */
+ if(reopen_btree(f, dxpl, &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)
+ FAIL_STACK_ERROR
+
+ /* Make certain that the index is correct */
+ if(idx.key != ((INSERT_SPLIT_ROOT_NREC_REC * 41) + 4))
+ TEST_ERROR
+
+ /* Attempt to find non-existant record in level-2 B-tree */
+ /* (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)
+ TEST_ERROR
+ if(find.val != (hsize_t)-1)
+ TEST_ERROR
+
+ /* 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)
+ 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)
+ 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)
+ 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)
+ 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)
+ 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)
+ 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);
+ } H5E_END_TRY;
+ /* Should fail */
+ if(ret != FAIL)
+ TEST_ERROR
+
+ /* 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)
+ FAIL_STACK_ERROR
+ if(find.key != 1344)
+ TEST_ERROR
+ if(find.val != (1344 * 2))
+ TEST_ERROR
+
+ /* 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)
+ FAIL_STACK_ERROR
+ if(find.key != 512)
+ TEST_ERROR
+ if(find.val != (512 * 2))
+ TEST_ERROR
+
+ /* 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)
+ FAIL_STACK_ERROR
+ if(find.key != 555)
+ TEST_ERROR
+ if(find.val != (555 * 2))
+ TEST_ERROR
+
+ /* Close the v2 B-tree */
+ if(H5B2_close(bt2, dxpl) < 0)
+ FAIL_STACK_ERROR
+ bt2 = NULL;
+
+ PASSED();
+
+
+ /*
+ * Test inserting many records into v2 B-tree
+ */
+ 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)
+ 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)
+ 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)
+ FAIL_STACK_ERROR
+ } /* end for */
+
+ /* Check up on B-tree */
+ bt2_stat.depth = 2;
+ bt2_stat.nrecords = (INSERT_SPLIT_ROOT_NREC_REC * 41);
+ if(check_stats(bt2, &bt2_stat) < 0)
+ TEST_ERROR
+ record.key = 1345;
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
+ TEST_ERROR
+
+ /* Check for closing & re-opening the B-tree */
+ if(reopen_btree(f, dxpl, &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)
+ 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)
+ 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)
+ 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)
+ 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)
+ FAIL_STACK_ERROR
+ record.key = 1;
+ record.val = record.key * 2;
+ if(H5B2_update(bt2, dxpl, &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)
+ 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)
+ FAIL_STACK_ERROR
+
+ /* Make certain that the index is correct */
+ if(idx.key != ((INSERT_SPLIT_ROOT_NREC_REC * 41) + 6))
+ TEST_ERROR
+
+ /* Attempt to find non-existant record in level-2 B-tree */
+ /* (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)
+ TEST_ERROR
+ if(find.val != (hsize_t)-1)
+ TEST_ERROR
+
+ /* 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)
+ 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)
+ 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)
+ 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)
+ 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)
+ 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)
+ 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);
+ } H5E_END_TRY;
+ /* Should fail */
+ if(ret != FAIL)
+ TEST_ERROR
+
+ /* 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)
+ FAIL_STACK_ERROR
+ if(find.key != 1345)
+ TEST_ERROR
+ if(find.val != (1345 * 2))
+ TEST_ERROR
+
+ /* 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)
+ FAIL_STACK_ERROR
+ if(find.key != 513)
+ TEST_ERROR
+ if(find.val != (513 * 2))
+ TEST_ERROR
+
+ /* 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)
+ FAIL_STACK_ERROR
+ if(find.key != 555)
+ TEST_ERROR
+ if(find.val != (555 * 2))
+ TEST_ERROR
+
+ /* Close the v2 B-tree */
+ if(H5B2_close(bt2, dxpl) < 0)
+ FAIL_STACK_ERROR
+ bt2 = NULL;
+
+ /* Close file */
+ if(H5Fclose(file) < 0)
+ FAIL_STACK_ERROR
+
+ PASSED();
+
+ return 0;
+
+error:
+ H5E_BEGIN_TRY {
+ if(bt2)
+ H5B2_close(bt2, dxpl);
+ H5Fclose(file);
+ } H5E_END_TRY;
+ return 1;
+} /* test_update_make_level2() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: test_update_lots
+ *
+ * Purpose: Basic tests for the B-tree v2 code. This test inserts many
+ * records in random order, enough to make at a level 4 B-tree.
+ *
+ * Return: Success: 0
+ * Failure: 1
+ *
+ * Programmer: Quincey Koziol
+ * Sunday, December 27, 2015
+ *
+ *-------------------------------------------------------------------------
+ */
+static unsigned
+test_update_lots(hid_t fapl, const H5B2_create_t *cparam,
+ const bt2_test_param_t *tparam)
+{
+ 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 */
+ H5B2_test_rec_t *records; /* Record #'s for random insertion */
+ H5B2_test_rec_t record; /* Record to insert into tree */
+ H5B2_test_rec_t modify; /* Modified value */
+ H5B2_test_rec_t find; /* Record to find */
+ H5B2_test_rec_t iter; /* Index within B-tree, for iterator */
+ H5B2_stat_t bt2_stat; /* Statistics about B-tree created */
+ hsize_t nrec; /* Number of records in B-tree */
+ unsigned u; /* Local index variable */
+ herr_t ret; /* Generic error return value */
+
+ /* Initialize random number seed */
+ curr_time = HDtime(NULL);
+#ifdef QAK
+curr_time = 1451342093;
+HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
+#endif /* QAK */
+ HDsrandom((unsigned)curr_time);
+
+ /*
+ * Test inserting many records into v2 B-tree
+ */
+ TESTING("B-tree update: create random level 4 B-tree");
+
+ /* Allocate space for the records */
+ if(NULL == (records = (H5B2_test_rec_t *)HDmalloc(sizeof(H5B2_test_rec_t) * INSERT_MANY_REC)))
+ TEST_ERROR
+
+ /* Initialize record #'s */
+ for(u = 0; u < INSERT_MANY_REC; u++) {
+ records[u].key = u;
+ records[u].val = u * 2;
+ } /* end for */
+
+ /* Shuffle record #'s */
+ for(u = 0; u < INSERT_MANY_REC; u++) {
+ H5B2_test_rec_t temp_rec; /* Temporary record */
+ unsigned swap_idx; /* Location to swap with when shuffling */
+
+ swap_idx = ((unsigned)HDrandom() % (INSERT_MANY_REC - u)) + u;
+ temp_rec = records[u];
+ records[u] = records[swap_idx];
+ records[swap_idx] = temp_rec;
+ } /* end for */
+
+ /* Create the file for the test */
+ if(create_file(&file, &f, fapl) < 0)
+ TEST_ERROR
+
+ /* Create the v2 B-tree & get its address */
+ if(create_btree(f, dxpl, 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)
+ FAIL_STACK_ERROR
+ } /* end for */
+
+ /* Check up on B-tree */
+ bt2_stat.depth = 4;
+ bt2_stat.nrecords = INSERT_MANY_REC;
+ if(check_stats(bt2, &bt2_stat) < 0)
+ TEST_ERROR
+
+ /* Close the v2 B-tree */
+ if(H5B2_close(bt2, dxpl) < 0)
+ FAIL_STACK_ERROR
+ bt2 = NULL;
+
+ /* Close file */
+ if(H5Fclose(file) < 0)
+ STACK_ERROR
+ file = -1;
+
+ /* Re-open the file for the test */
+ if(reopen_file(&file, &f, fapl) < 0)
+ TEST_ERROR
+
+ /* Re-open v2 B-tree */
+ if(NULL == (bt2 = H5B2_open(f, dxpl, bt2_addr, f)))
+ FAIL_STACK_ERROR
+
+ /* Check up on B-tree after re-open */
+ bt2_stat.depth = 4;
+ bt2_stat.nrecords = INSERT_MANY_REC;
+ if(check_stats(bt2, &bt2_stat) < 0)
+ TEST_ERROR
+
+ /* 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)
+ FAIL_STACK_ERROR
+
+ /* Make certain that the index is correct */
+ if(iter.key != INSERT_MANY_REC)
+ TEST_ERROR
+
+ /* Attempt to find non-existant record in level-4 B-tree */
+ /* (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)
+ TEST_ERROR
+ if(find.val != (hsize_t)-1)
+ TEST_ERROR
+
+ /* Find random records */
+ for(u = 0; u < FIND_MANY_REC; u++) {
+ /* Pick random record */
+ find.key = (hsize_t)(HDrandom() % INSERT_MANY_REC);
+ 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)
+ FAIL_STACK_ERROR
+ if(find.val != (find.key * 2))
+ TEST_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_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);
+ } H5E_END_TRY;
+ /* Should fail */
+ if(ret != FAIL)
+ TEST_ERROR
+
+ /* Find random records */
+ for(u = 0; u < FIND_MANY_REC; u++) {
+ hsize_t idx; /* Record index */
+
+ /* Pick random record */
+ idx = (hsize_t)(HDrandom() % INSERT_MANY_REC);
+
+ /* Reset find record */
+ find.key = (hsize_t)-1;
+ find.val = (hsize_t)-1;
+
+ /* 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)
+ FAIL_STACK_ERROR
+ if(find.key != idx)
+ TEST_ERROR
+ if(find.val != (find.key * 2))
+ TEST_ERROR
+
+ /* Reset find record */
+ find.key = (hsize_t)-1;
+ find.val = (hsize_t)-1;
+
+ /* 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)
+ FAIL_STACK_ERROR
+ if(find.key != (INSERT_MANY_REC - (idx + 1)))
+ TEST_ERROR
+ if(find.val != (find.key * 2))
+ TEST_ERROR
+ } /* end for */
+
+ PASSED();
+
+ 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)
+ 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)
+ FAIL_STACK_ERROR
+
+ /* Query the number of records in the B-tree */
+ if(H5B2_get_nrec(bt2, &nrec) < 0)
+ FAIL_STACK_ERROR
+
+ /* Make certain that the # of records is correct */
+ if(nrec != INSERT_MANY_REC)
+ TEST_ERROR
+
+ /* Close the v2 B-tree */
+ if(H5B2_close(bt2, dxpl) < 0)
+ FAIL_STACK_ERROR
+ bt2 = NULL;
+
+ /* Close file */
+ if(H5Fclose(file) < 0)
+ TEST_ERROR
+
+ PASSED();
+
+ HDfree(records);
+
+ return 0;
+
+error:
+ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
+ H5E_BEGIN_TRY {
+ if(bt2)
+ H5B2_close(bt2, dxpl);
+ H5Fclose(file);
+ } H5E_END_TRY;
+ HDfree(records);
+
+ return 1;
+} /* test_update_lots() */
+
+
+/*-------------------------------------------------------------------------
* Function: test_remove_basic
*
* Purpose: Basic tests for the B-tree v2 code
@@ -2993,7 +5232,7 @@ 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 = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ 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 */
@@ -3301,7 +5540,7 @@ 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 = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ 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 */
@@ -3373,13 +5612,13 @@ test_remove_level1_noredistrib(hid_t fapl, const H5B2_create_t *cparam,
/* 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, dxpl, &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, dxpl, &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, dxpl, &record, (unsigned)0) < 0)
TEST_ERROR
rrecord = 0;
@@ -3392,10 +5631,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, dxpl, &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, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
/* Query the number of records in the B-tree */
@@ -3417,7 +5656,7 @@ test_remove_level1_noredistrib(hid_t fapl, const H5B2_create_t *cparam,
/* Check up on B-tree */
record = 0;
- if(check_node_depth(bt2, dxpl, record, (unsigned)0) < 0)
+ if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
TEST_ERROR
rrecord = 1;
@@ -3430,10 +5669,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, dxpl, &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, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
/* Query the number of records in the B-tree */
@@ -3455,7 +5694,7 @@ test_remove_level1_noredistrib(hid_t fapl, const H5B2_create_t *cparam,
/* 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, dxpl, &record, (unsigned)0) < 0)
TEST_ERROR
rrecord = 0;
@@ -3468,10 +5707,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, dxpl, &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, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
/* Query the number of records in the B-tree */
@@ -3524,7 +5763,7 @@ 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 = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ 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 */
@@ -3553,10 +5792,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, dxpl, &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, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
/* Query the number of records in the B-tree */
@@ -3601,10 +5840,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, dxpl, &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, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
PASSED();
@@ -3637,10 +5876,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, dxpl, &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, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
PASSED();
@@ -3673,10 +5912,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, dxpl, &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, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
/* Close the v2 B-tree */
@@ -3721,7 +5960,7 @@ 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 = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ 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 */
@@ -3750,7 +5989,7 @@ test_remove_level1_2leaf_merge(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, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
ninfo.depth = 1;
ninfo.nrec = 2;
@@ -3823,7 +6062,7 @@ test_remove_level1_2leaf_merge(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, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
ninfo.depth = 1;
ninfo.nrec = 2;
@@ -3900,7 +6139,7 @@ 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 = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ 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 */
@@ -3929,7 +6168,7 @@ test_remove_level1_3leaf_merge(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, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
ninfo.depth = 1;
ninfo.nrec = 2;
@@ -4026,7 +6265,7 @@ 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 = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ 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 */
@@ -4055,13 +6294,13 @@ 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, dxpl, &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, dxpl, &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, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
ninfo.depth = 1;
ninfo.nrec = 4;
@@ -4101,13 +6340,13 @@ 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, dxpl, &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, dxpl, &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, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
ninfo.depth = 1;
ninfo.nrec = 4;
@@ -4147,13 +6386,13 @@ 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, dxpl, &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, dxpl, &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, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
ninfo.depth = 1;
ninfo.nrec = 4;
@@ -4189,13 +6428,13 @@ 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, dxpl, &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, dxpl, &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, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
ninfo.depth = 1;
ninfo.nrec = 4;
@@ -4253,7 +6492,7 @@ 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 = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ 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 */
@@ -4282,7 +6521,7 @@ 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, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
ninfo.depth = 1;
ninfo.nrec = 2;
@@ -4343,7 +6582,7 @@ 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, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
ninfo.depth = 1;
ninfo.nrec = 2;
@@ -4401,7 +6640,7 @@ 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 = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ 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 */
@@ -4430,7 +6669,7 @@ test_remove_level1_promote_3leaf_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, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
ninfo.depth = 1;
ninfo.nrec = 2;
@@ -4491,7 +6730,7 @@ 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, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
ninfo.depth = 1;
ninfo.nrec = 2;
@@ -4549,7 +6788,7 @@ 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 = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ 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 */
@@ -4578,7 +6817,7 @@ test_remove_level1_promote_2leaf_merge(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, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
ninfo.depth = 1;
ninfo.nrec = 2;
@@ -4694,7 +6933,7 @@ 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 = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ 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 */
@@ -4723,7 +6962,7 @@ test_remove_level1_promote_3leaf_merge(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, dxpl, &record, (unsigned)1) < 0)
TEST_ERROR
ninfo.depth = 1;
ninfo.nrec = 2;
@@ -4839,7 +7078,7 @@ 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 = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ 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 */
@@ -4978,7 +7217,7 @@ 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 = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ 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 */
@@ -5007,7 +7246,7 @@ test_remove_level2_promote(hid_t fapl, const H5B2_create_t *cparam,
/* 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, dxpl, &record, (unsigned)2) < 0)
TEST_ERROR
ninfo.depth = 2;
ninfo.nrec = 2;
@@ -5264,7 +7503,7 @@ 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 = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ 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 */
@@ -5293,7 +7532,7 @@ test_remove_level2_promote_2internal_redistrib(hid_t fapl, const H5B2_create_t *
/* 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, dxpl, &record, (unsigned)2) < 0)
TEST_ERROR
ninfo.depth = 2;
ninfo.nrec = 2;
@@ -5414,7 +7653,7 @@ 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 = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ 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 */
@@ -5443,7 +7682,7 @@ test_remove_level2_promote_3internal_redistrib(hid_t fapl, const H5B2_create_t *
/* 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, dxpl, &record, (unsigned)2) < 0)
TEST_ERROR
ninfo.depth = 2;
ninfo.nrec = 2;
@@ -5564,7 +7803,7 @@ 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 = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ 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 */
@@ -5593,7 +7832,7 @@ test_remove_level2_promote_2internal_merge(hid_t fapl, const H5B2_create_t *cpar
/* 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, dxpl, &record, (unsigned)2) < 0)
TEST_ERROR
ninfo.depth = 2;
ninfo.nrec = 2;
@@ -5715,7 +7954,7 @@ 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 = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ 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 */
@@ -5744,7 +7983,7 @@ test_remove_level2_promote_3internal_merge(hid_t fapl, const H5B2_create_t *cpar
/* 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, dxpl, &record, (unsigned)2) < 0)
TEST_ERROR
ninfo.depth = 2;
ninfo.nrec = 2;
@@ -5866,7 +8105,7 @@ 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 = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ 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 */
@@ -5895,7 +8134,7 @@ test_remove_level2_2internal_merge_left(hid_t fapl, const H5B2_create_t *cparam,
/* 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, dxpl, &record, (unsigned)2) < 0)
TEST_ERROR
ninfo.depth = 2;
ninfo.nrec = 2;
@@ -5992,7 +8231,7 @@ 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 = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ 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 */
@@ -6021,7 +8260,7 @@ test_remove_level2_2internal_merge_right(hid_t fapl, const H5B2_create_t *cparam
/* 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, dxpl, &record, (unsigned)2) < 0)
TEST_ERROR
ninfo.depth = 2;
ninfo.nrec = 2;
@@ -6118,7 +8357,7 @@ 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 = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ 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 */
@@ -6147,7 +8386,7 @@ test_remove_level2_3internal_merge(hid_t fapl, const H5B2_create_t *cparam,
/* 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, dxpl, &record, (unsigned)2) < 0)
TEST_ERROR
ninfo.depth = 2;
ninfo.nrec = 2;
@@ -6244,7 +8483,7 @@ 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 = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ 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 */
@@ -6274,7 +8513,7 @@ test_remove_level2_collapse_right(hid_t fapl, const H5B2_create_t *cparam,
/* 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, dxpl, &record, (unsigned)2) < 0)
TEST_ERROR
ninfo.depth = 2;
ninfo.nrec = 2;
@@ -6370,7 +8609,7 @@ 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 = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ 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 */
@@ -6451,7 +8690,7 @@ 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 = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ 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 */
@@ -6899,7 +9138,7 @@ 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 = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ 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 */
@@ -7123,7 +9362,7 @@ 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 = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ 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 */
@@ -7230,7 +9469,7 @@ test_delete(hid_t fapl, const H5B2_create_t *cparam)
/*
* Delete v2 B-tree
*/
- if(H5B2_delete(f, H5P_DATASET_XFER_DEFAULT, bt2_addr, f, NULL, NULL) < 0)
+ if(H5B2_delete(f, H5AC_ind_read_dxpl_id, bt2_addr, f, NULL, NULL) < 0)
FAIL_STACK_ERROR
/* Close file */
@@ -7393,7 +9632,7 @@ 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 = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ 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 */
@@ -7627,7 +9866,7 @@ 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 = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ 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 */
@@ -7758,7 +9997,7 @@ error:
int
main(void)
{
- H5B2_create_t cparam; /* Creation parameters for v2 B-tree */
+ H5B2_create_t cparam, cparam2; /* Creation parameters for v2 B-tree */
bt2_test_param_t tparam; /* Test parameters for v2 B-tree */
hid_t fapl = -1; /* File access property list for data files */
unsigned nerrors = 0; /* Cumulative error count */
@@ -7778,8 +10017,7 @@ main(void)
printf("***Express test mode on. Some tests may be skipped\n");
/* Initialize v2 B-tree creation parameters */
- init_cparam(&cparam);
-
+ init_cparam(&cparam, &cparam2);
/* Loop over re-opening B-tree during tests */
for(reopen = FALSE; reopen <= TRUE; reopen++) {
@@ -7793,7 +10031,7 @@ main(void)
} /* end else */
/* Test B-tree record insertion */
- /* Iteration, find & index routines tested in these routines as well */
+ /* (Iteration, find & index routines exercised in these routines as well) */
nerrors += test_insert_basic(fapl, &cparam, &tparam);
nerrors += test_insert_split_root(fapl, &cparam, &tparam);
nerrors += test_insert_level1_2leaf_redistrib(fapl, &cparam, &tparam);
@@ -7812,6 +10050,20 @@ main(void)
else
nerrors += test_insert_lots(fapl, &cparam, &tparam);
+ /* Test B-tree record update (ie. insert/modify) */
+ /* (Iteration, find & index routines exercised in these routines as well) */
+ nerrors += test_update_basic(fapl, &cparam2, &tparam);
+ nerrors += test_update_split_root(fapl, &cparam2, &tparam);
+ nerrors += test_update_level1_2leaf_redistrib(fapl, &cparam2, &tparam);
+ nerrors += test_update_level1_side_split(fapl, &cparam2, &tparam);
+ nerrors += test_update_level1_3leaf_redistrib(fapl, &cparam2, &tparam);
+ nerrors += test_update_level1_middle_split(fapl, &cparam2, &tparam);
+ nerrors += test_update_make_level2(fapl, &cparam2, &tparam);
+ if(ExpressMode > 1)
+ printf("***Express test mode on. test_update_lots skipped\n");
+ else
+ nerrors += test_update_lots(fapl, &cparam2, &tparam);
+
/* Test B-tree record removal */
/* Querying the number of records routine also tested in these routines as well */
nerrors += test_remove_basic(fapl, &cparam, &tparam);
diff --git a/test/cache.c b/test/cache.c
index 38adbda..d533045 100644
--- a/test/cache.c
+++ b/test/cache.c
@@ -3225,7 +3225,7 @@ check_flush_cache__empty_cache(H5F_t * file_ptr)
if ( pass ) {
- result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET);
+ result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__NO_FLAGS_SET);
if ( result < 0 ) {
@@ -3236,7 +3236,7 @@ check_flush_cache__empty_cache(H5F_t * file_ptr)
if ( pass ) {
- result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5C__FLUSH_INVALIDATE_FLAG);
+ result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__FLUSH_INVALIDATE_FLAG);
if ( result < 0 ) {
@@ -3247,7 +3247,7 @@ check_flush_cache__empty_cache(H5F_t * file_ptr)
if ( pass ) {
- result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5C__FLUSH_CLEAR_ONLY_FLAG);
+ result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__FLUSH_CLEAR_ONLY_FLAG);
if ( result < 0 ) {
@@ -3259,7 +3259,7 @@ check_flush_cache__empty_cache(H5F_t * file_ptr)
if ( pass ) {
- result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5C__FLUSH_MARKED_ENTRIES_FLAG);
+ result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__FLUSH_MARKED_ENTRIES_FLAG);
if ( result < 0 ) {
@@ -4930,7 +4930,7 @@ check_flush_cache__multi_entry_test(H5F_t * file_ptr,
if ( pass ) {
- result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, flush_flags);
+ result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, flush_flags);
if ( result < 0 ) {
@@ -5004,7 +5004,7 @@ check_flush_cache__multi_entry_test(H5F_t * file_ptr,
/* clean up the cache to prep for the next test */
if ( pass ) {
- result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5C__FLUSH_INVALIDATE_FLAG);
+ result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__FLUSH_INVALIDATE_FLAG);
if ( result < 0 ) {
@@ -5161,7 +5161,7 @@ check_flush_cache__pe_multi_entry_test(H5F_t * file_ptr,
if ( pass ) {
- result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, flush_flags);
+ result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, flush_flags);
if ( result < 0 ) {
@@ -5235,7 +5235,7 @@ check_flush_cache__pe_multi_entry_test(H5F_t * file_ptr,
/* clean up the cache to prep for the next test */
if ( pass ) {
- result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5C__FLUSH_INVALIDATE_FLAG);
+ result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__FLUSH_INVALIDATE_FLAG);
if ( result < 0 ) {
@@ -9232,7 +9232,7 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr,
if ( pass ) {
- result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, flush_flags);
+ result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, flush_flags);
if ( result < 0 ) {
@@ -9424,7 +9424,7 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr,
/* clean up the cache to prep for the next test */
if ( pass ) {
- result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5C__FLUSH_INVALIDATE_FLAG);
+ result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__FLUSH_INVALIDATE_FLAG);
if ( result < 0 ) {
@@ -10685,7 +10685,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr)
if ( pass ) {
- result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5C__FLUSH_INVALIDATE_FLAG);
+ result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__FLUSH_INVALIDATE_FLAG);
if ( result < 0 ) {
@@ -12414,7 +12414,7 @@ check_flush_cache__single_entry_test(H5F_t * file_ptr,
if ( pass ) {
- result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, flush_flags);
+ result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, flush_flags);
if ( result < 0 ) {
@@ -12473,7 +12473,7 @@ check_flush_cache__single_entry_test(H5F_t * file_ptr,
/* clean up the cache to prep for the next test */
if ( pass ) {
- result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5C__FLUSH_INVALIDATE_FLAG);
+ result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__FLUSH_INVALIDATE_FLAG);
if ( result < 0 ) {
@@ -12606,7 +12606,7 @@ check_flush_cache__pinned_single_entry_test(H5F_t * file_ptr,
if ( pass ) {
- result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, flush_flags);
+ result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, flush_flags);
if ( result < 0 ) {
@@ -12681,7 +12681,7 @@ check_flush_cache__pinned_single_entry_test(H5F_t * file_ptr,
if ( pass ) {
- result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5C__FLUSH_INVALIDATE_FLAG);
+ result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__FLUSH_INVALIDATE_FLAG);
if ( result < 0 ) {
@@ -14206,7 +14206,7 @@ check_resize_entry(void)
} else {
- result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT,
+ result = H5C_unprotect(file_ptr, H5AC_ind_read_dxpl_id,
entry_ptr->addr, (void *)entry_ptr, H5C__DIRTIED_FLAG);
if ( result < 0 ) {
@@ -14291,7 +14291,7 @@ check_resize_entry(void)
} else {
- result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT,
+ result = H5C_unprotect(file_ptr, H5AC_ind_read_dxpl_id,
entry_ptr->addr, (void *)entry_ptr, H5C__DIRTIED_FLAG);
if ( result < 0 ) {
@@ -14651,7 +14651,7 @@ check_resize_entry(void)
} else {
- result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT,
+ result = H5C_unprotect(file_ptr, H5AC_ind_read_dxpl_id,
entry_ptr->addr, (void *)entry_ptr, H5C__DIRTIED_FLAG);
if ( result < 0 ) {
@@ -14738,7 +14738,7 @@ check_resize_entry(void)
} else {
- result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT,
+ result = H5C_unprotect(file_ptr, H5AC_ind_read_dxpl_id,
entry_ptr->addr, (void *)entry_ptr, H5C__DIRTIED_FLAG);
if ( result < 0 ) {
@@ -15806,7 +15806,7 @@ check_flush_protected_err(void)
protect_entry(file_ptr, 0, 0);
- if ( H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET) >= 0 ) {
+ if ( H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__NO_FLAGS_SET) >= 0 ) {
pass = FALSE;
failure_mssg = "flush succeeded on cache with protected entry.\n";
@@ -15815,7 +15815,7 @@ check_flush_protected_err(void)
unprotect_entry(file_ptr, 0, 0, H5C__DIRTIED_FLAG);
- if ( H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET) < 0 ) {
+ if ( H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__NO_FLAGS_SET) < 0 ) {
pass = FALSE;
failure_mssg = "flush failed after unprotect.\n";
@@ -15884,7 +15884,7 @@ check_destroy_pinned_err(void)
protect_entry(file_ptr, 0, 0);
unprotect_entry(file_ptr, 0, 0, H5C__PIN_ENTRY_FLAG);
- if ( H5C_dest(file_ptr, H5P_DATASET_XFER_DEFAULT) >= 0 ) {
+ if ( H5C_dest(file_ptr, H5AC_ind_read_dxpl_id) >= 0 ) {
pass = FALSE;
failure_mssg = "destroy succeeded on cache with pinned entry.\n";
@@ -15893,7 +15893,7 @@ check_destroy_pinned_err(void)
unpin_entry(0, 0);
- if ( H5C_dest(file_ptr, H5P_DATASET_XFER_DEFAULT) < 0 ) {
+ if ( H5C_dest(file_ptr, H5AC_ind_read_dxpl_id) < 0 ) {
pass = FALSE;
failure_mssg = "destroy failed after unpin.\n";
@@ -15970,7 +15970,7 @@ check_destroy_protected_err(void)
protect_entry(file_ptr, 0, 0);
- if ( H5C_dest(file_ptr, H5P_DATASET_XFER_DEFAULT) >= 0 ) {
+ if ( H5C_dest(file_ptr, H5AC_ind_read_dxpl_id) >= 0 ) {
pass = FALSE;
failure_mssg = "destroy succeeded on cache with protected entry.\n";
@@ -15979,7 +15979,7 @@ check_destroy_protected_err(void)
unprotect_entry(file_ptr, 0, 0, H5C__DIRTIED_FLAG);
- if ( H5C_dest(file_ptr, H5P_DATASET_XFER_DEFAULT) < 0 ) {
+ if ( H5C_dest(file_ptr, H5AC_ind_read_dxpl_id) < 0 ) {
pass = FALSE;
failure_mssg = "destroy failed after unprotect.\n";
@@ -16063,7 +16063,7 @@ check_duplicate_insert_err(void)
base_addr = entries[0];
entry_ptr = &(base_addr[0]);
- result = H5C_insert_entry(file_ptr, H5P_DATASET_XFER_DEFAULT,
+ result = H5C_insert_entry(file_ptr, H5AC_ind_read_dxpl_id,
&(types[0]), entry_ptr->addr,
(void *)entry_ptr, H5C__NO_FLAGS_SET);
@@ -16241,7 +16241,7 @@ check_double_pin_err(void)
if ( pass ) {
- result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT,
+ result = H5C_unprotect(file_ptr, H5AC_ind_read_dxpl_id,
entry_ptr->addr, (void *)entry_ptr, H5C__PIN_ENTRY_FLAG);
if ( result > 0 ) {
@@ -16325,7 +16325,7 @@ check_double_unpin_err(void)
if ( pass ) {
- result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT,
+ result = H5C_unprotect(file_ptr, H5AC_ind_read_dxpl_id,
entry_ptr->addr, (void *)entry_ptr, H5C__UNPIN_ENTRY_FLAG);
if ( result > 0 ) {
@@ -16525,7 +16525,7 @@ check_double_protect_err(void)
if ( pass ) {
- cache_entry_ptr = (H5C_cache_entry_t *)H5C_protect(file_ptr, H5P_DATASET_XFER_DEFAULT,
+ cache_entry_ptr = (H5C_cache_entry_t *)H5C_protect(file_ptr, H5AC_ind_read_dxpl_id,
&(types[0]), entry_ptr->addr,
&entry_ptr->addr, H5C__NO_FLAGS_SET);
@@ -16605,7 +16605,7 @@ check_double_unprotect_err(void)
if ( pass ) {
- result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT,
+ result = H5C_unprotect(file_ptr, H5AC_ind_read_dxpl_id,
entry_ptr->addr, (void *)entry_ptr, H5C__NO_FLAGS_SET);
if ( result > 0 ) {
@@ -16769,7 +16769,7 @@ check_expunge_entry_errs(void)
if ( pass ) {
- result = H5C_expunge_entry(file_ptr, H5P_DATASET_XFER_DEFAULT,
+ result = H5C_expunge_entry(file_ptr, H5AC_ind_read_dxpl_id,
&(types[0]), entry_ptr->addr, H5C__NO_FLAGS_SET);
if ( result > 0 ) {
@@ -16787,7 +16787,7 @@ check_expunge_entry_errs(void)
if ( pass ) {
- result = H5C_expunge_entry(file_ptr, H5P_DATASET_XFER_DEFAULT,
+ result = H5C_expunge_entry(file_ptr, H5AC_ind_read_dxpl_id,
&(types[0]), entry_ptr->addr, H5C__NO_FLAGS_SET);
if ( result > 0 ) {
@@ -16805,7 +16805,7 @@ check_expunge_entry_errs(void)
if ( pass ) {
- result = H5C_expunge_entry(file_ptr, H5P_DATASET_XFER_DEFAULT,
+ result = H5C_expunge_entry(file_ptr, H5AC_ind_read_dxpl_id,
&(types[0]), entry_ptr->addr, H5C__NO_FLAGS_SET);
if ( result < 0 ) {
@@ -16981,7 +16981,7 @@ check_unprotect_ro_dirty_err(void)
if ( pass ) {
- result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT,
+ result = H5C_unprotect(file_ptr, H5AC_ind_read_dxpl_id,
entry_ptr->addr, (void *)entry_ptr, H5C__DIRTIED_FLAG);
if ( result >= 0 ) {
@@ -17024,7 +17024,7 @@ check_unprotect_ro_dirty_err(void)
if ( pass ) {
- result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT,
+ result = H5C_unprotect(file_ptr, H5AC_ind_read_dxpl_id,
entry_ptr->addr, (void *)entry_ptr, H5C__DIRTIED_FLAG);
if ( result > 0 ) {
@@ -17109,7 +17109,7 @@ check_protect_ro_rw_err(void)
if ( pass ) {
- thing_ptr = (H5C_cache_entry_t *)H5C_protect(file_ptr, H5P_DATASET_XFER_DEFAULT,
+ thing_ptr = (H5C_cache_entry_t *)H5C_protect(file_ptr, H5AC_ind_read_dxpl_id,
&(types[0]), entry_ptr->addr,
&entry_ptr->addr, H5C__NO_FLAGS_SET);
@@ -30888,7 +30888,7 @@ check_flush_deps_order(void)
/* Reset index for tracking flush order */
flush_order = 0;
- result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET);
+ result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__NO_FLAGS_SET);
if( result < 0 ) CACHE_ERROR("flushing entries with flush dependendices")
/* Change expected values, and verify the status of the entries
@@ -30995,7 +30995,7 @@ check_flush_deps_order(void)
/* Reset index for tracking flush order */
flush_order = 0;
- result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET);
+ result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__NO_FLAGS_SET);
if( result < 0 ) CACHE_ERROR("flushing entries with flush dependendices")
/* Change expected values, and verify the status of the entries
@@ -31108,7 +31108,7 @@ check_flush_deps_order(void)
/* Reset index for tracking flush order */
flush_order = 0;
- result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET);
+ result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__NO_FLAGS_SET);
if( result < 0 ) CACHE_ERROR("flushing entries with flush dependendices")
/* Change expected values, and verify the status of the entries
@@ -31229,7 +31229,7 @@ check_flush_deps_order(void)
/* Reset index for tracking flush order */
flush_order = 0;
- result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET);
+ result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__NO_FLAGS_SET);
if( result < 0 ) CACHE_ERROR("flushing entries with flush dependendices")
/* Change expected values, and verify the status of the entries
@@ -31408,7 +31408,7 @@ check_flush_deps_order(void)
/* Reset index for tracking flush order */
flush_order = 0;
- result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET);
+ result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__NO_FLAGS_SET);
if( result < 0 ) CACHE_ERROR("flushing entries with flush dependendices")
/* Change expected values, and verify the status of the entries
@@ -31633,7 +31633,7 @@ check_flush_deps_order(void)
/* Reset index for tracking flush order */
flush_order = 0;
- result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET);
+ result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__NO_FLAGS_SET);
if( result < 0 ) CACHE_ERROR("flushing entries with flush dependendices")
/* Change expected values, and verify the status of the entries
@@ -31806,7 +31806,7 @@ check_flush_deps_order(void)
/* Reset index for tracking flush order */
flush_order = 0;
- result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET);
+ result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__NO_FLAGS_SET);
if( result < 0 ) CACHE_ERROR("flushing entries with flush dependendices")
/* Change expected values, and verify the status of the entries
@@ -31942,7 +31942,7 @@ check_flush_deps_order(void)
/* Reset index for tracking flush order */
flush_order = 0;
- result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET);
+ result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__NO_FLAGS_SET);
if( result < 0 ) CACHE_ERROR("flushing entries with flush dependendices")
/* Change expected values, and verify the status of the entries
@@ -32140,7 +32140,7 @@ check_flush_deps_order(void)
/* Reset index for tracking flush order */
flush_order = 0;
- result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET);
+ result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__NO_FLAGS_SET);
if( result < 0 ) CACHE_ERROR("flushing entries with flush dependendices")
/* Change expected values, and verify the status of the entries
@@ -32391,7 +32391,7 @@ check_flush_deps_order(void)
/* Reset index for tracking flush order */
flush_order = 0;
- result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET);
+ result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__NO_FLAGS_SET);
if( result < 0 ) CACHE_ERROR("flushing entries with flush dependendices")
/* Change expected values, and verify the status of the entries
@@ -32658,7 +32658,7 @@ check_flush_deps_order(void)
/* Reset index for tracking flush order */
flush_order = 0;
- result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5C__NO_FLAGS_SET);
+ result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__NO_FLAGS_SET);
if( result < 0 ) CACHE_ERROR("flushing entries with flush dependendices")
/* Change expected values, and verify the status of the entries
@@ -33243,7 +33243,7 @@ cedds__expunge_dirty_entry_in_flush_test(H5F_t * file_ptr)
if ( pass ) {
- result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5C__FLUSH_INVALIDATE_FLAG);
+ result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__FLUSH_INVALIDATE_FLAG);
if ( result < 0 ) {
@@ -33604,7 +33604,7 @@ cedds__H5C_make_space_in_cache(H5F_t * file_ptr)
if ( pass ) {
- result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5C__FLUSH_INVALIDATE_FLAG);
+ result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__FLUSH_INVALIDATE_FLAG);
if ( result < 0 ) {
@@ -34047,7 +34047,7 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t * file_ptr)
if ( pass ) {
- result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5C__FLUSH_INVALIDATE_FLAG);
+ result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__FLUSH_INVALIDATE_FLAG);
if ( result < 0 ) {
@@ -34422,7 +34422,7 @@ cedds__H5C_flush_invalidate_cache__bucket_scan(H5F_t * file_ptr)
if ( pass ) {
- result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5C__FLUSH_INVALIDATE_FLAG);
+ result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__FLUSH_INVALIDATE_FLAG);
if ( result < 0 ) {
@@ -34929,7 +34929,7 @@ check_stats__smoke_check_1(H5F_t * file_ptr)
if ( pass ) {
- result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT, H5C__FLUSH_INVALIDATE_FLAG);
+ result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__FLUSH_INVALIDATE_FLAG);
if ( result < 0 ) {
diff --git a/test/cache_common.c b/test/cache_common.c
index 33fa466..ce0eb1f 100644
--- a/test/cache_common.c
+++ b/test/cache_common.c
@@ -3061,7 +3061,7 @@ setup_cache(size_t max_cache_size,
if ( pass ) { /* allocate space for test entries */
- actual_base_addr = H5MF_alloc(file_ptr, H5FD_MEM_DEFAULT, H5P_DATASET_XFER_DEFAULT,
+ actual_base_addr = H5MF_alloc(file_ptr, H5FD_MEM_DEFAULT, H5AC_ind_read_dxpl_id,
(hsize_t)(ADDR_SPACE_SIZE + BASE_ADDR));
if ( actual_base_addr == HADDR_UNDEF ) {
@@ -3146,7 +3146,7 @@ takedown_cache(H5F_t * file_ptr,
flush_cache(file_ptr, TRUE, FALSE, FALSE);
- H5C_dest(file_ptr, H5P_DATASET_XFER_DEFAULT);
+ H5C_dest(file_ptr, H5AC_ind_read_dxpl_id);
if ( saved_cache != NULL ) {
@@ -3171,7 +3171,7 @@ takedown_cache(H5F_t * file_ptr,
HDassert ( file_ptr );
}
- H5MF_xfree(file_ptr, H5FD_MEM_DEFAULT, H5P_DATASET_XFER_DEFAULT, saved_actual_base_addr,
+ H5MF_xfree(file_ptr, H5FD_MEM_DEFAULT, H5AC_ind_read_dxpl_id, saved_actual_base_addr,
(hsize_t)(ADDR_SPACE_SIZE + BASE_ADDR));
saved_actual_base_addr = HADDR_UNDEF;
}
@@ -3260,7 +3260,7 @@ expunge_entry(H5F_t * file_ptr,
HDassert( ! ( entry_ptr->header.is_pinned ) );
HDassert( ! ( entry_ptr->is_pinned ) );
- result = H5C_expunge_entry(file_ptr, H5P_DATASET_XFER_DEFAULT,
+ result = H5C_expunge_entry(file_ptr, H5AC_ind_read_dxpl_id,
&(types[type]), entry_ptr->addr, H5C__NO_FLAGS_SET);
if ( result < 0 ) {
@@ -3312,11 +3312,11 @@ flush_cache(H5F_t * file_ptr,
cache_ptr = file_ptr->shared->cache;
if(destroy_entries)
- result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT,
+ result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id,
H5C__FLUSH_INVALIDATE_FLAG);
else
- result = H5C_flush_cache(file_ptr, H5P_DATASET_XFER_DEFAULT,
+ result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id,
H5C__NO_FLAGS_SET);
if(dump_stats)
@@ -3397,7 +3397,7 @@ insert_entry(H5F_t * file_ptr,
entry_ptr->is_dirty = TRUE;
- result = H5C_insert_entry(file_ptr, H5P_DATASET_XFER_DEFAULT,
+ result = H5C_insert_entry(file_ptr, H5AC_ind_read_dxpl_id,
&(types[type]), entry_ptr->addr, (void *)entry_ptr, flags);
if ( ( result < 0 ) ||
@@ -3651,7 +3651,7 @@ protect_entry(H5F_t * file_ptr,
HDassert( entry_ptr == entry_ptr->self );
HDassert( !(entry_ptr->is_protected) );
- cache_entry_ptr = (H5C_cache_entry_t *)H5C_protect(file_ptr, H5P_DATASET_XFER_DEFAULT,
+ cache_entry_ptr = (H5C_cache_entry_t *)H5C_protect(file_ptr, H5AC_ind_read_dxpl_id,
&(types[type]), entry_ptr->addr, &entry_ptr->addr, H5C__NO_FLAGS_SET);
if ( ( cache_entry_ptr != (void *)entry_ptr ) ||
@@ -3748,7 +3748,7 @@ protect_entry_ro(H5F_t * file_ptr,
( ( entry_ptr->is_read_only ) &&
( entry_ptr->ro_ref_count > 0 ) ) );
- cache_entry_ptr = (H5C_cache_entry_t *)H5C_protect(file_ptr, H5P_DATASET_XFER_DEFAULT,
+ cache_entry_ptr = (H5C_cache_entry_t *)H5C_protect(file_ptr, H5AC_ind_read_dxpl_id,
&(types[type]), entry_ptr->addr, &entry_ptr->addr, H5C__READ_ONLY_FLAG);
if ( ( cache_entry_ptr != (void *)entry_ptr ) ||
@@ -3958,7 +3958,7 @@ unprotect_entry(H5F_t * file_ptr,
if(flags & H5C__DIRTIED_FLAG)
entry_ptr->is_dirty = TRUE;
- result = H5C_unprotect(file_ptr, H5P_DATASET_XFER_DEFAULT,
+ result = H5C_unprotect(file_ptr, H5AC_ind_read_dxpl_id,
entry_ptr->addr, (void *)entry_ptr, flags);
if ( ( result < 0 ) ||
diff --git a/test/cache_tagging.c b/test/cache_tagging.c
index e5d494b..310c4da 100644
--- a/test/cache_tagging.c
+++ b/test/cache_tagging.c
@@ -3866,26 +3866,26 @@ check_invalid_tag_application(void)
/* Call H5HL_create, an internal function that calls H5AC_insert_entry without setting up a tag */
/* Ensure this returns FAILURE, as a tag has not been set up. */
- if ( H5HL_create(f, H5AC_ind_dxpl_id, (size_t)1024, &addr) >= 0) TEST_ERROR;
+ if ( H5HL_create(f, H5AC_ind_read_dxpl_id, (size_t)1024, &addr) >= 0) TEST_ERROR;
/* Now set up a tag in the dxpl */
- if ( H5AC_tag(H5AC_ind_dxpl_id, (haddr_t)25, NULL) < 0) TEST_ERROR;
+ if ( H5AC_tag(H5AC_ind_read_dxpl_id, (haddr_t)25, NULL) < 0) TEST_ERROR;
/* Verify the same call to H5HL_create now works as intended, with a tag set up. */
- if ( H5HL_create(f, H5AC_ind_dxpl_id, (size_t)1024, &addr) < 0) TEST_ERROR;
+ if ( H5HL_create(f, H5AC_ind_read_dxpl_id, (size_t)1024, &addr) < 0) TEST_ERROR;
/* Reset dxpl to use invalid tag. */
- if ( H5AC_tag(H5AC_ind_dxpl_id, H5AC__INVALID_TAG, NULL) < 0) TEST_ERROR;
+ if ( H5AC_tag(H5AC_ind_read_dxpl_id, H5AC__INVALID_TAG, NULL) < 0) TEST_ERROR;
/* Call H5HL_protect to protect the local heap created above. */
/* This should fail as no tag is set up during the protect call */
- if (( lheap = H5HL_protect(f, H5AC_ind_dxpl_id, addr, H5AC__NO_FLAGS_SET)) != NULL ) TEST_ERROR;
+ if (( lheap = H5HL_protect(f, H5AC_ind_read_dxpl_id, addr, H5AC__NO_FLAGS_SET)) != NULL ) TEST_ERROR;
/* Again, set up a valid tag in the DXPL */
- if ( H5AC_tag(H5AC_ind_dxpl_id, (haddr_t)25, NULL) < 0) TEST_ERROR;
+ if ( H5AC_tag(H5AC_ind_read_dxpl_id, (haddr_t)25, NULL) < 0) TEST_ERROR;
/* Call H5HL_protect again to protect the local heap. This should succeed. */
- if (( lheap = H5HL_protect(f, H5AC_ind_dxpl_id, addr, H5AC__NO_FLAGS_SET)) == NULL ) TEST_ERROR;
+ if (( lheap = H5HL_protect(f, H5AC_ind_read_dxpl_id, addr, H5AC__NO_FLAGS_SET)) == NULL ) TEST_ERROR;
/* Now unprotect the heap, as we're done with the test. */
if ( H5HL_unprotect(lheap) < 0 ) TEST_ERROR;
diff --git a/test/dsets.c b/test/dsets.c
index a9cda93..05ff491 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -20,37 +20,37 @@
* Purpose: Tests the dataset interface (H5D)
*/
-#include <stdlib.h>
-#include <time.h>
-
-/*
- * This file needs to access private information from the H5Z package.
- */
-#define H5Z_FRIEND
+#define H5D_FRIEND /*suppress error about including H5Dpkg */
+#define H5D_TESTING
+#define H5Z_FRIEND /*suppress error about including H5Zpkg */
#include "h5test.h"
#include "H5srcdir.h"
+#include "H5Dpkg.h"
#include "H5Zpkg.h"
#ifdef H5_HAVE_SZLIB_H
# include "szlib.h"
#endif
const char *FILENAME[] = {
- "dataset",
- "compact_dataset",
- "dset_offset",
- "max_compact_dataset",
- "simple",
- "set_local",
- "random_chunks",
- "huge_chunks",
- "chunk_cache",
- "big_chunk",
- "chunk_expand",
- "copy_dcpl_newfile",
- "layout_extend",
- "zero_chunk",
+ "dataset", /* 0 */
+ "compact_dataset", /* 1 */
+ "dset_offset", /* 2 */
+ "max_compact_dataset", /* 3 */
+ "simple", /* 4 */
+ "set_local", /* 5 */
+ "random_chunks", /* 6 */
+ "huge_chunks", /* 7 */
+ "chunk_cache", /* 8 */
+ "big_chunk", /* 9 */
+ "chunk_fast", /* 10 */
+ "chunk_expand", /* 11 */
+ "chunk_fixed", /* 12 */
+ "copy_dcpl_newfile",/* 13 */
+ "partial_chunks", /* 14 */
+ "layout_extend", /* 15 */
+ "zero_chunk", /* 16 */
NULL
};
#define FILENAME_BUF_SIZE 1024
@@ -117,6 +117,13 @@ const char *FILENAME[] = {
#define DSET_DEPREC_NAME_COMPACT "deprecated_compact"
#define DSET_DEPREC_NAME_FILTER "deprecated_filter"
+/* Dataset names for testing Fixed Array Indexing */
+#define DSET_FIXED_MAX "DSET_FIXED_MAX"
+#define DSET_FIXED_NOMAX "DSET_FIXED_NOMAX"
+#define DSET_FIXED_BIG "DSET_FIXED_BIG"
+#define POINTS 72
+#define POINTS_BIG 2500
+
#define USER_BLOCK 1024
#define SIXTY_FOUR_KB 65536
@@ -128,6 +135,7 @@ const char *FILENAME[] = {
#define H5Z_FILTER_DEPREC 309
#define H5Z_FILTER_EXPAND 310
#define H5Z_FILTER_CAN_APPLY_TEST2 311
+#define H5Z_FILTER_COUNT 312
/* Flags for testing filters */
#define DISABLE_FLETCHER32 0
@@ -201,6 +209,8 @@ const char *FILENAME[] = {
#define DSET_DIM2 200
int points[DSET_DIM1][DSET_DIM2], check[DSET_DIM1][DSET_DIM2];
double points_dbl[DSET_DIM1][DSET_DIM2], check_dbl[DSET_DIM1][DSET_DIM2];
+size_t count_nbytes_read = 0;
+size_t count_nbytes_written = 0;
/* Local prototypes for filter functions */
static size_t filter_bogus(unsigned int flags, size_t cd_nelmts,
@@ -215,6 +225,49 @@ static size_t filter_corrupt(unsigned int flags, size_t cd_nelmts,
const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf);
static size_t filter_expand(unsigned int flags, size_t cd_nelmts,
const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf);
+static size_t filter_count(unsigned int flags, size_t cd_nelmts,
+ const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf);
+
+/* This message derives from H5Z */
+const H5Z_class2_t H5Z_COUNT[1] = {{
+ H5Z_CLASS_T_VERS, /* H5Z_class_t version */
+ H5Z_FILTER_COUNT, /* Filter id number */
+ 1, 1, /* Encoding and decoding enabled */
+ "count", /* Filter name for debugging */
+ NULL, /* The "can apply" callback */
+ NULL, /* The "set local" callback */
+ filter_count, /* The actual filter function */
+}};
+
+
+/*-------------------------------------------------------------------------
+ * Function: filter_count
+ *
+ * Purpose: This filter counts the number of bytes read and written,
+ * incrementing count_nbytes_read or count_nbytes_written as
+ * appropriate.
+ *
+ * Return: Success: Data chunk size
+ *
+ * Failure: 0
+ *
+ * Programmer: Neil Fortner
+ * Wednesday, March 17, 2010
+ *
+ *-------------------------------------------------------------------------
+ */
+static size_t
+filter_count(unsigned int flags, size_t H5_ATTR_UNUSED cd_nelmts,
+ const unsigned int H5_ATTR_UNUSED *cd_values, size_t nbytes,
+ size_t H5_ATTR_UNUSED *buf_size, void H5_ATTR_UNUSED **buf)
+{
+ if(flags & H5Z_FLAG_REVERSE)
+ count_nbytes_read += nbytes;
+ else
+ count_nbytes_written += nbytes;
+
+ return nbytes;
+}
/*-------------------------------------------------------------------------
@@ -908,7 +961,7 @@ test_layout_extend(hid_t fapl)
TESTING("extendible dataset with various layout");
/* Create a file */
- h5_fixname(FILENAME[12], fapl, filename, sizeof filename);
+ h5_fixname(FILENAME[15], fapl, filename, sizeof filename);
if((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
FAIL_STACK_ERROR
@@ -2801,7 +2854,7 @@ test_nbit_int(hid_t file)
mask = ~((unsigned)~0 << (precision + offset)) & ((unsigned)~0 << offset);
for(i=0; i<(size_t)size[0]; i++) {
for(j=0; j<(size_t)size[1]; j++) {
- if((new_data[i][j] & mask) != (orig_data[i][j] & mask)) {
+ if(((unsigned)new_data[i][j] & mask) != ((unsigned)orig_data[i][j] & mask)) {
H5_FAILED();
printf(" Read different values than written.\n");
printf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
@@ -3340,9 +3393,9 @@ test_nbit_compound(hid_t file)
s_mask = ~((unsigned)~0 << (precision[2] + offset[2])) & ((unsigned)~0 << offset[2]);
for(i=0; i<size[0]; i++) {
for(j=0; j<size[1]; j++) {
- if((new_data[i][j].i & i_mask) != (orig_data[i][j].i & i_mask) ||
- (new_data[i][j].c & c_mask) != (orig_data[i][j].c & c_mask) ||
- (new_data[i][j].s & s_mask) != (orig_data[i][j].s & s_mask) ||
+ if(((unsigned)new_data[i][j].i & i_mask) != ((unsigned)orig_data[i][j].i & i_mask) ||
+ ((unsigned)new_data[i][j].c & c_mask) != ((unsigned)orig_data[i][j].c & c_mask) ||
+ ((unsigned)new_data[i][j].s & s_mask) != ((unsigned)orig_data[i][j].s & s_mask) ||
(orig_data[i][j].f==orig_data[i][j].f && new_data[i][j].f != orig_data[i][j].f))
{
H5_FAILED();
@@ -3598,16 +3651,16 @@ test_nbit_compound_2(hid_t file)
for(m = 0; m < (size_t)array_dims[0]; m++)
for(n = 0; n < (size_t)array_dims[1]; n++)
- if((new_data[i][j].b[m][n]&b_mask)!=(orig_data[i][j].b[m][n]&b_mask)) {
+ if(((unsigned)new_data[i][j].b[m][n] & b_mask)!=((unsigned)orig_data[i][j].b[m][n] & b_mask)) {
b_failed = 1;
goto out;
}
for(m = 0; m < (size_t)array_dims[0]; m++)
for(n = 0; n < (size_t)array_dims[1]; n++)
- if((new_data[i][j].d[m][n].i & i_mask)!=(orig_data[i][j].d[m][n].i & i_mask)||
- (new_data[i][j].d[m][n].c & c_mask)!=(orig_data[i][j].d[m][n].c & c_mask)||
- (new_data[i][j].d[m][n].s & s_mask)!=(orig_data[i][j].d[m][n].s & s_mask)||
+ if(((unsigned)new_data[i][j].d[m][n].i & i_mask) != ((unsigned)orig_data[i][j].d[m][n].i & i_mask)||
+ ((unsigned)new_data[i][j].d[m][n].c & c_mask) != ((unsigned)orig_data[i][j].d[m][n].c & c_mask)||
+ ((unsigned)new_data[i][j].d[m][n].s & s_mask) != ((unsigned)orig_data[i][j].d[m][n].s & s_mask)||
(new_data[i][j].d[m][n].f==new_data[i][j].d[m][n].f &&
new_data[i][j].d[m][n].f != new_data[i][j].d[m][n].f)) {
d_failed = 1;
@@ -3615,9 +3668,9 @@ test_nbit_compound_2(hid_t file)
}
out:
- if((new_data[i][j].a.i & i_mask)!=(orig_data[i][j].a.i & i_mask)||
- (new_data[i][j].a.c & c_mask)!=(orig_data[i][j].a.c & c_mask)||
- (new_data[i][j].a.s & s_mask)!=(orig_data[i][j].a.s & s_mask)||
+ if(((unsigned)new_data[i][j].a.i & i_mask) != ((unsigned)orig_data[i][j].a.i & i_mask)||
+ ((unsigned)new_data[i][j].a.c & c_mask) != ((unsigned)orig_data[i][j].a.c & c_mask)||
+ ((unsigned)new_data[i][j].a.s & s_mask) != ((unsigned)orig_data[i][j].a.s & s_mask)||
(new_data[i][j].a.f==new_data[i][j].a.f &&
new_data[i][j].a.f != new_data[i][j].a.f)||
new_data[i][j].v != orig_data[i][j].v || b_failed || d_failed) {
@@ -6070,7 +6123,7 @@ test_copy_dcpl(hid_t file, hid_t fapl)
/* Create a second file and create 2 datasets with the copies of the DCPLs in the first
* file. Test whether the copies of DCPLs work. */
- h5_fixname(FILENAME[11], fapl, filename, sizeof filename);
+ h5_fixname(FILENAME[13], fapl, filename, sizeof filename);
if((new_file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
TEST_ERROR
@@ -6416,15 +6469,24 @@ static herr_t
test_zero_dims(hid_t file)
{
hid_t s = -1, d = -1, dcpl = -1;
- hsize_t dsize = 0, dmax = H5S_UNLIMITED, csize = 5;
+ hsize_t dzero = 0, dmax = H5S_UNLIMITED, csize = 5;
+ hid_t fapl; /* File access property list */
+ H5D_chunk_index_t idx_type; /* Dataset chunk index type */
+ H5F_libver_t low; /* File format low bound */
herr_t ret;
TESTING("I/O on datasets with zero-sized dims");
+ /* Get the file's file access property list */
+ if((fapl = H5Fget_access_plist(file)) < 0) FAIL_STACK_ERROR
+
+ /* Get library format */
+ if(H5Pget_libver_bounds(fapl, &low, NULL) < 0) FAIL_STACK_ERROR
+
/*
* One-dimensional dataset
*/
- if((s = H5Screate_simple(1, &dsize, &dmax)) < 0) FAIL_STACK_ERROR
+ if((s = H5Screate_simple(1, &dzero, &dmax)) < 0) FAIL_STACK_ERROR
/* Try creating chunked dataset with undefined chunk dimensions */
if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) FAIL_STACK_ERROR
@@ -6440,7 +6502,7 @@ test_zero_dims(hid_t file)
/* Try creating chunked dataset with zero-sized chunk dimensions */
H5E_BEGIN_TRY {
- ret = H5Pset_chunk(dcpl, 1, &dsize);
+ ret = H5Pset_chunk(dcpl, 1, &dzero);
} H5E_END_TRY;
if(ret > 0)
FAIL_PUTS_ERROR("set zero-sized chunk dimensions")
@@ -6452,6 +6514,16 @@ test_zero_dims(hid_t file)
if(H5Pset_chunk(dcpl, 1, &csize) < 0) FAIL_STACK_ERROR
if((d = H5Dcreate2(file, ZERODIM_DATASET, H5T_NATIVE_INT, s, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ /* Get the chunk index type */
+ if(H5D__layout_idx_type_test(d, &idx_type) < 0) FAIL_STACK_ERROR
+
+ /* Verify index type */
+ if(low == H5F_LIBVER_LATEST) {
+ if(idx_type != H5D_CHUNK_IDX_EARRAY)
+ FAIL_PUTS_ERROR("should be using extensible array as index");
+ } else if(idx_type != H5D_CHUNK_IDX_BTREE)
+ FAIL_PUTS_ERROR("should be using v1 B-tree as index");
+
/* Various no-op writes */
if(H5Dwrite(d, H5T_NATIVE_INT, s, s, H5P_DEFAULT, (void*)911) < 0) FAIL_STACK_ERROR
if(H5Dwrite(d, H5T_NATIVE_INT, s, s, H5P_DEFAULT, NULL) < 0) FAIL_STACK_ERROR
@@ -7852,6 +7924,545 @@ error:
/*-------------------------------------------------------------------------
+ * Function: test_fixed_array
+ *
+ * Purpose: Tests support for Fixed Array and Implicit Indexing
+ *
+ * Create the following 3 datasets:
+ * 1) extendible chunked dataset with fixed max. dims
+ * 2) extendible chunked dataset with NULL max. dims
+ * 3) extendible chunked dataset with same max. dims
+ * (Note that the third dataset is created with bigger size for curr & max. dims
+ * so that Fixed Array Indexing with paging is exercised)
+ *
+ * Repeat the following test with/without compression filter
+ * Repeat the following test with H5D_ALLOC_TIME_EARLY/H5D_ALLOC_TIME_LATE/H5D_ALLOC_TIME_INCR
+ * For the old format,
+ * verify that v1 btree indexing type is used for
+ * all 3 datasets with all settings
+ * For the new format:
+ * Verify that Implicit Index type is used for
+ * #1, #2, #3 datasets when ALLOC_TIME_EARLY and compression are true
+ * Verify Fixed Array indexing type is used for
+ * #1, #2, #3 datasets with all other settings
+ *
+ * Return: Success: 0
+ * Failure: -1
+ *
+ * Programmer: Vailin Choi; 2009
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+test_fixed_array(hid_t fapl)
+{
+ char filename[FILENAME_BUF_SIZE]; /* File name */
+ hid_t fid = -1; /* File ID */
+ hid_t dcpl = -1; /* Dataset creation property list ID */
+
+ hid_t sid = -1; /* Dataspace ID for dataset with fixed dimensions */
+ hid_t sid_big = -1; /* Dataspate ID for big dataset */
+ hid_t sid_max = -1; /* Dataspace ID for dataset with maximum dimensions set */
+
+ hid_t dsid = -1; /* Dataset ID for dataset with fixed dimensions */
+ hid_t dsid_big = -1; /* Dataset ID for big dataset with fixed dimensions */
+ hid_t dsid_max = -1; /* Dataset ID for dataset with maximum dimensions set */
+
+ hsize_t dim2[2] = {48, 18}; /* Dataset dimensions */
+ hsize_t dim2_big[2] = {500, 60}; /* Big dataset dimensions */
+ hsize_t dim2_max[2] = {120, 50}; /* Maximum dataset dimensions */
+
+ hid_t mem_id; /* Memory space ID */
+ hid_t big_mem_id; /* Memory space ID for big dataset */
+
+ hsize_t msize[1] = {POINTS}; /* Size of memory space */
+ hsize_t msize_big[1] = {POINTS_BIG}; /* Size of memory space for big dataset */
+
+ int wbuf[POINTS]; /* write buffer */
+ int wbuf_big[POINTS_BIG]; /* write buffer for big dataset */
+ int rbuf[POINTS]; /* read buffer */
+ int rbuf_big[POINTS_BIG]; /* read buffer for big dataset */
+
+ hsize_t chunk_dim2[2] = {4, 3}; /* Chunk dimensions */
+ int chunks[12][6]; /* # of chunks for dataset dimensions */
+ int chunks_big[125][20]; /* # of chunks for big dataset dimensions */
+ int chunk_row; /* chunk row index */
+ int chunk_col; /* chunk column index */
+
+ hsize_t coord[POINTS][2]; /* datdaset coordinates */
+ hsize_t coord_big[POINTS_BIG][2]; /* big dataset coordinates */
+
+ H5D_chunk_index_t idx_type; /* Dataset chunk index type */
+ H5F_libver_t low, high; /* File format bounds */
+ H5D_alloc_time_t alloc_time; /* Storage allocation time */
+
+#ifdef H5_HAVE_FILTER_DEFLATE
+ unsigned compress; /* Whether chunks should be compressed */
+#endif /* H5_HAVE_FILTER_DEFLATE */
+
+ h5_stat_size_t empty_size; /* Size of an empty file */
+ h5_stat_size_t file_size; /* Size of each file created */
+
+ size_t i, j; /* local index variables */
+ herr_t ret; /* Generic return value */
+
+ TESTING("datasets w/fixed array as chunk index");
+
+ h5_fixname(FILENAME[12], fapl, filename, sizeof filename);
+
+ /* Check if we are using the latest version of the format */
+ if(H5Pget_libver_bounds(fapl, &low, &high) < 0) FAIL_STACK_ERROR
+
+ /* Create and close the file to get the file size */
+ if((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
+ STACK_ERROR
+ if(H5Fclose(fid) < 0)
+ STACK_ERROR
+
+ /* Get the size of the empty file */
+ if((empty_size = h5_get_file_size(filename, fapl)) < 0)
+ TEST_ERROR
+
+#ifdef H5_HAVE_FILTER_DEFLATE
+ /* Loop over compressing chunks */
+ for(compress = FALSE; compress <= TRUE; compress++) {
+#endif /* H5_HAVE_FILTER_DEFLATE */
+
+ /* Loop over storage allocation time */
+ for(alloc_time = H5D_ALLOC_TIME_EARLY; alloc_time <= H5D_ALLOC_TIME_INCR; alloc_time++) {
+ /* Create file */
+ if((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) FAIL_STACK_ERROR
+
+ /* Create dataset creation property list */
+ if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) FAIL_STACK_ERROR
+
+ /* Set chunking */
+ if((ret = H5Pset_chunk(dcpl, 2, chunk_dim2)) < 0)
+ FAIL_PUTS_ERROR(" Problem with setting chunk.")
+
+#ifdef H5_HAVE_FILTER_DEFLATE
+ /* Check if we should compress the chunks */
+ if(compress)
+ if(H5Pset_deflate(dcpl, 9) < 0) FAIL_STACK_ERROR
+#endif /* H5_HAVE_FILTER_DEFLATE */
+
+ /* Set fill time */
+ if(H5Pset_fill_time(dcpl, H5D_FILL_TIME_ALLOC) < 0) FAIL_STACK_ERROR
+
+ /* Set allocation time */
+ if(H5Pset_alloc_time(dcpl, alloc_time) < 0) FAIL_STACK_ERROR
+
+ /* Initialization of chunk array for repeated coordinates */
+ for(i = 0; i < dim2[0]/chunk_dim2[0]; i++)
+ for(j = 0; j < dim2[1]/chunk_dim2[1]; j++)
+ chunks[i][j] = 0;
+
+ /* Generate random point coordinates. Only one point is selected per chunk */
+ for(i = 0; i < POINTS; i++){
+ do {
+ chunk_row = (int)HDrandom () % (int)(dim2[0]/chunk_dim2[0]);
+ chunk_col = (int)HDrandom () % (int)(dim2[1]/chunk_dim2[1]);
+ } while (chunks[chunk_row][chunk_col]);
+
+ wbuf[i] = chunks[chunk_row][chunk_col] = chunk_row+chunk_col+1;
+ coord[i][0] = (hsize_t)chunk_row * chunk_dim2[0];
+ coord[i][1] = (hsize_t)chunk_col * chunk_dim2[1];
+ } /* end for */
+
+ /* Create first dataset with cur and max dimensions */
+ if((sid_max = H5Screate_simple(2, dim2, dim2_max)) < 0) FAIL_STACK_ERROR
+ dsid_max = H5Dcreate2(fid, DSET_FIXED_MAX, H5T_NATIVE_INT, sid_max, H5P_DEFAULT, dcpl, H5P_DEFAULT);
+ if(dsid_max < 0)
+ FAIL_PUTS_ERROR(" Creating Chunked Dataset with maximum dimensions.")
+
+ /* Get the chunk index type */
+ if(H5D__layout_idx_type_test(dsid_max, &idx_type) < 0) FAIL_STACK_ERROR
+
+ /* Chunk index type depends on whether we are using the latest version of the format */
+ if(low == H5F_LIBVER_LATEST) {
+ if(alloc_time == H5D_ALLOC_TIME_EARLY
+#ifdef H5_HAVE_FILTER_DEFLATE
+ && !compress
+#endif /* H5_HAVE_FILTER_DEFLATE */
+ ) {
+ } else if (idx_type != H5D_CHUNK_IDX_FARRAY)
+ FAIL_PUTS_ERROR("should be using Fixed Array as index");
+ } /* end if */
+ else {
+ if(idx_type != H5D_CHUNK_IDX_BTREE)
+ FAIL_PUTS_ERROR("should be using v1 B-tree as index");
+ } /* end else */
+
+ /* Create dataspace for write buffer */
+ if((mem_id = H5Screate_simple(1, msize, NULL)) < 0) TEST_ERROR;
+
+ /* Select the random points for writing */
+ if(H5Sselect_elements(sid_max, H5S_SELECT_SET, POINTS, (const hsize_t *)coord) < 0)
+ TEST_ERROR;
+
+ /* Write into dataset */
+ if(H5Dwrite(dsid_max, H5T_NATIVE_INT, mem_id, sid_max, H5P_DEFAULT, wbuf) < 0) TEST_ERROR;
+
+ /* Closing */
+ if(H5Dclose(dsid_max) < 0) FAIL_STACK_ERROR
+ if(H5Sclose(sid_max) < 0) FAIL_STACK_ERROR
+ if(H5Sclose(mem_id) < 0) FAIL_STACK_ERROR
+
+
+ /* Create second dataset with curr dim but NULL max dim */
+ if((sid = H5Screate_simple(2, dim2, NULL)) < 0) FAIL_STACK_ERROR
+ dsid = H5Dcreate2(fid, DSET_FIXED_NOMAX, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT);
+ if(dsid < 0)
+ FAIL_PUTS_ERROR(" Creating Chunked Dataset.")
+
+ /* Get the chunk index type */
+ if(H5D__layout_idx_type_test(dsid, &idx_type) < 0) FAIL_STACK_ERROR
+
+ /* Chunk index type depends on whether we are using the latest version of the format */
+ if(low == H5F_LIBVER_LATEST) {
+ if(alloc_time == H5D_ALLOC_TIME_EARLY
+#ifdef H5_HAVE_FILTER_DEFLATE
+ && !compress
+#endif /* H5_HAVE_FILTER_DEFLATE */
+ ) {
+ } else if(idx_type != H5D_CHUNK_IDX_FARRAY)
+ FAIL_PUTS_ERROR("should be using Fixed Array as index");
+ } else {
+ if(idx_type != H5D_CHUNK_IDX_BTREE)
+ FAIL_PUTS_ERROR("should be using v1 B-tree as index");
+ } /* end else */
+
+ /* Create dataspace for write buffer */
+ if((mem_id = H5Screate_simple(1, msize, NULL)) < 0) TEST_ERROR;
+
+ /* Select the random points for writing */
+ if(H5Sselect_elements(sid, H5S_SELECT_SET, POINTS, (const hsize_t *)coord) < 0)
+ TEST_ERROR;
+
+ /* Write into dataset */
+ if(H5Dwrite(dsid, H5T_NATIVE_INT, mem_id, sid, H5P_DEFAULT, wbuf) < 0) TEST_ERROR;
+
+ /* Closing */
+ if(H5Dclose(dsid) < 0) FAIL_STACK_ERROR
+ if(H5Sclose(sid) < 0) FAIL_STACK_ERROR
+ if(H5Sclose(mem_id) < 0) FAIL_STACK_ERROR
+
+ /* Create the third dataset with bigger size and both curr & max dimensions are the same */
+ if((sid_big = H5Screate_simple(2, dim2_big, dim2_big)) < 0) FAIL_STACK_ERROR
+ dsid_big = H5Dcreate2(fid, DSET_FIXED_BIG, H5T_NATIVE_INT, sid_big, H5P_DEFAULT, dcpl, H5P_DEFAULT);
+ if(dsid_big < 0)
+ FAIL_PUTS_ERROR(" Creating Big Chunked Dataset.")
+
+ /* Get the chunk index type */
+ if(H5D__layout_idx_type_test(dsid_big, &idx_type) < 0) FAIL_STACK_ERROR
+
+ /* Chunk index type depends on whether we are using the latest version of the format */
+ if(low == H5F_LIBVER_LATEST) {
+ if(alloc_time == H5D_ALLOC_TIME_EARLY
+#ifdef H5_HAVE_FILTER_DEFLATE
+ && !compress
+#endif /* H5_HAVE_FILTER_DEFLATE */
+ ) {
+ } else if(idx_type != H5D_CHUNK_IDX_FARRAY)
+ FAIL_PUTS_ERROR("should be using Fixed Array as index");
+ } /* end if */
+ else {
+ if(idx_type != H5D_CHUNK_IDX_BTREE)
+ FAIL_PUTS_ERROR("should be using v1 B-tree as index");
+ } /* end else */
+
+ /* Initialization of chunk array for repeated coordinates */
+ for(i = 0; i < dim2_big[0]/chunk_dim2[0]; i++)
+ for(j = 0; j < dim2_big[1]/chunk_dim2[1]; j++)
+ chunks_big[i][j] = 0;
+
+ /* Generate random point coordinates. Only one point is selected per chunk */
+ for(i = 0; i < POINTS_BIG; i++){
+ do {
+ chunk_row = (int)HDrandom () % (int)(dim2_big[0]/chunk_dim2[0]);
+ chunk_col = (int)HDrandom () % (int)(dim2_big[1]/chunk_dim2[1]);
+ } while (chunks_big[chunk_row][chunk_col]);
+
+ wbuf_big[i] = chunks_big[chunk_row][chunk_col] = chunk_row+chunk_col+1;
+ coord_big[i][0] = (hsize_t)chunk_row * chunk_dim2[0];
+ coord_big[i][1] = (hsize_t)chunk_col * chunk_dim2[1];
+ } /* end for */
+
+ /* Create dataspace for write buffer */
+ if((big_mem_id = H5Screate_simple(1, msize_big, NULL)) < 0) TEST_ERROR;
+
+ /* Select the random points for writing */
+ if(H5Sselect_elements(sid_big, H5S_SELECT_SET, POINTS_BIG, (const hsize_t *)coord_big) < 0)
+ TEST_ERROR;
+
+ /* Write into dataset */
+ if(H5Dwrite(dsid_big, H5T_NATIVE_INT, big_mem_id, sid_big, H5P_DEFAULT, wbuf_big) < 0) TEST_ERROR;
+
+ /* Closing */
+ if(H5Dclose(dsid_big) < 0) FAIL_STACK_ERROR
+ if(H5Sclose(sid_big) < 0) FAIL_STACK_ERROR
+ if(H5Sclose(big_mem_id) < 0) FAIL_STACK_ERROR
+ if(H5Pclose(dcpl) < 0) FAIL_STACK_ERROR
+
+ /* Open the first dataset */
+ if((dsid = H5Dopen2(fid, DSET_FIXED_MAX, H5P_DEFAULT)) < 0) TEST_ERROR;
+
+ /* Get dataset dataspace */
+ if((sid = H5Dget_space(dsid)) < 0) TEST_ERROR;
+
+ /* Create dataspace for read buffer */
+ if((mem_id = H5Screate_simple(1, msize, NULL)) < 0) TEST_ERROR;
+
+ /* Select the random points for reading */
+ if(H5Sselect_elements (sid, H5S_SELECT_SET, POINTS, (const hsize_t *)coord) < 0) TEST_ERROR;
+
+ /* Read from dataset */
+ if(H5Dread(dsid, H5T_NATIVE_INT, mem_id, sid, H5P_DEFAULT, rbuf) < 0) TEST_ERROR;
+
+ /* Verify that written and read data are the same */
+ for(i = 0; i < POINTS; i++)
+ if(rbuf[i] != wbuf[i]){
+ printf(" Line %d: Incorrect value, wbuf[%u]=%d, rbuf[%u]=%d\n",
+ __LINE__,(unsigned)i,wbuf[i],(unsigned)i,rbuf[i]);
+ TEST_ERROR;
+ } /* end if */
+
+ /* Closing */
+ if(H5Dclose(dsid) < 0) FAIL_STACK_ERROR
+ if(H5Sclose(sid) < 0) FAIL_STACK_ERROR
+ if(H5Sclose(mem_id) < 0) FAIL_STACK_ERROR
+
+ /* Open the second dataset */
+ if((dsid = H5Dopen2(fid, DSET_FIXED_NOMAX, H5P_DEFAULT)) < 0) TEST_ERROR;
+
+ /* Get dataset dataspace */
+ if((sid = H5Dget_space(dsid)) < 0) TEST_ERROR;
+
+ /* Create dataspace for read buffer */
+ if((mem_id = H5Screate_simple(1, msize, NULL)) < 0) TEST_ERROR;
+
+ /* Select the random points for reading */
+ if(H5Sselect_elements (sid, H5S_SELECT_SET, POINTS, (const hsize_t *)coord) < 0) TEST_ERROR;
+
+ /* Read from dataset */
+ if(H5Dread(dsid, H5T_NATIVE_INT, mem_id, sid, H5P_DEFAULT, rbuf) < 0) TEST_ERROR;
+
+ /* Verify that written and read data are the same */
+ for(i = 0; i < POINTS; i++)
+ if(rbuf[i] != wbuf[i]){
+ printf(" Line %d: Incorrect value, wbuf[%u]=%d, rbuf[%u]=%d\n",
+ __LINE__,(unsigned)i,wbuf[i],(unsigned)i,rbuf[i]);
+ TEST_ERROR;
+ } /* end if */
+
+ /* Closing */
+ if(H5Dclose(dsid) < 0) FAIL_STACK_ERROR
+ if(H5Sclose(sid) < 0) FAIL_STACK_ERROR
+ if(H5Sclose(mem_id) < 0) FAIL_STACK_ERROR
+
+ /* Open the third dataset */
+ if((dsid_big = H5Dopen2(fid, DSET_FIXED_BIG, H5P_DEFAULT)) < 0) TEST_ERROR;
+ /* Get dataset dataspace */
+ if((sid_big = H5Dget_space(dsid_big)) < 0) TEST_ERROR;
+
+ /* Create dataspace for read buffer */
+ if((big_mem_id = H5Screate_simple(1, msize_big, NULL)) < 0) TEST_ERROR;
+
+ /* Select the random points for reading */
+ if(H5Sselect_elements (sid_big, H5S_SELECT_SET, POINTS_BIG, (const hsize_t *)coord_big) < 0) TEST_ERROR;
+ /* Read from dataset */
+ if(H5Dread(dsid_big, H5T_NATIVE_INT, big_mem_id, sid_big, H5P_DEFAULT, rbuf_big) < 0) TEST_ERROR;
+
+ /* Verify that written and read data are the same */
+ for(i = 0; i < POINTS_BIG; i++)
+ if(rbuf_big[i] != wbuf_big[i]){
+ printf(" Line %d: Incorrect value, wbuf_bif[%u]=%d, rbuf_big[%u]=%d\n",
+ __LINE__,(unsigned)i,wbuf_big[i],(unsigned)i,rbuf_big[i]);
+ TEST_ERROR;
+ } /* end if */
+
+ /* Closing */
+ if(H5Dclose(dsid_big) < 0) FAIL_STACK_ERROR
+ if(H5Sclose(sid_big) < 0) FAIL_STACK_ERROR
+ if(H5Sclose(big_mem_id) < 0) FAIL_STACK_ERROR
+
+ /* Delete datasets */
+ if(H5Ldelete(fid, DSET_FIXED_BIG, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if(H5Ldelete(fid, DSET_FIXED_NOMAX, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if(H5Ldelete(fid, DSET_FIXED_MAX, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+
+ /* Close everything */
+ if(H5Fclose(fid) < 0) FAIL_STACK_ERROR
+
+ /* Get the size of the file */
+ if((file_size = h5_get_file_size(filename, fapl)) < 0)
+ TEST_ERROR
+
+ /* Verify the file is correct size */
+ if(file_size != empty_size)
+ TEST_ERROR
+
+ } /* end for */
+#ifdef H5_HAVE_FILTER_DEFLATE
+ } /* end for */
+#endif /* H5_HAVE_FILTER_DEFLATE */
+
+ PASSED();
+ return 0;
+
+error:
+ H5E_BEGIN_TRY {
+ H5Pclose(dcpl);
+ H5Dclose(dsid);
+ H5Sclose(sid);
+ H5Sclose(mem_id);
+ H5Fclose(fid);
+ } H5E_END_TRY;
+ return -1;
+} /* end test_fixed_array() */
+
+/*-------------------------------------------------------------------------
+ *
+ * test_unfiltered_edge_chunks():
+ * Tests that partial edge chunks aren't filtered when the
+ * H5D_CHUNK_FILTER_PARTIAL_CHUNKS option is set.
+ *
+ * Programmer: Neil Fortner; 17th March, 2010
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+test_unfiltered_edge_chunks(hid_t fapl)
+{
+ hid_t fid = -1; /* File id */
+ hid_t did = -1; /* Dataset id */
+ hid_t sid = -1; /* Dataspace id */
+ hid_t dcpl = -1; /* DCPL id */
+ hsize_t dim[2] = {4, 3}; /* Dataset dimensions */
+ hsize_t cdim[2] = {2, 2}; /* Chunk dimension */
+ char wbuf[4][3]; /* Write buffer */
+ char rbuf[4][3]; /* Read buffer */
+ char filename[FILENAME_BUF_SIZE] = ""; /* old test file name */
+ unsigned opts; /* Chunk options */
+ unsigned i, j; /* Local index variables */
+
+ /* Output message about test being performed */
+ TESTING("disabled partial chunk filters");
+
+ h5_fixname(FILENAME[14], fapl, filename, sizeof filename);
+
+ /* Create the file */
+ if((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
+ TEST_ERROR
+
+ /* Register byte-counting filter */
+ if(H5Zregister(H5Z_COUNT) < 0)
+ TEST_ERROR
+
+ /* Create dataspace */
+ if((sid = H5Screate_simple(2, dim, NULL)) < 0)
+ TEST_ERROR
+
+ /* Create DCPL */
+ if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ TEST_ERROR
+
+ /* Set chunk dimensions */
+ if(H5Pset_chunk(dcpl, 2, cdim) < 0)
+ TEST_ERROR
+
+ /* Add "count" filter */
+ if(H5Pset_filter(dcpl, H5Z_FILTER_COUNT, 0u, (size_t)0, NULL) < 0)
+ TEST_ERROR
+
+ /* Disable filters on partial chunks */
+ if(H5Pget_chunk_opts(dcpl, &opts) < 0)
+ TEST_ERROR
+ opts |= H5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS;
+ if(H5Pset_chunk_opts(dcpl, opts) < 0)
+ TEST_ERROR
+
+ /* Initialize write buffer */
+ for(i=0; i<dim[0]; i++)
+ for(j=0; j<dim[1]; j++)
+ wbuf[i][j] = (char)(2 * i) - (char)j;
+
+ /* Reset byte counts */
+ count_nbytes_read = (size_t)0;
+ count_nbytes_written = (size_t)0;
+
+ /* Create dataset */
+ if((did = H5Dcreate2(fid, DSET_CHUNKED_NAME, H5T_NATIVE_CHAR, sid,
+ H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
+ TEST_ERROR
+
+ /* Nothing should have been written, as we are not using early allocation */
+ if(count_nbytes_read != (size_t)0)
+ TEST_ERROR
+ if(count_nbytes_written != (size_t)0)
+ TEST_ERROR
+
+ /* Write data */
+ if(H5Dwrite(did, H5T_NATIVE_CHAR, H5S_ALL, H5S_ALL, H5P_DEFAULT, wbuf) < 0)
+ TEST_ERROR
+
+ /* Close dataset */
+ if(H5Dclose(did) < 0)
+ TEST_ERROR
+
+ /* Make sure only 2 of the 4 chunks were written through the filter (4 bytes
+ * each) */
+ if(count_nbytes_read != (size_t)0)
+ TEST_ERROR
+ if(count_nbytes_written != (size_t)(2 * cdim[0] * cdim[1]))
+ TEST_ERROR
+
+ /* Reopen the dataset */
+ if((did = H5Dopen2(fid, DSET_CHUNKED_NAME, H5P_DEFAULT)) < 0)
+ TEST_ERROR
+
+ /* Read the dataset */
+ if(H5Dread(did, H5T_NATIVE_CHAR, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf) < 0)
+ TEST_ERROR
+
+ /* Verify that data read == data written */
+ for(i=0; i<dim[0]; i++)
+ for(j=0; j<dim[1]; j++)
+ if(rbuf[i][j] != wbuf[i][j])
+ TEST_ERROR
+
+ /* Make sure only 2 of the 4 chunks were read through the filter (4 bytes
+ * each) */
+ if(count_nbytes_read != (size_t)(2 * cdim[0] * cdim[1]))
+ TEST_ERROR
+ if(count_nbytes_written != (size_t)(2 * cdim[0] * cdim[1]))
+ TEST_ERROR
+
+ /* Close IDs */
+ if(H5Dclose(did) < 0)
+ TEST_ERROR
+ if(H5Pclose(dcpl) < 0)
+ TEST_ERROR
+ if(H5Sclose(sid) < 0)
+ TEST_ERROR
+ if(H5Fclose(fid) < 0)
+ TEST_ERROR
+
+ PASSED();
+ return 0;
+
+error:
+ H5E_BEGIN_TRY {
+ H5Dclose(did);
+ H5Pclose(dcpl);
+ H5Sclose(sid);
+ H5Fclose(fid);
+ } H5E_END_TRY;
+ return -1;
+} /* test_unfiltered_edge_chunks */
+
+
+/*-------------------------------------------------------------------------
* Function: test_large_chunk_shrink
*
* Purpose: Tests support for shrinking a chunk larger than 1 MB by a
@@ -7993,7 +8604,7 @@ test_zero_dim_dset(hid_t fapl)
TESTING("shrinking large chunk");
- h5_fixname(FILENAME[13], fapl, filename, sizeof filename);
+ h5_fixname(FILENAME[16], fapl, filename, sizeof filename);
/* Create file */
if((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) FAIL_STACK_ERROR
@@ -9188,6 +9799,8 @@ main(void)
nerrors += (test_big_chunks_bypass_cache(my_fapl) < 0 ? 1 : 0);
nerrors += (test_chunk_expand(my_fapl) < 0 ? 1 : 0);
nerrors += (test_layout_extend(my_fapl) < 0 ? 1 : 0);
+ nerrors += (test_fixed_array(my_fapl) < 0 ? 1 : 0);
+ nerrors += (test_unfiltered_edge_chunks(my_fapl) < 0 ? 1 : 0);
nerrors += (test_large_chunk_shrink(my_fapl) < 0 ? 1 : 0);
nerrors += (test_zero_dim_dset(my_fapl) < 0 ? 1 : 0);
diff --git a/test/dtypes.c b/test/dtypes.c
index 326294f..984b6c6 100644
--- a/test/dtypes.c
+++ b/test/dtypes.c
@@ -1789,6 +1789,13 @@ test_compound_9(void)
goto error;
} /* end if */
+ if(H5Dvlen_reclaim(dup_tid, space_id, H5P_DEFAULT, &rdata) < 0) {
+ H5_FAILED(); AT();
+ printf("Can't reclaim read data\n");
+ goto error;
+ } /* end if */
+ rdata.str = NULL;
+
if(H5Dclose(dset_id) < 0)
goto error;
if(H5Tclose(cmpd_tid) < 0)
@@ -1815,6 +1822,12 @@ test_compound_9(void)
goto error;
} /* end if */
+ if((space_id = H5Dget_space(dset_id)) < 0) {
+ H5_FAILED(); AT();
+ printf("Can't get space\n");
+ goto error;
+ } /* end if */
+
if((cmpd_tid = H5Dget_type(dset_id)) < 0) {
H5_FAILED(); AT();
printf("cannot open dataset\n");
@@ -1842,10 +1855,19 @@ test_compound_9(void)
goto error;
} /* end if */
+ if(H5Dvlen_reclaim(dup_tid, space_id, H5P_DEFAULT, &rdata) < 0) {
+ H5_FAILED(); AT();
+ printf("Can't read data\n");
+ goto error;
+ } /* end if */
+ rdata.str = NULL;
+
if(rdata.str) HDfree(rdata.str);
if(H5Dclose(dset_id) < 0)
goto error;
+ if(H5Sclose(space_id) < 0)
+ goto error;
if(H5Tclose(cmpd_tid) < 0)
goto error;
if(H5Tclose(dup_tid) < 0)
@@ -2020,12 +2042,17 @@ test_compound_10(void)
printf("incorrect VL read data\n");
goto error;
}
-
- HDfree(t1);
- HDfree(t2);
- HDfree(wdata[i].str);
- HDfree(rdata[i].str);
} /* end for */
+ if(H5Dvlen_reclaim(arr_tid, space_id, H5P_DEFAULT, &rdata) < 0) {
+ H5_FAILED(); AT();
+ printf("Can't reclaim read data\n");
+ goto error;
+ } /* end if */
+ if(H5Dvlen_reclaim(arr_tid, space_id, H5P_DEFAULT, &wdata) < 0) {
+ H5_FAILED(); AT();
+ printf("Can't reclaim read data\n");
+ goto error;
+ } /* end if */
if(H5Dclose(dset_id) < 0)
goto error;
@@ -2090,6 +2117,8 @@ test_compound_11(void)
hid_t big_tid, little_tid; /* Datatype IDs for type conversion */
hid_t big_tid2, little_tid2; /* Datatype IDs for type conversion */
hid_t opaq_src_tid, opaq_dst_tid; /* Datatype IDs for type conversion */
+ hid_t space_id; /* Dataspace for buffer elements */
+ hsize_t dim[1]; /* Dimensions for dataspace */
void *buf = NULL; /* Conversion buffer */
void *buf_orig = NULL; /* Copy of original conversion buffer */
void *bkg = NULL; /* Background buffer */
@@ -2138,6 +2167,13 @@ test_compound_11(void)
/* Make copy of buffer before conversion */
HDmemcpy(buf_orig,buf,sizeof(big_t)*NTESTELEM);
+ dim[0] = NTESTELEM;
+ if((space_id = H5Screate_simple(1, dim, NULL)) < 0) {
+ H5_FAILED(); AT();
+ printf("Can't create space\n");
+ goto error;
+ } /* end if */
+
/* Make copies of the 'big' and 'little' datatypes, so the type
* conversion routine doesn't use the same ones this time and next time
*/
@@ -2169,8 +2205,12 @@ test_compound_11(void)
(unsigned)u,((big_t *)buf_orig)[u].s1,(unsigned)u,((little_t *)buf)[u].s1);
TEST_ERROR
} /* end if */
- HDfree(((little_t *)buf)[u].s1);
} /* end for */
+ if(H5Dvlen_reclaim(little_tid2, space_id, H5P_DEFAULT, buf) < 0) {
+ H5_FAILED(); AT();
+ printf("Can't reclaim data\n");
+ goto error;
+ } /* end if */
/* Build source and destination types for conversion routine */
if((opaq_src_tid=H5Tcreate(H5T_OPAQUE, (size_t)4)) < 0) TEST_ERROR
@@ -2209,8 +2249,12 @@ test_compound_11(void)
(unsigned)u,((big_t *)buf_orig)[u].s1,(unsigned)u,((little_t *)buf)[u].s1);
TEST_ERROR
} /* end if */
- HDfree(((little_t *)buf)[u].s1);
} /* end for */
+ if(H5Dvlen_reclaim(little_tid, space_id, H5P_DEFAULT, buf) < 0) {
+ H5_FAILED(); AT();
+ printf("Can't reclaim data\n");
+ goto error;
+ } /* end if */
/* Unregister the conversion routine */
if(H5Tunregister(H5T_PERS_HARD, "opaq_test", opaq_src_tid, opaq_dst_tid, convert_opaque) < 0) TEST_ERROR
@@ -2243,12 +2287,17 @@ test_compound_11(void)
(unsigned)u,((big_t *)buf_orig)[u].s1,(unsigned)u,((little_t *)buf)[u].s1);
TEST_ERROR
} /* end if */
- HDfree(((little_t *)buf)[u].s1);
} /* end for */
+ if(H5Dvlen_reclaim(little_tid, space_id, H5P_DEFAULT, buf) < 0) {
+ H5_FAILED(); AT();
+ printf("Can't reclaim data\n");
+ goto error;
+ } /* end if */
/* Free everything */
for(u=0; u<NTESTELEM; u++)
HDfree(((big_t *)buf_orig)[u].s1);
+ if(H5Sclose(space_id) < 0) TEST_ERROR
if(H5Tclose(opaq_dst_tid) < 0) TEST_ERROR
if(H5Tclose(opaq_src_tid) < 0) TEST_ERROR
if(H5Tclose(little_tid2) < 0) TEST_ERROR
@@ -2727,6 +2776,18 @@ test_compound_14(void)
goto error;
} /* end if */
+ if(H5Dvlen_reclaim(cmpd_m1_tid, space_id, H5P_DEFAULT, &rdata1) < 0) {
+ H5_FAILED(); AT();
+ printf("Can't reclaim read data\n");
+ goto error;
+ } /* end if */
+ rdata1.str = NULL;
+ if(H5Dvlen_reclaim(cmpd_m2_tid, space_id, H5P_DEFAULT, &rdata2) < 0) {
+ H5_FAILED(); AT();
+ printf("Can't reclaim read data\n");
+ goto error;
+ } /* end if */
+ rdata2.str = NULL;
if(H5Dclose(dset1_id) < 0)
goto error;
if(H5Dclose(dset2_id) < 0)
@@ -2761,6 +2822,12 @@ test_compound_14(void)
goto error;
} /* end if */
+ if((space_id = H5Dget_space(dset2_id)) < 0) {
+ H5_FAILED(); AT();
+ printf("Can't get space\n");
+ goto error;
+ } /* end if */
+
rdata1.c1 = rdata1.c2 = 0;
if(rdata1.str) HDfree(rdata1.str);
@@ -2796,13 +2863,25 @@ test_compound_14(void)
goto error;
} /* end if */
- if(rdata1.str) HDfree(rdata1.str);
- if(rdata2.str) HDfree(rdata2.str);
+ if(H5Dvlen_reclaim(cmpd_m1_tid, space_id, H5P_DEFAULT, &rdata1) < 0) {
+ H5_FAILED(); AT();
+ printf("Can't reclaim read data\n");
+ goto error;
+ } /* end if */
+ rdata1.str = NULL;
+ if(H5Dvlen_reclaim(cmpd_m2_tid, space_id, H5P_DEFAULT, &rdata2) < 0) {
+ H5_FAILED(); AT();
+ printf("Can't reclaim read data\n");
+ goto error;
+ } /* end if */
+ rdata2.str = NULL;
if(H5Dclose(dset1_id) < 0)
goto error;
if(H5Dclose(dset2_id) < 0)
goto error;
+ if(H5Sclose(space_id) < 0)
+ goto error;
if(H5Tclose(cmpd_m1_tid) < 0)
goto error;
if(H5Tclose(cmpd_m2_tid) < 0)
diff --git a/test/dynlib3.c b/test/dynlib3.c
index b3a02ed..e509a52 100644
--- a/test/dynlib3.c
+++ b/test/dynlib3.c
@@ -81,7 +81,7 @@ H5Z_filter_dynlib3(unsigned int flags, size_t cd_nelmts,
void *outbuf = NULL; /* Pointer to new buffer */
unsigned char *dst; /* Temporary pointer to destination buffer */
- dst = (unsigned char *)(outbuf = malloc(nbytes + SUFFIX_LEN));
+ dst = (unsigned char *)(outbuf = H5allocate_memory(nbytes + SUFFIX_LEN, 0));
/* Copy raw data */
memcpy((void*)dst, (void*)(*buf), nbytes);
@@ -91,7 +91,7 @@ H5Z_filter_dynlib3(unsigned int flags, size_t cd_nelmts,
memcpy(dst, (void*)GROUP_SUFFIX, SUFFIX_LEN);
/* Free input buffer */
- free(*buf);
+ H5free_memory(*buf);
/* Set return values */
*buf_size = nbytes + SUFFIX_LEN;
diff --git a/test/earray.c b/test/earray.c
index 80c720c..fb0ba9f 100644
--- a/test/earray.c
+++ b/test/earray.c
@@ -604,7 +604,7 @@ finish(hid_t file, hid_t fapl, H5F_t *f, H5EA_t *ea, haddr_t ea_addr)
h5_stat_size_t file_size; /* File size, after deleting array */
/* Close the extensible array */
- if(H5EA_close(ea, H5P_DATASET_XFER_DEFAULT) < 0)
+ if(H5EA_close(ea, H5AC_ind_read_dxpl_id) < 0)
FAIL_STACK_ERROR
#ifdef QAK
@@ -614,7 +614,7 @@ HDsystem("cp earray.h5 earray.h5.save");
#endif /* QAK */
/* Delete array */
- if(H5EA_delete(f, H5P_DATASET_XFER_DEFAULT, ea_addr, NULL) < 0)
+ if(H5EA_delete(f, H5AC_ind_read_dxpl_id, ea_addr, NULL) < 0)
FAIL_STACK_ERROR
/* Close the file */
@@ -917,11 +917,11 @@ test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t H5_ATTR_UNUSE
HDmemcpy(&test_cparam, cparam, sizeof(test_cparam));
test_cparam.raw_elmt_size = 0;
H5E_BEGIN_TRY {
- ea = H5EA_create(f, H5P_DATASET_XFER_DEFAULT, &test_cparam, NULL);
+ ea = H5EA_create(f, H5AC_ind_read_dxpl_id, &test_cparam, NULL);
} H5E_END_TRY;
if(ea) {
/* Close opened extensible array */
- H5EA_close(ea, H5P_DATASET_XFER_DEFAULT);
+ H5EA_close(ea, H5AC_ind_read_dxpl_id);
ea = NULL;
/* Indicate error */
@@ -932,11 +932,11 @@ test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t H5_ATTR_UNUSE
HDmemcpy(&test_cparam, cparam, sizeof(test_cparam));
test_cparam.max_nelmts_bits = 0;
H5E_BEGIN_TRY {
- ea = H5EA_create(f, H5P_DATASET_XFER_DEFAULT, &test_cparam, NULL);
+ ea = H5EA_create(f, H5AC_ind_read_dxpl_id, &test_cparam, NULL);
} H5E_END_TRY;
if(ea) {
/* Close opened extensible array */
- H5EA_close(ea, H5P_DATASET_XFER_DEFAULT);
+ H5EA_close(ea, H5AC_ind_read_dxpl_id);
ea = NULL;
/* Indicate error */
@@ -946,11 +946,11 @@ test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t H5_ATTR_UNUSE
HDmemcpy(&test_cparam, cparam, sizeof(test_cparam));
test_cparam.max_nelmts_bits = 65;
H5E_BEGIN_TRY {
- ea = H5EA_create(f, H5P_DATASET_XFER_DEFAULT, &test_cparam, NULL);
+ ea = H5EA_create(f, H5AC_ind_read_dxpl_id, &test_cparam, NULL);
} H5E_END_TRY;
if(ea) {
/* Close opened extensible array */
- H5EA_close(ea, H5P_DATASET_XFER_DEFAULT);
+ H5EA_close(ea, H5AC_ind_read_dxpl_id);
ea = NULL;
/* Indicate error */
@@ -961,11 +961,11 @@ test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t H5_ATTR_UNUSE
HDmemcpy(&test_cparam, cparam, sizeof(test_cparam));
test_cparam.sup_blk_min_data_ptrs = 0;
H5E_BEGIN_TRY {
- ea = H5EA_create(f, H5P_DATASET_XFER_DEFAULT, &test_cparam, NULL);
+ ea = H5EA_create(f, H5AC_ind_read_dxpl_id, &test_cparam, NULL);
} H5E_END_TRY;
if(ea) {
/* Close opened extensible array */
- H5EA_close(ea, H5P_DATASET_XFER_DEFAULT);
+ H5EA_close(ea, H5AC_ind_read_dxpl_id);
ea = NULL;
/* Indicate error */
@@ -974,11 +974,11 @@ test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t H5_ATTR_UNUSE
HDmemcpy(&test_cparam, cparam, sizeof(test_cparam));
test_cparam.sup_blk_min_data_ptrs = 1;
H5E_BEGIN_TRY {
- ea = H5EA_create(f, H5P_DATASET_XFER_DEFAULT, &test_cparam, NULL);
+ ea = H5EA_create(f, H5AC_ind_read_dxpl_id, &test_cparam, NULL);
} H5E_END_TRY;
if(ea) {
/* Close opened extensible array */
- H5EA_close(ea, H5P_DATASET_XFER_DEFAULT);
+ H5EA_close(ea, H5AC_ind_read_dxpl_id);
ea = NULL;
/* Indicate error */
@@ -987,11 +987,11 @@ test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t H5_ATTR_UNUSE
HDmemcpy(&test_cparam, cparam, sizeof(test_cparam));
test_cparam.sup_blk_min_data_ptrs = 6;
H5E_BEGIN_TRY {
- ea = H5EA_create(f, H5P_DATASET_XFER_DEFAULT, &test_cparam, NULL);
+ ea = H5EA_create(f, H5AC_ind_read_dxpl_id, &test_cparam, NULL);
} H5E_END_TRY;
if(ea) {
/* Close opened extensible array */
- H5EA_close(ea, H5P_DATASET_XFER_DEFAULT);
+ H5EA_close(ea, H5AC_ind_read_dxpl_id);
ea = NULL;
/* Indicate error */
@@ -1002,11 +1002,11 @@ test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t H5_ATTR_UNUSE
HDmemcpy(&test_cparam, cparam, sizeof(test_cparam));
test_cparam.data_blk_min_elmts = 0;
H5E_BEGIN_TRY {
- ea = H5EA_create(f, H5P_DATASET_XFER_DEFAULT, &test_cparam, NULL);
+ ea = H5EA_create(f, H5AC_ind_read_dxpl_id, &test_cparam, NULL);
} H5E_END_TRY;
if(ea) {
/* Close opened extensible array */
- H5EA_close(ea, H5P_DATASET_XFER_DEFAULT);
+ H5EA_close(ea, H5AC_ind_read_dxpl_id);
ea = NULL;
/* Indicate error */
@@ -1018,11 +1018,11 @@ test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t H5_ATTR_UNUSE
HDmemcpy(&test_cparam, cparam, sizeof(test_cparam));
test_cparam.max_dblk_page_nelmts_bits = (uint8_t)(H5VM_log2_gen((uint64_t)test_cparam.idx_blk_elmts) - 1);
H5E_BEGIN_TRY {
- ea = H5EA_create(f, H5P_DATASET_XFER_DEFAULT, &test_cparam, NULL);
+ ea = H5EA_create(f, H5AC_ind_read_dxpl_id, &test_cparam, NULL);
} H5E_END_TRY;
if(ea) {
/* Close opened extensible array */
- H5EA_close(ea, H5P_DATASET_XFER_DEFAULT);
+ H5EA_close(ea, H5AC_ind_read_dxpl_id);
ea = NULL;
/* Indicate error */
@@ -1032,11 +1032,11 @@ test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t H5_ATTR_UNUSE
HDmemcpy(&test_cparam, cparam, sizeof(test_cparam));
test_cparam.max_dblk_page_nelmts_bits = 4; /* corresponds to 16 elements in data block page, which is less than the 64 elements for the default settings */
H5E_BEGIN_TRY {
- ea = H5EA_create(f, H5P_DATASET_XFER_DEFAULT, &test_cparam, NULL);
+ ea = H5EA_create(f, H5AC_ind_read_dxpl_id, &test_cparam, NULL);
} H5E_END_TRY;
if(ea) {
/* Close opened extensible array */
- H5EA_close(ea, H5P_DATASET_XFER_DEFAULT);
+ H5EA_close(ea, H5AC_ind_read_dxpl_id);
ea = NULL;
/* Indicate error */
@@ -1045,11 +1045,11 @@ test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t H5_ATTR_UNUSE
HDmemcpy(&test_cparam, cparam, sizeof(test_cparam));
test_cparam.max_dblk_page_nelmts_bits = (uint8_t)(test_cparam.max_nelmts_bits + 1);
H5E_BEGIN_TRY {
- ea = H5EA_create(f, H5P_DATASET_XFER_DEFAULT, &test_cparam, NULL);
+ ea = H5EA_create(f, H5AC_ind_read_dxpl_id, &test_cparam, NULL);
} H5E_END_TRY;
if(ea) {
/* Close opened extensible array */
- H5EA_close(ea, H5P_DATASET_XFER_DEFAULT);
+ H5EA_close(ea, H5AC_ind_read_dxpl_id);
ea = NULL;
/* Indicate error */
@@ -1069,7 +1069,7 @@ test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t H5_ATTR_UNUSE
TESTING("extensible array creation");
/* Create array */
- if(create_array(f, H5P_DATASET_XFER_DEFAULT, cparam, &ea, &ea_addr, NULL) < 0)
+ if(create_array(f, H5AC_ind_read_dxpl_id, cparam, &ea, &ea_addr, NULL) < 0)
TEST_ERROR
PASSED()
@@ -1093,7 +1093,7 @@ test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t H5_ATTR_UNUSE
error:
H5E_BEGIN_TRY {
if(ea)
- H5EA_close(ea, H5P_DATASET_XFER_DEFAULT);
+ H5EA_close(ea, H5AC_ind_read_dxpl_id);
H5Fclose(file);
} H5E_END_TRY;
@@ -1132,19 +1132,19 @@ test_reopen(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam)
TESTING("create, close & reopen extensible array");
/* Create array */
- if(create_array(f, H5P_DATASET_XFER_DEFAULT, cparam, &ea, &ea_addr, NULL) < 0)
+ if(create_array(f, H5AC_ind_read_dxpl_id, cparam, &ea, &ea_addr, NULL) < 0)
TEST_ERROR
/* Close the extensible array */
- if(H5EA_close(ea, H5P_DATASET_XFER_DEFAULT) < 0)
+ if(H5EA_close(ea, H5AC_ind_read_dxpl_id) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the file */
- if(reopen_file(&file, &f, fapl, H5P_DATASET_XFER_DEFAULT, NULL, HADDR_UNDEF, tparam) < 0)
+ if(reopen_file(&file, &f, fapl, H5AC_ind_read_dxpl_id, NULL, HADDR_UNDEF, tparam) < 0)
TEST_ERROR
/* Re-open the array */
- if(NULL == (ea = H5EA_open(f, H5P_DATASET_XFER_DEFAULT, ea_addr, NULL)))
+ if(NULL == (ea = H5EA_open(f, H5AC_ind_read_dxpl_id, ea_addr, NULL)))
FAIL_STACK_ERROR
/* Verify the creation parameters */
@@ -1163,7 +1163,7 @@ test_reopen(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam)
error:
H5E_BEGIN_TRY {
if(ea)
- H5EA_close(ea, H5P_DATASET_XFER_DEFAULT);
+ H5EA_close(ea, H5AC_ind_read_dxpl_id);
H5Fclose(file);
} H5E_END_TRY;
@@ -1205,11 +1205,11 @@ test_open_twice(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam)
TESTING("open extensible array twice");
/* Create array */
- if(create_array(f, H5P_DATASET_XFER_DEFAULT, cparam, &ea, &ea_addr, NULL) < 0)
+ if(create_array(f, H5AC_ind_read_dxpl_id, cparam, &ea, &ea_addr, NULL) < 0)
TEST_ERROR
/* Open the array again, through the first file handle */
- if(NULL == (ea2 = H5EA_open(f, H5P_DATASET_XFER_DEFAULT, ea_addr, NULL)))
+ if(NULL == (ea2 = H5EA_open(f, H5AC_ind_read_dxpl_id, ea_addr, NULL)))
FAIL_STACK_ERROR
/* Verify the creation parameters */
@@ -1219,12 +1219,12 @@ test_open_twice(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam)
TEST_ERROR
/* Close the second extensible array wrapper */
- if(H5EA_close(ea2, H5P_DATASET_XFER_DEFAULT) < 0)
+ if(H5EA_close(ea2, H5AC_ind_read_dxpl_id) < 0)
FAIL_STACK_ERROR
ea2 = NULL;
/* Check for closing & re-opening the file */
- if(reopen_file(&file, &f, fapl, H5P_DATASET_XFER_DEFAULT, &ea, ea_addr, tparam) < 0)
+ if(reopen_file(&file, &f, fapl, H5AC_ind_read_dxpl_id, &ea, ea_addr, tparam) < 0)
TEST_ERROR
/* Re-open the file */
@@ -1236,7 +1236,7 @@ test_open_twice(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam)
FAIL_STACK_ERROR
/* Open the extensible array through the second file handle */
- if(NULL == (ea2 = H5EA_open(f2, H5P_DATASET_XFER_DEFAULT, ea_addr, NULL)))
+ if(NULL == (ea2 = H5EA_open(f2, H5AC_ind_read_dxpl_id, ea_addr, NULL)))
FAIL_STACK_ERROR
/* Verify the creation parameters */
@@ -1244,7 +1244,7 @@ test_open_twice(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam)
TEST_ERROR
/* Close the first extensible array wrapper */
- if(H5EA_close(ea, H5P_DATASET_XFER_DEFAULT) < 0)
+ if(H5EA_close(ea, H5AC_ind_read_dxpl_id) < 0)
FAIL_STACK_ERROR
ea = NULL;
@@ -1267,9 +1267,9 @@ test_open_twice(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam)
error:
H5E_BEGIN_TRY {
if(ea)
- H5EA_close(ea, H5P_DATASET_XFER_DEFAULT);
+ H5EA_close(ea, H5AC_ind_read_dxpl_id);
if(ea2)
- H5EA_close(ea2, H5P_DATASET_XFER_DEFAULT);
+ H5EA_close(ea2, H5AC_ind_read_dxpl_id);
H5Fclose(file);
H5Fclose(file2);
} H5E_END_TRY;
@@ -1317,11 +1317,11 @@ test_open_twice_diff(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tpa
TESTING("open extensible array twice, through different file handles");
/* Create array */
- if(create_array(f, H5P_DATASET_XFER_DEFAULT, cparam, &ea, &ea_addr, NULL) < 0)
+ if(create_array(f, H5AC_ind_read_dxpl_id, cparam, &ea, &ea_addr, NULL) < 0)
TEST_ERROR
/* Open the array again, through the first file handle */
- if(NULL == (ea2 = H5EA_open(f, H5P_DATASET_XFER_DEFAULT, ea_addr, NULL)))
+ if(NULL == (ea2 = H5EA_open(f, H5AC_ind_read_dxpl_id, ea_addr, NULL)))
FAIL_STACK_ERROR
/* Verify the creation parameters */
@@ -1331,7 +1331,7 @@ test_open_twice_diff(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tpa
TEST_ERROR
/* Close the second extensible array wrapper */
- if(H5EA_close(ea2, H5P_DATASET_XFER_DEFAULT) < 0)
+ if(H5EA_close(ea2, H5AC_ind_read_dxpl_id) < 0)
FAIL_STACK_ERROR
ea2 = NULL;
@@ -1343,7 +1343,7 @@ test_open_twice_diff(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tpa
FAIL_STACK_ERROR
/* Check for closing & re-opening the file */
- if(reopen_file(&file, &f, fapl, H5P_DATASET_XFER_DEFAULT, &ea, ea_addr, tparam) < 0)
+ if(reopen_file(&file, &f, fapl, H5AC_ind_read_dxpl_id, &ea, ea_addr, tparam) < 0)
TEST_ERROR
/* Verify the creation parameters */
@@ -1351,7 +1351,7 @@ test_open_twice_diff(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tpa
TEST_ERROR
/* Close the first extensible array wrapper */
- if(H5EA_close(ea, H5P_DATASET_XFER_DEFAULT) < 0)
+ if(H5EA_close(ea, H5AC_ind_read_dxpl_id) < 0)
FAIL_STACK_ERROR
ea = NULL;
@@ -1382,7 +1382,7 @@ test_open_twice_diff(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tpa
FAIL_STACK_ERROR
/* Open the extensible array through the second file handle */
- if(NULL == (ea2 = H5EA_open(f2, H5P_DATASET_XFER_DEFAULT, ea_addr, NULL)))
+ if(NULL == (ea2 = H5EA_open(f2, H5AC_ind_read_dxpl_id, ea_addr, NULL)))
FAIL_STACK_ERROR
/* Verify the creation parameters */
@@ -1407,9 +1407,9 @@ test_open_twice_diff(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tpa
error:
H5E_BEGIN_TRY {
if(ea)
- H5EA_close(ea, H5P_DATASET_XFER_DEFAULT);
+ H5EA_close(ea, H5AC_ind_read_dxpl_id);
if(ea2)
- H5EA_close(ea2, H5P_DATASET_XFER_DEFAULT);
+ H5EA_close(ea2, H5AC_ind_read_dxpl_id);
H5Fclose(file);
H5Fclose(file2);
H5Fclose(file0);
@@ -1453,15 +1453,15 @@ test_delete_open(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam)
TESTING("deleting open extensible array");
/* Create array */
- if(create_array(f, H5P_DATASET_XFER_DEFAULT, cparam, &ea, &ea_addr, NULL) < 0)
+ if(create_array(f, H5AC_ind_read_dxpl_id, cparam, &ea, &ea_addr, NULL) < 0)
TEST_ERROR
/* Open the array again */
- if(NULL == (ea2 = H5EA_open(f, H5P_DATASET_XFER_DEFAULT, ea_addr, NULL)))
+ if(NULL == (ea2 = H5EA_open(f, H5AC_ind_read_dxpl_id, ea_addr, NULL)))
FAIL_STACK_ERROR
/* Request that the array be deleted */
- if(H5EA_delete(f, H5P_DATASET_XFER_DEFAULT, ea_addr, NULL) < 0)
+ if(H5EA_delete(f, H5AC_ind_read_dxpl_id, ea_addr, NULL) < 0)
FAIL_STACK_ERROR
/* Verify the creation parameters */
@@ -1471,38 +1471,38 @@ test_delete_open(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam)
TEST_ERROR
/* Close the second extensible array wrapper */
- if(H5EA_close(ea2, H5P_DATASET_XFER_DEFAULT) < 0)
+ if(H5EA_close(ea2, H5AC_ind_read_dxpl_id) < 0)
FAIL_STACK_ERROR
ea2 = NULL;
/* Try re-opening the array again (should fail, as array will be deleted) */
H5E_BEGIN_TRY {
- ea2 = H5EA_open(f, H5P_DATASET_XFER_DEFAULT, ea_addr, NULL);
+ ea2 = H5EA_open(f, H5AC_ind_read_dxpl_id, ea_addr, NULL);
} H5E_END_TRY;
if(ea2) {
/* Close opened array */
- H5EA_close(ea2, H5P_DATASET_XFER_DEFAULT);
+ H5EA_close(ea2, H5AC_ind_read_dxpl_id);
/* Indicate error */
TEST_ERROR
} /* end if */
/* Close the first extensible array wrapper */
- if(H5EA_close(ea, H5P_DATASET_XFER_DEFAULT) < 0)
+ if(H5EA_close(ea, H5AC_ind_read_dxpl_id) < 0)
FAIL_STACK_ERROR
ea = NULL;
/* Check for closing & re-opening the file */
- if(reopen_file(&file, &f, fapl, H5P_DATASET_XFER_DEFAULT, NULL, HADDR_UNDEF, tparam) < 0)
+ if(reopen_file(&file, &f, fapl, H5AC_ind_read_dxpl_id, NULL, HADDR_UNDEF, tparam) < 0)
TEST_ERROR
/* Try re-opening the array again (should fail, as array is now deleted) */
H5E_BEGIN_TRY {
- ea = H5EA_open(f, H5P_DATASET_XFER_DEFAULT, ea_addr, NULL);
+ ea = H5EA_open(f, H5AC_ind_read_dxpl_id, ea_addr, NULL);
} H5E_END_TRY;
if(ea) {
/* Close opened array */
- H5EA_close(ea, H5P_DATASET_XFER_DEFAULT);
+ H5EA_close(ea, H5AC_ind_read_dxpl_id);
/* Indicate error */
TEST_ERROR
@@ -1528,305 +1528,15 @@ test_delete_open(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam)
error:
H5E_BEGIN_TRY {
if(ea)
- H5EA_close(ea, H5P_DATASET_XFER_DEFAULT);
+ H5EA_close(ea, H5AC_ind_read_dxpl_id);
if(ea2)
- H5EA_close(ea2, H5P_DATASET_XFER_DEFAULT);
+ H5EA_close(ea2, H5AC_ind_read_dxpl_id);
H5Fclose(file);
} H5E_END_TRY;
return 1;
} /* test_delete_open() */
-
-/*-------------------------------------------------------------------------
- * Function: test_flush_depend_cb
- *
- * Purpose: Callback for flush dependency 'depend'/'undepend' and
- * 'support'/'unsupport' routines
- *
- * Return: Success: 0
- * Failure: 1
- *
- * Programmer: Quincey Koziol
- * Tuesday, May 26, 2009
- *
- *-------------------------------------------------------------------------
- */
-static herr_t
-test_flush_depend_cb(const void *_elmt, size_t nelmts, void *udata)
-{
- earray_flush_depend_ctx_t *ctx = (earray_flush_depend_ctx_t *)udata;
- const uint64_t *elmt = (const uint64_t *)_elmt; /* Convenience pointer to native elements */
-
- /* Check for out of order flush */
- if(ctx->base_obj)
- return(FAIL);
-
- /* Look for magic values */
- while(nelmts > 0) {
- /* Check for elements of interest */
- if((uint64_t)0 == *elmt) {
- /* Check for out-of-order flush */
- if(!ctx->idx0_obj)
- return(FAIL);
-
- /* Indicate that the element was flushed */
- ctx->idx0_elem = TRUE;
- } /* end if */
- else if((uint64_t)1 == *elmt) {
- /* Check for out-of-order flush */
- if(!ctx->idx1_obj)
- return(FAIL);
-
- /* Indicate that the element was flushed */
- ctx->idx1_elem = TRUE;
- } /* end if */
- else if((uint64_t)10000 == *elmt) {
- /* Check for out-of-order flush */
- if(!ctx->idx10000_obj)
- return(FAIL);
-
- /* Indicate that the element was flushed */
- ctx->idx10000_elem = TRUE;
- } /* end if */
-
- /* Decrement elements left to inspect */
- nelmts--;
- elmt++;
- } /* end while */
-
- return(SUCCEED);
-} /* end test_flush_depend_cb() */
-
-
-/*-------------------------------------------------------------------------
- * Function: test_flush_depend
- *
- * Purpose: Exercise flush dependency 'depend'/'undepend' routines
- *
- * Return: Success: 0
- * Failure: 1
- *
- * Programmer: Quincey Koziol
- * Thursday, May 21, 2009
- *
- *-------------------------------------------------------------------------
- */
-static unsigned
-test_flush_depend(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t H5_ATTR_UNUSED *tparam)
-{
- hid_t file = -1; /* File ID */
- H5F_t *f = NULL; /* Internal file object pointer */
- H5EA_t *ea = NULL; /* Extensible array wrapper */
- haddr_t ea_addr = HADDR_UNDEF; /* Array address in file */
- H5EA__ctx_cb_t cb; /* Extensible array context action info */
- earray_flush_depend_ctx_t fd_info; /* Context information for flush depend test */
- haddr_t base_addr; /* Base test entry address */
- earray_test_t *base_entry; /* Pointer to base test entry */
- haddr_t addr1; /* Test entry #1 address */
- earray_test_t *entry1; /* Pointer to test entry #1 */
- haddr_t addr2; /* Test entry #2 address */
- earray_test_t *entry2; /* Pointer to test entry #2 */
- haddr_t addr3; /* Test entry #3 address */
- earray_test_t *entry3; /* Pointer to test entry #3 */
- uint64_t welmt; /* Element to write */
- hsize_t idx; /* Index value of element */
-
- /* Create file & retrieve pointer to internal file object */
- if(create_file(H5F_ACC_TRUNC, fapl, &file, &f) < 0)
- TEST_ERROR
-
- /*
- * Display testing message
- */
- TESTING("flush dependencies on array metadata");
-
- /* Create array */
- cb.encode = test_flush_depend_cb;
- HDmemset(&fd_info, 0, sizeof(earray_flush_depend_ctx_t));
- cb.udata = &fd_info;
- if(create_array(f, H5P_DATASET_XFER_DEFAULT, cparam, &ea, &ea_addr, &cb) < 0)
- TEST_ERROR
-
- /* Verify the creation parameters */
- if(verify_cparam(ea, cparam) < 0)
- TEST_ERROR
-
- /* Create base entry to insert */
- if(NULL == (base_entry = (earray_test_t *)HDmalloc(sizeof(earray_test_t))))
- TEST_ERROR
- HDmemset(base_entry, 0, sizeof(earray_test_t));
- base_entry->idx = (uint64_t)-1;
- base_entry->fd_info = &fd_info;
-
- /* Insert test entry into cache */
- base_addr = HADDR_MAX;
- if(H5AC_insert_entry(f, H5P_DATASET_XFER_DEFAULT, H5AC_EARRAY_TEST, base_addr, base_entry, H5AC__PIN_ENTRY_FLAG) < 0)
- TEST_ERROR
-
- /* Set the base entry as a flush dependency for the array */
- if(H5EA_depend((H5AC_info_t *)base_entry, ea) < 0)
- TEST_ERROR
-
- /* Create entry #1 to insert */
- if(NULL == (entry1 = (earray_test_t *)HDmalloc(sizeof(earray_test_t))))
- TEST_ERROR
- HDmemset(entry1, 0, sizeof(earray_test_t));
- entry1->fd_info = &fd_info;
-
- /* Insert test entry into cache */
- addr1 = HADDR_MAX - 1;
- if(H5AC_insert_entry(f, H5P_DATASET_XFER_DEFAULT, H5AC_EARRAY_TEST, addr1, entry1, H5AC__PIN_ENTRY_FLAG) < 0)
- TEST_ERROR
-
- /* Set the test entry as a flush dependency for 0th index in the array */
- if(H5EA_support(ea, H5P_DATASET_XFER_DEFAULT, (hsize_t)0, (H5AC_info_t *)entry1) < 0)
- TEST_ERROR
-
- /* Set element of array */
- welmt = (uint64_t)0;
- idx = 0;
- if(H5EA_set(ea, H5P_DATASET_XFER_DEFAULT, idx, &welmt) < 0)
- FAIL_STACK_ERROR
-
- /* Create entry #2 to insert */
- if(NULL == (entry2 = (earray_test_t *)HDmalloc(sizeof(earray_test_t))))
- TEST_ERROR
- HDmemset(entry2, 0, sizeof(earray_test_t));
- entry2->idx = (uint64_t)1;
- entry2->fd_info = &fd_info;
-
- /* Insert test entry into cache */
- addr2 = HADDR_MAX - 2;
- if(H5AC_insert_entry(f, H5P_DATASET_XFER_DEFAULT, H5AC_EARRAY_TEST, addr2, entry2, H5AC__PIN_ENTRY_FLAG) < 0)
- TEST_ERROR
-
- /* Set the test entry as a flush dependency for 1st index in the array */
- if(H5EA_support(ea, H5P_DATASET_XFER_DEFAULT, (hsize_t)1, (H5AC_info_t *)entry2) < 0)
- TEST_ERROR
-
- /* Set element of array */
- welmt = (uint64_t)1;
- idx = 1;
- if(H5EA_set(ea, H5P_DATASET_XFER_DEFAULT, idx, &welmt) < 0)
- FAIL_STACK_ERROR
-
- /* Create entry #3 to insert */
- if(NULL == (entry3 = (earray_test_t *)HDmalloc(sizeof(earray_test_t))))
- TEST_ERROR
- HDmemset(entry3, 0, sizeof(earray_test_t));
- entry3->idx = (uint64_t)10000;
- entry3->fd_info = &fd_info;
-
- /* Insert test entry into cache */
- addr3 = HADDR_MAX - 3;
- if(H5AC_insert_entry(f, H5P_DATASET_XFER_DEFAULT, H5AC_EARRAY_TEST, addr3, entry3, H5AC__PIN_ENTRY_FLAG) < 0)
- TEST_ERROR
-
- /* Set the test entry as a flush dependency for 10,000th index in the array */
- if(H5EA_support(ea, H5P_DATASET_XFER_DEFAULT, (hsize_t)10000, (H5AC_info_t *)entry3) < 0)
- TEST_ERROR
-
- /* Set element of array */
- welmt = (uint64_t)10000;
- idx = 10000;
- if(H5EA_set(ea, H5P_DATASET_XFER_DEFAULT, idx, &welmt) < 0)
- FAIL_STACK_ERROR
-
-
- /* Flush the cache */
- if(H5Fflush(file, H5F_SCOPE_GLOBAL) < 0)
- TEST_ERROR
-
- /* Check that all callback flags have been set */
- if(!fd_info.base_obj)
- TEST_ERROR
- if(!fd_info.idx0_obj)
- TEST_ERROR
- if(!fd_info.idx0_elem)
- TEST_ERROR
- if(!fd_info.idx1_obj)
- TEST_ERROR
- if(!fd_info.idx1_elem)
- TEST_ERROR
- if(!fd_info.idx10000_obj)
- TEST_ERROR
- if(!fd_info.idx10000_elem)
- TEST_ERROR
-
-
- /* Remove the base entry as a flush dependency for the array */
- if(H5EA_undepend((H5AC_info_t *)base_entry, ea) < 0)
- TEST_ERROR
-
- /* Protect the base entry */
- if(NULL == (base_entry = (earray_test_t *)H5AC_protect(f, H5P_DATASET_XFER_DEFAULT, H5AC_EARRAY_TEST, base_addr, NULL, H5AC__NO_FLAGS_SET)))
- TEST_ERROR
-
- /* Unprotect & unpin the base entry */
- if(H5AC_unprotect(f, H5P_DATASET_XFER_DEFAULT, H5AC_EARRAY_TEST, base_addr, base_entry, (H5AC__UNPIN_ENTRY_FLAG | H5AC__DELETED_FLAG)) < 0)
- TEST_ERROR
-
- /* Remove the test entry as a flush dependency for 0th index in the array */
- if(H5EA_unsupport(ea, H5P_DATASET_XFER_DEFAULT, (hsize_t)0, (H5AC_info_t *)entry1) < 0)
- TEST_ERROR
-
- /* Protect the test entry */
- if(NULL == (entry1 = (earray_test_t *)H5AC_protect(f, H5P_DATASET_XFER_DEFAULT, H5AC_EARRAY_TEST, addr1, NULL, H5AC__NO_FLAGS_SET)))
- TEST_ERROR
-
- /* Unprotect & unpin the test entry */
- if(H5AC_unprotect(f, H5P_DATASET_XFER_DEFAULT, H5AC_EARRAY_TEST, addr1, entry1, (H5AC__UNPIN_ENTRY_FLAG | H5AC__DELETED_FLAG)) < 0)
- TEST_ERROR
-
- /* Remove the test entry as a flush dependency for 1st index in the array */
- if(H5EA_unsupport(ea, H5P_DATASET_XFER_DEFAULT, (hsize_t)1, (H5AC_info_t *)entry2) < 0)
- TEST_ERROR
-
- /* Protect the test entry */
- if(NULL == (entry2 = (earray_test_t *)H5AC_protect(f, H5P_DATASET_XFER_DEFAULT, H5AC_EARRAY_TEST, addr2, NULL, H5AC__NO_FLAGS_SET)))
- TEST_ERROR
-
- /* Unprotect & unpin the test entry */
- if(H5AC_unprotect(f, H5P_DATASET_XFER_DEFAULT, H5AC_EARRAY_TEST, addr2, entry2, (H5AC__UNPIN_ENTRY_FLAG | H5AC__DELETED_FLAG)) < 0)
- TEST_ERROR
-
- /* Remove the test entry as a flush dependency for 10,000th index in the array */
- if(H5EA_unsupport(ea, H5P_DATASET_XFER_DEFAULT, (hsize_t)10000, (H5AC_info_t *)entry3) < 0)
- TEST_ERROR
-
- /* Protect the test entry */
- if(NULL == (entry3 = (earray_test_t *)H5AC_protect(f, H5P_DATASET_XFER_DEFAULT, H5AC_EARRAY_TEST, addr3, NULL, H5AC__NO_FLAGS_SET)))
- TEST_ERROR
-
- /* Unprotect & unpin the test entry */
- if(H5AC_unprotect(f, H5P_DATASET_XFER_DEFAULT, H5AC_EARRAY_TEST, addr3, entry3, (H5AC__UNPIN_ENTRY_FLAG | H5AC__DELETED_FLAG)) < 0)
- TEST_ERROR
-
- /* Close the extensible array */
- if(H5EA_close(ea, H5P_DATASET_XFER_DEFAULT) < 0)
- FAIL_STACK_ERROR
- ea = NULL;
-
- /* Close the file */
- if(H5Fclose(file) < 0)
- FAIL_STACK_ERROR
-
- /* All tests passed */
- PASSED()
-
- return 0;
-
-error:
- H5E_BEGIN_TRY {
- if(ea)
- H5EA_close(ea, H5P_DATASET_XFER_DEFAULT);
- H5Fclose(file);
- } H5E_END_TRY;
-
- return 1;
-} /* test_flush_depend() */
-
/* Extensible array iterator info for forward iteration */
typedef struct eiter_fw_t {
hsize_t idx; /* Index of next array location */
@@ -2691,7 +2401,7 @@ test_set_elmts(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam,
TEST_ERROR
/* Create array */
- if(create_array(f, H5P_DATASET_XFER_DEFAULT, cparam, &ea, &ea_addr, NULL) < 0)
+ if(create_array(f, H5AC_ind_read_dxpl_id, cparam, &ea, &ea_addr, NULL) < 0)
TEST_ERROR
/* Verify the creation parameters */
@@ -2699,7 +2409,7 @@ test_set_elmts(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam,
TEST_ERROR
/* Check for closing & re-opening the file */
- if(reopen_file(&file, &f, fapl, H5P_DATASET_XFER_DEFAULT, &ea, ea_addr, tparam) < 0)
+ if(reopen_file(&file, &f, fapl, H5AC_ind_read_dxpl_id, &ea, ea_addr, tparam) < 0)
TEST_ERROR
/* Verify high-water # of elements written */
@@ -2730,7 +2440,7 @@ test_set_elmts(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam,
/* Retrieve element of array (not set yet) */
relmt = (uint64_t)0;
- if(H5EA_get(ea, H5P_DATASET_XFER_DEFAULT, idx, &relmt) < 0)
+ if(H5EA_get(ea, H5AC_ind_read_dxpl_id, idx, &relmt) < 0)
FAIL_STACK_ERROR
/* Verify element is fill value for array */
@@ -2758,7 +2468,7 @@ test_set_elmts(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam,
/* Retrieve element of array (not set yet) */
relmt = (uint64_t)0;
- if(H5EA_get(ea, H5P_DATASET_XFER_DEFAULT, idx, &relmt) < 0)
+ if(H5EA_get(ea, H5AC_ind_read_dxpl_id, idx, &relmt) < 0)
FAIL_STACK_ERROR
/* Verify element is fill value for array */
@@ -2767,7 +2477,7 @@ test_set_elmts(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam,
/* Set element of array */
welmt = (uint64_t)7 + idx;
- if(H5EA_set(ea, H5P_DATASET_XFER_DEFAULT, idx, &welmt) < 0)
+ if(H5EA_set(ea, H5AC_ind_read_dxpl_id, idx, &welmt) < 0)
FAIL_STACK_ERROR
/* Get the max. array index */
@@ -2795,7 +2505,7 @@ test_set_elmts(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam,
/* Retrieve element of array (set now) */
relmt = (uint64_t)0;
- if(H5EA_get(ea, H5P_DATASET_XFER_DEFAULT, idx, &relmt) < 0)
+ if(H5EA_get(ea, H5AC_ind_read_dxpl_id, idx, &relmt) < 0)
FAIL_STACK_ERROR
/* Verify element is value written */
@@ -2819,7 +2529,7 @@ test_set_elmts(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam,
error:
H5E_BEGIN_TRY {
if(ea)
- H5EA_close(ea, H5P_DATASET_XFER_DEFAULT);
+ H5EA_close(ea, H5AC_ind_read_dxpl_id);
H5Fclose(file);
} H5E_END_TRY;
@@ -2865,7 +2575,7 @@ test_skip_elmts(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam,
TEST_ERROR
/* Create array */
- if(create_array(f, H5P_DATASET_XFER_DEFAULT, cparam, &ea, &ea_addr, NULL) < 0)
+ if(create_array(f, H5AC_ind_read_dxpl_id, cparam, &ea, &ea_addr, NULL) < 0)
TEST_ERROR
/* Verify the creation parameters */
@@ -2873,7 +2583,7 @@ test_skip_elmts(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam,
TEST_ERROR
/* Check for closing & re-opening the file */
- if(reopen_file(&file, &f, fapl, H5P_DATASET_XFER_DEFAULT, &ea, ea_addr, tparam) < 0)
+ if(reopen_file(&file, &f, fapl, H5AC_ind_read_dxpl_id, &ea, ea_addr, tparam) < 0)
TEST_ERROR
/* Verify high-water # of elements written */
@@ -2894,7 +2604,7 @@ test_skip_elmts(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam,
/* Retrieve element of array (not set yet) */
relmt = (uint64_t)0;
- if(H5EA_get(ea, H5P_DATASET_XFER_DEFAULT, idx, &relmt) < 0)
+ if(H5EA_get(ea, H5AC_ind_read_dxpl_id, idx, &relmt) < 0)
FAIL_STACK_ERROR
/* Verify element is fill value for array */
@@ -2903,7 +2613,7 @@ test_skip_elmts(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam,
/* Set element of array */
welmt = (uint64_t)7 + idx;
- if(H5EA_set(ea, H5P_DATASET_XFER_DEFAULT, idx, &welmt) < 0)
+ if(H5EA_set(ea, H5AC_ind_read_dxpl_id, idx, &welmt) < 0)
FAIL_STACK_ERROR
/* Verify high-water # of elements written */
@@ -2945,7 +2655,7 @@ test_skip_elmts(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam,
/* Retrieve element of array (set now) */
relmt = (uint64_t)0;
- if(H5EA_get(ea, H5P_DATASET_XFER_DEFAULT, idx, &relmt) < 0)
+ if(H5EA_get(ea, H5AC_ind_read_dxpl_id, idx, &relmt) < 0)
FAIL_STACK_ERROR
/* Verify element is value written */
@@ -2956,7 +2666,7 @@ test_skip_elmts(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam,
for(cnt = 0; cnt < skip_elmts; cnt++) {
/* Retrieve element of array (not set yet) */
relmt = (uint64_t)0;
- if(H5EA_get(ea, H5P_DATASET_XFER_DEFAULT, cnt, &relmt) < 0)
+ if(H5EA_get(ea, H5AC_ind_read_dxpl_id, cnt, &relmt) < 0)
FAIL_STACK_ERROR
/* Verify element is fill value for array */
@@ -2976,7 +2686,7 @@ test_skip_elmts(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam,
error:
H5E_BEGIN_TRY {
if(ea)
- H5EA_close(ea, H5P_DATASET_XFER_DEFAULT);
+ H5EA_close(ea, H5AC_ind_read_dxpl_id);
H5Fclose(file);
} H5E_END_TRY;
@@ -3074,7 +2784,6 @@ main(void)
nerrors += test_open_twice(fapl, &cparam, &tparam);
nerrors += test_open_twice_diff(fapl, &cparam, &tparam);
nerrors += test_delete_open(fapl, &cparam, &tparam);
- nerrors += test_flush_depend(fapl, &cparam, &tparam);
/* Iterate over the type of capacity tests */
for(curr_iter = EARRAY_ITER_FW; curr_iter < EARRAY_ITER_NITERS; H5_INC_ENUM(earray_iter_type_t, curr_iter)) {
@@ -3168,7 +2877,7 @@ main(void)
if(nerrors)
goto error;
- puts("All extensible array tests passed.");
+ HDputs("All extensible array tests passed.");
/* Clean up file used */
h5_cleanup(FILENAME, fapl);
@@ -3176,10 +2885,10 @@ main(void)
return 0;
error:
- puts("*** TESTS FAILED ***");
+ HDputs("*** TESTS FAILED ***");
H5E_BEGIN_TRY {
- H5Pclose(fapl);
+ H5Pclose(fapl);
} H5E_END_TRY;
return 1;
diff --git a/test/efc.c b/test/efc.c
index a8d77e0..6a7c8d8 100644
--- a/test/efc.c
+++ b/test/efc.c
@@ -3171,7 +3171,7 @@ main(void)
/* Create property lists */
fcpl_id = H5Pcreate(H5P_FILE_CREATE);
fapl_id = h5_fileaccess();
- dxpl_id = H5Pcreate(H5P_DATASET_XFER);
+ dxpl_id = H5AC_ind_read_dxpl_id;
/* Patch filenames */
h5_fixname(FILENAME[0], fapl_id, filename[0], sizeof(filename[0]));
@@ -3187,8 +3187,6 @@ main(void)
nerrors += test_graph_cycle();
/* Close property lists */
- if(H5Pclose(dxpl_id) < 0)
- TEST_ERROR
if(H5Pclose(fcpl_id) < 0)
TEST_ERROR
diff --git a/test/error_test.c b/test/error_test.c
index 4e4c0ef..ee181b1 100644
--- a/test/error_test.c
+++ b/test/error_test.c
@@ -498,7 +498,7 @@ test_create(void)
if(err_num != 0) TEST_ERROR
/* Push an error with a long description */
- if(H5Epush(estack_id, __FILE__, err_func, __LINE__, ERR_CLS, ERR_MAJ_TEST, ERR_MIN_SUBROUTINE, err_msg) < 0) TEST_ERROR;
+ if(H5Epush(estack_id, __FILE__, err_func, __LINE__, ERR_CLS, ERR_MAJ_TEST, ERR_MIN_SUBROUTINE, "%s", err_msg) < 0) TEST_ERROR;
/* Check the number of errors on stack */
err_num = H5Eget_num(estack_id);
@@ -543,7 +543,7 @@ test_copy(void)
herr_t ret; /* Generic return value */
/* Push an error with a long description */
- if(H5Epush(H5E_DEFAULT, __FILE__, err_func, __LINE__, ERR_CLS, ERR_MAJ_TEST, ERR_MIN_SUBROUTINE, err_msg) < 0) TEST_ERROR;
+ if(H5Epush(H5E_DEFAULT, __FILE__, err_func, __LINE__, ERR_CLS, ERR_MAJ_TEST, ERR_MIN_SUBROUTINE, "%s", err_msg) < 0) TEST_ERROR;
/* Check the number of errors on stack */
err_num = H5Eget_num(H5E_DEFAULT);
diff --git a/test/external.c b/test/external.c
index cbc9fc6..35207bd 100644
--- a/test/external.c
+++ b/test/external.c
@@ -20,974 +20,1616 @@
* Purpose: Tests datasets stored in external raw files.
*/
#include "h5test.h"
-#include "H5srcdir.h"
-
-/* File for external link test. Created with gen_udlinks.c */
-#define LINKED_FILE "be_extlink2.h5"
const char *FILENAME[] = {
"extern_1",
"extern_2",
"extern_3",
"extern_4",
+ "extern_dir/file_1",
+ "extern_5",
NULL
};
+/* A similar collection of files is used for the tests that
+ * perform file I/O.
+ */
+#define N_EXT_FILES 4
+#define PART_SIZE 25
+#define TOTAL_SIZE 100
+#define GARBAGE_PER_FILE 10
+
/*-------------------------------------------------------------------------
- * Function: same_contents
+ * Function: files_have_same_contents
*
- * Purpose: Determines whether two files are exactly the same.
+ * Purpose: Determines whether two files contain the same data.
*
- * Return: Success: nonzero if same, zero if different.
+ * Return: Success: nonzero if same, zero if different.
+ * Failure: zero
*
- * Failure: zero
- *
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, March 4, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
-static int
-same_contents (const char *name1, const char *name2)
+static hbool_t
+files_have_same_contents(const char *name1, const char *name2)
{
- int fd1, fd2;
+ int fd1 = 0, fd2 = 0;
ssize_t n1, n2;
char buf1[1024], buf2[1024];
+ hbool_t ret = FALSE; /* not equal until proven otherwise */
- fd1 = HDopen(name1, O_RDONLY, 0666);
- fd2 = HDopen(name2, O_RDONLY, 0666);
- assert(fd1 >= 0 && fd2 >= 0);
+ if((fd1 = HDopen(name1, O_RDONLY, 0666)) < 0)
+ goto out;
+ if((fd2 = HDopen(name2, O_RDONLY, 0666)) < 0)
+ goto out;
+ /* Loop until files are empty or we encounter a problem */
while(1) {
- /* Asserts will catch negative return values */
+ HDmemset(buf1, 0, sizeof(buf1));
+ HDmemset(buf2, 0, sizeof(buf2));
+
n1 = HDread(fd1, buf1, sizeof(buf1));
+ if(n1 < 0 || (size_t)n1 > sizeof(buf1))
+ break;
n2 = HDread(fd2, buf2, sizeof(buf2));
- assert(n1 >= 0 && (size_t)n1 <= sizeof(buf1));
- assert(n2 >= 0 && (size_t)n2 <= sizeof(buf2));
- assert(n1 == n2);
+ if(n2 < 0 || (size_t)n2 > sizeof(buf2))
+ break;
+
+ if(n1 != n2)
+ break;
- if(n1 == 0 && n2 == 0)
+ if(n1 == 0 && n2 == 0) {
+ ret = TRUE;
break;
- if(HDmemcmp(buf1, buf2, (size_t)n1)) {
- HDclose(fd1);
- HDclose(fd2);
- return 0;
}
- }
- HDclose(fd1);
- HDclose(fd2);
- return 1;
-}
+
+ if(HDmemcmp(buf1, buf2, (size_t)n1))
+ break;
+
+ } /* end while */
+
+out:
+ if(fd1)
+ HDclose(fd1);
+ if(fd2)
+ HDclose(fd2);
+ return ret;
+} /* end files_have_same_contents() */
/*-------------------------------------------------------------------------
- * Function: test_1a
+ * Function: reset_raw_data_files
*
- * Purpose: Tests a non-extendible dataset with a single external file.
+ * Purpose: Resets the data in the raw data files for tests that
+ * perform dataset I/O on a set of files.
*
- * Return: Success: 0
+ * Return: SUCCEED/FAIL
*
- * Failure: number of errors
+ * Programmer: Dana Robinson
+ * February 2016
*
- * Programmer: Robb Matzke
- * Monday, November 23, 1998
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+reset_raw_data_files(void)
+{
+ int fd = 0; /* external file descriptor */
+ size_t i, j; /* iterators */
+ hssize_t n; /* bytes of I/O */
+ char filename[1024]; /* file name */
+ int data[PART_SIZE]; /* raw data buffer */
+ uint8_t *garbage = NULL; /* buffer of garbage data */
+ size_t garbage_count; /* size of garbage buffer */
+ size_t garbage_bytes; /* # of garbage bytes written to file */
+
+ /* Set up garbage buffer */
+ garbage_count = N_EXT_FILES * GARBAGE_PER_FILE;
+ if(NULL == (garbage = (uint8_t *)HDcalloc(garbage_count, sizeof(uint8_t))))
+ goto error;
+ for(i = 0; i < garbage_count; i++)
+ garbage[i] = 0xFF;
+
+ /* The *r files are pre-filled with data and are used to
+ * verify that read operations work correctly.
+ */
+ for(i = 0; i < N_EXT_FILES; i++) {
+
+ /* Open file */
+ HDsprintf(filename, "extern_%lur.raw", (unsigned long)i + 1);
+ if((fd = HDopen(filename, O_RDWR|O_CREAT|O_TRUNC, 0666)) < 0)
+ goto error;
+
+ /* Write garbage data to the file. This allows us to test the
+ * the ability to set an offset in the raw data file.
+ */
+ garbage_bytes = i * 10;
+ n = HDwrite(fd, garbage, garbage_bytes);
+ if(n < 0 || (size_t)n != garbage_bytes)
+ goto error;
+
+ /* Fill array with data */
+ for(j = 0; j < PART_SIZE; j++) {
+ data[j] = (int)(i * 25 + j);
+ } /* end for */
+
+ /* Write raw data to the file. */
+ n = HDwrite(fd, data, sizeof(data));
+ if(n != sizeof(data))
+ goto error;
+
+ /* Close this file */
+ HDclose(fd);
+
+ } /* end for */
+
+ /* The *w files are only pre-filled with the garbage data and are
+ * used to verify that write operations work correctly. The individual
+ * tests fill in the actual data.
+ */
+ for(i = 0; i < N_EXT_FILES; i++) {
+
+ /* Open file */
+ HDsprintf(filename, "extern_%luw.raw", (unsigned long)i + 1);
+ if((fd = HDopen(filename, O_RDWR|O_CREAT|O_TRUNC, 0666)) < 0)
+ goto error;
+
+ /* Write garbage data to the file. This allows us to test the
+ * the ability to set an offset in the raw data file.
+ */
+ garbage_bytes = i * 10;
+ n = HDwrite(fd, garbage, garbage_bytes);
+ if(n < 0 || (size_t)n != garbage_bytes)
+ goto error;
+
+ /* Close this file */
+ HDclose(fd);
+
+ } /* end for */
+ HDfree(garbage);
+ return SUCCEED;
+
+error:
+ if(fd)
+ HDclose(fd);
+ if(garbage)
+ HDfree(garbage);
+ return FAIL;
+} /* end reset_raw_data_files() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: test_non_extendible
+ *
+ * Purpose: Tests a non-extendible dataset with a single external file.
*
- * Modifications:
+ * Return: Success: 0
+ * Failure: 1
+ *
+ * Programmer: Robb Matzke
+ * Monday, November 23, 1998
*
*-------------------------------------------------------------------------
*/
static int
-test_1a(hid_t file)
+test_non_extendible(hid_t file)
{
- hid_t dcpl=-1; /*dataset creation properties */
- hid_t space=-1; /*data space */
- hid_t dset=-1; /*dataset */
- hsize_t cur_size[1]; /*data space current size */
- hsize_t max_size[1]; /*data space maximum size */
- int n; /*number of external files */
- char name[256]; /*external file name */
- off_t file_offset; /*external file offset */
- hsize_t file_size; /*sizeof external file segment */
- haddr_t dset_addr; /*address of dataset */
+ hid_t dcpl = -1; /* dataset creation properties */
+ hid_t space = -1; /* data space */
+ hid_t dset = -1; /* dataset */
+ hsize_t cur_size[1]; /* data space current size */
+ hsize_t max_size[1]; /* data space maximum size */
+ int n; /* number of external files */
+ char name[256]; /* external file name */
+ off_t file_offset; /* external file offset */
+ hsize_t file_size; /* sizeof external file segment */
+ haddr_t dset_addr; /* address of dataset */
TESTING("fixed-size data space, exact storage");
/* Create the dataset */
- if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) goto error;
+ if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ FAIL_STACK_ERROR
cur_size[0] = max_size[0] = 100;
- if(H5Pset_external(dcpl, "ext1.data", (off_t)0,
- (hsize_t)(max_size[0] * sizeof(int))) < 0) goto error;
- if((space = H5Screate_simple(1, cur_size, max_size)) < 0) goto error;
+ if(H5Pset_external(dcpl, "ext1.data", (off_t)0, (hsize_t)(max_size[0] * sizeof(int))) < 0)
+ FAIL_STACK_ERROR
+ if((space = H5Screate_simple(1, cur_size, max_size)) < 0)
+ FAIL_STACK_ERROR
if((dset = H5Dcreate2(file, "dset1", H5T_NATIVE_INT, space, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
- goto error;
- if(H5Dclose(dset) < 0) goto error;
- if(H5Sclose(space) < 0) goto error;
- if(H5Pclose(dcpl) < 0) goto error;
+ FAIL_STACK_ERROR
+ if(H5Dclose(dset) < 0)
+ FAIL_STACK_ERROR
+ if(H5Sclose(space) < 0)
+ FAIL_STACK_ERROR
+ if(H5Pclose(dcpl) < 0)
+ FAIL_STACK_ERROR
/* Read dataset creation information */
- if((dset = H5Dopen2(file, "dset1", H5P_DEFAULT)) < 0) goto error;
+ if((dset = H5Dopen2(file, "dset1", H5P_DEFAULT)) < 0)
+ FAIL_STACK_ERROR
/* Test dataset address. Should be undefined. */
H5E_BEGIN_TRY {
dset_addr = H5Dget_offset(dset);
} H5E_END_TRY;
- if(dset_addr != HADDR_UNDEF) goto error;
-
- if((dcpl = H5Dget_create_plist(dset)) < 0) goto error;
- if((n = H5Pget_external_count(dcpl)) < 0) goto error;
+ if(dset_addr != HADDR_UNDEF)
+ FAIL_STACK_ERROR
+
+ /* Check external count */
+ if((dcpl = H5Dget_create_plist(dset)) < 0)
+ FAIL_STACK_ERROR
+ if((n = H5Pget_external_count(dcpl)) < 0)
+ FAIL_STACK_ERROR
if(1 != n) {
- H5_FAILED();
- puts(" Returned external count is wrong.");
- printf(" got: %d\n ans: 1\n", n);
- goto error;
- }
+ H5_FAILED();
+ HDputs(" Returned external count is wrong.");
+ printf(" got: %d\n ans: 1\n", n);
+ goto error;
+ } /* end if */
+
HDstrcpy(name + sizeof(name) - 4, "...");
- if(H5Pget_external(dcpl, 0, sizeof(name) - 4, name, &file_offset,
- &file_size) < 0) goto error;
+ if(H5Pget_external(dcpl, 0, sizeof(name) - 4, name, &file_offset, &file_size) < 0)
+ FAIL_STACK_ERROR
+
+ /* Check file offset */
if(file_offset != 0) {
- H5_FAILED();
- puts(" Wrong file offset.");
- printf(" got: %lu\n ans: 0\n", (unsigned long)file_offset);
- goto error;
- }
+ H5_FAILED();
+ HDputs(" Wrong file offset.");
+ printf(" got: %lu\n ans: 0\n", (unsigned long)file_offset);
+ goto error;
+ } /* end if */
+
+ /* Check file size */
if(file_size != (max_size[0] * sizeof(int))) {
- H5_FAILED();
- puts(" Wrong file size.");
- printf(" got: %lu\n ans: %lu\n", (unsigned long)file_size,
- (unsigned long)max_size[0]*sizeof(int));
- goto error;
- }
- if (H5Pclose (dcpl) < 0) goto error;
- if (H5Dclose (dset) < 0) goto error;
+ H5_FAILED();
+ HDputs(" Wrong file size.");
+ printf(" got: %lu\n ans: %lu\n", (unsigned long)file_size, (unsigned long)max_size[0]*sizeof(int));
+ goto error;
+ } /* end if */
+
+ /* Done (dataspace was previously closed) */
+ if(H5Pclose(dcpl) < 0) FAIL_STACK_ERROR
+ if(H5Dclose(dset) < 0) FAIL_STACK_ERROR
PASSED();
return 0;
+
error:
H5E_BEGIN_TRY {
- H5Pclose(dcpl);
- H5Sclose(space);
- H5Dclose(dset);
+ H5Pclose(dcpl);
+ H5Sclose(space);
+ H5Dclose(dset);
} H5E_END_TRY;
return 1;
-}
+} /* end test_non_extendible() */
/*-------------------------------------------------------------------------
- * Function: test_1b
- *
- * Purpose: Test a single external file which is too small to represent
- * all the data.
+ * Function: test_too_small
*
- * Return: Success: 0
+ * Purpose: Test a single external file which is too small to represent
+ * all the data.
*
- * Failure: number of errors
+ * Return: Success: 0
+ * Failure: 1
*
* Programmer: Robb Matzke
* Monday, November 23, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
-test_1b(hid_t file)
+test_too_small(hid_t file)
{
- hid_t dcpl = -1; /*dataset creation properties */
- hid_t space = -1; /*data space */
- hid_t dset = -1; /*dataset */
- hsize_t cur_size[1]; /*current data space size */
- hsize_t max_size[1]; /*maximum data space size */
+ hid_t dcpl = -1; /* dataset creation properties */
+ hid_t space = -1; /* data space */
+ hid_t dset = -1; /* dataset */
+ hsize_t cur_size[1]; /* current data space size */
+ hsize_t max_size[1]; /* maximum data space size */
TESTING("external storage is too small");
- if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) goto error;
+
+ if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ FAIL_STACK_ERROR
cur_size[0] = max_size[0] = 100;
- if(H5Pset_external(dcpl, "ext1.data", (off_t)0,
- (hsize_t)(max_size[0] * sizeof(int) - 1)) < 0) goto error;
- if((space = H5Screate_simple(1, cur_size, max_size)) < 0) goto error;
+ if(H5Pset_external(dcpl, "ext1.data", (off_t)0, (hsize_t)(max_size[0] * sizeof(int) - 1)) < 0)
+ FAIL_STACK_ERROR
+ if((space = H5Screate_simple(1, cur_size, max_size)) < 0)
+ FAIL_STACK_ERROR
+
H5E_BEGIN_TRY {
- dset = H5Dcreate2(file, "dset2", H5T_NATIVE_INT, space, H5P_DEFAULT, dcpl, H5P_DEFAULT);
+ dset = H5Dcreate2(file, "dset2", H5T_NATIVE_INT, space, H5P_DEFAULT, dcpl, H5P_DEFAULT);
} H5E_END_TRY;
- if(dset >= 0) {
- H5_FAILED();
- puts(" Small external file succeeded instead of failing.");
- goto error;
- }
- if(H5Sclose(space) < 0) goto error;
- if(H5Pclose(dcpl) < 0) goto error;
+ if(dset >= 0)
+ FAIL_PUTS_ERROR(" Small external file succeeded instead of failing.");
+ if(H5Sclose(space) < 0)
+ FAIL_STACK_ERROR
+ if(H5Pclose(dcpl) < 0)
+ FAIL_STACK_ERROR
PASSED();
return 0;
error:
H5E_BEGIN_TRY {
- H5Sclose(space);
- H5Pclose(dcpl);
- H5Dclose(dset);
+ H5Sclose(space);
+ H5Pclose(dcpl);
+ H5Dclose(dset);
} H5E_END_TRY;
return 1;
-}
+} /* end test_too_small() */
/*-------------------------------------------------------------------------
- * Function: test_1c
- *
- * Purpose: Test a single external file which is large enough to
- * represent the current data and large enough to represent the
- * eventual size of the data.
+ * Function: test_large_enough_current_eventual
*
- * Return: Success: 0
+ * Purpose: Test a single external file which is large enough to
+ * represent the current data and large enough to represent the
+ * eventual size of the data.
*
- * Failure: number of errors
+ * Return: Success: 0
+ * Failure: 1
*
* Programmer: Robb Matzke
* Monday, November 23, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
-test_1c(hid_t file)
+test_large_enough_current_eventual(hid_t file)
{
- hid_t dcpl=-1; /*dataset creation properties */
- hid_t space=-1; /*data space */
- hid_t dset=-1; /*dataset */
- hsize_t cur_size[1]; /*current data space size */
- hsize_t max_size[1]; /*maximum data space size */
+ hid_t dcpl = -1; /* dataset creation properties */
+ hid_t space = -1; /* data space */
+ hid_t dset = -1; /* dataset */
+ hsize_t cur_size[1]; /* current data space size */
+ hsize_t max_size[1]; /* maximum data space size */
TESTING("extendible dataspace, exact external size");
- if((dcpl = H5Pcreate (H5P_DATASET_CREATE)) < 0) goto error;
+ if((dcpl = H5Pcreate (H5P_DATASET_CREATE)) < 0)
+ FAIL_STACK_ERROR
cur_size[0] = 100;
max_size[0] = 200;
- if(H5Pset_external(dcpl, "ext1.data", (off_t)0,
- (hsize_t)(max_size[0] * sizeof(int))) < 0) goto error;
- if((space = H5Screate_simple(1, cur_size, max_size)) < 0) goto error;
+ if(H5Pset_external(dcpl, "ext1.data", (off_t)0, (hsize_t)(max_size[0] * sizeof(int))) < 0)
+ FAIL_STACK_ERROR
+ if((space = H5Screate_simple(1, cur_size, max_size)) < 0)
+ FAIL_STACK_ERROR
if((dset = H5Dcreate2(file, "dset3", H5T_NATIVE_INT, space, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
- goto error;
- if(H5Dclose(dset) < 0) goto error;
- if(H5Sclose(space) < 0) goto error;
- if(H5Pclose(dcpl) < 0) goto error;
+ FAIL_STACK_ERROR
+
+ if(H5Dclose(dset) < 0) FAIL_STACK_ERROR
+ if(H5Sclose(space) < 0) FAIL_STACK_ERROR
+ if(H5Pclose(dcpl) < 0) FAIL_STACK_ERROR
PASSED();
return 0;
error:
H5E_BEGIN_TRY {
- H5Dclose(dset);
- H5Pclose(dcpl);
- H5Sclose(space);
+ H5Dclose(dset);
+ H5Pclose(dcpl);
+ H5Sclose(space);
} H5E_END_TRY;
return 1;
-}
+} /* end test_large_enough_current_eventual() */
/*-------------------------------------------------------------------------
- * Function: test_1d
- *
- * Purpose: Test a single external file which is large enough for the
- * current data size but not large enough for the eventual size.
+ * Function: test_large_enough_current_not_eventual
*
- * Return: Success: 0
+ * Purpose: Test a single external file which is large enough for the
+ * current data size but not large enough for the eventual size.
*
- * Failure: number of errors
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Monday, November 23, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
-test_1d(hid_t file)
+test_large_enough_current_not_eventual(hid_t file)
{
- hid_t dcpl=-1; /*dataset creation properties */
- hid_t space=-1; /*data space */
- hid_t dset=-1; /*dataset */
- hsize_t cur_size[1]; /*current data space size */
- hsize_t max_size[1]; /*maximum data space size */
+ hid_t dcpl = -1; /* dataset creation properties */
+ hid_t space = -1; /* data space */
+ hid_t dset = -1; /* dataset */
+ hsize_t cur_size[1]; /* current data space size */
+ hsize_t max_size[1]; /* maximum data space size */
TESTING("extendible dataspace, external storage is too small");
- if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) goto error;
+ if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ FAIL_STACK_ERROR
cur_size[0] = 100;
max_size[0] = 200;
- if(H5Pset_external(dcpl, "ext1.data", (off_t)0,
- (hsize_t)(max_size[0] * sizeof(int) - 1)) < 0) goto error;
- if((space = H5Screate_simple(1, cur_size, max_size)) < 0) goto error;
+ if(H5Pset_external(dcpl, "ext1.data", (off_t)0, (hsize_t)(max_size[0] * sizeof(int) - 1)) < 0)
+ FAIL_STACK_ERROR
+ if((space = H5Screate_simple(1, cur_size, max_size)) < 0)
+ FAIL_STACK_ERROR
+
H5E_BEGIN_TRY {
- dset = H5Dcreate2(file, "dset4", H5T_NATIVE_INT, space, H5P_DEFAULT, dcpl, H5P_DEFAULT);
+ dset = H5Dcreate2(file, "dset4", H5T_NATIVE_INT, space, H5P_DEFAULT, dcpl, H5P_DEFAULT);
} H5E_END_TRY;
- if(dset >= 0) {
- H5_FAILED();
- puts(" Small external file succeeded instead of failing.");
- goto error;
- }
- if(H5Sclose(space) < 0) goto error;
- if(H5Pclose(dcpl) < 0) goto error;
+ if(dset >= 0)
+ FAIL_PUTS_ERROR(" Small external file succeeded instead of failing.");
+
+ if(H5Sclose(space) < 0) FAIL_STACK_ERROR
+ if(H5Pclose(dcpl) < 0) FAIL_STACK_ERROR
PASSED();
return 0;
error:
H5E_BEGIN_TRY {
- H5Dclose(dset);
- H5Pclose(dcpl);
- H5Sclose(space);
+ H5Dclose(dset);
+ H5Pclose(dcpl);
+ H5Sclose(space);
} H5E_END_TRY;
return 1;
-}
+} /* end test_large_enough_current_not_eventual() */
/*-------------------------------------------------------------------------
- * Function: test_1e
+ * Function: test_unlimited
*
- * Purpose: Test a single external file of unlimited size and an
- * unlimited data space.
+ * Purpose: Test a single external file of unlimited size and an
+ * unlimited data space.
*
- * Return: Success: 0
+ * Return: Success: 0
+ * Failure: 1
*
- * Failure: number of errors
- *
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Monday, November 23, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
-test_1e(hid_t file)
+test_unlimited(hid_t file)
{
- hid_t dcpl=-1; /*dataset creation properties */
- hid_t space=-1; /*data space */
- hid_t dset=-1; /*dataset */
- hsize_t cur_size[1]; /*data space current size */
- hsize_t max_size[1]; /*data space maximum size */
- int n; /*number of external files */
- char name[256]; /*external file name */
- off_t file_offset; /*external file offset */
- hsize_t file_size; /*sizeof external file segment */
+ hid_t dcpl = -1; /* dataset creation properties */
+ hid_t space = -1; /* data space */
+ hid_t dset = -1; /* dataset */
+ hsize_t cur_size[1]; /* data space current size */
+ hsize_t max_size[1]; /* data space maximum size */
+ int n; /* number of external files */
+ char name[256]; /* external file name */
+ off_t file_offset; /* external file offset */
+ hsize_t file_size; /* sizeof external file segment */
TESTING("unlimited dataspace, unlimited external storage");
/* Create dataset */
- if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) goto error;
- if(H5Pset_external(dcpl, "ext1.data", (off_t)0, H5F_UNLIMITED) < 0) goto error;
+ if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ FAIL_STACK_ERROR
+ if(H5Pset_external(dcpl, "ext1.data", (off_t)0, H5F_UNLIMITED) < 0)
+ FAIL_STACK_ERROR
cur_size[0] = 100;
max_size[0] = H5S_UNLIMITED;
- if((space = H5Screate_simple(1, cur_size, max_size)) < 0) goto error;
+ if((space = H5Screate_simple(1, cur_size, max_size)) < 0)
+ FAIL_STACK_ERROR
if((dset = H5Dcreate2(file, "dset5", H5T_NATIVE_INT, space, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
- goto error;
- if(H5Dclose(dset) < 0) goto error;
- if(H5Sclose(space) < 0) goto error;
- if(H5Pclose(dcpl) < 0) goto error;
+ FAIL_STACK_ERROR
+
+ if(H5Dclose(dset) < 0) FAIL_STACK_ERROR
+ if(H5Sclose(space) < 0) FAIL_STACK_ERROR
+ if(H5Pclose(dcpl) < 0) FAIL_STACK_ERROR
/* Read dataset creation information */
- if((dset = H5Dopen2(file, "dset5", H5P_DEFAULT)) < 0) goto error;
- if((dcpl = H5Dget_create_plist(dset)) < 0) goto error;
- if((n = H5Pget_external_count(dcpl)) < 0) goto error;
+ if((dset = H5Dopen2(file, "dset5", H5P_DEFAULT)) < 0)
+ FAIL_STACK_ERROR
+ if((dcpl = H5Dget_create_plist(dset)) < 0)
+ FAIL_STACK_ERROR
+ if((n = H5Pget_external_count(dcpl)) < 0)
+ FAIL_STACK_ERROR
if(1 != n) {
- H5_FAILED();
- puts(" Returned external count is wrong.");
- printf(" got: %d\n ans: 1\n", n);
- goto error;
- }
+ H5_FAILED();
+ HDputs(" Returned external count is wrong.");
+ printf(" got: %d\n ans: 1\n", n);
+ goto error;
+ } /* end if */
+
HDstrcpy(name + sizeof(name) - 4, "...");
- if(H5Pget_external(dcpl, 0, sizeof(name) - 4, name, &file_offset,
- &file_size) < 0) goto error;
+ if(H5Pget_external(dcpl, 0, sizeof(name) - 4, name, &file_offset, &file_size) < 0)
+ FAIL_STACK_ERROR
if(file_offset != 0) {
- H5_FAILED();
- puts(" Wrong file offset.");
- printf(" got: %lu\n ans: 0\n", (unsigned long)file_offset);
- goto error;
- }
+ H5_FAILED();
+ HDputs(" Wrong file offset.");
+ printf(" got: %lu\n ans: 0\n", (unsigned long)file_offset);
+ goto error;
+ } /* end if */
+
if(H5F_UNLIMITED != file_size) {
- H5_FAILED();
- puts(" Wrong file size.");
- printf(" got: %lu\n ans: INF\n", (unsigned long)file_size);
- goto error;
- }
- if(H5Pclose(dcpl) < 0) goto error;
- if(H5Dclose(dset) < 0) goto error;
+ H5_FAILED();
+ HDputs(" Wrong file size.");
+ printf(" got: %lu\n ans: INF\n", (unsigned long)file_size);
+ goto error;
+ } /* end if */
+
+ if(H5Pclose(dcpl) < 0) FAIL_STACK_ERROR
+ if(H5Dclose(dset) < 0) FAIL_STACK_ERROR
PASSED();
return 0;
error:
H5E_BEGIN_TRY {
- H5Dclose(dset);
- H5Pclose(dcpl);
- H5Sclose(space);
+ H5Dclose(dset);
+ H5Pclose(dcpl);
+ H5Sclose(space);
} H5E_END_TRY;
return 1;
-}
+} /* end test_unlimited() */
/*-------------------------------------------------------------------------
- * Function: test_1f
+ * Function: test_multiple_files
*
- * Purpose: Test multiple external files for a dataset.
+ * Purpose: Test multiple external files for a dataset.
*
- * Return: Success: 0
+ * Return: Success: 0
+ * Failure: 1
*
- * Failure: number of errors
- *
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Monday, November 23, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
-test_1f(hid_t file)
+test_multiple_files(hid_t file)
{
- hid_t dcpl=-1; /*dataset creation properties */
- hid_t space=-1; /*data space */
- hid_t dset=-1; /*dataset */
- hsize_t cur_size[1]; /*data space current size */
- hsize_t max_size[1]; /*data space maximum size */
+ hid_t dcpl = -1; /* dataset creation properties */
+ hid_t space = -1; /* dataspace */
+ hid_t dset = -1; /* dataset */
+ hsize_t cur_size[1]; /* data space current size */
+ hsize_t max_size[1]; /* data space maximum size */
TESTING("multiple external files");
- if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) goto error;
+ if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ FAIL_STACK_ERROR
+
cur_size[0] = max_size[0] = 100;
- if(H5Pset_external(dcpl, "ext1.data", (off_t)0,
- (hsize_t)(max_size[0]*sizeof(int)/4)) < 0) goto error;
- if(H5Pset_external(dcpl, "ext2.data", (off_t)0,
- (hsize_t)(max_size[0]*sizeof(int)/4)) < 0) goto error;
- if(H5Pset_external(dcpl, "ext3.data", (off_t)0,
- (hsize_t)(max_size[0]*sizeof(int)/4)) < 0) goto error;
- if(H5Pset_external(dcpl, "ext4.data", (off_t)0,
- (hsize_t)(max_size[0]*sizeof(int)/4)) < 0) goto error;
- if((space = H5Screate_simple(1, cur_size, max_size)) < 0) goto error;
+
+ if(H5Pset_external(dcpl, "ext1.data", (off_t)0, (hsize_t)(max_size[0]*sizeof(int)/4)) < 0)
+ FAIL_STACK_ERROR
+ if(H5Pset_external(dcpl, "ext2.data", (off_t)0, (hsize_t)(max_size[0]*sizeof(int)/4)) < 0)
+ FAIL_STACK_ERROR
+ if(H5Pset_external(dcpl, "ext3.data", (off_t)0, (hsize_t)(max_size[0]*sizeof(int)/4)) < 0)
+ FAIL_STACK_ERROR
+ if(H5Pset_external(dcpl, "ext4.data", (off_t)0, (hsize_t)(max_size[0]*sizeof(int)/4)) < 0)
+ FAIL_STACK_ERROR
+ if((space = H5Screate_simple(1, cur_size, max_size)) < 0)
+ FAIL_STACK_ERROR
if((dset = H5Dcreate2(file, "dset6", H5T_NATIVE_INT, space, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
- goto error;
- if(H5Dclose(dset) < 0) goto error;
- if(H5Sclose(space) < 0) goto error;
- if(H5Pclose(dcpl) < 0) goto error;
+ FAIL_STACK_ERROR
+
+ if(H5Dclose(dset) < 0) FAIL_STACK_ERROR
+ if(H5Sclose(space) < 0) FAIL_STACK_ERROR
+ if(H5Pclose(dcpl) < 0) FAIL_STACK_ERROR
PASSED();
return 0;
error:
H5E_BEGIN_TRY {
- H5Dclose(dset);
- H5Pclose(dcpl);
- H5Sclose(space);
+ H5Dclose(dset);
+ H5Pclose(dcpl);
+ H5Sclose(space);
} H5E_END_TRY;
return 1;
-}
+} /* end test_multiple_files() */
/*-------------------------------------------------------------------------
- * Function: test_1g
- *
- * Purpose: It should be impossible to define an unlimited external file
- * and then follow it with another external file.
+ * Function: test_add_to_unlimited
*
- * Return: Success: 0
+ * Purpose: It should be impossible to define an unlimited external file
+ * and then follow it with another external file.
*
- * Failure: number of errors
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Monday, November 23, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
-test_1g(void)
+test_add_to_unlimited(void)
{
- hid_t dcpl=-1; /*dataset creation properties */
- herr_t status; /*function return status */
- int n; /*number of external files */
+ hid_t dcpl = -1; /* dataset creation properties */
+ herr_t status; /* function return status */
+ int n; /* number of external files */
TESTING("external file following unlimited file");
- if ((dcpl=H5Pcreate (H5P_DATASET_CREATE)) < 0) goto error;
- if (H5Pset_external(dcpl, "ext1.data", (off_t)0, H5F_UNLIMITED) < 0) goto error;
+
+ if((dcpl = H5Pcreate (H5P_DATASET_CREATE)) < 0)
+ FAIL_STACK_ERROR
+ if(H5Pset_external(dcpl, "ext1.data", (off_t)0, H5F_UNLIMITED) < 0)
+ FAIL_STACK_ERROR
+
H5E_BEGIN_TRY {
- status = H5Pset_external(dcpl, "ext2.data", (off_t)0, (hsize_t)100);
+ status = H5Pset_external(dcpl, "ext2.data", (off_t)0, (hsize_t)100);
} H5E_END_TRY;
- if (status>=0) {
- H5_FAILED();
- puts (" H5Pset_external() succeeded when it should have failed.");
- goto error;
- }
- if ((n = H5Pget_external_count(dcpl)) < 0) goto error;
- if (1!=n) {
- H5_FAILED();
- puts(" Wrong external file count returned.");
- goto error;
- }
- if (H5Pclose(dcpl) < 0) goto error;
+ if(status >= 0)
+ FAIL_PUTS_ERROR(" H5Pset_external() succeeded when it should have failed.");
+
+ if((n = H5Pget_external_count(dcpl)) < 0)
+ FAIL_STACK_ERROR
+ if(1 != n)
+ FAIL_PUTS_ERROR(" Wrong external file count returned.");
+
+ if(H5Pclose(dcpl) < 0) FAIL_STACK_ERROR
PASSED();
return 0;
error:
H5E_BEGIN_TRY {
- H5Pclose(dcpl);
+ H5Pclose(dcpl);
} H5E_END_TRY;
return 1;
-}
+} /* end test_add_to_unlimited() */
/*-------------------------------------------------------------------------
- * Function: test_1h
- *
- * Purpose: It should be impossible to create a set of external files
- * whose total size overflows a size_t integer.
+ * Function: test_overflow
*
- * Return: Success: 0
+ * Purpose: It should be impossible to create a set of external files
+ * whose total size overflows a size_t integer.
*
- * Failure: number of errors
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Monday, November 23, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
-test_1h(void)
+test_overflow(void)
{
- hid_t dcpl=-1; /*dataset creation properties */
- herr_t status; /*return status */
+ hid_t dcpl = -1; /* dataset creation properties */
+ herr_t status; /* return status */
TESTING("address overflow in external files");
- if((dcpl=H5Pcreate(H5P_DATASET_CREATE)) < 0) goto error;
- if (H5Pset_external(dcpl, "ext1.data", (off_t)0, H5F_UNLIMITED-1) < 0) goto error;
+
+ if((dcpl=H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ FAIL_STACK_ERROR
+ if(H5Pset_external(dcpl, "ext1.data", (off_t)0, H5F_UNLIMITED-1) < 0)
+ FAIL_STACK_ERROR
+
H5E_BEGIN_TRY {
- status = H5Pset_external(dcpl, "ext2.data", (off_t)0, (hsize_t)100);
+ status = H5Pset_external(dcpl, "ext2.data", (off_t)0, (hsize_t)100);
} H5E_END_TRY;
- if (status>=0) {
- H5_FAILED();
- puts(" H5Pset_external() succeeded when it should have failed.");
- goto error;
- }
- if (H5Pclose(dcpl) < 0) goto error;
+ if(status >= 0)
+ FAIL_PUTS_ERROR(" H5Pset_external() succeeded when it should have failed.");
+
+ if(H5Pclose(dcpl) < 0) FAIL_STACK_ERROR
+
PASSED();
return 0;
error:
H5E_BEGIN_TRY {
- H5Pclose(dcpl);
+ H5Pclose(dcpl);
} H5E_END_TRY;
return 1;
-}
+} /* end test_overflow() */
/*-------------------------------------------------------------------------
- * Function: test_2
- *
- * Purpose: Tests reading from an external file set.
+ * Function: test_read_file_set
*
- * Return: Success: 0
+ * Purpose: Tests reading from an external file set.
*
- * Failure: number of errors
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, March 4, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
-test_2 (hid_t fapl)
+test_read_file_set(hid_t fapl)
{
- hid_t file=-1; /*file to write to */
- hid_t dcpl=-1; /*dataset creation properties */
- hid_t space=-1; /*data space */
- hid_t dset=-1; /*dataset */
- hid_t grp=-1; /*group to emit diagnostics */
- int fd; /*external file descriptors */
- size_t i, j; /*miscellaneous counters */
- hssize_t n; /*bytes of I/O */
- char filename[1024]; /*file names */
- int part[25], whole[100]; /*raw data buffers */
- hsize_t cur_size; /*current data space size */
- hid_t hs_space; /*hyperslab data space */
- hsize_t hs_start = 30; /*hyperslab starting offset */
- hsize_t hs_count = 25; /*hyperslab size */
- int temparray[10] = {0x0f0f0f0f,0x0f0f0f0f,0x0f0f0f0f,0x0f0f0f0f,0x0f0f0f0f,0x0f0f0f0f,0x0f0f0f0f,0x0f0f0f0f,0x0f0f0f0f,0x0f0f0f0f};
+ hid_t file = -1; /* file to write to */
+ hid_t dcpl = -1; /* dataset creation properties */
+ hid_t space = -1; /* data space */
+ hid_t dset = -1; /* dataset */
+ hid_t grp = -1; /* group to emit diagnostics */
+ size_t i; /* miscellaneous counter */
+ char filename[1024]; /* file names */
+ int part[PART_SIZE]; /* raw data buffer (partial) */
+ int whole[TOTAL_SIZE]; /* raw data buffer (total) */
+ hsize_t cur_size; /* current data space size */
+ hid_t hs_space = -1; /* hyperslab data space */
+ hsize_t hs_start = 30; /* hyperslab starting offset */
+ hsize_t hs_count = 25; /* hyperslab size */
TESTING("read external dataset");
- /* Write the data to external files directly */
- for (i=0; i<4; i++) {
- for (j=0; j<25; j++) {
- part[j] = (int)(i*25+j);
- }
- sprintf (filename, "extern_%lua.raw", (unsigned long)i+1);
- fd = HDopen(filename, O_RDWR|O_CREAT|O_TRUNC, 0666);
- assert (fd>=0);
-/* n = lseek (fd, (off_t)(i*10), SEEK_SET);
-*/
- n = HDwrite(fd,temparray,(size_t)i*10);
- assert (n>=0 && (size_t)n==i*10);
- n = HDwrite(fd, part, sizeof(part));
- assert (n==sizeof(part));
- HDclose(fd);
- }
-
- /*
- * Create the file and an initial group. This causes messages about
+ if(HDsetenv("HDF5_EXTFILE_PREFIX", "", 1) < 0)
+ TEST_ERROR
+
+ /* Reset the raw data files */
+ if(reset_raw_data_files() < 0)
+ TEST_ERROR
+
+ /* Create the file and an initial group. This causes messages about
* debugging to be emitted before we start playing games with what the
* output looks like.
*/
- h5_fixname(FILENAME[1], fapl, filename, sizeof filename);
- if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) FAIL_STACK_ERROR
- if((grp = H5Gcreate2(file, "emit-diagnostics", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ h5_fixname(FILENAME[1], fapl, filename, sizeof(filename));
+ if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
+ FAIL_STACK_ERROR
+ if((grp = H5Gcreate2(file, "emit-diagnostics", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ FAIL_STACK_ERROR
if(H5Gclose(grp) < 0) FAIL_STACK_ERROR
+ /* Create the dcpl */
+ if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ FAIL_STACK_ERROR
+ for(i = 0; i < N_EXT_FILES; i++) {
+ HDsnprintf(filename, sizeof(filename), "extern_%dr.raw", (int) i + 1);
+ if(H5Pset_external(dcpl, filename, (off_t)(i * GARBAGE_PER_FILE), (hsize_t)sizeof(part)) < 0)
+ FAIL_STACK_ERROR
+ } /* end for */
+
+ /* Create the dataspace */
+ cur_size = TOTAL_SIZE;
+ if((space = H5Screate_simple(1, &cur_size, NULL)) < 0)
+ FAIL_STACK_ERROR
+
/* Create the dataset */
- if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) goto error;
- if(H5Pset_external(dcpl, "extern_1a.raw", (off_t)0, (hsize_t)sizeof part) < 0 ||
- H5Pset_external(dcpl, "extern_2a.raw", (off_t)10, (hsize_t)sizeof part) < 0 ||
- H5Pset_external(dcpl, "extern_3a.raw", (off_t)20, (hsize_t)sizeof part) < 0 ||
- H5Pset_external(dcpl, "extern_4a.raw", (off_t)30, (hsize_t)sizeof part) < 0)
- goto error;
- cur_size = 100;
- if((space = H5Screate_simple(1, &cur_size, NULL)) < 0) goto error;
- if((dset = H5Dcreate2(file, "dset1", H5T_NATIVE_INT, space, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) goto error;
-
- /*
- * Read the entire dataset and compare with the original
- */
- memset(whole, 0, sizeof(whole));
- if(H5Dread(dset, H5T_NATIVE_INT, space, space, H5P_DEFAULT, whole) < 0) goto error;
- for(i = 0; i < 100; i++)
- if(whole[i] != (signed)i) {
- H5_FAILED();
- puts(" Incorrect value(s) read.");
- goto error;
- } /* end if */
-
- /*
- * Read the middle of the dataset
- */
- if((hs_space = H5Scopy(space)) < 0) goto error;
- if(H5Sselect_hyperslab(hs_space, H5S_SELECT_SET, &hs_start, NULL,
- &hs_count, NULL) < 0) goto error;
+ if((dset = H5Dcreate2(file, "dset1", H5T_NATIVE_INT, space, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
+ FAIL_STACK_ERROR
+
+ /* Read the entire dataset */
HDmemset(whole, 0, sizeof(whole));
- if(H5Dread(dset, H5T_NATIVE_INT, hs_space, hs_space, H5P_DEFAULT,
- whole) < 0) goto error;
- if(H5Sclose(hs_space) < 0) goto error;
- for(i = hs_start; i<hs_start+hs_count; i++) {
- if(whole[i] != (signed)i) {
- H5_FAILED();
- puts(" Incorrect value(s) read.");
- goto error;
- }
- }
-
- if (H5Dclose(dset) < 0) goto error;
- if (H5Pclose(dcpl) < 0) goto error;
- if (H5Sclose(space) < 0) goto error;
- if (H5Fclose(file) < 0) goto error;
+ if(H5Dread(dset, H5T_NATIVE_INT, space, space, H5P_DEFAULT, whole) < 0)
+ FAIL_STACK_ERROR
+
+ /* Compare data */
+ for(i = 0; i < TOTAL_SIZE; i++)
+ if(whole[i] != (signed)i)
+ FAIL_PUTS_ERROR("Incorrect value(s) read.");
+
+ /* Read via a hypserslab in the middle of the dataset */
+
+ /* Set up dataspace */
+ if((hs_space = H5Scopy(space)) < 0)
+ FAIL_STACK_ERROR
+ if(H5Sselect_hyperslab(hs_space, H5S_SELECT_SET, &hs_start, NULL, &hs_count, NULL) < 0)
+ FAIL_STACK_ERROR
+
+ /* Read */
+ HDmemset(whole, 0, sizeof(whole));
+ if(H5Dread(dset, H5T_NATIVE_INT, hs_space, hs_space, H5P_DEFAULT, whole) < 0)
+ FAIL_STACK_ERROR
+
+ /* Verify data */
+ for(i = (size_t)hs_start; i < (size_t)(hs_start + hs_count); i++) {
+ if(whole[i] != (signed)i)
+ FAIL_PUTS_ERROR("Incorrect value(s) read (hyperslab).");
+ } /* end for */
+
+ if(H5Dclose(dset) < 0) FAIL_STACK_ERROR
+ if(H5Pclose(dcpl) < 0) FAIL_STACK_ERROR
+ if(H5Sclose(space) < 0) FAIL_STACK_ERROR
+ if(H5Sclose(hs_space) < 0) FAIL_STACK_ERROR
+ if(H5Fclose(file) < 0) FAIL_STACK_ERROR
PASSED();
return 0;
error:
H5E_BEGIN_TRY {
- H5Dclose(dset);
- H5Pclose(dcpl);
- H5Sclose(space);
- H5Fclose(file);
+ H5Gclose(grp);
+ H5Dclose(dset);
+ H5Pclose(dcpl);
+ H5Sclose(space);
+ H5Sclose(hs_space);
+ H5Fclose(file);
} H5E_END_TRY;
return 1;
-}
+} /* end test_read_file_set() */
/*-------------------------------------------------------------------------
- * Function: test_3
- *
- * Purpose: Tests writing to an external file set.
+ * Function: test_write_file_set
*
- * Return: Success: 0
+ * Purpose: Tests writing to an external file set.
*
- * Failure: number of errors
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, March 4, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
-test_3 (hid_t fapl)
+test_write_file_set(hid_t fapl)
{
- hid_t file=-1; /*file to which to write */
- hid_t dcpl=-1; /*dataset creation properties */
- hid_t mem_space=-1; /*memory data space */
- hid_t file_space=-1; /*file data space */
- hid_t dset=-1; /*dataset */
- unsigned i; /*miscellaneous counters */
- int fd; /*external file descriptor */
- int part[25],whole[100]; /*raw data buffers */
- hsize_t cur_size=100; /*current data space size */
- hsize_t max_size=200; /*maximum data space size */
- hsize_t hs_start=100; /*hyperslab starting offset */
- hsize_t hs_count=100; /*hyperslab size */
- char filename[1024]; /*file name */
- int temparray[10] = {0x0f0f0f0f,0x0f0f0f0f,0x0f0f0f0f,0x0f0f0f0f,0x0f0f0f0f,0x0f0f0f0f,0x0f0f0f0f,0x0f0f0f0f,0x0f0f0f0f,0x0f0f0f0f};
+ hid_t file = -1; /* file to which to write */
+ hid_t dcpl = -1; /* dataset creation properties */
+ hid_t mem_space = -1; /* memory data space */
+ hid_t file_space = -1; /* file data space */
+ hid_t dset = -1; /* dataset */
+ unsigned i; /* miscellaneous counter */
+ int part[PART_SIZE]; /* raw data buffer (partial) */
+ int whole[TOTAL_SIZE]; /* raw data buffer (total) */
+ hsize_t cur_size = 100; /* current data space size */
+ hsize_t max_size = 200; /* maximum data space size */
+ hsize_t hs_start = 100; /* hyperslab starting offset */
+ hsize_t hs_count = 100; /* hyperslab size */
+ char filename[1024]; /* file name */
TESTING("write external dataset");
+ if(HDsetenv("HDF5_EXTFILE_PREFIX", "", 1) < 0)
+ TEST_ERROR
+
/* Create another file */
- h5_fixname(FILENAME[2], fapl, filename, sizeof filename);
- if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) {
- goto error;
- }
-
- /* Create the external file list */
- if((dcpl=H5Pcreate(H5P_DATASET_CREATE)) < 0) goto error;
- if (H5Pset_external(dcpl, "extern_1b.raw", (off_t)0, (hsize_t)sizeof part) < 0 ||
- H5Pset_external(dcpl, "extern_2b.raw", (off_t)10, (hsize_t)sizeof part) < 0 ||
- H5Pset_external(dcpl, "extern_3b.raw", (off_t)20, (hsize_t)sizeof part) < 0 ||
- H5Pset_external(dcpl, "extern_4b.raw", (off_t)30, H5F_UNLIMITED) < 0)
- goto error;
-
- /* Make sure the output files are fresh*/
- for (i=1; i<=4; i++) {
- sprintf(filename, "extern_%db.raw", i);
- if ((fd= HDopen(filename, O_RDWR|O_CREAT|O_TRUNC, 0666)) < 0) {
- H5_FAILED();
- printf(" cannot open %s: %s\n", filename, strerror(errno));
- goto error;
- }
-
- HDwrite(fd, temparray, (i-1)*10);
- HDclose(fd);
- }
+ h5_fixname(FILENAME[2], fapl, filename, sizeof(filename));
+ if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
+ FAIL_STACK_ERROR
+
+ /* Create the dcpl and external file list */
+ if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ FAIL_STACK_ERROR
+ for(i = 0; i < N_EXT_FILES; i++) {
+ hsize_t size;
+
+ HDsnprintf(filename, sizeof(filename), "extern_%dw.raw", (int) i + 1);
+
+ if(i != N_EXT_FILES -1)
+ size = (hsize_t)sizeof(part);
+ else
+ size = H5F_UNLIMITED;
+
+ if(H5Pset_external(dcpl, filename, (off_t)(i * GARBAGE_PER_FILE), size) < 0)
+ FAIL_STACK_ERROR
+ } /* end for */
+
+ /* Reset the raw data files */
+ if(reset_raw_data_files() < 0)
+ TEST_ERROR
/* Create the dataset */
- if((mem_space = H5Screate_simple(1, &cur_size, &max_size)) < 0) goto error;
- if((file_space = H5Scopy(mem_space)) < 0) goto error;
+ if((mem_space = H5Screate_simple(1, &cur_size, &max_size)) < 0)
+ FAIL_STACK_ERROR
+ if((file_space = H5Scopy(mem_space)) < 0)
+ FAIL_STACK_ERROR
if((dset = H5Dcreate2(file, "dset1", H5T_NATIVE_INT, file_space, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
- goto error;
+ FAIL_STACK_ERROR
/* Write the entire dataset and compare with the original */
for(i = 0; i < cur_size; i++)
- whole[i] = i;
- if(H5Dwrite(dset, H5T_NATIVE_INT, mem_space, file_space, H5P_DEFAULT, whole) < 0) goto error;
- for(i = 0; i < 4; i++) {
- char name1[64], name2[64];
-
- sprintf(name1, "extern_%da.raw", i + 1);
- sprintf(name2, "extern_%db.raw", i + 1);
- if(!same_contents(name1, name2)) {
- H5_FAILED();
- puts (" Output differs from expected value.");
- goto error;
- } /* end if */
+ whole[i] = (int)i;
+ if(H5Dwrite(dset, H5T_NATIVE_INT, mem_space, file_space, H5P_DEFAULT, whole) < 0)
+ FAIL_STACK_ERROR
+ for(i = 0; i < N_EXT_FILES; i++) {
+ char name1[64], name2[64];
+
+ HDsprintf(name1, "extern_%dr.raw", i + 1);
+ HDsprintf(name2, "extern_%dw.raw", i + 1);
+ if(!files_have_same_contents(name1, name2))
+ FAIL_PUTS_ERROR(" Output differs from expected value.")
} /* end for */
/* Extend the dataset by another 100 elements */
- if(H5Dset_extent(dset, &max_size) < 0) goto error;
- if(H5Sclose(file_space) < 0) goto error;
- if((file_space = H5Dget_space(dset)) < 0) goto error;
+ if(H5Dset_extent(dset, &max_size) < 0)
+ FAIL_STACK_ERROR
+ if(H5Sclose(file_space) < 0)
+ FAIL_STACK_ERROR
+ if((file_space = H5Dget_space(dset)) < 0)
+ FAIL_STACK_ERROR
/* Write second half of dataset */
for(i = 0; i < hs_count; i++)
- whole[i] = 100 + i;
- if(H5Sselect_hyperslab(file_space, H5S_SELECT_SET, &hs_start, NULL, &hs_count, NULL) < 0) goto error;
- if(H5Dwrite(dset, H5T_NATIVE_INT, mem_space, file_space, H5P_DEFAULT, whole) < 0) goto error;
+ whole[i] = 100 + (int)i;
+ if(H5Sselect_hyperslab(file_space, H5S_SELECT_SET, &hs_start, NULL, &hs_count, NULL) < 0)
+ FAIL_STACK_ERROR
+ if(H5Dwrite(dset, H5T_NATIVE_INT, mem_space, file_space, H5P_DEFAULT, whole) < 0)
+ FAIL_STACK_ERROR
- if(H5Dclose(dset) < 0) goto error;
- if(H5Pclose(dcpl) < 0) goto error;
- if(H5Sclose(mem_space) < 0) goto error;
- if(H5Sclose(file_space) < 0) goto error;
- if(H5Fclose(file) < 0) goto error;
+ if(H5Dclose(dset) < 0) FAIL_STACK_ERROR
+ if(H5Pclose(dcpl) < 0) FAIL_STACK_ERROR
+ if(H5Sclose(mem_space) < 0) FAIL_STACK_ERROR
+ if(H5Sclose(file_space) < 0) FAIL_STACK_ERROR
+ if(H5Fclose(file) < 0) FAIL_STACK_ERROR
PASSED();
return 0;
error:
H5E_BEGIN_TRY {
- H5Dclose(dset);
- H5Pclose(dcpl);
- H5Sclose(mem_space);
- H5Sclose(file_space);
- H5Fclose(file);
+ H5Dclose(dset);
+ H5Pclose(dcpl);
+ H5Sclose(mem_space);
+ H5Sclose(file_space);
+ H5Fclose(file);
+ } H5E_END_TRY;
+ return 1;
+} /* end test_write_file_set() */
+
+
+ /*-------------------------------------------------------------------------
+ * Function: test_path_absolute
+ *
+ * Purpose: Test absolute filenames for external files.
+ * This will create an HDF5 file in a subdirectory which will
+ * refer to /full/path/extern_*a.raw on unix and to
+ * c:\full\path\extern_*a.raw and \full\path\extern_*a.raw on
+ * windows.
+ *
+ * Return: Success: 0
+ * Failure: 1
+ *
+ * Programmer: Steffen Kiess
+ * March 10, 2015
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+test_path_absolute(hid_t fapl)
+{
+ hid_t file = -1; /* file to write to */
+ hid_t dcpl = -1; /* dataset creation properties */
+ hid_t space = -1; /* data space */
+ hid_t dset = -1; /* dataset */
+ size_t i; /* miscellaneous counter */
+ char cwdpath[1024]; /* working directory */
+ char filename[1024]; /* file name */
+ int part[PART_SIZE]; /* raw data buffer (partial) */
+ int whole[TOTAL_SIZE]; /* raw data buffer (total) */
+ hsize_t cur_size; /* current data space size */
+
+ TESTING("absolute filenames for external file");
+
+ h5_fixname(FILENAME[3], fapl, filename, sizeof(filename));
+ if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
+ FAIL_STACK_ERROR
+
+ /* Reset the raw data files */
+ if(reset_raw_data_files() < 0)
+ TEST_ERROR
+
+ /* Create the dcpl */
+ if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ FAIL_STACK_ERROR
+ if(NULL == HDgetcwd(cwdpath, sizeof(cwdpath)))
+ TEST_ERROR
+ for(i = 0; i < N_EXT_FILES; i++) {
+ HDsnprintf(filename, sizeof(filename), "%s%sextern_%dr.raw", cwdpath, H5_DIR_SEPS, (int) i + 1);
+#if defined(H5_HAVE_WINDOW_PATH)
+ /* For windows, test path-absolute case (\dir\file.raw) for the second file */
+ if(i == 1)
+ HDsnprintf(filename, sizeof(filename), "%s%sextern_%dr.raw", cwdpath + 2, H5_DIR_SEPS, i + 1);
+#endif
+ if(H5Pset_external(dcpl, filename, (off_t)(i * GARBAGE_PER_FILE), (hsize_t)sizeof(part)) < 0)
+ FAIL_STACK_ERROR
+ } /* end for */
+
+ /* create the dataspace */
+ cur_size = TOTAL_SIZE;
+ if((space = H5Screate_simple(1, &cur_size, NULL)) < 0)
+ FAIL_STACK_ERROR
+
+ /* create the dataset */
+ if((dset = H5Dcreate2(file, "dset1", H5T_NATIVE_INT, space, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
+ FAIL_STACK_ERROR
+
+ /* Read the entire dataset and compare with the original */
+ HDmemset(whole, 0, sizeof(whole));
+ if(H5Dread(dset, H5T_NATIVE_INT, space, space, H5P_DEFAULT, whole) < 0)
+ FAIL_STACK_ERROR
+ for(i = 0; i < TOTAL_SIZE; i++)
+ if(whole[i] != (signed)i)
+ FAIL_PUTS_ERROR("Incorrect value(s) read.");
+
+ if(H5Dclose(dset) < 0) FAIL_STACK_ERROR
+ if(H5Sclose(space) < 0) FAIL_STACK_ERROR
+ if(H5Pclose(dcpl) < 0) FAIL_STACK_ERROR
+ if(H5Fclose(file) < 0) FAIL_STACK_ERROR
+ PASSED();
+ return 0;
+
+error:
+ H5E_BEGIN_TRY {
+ H5Dclose(dset);
+ H5Sclose(space);
+ H5Pclose(dcpl);
+ H5Fclose(file);
} H5E_END_TRY;
return 1;
-}
+} /* end test_path_absolute() */
/*-------------------------------------------------------------------------
- * Function: test_4
+ * Function: test_path_relative
+ *
+ * Purpose: Test external files with filename relative to current directory.
+ * This will create an HDF5 file in a subdirectory which will
+ * refer to extern_*a.raw
*
- * Purpose: Tests opening an external link twice. It exposed a bug
- * in the library. This function tests the fix. This test
- * doesn't work with MULTI driver.
+ * Return: Success: 0
+ * Failure: 1
*
- * Return: Success: 0
+ * Programmer: Steffen Kiess
+ * March 10, 2015
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+test_path_relative(hid_t fapl)
+{
+ hid_t file = -1; /* file to write to */
+ hid_t dcpl = -1; /* dataset creation properties */
+ hid_t space = -1; /* data space */
+ hid_t dset = -1; /* dataset */
+ size_t i; /* miscellaneous counters */
+ char cwdpath[1024]; /* working directory */
+ char filename[1024]; /* file name */
+ int part[PART_SIZE]; /* raw data buffer (partial) */
+ int whole[TOTAL_SIZE]; /* raw data buffer (total) */
+ hsize_t cur_size; /* current data space size */
+
+ TESTING("filenames relative to current directory for external file");
+
+ if(HDsetenv("HDF5_EXTFILE_PREFIX", "", 1) < 0)
+ TEST_ERROR
+
+ if (HDmkdir("extern_dir", (mode_t)0755) < 0 && errno != EEXIST)
+ TEST_ERROR;
+
+ h5_fixname(FILENAME[4], fapl, filename, sizeof(filename));
+ if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
+ FAIL_STACK_ERROR;
+
+ /* Reset the raw data files */
+ if(reset_raw_data_files() < 0)
+ TEST_ERROR
+
+ /* Create the dataset */
+ if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ FAIL_STACK_ERROR
+ if(NULL == HDgetcwd(cwdpath, sizeof(cwdpath)))
+ TEST_ERROR
+ for (i = 0; i < N_EXT_FILES; i++) {
+ HDsnprintf(filename, sizeof(filename), "extern_%dr.raw", (int)i + 1);
+ if(H5Pset_external(dcpl, filename, (off_t)(i * GARBAGE_PER_FILE), (hsize_t)sizeof(part)) < 0)
+ FAIL_STACK_ERROR
+ } /* end for */
+
+ cur_size = TOTAL_SIZE;
+ if((space = H5Screate_simple(1, &cur_size, NULL)) < 0)
+ FAIL_STACK_ERROR
+ if((dset = H5Dcreate2(file, "dset1", H5T_NATIVE_INT, space, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
+ FAIL_STACK_ERROR
+
+ /* Read the entire dataset and compare with the original */
+ HDmemset(whole, 0, sizeof(whole));
+ if(H5Dread(dset, H5T_NATIVE_INT, space, space, H5P_DEFAULT, whole) < 0)
+ FAIL_STACK_ERROR
+ for(i = 0; i < TOTAL_SIZE; i++)
+ if(whole[i] != (signed)i)
+ FAIL_PUTS_ERROR("Incorrect value(s) read.");
+
+ if(H5Dclose(dset) < 0) FAIL_STACK_ERROR
+ if(H5Pclose(dcpl) < 0) FAIL_STACK_ERROR
+ if(H5Sclose(space) < 0) FAIL_STACK_ERROR
+ if(H5Fclose(file) < 0) FAIL_STACK_ERROR
+ PASSED();
+ return 0;
+
+error:
+ H5E_BEGIN_TRY {
+ H5Dclose(dset);
+ H5Pclose(dcpl);
+ H5Sclose(space);
+ H5Fclose(file);
+ } H5E_END_TRY;
+ return 1;
+} /* end test_path_relative() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: test_path_relative_cwd
*
- * Failure: number of errors
+ * Purpose: Test external files with filename relative to current directory.
+ * This will create an HDF5 file in a subdirectory which will
+ * refer to ../extern_*a.raw
+ * The files are then accessed by setting the efile_prefix dataset
+ * access property to "${ORIGIN}".
*
- * Programmer: Raymond Lu
- * 5 November 2007
+ * Return: Success: 0
+ * Failure: 1
*
- * Modifications:
+ * Programmer: Steffen Kiess
+ * March 10, 2015
*
*-------------------------------------------------------------------------
*/
static int
-test_4 (hid_t fapl)
+test_path_relative_cwd(hid_t fapl)
{
- hid_t fid = -1;
- hid_t gid = -1;
- hid_t xid = -1;
- hid_t xid2 = -1;
- char filename[1024]; /*file name */
- const char *pathname = H5_get_srcdir_filename(LINKED_FILE); /* Corrected test file name */
+ hid_t file = -1; /* file to write to */
+ hid_t dcpl = -1; /* dataset creation properties */
+ hid_t space = -1; /* data space */
+ hid_t dapl = -1; /* dataset access property list */
+ hid_t dapl2 = -1; /* copy of dapl */
+ hid_t dset = -1; /* dataset */
+ hid_t dset2 = -1; /* dataset, opened a second time */
+ hid_t dset3 = -1; /* dataset, opened with different prefix */
+ size_t i; /* miscellaneous counters */
+ char cwdpath[1024]; /* working directory */
+ char filename[1024]; /* file name */
+ int part[PART_SIZE]; /* raw data buffer (partial) */
+ int whole[TOTAL_SIZE]; /* raw data buffer (total) */
+ hsize_t cur_size; /* current data space size */
+ char buffer[1024]; /* buffer to read efile_prefix */
+
+ TESTING("filenames relative to HDF5 file for external file");
+
+ if(HDsetenv("HDF5_EXTFILE_PREFIX", "", 1) < 0)
+ TEST_ERROR
- TESTING("opening external link twice");
+ if(HDmkdir("extern_dir", (mode_t)0755) < 0 && errno != EEXIST)
+ TEST_ERROR;
- /* Make a copy of the FAPL, in order to switch to the sec2 driver */
- /* (useful when running test with another VFD) */
- if((fapl = H5Pcopy(fapl)) < 0) FAIL_STACK_ERROR;
+ h5_fixname(FILENAME[4], fapl, filename, sizeof(filename));
+ if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
+ FAIL_STACK_ERROR;
- /* Switch local copy of the fapl to the sec2 driver */
- if(H5Pset_fapl_sec2(fapl) < 0) FAIL_STACK_ERROR;
+ /* Reset the raw data files */
+ if(reset_raw_data_files() < 0)
+ TEST_ERROR
- h5_fixname(FILENAME[3], fapl, filename, sizeof filename);
+ /* Create the dataset */
+ if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ FAIL_STACK_ERROR
+ if(NULL == HDgetcwd(cwdpath, sizeof(cwdpath)))
+ TEST_ERROR
+ for(i = 0; i < N_EXT_FILES; i++) {
+ HDsnprintf(filename, sizeof(filename), "..%sextern_%dr.raw", H5_DIR_SEPS, (int)i + 1);
+ if(H5Pset_external(dcpl, filename, (off_t)(i * GARBAGE_PER_FILE), (hsize_t)sizeof(part)) < 0)
+ FAIL_STACK_ERROR
+ } /* end for */
- if((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- goto error;
+ cur_size = TOTAL_SIZE;
+ if((space = H5Screate_simple(1, &cur_size, NULL)) < 0)
+ FAIL_STACK_ERROR
+ if((dapl = H5Pcreate(H5P_DATASET_ACCESS)) < 0)
+ FAIL_STACK_ERROR
+ if(H5Pset_efile_prefix(dapl, "${ORIGIN}") < 0)
+ FAIL_STACK_ERROR
+ if(H5Pget_efile_prefix(dapl, buffer, sizeof(buffer)) < 0)
+ FAIL_STACK_ERROR
+ if(HDstrcmp(buffer, "${ORIGIN}") != 0)
+ FAIL_PUTS_ERROR("efile prefix not set correctly");
+ if((dapl2 = H5Pcopy(dapl)) < 0)
+ FAIL_STACK_ERROR
- if((gid = H5Gopen2(fid, "/", H5P_DEFAULT)) < 0)
- goto error;
+ /* Create dataset */
+ if((dset = H5Dcreate2(file, "dset1", H5T_NATIVE_INT, space, H5P_DEFAULT, dcpl, dapl2)) < 0)
+ FAIL_STACK_ERROR
- /* Create an external link to an existing file*/
- if(H5Lcreate_external(pathname, "/group", gid, " link", H5P_DEFAULT, H5P_DEFAULT) < 0)
- goto error;
+ /* Reopen dataset with same efile_prefix property */
+ if((dset2 = H5Dopen2(file, "dset1", dapl2)) < 0)
+ FAIL_STACK_ERROR
- if(H5Gclose(gid) < 0)
- goto error;
+ /* Reopen dataset with different efile_prefix property */
+ if(H5Pset_efile_prefix(dapl, "//") < 0)
+ FAIL_STACK_ERROR
+ H5E_BEGIN_TRY {
+ dset3 = H5Dopen2(file, "dset1", dapl);
+ } H5E_END_TRY;
+ if(dset3 >= 0)
+ FAIL_PUTS_ERROR("reopening the dataset with a different efile_prefix succeded");
- if(H5Fclose(fid) < 0)
- goto error;
+ /* Read the entire dataset and compare with the original */
+ HDmemset(whole, 0, sizeof(whole));
+ if(H5Dread(dset, H5T_NATIVE_INT, space, space, H5P_DEFAULT, whole) < 0)
+ FAIL_STACK_ERROR
+ for(i = 0; i < TOTAL_SIZE; i++)
+ if(whole[i] != (signed)i)
+ FAIL_PUTS_ERROR("Incorrect value(s) read.");
+
+ /* Close dataset */
+ if(H5Dclose(dset2) < 0) FAIL_STACK_ERROR
+ if(H5Dclose(dset) < 0) FAIL_STACK_ERROR
+
+ /* Open dataset (use a differend prefix than for create.
+ * This works because the dataset was closed.
+ */
+ if(H5Pset_efile_prefix(dapl2, "${ORIGIN}/.") < 0)
+ FAIL_STACK_ERROR
+ if((dset = H5Dopen2(file, "dset1", dapl2)) < 0)
+ FAIL_STACK_ERROR
+
+ /* Reopen dataset with same efile_prefix property */
+ if((dset2 = H5Dopen2(file, "dset1", dapl2)) < 0)
+ FAIL_STACK_ERROR
+
+ /* Reopen dataset with different efile_prefix property */
+ if(H5Pset_efile_prefix(dapl, NULL) < 0)
+ FAIL_STACK_ERROR
+ H5E_BEGIN_TRY {
+ dset3 = H5Dopen2(file, "dset1", dapl);
+ } H5E_END_TRY;
+ if(dset3 >= 0)
+ FAIL_PUTS_ERROR("reopening the dataset with a different efile_prefix succeded");
- /* Reopen the file */
- if((fid = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0)
- goto error;
+ /* Read the entire dataset and compare with the original */
+ HDmemset(whole, 0, sizeof(whole));
+ if(H5Dread(dset, H5T_NATIVE_INT, space, space, H5P_DEFAULT, whole) < 0)
+ FAIL_STACK_ERROR
+ for(i = 0; i < TOTAL_SIZE; i++)
+ if(whole[i] != (signed)i)
+ FAIL_PUTS_ERROR("Incorrect value(s) read.");
+
+ if(H5Dclose(dset2) < 0) FAIL_STACK_ERROR
+ if(H5Dclose(dset) < 0) FAIL_STACK_ERROR
+ if(H5Pclose(dapl2) < 0) FAIL_STACK_ERROR
+ if(H5Pclose(dapl) < 0) FAIL_STACK_ERROR
+ if(H5Pclose(dcpl) < 0) FAIL_STACK_ERROR
+ if(H5Sclose(space) < 0) FAIL_STACK_ERROR
+ if(H5Fclose(file) < 0) FAIL_STACK_ERROR
+ PASSED();
+ return 0;
- /* Open the external link which is "/ link" as created previously via H5Lcreate_external() */
- if((xid = H5Gopen2(fid, "/ link", H5P_DEFAULT)) < 0)
- goto error;
+error:
+ H5E_BEGIN_TRY {
+ H5Pclose(dapl2);
+ H5Pclose(dapl);
+ H5Dclose(dset3);
+ H5Dclose(dset2);
+ H5Dclose(dset);
+ H5Pclose(dcpl);
+ H5Sclose(space);
+ H5Fclose(file);
+ } H5E_END_TRY;
+ return 1;
+} /* end test_path_relative_cwd() */
- /* Open the external link twice */
- if((xid2 = H5Gopen2(xid, ".", H5P_DEFAULT)) < 0)
- goto error;
+
+/*-------------------------------------------------------------------------
+ * Function: test_path_env
+ *
+ * Purpose: Test whether the value of HDF5_EXTFILE_PREFIX will overwrite
+ * the efile_prefix dataset access property.
+ * This will create an HDF5 file in a subdirectory which will
+ * refer to ../extern_*a.raw
+ * The files are then accessed by setting the HDF5_EXTFILE_PREFIX
+ * environment variable to "${ORIGIN}".
+ * The efile_prefix dataset access property is set to "someprefix",
+ * which will cause an error if the value is not overwritten by
+ * the environment variable.
+ *
+ * Return: Success: 0
+ * Failure: 1
+ *
+ * Programmer: Steffen Kiess
+ * March 10, 2015
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+test_path_env(hid_t fapl)
+{
+ hid_t file = -1; /* file to write to */
+ hid_t dcpl = -1; /* dataset creation properties */
+ hid_t space = -1; /* data space */
+ hid_t dapl = -1; /* dataset access property list */
+ hid_t dset = -1; /* dataset */
+ size_t i; /* miscellaneous counters */
+ char cwdpath[1024]; /* working directory */
+ char filename[1024]; /* file name */
+ int part[PART_SIZE]; /* raw data buffer (partial) */
+ int whole[TOTAL_SIZE]; /* raw data buffer (total) */
+ hsize_t cur_size; /* current data space size */
+ char buffer[1024]; /* buffer to read efile_prefix */
+
+ TESTING("prefix in HDF5_EXTFILE_PREFIX");
+
+ if(HDsetenv("HDF5_EXTFILE_PREFIX", "${ORIGIN}", 1))
+ TEST_ERROR
- if(H5Gclose(xid2) < 0)
- goto error;
+ if(HDmkdir("extern_dir", (mode_t)0755) < 0 && errno != EEXIST)
+ TEST_ERROR;
- if(H5Gclose(xid) < 0)
- goto error;
+ h5_fixname(FILENAME[4], fapl, filename, sizeof(filename));
+ if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
+ FAIL_STACK_ERROR
- if(H5Fclose(fid) < 0)
- goto error;
+ /* Reset the raw data files */
+ if(reset_raw_data_files() < 0)
+ TEST_ERROR
- if(H5Pclose(fapl) < 0)
+ /* Create the dataset */
+ if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ FAIL_STACK_ERROR
+ if(NULL == HDgetcwd(cwdpath, sizeof(cwdpath)))
TEST_ERROR
+ for(i = 0; i < N_EXT_FILES; i++) {
+ HDsnprintf(filename, sizeof(filename), "..%sextern_%dr.raw", H5_DIR_SEPS, (int) i + 1);
+ if(H5Pset_external(dcpl, filename, (off_t)(i * GARBAGE_PER_FILE), (hsize_t)sizeof(part)) < 0)
+ FAIL_STACK_ERROR
+ } /* end for */
+ cur_size = TOTAL_SIZE;
+ if((space = H5Screate_simple(1, &cur_size, NULL)) < 0)
+ FAIL_STACK_ERROR
+ if((dapl = H5Pcreate(H5P_DATASET_ACCESS)) < 0)
+ FAIL_STACK_ERROR
+
+ /* Set prefix to a nonexistent directory, will be overwritten by environment variable */
+ if(H5Pset_efile_prefix(dapl, "someprefix") < 0)
+ FAIL_STACK_ERROR
+ if(H5Pget_efile_prefix(dapl, buffer, sizeof(buffer)) < 0)
+ FAIL_STACK_ERROR
+ if(HDstrcmp(buffer, "someprefix") != 0)
+ FAIL_PUTS_ERROR("efile prefix not set correctly");
+
+ /* Create dataset */
+ if((dset = H5Dcreate2(file, "dset1", H5T_NATIVE_INT, space, H5P_DEFAULT, dcpl, dapl)) < 0)
+ FAIL_STACK_ERROR
+
+ /* Read the entire dataset and compare with the original */
+ HDmemset(whole, 0, sizeof(whole));
+ if(H5Dread(dset, H5T_NATIVE_INT, space, space, H5P_DEFAULT, whole) < 0)
+ FAIL_STACK_ERROR
+ for(i = 0; i < TOTAL_SIZE; i++)
+ if(whole[i] != (signed)i)
+ FAIL_PUTS_ERROR("Incorrect value(s) read.");
+
+ if(H5Dclose(dset) < 0) FAIL_STACK_ERROR
+ if(H5Pclose(dapl) < 0) FAIL_STACK_ERROR
+ if(H5Pclose(dcpl) < 0) FAIL_STACK_ERROR
+ if(H5Sclose(space) < 0) FAIL_STACK_ERROR
+ if(H5Fclose(file) < 0) FAIL_STACK_ERROR
PASSED();
+ return 0;
+error:
+ H5E_BEGIN_TRY {
+ H5Pclose(dapl);
+ H5Dclose(dset);
+ H5Pclose(dcpl);
+ H5Sclose(space);
+ H5Fclose(file);
+ } H5E_END_TRY;
+ return 1;
+} /* end test_path_env() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: test_h5d_get_access_plist
+ *
+ * Purpose: Ensure that H5Dget_access_plist returns correct values.
+ *
+ * Return: Success: 0
+ * Failure: 1
+ *
+ * Programmer: Dana Robinson
+ * March 2016
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+test_h5d_get_access_plist(hid_t fapl_id)
+{
+ hid_t fid = -1; /* file to write to */
+ hid_t dcpl_id = -1; /* dataset creation properties */
+ hid_t dapl_id = -1; /* dataset access properties */
+ hid_t sid = -1; /* data space */
+ hid_t did = -1; /* dataset */
+ hsize_t dims = 0; /* dataset size */
+ char *buffer = NULL; /* saved prefix name from dapl */
+ char filename[1024]; /* file names */
+
+ TESTING("H5Dget_access_plist() returns correct prefix");
+
+ if(HDsetenv("HDF5_EXTFILE_PREFIX", "", 1) < 0)
+ TEST_ERROR
+
+ /* Reset the raw data files */
+ if(reset_raw_data_files() < 0)
+ TEST_ERROR
+
+ /* Create the file */
+ h5_fixname(FILENAME[5], fapl_id, filename, sizeof(filename));
+ if((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id)) < 0)
+ FAIL_STACK_ERROR
+
+ /* Create the dcpl and set external storage */
+ if((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ FAIL_STACK_ERROR
+ if(H5Pset_external(dcpl_id, "extern_1r.raw", (off_t)0, (hsize_t)0) < 0)
+ FAIL_STACK_ERROR
+
+ /* Create the dapl and set the prefix */
+ if((dapl_id = H5Pcreate(H5P_DATASET_ACCESS)) < 0)
+ FAIL_STACK_ERROR
+ if(H5Pset_efile_prefix(dapl_id, "someprefix") < 0)
+ FAIL_STACK_ERROR
+
+ /* Create the dataset */
+ if((sid = H5Screate_simple(1, &dims, NULL)) < 0)
+ FAIL_STACK_ERROR
+ if((did = H5Dcreate2(fid, "dset1", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl_id, dapl_id)) < 0)
+ FAIL_STACK_ERROR
+
+ /* Close the dapl */
+ if(H5Pclose(dapl_id) < 0)
+ FAIL_STACK_ERROR
+ dapl_id = -1;
+
+ /* Get a data access property list from the dataset */
+ if((dapl_id = H5Dget_access_plist(did)) < 0)
+ FAIL_STACK_ERROR
+
+ /* Check the value for the external prefix */
+ if((buffer = (char *)HDcalloc((size_t)64, sizeof(char))) == NULL)
+ TEST_ERROR
+ if(H5Pget_efile_prefix(dapl_id, buffer, (size_t)64) < 0)
+ FAIL_STACK_ERROR
+ if(HDstrcmp(buffer, "someprefix") != 0)
+ FAIL_PUTS_ERROR("external file prefix from dapl incorrect");
+
+ /* Close everything */
+ HDfree(buffer);
+ if(H5Sclose(sid) < 0) FAIL_STACK_ERROR
+ if(H5Dclose(did) < 0) FAIL_STACK_ERROR
+ if(H5Pclose(dcpl_id) < 0) FAIL_STACK_ERROR
+ if(H5Pclose(dapl_id) < 0) FAIL_STACK_ERROR
+ if(H5Fclose(fid) < 0) FAIL_STACK_ERROR
+
+ PASSED();
return 0;
error:
+ if(buffer)
+ HDfree(buffer);
H5E_BEGIN_TRY {
- H5Gclose(gid);
- H5Gclose(xid);
- H5Gclose(xid2);
+ H5Dclose(did);
+ H5Pclose(dcpl_id);
+ H5Pclose(dapl_id);
+ H5Sclose(sid);
H5Fclose(fid);
} H5E_END_TRY;
return 1;
-}
+} /* end test_h5d_get_access_plist() */
/*-------------------------------------------------------------------------
- * Function: main
+ * Function: main
*
- * Purpose: Runs external dataset tests.
+ * Purpose: Runs external dataset tests.
*
- * Return: Success: exit(0)
- *
- * Failure: exit(non-zero)
+ * Return: EXIT_SUCCESS/EXIT_FAILURE
*
* Programmer: Robb Matzke
* Tuesday, March 3, 1998
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
int
-main (void)
+main(void)
{
- hid_t fapl=-1; /*file access properties */
- hid_t file=-1; /*file for test_1* functions */
- char filename[1024]; /*file name for test_1* funcs */
- hid_t grp=-1; /*group to emit diagnostics */
- int nerrors=0; /*number of errors */
+ hid_t fapl_id_old = -1; /* file access properties (old format) */
+ hid_t fapl_id_new = -1; /* file access properties (new format) */
+ hid_t fid = -1; /* file for test_1* functions */
+ hid_t gid = -1; /* group to emit diagnostics */
+ char filename[1024]; /* file name for test_1* funcs */
+ unsigned latest_format; /* default or latest file format */
+ int nerrors = 0; /* number of errors */
h5_reset();
- fapl = h5_fileaccess();
- h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
- if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) FAIL_STACK_ERROR
- if((grp = H5Gcreate2(file, "emit-diagnostics", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
- if(H5Gclose(grp) < 0) goto error;
-
- nerrors += test_1a(file);
- nerrors += test_1b(file);
- nerrors += test_1c(file);
- nerrors += test_1d(file);
- nerrors += test_1e(file);
- nerrors += test_1f(file);
- nerrors += test_1g();
- nerrors += test_1h();
- nerrors += test_2(fapl);
- nerrors += test_3(fapl);
- nerrors += test_4(fapl);
-
- /* Verify symbol table messages are cached */
- nerrors += (h5_verify_cached_stabs(FILENAME, fapl) < 0 ? 1 : 0);
-
- if (nerrors>0) goto error;
-
- if (H5Fclose(file) < 0) goto error;
- puts("All external storage tests passed.");
- if (h5_cleanup(FILENAME, fapl)) {
- remove("extern_1a.raw");
- remove("extern_1b.raw");
- remove("extern_2a.raw");
- remove("extern_2b.raw");
- remove("extern_3a.raw");
- remove("extern_3b.raw");
- remove("extern_4a.raw");
- remove("extern_4b.raw");
- }
- return 0;
+ /* Get a fapl for the old (default) file format */
+ fapl_id_old = h5_fileaccess();
+ h5_fixname(FILENAME[0], fapl_id_old, filename, sizeof(filename));
+
+ /* Copy and set up a fapl for the latest file format */
+ if((fapl_id_new = H5Pcopy(fapl_id_old)) < 0)
+ FAIL_STACK_ERROR
+ if(H5Pset_libver_bounds(fapl_id_new, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
+ FAIL_STACK_ERROR
+
+ /* The file format doesn't matter for this test */
+ nerrors += test_h5d_get_access_plist(fapl_id_new);
+ HDputs("");
+
+ /* Test with old & new format groups */
+ for(latest_format = FALSE; latest_format <= TRUE; latest_format++) {
+ hid_t current_fapl_id = -1;
+
+ /* Set the fapl for different file formats */
+ if(latest_format) {
+ HDputs("\nTesting with the latest file format:");
+ current_fapl_id = fapl_id_new;
+ } /* end if */
+ else {
+ HDputs("Testing with the default file format:");
+ current_fapl_id = fapl_id_old;
+ } /* end else */
+
+ /* Create the common file used by some of the tests */
+ if((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, current_fapl_id)) < 0)
+ FAIL_STACK_ERROR
+
+ /* Create a group that will be used in the file set read test */
+ if((gid = H5Gcreate2(fid, "emit-diagnostics", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ FAIL_STACK_ERROR
+ if(H5Gclose(gid) < 0) FAIL_STACK_ERROR
+
+ /* These tests use a common file */
+ nerrors += test_non_extendible(fid);
+ nerrors += test_too_small(fid);
+ nerrors += test_large_enough_current_eventual(fid);
+ nerrors += test_large_enough_current_not_eventual(fid);
+ nerrors += test_unlimited(fid);
+ nerrors += test_multiple_files(fid);
+
+ /* These tests use no file */
+ nerrors += test_add_to_unlimited();
+ nerrors += test_overflow();
+
+ /* These file set tests use the VFD-aware fapl */
+ nerrors += test_read_file_set(current_fapl_id);
+ nerrors += test_write_file_set(current_fapl_id);
+ nerrors += test_path_absolute(current_fapl_id);
+ nerrors += test_path_relative(current_fapl_id);
+ nerrors += test_path_relative_cwd(current_fapl_id);
+ nerrors += test_path_env(current_fapl_id);
+
+ /* Verify symbol table messages are cached */
+ nerrors += (h5_verify_cached_stabs(FILENAME, current_fapl_id) < 0 ? 1 : 0);
+
+ /* Close the common file */
+ if(H5Fclose(fid) < 0) FAIL_STACK_ERROR
+
+ } /* end for */
+
+ if(nerrors > 0) goto error;
+
+ /* Close the new ff fapl. h5_cleanup will take care of the old ff fapl */
+ if(H5Pclose(fapl_id_new) < 0) FAIL_STACK_ERROR
+
+ HDputs("All external storage tests passed.");
+
+ /* Clean up files used by file set tests */
+ if(h5_cleanup(FILENAME, fapl_id_old)) {
+ HDremove("extern_1r.raw");
+ HDremove("extern_2r.raw");
+ HDremove("extern_3r.raw");
+ HDremove("extern_4r.raw");
+
+ HDremove("extern_1w.raw");
+ HDremove("extern_2w.raw");
+ HDremove("extern_3w.raw");
+ HDremove("extern_4w.raw");
+
+ HDrmdir("extern_dir");
+ } /* end if */
+
+ return EXIT_SUCCESS;
error:
H5E_BEGIN_TRY {
- H5Fclose(file);
- H5Pclose(fapl);
+ H5Fclose(fid);
+ H5Pclose(fapl_id_old);
+ H5Pclose(fapl_id_new);
+ H5Gclose(gid);
} H5E_END_TRY;
nerrors = MAX(1, nerrors);
- printf ("%d TEST%s FAILED.\n", nerrors, 1==nerrors?"":"s");
- return 1;
-}
+ printf("%d TEST%s FAILED.\n", nerrors, 1 == nerrors ? "" : "s");
+ return EXIT_FAILURE;
+} /* end main() */
+
diff --git a/test/farray.c b/test/farray.c
index 2ea2a37..1679f38 100644
--- a/test/farray.c
+++ b/test/farray.c
@@ -410,11 +410,11 @@ finish(hid_t file, hid_t fapl, H5F_t *f, H5FA_t *fa, haddr_t fa_addr)
h5_stat_size_t file_size; /* File size, after deleting array */
/* Close the fixed array */
- if(H5FA_close(fa, H5P_DATASET_XFER_DEFAULT) < 0)
+ if(H5FA_close(fa, H5AC_ind_read_dxpl_id) < 0)
FAIL_STACK_ERROR
/* Delete array */
- if(H5FA_delete(f, H5P_DATASET_XFER_DEFAULT, fa_addr, NULL) < 0)
+ if(H5FA_delete(f, H5AC_ind_read_dxpl_id, fa_addr, NULL) < 0)
FAIL_STACK_ERROR
/* Close the file */
@@ -472,11 +472,11 @@ test_create(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t H5_ATTR_UNUSE
HDmemcpy(&test_cparam, cparam, sizeof(test_cparam));
test_cparam.raw_elmt_size = 0;
H5E_BEGIN_TRY {
- fa = H5FA_create(f, H5P_DATASET_XFER_DEFAULT, &test_cparam, NULL);
+ fa = H5FA_create(f, H5AC_ind_read_dxpl_id, &test_cparam, NULL);
} H5E_END_TRY;
if(fa) {
/* Close opened fixed array */
- H5FA_close(fa, H5P_DATASET_XFER_DEFAULT);
+ H5FA_close(fa, H5AC_ind_read_dxpl_id);
fa = NULL;
/* Indicate error */
@@ -487,11 +487,11 @@ test_create(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t H5_ATTR_UNUSE
HDmemcpy(&test_cparam, cparam, sizeof(test_cparam));
test_cparam.max_dblk_page_nelmts_bits = 0;
H5E_BEGIN_TRY {
- fa = H5FA_create(f, H5P_DATASET_XFER_DEFAULT, &test_cparam, NULL);
+ fa = H5FA_create(f, H5AC_ind_read_dxpl_id, &test_cparam, NULL);
} H5E_END_TRY;
if(fa) {
/* Close opened fixed array */
- H5FA_close(fa, H5P_DATASET_XFER_DEFAULT);
+ H5FA_close(fa, H5AC_ind_read_dxpl_id);
fa = NULL;
/* Indicate error */
@@ -502,11 +502,11 @@ test_create(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t H5_ATTR_UNUSE
HDmemcpy(&test_cparam, cparam, sizeof(test_cparam));
test_cparam.nelmts = 0;
H5E_BEGIN_TRY {
- fa = H5FA_create(f, H5P_DATASET_XFER_DEFAULT, &test_cparam, NULL);
+ fa = H5FA_create(f, H5AC_ind_read_dxpl_id, &test_cparam, NULL);
} H5E_END_TRY;
if(fa) {
/* Close opened fixed array */
- H5FA_close(fa, H5P_DATASET_XFER_DEFAULT);
+ H5FA_close(fa, H5AC_ind_read_dxpl_id);
fa = NULL;
/* Indicate error */
@@ -526,7 +526,7 @@ test_create(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t H5_ATTR_UNUSE
TESTING("fixed array creation");
/* Create array */
- if(create_array(f, H5P_DATASET_XFER_DEFAULT, cparam, &fa, &fa_addr) < 0)
+ if(create_array(f, H5AC_ind_read_dxpl_id, cparam, &fa, &fa_addr) < 0)
TEST_ERROR
PASSED()
@@ -550,7 +550,7 @@ test_create(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t H5_ATTR_UNUSE
error:
H5E_BEGIN_TRY {
if(fa)
- H5FA_close(fa, H5P_DATASET_XFER_DEFAULT);
+ H5FA_close(fa, H5AC_ind_read_dxpl_id);
H5Fclose(file);
} H5E_END_TRY;
@@ -586,19 +586,19 @@ test_reopen(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam)
TESTING("create, close & reopen fixed array");
/* Create array */
- if(create_array(f, H5P_DATASET_XFER_DEFAULT, cparam, &fa, &fa_addr) < 0)
+ if(create_array(f, H5AC_ind_read_dxpl_id, cparam, &fa, &fa_addr) < 0)
TEST_ERROR
/* Close the fixed array */
- if(H5FA_close(fa, H5P_DATASET_XFER_DEFAULT) < 0)
+ if(H5FA_close(fa, H5AC_ind_read_dxpl_id) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the file */
- if(reopen_file(&file, &f, fapl, H5P_DATASET_XFER_DEFAULT, NULL, HADDR_UNDEF, tparam) < 0)
+ if(reopen_file(&file, &f, fapl, H5AC_ind_read_dxpl_id, NULL, HADDR_UNDEF, tparam) < 0)
TEST_ERROR
/* Re-open the array */
- if(NULL == (fa = H5FA_open(f, H5P_DATASET_XFER_DEFAULT, fa_addr, NULL)))
+ if(NULL == (fa = H5FA_open(f, H5AC_ind_read_dxpl_id, fa_addr, NULL)))
FAIL_STACK_ERROR
/* Verify the creation parameters */
@@ -617,7 +617,7 @@ test_reopen(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam)
error:
H5E_BEGIN_TRY {
if(fa)
- H5FA_close(fa, H5P_DATASET_XFER_DEFAULT);
+ H5FA_close(fa, H5AC_ind_read_dxpl_id);
H5Fclose(file);
} H5E_END_TRY;
@@ -656,11 +656,11 @@ test_open_twice(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam)
TESTING("open fixed array twice");
/* Create array */
- if(create_array(f, H5P_DATASET_XFER_DEFAULT, cparam, &fa, &fa_addr) < 0)
+ if(create_array(f, H5AC_ind_read_dxpl_id, cparam, &fa, &fa_addr) < 0)
TEST_ERROR
/* Open the array again, through the first file handle */
- if(NULL == (fa2 = H5FA_open(f, H5P_DATASET_XFER_DEFAULT, fa_addr, NULL)))
+ if(NULL == (fa2 = H5FA_open(f, H5AC_ind_read_dxpl_id, fa_addr, NULL)))
FAIL_STACK_ERROR
/* Verify the creation parameters */
@@ -670,12 +670,12 @@ test_open_twice(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam)
TEST_ERROR
/* Close the second fixed array wrapper */
- if(H5FA_close(fa2, H5P_DATASET_XFER_DEFAULT) < 0)
+ if(H5FA_close(fa2, H5AC_ind_read_dxpl_id) < 0)
FAIL_STACK_ERROR
fa2 = NULL;
/* Check for closing & re-opening the file */
- if(reopen_file(&file, &f, fapl, H5P_DATASET_XFER_DEFAULT, &fa, fa_addr, tparam) < 0)
+ if(reopen_file(&file, &f, fapl, H5AC_ind_read_dxpl_id, &fa, fa_addr, tparam) < 0)
TEST_ERROR
/* Re-open the file */
@@ -687,7 +687,7 @@ test_open_twice(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam)
FAIL_STACK_ERROR
/* Open the fixed array through the second file handle */
- if(NULL == (fa2 = H5FA_open(f2, H5P_DATASET_XFER_DEFAULT, fa_addr, NULL)))
+ if(NULL == (fa2 = H5FA_open(f2, H5AC_ind_read_dxpl_id, fa_addr, NULL)))
FAIL_STACK_ERROR
/* Verify the creation parameters */
@@ -695,7 +695,7 @@ test_open_twice(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam)
TEST_ERROR
/* Close the first extensible array wrapper */
- if(H5FA_close(fa, H5P_DATASET_XFER_DEFAULT) < 0)
+ if(H5FA_close(fa, H5AC_ind_read_dxpl_id) < 0)
FAIL_STACK_ERROR
fa = NULL;
@@ -718,9 +718,9 @@ test_open_twice(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam)
error:
H5E_BEGIN_TRY {
if(fa)
- H5FA_close(fa, H5P_DATASET_XFER_DEFAULT);
+ H5FA_close(fa, H5AC_ind_read_dxpl_id);
if(fa2)
- H5FA_close(fa2, H5P_DATASET_XFER_DEFAULT);
+ H5FA_close(fa2, H5AC_ind_read_dxpl_id);
H5Fclose(file);
H5Fclose(file2);
} H5E_END_TRY;
@@ -768,11 +768,11 @@ test_open_twice_diff(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tpa
TEST_ERROR
/* Create array */
- if(create_array(f, H5P_DATASET_XFER_DEFAULT, cparam, &fa, &fa_addr) < 0)
+ if(create_array(f, H5AC_ind_read_dxpl_id, cparam, &fa, &fa_addr) < 0)
TEST_ERROR
/* Open the array again, through the first file handle */
- if(NULL == (fa2 = H5FA_open(f, H5P_DATASET_XFER_DEFAULT, fa_addr, NULL)))
+ if(NULL == (fa2 = H5FA_open(f, H5AC_ind_read_dxpl_id, fa_addr, NULL)))
FAIL_STACK_ERROR
/* Verify the creation parameters */
@@ -782,7 +782,7 @@ test_open_twice_diff(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tpa
TEST_ERROR
/* Close the second fixed array wrapper */
- if(H5FA_close(fa2, H5P_DATASET_XFER_DEFAULT) < 0)
+ if(H5FA_close(fa2, H5AC_ind_read_dxpl_id) < 0)
FAIL_STACK_ERROR
fa2 = NULL;
@@ -794,11 +794,11 @@ test_open_twice_diff(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tpa
FAIL_STACK_ERROR
/* Check for closing & re-opening the file */
- if(reopen_file(&file, &f, fapl, H5P_DATASET_XFER_DEFAULT, &fa, fa_addr, tparam) < 0)
+ if(reopen_file(&file, &f, fapl, H5AC_ind_read_dxpl_id, &fa, fa_addr, tparam) < 0)
TEST_ERROR
/* Close the first fixed array wrapper */
- if(H5FA_close(fa, H5P_DATASET_XFER_DEFAULT) < 0)
+ if(H5FA_close(fa, H5AC_ind_read_dxpl_id) < 0)
FAIL_STACK_ERROR
fa = NULL;
@@ -829,7 +829,7 @@ test_open_twice_diff(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tpa
FAIL_STACK_ERROR
/* Open the fixed array through the second file handle */
- if(NULL == (fa2 = H5FA_open(f2, H5P_DATASET_XFER_DEFAULT, fa_addr, NULL)))
+ if(NULL == (fa2 = H5FA_open(f2, H5AC_ind_read_dxpl_id, fa_addr, NULL)))
FAIL_STACK_ERROR
/* Verify the creation parameters */
@@ -854,9 +854,9 @@ test_open_twice_diff(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tpa
error:
H5E_BEGIN_TRY {
if(fa)
- H5FA_close(fa, H5P_DATASET_XFER_DEFAULT);
+ H5FA_close(fa, H5AC_ind_read_dxpl_id);
if(fa2)
- H5FA_close(fa2, H5P_DATASET_XFER_DEFAULT);
+ H5FA_close(fa2, H5AC_ind_read_dxpl_id);
H5Fclose(file);
H5Fclose(file2);
H5Fclose(file0);
@@ -897,15 +897,15 @@ test_delete_open(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam)
TESTING("deleting open fixed array");
/* Create array */
- if(create_array(f, H5P_DATASET_XFER_DEFAULT, cparam, &fa, &fa_addr) < 0)
+ if(create_array(f, H5AC_ind_read_dxpl_id, cparam, &fa, &fa_addr) < 0)
TEST_ERROR
/* Open the array again */
- if(NULL == (fa2 = H5FA_open(f, H5P_DATASET_XFER_DEFAULT, fa_addr, NULL)))
+ if(NULL == (fa2 = H5FA_open(f, H5AC_ind_read_dxpl_id, fa_addr, NULL)))
FAIL_STACK_ERROR
/* Request that the array be deleted */
- if(H5FA_delete(f, H5P_DATASET_XFER_DEFAULT, fa_addr, NULL) < 0)
+ if(H5FA_delete(f, H5AC_ind_read_dxpl_id, fa_addr, NULL) < 0)
FAIL_STACK_ERROR
/* Verify the creation parameters */
@@ -915,38 +915,38 @@ test_delete_open(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam)
TEST_ERROR
/* Close the second fixed array wrapper */
- if(H5FA_close(fa2, H5P_DATASET_XFER_DEFAULT) < 0)
+ if(H5FA_close(fa2, H5AC_ind_read_dxpl_id) < 0)
FAIL_STACK_ERROR
fa2 = NULL;
/* Try re-opening the array again (should fail, as array will be deleted) */
H5E_BEGIN_TRY {
- fa2 = H5FA_open(f, H5P_DATASET_XFER_DEFAULT, fa_addr, NULL);
+ fa2 = H5FA_open(f, H5AC_ind_read_dxpl_id, fa_addr, NULL);
} H5E_END_TRY;
if(fa2) {
/* Close opened array */
- H5FA_close(fa2, H5P_DATASET_XFER_DEFAULT);
+ H5FA_close(fa2, H5AC_ind_read_dxpl_id);
/* Indicate error */
TEST_ERROR
} /* end if */
/* Close the first fixed array wrapper */
- if(H5FA_close(fa, H5P_DATASET_XFER_DEFAULT) < 0)
+ if(H5FA_close(fa, H5AC_ind_read_dxpl_id) < 0)
FAIL_STACK_ERROR
fa = NULL;
/* Check for closing & re-opening the file */
- if(reopen_file(&file, &f, fapl, H5P_DATASET_XFER_DEFAULT, NULL, HADDR_UNDEF, tparam) < 0)
+ if(reopen_file(&file, &f, fapl, H5AC_ind_read_dxpl_id, NULL, HADDR_UNDEF, tparam) < 0)
TEST_ERROR
/* Try re-opening the array again (should fail, as array is now deleted) */
H5E_BEGIN_TRY {
- fa = H5FA_open(f, H5P_DATASET_XFER_DEFAULT, fa_addr, NULL);
+ fa = H5FA_open(f, H5AC_ind_read_dxpl_id, fa_addr, NULL);
} H5E_END_TRY;
if(fa) {
/* Close opened array */
- H5FA_close(fa, H5P_DATASET_XFER_DEFAULT);
+ H5FA_close(fa, H5AC_ind_read_dxpl_id);
/* Indicate error */
TEST_ERROR
@@ -972,9 +972,9 @@ test_delete_open(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam)
error:
H5E_BEGIN_TRY {
if(fa)
- H5FA_close(fa, H5P_DATASET_XFER_DEFAULT);
+ H5FA_close(fa, H5AC_ind_read_dxpl_id);
if(fa2)
- H5FA_close(fa2, H5P_DATASET_XFER_DEFAULT);
+ H5FA_close(fa2, H5AC_ind_read_dxpl_id);
H5Fclose(file);
} H5E_END_TRY;
@@ -1401,7 +1401,7 @@ test_set_elmts(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam,
TEST_ERROR
/* Create array */
- if(create_array(f, H5P_DATASET_XFER_DEFAULT, cparam, &fa, &fa_addr) < 0)
+ if(create_array(f, H5AC_ind_read_dxpl_id, cparam, &fa, &fa_addr) < 0)
TEST_ERROR
/* Verify the creation parameters */
@@ -1409,7 +1409,7 @@ test_set_elmts(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam,
TEST_ERROR
/* Check for closing & re-opening the file */
- if(reopen_file(&file, &f, fapl, H5P_DATASET_XFER_DEFAULT, &fa, fa_addr, tparam) < 0)
+ if(reopen_file(&file, &f, fapl, H5AC_ind_read_dxpl_id, &fa, fa_addr, tparam) < 0)
TEST_ERROR
if(H5FA_get_nelmts(fa, &fa_nelmts) < 0)
@@ -1441,7 +1441,7 @@ test_set_elmts(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam,
/* Retrieve element of array (not set yet) */
relmt = (uint64_t)0;
- if(H5FA_get(fa, H5P_DATASET_XFER_DEFAULT, idx, &relmt) < 0)
+ if(H5FA_get(fa, H5AC_ind_read_dxpl_id, idx, &relmt) < 0)
FAIL_STACK_ERROR
/* Verify that the retrieved is correct */
@@ -1468,7 +1468,7 @@ test_set_elmts(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam,
idx = (hsize_t)sidx;
relmt = (uint64_t)0;
- if(H5FA_get(fa, H5P_DATASET_XFER_DEFAULT, idx, &relmt) < 0)
+ if(H5FA_get(fa, H5AC_ind_read_dxpl_id, idx, &relmt) < 0)
FAIL_STACK_ERROR
/* Verify that the retrieved element is correct */
@@ -1477,12 +1477,12 @@ test_set_elmts(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam,
/* Set element of array */
welmt = (uint64_t)7 + idx;
- if(H5FA_set(fa, H5P_DATASET_XFER_DEFAULT, idx, &welmt) < 0)
+ if(H5FA_set(fa, H5AC_ind_read_dxpl_id, idx, &welmt) < 0)
FAIL_STACK_ERROR
/* Retrieve element of array (set now) */
relmt = (uint64_t)0;
- if(H5FA_get(fa, H5P_DATASET_XFER_DEFAULT, idx, &relmt) < 0)
+ if(H5FA_get(fa, H5AC_ind_read_dxpl_id, idx, &relmt) < 0)
FAIL_STACK_ERROR
/* Verify that the retrieved element is correct */
@@ -1512,7 +1512,7 @@ test_set_elmts(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam,
error:
H5E_BEGIN_TRY {
if(fa)
- H5FA_close(fa, H5P_DATASET_XFER_DEFAULT);
+ H5FA_close(fa, H5AC_ind_read_dxpl_id);
H5Fclose(file);
} H5E_END_TRY;
@@ -1556,7 +1556,7 @@ test_skip_elmts(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam,
TEST_ERROR
/* Create array */
- if(create_array(f, H5P_DATASET_XFER_DEFAULT, cparam, &fa, &fa_addr) < 0)
+ if(create_array(f, H5AC_ind_read_dxpl_id, cparam, &fa, &fa_addr) < 0)
TEST_ERROR
/* Verify the creation parameters */
@@ -1564,7 +1564,7 @@ test_skip_elmts(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam,
TEST_ERROR
/* Check for closing & re-opening the file */
- if(reopen_file(&file, &f, fapl, H5P_DATASET_XFER_DEFAULT, &fa, fa_addr, tparam) < 0)
+ if(reopen_file(&file, &f, fapl, H5AC_ind_read_dxpl_id, &fa, fa_addr, tparam) < 0)
TEST_ERROR
if(H5FA_get_nelmts(fa, &fa_nelmts) < 0)
@@ -1586,7 +1586,7 @@ test_skip_elmts(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam,
/* Retrieve element of array (not set yet) */
relmt = (uint64_t)0;
- if(H5FA_get(fa, H5P_DATASET_XFER_DEFAULT, idx, &relmt) < 0)
+ if(H5FA_get(fa, H5AC_ind_read_dxpl_id, idx, &relmt) < 0)
FAIL_STACK_ERROR
/* Verify that the retrieved is correct */
@@ -1595,7 +1595,7 @@ test_skip_elmts(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam,
/* Set element of array */
welmt = (uint64_t)7 + idx;
- if(H5FA_set(fa, H5P_DATASET_XFER_DEFAULT, idx, &welmt) < 0)
+ if(H5FA_set(fa, H5AC_ind_read_dxpl_id, idx, &welmt) < 0)
FAIL_STACK_ERROR
/* Verify array state */
@@ -1606,7 +1606,7 @@ test_skip_elmts(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam,
/* Retrieve element of array (set now) */
relmt = (uint64_t)0;
- if(H5FA_get(fa, H5P_DATASET_XFER_DEFAULT, idx, &relmt) < 0)
+ if(H5FA_get(fa, H5AC_ind_read_dxpl_id, idx, &relmt) < 0)
FAIL_STACK_ERROR
/* Verify that the retrieved is correct */
@@ -1618,7 +1618,7 @@ test_skip_elmts(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam,
for(cnt = 0; cnt < skip_elmts; cnt++) {
/* Retrieve element of array (not set yet) */
relmt = (uint64_t)0;
- if(H5FA_get(fa, H5P_DATASET_XFER_DEFAULT, cnt, &relmt) < 0)
+ if(H5FA_get(fa, H5AC_ind_read_dxpl_id, cnt, &relmt) < 0)
FAIL_STACK_ERROR
/* Verify that the retrieved is correct */
@@ -1639,7 +1639,7 @@ test_skip_elmts(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam,
error:
H5E_BEGIN_TRY {
if(fa)
- H5FA_close(fa, H5P_DATASET_XFER_DEFAULT);
+ H5FA_close(fa, H5AC_ind_read_dxpl_id);
H5Fclose(file);
} H5E_END_TRY;
diff --git a/test/fheap.c b/test/fheap.c
index 4df25db..8512f73 100644
--- a/test/fheap.c
+++ b/test/fheap.c
@@ -470,16 +470,16 @@ get_del_string(const fheap_test_param_t *tparam)
/* Remove half of total objects from heap */
if(tparam->del_dir == FHEAP_DEL_FORWARD)
if(tparam->drain_half == FHEAP_DEL_DRAIN_ALL)
- str = HDstrdup("(all - forward)");
+ str = H5MM_strdup("(all - forward)");
else
- str = HDstrdup("(half, refill, all - forward)");
+ str = H5MM_strdup("(half, refill, all - forward)");
else if(tparam->del_dir == FHEAP_DEL_REVERSE)
if(tparam->drain_half == FHEAP_DEL_DRAIN_ALL)
- str = HDstrdup("(all - reverse)");
+ str = H5MM_strdup("(all - reverse)");
else
- str = HDstrdup("(half, refill, all - reverse)");
+ str = H5MM_strdup("(half, refill, all - reverse)");
else
- str = HDstrdup("(all - deleting heap)");
+ str = H5MM_strdup("(all - deleting heap)");
return(str);
} /* get_del_string() */
@@ -1872,7 +1872,7 @@ test_create(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t H5_ATTR_UNUSED
*/
TESTING("fractal heap creation");
- if(NULL == (fh = H5HF_create(f, H5P_DATASET_XFER_DEFAULT, cparam)))
+ if(NULL == (fh = H5HF_create(f, H5AC_ind_read_dxpl_id, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -1896,11 +1896,11 @@ test_create(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t H5_ATTR_UNUSED
TEST_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, H5P_DATASET_XFER_DEFAULT) < 0)
+ if(H5HF_close(fh, H5AC_ind_read_dxpl_id) < 0)
FAIL_STACK_ERROR
/* Delete heap */
- if(H5HF_delete(f, H5P_DATASET_XFER_DEFAULT, fh_addr) < 0)
+ if(H5HF_delete(f, H5AC_ind_read_dxpl_id, fh_addr) < 0)
FAIL_STACK_ERROR
/* Close the file */
@@ -1923,7 +1923,7 @@ test_create(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t H5_ATTR_UNUSED
error:
H5E_BEGIN_TRY {
if(fh)
- H5HF_close(fh, H5P_DATASET_XFER_DEFAULT);
+ H5HF_close(fh, H5AC_ind_read_dxpl_id);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -1991,7 +1991,7 @@ test_reopen(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t H5_ATTR_UNUSED
TESTING("create, close & reopen fractal heap");
/* Create heap */
- if(NULL == (fh = H5HF_create(f, H5P_DATASET_XFER_DEFAULT, cparam)))
+ if(NULL == (fh = H5HF_create(f, H5AC_ind_read_dxpl_id, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -2006,7 +2006,7 @@ test_reopen(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t H5_ATTR_UNUSED
TEST_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, H5P_DATASET_XFER_DEFAULT) < 0)
+ if(H5HF_close(fh, H5AC_ind_read_dxpl_id) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the file */
@@ -2030,7 +2030,7 @@ test_reopen(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t H5_ATTR_UNUSED
} /* end if */
/* Re-open the heap */
- if(NULL == (fh = H5HF_open(f, H5P_DATASET_XFER_DEFAULT, fh_addr)))
+ if(NULL == (fh = H5HF_open(f, H5AC_ind_read_dxpl_id, fh_addr)))
FAIL_STACK_ERROR
/* Query the creation parameters */
@@ -2041,12 +2041,12 @@ test_reopen(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t H5_ATTR_UNUSED
TEST_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, H5P_DATASET_XFER_DEFAULT) < 0)
+ if(H5HF_close(fh, H5AC_ind_read_dxpl_id) < 0)
FAIL_STACK_ERROR
fh = NULL;
/* Delete heap */
- if(H5HF_delete(f, H5P_DATASET_XFER_DEFAULT, fh_addr) < 0)
+ if(H5HF_delete(f, H5AC_ind_read_dxpl_id, fh_addr) < 0)
FAIL_STACK_ERROR
/* Close the file */
@@ -2069,7 +2069,7 @@ test_reopen(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t H5_ATTR_UNUSED
error:
H5E_BEGIN_TRY {
if(fh)
- H5HF_close(fh, H5P_DATASET_XFER_DEFAULT);
+ H5HF_close(fh, H5AC_ind_read_dxpl_id);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -2139,7 +2139,7 @@ test_open_twice(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t H5_ATTR_UN
TESTING("open fractal heap twice");
/* Create heap */
- if(NULL == (fh = H5HF_create(f, H5P_DATASET_XFER_DEFAULT, cparam)))
+ if(NULL == (fh = H5HF_create(f, H5AC_ind_read_dxpl_id, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -2154,7 +2154,7 @@ test_open_twice(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t H5_ATTR_UN
TEST_ERROR
/* Open the heap again, through the first file handle */
- if(NULL == (fh2 = H5HF_open(f, H5P_DATASET_XFER_DEFAULT, fh_addr)))
+ if(NULL == (fh2 = H5HF_open(f, H5AC_ind_read_dxpl_id, fh_addr)))
FAIL_STACK_ERROR
/* Verify the creation parameters */
@@ -2165,12 +2165,12 @@ test_open_twice(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t H5_ATTR_UN
TEST_ERROR
/* Close the second fractal heap wrapper */
- if(H5HF_close(fh2, H5P_DATASET_XFER_DEFAULT) < 0)
+ if(H5HF_close(fh2, H5AC_ind_read_dxpl_id) < 0)
FAIL_STACK_ERROR
fh2 = NULL;
/* Check for closing & re-opening the heap & file */
- if(reopen_file(&file, &f, filename, fapl, H5P_DATASET_XFER_DEFAULT, &fh, fh_addr, tparam) < 0)
+ if(reopen_file(&file, &f, filename, fapl, H5AC_ind_read_dxpl_id, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Re-open the file */
@@ -2186,7 +2186,7 @@ test_open_twice(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t H5_ATTR_UN
FAIL_STACK_ERROR
/* Open the fractal heap through the second file handle */
- if(NULL == (fh2 = H5HF_open(f2, H5P_DATASET_XFER_DEFAULT, fh_addr)))
+ if(NULL == (fh2 = H5HF_open(f2, H5AC_ind_read_dxpl_id, fh_addr)))
FAIL_STACK_ERROR
/* Verify the creation parameters */
@@ -2197,7 +2197,7 @@ test_open_twice(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t H5_ATTR_UN
TEST_ERROR
/* Close the first fractal heap wrapper */
- if(H5HF_close(fh, H5P_DATASET_XFER_DEFAULT) < 0)
+ if(H5HF_close(fh, H5AC_ind_read_dxpl_id) < 0)
FAIL_STACK_ERROR
fh = NULL;
@@ -2209,12 +2209,12 @@ test_open_twice(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t H5_ATTR_UN
FAIL_STACK_ERROR
/* Close the second fractal heap wrapper */
- if(H5HF_close(fh2, H5P_DATASET_XFER_DEFAULT) < 0)
+ if(H5HF_close(fh2, H5AC_ind_read_dxpl_id) < 0)
FAIL_STACK_ERROR
fh2 = NULL;
/* Delete heap */
- if(H5HF_delete(f2, H5P_DATASET_XFER_DEFAULT, fh_addr) < 0)
+ if(H5HF_delete(f2, H5AC_ind_read_dxpl_id, fh_addr) < 0)
FAIL_STACK_ERROR
/* Close the second file */
@@ -2237,9 +2237,9 @@ test_open_twice(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t H5_ATTR_UN
error:
H5E_BEGIN_TRY {
if(fh)
- H5HF_close(fh, H5P_DATASET_XFER_DEFAULT);
+ H5HF_close(fh, H5AC_ind_read_dxpl_id);
if(fh2)
- H5HF_close(fh2, H5P_DATASET_XFER_DEFAULT);
+ H5HF_close(fh2, H5AC_ind_read_dxpl_id);
H5Fclose(file);
H5Fclose(file2);
} H5E_END_TRY;
@@ -2307,7 +2307,7 @@ test_delete_open(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t H5_ATTR_U
TESTING("deleting open fractal heap");
/* Create heap */
- if(NULL == (fh = H5HF_create(f, H5P_DATASET_XFER_DEFAULT, cparam)))
+ if(NULL == (fh = H5HF_create(f, H5AC_ind_read_dxpl_id, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -2322,11 +2322,11 @@ test_delete_open(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t H5_ATTR_U
TEST_ERROR
/* Open the heap again */
- if(NULL == (fh2 = H5HF_open(f, H5P_DATASET_XFER_DEFAULT, fh_addr)))
+ if(NULL == (fh2 = H5HF_open(f, H5AC_ind_read_dxpl_id, fh_addr)))
FAIL_STACK_ERROR
/* Request that the heap be deleted */
- if(H5HF_delete(f, H5P_DATASET_XFER_DEFAULT, fh_addr) < 0)
+ if(H5HF_delete(f, H5AC_ind_read_dxpl_id, fh_addr) < 0)
FAIL_STACK_ERROR
/* Verify the creation parameters */
@@ -2337,24 +2337,24 @@ test_delete_open(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t H5_ATTR_U
TEST_ERROR
/* Close the second fractal heap wrapper */
- if(H5HF_close(fh2, H5P_DATASET_XFER_DEFAULT) < 0)
+ if(H5HF_close(fh2, H5AC_ind_read_dxpl_id) < 0)
FAIL_STACK_ERROR
fh2 = NULL;
/* Try re-opening the heap again (should fail, as heap will be deleted) */
H5E_BEGIN_TRY {
- fh2 = H5HF_open(f, H5P_DATASET_XFER_DEFAULT, fh_addr);
+ fh2 = H5HF_open(f, H5AC_ind_read_dxpl_id, fh_addr);
} H5E_END_TRY;
if(fh2) {
/* Close opened heap */
- H5HF_close(fh2, H5P_DATASET_XFER_DEFAULT);
+ H5HF_close(fh2, H5AC_ind_read_dxpl_id);
/* Indicate error */
TEST_ERROR
} /* end if */
/* Close the first fractal heap wrapper */
- if(H5HF_close(fh, H5P_DATASET_XFER_DEFAULT) < 0)
+ if(H5HF_close(fh, H5AC_ind_read_dxpl_id) < 0)
FAIL_STACK_ERROR
fh = NULL;
@@ -2380,11 +2380,11 @@ test_delete_open(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t H5_ATTR_U
/* Try re-opening the heap again (should fail, as heap is now deleted) */
H5E_BEGIN_TRY {
- fh = H5HF_open(f, H5P_DATASET_XFER_DEFAULT, fh_addr);
+ fh = H5HF_open(f, H5AC_ind_read_dxpl_id, fh_addr);
} H5E_END_TRY;
if(fh) {
/* Close opened heap */
- H5HF_close(fh, H5P_DATASET_XFER_DEFAULT);
+ H5HF_close(fh, H5AC_ind_read_dxpl_id);
/* Indicate error */
TEST_ERROR
@@ -2410,9 +2410,9 @@ test_delete_open(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t H5_ATTR_U
error:
H5E_BEGIN_TRY {
if(fh)
- H5HF_close(fh, H5P_DATASET_XFER_DEFAULT);
+ H5HF_close(fh, H5AC_ind_read_dxpl_id);
if(fh2)
- H5HF_close(fh2, H5P_DATASET_XFER_DEFAULT);
+ H5HF_close(fh2, H5AC_ind_read_dxpl_id);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -2436,7 +2436,7 @@ static unsigned
test_id_limits(hid_t fapl, H5HF_create_t *cparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -2781,7 +2781,7 @@ static unsigned
test_filtered_create(hid_t fapl, H5HF_create_t *cparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -2849,7 +2849,7 @@ test_filtered_create(hid_t fapl, H5HF_create_t *cparam)
FAIL_STACK_ERROR
/* Re-open the heap */
- if(NULL == (fh = H5HF_open(f, H5P_DATASET_XFER_DEFAULT, fh_addr)))
+ if(NULL == (fh = H5HF_open(f, H5AC_ind_read_dxpl_id, fh_addr)))
FAIL_STACK_ERROR
/* Query the heap creation parameters */
@@ -2860,7 +2860,7 @@ test_filtered_create(hid_t fapl, H5HF_create_t *cparam)
FAIL_STACK_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, H5P_DATASET_XFER_DEFAULT) < 0)
+ if(H5HF_close(fh, H5AC_ind_read_dxpl_id) < 0)
FAIL_STACK_ERROR
@@ -2904,7 +2904,7 @@ static unsigned
test_size(hid_t fapl, H5HF_create_t *cparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -3005,7 +3005,7 @@ test_size(hid_t fapl, H5HF_create_t *cparam)
TEST_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, H5P_DATASET_XFER_DEFAULT) < 0)
+ if(H5HF_close(fh, H5AC_ind_read_dxpl_id) < 0)
FAIL_STACK_ERROR
@@ -3049,7 +3049,7 @@ test_reopen_hdr(hid_t fapl, H5HF_create_t *cparam)
{
hid_t file1 = -1; /* File ID */
hid_t file2 = -2; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -3143,7 +3143,7 @@ test_reopen_hdr(hid_t fapl, H5HF_create_t *cparam)
FAIL_STACK_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, H5P_DATASET_XFER_DEFAULT) < 0)
+ if(H5HF_close(fh, H5AC_ind_read_dxpl_id) < 0)
FAIL_STACK_ERROR
@@ -3185,7 +3185,7 @@ static unsigned
test_man_insert_weird(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -3297,7 +3297,7 @@ static unsigned
test_man_insert_first(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -3398,7 +3398,7 @@ static unsigned
test_man_insert_second(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -3494,7 +3494,7 @@ static unsigned
test_man_insert_root_mult(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -3593,7 +3593,7 @@ static unsigned
test_man_insert_force_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -3618,7 +3618,7 @@ test_man_insert_force_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_par
STACK_ERROR
/* Create absolute heap */
- if(NULL == (fh = H5HF_create(f, H5P_DATASET_XFER_DEFAULT, cparam)))
+ if(NULL == (fh = H5HF_create(f, H5AC_ind_read_dxpl_id, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -3699,7 +3699,7 @@ static unsigned
test_man_insert_fill_second(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -3724,7 +3724,7 @@ test_man_insert_fill_second(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_
STACK_ERROR
/* Create absolute heap */
- if(NULL == (fh = H5HF_create(f, H5P_DATASET_XFER_DEFAULT, cparam)))
+ if(NULL == (fh = H5HF_create(f, H5AC_ind_read_dxpl_id, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -3806,7 +3806,7 @@ static unsigned
test_man_insert_third_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -3831,7 +3831,7 @@ test_man_insert_third_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param
STACK_ERROR
/* Create absolute heap */
- if(NULL == (fh = H5HF_create(f, H5P_DATASET_XFER_DEFAULT, cparam)))
+ if(NULL == (fh = H5HF_create(f, H5AC_ind_read_dxpl_id, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -3917,7 +3917,7 @@ static unsigned
test_man_fill_first_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -3942,7 +3942,7 @@ test_man_fill_first_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *t
STACK_ERROR
/* Create absolute heap */
- if(NULL == (fh = H5HF_create(f, H5P_DATASET_XFER_DEFAULT, cparam)))
+ if(NULL == (fh = H5HF_create(f, H5AC_ind_read_dxpl_id, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -4013,7 +4013,7 @@ static unsigned
test_man_start_second_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -4038,7 +4038,7 @@ test_man_start_second_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
STACK_ERROR
/* Create absolute heap */
- if(NULL == (fh = H5HF_create(f, H5P_DATASET_XFER_DEFAULT, cparam)))
+ if(NULL == (fh = H5HF_create(f, H5AC_ind_read_dxpl_id, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -4116,7 +4116,7 @@ static unsigned
test_man_fill_second_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -4141,7 +4141,7 @@ test_man_fill_second_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *
STACK_ERROR
/* Create absolute heap */
- if(NULL == (fh = H5HF_create(f, H5P_DATASET_XFER_DEFAULT, cparam)))
+ if(NULL == (fh = H5HF_create(f, H5AC_ind_read_dxpl_id, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -4217,7 +4217,7 @@ static unsigned
test_man_start_third_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -4242,7 +4242,7 @@ test_man_start_third_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *
STACK_ERROR
/* Create absolute heap */
- if(NULL == (fh = H5HF_create(f, H5P_DATASET_XFER_DEFAULT, cparam)))
+ if(NULL == (fh = H5HF_create(f, H5AC_ind_read_dxpl_id, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -4327,7 +4327,7 @@ static unsigned
test_man_fill_fourth_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -4353,7 +4353,7 @@ test_man_fill_fourth_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *
STACK_ERROR
/* Create absolute heap */
- if(NULL == (fh = H5HF_create(f, H5P_DATASET_XFER_DEFAULT, cparam)))
+ if(NULL == (fh = H5HF_create(f, H5AC_ind_read_dxpl_id, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -4425,7 +4425,7 @@ static unsigned
test_man_fill_all_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -4450,7 +4450,7 @@ test_man_fill_all_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_para
STACK_ERROR
/* Create absolute heap */
- if(NULL == (fh = H5HF_create(f, H5P_DATASET_XFER_DEFAULT, cparam)))
+ if(NULL == (fh = H5HF_create(f, H5AC_ind_read_dxpl_id, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -4521,7 +4521,7 @@ static unsigned
test_man_first_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -4546,7 +4546,7 @@ test_man_first_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_
STACK_ERROR
/* Create absolute heap */
- if(NULL == (fh = H5HF_create(f, H5P_DATASET_XFER_DEFAULT, cparam)))
+ if(NULL == (fh = H5HF_create(f, H5AC_ind_read_dxpl_id, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -4623,7 +4623,7 @@ static unsigned
test_man_second_direct_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -4648,7 +4648,7 @@ test_man_second_direct_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fhe
STACK_ERROR
/* Create absolute heap */
- if(NULL == (fh = H5HF_create(f, H5P_DATASET_XFER_DEFAULT, cparam)))
+ if(NULL == (fh = H5HF_create(f, H5AC_ind_read_dxpl_id, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -4733,7 +4733,7 @@ static unsigned
test_man_fill_first_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -4758,7 +4758,7 @@ test_man_fill_first_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_
STACK_ERROR
/* Create absolute heap */
- if(NULL == (fh = H5HF_create(f, H5P_DATASET_XFER_DEFAULT, cparam)))
+ if(NULL == (fh = H5HF_create(f, H5AC_ind_read_dxpl_id, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -4836,7 +4836,7 @@ static unsigned
test_man_second_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -4861,7 +4861,7 @@ test_man_second_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test
STACK_ERROR
/* Create absolute heap */
- if(NULL == (fh = H5HF_create(f, H5P_DATASET_XFER_DEFAULT, cparam)))
+ if(NULL == (fh = H5HF_create(f, H5AC_ind_read_dxpl_id, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -4947,7 +4947,7 @@ static unsigned
test_man_fill_second_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -4972,7 +4972,7 @@ test_man_fill_second_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap
STACK_ERROR
/* Create absolute heap */
- if(NULL == (fh = H5HF_create(f, H5P_DATASET_XFER_DEFAULT, cparam)))
+ if(NULL == (fh = H5HF_create(f, H5AC_ind_read_dxpl_id, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -5055,7 +5055,7 @@ static unsigned
test_man_fill_recursive_indirect_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -5076,7 +5076,7 @@ test_man_fill_recursive_indirect_row(hid_t fapl, H5HF_create_t *cparam, fheap_te
STACK_ERROR
/* Create absolute heap */
- if(NULL == (fh = H5HF_create(f, H5P_DATASET_XFER_DEFAULT, cparam)))
+ if(NULL == (fh = H5HF_create(f, H5AC_ind_read_dxpl_id, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -5153,7 +5153,7 @@ static unsigned
test_man_start_2nd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -5178,7 +5178,7 @@ test_man_start_2nd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_t
STACK_ERROR
/* Create absolute heap */
- if(NULL == (fh = H5HF_create(f, H5P_DATASET_XFER_DEFAULT, cparam)))
+ if(NULL == (fh = H5HF_create(f, H5AC_ind_read_dxpl_id, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -5262,7 +5262,7 @@ static unsigned
test_man_recursive_indirect_two_deep(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -5287,7 +5287,7 @@ test_man_recursive_indirect_two_deep(hid_t fapl, H5HF_create_t *cparam, fheap_te
STACK_ERROR
/* Create absolute heap */
- if(NULL == (fh = H5HF_create(f, H5P_DATASET_XFER_DEFAULT, cparam)))
+ if(NULL == (fh = H5HF_create(f, H5AC_ind_read_dxpl_id, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -5365,7 +5365,7 @@ static unsigned
test_man_start_3rd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -5390,7 +5390,7 @@ test_man_start_3rd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_t
STACK_ERROR
/* Create absolute heap */
- if(NULL == (fh = H5HF_create(f, H5P_DATASET_XFER_DEFAULT, cparam)))
+ if(NULL == (fh = H5HF_create(f, H5AC_ind_read_dxpl_id, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -5475,7 +5475,7 @@ static unsigned
test_man_fill_first_3rd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -5500,7 +5500,7 @@ test_man_fill_first_3rd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fh
STACK_ERROR
/* Create absolute heap */
- if(NULL == (fh = H5HF_create(f, H5P_DATASET_XFER_DEFAULT, cparam)))
+ if(NULL == (fh = H5HF_create(f, H5AC_ind_read_dxpl_id, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -5586,7 +5586,7 @@ static unsigned
test_man_fill_3rd_recursive_indirect_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -5611,7 +5611,7 @@ test_man_fill_3rd_recursive_indirect_row(hid_t fapl, H5HF_create_t *cparam, fhea
STACK_ERROR
/* Create absolute heap */
- if(NULL == (fh = H5HF_create(f, H5P_DATASET_XFER_DEFAULT, cparam)))
+ if(NULL == (fh = H5HF_create(f, H5AC_ind_read_dxpl_id, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -5693,7 +5693,7 @@ static unsigned
test_man_fill_all_3rd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -5718,7 +5718,7 @@ test_man_fill_all_3rd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fhea
STACK_ERROR
/* Create absolute heap */
- if(NULL == (fh = H5HF_create(f, H5P_DATASET_XFER_DEFAULT, cparam)))
+ if(NULL == (fh = H5HF_create(f, H5AC_ind_read_dxpl_id, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -5801,7 +5801,7 @@ static unsigned
test_man_start_4th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -5826,7 +5826,7 @@ test_man_start_4th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_t
STACK_ERROR
/* Create absolute heap */
- if(NULL == (fh = H5HF_create(f, H5P_DATASET_XFER_DEFAULT, cparam)))
+ if(NULL == (fh = H5HF_create(f, H5AC_ind_read_dxpl_id, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -5916,7 +5916,7 @@ static unsigned
test_man_fill_first_4th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -5941,7 +5941,7 @@ test_man_fill_first_4th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fh
STACK_ERROR
/* Create absolute heap */
- if(NULL == (fh = H5HF_create(f, H5P_DATASET_XFER_DEFAULT, cparam)))
+ if(NULL == (fh = H5HF_create(f, H5AC_ind_read_dxpl_id, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -6036,7 +6036,7 @@ static unsigned
test_man_fill_4th_recursive_indirect_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -6061,7 +6061,7 @@ test_man_fill_4th_recursive_indirect_row(hid_t fapl, H5HF_create_t *cparam, fhea
STACK_ERROR
/* Create absolute heap */
- if(NULL == (fh = H5HF_create(f, H5P_DATASET_XFER_DEFAULT, cparam)))
+ if(NULL == (fh = H5HF_create(f, H5AC_ind_read_dxpl_id, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -6148,7 +6148,7 @@ static unsigned
test_man_fill_all_4th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -6173,7 +6173,7 @@ test_man_fill_all_4th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fhea
STACK_ERROR
/* Create absolute heap */
- if(NULL == (fh = H5HF_create(f, H5P_DATASET_XFER_DEFAULT, cparam)))
+ if(NULL == (fh = H5HF_create(f, H5AC_ind_read_dxpl_id, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -6263,7 +6263,7 @@ static unsigned
test_man_start_5th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -6288,7 +6288,7 @@ test_man_start_5th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_t
STACK_ERROR
/* Create absolute heap */
- if(NULL == (fh = H5HF_create(f, H5P_DATASET_XFER_DEFAULT, cparam)))
+ if(NULL == (fh = H5HF_create(f, H5AC_ind_read_dxpl_id, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -6392,7 +6392,7 @@ static unsigned
test_man_remove_bogus(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -6546,7 +6546,7 @@ static unsigned
test_man_remove_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -6709,7 +6709,7 @@ static unsigned
test_man_remove_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -6902,7 +6902,7 @@ static unsigned
test_man_remove_one_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -7070,7 +7070,7 @@ static unsigned
test_man_remove_two_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -7313,7 +7313,7 @@ static unsigned
test_man_remove_three_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -7614,7 +7614,7 @@ static unsigned
test_man_incr_insert_remove(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -7729,7 +7729,7 @@ static unsigned
test_man_remove_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -7803,7 +7803,7 @@ static unsigned
test_man_remove_two_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -7892,7 +7892,7 @@ static unsigned
test_man_remove_first_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -7963,7 +7963,7 @@ static unsigned
test_man_remove_first_two_rows(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -8036,7 +8036,7 @@ static unsigned
test_man_remove_first_four_rows(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -8113,7 +8113,7 @@ static unsigned
test_man_remove_all_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -8184,7 +8184,7 @@ static unsigned
test_man_remove_2nd_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -8259,7 +8259,7 @@ static unsigned
test_man_remove_3rd_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -8343,7 +8343,7 @@ static unsigned
test_man_skip_start_block(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -8421,7 +8421,7 @@ static unsigned
test_man_skip_start_block_add_back(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -8520,7 +8520,7 @@ static unsigned
test_man_skip_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -8630,7 +8630,7 @@ static unsigned
test_man_skip_2nd_block(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -8727,7 +8727,7 @@ static unsigned
test_man_skip_2nd_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -8872,7 +8872,7 @@ static unsigned
test_man_fill_one_partial_skip_2nd_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -9038,7 +9038,7 @@ static unsigned
test_man_fill_row_skip_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -9165,7 +9165,7 @@ static unsigned
test_man_skip_direct_skip_indirect_two_rows_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -9292,7 +9292,7 @@ static unsigned
test_man_fill_direct_skip_indirect_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -9416,7 +9416,7 @@ static unsigned
test_man_fill_direct_skip_2nd_indirect_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -9545,7 +9545,7 @@ static unsigned
test_man_fill_2nd_direct_less_one_wrap_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -9691,7 +9691,7 @@ static unsigned
test_man_fill_direct_skip_2nd_indirect_skip_2nd_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -9861,7 +9861,7 @@ static unsigned
test_man_fill_direct_skip_indirect_two_rows_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -10015,7 +10015,7 @@ static unsigned
test_man_fill_direct_skip_indirect_two_rows_skip_indirect_row_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -10195,7 +10195,7 @@ static unsigned
test_man_fill_2nd_direct_skip_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -10324,7 +10324,7 @@ static unsigned
test_man_fill_2nd_direct_skip_2nd_indirect_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -10462,7 +10462,7 @@ static unsigned
test_man_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -10614,7 +10614,7 @@ static unsigned
test_man_fill_2nd_direct_fill_direct_skip2_3rd_indirect_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -10777,7 +10777,7 @@ static unsigned
test_man_fill_3rd_direct_less_one_fill_direct_wrap_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -10940,7 +10940,7 @@ static unsigned
test_man_fill_1st_row_3rd_direct_fill_2nd_direct_less_one_wrap_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -11107,7 +11107,7 @@ static unsigned
test_man_fill_3rd_direct_fill_direct_skip_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -11269,7 +11269,7 @@ static unsigned
test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -11449,7 +11449,7 @@ static unsigned
test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_two_rows_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -11664,7 +11664,7 @@ static unsigned
test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -11861,7 +11861,7 @@ static unsigned
test_man_fill_4th_direct_less_one_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -12089,7 +12089,7 @@ static unsigned
test_man_frag_simple(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -12221,7 +12221,7 @@ static unsigned
test_man_frag_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -12393,7 +12393,7 @@ static unsigned
test_man_frag_2nd_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -12507,7 +12507,7 @@ static unsigned
test_man_frag_3rd_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -12622,7 +12622,7 @@ static unsigned
test_huge_insert_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -12775,7 +12775,7 @@ static unsigned
test_huge_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -13008,7 +13008,7 @@ static unsigned
test_huge_insert_three(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -13316,7 +13316,7 @@ static unsigned
test_huge_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -13742,7 +13742,7 @@ static unsigned
test_filtered_huge(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -13847,7 +13847,7 @@ test_filtered_huge(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam
STACK_ERROR
/* Re-open the heap */
- if(NULL == (fh = H5HF_open(f, H5P_DATASET_XFER_DEFAULT, fh_addr)))
+ if(NULL == (fh = H5HF_open(f, H5AC_ind_read_dxpl_id, fh_addr)))
FAIL_STACK_ERROR
#endif /* QAK */
/* QAK */
@@ -13958,7 +13958,7 @@ static unsigned
test_tiny_insert_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -14111,7 +14111,7 @@ static unsigned
test_tiny_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -14345,7 +14345,7 @@ static unsigned
test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -14956,7 +14956,7 @@ static unsigned
test_filtered_man_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -15027,7 +15027,7 @@ test_filtered_man_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_para
FAIL_STACK_ERROR
/* Re-open the heap */
- if(NULL == (fh = H5HF_open(f, H5P_DATASET_XFER_DEFAULT, fh_addr)))
+ if(NULL == (fh = H5HF_open(f, H5AC_ind_read_dxpl_id, fh_addr)))
FAIL_STACK_ERROR
/* Check up on heap... */
@@ -15068,7 +15068,7 @@ test_filtered_man_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_para
} /* end if */
/* Close the fractal heap */
- if(H5HF_close(fh, H5P_DATASET_XFER_DEFAULT) < 0)
+ if(H5HF_close(fh, H5AC_ind_read_dxpl_id) < 0)
FAIL_STACK_ERROR
fh = NULL;
@@ -15132,7 +15132,7 @@ static unsigned
test_filtered_man_root_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -15213,7 +15213,7 @@ test_filtered_man_root_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa
FAIL_STACK_ERROR
/* Re-open the heap */
- if(NULL == (fh = H5HF_open(f, H5P_DATASET_XFER_DEFAULT, fh_addr)))
+ if(NULL == (fh = H5HF_open(f, H5AC_ind_read_dxpl_id, fh_addr)))
FAIL_STACK_ERROR
/* Check up on heap... */
@@ -15277,7 +15277,7 @@ test_filtered_man_root_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa
FAIL_STACK_ERROR
/* Re-open the heap */
- if(NULL == (fh = H5HF_open(f, H5P_DATASET_XFER_DEFAULT, fh_addr)))
+ if(NULL == (fh = H5HF_open(f, H5AC_ind_read_dxpl_id, fh_addr)))
FAIL_STACK_ERROR
/* Remove object #2 from heap */
@@ -15313,7 +15313,7 @@ test_filtered_man_root_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa
FAIL_STACK_ERROR
/* Re-open the heap */
- if(NULL == (fh = H5HF_open(f, H5P_DATASET_XFER_DEFAULT, fh_addr)))
+ if(NULL == (fh = H5HF_open(f, H5AC_ind_read_dxpl_id, fh_addr)))
FAIL_STACK_ERROR
/* Check up on heap... */
@@ -15350,7 +15350,7 @@ test_filtered_man_root_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa
FAIL_STACK_ERROR
/* Re-open the heap */
- if(NULL == (fh = H5HF_open(f, H5P_DATASET_XFER_DEFAULT, fh_addr)))
+ if(NULL == (fh = H5HF_open(f, H5AC_ind_read_dxpl_id, fh_addr)))
FAIL_STACK_ERROR
/* Remove object #1 from heap */
@@ -15386,7 +15386,7 @@ test_filtered_man_root_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa
FAIL_STACK_ERROR
/* Re-open the heap */
- if(NULL == (fh = H5HF_open(f, H5P_DATASET_XFER_DEFAULT, fh_addr)))
+ if(NULL == (fh = H5HF_open(f, H5AC_ind_read_dxpl_id, fh_addr)))
FAIL_STACK_ERROR
/* Check up on heap... */
@@ -15397,7 +15397,7 @@ test_filtered_man_root_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa
} /* end if */
/* Close the fractal heap */
- if(H5HF_close(fh, H5P_DATASET_XFER_DEFAULT) < 0)
+ if(H5HF_close(fh, H5AC_ind_read_dxpl_id) < 0)
FAIL_STACK_ERROR
fh = NULL;
@@ -15467,7 +15467,7 @@ static unsigned
test_random(hsize_t size_limit, hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -15671,7 +15671,7 @@ static unsigned
test_random_pow2(hsize_t size_limit, hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -15897,7 +15897,7 @@ static unsigned
test_write(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -16027,7 +16027,7 @@ test_write(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
FAIL_STACK_ERROR
/* Re-open the heap */
- if(NULL == (fh = H5HF_open(f, H5P_DATASET_XFER_DEFAULT, fh_addr)))
+ if(NULL == (fh = H5HF_open(f, H5AC_ind_read_dxpl_id, fh_addr)))
FAIL_STACK_ERROR
/* Initialize data to overwrite with */
@@ -16094,7 +16094,7 @@ test_write(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
FAIL_STACK_ERROR
/* Re-open the heap */
- if(NULL == (fh = H5HF_open(f, H5P_DATASET_XFER_DEFAULT, fh_addr)))
+ if(NULL == (fh = H5HF_open(f, H5AC_ind_read_dxpl_id, fh_addr)))
FAIL_STACK_ERROR
/* Verify changed objects */
@@ -16174,7 +16174,7 @@ static unsigned
test_bug1(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
{
hid_t file = -1; /* File ID */
- hid_t dxpl = H5P_DATASET_XFER_DEFAULT; /* DXPL to use */
+ hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
char filename[FHEAP_FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5HF_t *fh = NULL; /* Fractal heap wrapper */
@@ -16259,7 +16259,7 @@ test_bug1(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
FAIL_STACK_ERROR
/* Re-open the heap */
- if(NULL == (fh = H5HF_open(f, H5P_DATASET_XFER_DEFAULT, fh_addr)))
+ if(NULL == (fh = H5HF_open(f, H5AC_ind_read_dxpl_id, fh_addr)))
FAIL_STACK_ERROR
/* Remove one of the objects */
@@ -16289,7 +16289,7 @@ test_bug1(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
FAIL_STACK_ERROR
/* Re-open the heap */
- if(NULL == (fh = H5HF_open(f, H5P_DATASET_XFER_DEFAULT, fh_addr)))
+ if(NULL == (fh = H5HF_open(f, H5AC_ind_read_dxpl_id, fh_addr)))
FAIL_STACK_ERROR
/* Insert another object */
diff --git a/test/file_image.c b/test/file_image.c
index 52d0b28..6d1845f 100644
--- a/test/file_image.c
+++ b/test/file_image.c
@@ -156,8 +156,8 @@ error:
if(H5Pclose(fapl_1) < 0) retval = 1;
if(H5Pclose(fapl_2) < 0) retval = 1;
HDfree(buffer);
- HDfree(temp);
- HDfree(temp2);
+ H5free_memory(temp);
+ H5free_memory(temp2);
if(retval == 0)
PASSED();
diff --git a/test/freespace.c b/test/freespace.c
index 28cf1de..be8d25e 100644
--- a/test/freespace.c
+++ b/test/freespace.c
@@ -487,7 +487,7 @@ test_fs_create(hid_t fapl)
init_cparam(&cparam);
nclasses = NELMTS(test_classes);
- if(NULL == (frsp = H5FS_create(f, H5P_DATASET_XFER_DEFAULT, &fs_addr,
+ if(NULL == (frsp = H5FS_create(f, H5AC_ind_read_dxpl_id, &fs_addr,
&cparam, nclasses, test_classes, &init_flags, (hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
FAIL_STACK_ERROR
@@ -507,12 +507,12 @@ test_fs_create(hid_t fapl)
FAIL_STACK_ERROR
/* Close the free space manager */
- if(H5FS_close(f, H5P_DATASET_XFER_DEFAULT, frsp) < 0)
+ if(H5FS_close(f, H5AC_ind_read_dxpl_id, frsp) < 0)
FAIL_STACK_ERROR
frsp = NULL;
/* reopen the free-space manager */
- if(NULL == (frsp = H5FS_open(f, H5P_DATASET_XFER_DEFAULT, fs_addr,
+ if(NULL == (frsp = H5FS_open(f, H5AC_ind_read_dxpl_id, fs_addr,
nclasses, test_classes, NULL, (hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
FAIL_STACK_ERROR
@@ -522,12 +522,12 @@ test_fs_create(hid_t fapl)
TEST_ERROR
/* Close the free space manager */
- if(H5FS_close(f, H5P_DATASET_XFER_DEFAULT, frsp) < 0)
+ if(H5FS_close(f, H5AC_ind_read_dxpl_id, frsp) < 0)
FAIL_STACK_ERROR
frsp = NULL;
/* Delete free space manager */
- if(H5FS_delete(f, H5P_DATASET_XFER_DEFAULT, fs_addr) < 0)
+ if(H5FS_delete(f, H5AC_ind_read_dxpl_id, fs_addr) < 0)
FAIL_STACK_ERROR
fs_addr = HADDR_UNDEF;
@@ -550,7 +550,7 @@ test_fs_create(hid_t fapl)
error:
H5E_BEGIN_TRY {
if(frsp)
- H5FS_close(f, H5P_DATASET_XFER_DEFAULT, frsp);
+ H5FS_close(f, H5AC_ind_read_dxpl_id, frsp);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -625,7 +625,7 @@ test_fs_sect_add(hid_t fapl)
init_cparam(&cparam);
nclasses = NELMTS(test_classes);
- if(NULL == (frsp = H5FS_create(f, H5P_DATASET_XFER_DEFAULT, &fs_addr,
+ if(NULL == (frsp = H5FS_create(f, H5AC_ind_read_dxpl_id, &fs_addr,
&cparam, nclasses, test_classes, &init_flags, (hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
FAIL_STACK_ERROR
@@ -637,7 +637,7 @@ test_fs_sect_add(hid_t fapl)
init_sect_node(sect_node, (haddr_t)TEST_SECT_ADDR80, (hsize_t)TEST_SECT_SIZE20, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE);
- if(H5FS_sect_add(f, H5P_DATASET_XFER_DEFAULT, frsp, (H5FS_section_info_t *)sect_node,
+ if(H5FS_sect_add(f, H5AC_ind_read_dxpl_id, frsp, (H5FS_section_info_t *)sect_node,
H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR
@@ -652,7 +652,7 @@ test_fs_sect_add(hid_t fapl)
fr_meta_size = H5FS_HEADER_SIZE(f) + H5FS_SINFO_PREFIX_SIZE(f);
/* Close the free space manager */
- if(H5FS_close(f, H5P_DATASET_XFER_DEFAULT, frsp) < 0)
+ if(H5FS_close(f, H5AC_ind_read_dxpl_id, frsp) < 0)
FAIL_STACK_ERROR
frsp = NULL;
@@ -687,7 +687,7 @@ test_fs_sect_add(hid_t fapl)
nclasses = NELMTS(test_classes);
init_flags = H5FS_CLS_GHOST_OBJ;
- if(NULL == (frsp = H5FS_create(f, H5P_DATASET_XFER_DEFAULT, &fs_addr,
+ if(NULL == (frsp = H5FS_create(f, H5AC_ind_read_dxpl_id, &fs_addr,
&cparam, nclasses, test_classes, &init_flags, (hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
FAIL_STACK_ERROR
@@ -700,7 +700,7 @@ test_fs_sect_add(hid_t fapl)
init_sect_node(sect_node, (haddr_t)TEST_SECT_ADDR80, (hsize_t)TEST_SECT_SIZE20, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE);
- if(H5FS_sect_add(f, H5P_DATASET_XFER_DEFAULT, frsp, (H5FS_section_info_t *)sect_node,
+ if(H5FS_sect_add(f, H5AC_ind_read_dxpl_id, frsp, (H5FS_section_info_t *)sect_node,
0, NULL) < 0)
FAIL_STACK_ERROR
@@ -715,7 +715,7 @@ test_fs_sect_add(hid_t fapl)
fr_meta_size = H5FS_HEADER_SIZE(f);
/* Close the free space manager */
- if(H5FS_close(f, H5P_DATASET_XFER_DEFAULT, frsp) < 0)
+ if(H5FS_close(f, H5AC_ind_read_dxpl_id, frsp) < 0)
FAIL_STACK_ERROR
/* Close the file */
@@ -759,7 +759,7 @@ test_fs_sect_add(hid_t fapl)
nclasses = NELMTS(test_classes);
init_flags = 0;
- if(NULL == (frsp = H5FS_create(f, H5P_DATASET_XFER_DEFAULT, &fs_addr,
+ if(NULL == (frsp = H5FS_create(f, H5AC_ind_read_dxpl_id, &fs_addr,
&cparam, nclasses, test_classes, &init_flags, (hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
FAIL_STACK_ERROR
@@ -774,7 +774,7 @@ test_fs_sect_add(hid_t fapl)
*/
init_sect_node(sect_node, (haddr_t)TEST_SECT_ADDR100, (hsize_t)TEST_SECT_SIZE50, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE);
- if(H5FS_sect_add(f, H5P_DATASET_XFER_DEFAULT, frsp, (H5FS_section_info_t *)sect_node,
+ if(H5FS_sect_add(f, H5AC_ind_read_dxpl_id, frsp, (H5FS_section_info_t *)sect_node,
H5FS_ADD_RETURNED_SPACE, &can_shrink) < 0)
FAIL_STACK_ERROR
@@ -785,12 +785,12 @@ test_fs_sect_add(hid_t fapl)
TEST_ERROR
/* Close the free space manager */
- if(H5FS_close(f, H5P_DATASET_XFER_DEFAULT, frsp) < 0)
+ if(H5FS_close(f, H5AC_ind_read_dxpl_id, frsp) < 0)
FAIL_STACK_ERROR
frsp = NULL;
/* Delete free space manager */
- if(H5FS_delete(f, H5P_DATASET_XFER_DEFAULT, fs_addr) < 0)
+ if(H5FS_delete(f, H5AC_ind_read_dxpl_id, fs_addr) < 0)
FAIL_STACK_ERROR
fs_addr = HADDR_UNDEF;
@@ -828,7 +828,7 @@ test_fs_sect_add(hid_t fapl)
nclasses = NELMTS(test_classes);
init_flags = 0;
- if(NULL == (frsp = H5FS_create(f, H5P_DATASET_XFER_DEFAULT, &fs_addr,
+ if(NULL == (frsp = H5FS_create(f, H5AC_ind_read_dxpl_id, &fs_addr,
&cparam, nclasses, test_classes, &init_flags, (hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
FAIL_STACK_ERROR
@@ -843,7 +843,7 @@ test_fs_sect_add(hid_t fapl)
*/
init_sect_node(sect_node, (haddr_t)TEST_SECT_ADDR100, (hsize_t)TEST_SECT_SIZE50, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE);
- if(H5FS_sect_add(f, H5P_DATASET_XFER_DEFAULT, frsp, (H5FS_section_info_t *)sect_node,
+ if(H5FS_sect_add(f, H5AC_ind_read_dxpl_id, frsp, (H5FS_section_info_t *)sect_node,
H5FS_ADD_DESERIALIZING, &can_shrink) < 0)
FAIL_STACK_ERROR
@@ -855,7 +855,7 @@ test_fs_sect_add(hid_t fapl)
if(check_stats(f, frsp, &state))
TEST_ERROR
- if(H5FS_sect_remove(f, H5P_DATASET_XFER_DEFAULT, frsp, (H5FS_section_info_t *)sect_node) < 0)
+ if(H5FS_sect_remove(f, H5AC_ind_read_dxpl_id, frsp, (H5FS_section_info_t *)sect_node) < 0)
FAIL_STACK_ERROR
/* Free the section node(s) */
@@ -864,12 +864,12 @@ test_fs_sect_add(hid_t fapl)
sect_node = NULL;
/* Close the free space manager */
- if(H5FS_close(f, H5P_DATASET_XFER_DEFAULT, frsp) < 0)
+ if(H5FS_close(f, H5AC_ind_read_dxpl_id, frsp) < 0)
FAIL_STACK_ERROR
frsp = NULL;
/* Delete free space manager */
- if(H5FS_delete(f, H5P_DATASET_XFER_DEFAULT, fs_addr) < 0)
+ if(H5FS_delete(f, H5AC_ind_read_dxpl_id, fs_addr) < 0)
FAIL_STACK_ERROR
fs_addr = HADDR_UNDEF;
@@ -886,7 +886,7 @@ error:
if(sect_node)
TEST_sect_free((H5FS_section_info_t *)sect_node);
if(frsp)
- H5FS_close(f, H5P_DATASET_XFER_DEFAULT, frsp);
+ H5FS_close(f, H5AC_ind_read_dxpl_id, frsp);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -946,7 +946,7 @@ test_fs_sect_find(hid_t fapl)
init_cparam(&cparam);
nclasses = NELMTS(test_classes);
- if(NULL == (frsp = H5FS_create(f, H5P_DATASET_XFER_DEFAULT, &fs_addr,
+ if(NULL == (frsp = H5FS_create(f, H5AC_ind_read_dxpl_id, &fs_addr,
&cparam, nclasses, test_classes, &init_flags, (hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
FAIL_STACK_ERROR
@@ -958,7 +958,7 @@ test_fs_sect_find(hid_t fapl)
if(check_stats(f, frsp, &state))
TEST_ERROR
- if((node_found = H5FS_sect_find(f, H5P_DATASET_XFER_DEFAULT, frsp,
+ if((node_found = H5FS_sect_find(f, H5AC_ind_read_dxpl_id, frsp,
(hsize_t)TEST_SECT_SIZE30, (H5FS_section_info_t **)&node)) < 0)
FAIL_STACK_ERROR
@@ -968,7 +968,7 @@ test_fs_sect_find(hid_t fapl)
TEST_ERROR
/* Close the free space manager */
- if(H5FS_close(f, H5P_DATASET_XFER_DEFAULT, frsp) < 0)
+ if(H5FS_close(f, H5AC_ind_read_dxpl_id, frsp) < 0)
FAIL_STACK_ERROR
frsp = NULL;
@@ -977,7 +977,7 @@ test_fs_sect_find(hid_t fapl)
TESTING("H5FS_sect_find() a section equal to requested-size from free-space");
/* reopen the free-space manager */
- if(NULL == (frsp = H5FS_open(f, H5P_DATASET_XFER_DEFAULT, fs_addr, nclasses,
+ if(NULL == (frsp = H5FS_open(f, H5AC_ind_read_dxpl_id, fs_addr, nclasses,
test_classes, NULL, (hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
FAIL_STACK_ERROR
@@ -994,7 +994,7 @@ test_fs_sect_find(hid_t fapl)
init_sect_node(sect_node1, (haddr_t)TEST_SECT_ADDR60, (hsize_t)TEST_SECT_SIZE30, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE);
- if(H5FS_sect_add(f, H5P_DATASET_XFER_DEFAULT, frsp, (H5FS_section_info_t *)sect_node1,
+ if(H5FS_sect_add(f, H5AC_ind_read_dxpl_id, frsp, (H5FS_section_info_t *)sect_node1,
H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR
@@ -1015,7 +1015,7 @@ test_fs_sect_find(hid_t fapl)
init_sect_node(sect_node3, (haddr_t)(TEST_SECT_ADDR200), (hsize_t)TEST_SECT_SIZE50, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE);
- if(H5FS_sect_add(f, H5P_DATASET_XFER_DEFAULT, frsp, (H5FS_section_info_t *)sect_node3,
+ if(H5FS_sect_add(f, H5AC_ind_read_dxpl_id, frsp, (H5FS_section_info_t *)sect_node3,
H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR
@@ -1034,7 +1034,7 @@ test_fs_sect_find(hid_t fapl)
init_sect_node(sect_node2, (haddr_t)TEST_SECT_ADDR100, (hsize_t)TEST_SECT_SIZE50, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE);
- if(H5FS_sect_add(f, H5P_DATASET_XFER_DEFAULT, frsp, (H5FS_section_info_t *)sect_node2,
+ if(H5FS_sect_add(f, H5AC_ind_read_dxpl_id, frsp, (H5FS_section_info_t *)sect_node2,
H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR
@@ -1053,7 +1053,7 @@ test_fs_sect_find(hid_t fapl)
init_sect_node(sect_node4, (haddr_t)TEST_SECT_ADDR300, (hsize_t)TEST_SECT_SIZE80, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE);
- if(H5FS_sect_add(f, H5P_DATASET_XFER_DEFAULT, frsp, (H5FS_section_info_t *)sect_node4,
+ if(H5FS_sect_add(f, H5AC_ind_read_dxpl_id, frsp, (H5FS_section_info_t *)sect_node4,
H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR
@@ -1064,7 +1064,7 @@ test_fs_sect_find(hid_t fapl)
if(check_stats(f, frsp, &state))
TEST_ERROR
- if((node_found = H5FS_sect_find(f, H5P_DATASET_XFER_DEFAULT, frsp,
+ if((node_found = H5FS_sect_find(f, H5AC_ind_read_dxpl_id, frsp,
(hsize_t)TEST_SECT_SIZE50, (H5FS_section_info_t **)&node)) < 0)
FAIL_STACK_ERROR
@@ -1077,11 +1077,11 @@ test_fs_sect_find(hid_t fapl)
TEST_ERROR
/* remove sections A, C and D */
- if(H5FS_sect_remove(f, H5P_DATASET_XFER_DEFAULT, frsp, (H5FS_section_info_t *)sect_node1) < 0)
+ if(H5FS_sect_remove(f, H5AC_ind_read_dxpl_id, frsp, (H5FS_section_info_t *)sect_node1) < 0)
FAIL_STACK_ERROR
- if(H5FS_sect_remove(f, H5P_DATASET_XFER_DEFAULT, frsp, (H5FS_section_info_t *)sect_node3) < 0)
+ if(H5FS_sect_remove(f, H5AC_ind_read_dxpl_id, frsp, (H5FS_section_info_t *)sect_node3) < 0)
FAIL_STACK_ERROR
- if(H5FS_sect_remove(f, H5P_DATASET_XFER_DEFAULT, frsp, (H5FS_section_info_t *)sect_node4) < 0)
+ if(H5FS_sect_remove(f, H5AC_ind_read_dxpl_id, frsp, (H5FS_section_info_t *)sect_node4) < 0)
FAIL_STACK_ERROR
/* Free the section node(s) */
@@ -1096,7 +1096,7 @@ test_fs_sect_find(hid_t fapl)
sect_node4 = NULL;
/* Close the free space manager */
- if(H5FS_close(f, H5P_DATASET_XFER_DEFAULT, frsp) < 0)
+ if(H5FS_close(f, H5AC_ind_read_dxpl_id, frsp) < 0)
FAIL_STACK_ERROR
frsp = NULL;
@@ -1105,7 +1105,7 @@ test_fs_sect_find(hid_t fapl)
TESTING("H5FS_sect_find() a section greater than requested-size from free-space");
/* reopen the free-space manager */
- if(NULL == (frsp = H5FS_open(f, H5P_DATASET_XFER_DEFAULT, fs_addr, nclasses,
+ if(NULL == (frsp = H5FS_open(f, H5AC_ind_read_dxpl_id, fs_addr, nclasses,
test_classes, NULL, (hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
FAIL_STACK_ERROR
@@ -1122,7 +1122,7 @@ test_fs_sect_find(hid_t fapl)
init_sect_node(sect_node1, (haddr_t)TEST_SECT_ADDR60, (hsize_t)TEST_SECT_SIZE30, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE);
- if(H5FS_sect_add(f, H5P_DATASET_XFER_DEFAULT, frsp, (H5FS_section_info_t *)sect_node1,
+ if(H5FS_sect_add(f, H5AC_ind_read_dxpl_id, frsp, (H5FS_section_info_t *)sect_node1,
H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR
@@ -1142,7 +1142,7 @@ test_fs_sect_find(hid_t fapl)
init_sect_node(sect_node2, (haddr_t)TEST_SECT_ADDR200, (hsize_t)TEST_SECT_SIZE80, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE);
- if(H5FS_sect_add(f, H5P_DATASET_XFER_DEFAULT, frsp, (H5FS_section_info_t *)sect_node2,
+ if(H5FS_sect_add(f, H5AC_ind_read_dxpl_id, frsp, (H5FS_section_info_t *)sect_node2,
H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR
@@ -1153,7 +1153,7 @@ test_fs_sect_find(hid_t fapl)
if(check_stats(f, frsp, &state))
TEST_ERROR
- if((node_found = H5FS_sect_find(f, H5P_DATASET_XFER_DEFAULT, frsp,
+ if((node_found = H5FS_sect_find(f, H5AC_ind_read_dxpl_id, frsp,
(hsize_t)TEST_SECT_SIZE50, (H5FS_section_info_t **)&node)) < 0)
FAIL_STACK_ERROR
@@ -1166,7 +1166,7 @@ test_fs_sect_find(hid_t fapl)
node = NULL;
/* remove sections A */
- if(H5FS_sect_remove(f, H5P_DATASET_XFER_DEFAULT, frsp, (H5FS_section_info_t *)sect_node1) < 0)
+ if(H5FS_sect_remove(f, H5AC_ind_read_dxpl_id, frsp, (H5FS_section_info_t *)sect_node1) < 0)
FAIL_STACK_ERROR
/* Free the section node(s) */
@@ -1175,7 +1175,7 @@ test_fs_sect_find(hid_t fapl)
sect_node1 = NULL;
/* Close the free space manager */
- if(H5FS_close(f, H5P_DATASET_XFER_DEFAULT, frsp) < 0)
+ if(H5FS_close(f, H5AC_ind_read_dxpl_id, frsp) < 0)
FAIL_STACK_ERROR
frsp = NULL;
@@ -1184,7 +1184,7 @@ test_fs_sect_find(hid_t fapl)
TESTING("H5FS_sect_find(): cannot find a section with requested-size from free-space");
/* reopen the free-space manager */
- if(NULL == (frsp = H5FS_open(f, H5P_DATASET_XFER_DEFAULT, fs_addr, nclasses,
+ if(NULL == (frsp = H5FS_open(f, H5AC_ind_read_dxpl_id, fs_addr, nclasses,
test_classes, NULL, (hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
FAIL_STACK_ERROR
@@ -1201,7 +1201,7 @@ test_fs_sect_find(hid_t fapl)
init_sect_node(sect_node1, (haddr_t)TEST_SECT_ADDR60, (hsize_t)TEST_SECT_SIZE30, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE);
- if(H5FS_sect_add(f, H5P_DATASET_XFER_DEFAULT, frsp, (H5FS_section_info_t *)sect_node1,
+ if(H5FS_sect_add(f, H5AC_ind_read_dxpl_id, frsp, (H5FS_section_info_t *)sect_node1,
H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR
@@ -1213,14 +1213,14 @@ test_fs_sect_find(hid_t fapl)
if(check_stats(f, frsp, &state))
TEST_ERROR
- if((node_found = H5FS_sect_find(f, H5P_DATASET_XFER_DEFAULT, frsp,
+ if((node_found = H5FS_sect_find(f, H5AC_ind_read_dxpl_id, frsp,
(hsize_t)TEST_SECT_SIZE50, (H5FS_section_info_t **)&node)) < 0)
FAIL_STACK_ERROR
if (node_found) TEST_ERROR
/* remove sections A */
- if(H5FS_sect_remove(f, H5P_DATASET_XFER_DEFAULT, frsp, (H5FS_section_info_t *)sect_node1) < 0)
+ if(H5FS_sect_remove(f, H5AC_ind_read_dxpl_id, frsp, (H5FS_section_info_t *)sect_node1) < 0)
FAIL_STACK_ERROR
/* Free the section node(s) */
@@ -1229,12 +1229,12 @@ test_fs_sect_find(hid_t fapl)
sect_node1 = NULL;
/* Close the free space manager */
- if(H5FS_close(f, H5P_DATASET_XFER_DEFAULT, frsp) < 0)
+ if(H5FS_close(f, H5AC_ind_read_dxpl_id, frsp) < 0)
FAIL_STACK_ERROR
frsp = NULL;
/* Delete free space manager */
- if(H5FS_delete(f, H5P_DATASET_XFER_DEFAULT, fs_addr) < 0)
+ if(H5FS_delete(f, H5AC_ind_read_dxpl_id, fs_addr) < 0)
FAIL_STACK_ERROR
fs_addr = HADDR_UNDEF;
@@ -1255,7 +1255,7 @@ error:
if(sect_node4)
TEST_sect_free((H5FS_section_info_t *)sect_node4);
if(frsp)
- H5FS_close(f, H5P_DATASET_XFER_DEFAULT, frsp);
+ H5FS_close(f, H5AC_ind_read_dxpl_id, frsp);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -1330,7 +1330,7 @@ test_fs_sect_merge(hid_t fapl)
init_cparam(&cparam);
nclasses = NELMTS(test_classes);
- if(NULL == (frsp = H5FS_create(f, H5P_DATASET_XFER_DEFAULT, &fs_addr,
+ if(NULL == (frsp = H5FS_create(f, H5AC_ind_read_dxpl_id, &fs_addr,
&cparam, nclasses, test_classes, &init_flags, (hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
FAIL_STACK_ERROR
@@ -1345,7 +1345,7 @@ test_fs_sect_merge(hid_t fapl)
init_sect_node(sect_node1, (haddr_t)TEST_SECT_ADDR100, (hsize_t)TEST_SECT_SIZE50, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE);
- if(H5FS_sect_add(f, H5P_DATASET_XFER_DEFAULT, frsp, (H5FS_section_info_t *)sect_node1,
+ if(H5FS_sect_add(f, H5AC_ind_read_dxpl_id, frsp, (H5FS_section_info_t *)sect_node1,
H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR
@@ -1365,7 +1365,7 @@ test_fs_sect_merge(hid_t fapl)
init_sect_node(sect_node2, (haddr_t)TEST_SECT_ADDR70, (hsize_t)TEST_SECT_SIZE30, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE);
- if(H5FS_sect_add(f, H5P_DATASET_XFER_DEFAULT, frsp, (H5FS_section_info_t *)sect_node2,
+ if(H5FS_sect_add(f, H5AC_ind_read_dxpl_id, frsp, (H5FS_section_info_t *)sect_node2,
H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR
@@ -1383,7 +1383,7 @@ test_fs_sect_merge(hid_t fapl)
init_sect_node(sect_node3, (haddr_t)TEST_SECT_ADDR60, (hsize_t)TEST_SECT_SIZE10, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE);
- if(H5FS_sect_add(f, H5P_DATASET_XFER_DEFAULT, frsp, (H5FS_section_info_t *)sect_node3,
+ if(H5FS_sect_add(f, H5AC_ind_read_dxpl_id, frsp, (H5FS_section_info_t *)sect_node3,
H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR
@@ -1401,7 +1401,7 @@ test_fs_sect_merge(hid_t fapl)
init_sect_node(sect_node4, (haddr_t)TEST_SECT_ADDR150, (hsize_t)TEST_SECT_SIZE80, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE);
- if(H5FS_sect_add(f, H5P_DATASET_XFER_DEFAULT, frsp, (H5FS_section_info_t *)sect_node4,
+ if(H5FS_sect_add(f, H5AC_ind_read_dxpl_id, frsp, (H5FS_section_info_t *)sect_node4,
H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR
@@ -1413,7 +1413,7 @@ test_fs_sect_merge(hid_t fapl)
/* should be able to find the merged section of A, B, C & D */
- if((node_found = H5FS_sect_find(f, H5P_DATASET_XFER_DEFAULT, frsp,
+ if((node_found = H5FS_sect_find(f, H5AC_ind_read_dxpl_id, frsp,
(hsize_t)(TEST_SECT_SIZE10+TEST_SECT_SIZE30+TEST_SECT_SIZE50+TEST_SECT_SIZE80), (H5FS_section_info_t **)&node)) < 0)
FAIL_STACK_ERROR
@@ -1426,12 +1426,12 @@ test_fs_sect_merge(hid_t fapl)
TEST_ERROR
/* Close the free space manager */
- if(H5FS_close(f, H5P_DATASET_XFER_DEFAULT, frsp) < 0)
+ if(H5FS_close(f, H5AC_ind_read_dxpl_id, frsp) < 0)
FAIL_STACK_ERROR
frsp = NULL;
/* Delete free space manager */
- if(H5FS_delete(f, H5P_DATASET_XFER_DEFAULT, fs_addr) < 0)
+ if(H5FS_delete(f, H5AC_ind_read_dxpl_id, fs_addr) < 0)
FAIL_STACK_ERROR
fs_addr = HADDR_UNDEF;
@@ -1458,7 +1458,7 @@ test_fs_sect_merge(hid_t fapl)
nclasses = NELMTS(test_classes);
init_flags = H5FS_CLS_SEPAR_OBJ;
- if(NULL == (frsp = H5FS_create(f, H5P_DATASET_XFER_DEFAULT, &fs_addr,
+ if(NULL == (frsp = H5FS_create(f, H5AC_ind_read_dxpl_id, &fs_addr,
&cparam, nclasses, test_classes, &init_flags, (hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
FAIL_STACK_ERROR
@@ -1473,7 +1473,7 @@ test_fs_sect_merge(hid_t fapl)
init_sect_node(sect_node1, (haddr_t)TEST_SECT_ADDR70, (hsize_t)TEST_SECT_SIZE30, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE);
- if(H5FS_sect_add(f, H5P_DATASET_XFER_DEFAULT, frsp, (H5FS_section_info_t *)sect_node1,
+ if(H5FS_sect_add(f, H5AC_ind_read_dxpl_id, frsp, (H5FS_section_info_t *)sect_node1,
H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR
@@ -1493,7 +1493,7 @@ test_fs_sect_merge(hid_t fapl)
init_sect_node(sect_node2, (haddr_t)TEST_SECT_ADDR100, (hsize_t)TEST_SECT_SIZE50, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE);
- if(H5FS_sect_add(f, H5P_DATASET_XFER_DEFAULT, frsp, (H5FS_section_info_t *)sect_node2,
+ if(H5FS_sect_add(f, H5AC_ind_read_dxpl_id, frsp, (H5FS_section_info_t *)sect_node2,
H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR
@@ -1506,17 +1506,17 @@ test_fs_sect_merge(hid_t fapl)
TEST_ERROR
/* should not be able to find the merged section of A & B */
- if((node_found = H5FS_sect_find(f, H5P_DATASET_XFER_DEFAULT, frsp,
+ if((node_found = H5FS_sect_find(f, H5AC_ind_read_dxpl_id, frsp,
(hsize_t)(TEST_SECT_SIZE30+TEST_SECT_SIZE50), (H5FS_section_info_t **)&node)) < 0)
FAIL_STACK_ERROR
if (node_found) TEST_ERROR
/* remove section A from free-space */
- if(H5FS_sect_remove(f, H5P_DATASET_XFER_DEFAULT, frsp, (H5FS_section_info_t *)sect_node1) < 0)
+ if(H5FS_sect_remove(f, H5AC_ind_read_dxpl_id, frsp, (H5FS_section_info_t *)sect_node1) < 0)
FAIL_STACK_ERROR
/* remove section B from free-space */
- if(H5FS_sect_remove(f, H5P_DATASET_XFER_DEFAULT, frsp, (H5FS_section_info_t *)sect_node2) < 0)
+ if(H5FS_sect_remove(f, H5AC_ind_read_dxpl_id, frsp, (H5FS_section_info_t *)sect_node2) < 0)
FAIL_STACK_ERROR
/* Free the section node(s) */
@@ -1528,12 +1528,12 @@ test_fs_sect_merge(hid_t fapl)
sect_node2 = NULL;
/* Close the free space manager */
- if(H5FS_close(f, H5P_DATASET_XFER_DEFAULT, frsp) < 0)
+ if(H5FS_close(f, H5AC_ind_read_dxpl_id, frsp) < 0)
FAIL_STACK_ERROR
frsp = NULL;
/* Delete free space manager */
- if(H5FS_delete(f, H5P_DATASET_XFER_DEFAULT, fs_addr) < 0)
+ if(H5FS_delete(f, H5AC_ind_read_dxpl_id, fs_addr) < 0)
FAIL_STACK_ERROR
fs_addr = HADDR_UNDEF;
@@ -1560,7 +1560,7 @@ test_fs_sect_merge(hid_t fapl)
nclasses = NELMTS(test_classes);
init_flags = 0; /* reset */
- if(NULL == (frsp = H5FS_create(f, H5P_DATASET_XFER_DEFAULT, &fs_addr,
+ if(NULL == (frsp = H5FS_create(f, H5AC_ind_read_dxpl_id, &fs_addr,
&cparam, nclasses, test_classes, &init_flags, (hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
FAIL_STACK_ERROR
@@ -1575,7 +1575,7 @@ test_fs_sect_merge(hid_t fapl)
init_sect_node(sect_node1, (haddr_t)TEST_SECT_ADDR60, (hsize_t)TEST_SECT_SIZE10, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE);
- if(H5FS_sect_add(f, H5P_DATASET_XFER_DEFAULT, frsp, (H5FS_section_info_t *)sect_node1,
+ if(H5FS_sect_add(f, H5AC_ind_read_dxpl_id, frsp, (H5FS_section_info_t *)sect_node1,
H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR
@@ -1595,7 +1595,7 @@ test_fs_sect_merge(hid_t fapl)
init_sect_node(sect_node2, (haddr_t)TEST_SECT_ADDR70, (hsize_t)TEST_SECT_SIZE30, TEST_FSPACE_SECT_TYPE_NEW, H5FS_SECT_LIVE);
- if(H5FS_sect_add(f, H5P_DATASET_XFER_DEFAULT, frsp, (H5FS_section_info_t *)sect_node2,
+ if(H5FS_sect_add(f, H5AC_ind_read_dxpl_id, frsp, (H5FS_section_info_t *)sect_node2,
H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR
@@ -1615,7 +1615,7 @@ test_fs_sect_merge(hid_t fapl)
init_sect_node(sect_node3, (haddr_t)TEST_SECT_ADDR100, (hsize_t)TEST_SECT_SIZE50, TEST_FSPACE_SECT_TYPE_NEW, H5FS_SECT_LIVE);
- if(H5FS_sect_add(f, H5P_DATASET_XFER_DEFAULT, frsp, (H5FS_section_info_t *)sect_node3,
+ if(H5FS_sect_add(f, H5AC_ind_read_dxpl_id, frsp, (H5FS_section_info_t *)sect_node3,
H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR
@@ -1633,7 +1633,7 @@ test_fs_sect_merge(hid_t fapl)
init_sect_node(sect_node4, (haddr_t)TEST_SECT_ADDR150, (hsize_t)TEST_SECT_SIZE80, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE);
- if(H5FS_sect_add(f, H5P_DATASET_XFER_DEFAULT, frsp, (H5FS_section_info_t *)sect_node4,
+ if(H5FS_sect_add(f, H5AC_ind_read_dxpl_id, frsp, (H5FS_section_info_t *)sect_node4,
H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR
@@ -1649,14 +1649,14 @@ test_fs_sect_merge(hid_t fapl)
TEST_ERROR
/* should not be able to find a merged section of A, B, C & D */
- if((node_found = H5FS_sect_find(f, H5P_DATASET_XFER_DEFAULT, frsp,
+ if((node_found = H5FS_sect_find(f, H5AC_ind_read_dxpl_id, frsp,
(hsize_t)(TEST_SECT_SIZE10+TEST_SECT_SIZE30+TEST_SECT_SIZE50+TEST_SECT_SIZE80), (H5FS_section_info_t **)&node)) < 0)
FAIL_STACK_ERROR
if (node_found) TEST_ERROR
/* should be able to find the merged section of B & C */
- if((node_found = H5FS_sect_find(f, H5P_DATASET_XFER_DEFAULT, frsp,
+ if((node_found = H5FS_sect_find(f, H5AC_ind_read_dxpl_id, frsp,
(hsize_t)(TEST_SECT_SIZE30+TEST_SECT_SIZE50), (H5FS_section_info_t **)&node)) < 0)
FAIL_STACK_ERROR
@@ -1670,7 +1670,7 @@ test_fs_sect_merge(hid_t fapl)
TEST_ERROR
/* should be able to find section A */
- if((node_found = H5FS_sect_find(f, H5P_DATASET_XFER_DEFAULT, frsp,
+ if((node_found = H5FS_sect_find(f, H5AC_ind_read_dxpl_id, frsp,
(hsize_t)(TEST_SECT_SIZE10), (H5FS_section_info_t **)&node)) < 0)
FAIL_STACK_ERROR
@@ -1683,7 +1683,7 @@ test_fs_sect_merge(hid_t fapl)
TEST_ERROR
/* should be able to find section D */
- if((node_found = H5FS_sect_find(f, H5P_DATASET_XFER_DEFAULT, frsp,
+ if((node_found = H5FS_sect_find(f, H5AC_ind_read_dxpl_id, frsp,
(hsize_t)(TEST_SECT_SIZE80), (H5FS_section_info_t **)&node)) < 0)
FAIL_STACK_ERROR
@@ -1696,12 +1696,12 @@ test_fs_sect_merge(hid_t fapl)
TEST_ERROR
/* Close the free space manager */
- if(H5FS_close(f, H5P_DATASET_XFER_DEFAULT, frsp) < 0)
+ if(H5FS_close(f, H5AC_ind_read_dxpl_id, frsp) < 0)
FAIL_STACK_ERROR
frsp = NULL;
/* Delete free space manager */
- if(H5FS_delete(f, H5P_DATASET_XFER_DEFAULT, fs_addr) < 0)
+ if(H5FS_delete(f, H5AC_ind_read_dxpl_id, fs_addr) < 0)
FAIL_STACK_ERROR
fs_addr = HADDR_UNDEF;
@@ -1720,7 +1720,7 @@ error:
if(sect_node2)
TEST_sect_free((H5FS_section_info_t *)sect_node2);
if(frsp)
- H5FS_close(f, H5P_DATASET_XFER_DEFAULT, frsp);
+ H5FS_close(f, H5AC_ind_read_dxpl_id, frsp);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -1796,7 +1796,7 @@ test_fs_sect_shrink(hid_t fapl)
TEST_set_eoa((haddr_t)TEST_SECT_ADDR150); /* set end of file address for shrinking */
- if(NULL == (frsp = H5FS_create(f, H5P_DATASET_XFER_DEFAULT, &fs_addr,
+ if(NULL == (frsp = H5FS_create(f, H5AC_ind_read_dxpl_id, &fs_addr,
&cparam, nclasses, test_classes, &init_flags, (hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
FAIL_STACK_ERROR
@@ -1812,7 +1812,7 @@ test_fs_sect_shrink(hid_t fapl)
init_sect_node(sect_node1, (haddr_t)TEST_SECT_ADDR100, (hsize_t)TEST_SECT_SIZE50, TEST_FSPACE_SECT_TYPE_NEW, H5FS_SECT_LIVE);
can_shrink = FALSE;
- if(H5FS_sect_add(f, H5P_DATASET_XFER_DEFAULT, frsp, (H5FS_section_info_t *)sect_node1,
+ if(H5FS_sect_add(f, H5AC_ind_read_dxpl_id, frsp, (H5FS_section_info_t *)sect_node1,
H5FS_ADD_RETURNED_SPACE, &can_shrink) < 0)
FAIL_STACK_ERROR
@@ -1825,7 +1825,7 @@ test_fs_sect_shrink(hid_t fapl)
TEST_ERROR
/* section A should still be there in free-space */
- if((node_found = H5FS_sect_find(f, H5P_DATASET_XFER_DEFAULT, frsp,
+ if((node_found = H5FS_sect_find(f, H5AC_ind_read_dxpl_id, frsp,
(hsize_t)(TEST_SECT_SIZE50), (H5FS_section_info_t **)&node)) < 0)
FAIL_STACK_ERROR
@@ -1846,7 +1846,7 @@ test_fs_sect_shrink(hid_t fapl)
init_sect_node(sect_node1, (haddr_t)TEST_SECT_ADDR100, (hsize_t)TEST_SECT_SIZE50, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE);
can_shrink = FALSE;
- if(H5FS_sect_add(f, H5P_DATASET_XFER_DEFAULT, frsp, (H5FS_section_info_t *)sect_node1,
+ if(H5FS_sect_add(f, H5AC_ind_read_dxpl_id, frsp, (H5FS_section_info_t *)sect_node1,
H5FS_ADD_RETURNED_SPACE, &can_shrink) < 0)
FAIL_STACK_ERROR
@@ -1857,19 +1857,19 @@ test_fs_sect_shrink(hid_t fapl)
TEST_ERROR
/* section A should not be there in free-space */
- if((node_found = H5FS_sect_find(f, H5P_DATASET_XFER_DEFAULT, frsp,
+ if((node_found = H5FS_sect_find(f, H5AC_ind_read_dxpl_id, frsp,
(hsize_t)(TEST_SECT_SIZE50), (H5FS_section_info_t **)&node)) < 0)
FAIL_STACK_ERROR
if (node_found) TEST_ERROR
/* Close the free space manager */
- if(H5FS_close(f, H5P_DATASET_XFER_DEFAULT, frsp) < 0)
+ if(H5FS_close(f, H5AC_ind_read_dxpl_id, frsp) < 0)
FAIL_STACK_ERROR
frsp = NULL;
/* Delete free space manager */
- if(H5FS_delete(f, H5P_DATASET_XFER_DEFAULT, fs_addr) < 0)
+ if(H5FS_delete(f, H5AC_ind_read_dxpl_id, fs_addr) < 0)
FAIL_STACK_ERROR
fs_addr = HADDR_UNDEF;
@@ -1897,7 +1897,7 @@ test_fs_sect_shrink(hid_t fapl)
/* does not allow merging */
init_flags = H5FS_CLS_SEPAR_OBJ;
- if(NULL == (frsp = H5FS_create(f, H5P_DATASET_XFER_DEFAULT, &fs_addr,
+ if(NULL == (frsp = H5FS_create(f, H5AC_ind_read_dxpl_id, &fs_addr,
&cparam, nclasses, test_classes, &init_flags, (hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
FAIL_STACK_ERROR
@@ -1912,7 +1912,7 @@ test_fs_sect_shrink(hid_t fapl)
init_sect_node(sect_node1, (haddr_t)TEST_SECT_ADDR80, (hsize_t)TEST_SECT_SIZE20, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE);
- if(H5FS_sect_add(f, H5P_DATASET_XFER_DEFAULT, frsp, (H5FS_section_info_t *)sect_node1,
+ if(H5FS_sect_add(f, H5AC_ind_read_dxpl_id, frsp, (H5FS_section_info_t *)sect_node1,
H5FS_ADD_RETURNED_SPACE, &can_shrink) < 0)
FAIL_STACK_ERROR
@@ -1932,7 +1932,7 @@ test_fs_sect_shrink(hid_t fapl)
init_sect_node(sect_node2, (haddr_t)TEST_SECT_ADDR100, (hsize_t)TEST_SECT_SIZE50, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE);
- if(H5FS_sect_add(f, H5P_DATASET_XFER_DEFAULT, frsp, (H5FS_section_info_t *)sect_node2,
+ if(H5FS_sect_add(f, H5AC_ind_read_dxpl_id, frsp, (H5FS_section_info_t *)sect_node2,
H5FS_ADD_RETURNED_SPACE, &can_shrink) < 0)
FAIL_STACK_ERROR
@@ -1941,7 +1941,7 @@ test_fs_sect_shrink(hid_t fapl)
TEST_ERROR
/* section B should not be there in free-space */
- if((node_found = H5FS_sect_find(f, H5P_DATASET_XFER_DEFAULT, frsp,
+ if((node_found = H5FS_sect_find(f, H5AC_ind_read_dxpl_id, frsp,
(hsize_t)(TEST_SECT_SIZE50), (H5FS_section_info_t **)&node)) < 0)
FAIL_STACK_ERROR
@@ -1952,7 +1952,7 @@ test_fs_sect_shrink(hid_t fapl)
/* section A should still be there in free-space */
- if((node_found = H5FS_sect_find(f, H5P_DATASET_XFER_DEFAULT, frsp,
+ if((node_found = H5FS_sect_find(f, H5AC_ind_read_dxpl_id, frsp,
(hsize_t)(TEST_SECT_SIZE20), (H5FS_section_info_t **)&node)) < 0)
FAIL_STACK_ERROR
@@ -1965,12 +1965,12 @@ test_fs_sect_shrink(hid_t fapl)
TEST_ERROR
/* Close the free space manager */
- if(H5FS_close(f, H5P_DATASET_XFER_DEFAULT, frsp) < 0)
+ if(H5FS_close(f, H5AC_ind_read_dxpl_id, frsp) < 0)
FAIL_STACK_ERROR
frsp = NULL;
/* Delete free space manager */
- if(H5FS_delete(f, H5P_DATASET_XFER_DEFAULT, fs_addr) < 0)
+ if(H5FS_delete(f, H5AC_ind_read_dxpl_id, fs_addr) < 0)
FAIL_STACK_ERROR
fs_addr = HADDR_UNDEF;
@@ -1996,7 +1996,7 @@ test_fs_sect_shrink(hid_t fapl)
TEST_set_eoa((haddr_t)TEST_SECT_ADDR150); /* set end of file address for shrinking */
init_flags = 0; /* reset */
- if(NULL == (frsp = H5FS_create(f, H5P_DATASET_XFER_DEFAULT, &fs_addr,
+ if(NULL == (frsp = H5FS_create(f, H5AC_ind_read_dxpl_id, &fs_addr,
&cparam, nclasses, test_classes, &init_flags, (hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
FAIL_STACK_ERROR
@@ -2011,7 +2011,7 @@ test_fs_sect_shrink(hid_t fapl)
init_sect_node(sect_node1, (haddr_t)TEST_SECT_ADDR70, (hsize_t)TEST_SECT_SIZE30, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE);
- if(H5FS_sect_add(f, H5P_DATASET_XFER_DEFAULT, frsp, (H5FS_section_info_t *)sect_node1,
+ if(H5FS_sect_add(f, H5AC_ind_read_dxpl_id, frsp, (H5FS_section_info_t *)sect_node1,
H5FS_ADD_RETURNED_SPACE, &can_shrink) < 0)
FAIL_STACK_ERROR
@@ -2031,7 +2031,7 @@ test_fs_sect_shrink(hid_t fapl)
init_sect_node(sect_node2, (haddr_t)TEST_SECT_ADDR100, (hsize_t)TEST_SECT_SIZE50, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE);
- if(H5FS_sect_add(f, H5P_DATASET_XFER_DEFAULT, frsp, (H5FS_section_info_t *)sect_node2,
+ if(H5FS_sect_add(f, H5AC_ind_read_dxpl_id, frsp, (H5FS_section_info_t *)sect_node2,
H5FS_ADD_RETURNED_SPACE, &can_shrink) < 0)
FAIL_STACK_ERROR
@@ -2041,26 +2041,26 @@ test_fs_sect_shrink(hid_t fapl)
TEST_ERROR
/* section B should not be there in free-space */
- if((node_found = H5FS_sect_find(f, H5P_DATASET_XFER_DEFAULT, frsp,
+ if((node_found = H5FS_sect_find(f, H5AC_ind_read_dxpl_id, frsp,
(hsize_t)(TEST_SECT_SIZE50), (H5FS_section_info_t **)&node)) < 0)
FAIL_STACK_ERROR
if (node_found) TEST_ERROR
/* section A should not be there in free-space */
- if((node_found = H5FS_sect_find(f, H5P_DATASET_XFER_DEFAULT, frsp,
+ if((node_found = H5FS_sect_find(f, H5AC_ind_read_dxpl_id, frsp,
(hsize_t)(TEST_SECT_SIZE30), (H5FS_section_info_t **)&node)) < 0)
FAIL_STACK_ERROR
if (node_found) TEST_ERROR
/* Close the free space manager */
- if(H5FS_close(f, H5P_DATASET_XFER_DEFAULT, frsp) < 0)
+ if(H5FS_close(f, H5AC_ind_read_dxpl_id, frsp) < 0)
FAIL_STACK_ERROR
frsp = NULL;
/* Delete free space manager */
- if(H5FS_delete(f, H5P_DATASET_XFER_DEFAULT, fs_addr) < 0)
+ if(H5FS_delete(f, H5AC_ind_read_dxpl_id, fs_addr) < 0)
FAIL_STACK_ERROR
fs_addr = HADDR_UNDEF;
@@ -2075,7 +2075,7 @@ test_fs_sect_shrink(hid_t fapl)
error:
H5E_BEGIN_TRY {
if(frsp)
- H5FS_close(f, H5P_DATASET_XFER_DEFAULT, frsp);
+ H5FS_close(f, H5AC_ind_read_dxpl_id, frsp);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -2131,7 +2131,7 @@ test_fs_sect_change_class(hid_t fapl)
nclasses = NELMTS(test_classes);
init_flags = H5FS_CLS_GHOST_OBJ;
- if(NULL == (frsp = H5FS_create(f, H5P_DATASET_XFER_DEFAULT, &fs_addr,
+ if(NULL == (frsp = H5FS_create(f, H5AC_ind_read_dxpl_id, &fs_addr,
&cparam, nclasses, test_classes, &init_flags, (hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
FAIL_STACK_ERROR
@@ -2146,7 +2146,7 @@ test_fs_sect_change_class(hid_t fapl)
init_sect_node(sect_node1, (haddr_t)TEST_SECT_ADDR60, (hsize_t)TEST_SECT_SIZE30, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE);
- if(H5FS_sect_add(f, H5P_DATASET_XFER_DEFAULT, frsp, (H5FS_section_info_t *)sect_node1,
+ if(H5FS_sect_add(f, H5AC_ind_read_dxpl_id, frsp, (H5FS_section_info_t *)sect_node1,
H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR
@@ -2166,7 +2166,7 @@ test_fs_sect_change_class(hid_t fapl)
init_sect_node(sect_node2, (haddr_t)TEST_SECT_ADDR100, (hsize_t)TEST_SECT_SIZE50, TEST_FSPACE_SECT_TYPE_NONE, H5FS_SECT_LIVE);
- if(H5FS_sect_add(f, H5P_DATASET_XFER_DEFAULT, frsp, (H5FS_section_info_t *)sect_node2,
+ if(H5FS_sect_add(f, H5AC_ind_read_dxpl_id, frsp, (H5FS_section_info_t *)sect_node2,
H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR
@@ -2177,7 +2177,7 @@ test_fs_sect_change_class(hid_t fapl)
if(check_stats(f, frsp, &state))
TEST_ERROR
- if (H5FS_sect_change_class(f, H5P_DATASET_XFER_DEFAULT, frsp, (H5FS_section_info_t *)sect_node1,
+ if (H5FS_sect_change_class(f, H5AC_ind_read_dxpl_id, frsp, (H5FS_section_info_t *)sect_node1,
TEST_FSPACE_SECT_TYPE_NONE) < 0)
TEST_ERROR
@@ -2186,7 +2186,7 @@ test_fs_sect_change_class(hid_t fapl)
if(check_stats(f, frsp, &state))
TEST_ERROR
- if(H5FS_sect_find(f, H5P_DATASET_XFER_DEFAULT, frsp,
+ if(H5FS_sect_find(f, H5AC_ind_read_dxpl_id, frsp,
(hsize_t)TEST_SECT_SIZE30, (H5FS_section_info_t **)&node) < 0)
FAIL_STACK_ERROR
@@ -2196,7 +2196,7 @@ test_fs_sect_change_class(hid_t fapl)
if(TEST_sect_free((H5FS_section_info_t *)node) < 0)
TEST_ERROR
- if(H5FS_sect_remove(f, H5P_DATASET_XFER_DEFAULT, frsp, (H5FS_section_info_t *)sect_node2) < 0)
+ if(H5FS_sect_remove(f, H5AC_ind_read_dxpl_id, frsp, (H5FS_section_info_t *)sect_node2) < 0)
FAIL_STACK_ERROR
/* Free the section node(s) */
@@ -2205,12 +2205,12 @@ test_fs_sect_change_class(hid_t fapl)
sect_node2 = NULL;
/* Close the free space manager */
- if(H5FS_close(f, H5P_DATASET_XFER_DEFAULT, frsp) < 0)
+ if(H5FS_close(f, H5AC_ind_read_dxpl_id, frsp) < 0)
FAIL_STACK_ERROR
frsp = NULL;
/* Delete free space manager */
- if(H5FS_delete(f, H5P_DATASET_XFER_DEFAULT, fs_addr) < 0)
+ if(H5FS_delete(f, H5AC_ind_read_dxpl_id, fs_addr) < 0)
FAIL_STACK_ERROR
fs_addr = HADDR_UNDEF;
@@ -2237,7 +2237,7 @@ test_fs_sect_change_class(hid_t fapl)
nclasses = NELMTS(test_classes);
init_flags = H5FS_CLS_SEPAR_OBJ;
- if(NULL == (frsp = H5FS_create(f, H5P_DATASET_XFER_DEFAULT, &fs_addr,
+ if(NULL == (frsp = H5FS_create(f, H5AC_ind_read_dxpl_id, &fs_addr,
&cparam, nclasses, test_classes, &init_flags, (hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
FAIL_STACK_ERROR
@@ -2252,7 +2252,7 @@ test_fs_sect_change_class(hid_t fapl)
init_sect_node(sect_node1, (haddr_t)TEST_SECT_ADDR70, (hsize_t)TEST_SECT_SIZE30, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE);
- if(H5FS_sect_add(f, H5P_DATASET_XFER_DEFAULT, frsp, (H5FS_section_info_t *)sect_node1,
+ if(H5FS_sect_add(f, H5AC_ind_read_dxpl_id, frsp, (H5FS_section_info_t *)sect_node1,
H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR
@@ -2264,7 +2264,7 @@ test_fs_sect_change_class(hid_t fapl)
init_sect_node(sect_node2, (haddr_t)TEST_SECT_ADDR100, (hsize_t)TEST_SECT_SIZE50, TEST_FSPACE_SECT_TYPE_NONE, H5FS_SECT_LIVE);
- if(H5FS_sect_add(f, H5P_DATASET_XFER_DEFAULT, frsp, (H5FS_section_info_t *)sect_node2,
+ if(H5FS_sect_add(f, H5AC_ind_read_dxpl_id, frsp, (H5FS_section_info_t *)sect_node2,
H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR
@@ -2276,17 +2276,17 @@ test_fs_sect_change_class(hid_t fapl)
init_sect_node(sect_node3, (haddr_t)TEST_SECT_ADDR200, (hsize_t)TEST_SECT_SIZE80, TEST_FSPACE_SECT_TYPE_NONE, H5FS_SECT_LIVE);
- if(H5FS_sect_add(f, H5P_DATASET_XFER_DEFAULT, frsp, (H5FS_section_info_t *)sect_node3,
+ if(H5FS_sect_add(f, H5AC_ind_read_dxpl_id, frsp, (H5FS_section_info_t *)sect_node3,
H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR
/* change the class of B to A's class */
- if (H5FS_sect_change_class(f, H5P_DATASET_XFER_DEFAULT, frsp, (H5FS_section_info_t *)sect_node2,
+ if (H5FS_sect_change_class(f, H5AC_ind_read_dxpl_id, frsp, (H5FS_section_info_t *)sect_node2,
TEST_FSPACE_SECT_TYPE) < 0)
TEST_ERROR
/* change the class of C to A's class */
- if (H5FS_sect_change_class(f, H5P_DATASET_XFER_DEFAULT, frsp, (H5FS_section_info_t *)sect_node3,
+ if (H5FS_sect_change_class(f, H5AC_ind_read_dxpl_id, frsp, (H5FS_section_info_t *)sect_node3,
TEST_FSPACE_SECT_TYPE) < 0)
TEST_ERROR
@@ -2296,7 +2296,7 @@ test_fs_sect_change_class(hid_t fapl)
TEST_ERROR
/* verify that section B has changed class */
- if(H5FS_sect_find(f, H5P_DATASET_XFER_DEFAULT, frsp,
+ if(H5FS_sect_find(f, H5AC_ind_read_dxpl_id, frsp,
(hsize_t)TEST_SECT_SIZE50, (H5FS_section_info_t **)&node) < 0)
FAIL_STACK_ERROR
@@ -2307,7 +2307,7 @@ test_fs_sect_change_class(hid_t fapl)
TEST_ERROR
/* verify that section C has changed class */
- if(H5FS_sect_find(f, H5P_DATASET_XFER_DEFAULT, frsp,
+ if(H5FS_sect_find(f, H5AC_ind_read_dxpl_id, frsp,
(hsize_t)TEST_SECT_SIZE80, (H5FS_section_info_t **)&node) < 0)
FAIL_STACK_ERROR
@@ -2318,7 +2318,7 @@ test_fs_sect_change_class(hid_t fapl)
TEST_ERROR
/* remove section A from free-space */
- if(H5FS_sect_remove(f, H5P_DATASET_XFER_DEFAULT, frsp, (H5FS_section_info_t *)sect_node1) < 0)
+ if(H5FS_sect_remove(f, H5AC_ind_read_dxpl_id, frsp, (H5FS_section_info_t *)sect_node1) < 0)
FAIL_STACK_ERROR
/* Free the section node(s) */
@@ -2327,12 +2327,12 @@ test_fs_sect_change_class(hid_t fapl)
sect_node1 = NULL;
/* Close the free space manager */
- if(H5FS_close(f, H5P_DATASET_XFER_DEFAULT, frsp) < 0)
+ if(H5FS_close(f, H5AC_ind_read_dxpl_id, frsp) < 0)
FAIL_STACK_ERROR
frsp = NULL;
/* Delete free space manager */
- if(H5FS_delete(f, H5P_DATASET_XFER_DEFAULT, fs_addr) < 0)
+ if(H5FS_delete(f, H5AC_ind_read_dxpl_id, fs_addr) < 0)
FAIL_STACK_ERROR
fs_addr = HADDR_UNDEF;
@@ -2351,7 +2351,7 @@ error:
if(sect_node2)
TEST_sect_free((H5FS_section_info_t *)sect_node2);
if(frsp)
- H5FS_close(f, H5P_DATASET_XFER_DEFAULT, frsp);
+ H5FS_close(f, H5AC_ind_read_dxpl_id, frsp);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -2421,7 +2421,7 @@ test_fs_sect_extend(hid_t fapl)
init_cparam(&cparam);
nclasses = NELMTS(test_classes);
- if(NULL == (frsp = H5FS_create(f, H5P_DATASET_XFER_DEFAULT, &fs_addr,
+ if(NULL == (frsp = H5FS_create(f, H5AC_ind_read_dxpl_id, &fs_addr,
&cparam, nclasses, test_classes, &init_flags, (hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
FAIL_STACK_ERROR
@@ -2436,7 +2436,7 @@ test_fs_sect_extend(hid_t fapl)
init_sect_node(sect_node1, (haddr_t)TEST_SECT_ADDR70, (hsize_t)TEST_SECT_SIZE5, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE);
- if(H5FS_sect_add(f, H5P_DATASET_XFER_DEFAULT, frsp, (H5FS_section_info_t *)sect_node1,
+ if(H5FS_sect_add(f, H5AC_ind_read_dxpl_id, frsp, (H5FS_section_info_t *)sect_node1,
H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR
@@ -2456,7 +2456,7 @@ test_fs_sect_extend(hid_t fapl)
init_sect_node(sect_node2, (haddr_t)TEST_SECT_ADDR100, (hsize_t)TEST_SECT_SIZE40, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE);
- if(H5FS_sect_add(f, H5P_DATASET_XFER_DEFAULT, frsp, (H5FS_section_info_t *)sect_node2,
+ if(H5FS_sect_add(f, H5AC_ind_read_dxpl_id, frsp, (H5FS_section_info_t *)sect_node2,
H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR
@@ -2468,7 +2468,7 @@ test_fs_sect_extend(hid_t fapl)
TEST_ERROR
/* Extend a block by requested-size */
- if((status = H5FS_sect_try_extend(f, H5P_DATASET_XFER_DEFAULT, frsp, (haddr_t)TEST_SECT_SIZE80, (hsize_t)TEST_SECT_SIZE20, (hsize_t)TEST_SECT_SIZE40)) < 0)
+ if((status = H5FS_sect_try_extend(f, H5AC_ind_read_dxpl_id, frsp, (haddr_t)TEST_SECT_SIZE80, (hsize_t)TEST_SECT_SIZE20, (hsize_t)TEST_SECT_SIZE40)) < 0)
FAIL_STACK_ERROR
if(FALSE == status)
TEST_ERROR
@@ -2481,12 +2481,12 @@ test_fs_sect_extend(hid_t fapl)
TEST_ERROR
/* Close the free space manager */
- if(H5FS_close(f, H5P_DATASET_XFER_DEFAULT, frsp) < 0)
+ if(H5FS_close(f, H5AC_ind_read_dxpl_id, frsp) < 0)
FAIL_STACK_ERROR
frsp = NULL;
/* Delete free space manager */
- if(H5FS_delete(f, H5P_DATASET_XFER_DEFAULT, fs_addr) < 0)
+ if(H5FS_delete(f, H5AC_ind_read_dxpl_id, fs_addr) < 0)
FAIL_STACK_ERROR
fs_addr = HADDR_UNDEF;
@@ -2497,7 +2497,7 @@ test_fs_sect_extend(hid_t fapl)
*/
TESTING("a block's extension by requested-size which is > adjoining free section's size: Test 2");
- if(NULL == (frsp = H5FS_create(f, H5P_DATASET_XFER_DEFAULT, &fs_addr,
+ if(NULL == (frsp = H5FS_create(f, H5AC_ind_read_dxpl_id, &fs_addr,
&cparam, nclasses, test_classes, &init_flags, (hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
FAIL_STACK_ERROR
@@ -2512,7 +2512,7 @@ test_fs_sect_extend(hid_t fapl)
init_sect_node(sect_node1, (haddr_t)TEST_SECT_ADDR70, (hsize_t)TEST_SECT_SIZE5, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE);
- if(H5FS_sect_add(f, H5P_DATASET_XFER_DEFAULT, frsp, (H5FS_section_info_t *)sect_node1,
+ if(H5FS_sect_add(f, H5AC_ind_read_dxpl_id, frsp, (H5FS_section_info_t *)sect_node1,
H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR
@@ -2532,7 +2532,7 @@ test_fs_sect_extend(hid_t fapl)
init_sect_node(sect_node2, (haddr_t)TEST_SECT_ADDR100, (hsize_t)TEST_SECT_SIZE40, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE);
- if(H5FS_sect_add(f, H5P_DATASET_XFER_DEFAULT, frsp, (H5FS_section_info_t *)sect_node2,
+ if(H5FS_sect_add(f, H5AC_ind_read_dxpl_id, frsp, (H5FS_section_info_t *)sect_node2,
H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR
@@ -2544,7 +2544,7 @@ test_fs_sect_extend(hid_t fapl)
TEST_ERROR
/* Extend the block by requested-size */
- if((status = H5FS_sect_try_extend(f, H5P_DATASET_XFER_DEFAULT, frsp, (haddr_t)TEST_SECT_ADDR80, (hsize_t)TEST_SECT_SIZE20, (hsize_t)TEST_SECT_SIZE50)) < 0)
+ if((status = H5FS_sect_try_extend(f, H5AC_ind_read_dxpl_id, frsp, (haddr_t)TEST_SECT_ADDR80, (hsize_t)TEST_SECT_SIZE20, (hsize_t)TEST_SECT_SIZE50)) < 0)
FAIL_STACK_ERROR
if(TRUE == status)
TEST_ERROR
@@ -2554,12 +2554,12 @@ test_fs_sect_extend(hid_t fapl)
TEST_ERROR
/* Close the free space manager */
- if(H5FS_close(f, H5P_DATASET_XFER_DEFAULT, frsp) < 0)
+ if(H5FS_close(f, H5AC_ind_read_dxpl_id, frsp) < 0)
FAIL_STACK_ERROR
frsp = NULL;
/* Delete free space manager */
- if(H5FS_delete(f, H5P_DATASET_XFER_DEFAULT, fs_addr) < 0)
+ if(H5FS_delete(f, H5AC_ind_read_dxpl_id, fs_addr) < 0)
FAIL_STACK_ERROR
fs_addr = HADDR_UNDEF;
@@ -2570,7 +2570,7 @@ test_fs_sect_extend(hid_t fapl)
*/
TESTING("a block's extension by requested-size which is < adjoining free section's size: Test 3");
- if(NULL == (frsp = H5FS_create(f, H5P_DATASET_XFER_DEFAULT, &fs_addr,
+ if(NULL == (frsp = H5FS_create(f, H5AC_ind_read_dxpl_id, &fs_addr,
&cparam, nclasses, test_classes, &init_flags, (hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
FAIL_STACK_ERROR
@@ -2585,7 +2585,7 @@ test_fs_sect_extend(hid_t fapl)
init_sect_node(sect_node1, (haddr_t)TEST_SECT_ADDR70, (hsize_t)TEST_SECT_SIZE5, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE);
- if(H5FS_sect_add(f, H5P_DATASET_XFER_DEFAULT, frsp, (H5FS_section_info_t *)sect_node1,
+ if(H5FS_sect_add(f, H5AC_ind_read_dxpl_id, frsp, (H5FS_section_info_t *)sect_node1,
H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR
@@ -2605,7 +2605,7 @@ test_fs_sect_extend(hid_t fapl)
init_sect_node(sect_node2, (haddr_t)TEST_SECT_ADDR100, (hsize_t)TEST_SECT_SIZE40, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE);
- if(H5FS_sect_add(f, H5P_DATASET_XFER_DEFAULT, frsp, (H5FS_section_info_t *)sect_node2,
+ if(H5FS_sect_add(f, H5AC_ind_read_dxpl_id, frsp, (H5FS_section_info_t *)sect_node2,
H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR
@@ -2617,7 +2617,7 @@ test_fs_sect_extend(hid_t fapl)
TEST_ERROR
/* Extend the block by requested-size */
- if((status = H5FS_sect_try_extend(f, H5P_DATASET_XFER_DEFAULT, frsp, (haddr_t)TEST_SECT_ADDR80, (hsize_t)TEST_SECT_SIZE20, (hsize_t)TEST_SECT_SIZE30)) < 0)
+ if((status = H5FS_sect_try_extend(f, H5AC_ind_read_dxpl_id, frsp, (haddr_t)TEST_SECT_ADDR80, (hsize_t)TEST_SECT_SIZE20, (hsize_t)TEST_SECT_SIZE30)) < 0)
TEST_ERROR
if(FALSE == status)
TEST_ERROR
@@ -2628,12 +2628,12 @@ test_fs_sect_extend(hid_t fapl)
TEST_ERROR
/* Close the free space manager */
- if(H5FS_close(f, H5P_DATASET_XFER_DEFAULT, frsp) < 0)
+ if(H5FS_close(f, H5AC_ind_read_dxpl_id, frsp) < 0)
FAIL_STACK_ERROR
frsp = NULL;
/* Delete free space manager */
- if(H5FS_delete(f, H5P_DATASET_XFER_DEFAULT, fs_addr) < 0)
+ if(H5FS_delete(f, H5AC_ind_read_dxpl_id, fs_addr) < 0)
FAIL_STACK_ERROR
fs_addr = HADDR_UNDEF;
@@ -2644,7 +2644,7 @@ test_fs_sect_extend(hid_t fapl)
*/
TESTING("a block's extension by requested-size which does not adjoin any free section: Test 4");
- if(NULL == (frsp = H5FS_create(f, H5P_DATASET_XFER_DEFAULT, &fs_addr,
+ if(NULL == (frsp = H5FS_create(f, H5AC_ind_read_dxpl_id, &fs_addr,
&cparam, nclasses, test_classes, &init_flags, (hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
FAIL_STACK_ERROR
@@ -2659,7 +2659,7 @@ test_fs_sect_extend(hid_t fapl)
init_sect_node(sect_node1, (haddr_t)TEST_SECT_ADDR70, (hsize_t)TEST_SECT_SIZE5, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE);
- if(H5FS_sect_add(f, H5P_DATASET_XFER_DEFAULT, frsp, (H5FS_section_info_t *)sect_node1,
+ if(H5FS_sect_add(f, H5AC_ind_read_dxpl_id, frsp, (H5FS_section_info_t *)sect_node1,
H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR
@@ -2679,7 +2679,7 @@ test_fs_sect_extend(hid_t fapl)
init_sect_node(sect_node2, (haddr_t)TEST_SECT_ADDR100, (hsize_t)TEST_SECT_SIZE40, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE);
- if(H5FS_sect_add(f, H5P_DATASET_XFER_DEFAULT, frsp, (H5FS_section_info_t *)sect_node2,
+ if(H5FS_sect_add(f, H5AC_ind_read_dxpl_id, frsp, (H5FS_section_info_t *)sect_node2,
H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR
@@ -2691,7 +2691,7 @@ test_fs_sect_extend(hid_t fapl)
TEST_ERROR
/* Extend the block by requested-size */
- if((status = H5FS_sect_try_extend(f, H5P_DATASET_XFER_DEFAULT, frsp, (haddr_t)TEST_SECT_ADDR80, (hsize_t)TEST_SECT_SIZE15, (hsize_t)TEST_SECT_SIZE40)) < 0)
+ if((status = H5FS_sect_try_extend(f, H5AC_ind_read_dxpl_id, frsp, (haddr_t)TEST_SECT_ADDR80, (hsize_t)TEST_SECT_SIZE15, (hsize_t)TEST_SECT_SIZE40)) < 0)
TEST_ERROR
if(TRUE == status)
TEST_ERROR
@@ -2701,12 +2701,12 @@ test_fs_sect_extend(hid_t fapl)
TEST_ERROR
/* Close the free space manager */
- if(H5FS_close(f, H5P_DATASET_XFER_DEFAULT, frsp) < 0)
+ if(H5FS_close(f, H5AC_ind_read_dxpl_id, frsp) < 0)
FAIL_STACK_ERROR
frsp = NULL;
/* Delete free space manager */
- if(H5FS_delete(f, H5P_DATASET_XFER_DEFAULT, fs_addr) < 0)
+ if(H5FS_delete(f, H5AC_ind_read_dxpl_id, fs_addr) < 0)
FAIL_STACK_ERROR
fs_addr = HADDR_UNDEF;
@@ -2721,7 +2721,7 @@ test_fs_sect_extend(hid_t fapl)
error:
H5E_BEGIN_TRY {
if(frsp)
- H5FS_close(f, H5P_DATASET_XFER_DEFAULT, frsp);
+ H5FS_close(f, H5AC_ind_read_dxpl_id, frsp);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -2772,7 +2772,7 @@ test_fs_sect_iterate(hid_t fapl)
udata.tot_sect_count = 0;
init_flags = H5FS_CLS_SEPAR_OBJ;
- if(NULL == (frsp = H5FS_create(f, H5P_DATASET_XFER_DEFAULT, &fs_addr,
+ if(NULL == (frsp = H5FS_create(f, H5AC_ind_read_dxpl_id, &fs_addr,
&cparam, nclasses, test_classes, &init_flags, (hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
FAIL_STACK_ERROR
@@ -2786,12 +2786,12 @@ test_fs_sect_iterate(hid_t fapl)
sect_size = (unsigned)((i-1) % 9) + 1;
init_sect_node(sect_node, (haddr_t)i*10, (hsize_t)sect_size, TEST_FSPACE_SECT_TYPE, H5FS_SECT_LIVE);
- if(H5FS_sect_add(f, H5P_DATASET_XFER_DEFAULT, frsp, (H5FS_section_info_t *)sect_node,
+ if(H5FS_sect_add(f, H5AC_ind_read_dxpl_id, frsp, (H5FS_section_info_t *)sect_node,
H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR
}
- if(H5FS_sect_iterate(f, H5P_DATASET_XFER_DEFAULT, frsp, TEST_sects_cb, &udata) < 0)
+ if(H5FS_sect_iterate(f, H5AC_ind_read_dxpl_id, frsp, TEST_sects_cb, &udata) < 0)
TEST_ERROR
H5FS_sect_stats(frsp, &tot_space, &nsects);
@@ -2802,12 +2802,12 @@ test_fs_sect_iterate(hid_t fapl)
TEST_ERROR
/* Close the free space manager */
- if(H5FS_close(f, H5P_DATASET_XFER_DEFAULT, frsp) < 0)
+ if(H5FS_close(f, H5AC_ind_read_dxpl_id, frsp) < 0)
FAIL_STACK_ERROR
frsp = NULL;
/* Delete free space manager */
- if(H5FS_delete(f, H5P_DATASET_XFER_DEFAULT, fs_addr) < 0)
+ if(H5FS_delete(f, H5AC_ind_read_dxpl_id, fs_addr) < 0)
FAIL_STACK_ERROR
fs_addr = HADDR_UNDEF;
@@ -2822,7 +2822,7 @@ test_fs_sect_iterate(hid_t fapl)
error:
H5E_BEGIN_TRY {
if(frsp)
- H5FS_close(f, H5P_DATASET_XFER_DEFAULT, frsp);
+ H5FS_close(f, H5AC_ind_read_dxpl_id, frsp);
H5Fclose(file);
} H5E_END_TRY;
return(1);
diff --git a/test/gen_bogus.c b/test/gen_bogus.c
index e9ce686..fdd8744 100644
--- a/test/gen_bogus.c
+++ b/test/gen_bogus.c
@@ -21,8 +21,8 @@
* datasets that have "bogus" messages in their object header.
*/
-#include "H5private.h"
#include "hdf5.h"
+#include "H5private.h"
#include "H5Oprivate.h"
#ifdef H5O_ENABLE_BOGUS
@@ -36,18 +36,21 @@
#define FALSE 0
#endif /* FALSE */
-int main(void)
-{
#ifdef H5O_ENABLE_BOGUS
- hid_t fid = -1; /* File ID */
+
+/*
+ * Create datasets in the location (in "/" or "/group") with
+ * message id: (a) H5O_BOGUS_VALID_ID or (b)H5O_BOGUS_INVALID_ID
+ * and various unknown message flags
+ */
+static int
+generate_datasets(hid_t loc_id, unsigned bogus_id)
+{
hid_t sid = -1; /* Dataspace ID */
hid_t dcpl = -1; /* Dataset creation property list ID */
hid_t did = -1; /* Dataset ID */
uint8_t bogus_flags = 0; /* Flags for bogus message */
- /* Create file for test datasets */
- if((fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto error;
-
/* Create dataspace for datasets */
if((sid = H5Screate(H5S_SCALAR)) < 0) goto error;
@@ -57,8 +60,11 @@ int main(void)
/* Add property for bogus message flags */
if(H5Pinsert2(dcpl, H5O_BOGUS_MSG_FLAGS_NAME, H5O_BOGUS_MSG_FLAGS_SIZE, &bogus_flags, NULL, NULL, NULL, NULL, NULL, NULL) < 0) goto error;
+ /* Add property for bogus message ID */
+ if(H5Pinsert2(dcpl, H5O_BOGUS_MSG_ID_NAME, H5O_BOGUS_MSG_ID_SIZE, &bogus_id, NULL, NULL, NULL, NULL, NULL, NULL) < 0) goto error;
+
/* Create dataset with "bogus" message, but no message flags */
- if((did = H5Dcreate2(fid, "/Dataset1", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) goto error;
+ if((did = H5Dcreate2(loc_id, "Dataset1", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) goto error;
if(H5Dclose(did) < 0) goto error;
/* Set "fail if unknown and open for write" message flag for bogus message */
@@ -66,7 +72,7 @@ int main(void)
if(H5Pset(dcpl, H5O_BOGUS_MSG_FLAGS_NAME, &bogus_flags) < 0) goto error;
/* Create second dataset, with "fail if unknown" message flag */
- if((did = H5Dcreate2(fid, "/Dataset2", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) goto error;
+ if((did = H5Dcreate2(loc_id, "Dataset2", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) goto error;
if(H5Dclose(did) < 0) goto error;
/* Set "fail if unknown always" message flag for bogus message */
@@ -74,7 +80,7 @@ int main(void)
if(H5Pset(dcpl, H5O_BOGUS_MSG_FLAGS_NAME, &bogus_flags) < 0) goto error;
/* Create third dataset, with "fail if unknown always" message flag */
- if((did = H5Dcreate2(fid, "/Dataset3", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) goto error;
+ if((did = H5Dcreate2(loc_id, "Dataset3", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) goto error;
if(H5Dclose(did) < 0) goto error;
/* Set "mark if unknown" message flag for bogus message */
@@ -82,7 +88,7 @@ int main(void)
if(H5Pset(dcpl, H5O_BOGUS_MSG_FLAGS_NAME, &bogus_flags) < 0) goto error;
/* Create fourth dataset, with "mark if unknown" message flag */
- if((did = H5Dcreate2(fid, "/Dataset4", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) goto error;
+ if((did = H5Dcreate2(loc_id, "Dataset4", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) goto error;
if(H5Dclose(did) < 0) goto error;
/* Close dataset creation property list */
@@ -91,9 +97,6 @@ int main(void)
/* Close dataspace */
if(H5Sclose(sid) < 0) goto error;
- /* Close file */
- if(H5Fclose(fid) < 0) goto error;
-
return 0;
error:
@@ -101,6 +104,43 @@ error:
H5Dclose(did);
H5Sclose(sid);
H5Pclose(dcpl);
+ } H5E_END_TRY;
+
+ return -1;
+} /* generate_datasets() */
+#endif
+
+int main(void)
+{
+#ifdef H5O_ENABLE_BOGUS
+ hid_t fid = -1; /* File ID */
+ hid_t gid = -1; /* Group ID */
+
+ /* Create file for test datasets */
+ if((fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto error;
+
+ /* Create datasets in "/" group with bogus message H5O_BOGUS_VALID_ID */
+ if(generate_datasets(fid, H5O_BOGUS_VALID_ID) < 0)
+ goto error;
+
+ if((gid = H5Gcreate2(fid, "group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ goto error;
+
+ /* Create datasets in "/group" with bogus message H5O_BOGUS_INVALID_ID */
+ if(generate_datasets(gid, H5O_BOGUS_INVALID_ID) < 0)
+ goto error;
+
+ /* Close the group */
+ if(H5Gclose(gid) < 0) goto error;
+
+ /* Close file */
+ if(H5Fclose(fid) < 0) goto error;
+
+ return 0;
+
+error:
+ H5E_BEGIN_TRY {
+ H5Gclose(gid);
H5Fclose(fid);
} H5E_END_TRY;
#else /* H5O_ENABLE_BOGUS */
diff --git a/test/gen_plist.c b/test/gen_plist.c
index f071733..b45eeeb 100644
--- a/test/gen_plist.c
+++ b/test/gen_plist.c
@@ -34,7 +34,7 @@ main(void)
hid_t dapl1; /* dataset access prop. list */
hid_t dxpl1; /* dataset xfer prop. list */
hid_t gcpl1; /* group create prop. list */
- hid_t ocpypl1; /* object copy prop. list */
+ hid_t ocpypl1; /* object copy prop. list */
hid_t ocpl1; /* object create prop. list */
hid_t lcpl1; /* link create prop. list */
hid_t lapl1; /* link access prop. list */
diff --git a/test/gen_udlinks.c b/test/gen_udlinks.c
index fc044da..55abab0 100644
--- a/test/gen_udlinks.c
+++ b/test/gen_udlinks.c
@@ -22,9 +22,6 @@
* They will be named according to the platform and should
* be placed in the hdf5/test directory so that the links test can use them.
*
- * Note: The be_extlink2.h5 is also used by external.c to test opening
- * external link twice. -SLU 2007/11/7
- *
*/
#include "hdf5.h"
diff --git a/test/gheap.c b/test/gheap.c
index e434a7b..c33e7ee 100644
--- a/test/gheap.c
+++ b/test/gheap.c
@@ -23,6 +23,7 @@
*/
#include "h5test.h"
#include "H5private.h"
+#include "H5ACprivate.h"
#include "H5Eprivate.h"
#include "H5Fprivate.h"
#include "H5Gprivate.h"
@@ -115,7 +116,7 @@ test_1 (hid_t fapl)
size = i + 1;
HDmemset(out, 'A' + i % 26, size);
H5Eclear2(H5E_DEFAULT);
- status = H5HG_insert(f, H5P_DATASET_XFER_DEFAULT, size, out, obj + i);
+ status = H5HG_insert(f, H5AC_ind_read_dxpl_id, size, out, obj + i);
if(status < 0) {
H5_FAILED();
puts(" Unable to insert object into global heap");
@@ -134,7 +135,7 @@ test_1 (hid_t fapl)
size = i + 1;
HDmemset(out, 'A' + i % 26, size);
H5Eclear2(H5E_DEFAULT);
- if(NULL == H5HG_read(f, H5P_DATASET_XFER_DEFAULT, obj + i, in, NULL)) {
+ if(NULL == H5HG_read(f, H5AC_ind_read_dxpl_id, obj + i, in, NULL)) {
H5_FAILED();
puts(" Unable to read object");
nerrors++;
@@ -208,7 +209,7 @@ test_2 (hid_t fapl)
size = 1024-i;
memset (out, 'A'+i%26, size);
H5Eclear2(H5E_DEFAULT);
- if (H5HG_insert (f, H5P_DATASET_XFER_DEFAULT, size, out, obj+i)<0) {
+ if (H5HG_insert (f, H5AC_ind_read_dxpl_id, size, out, obj+i)<0) {
H5_FAILED();
puts(" Unable to insert object into global heap");
nerrors++;
@@ -222,7 +223,7 @@ test_2 (hid_t fapl)
size = 1024-i;
memset (out, 'A'+i%26, size);
H5Eclear2(H5E_DEFAULT);
- if (NULL==H5HG_read (f, H5P_DATASET_XFER_DEFAULT, obj+i, in, NULL)) {
+ if (NULL==H5HG_read (f, H5AC_ind_read_dxpl_id, obj+i, in, NULL)) {
H5_FAILED();
puts(" Unable to read object");
nerrors++;
@@ -293,7 +294,7 @@ test_3 (hid_t fapl)
size = i%30+100;
memset (out, 'A'+i%26, size);
H5Eclear2(H5E_DEFAULT);
- status = H5HG_insert (f, H5P_DATASET_XFER_DEFAULT, size, out, obj+i);
+ status = H5HG_insert (f, H5AC_ind_read_dxpl_id, size, out, obj+i);
if (status<0) {
H5_FAILED();
puts(" Unable to insert object into global heap");
@@ -303,7 +304,7 @@ test_3 (hid_t fapl)
/* Remove everything */
for (i=0; i<1024; i++) {
- status = H5HG_remove (f, H5P_DATASET_XFER_DEFAULT, obj+i);
+ status = H5HG_remove (f, H5AC_ind_read_dxpl_id, obj+i);
if (status<0) {
H5_FAILED();
puts(" Unable to remove object");
@@ -372,7 +373,7 @@ test_4 (hid_t fapl)
size = i%30+100;
memset (out, 'A'+i%26, size);
H5Eclear2(H5E_DEFAULT);
- status = H5HG_insert (f, H5P_DATASET_XFER_DEFAULT, size, out, obj+i);
+ status = H5HG_insert (f, H5AC_ind_read_dxpl_id, size, out, obj+i);
if (status<0) {
H5_FAILED();
puts(" Unable to insert object into global heap");
@@ -386,7 +387,7 @@ test_4 (hid_t fapl)
*/
if (1==i%3) {
H5Eclear2(H5E_DEFAULT);
- status = H5HG_remove (f, H5P_DATASET_XFER_DEFAULT, obj+i-1);
+ status = H5HG_remove (f, H5AC_ind_read_dxpl_id, obj+i-1);
if (status<0) {
H5_FAILED();
puts(" Unable to remove object");
@@ -462,7 +463,7 @@ test_ooo_indices(hid_t fapl)
* can be deleted. */
for(j=1000*((~i&1)); j<1000*((~i&1)+1); j++) {
H5Eclear2(H5E_DEFAULT);
- status = H5HG_insert(f, H5P_DATASET_XFER_DEFAULT, sizeof(j), &j, &obj[j]);
+ status = H5HG_insert(f, H5AC_ind_read_dxpl_id, sizeof(j), &j, &obj[j]);
if (status<0)
GHEAP_REPEATED_ERR(" Unable to insert object into global heap")
@@ -475,7 +476,7 @@ test_ooo_indices(hid_t fapl)
if(i>0)
for(j=1000*(i&1); j<1000*((i&1)+1); j++) {
H5Eclear2(H5E_DEFAULT);
- status = H5HG_remove(f, H5P_DATASET_XFER_DEFAULT, &obj[j]);
+ status = H5HG_remove(f, H5AC_ind_read_dxpl_id, &obj[j]);
if (status<0)
GHEAP_REPEATED_ERR(" Unable to remove object from global heap");
} /* end for */
@@ -497,7 +498,7 @@ test_ooo_indices(hid_t fapl)
/* Read the objects to make sure the heap is still readable */
for(i=0; i<1000; i++) {
- if(NULL == H5HG_read(f, H5P_DATASET_XFER_DEFAULT, &obj[i], &j, NULL))
+ if(NULL == H5HG_read(f, H5AC_ind_read_dxpl_id, &obj[i], &j, NULL))
goto error;
if(i != j) {
H5_FAILED();
diff --git a/test/h5test.c b/test/h5test.c
index 843ec35..8285043 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -193,6 +193,107 @@ h5_clean_files(const char *base_name[], hid_t fapl)
/*-------------------------------------------------------------------------
+ * Function: h5_delete_test_file
+ *
+ * Purpose Clean up temporary test files.
+ *
+ * When a test calls h5_fixname() get a VFD-dependent
+ * test file name, this function can be used to clean it up.
+ *
+ * Return: void
+ *
+ * Since this is a cleanup file, we don't care if it fails.
+ *
+ * Programmer: Dana Robinson
+ * February 2016
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+h5_delete_test_file(const char *base_name, hid_t fapl)
+{
+ char filename[1024]; /* VFD-dependent filename to delete */
+ char sub_filename[2048]; /* sub-files in multi & family VFDs */
+ hid_t driver = -1; /* VFD ID */
+
+ /* Get the VFD-dependent filename */
+ if(NULL == h5_fixname(base_name, fapl, filename, sizeof(filename)))
+ return;
+
+ driver = H5Pget_driver(fapl);
+
+ if(driver == H5FD_FAMILY) {
+ int j;
+ for(j = 0; /*void*/; j++) {
+ HDsnprintf(sub_filename, sizeof(sub_filename), filename, j);
+
+ /* If we can't access the file, it probably doesn't exist
+ * and we are done deleting the sub-files.
+ */
+ if(HDaccess(sub_filename, F_OK) < 0)
+ break;
+
+ HDremove(sub_filename);
+ } /* end for */
+ } else if(driver == H5FD_CORE) {
+ hbool_t backing; /* Whether the core file has backing store */
+
+ H5Pget_fapl_core(fapl, NULL, &backing);
+
+ /* If the file was stored to disk with bacing store, remove it */
+ if(backing)
+ HDremove(filename);
+ } else if (driver == H5FD_MULTI) {
+ H5FD_mem_t mt;
+
+ HDassert(HDstrlen(multi_letters) == H5FD_MEM_NTYPES);
+
+ for(mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t,mt)) {
+ HDsnprintf(sub_filename, sizeof(sub_filename), "%s-%c.h5", filename, multi_letters[mt]);
+ HDremove(sub_filename);
+ } /* end for */
+ } else {
+ HDremove(filename);
+ } /* end if */
+
+ return;
+} /* end h5_delete_test_file() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: h5_delete_all_test_files
+ *
+ * Purpose Clean up temporary test files.
+ *
+ * When a test calls h5_fixname() get a VFD-dependent
+ * test file name, this function can be used to clean it up.
+ *
+ * This function takes an array of filenames that ends with
+ * a NULL string and cleans them all.
+ *
+ * Return: void
+ *
+ * Since this is a cleanup file, we don't care if it fails.
+ *
+ * Programmer: Dana Robinson
+ * February 2016
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+h5_delete_all_test_files(const char *base_name[], hid_t fapl)
+{
+ int i; /* iterator */
+
+ for(i = 0; base_name[i]; i++) {
+ h5_delete_test_file(base_name[i], fapl);
+ } /* end for */
+
+ return;
+} /* end h5_delete_all_test_files() */
+
+
+/*-------------------------------------------------------------------------
* Function: h5_cleanup
*
* Purpose: Cleanup temporary test files.
@@ -226,6 +327,35 @@ h5_cleanup(const char *base_name[], hid_t fapl)
/*-------------------------------------------------------------------------
+ * Function: h5_test_shutdown
+ *
+ * Purpose: Performs any special test cleanup required before the test
+ * ends.
+ *
+ * NOTE: This function should normally only be called once
+ * in a given test, usually just before leaving main(). It
+ * is intended for use in the single-file unit tests, not
+ * testhdf5.
+ *
+ * Return: void
+ *
+ * Programmer: Dana Robinson
+ * February 2016
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+h5_test_shutdown(void)
+{
+
+ /* Restore the original error reporting routine */
+ h5_restore_err();
+
+ return;
+} /* end h5_test_shutdown() */
+
+
+/*-------------------------------------------------------------------------
* Function: h5_restore_err
*
* Purpose: Restore the default error handler.
@@ -303,6 +433,39 @@ h5_reset(void)
/*-------------------------------------------------------------------------
+ * Function: h5_test_init
+ *
+ * Purpose: Performs any special actions before the test begins.
+ *
+ * NOTE: This function should normally only be called once
+ * in a given test, usually at the beginning of main(). It
+ * is intended for use in the single-file unit tests, not
+ * testhdf5.
+ *
+ * Return: void
+ *
+ * Programmer: Dana Robinson
+ * February 2016
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+h5_test_init(void)
+{
+ HDfflush(stdout);
+ HDfflush(stderr);
+ H5close();
+
+ /* Save current error stack reporting routine and redirect to our local one */
+ HDassert(err_func == NULL);
+ H5Eget_auto2(H5E_DEFAULT, &err_func, NULL);
+ H5Eset_auto2(H5E_DEFAULT, h5_errors, NULL);
+
+ return;
+} /* end h5_test_init() */
+
+
+/*-------------------------------------------------------------------------
* Function: h5_fixname
*
* Purpose: Create a file name from a file base name like `test' and
@@ -744,6 +907,137 @@ h5_fileaccess(void)
/*-------------------------------------------------------------------------
+ * Function: h5_get_vfd_fapl
+ *
+ * Purpose: Returns a file access property list which is the default
+ * fapl but with a file driver set according to the constant or
+ * environment variable HDF5_DRIVER.
+ *
+ * Return: Success: A file access property list ID
+ * Failure: -1
+ *
+ * Programmer: Dana Robinson
+ * February 2016
+ *
+ *-------------------------------------------------------------------------
+ */
+hid_t
+h5_get_vfd_fapl(void)
+{
+ const char *env = NULL; /* HDF5_DRIVER environment variable */
+ const char *tok = NULL; /* strtok pointer */
+ char buf[1024]; /* buffer for tokenizing HDF5_DRIVER */
+ hid_t fapl = -1; /* fapl to be returned */
+
+ /* Get the environment variable, if it exists */
+ env = HDgetenv("HDF5_DRIVER");
+
+ /* Create a default fapl */
+ if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
+ return -1;
+
+ /* If the environment variable was not set, just return
+ * the default fapl.
+ */
+ if(!env || !*env)
+ return fapl;
+
+ /* Get the first 'word' of the environment variable.
+ * If it's nothing (environment variable was whitespace)
+ * just return the default fapl.
+ */
+ HDstrncpy(buf, env, sizeof(buf));
+ HDmemset(buf, 0, sizeof(buf));
+ if(NULL == (tok = HDstrtok(buf, " \t\n\r")))
+ return fapl;
+
+ if(!HDstrcmp(tok, "sec2")) {
+ /* POSIX (section 2) read() and write() system calls */
+ if(H5Pset_fapl_sec2(fapl) < 0)
+ return -1;
+ } else if(!HDstrcmp(tok, "stdio")) {
+ /* Standard C fread() and fwrite() system calls */
+ if(H5Pset_fapl_stdio(fapl) < 0)
+ return -1;
+ } else if(!HDstrcmp(tok, "core")) {
+ /* In-memory driver settings (backing store on, 1 MB increment) */
+ if(H5Pset_fapl_core(fapl, (size_t)1, TRUE) < 0)
+ return -1;
+ } else if(!HDstrcmp(tok, "core_paged")) {
+ /* In-memory driver with write tracking and paging on */
+ if(H5Pset_fapl_core(fapl, (size_t)1, TRUE) < 0)
+ return -1;
+ if(H5Pset_core_write_tracking(fapl, TRUE, (size_t)4096) < 0)
+ return -1;
+ } else if(!HDstrcmp(tok, "split")) {
+ /* Split meta data and raw data each using default driver */
+ if(H5Pset_fapl_split(fapl,
+ "-m.h5", H5P_DEFAULT,
+ "-r.h5", H5P_DEFAULT) < 0)
+ return -1;
+ } else if(!HDstrcmp(tok, "multi")) {
+ /* Multi-file driver, general case of the split driver */
+ H5FD_mem_t memb_map[H5FD_MEM_NTYPES];
+ hid_t memb_fapl[H5FD_MEM_NTYPES];
+ const char *memb_name[H5FD_MEM_NTYPES];
+ char sv[H5FD_MEM_NTYPES][1024];
+ haddr_t memb_addr[H5FD_MEM_NTYPES];
+ H5FD_mem_t mt;
+
+ HDmemset(memb_map, 0, sizeof(memb_map));
+ HDmemset(memb_fapl, 0, sizeof(memb_fapl));
+ HDmemset(memb_name, 0, sizeof(memb_name));
+ HDmemset(memb_addr, 0, sizeof(memb_addr));
+
+ HDassert(HDstrlen(multi_letters) == H5FD_MEM_NTYPES);
+ for(mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t, mt)) {
+ memb_fapl[mt] = H5P_DEFAULT;
+ HDsprintf(sv[mt], "%%s-%c.h5", multi_letters[mt]);
+ memb_name[mt] = sv[mt];
+ memb_addr[mt] = (haddr_t)MAX(mt - 1, 0) * (HADDR_MAX / 10);
+ } /* end for */
+
+ if(H5Pset_fapl_multi(fapl, memb_map, memb_fapl, memb_name,
+ memb_addr, FALSE) < 0) {
+ return -1;
+ } /* end if */
+ } else if(!HDstrcmp(tok, "family")) {
+ /* Family of files, each 1MB and using the default driver */
+ hsize_t fam_size = 100*1024*1024; /*100 MB*/
+
+ /* Was a family size specified in the environment variable? */
+ if((tok = HDstrtok(NULL, " \t\n\r")))
+ fam_size = (hsize_t)(HDstrtod(tok, NULL) * 1024*1024);
+ if(H5Pset_fapl_family(fapl, fam_size, H5P_DEFAULT) < 0)
+ return -1;
+ } else if(!HDstrcmp(tok, "log")) {
+ /* Log file access */
+ unsigned log_flags = H5FD_LOG_LOC_IO | H5FD_LOG_ALLOC;
+
+ /* Were special log file flags specified in the environment variable? */
+ if((tok = HDstrtok(NULL, " \t\n\r")))
+ log_flags = (unsigned)HDstrtol(tok, NULL, 0);
+
+ if(H5Pset_fapl_log(fapl, NULL, log_flags, (size_t)0) < 0)
+ return -1;
+#ifdef H5_HAVE_DIRECT
+ } else if(!HDstrcmp(tok, "direct")) {
+ /* Linux direct read() and write() system calls. Set memory boundary,
+ * file block size, and copy buffer size to the default values.
+ */
+ if(H5Pset_fapl_direct(fapl, 1024, 4096, 8*4096)<0)
+ return -1;
+#endif
+ } else {
+ /* Unknown driver */
+ return -1;
+ } /* end if */
+
+ return fapl;
+} /* end h5_get_vfd_fapl() */
+
+
+/*-------------------------------------------------------------------------
* Function: h5_no_hwconv
*
* Purpose: Turn off hardware data type conversions.
@@ -1263,8 +1557,6 @@ getenv_all(MPI_Comm comm, int root, const char* name)
* Programmer: Larry Knox
* Monday, October 13, 2009
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
int
@@ -1276,20 +1568,22 @@ h5_make_local_copy(const char *origfilename, const char *local_copy_name)
const char *filename = H5_get_srcdir_filename(origfilename);; /* Get the test file name to copy */
/* Copy old file into temporary file */
- if((fd_old = HDopen(filename, O_RDONLY, 0666)) < 0) return -1;
- if((fd_new = HDopen(local_copy_name, O_RDWR|O_CREAT|O_TRUNC, 0666))
- < 0) return -1;
+ if((fd_old = HDopen(filename, O_RDONLY, 0666)) < 0)
+ return -1;
+ if((fd_new = HDopen(local_copy_name, O_RDWR|O_CREAT|O_TRUNC, 0666)) < 0)
+ return -1;
/* Copy data */
while((nread = HDread(fd_old, buf, (size_t)READ_BUF_SIZE)) > 0)
- HDwrite(fd_new, buf, (size_t)nread);
+ if(HDwrite(fd_new, buf, (size_t)nread) < 0)
+ return -1;
/* Close files */
if(HDclose(fd_old) < 0) return -1;
if(HDclose(fd_new) < 0) return -1;
return 0;
-}
+} /* end h5_make_local_copy() */
/*-------------------------------------------------------------------------
diff --git a/test/h5test.h b/test/h5test.h
index ca0eead..575497b 100644
--- a/test/h5test.h
+++ b/test/h5test.h
@@ -139,6 +139,23 @@ H5TEST_DLL int print_func(const char *format, ...);
H5TEST_DLL int h5_make_local_copy(const char *origfilename, const char *local_copy_name);
H5TEST_DLL herr_t h5_verify_cached_stabs(const char *base_name[], hid_t fapl);
+/* Functions that will replace VFD-dependent functions that violate
+ * the single responsibility principle. Unlike their predecessors,
+ * these new functions do not have hidden side effects.
+ */
+/* h5_fileaccess() replacement */
+H5TEST_DLL hid_t h5_get_vfd_fapl(void);
+
+/* h5_clean_files() replacements */
+H5TEST_DLL void h5_delete_test_file(const char *base_name, hid_t fapl);
+H5TEST_DLL void h5_delete_all_test_files(const char *base_name[], hid_t fapl);
+
+/* h5_reset() replacement */
+H5TEST_DLL void h5_test_init(void);
+
+/* h5_cleanup() replacement */
+H5TEST_DLL void h5_test_shutdown(void);
+
/* Routines for operating on the list of tests (for the "all in one" tests) */
H5TEST_DLL void TestUsage(void);
H5TEST_DLL void AddTest(const char *TheName, void (*TheCall) (void),
diff --git a/test/lheap.c b/test/lheap.c
index 1d5a487..a6ae66d 100644
--- a/test/lheap.c
+++ b/test/lheap.c
@@ -95,12 +95,12 @@ main(void)
H5Eprint2(H5E_DEFAULT, stdout);
goto error;
}
- if(FAIL == H5HL_create(f, H5P_DATASET_XFER_DEFAULT, (size_t)0, &heap_addr/*out*/)) {
+ if(FAIL == H5HL_create(f, H5AC_ind_read_dxpl_id, (size_t)0, &heap_addr/*out*/)) {
H5_FAILED();
H5Eprint2(H5E_DEFAULT, stdout);
goto error;
}
- if (NULL == (heap = H5HL_protect(f, H5P_DATASET_XFER_DEFAULT, heap_addr, H5AC__NO_FLAGS_SET))) {
+ if (NULL == (heap = H5HL_protect(f, H5AC_ind_read_dxpl_id, heap_addr, H5AC__NO_FLAGS_SET))) {
H5_FAILED();
H5Eprint2(H5E_DEFAULT, stdout);
goto error;
@@ -112,7 +112,7 @@ main(void)
if(j > 4)
buf[j] = '\0';
- if(UFAIL == (obj[i] = H5HL_insert(f, H5P_DATASET_XFER_DEFAULT, heap, strlen(buf) + 1, buf))) {
+ if(UFAIL == (obj[i] = H5HL_insert(f, H5AC_ind_read_dxpl_id, heap, strlen(buf) + 1, buf))) {
H5_FAILED();
H5Eprint2(H5E_DEFAULT, stdout);
goto error;
@@ -152,7 +152,7 @@ main(void)
if(j > 4)
buf[j] = '\0';
- if (NULL == (heap = H5HL_protect(f, H5P_DATASET_XFER_DEFAULT, heap_addr, H5AC__READ_ONLY_FLAG))) {
+ if (NULL == (heap = H5HL_protect(f, H5AC_ind_read_dxpl_id, heap_addr, H5AC__READ_ONLY_FLAG))) {
H5_FAILED();
H5Eprint2(H5E_DEFAULT, stdout);
goto error;
diff --git a/test/links.c b/test/links.c
index 2886304..639a2d8 100644
--- a/test/links.c
+++ b/test/links.c
@@ -136,7 +136,7 @@ const char *FILENAME[] = {
#define H5L_DIM1 100
#define H5L_DIM2 100
-#define FILTER_FILESIZE_MAX_FRACTION 0.9F
+#define FILTER_FILESIZE_MAX_FRACTION (double)0.9F
/* Creation order macros */
#define CORDER_GROUP_NAME "corder_group"
@@ -548,8 +548,27 @@ cklinks(hid_t fapl, hbool_t new_format)
HDputs(" expected file location.");
TEST_ERROR
} /* end if */
+ if(H5Lexists(file, "/", H5P_DEFAULT) != TRUE) FAIL_STACK_ERROR
if(H5Lexists(file, "d1", H5P_DEFAULT) != TRUE) FAIL_STACK_ERROR
if(H5Lexists(file, "grp1/hard", H5P_DEFAULT) != TRUE) FAIL_STACK_ERROR
+ if(H5Lexists(file, "/grp1", H5P_DEFAULT) != TRUE) FAIL_STACK_ERROR
+ if(H5Lexists(file, "/grp1/hard", H5P_DEFAULT) != TRUE) FAIL_STACK_ERROR
+ H5E_BEGIN_TRY {
+ status = H5Lexists(file, "no_grp1/hard", H5P_DEFAULT);
+ } H5E_END_TRY;
+ if(status >= 0) {
+ H5_FAILED();
+ HDputs(" H5Lexists() should have failed for a path with missing components.");
+ TEST_ERROR
+ } /* end if */
+ H5E_BEGIN_TRY {
+ status = H5Lexists(file, "/no_grp1/hard", H5P_DEFAULT);
+ } H5E_END_TRY;
+ if(status >= 0) {
+ H5_FAILED();
+ HDputs(" H5Lexists() should have failed for a path with missing components.");
+ TEST_ERROR
+ } /* end if */
/* Symbolic link */
if(H5Oget_info_by_name(file, "grp1/soft", &oinfo2, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
@@ -7280,7 +7299,7 @@ error:
} H5E_END_TRY
return -1;
-} /* end efc_open_twice */
+} /* end external_open_twice() */
/*-------------------------------------------------------------------------
@@ -10985,6 +11004,7 @@ link_info_by_idx(hid_t fapl)
char filename[NAME_BUF_SIZE];/* File name */
char tmpname[NAME_BUF_SIZE]; /* Temporary link name */
unsigned u; /* Local index variable */
+ ssize_t name_len; /* Length of name */
herr_t ret; /* Generic return value */
/* Loop over creating hard or soft links */
@@ -11026,9 +11046,9 @@ link_info_by_idx(hid_t fapl)
} H5E_END_TRY;
if(ret >= 0) TEST_ERROR
H5E_BEGIN_TRY {
- ret = H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)0, tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
+ name_len = H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)0, tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
} H5E_END_TRY;
- if(ret >= 0) TEST_ERROR
+ if(name_len >= 0) TEST_ERROR
/* Create several links, up to limit of compact form */
for(u = 0; u < max_compact; u++) {
@@ -11068,9 +11088,9 @@ link_info_by_idx(hid_t fapl)
} H5E_END_TRY;
if(ret >= 0) TEST_ERROR
H5E_BEGIN_TRY {
- ret = H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)u, tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
+ name_len = H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)u, tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
} H5E_END_TRY;
- if(ret >= 0) TEST_ERROR
+ if(name_len >= 0) TEST_ERROR
/* Create more links, to push group into dense form */
for(; u < (max_compact * 2); u++) {
@@ -11110,9 +11130,9 @@ link_info_by_idx(hid_t fapl)
} H5E_END_TRY;
if(ret >= 0) TEST_ERROR
H5E_BEGIN_TRY {
- ret = H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)u, tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
+ name_len = H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)u, tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
} H5E_END_TRY;
- if(ret >= 0) TEST_ERROR
+ if(name_len >= 0) TEST_ERROR
/* Close the group */
if(H5Gclose(group_id) < 0) TEST_ERROR
@@ -11167,6 +11187,7 @@ link_info_by_idx_old(hid_t fapl)
char tmpname[NAME_BUF_SIZE]; /* Temporary link name */
char tmpval[NAME_BUF_SIZE]; /* Temporary link value */
unsigned u; /* Local index variable */
+ ssize_t name_len; /* Length of name */
herr_t ret; /* Generic return value */
/* Loop over creating hard or soft links */
@@ -11278,9 +11299,9 @@ link_info_by_idx_old(hid_t fapl)
} H5E_END_TRY;
if(ret >= 0) TEST_ERROR
H5E_BEGIN_TRY {
- ret = H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)u, tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
+ name_len = H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)u, tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT);
} H5E_END_TRY;
- if(ret >= 0) TEST_ERROR
+ if(name_len >= 0) TEST_ERROR
/* Verify state of group */
if(H5G__has_stab_test(group_id) != TRUE) TEST_ERROR
@@ -12038,7 +12059,7 @@ link_iterate_check(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order,
iter_info->order = order;
iter_info->stop = -1;
iter_info->ncalled = 0;
- iter_info->curr = order != H5_ITER_DEC ? skip : ((max_links - 1) - skip);
+ iter_info->curr = (int64_t)(order != H5_ITER_DEC ? skip : ((max_links - 1) - skip));
HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
if(H5Literate(group_id, idx_type, order, &skip, link_iterate_cb, iter_info) < 0) TEST_ERROR
@@ -12066,11 +12087,11 @@ link_iterate_check(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order,
#ifndef H5_NO_DEPRECATED_SYMBOLS
/* Skip over some links in group, with H5Giterate */
- iter_info->nskipped = gskip = max_links / 2;
+ iter_info->nskipped = (unsigned)(gskip = (int)(max_links / 2));
iter_info->order = order;
iter_info->stop = -1;
iter_info->ncalled = 0;
- iter_info->curr = order != H5_ITER_DEC ? (unsigned)gskip : ((max_links - 1) - gskip);
+ iter_info->curr = order != H5_ITER_DEC ? (unsigned)gskip : ((max_links - 1) - (unsigned)gskip);
HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
if(H5Giterate(group_id, ".", &gskip, group_iterate_cb, iter_info) < 0) TEST_ERROR
@@ -12111,7 +12132,7 @@ link_iterate_check(hid_t group_id, H5_index_t idx_type, H5_iter_order_t order,
#ifndef H5_NO_DEPRECATED_SYMBOLS
/* Iterate over links in group, stopping in the middle, with H5Giterate() */
- iter_info->nskipped = gskip = 0;
+ iter_info->nskipped = (unsigned)(gskip = 0);
iter_info->order = order;
iter_info->stop = 3;
iter_info->ncalled = 0;
@@ -12468,7 +12489,7 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order,
#ifndef H5_NO_DEPRECATED_SYMBOLS
/* Iterate over links in group, with H5Giterate */
- iter_info->nskipped = gskip = 0;
+ iter_info->nskipped = (unsigned)(gskip = 0);
iter_info->order = order;
iter_info->stop = -1;
iter_info->ncalled = 0;
@@ -12488,7 +12509,7 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order,
iter_info->order = order;
iter_info->stop = -1;
iter_info->ncalled = 0;
- iter_info->curr = order != H5_ITER_DEC ? skip : ((max_links - 1) - skip);
+ iter_info->curr = (int64_t)(order != H5_ITER_DEC ? skip : ((max_links - 1) - skip));
HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
if(H5Literate(group_id, H5_INDEX_NAME, order, &skip, link_iterate_old_cb, iter_info) < 0) TEST_ERROR
@@ -12516,11 +12537,11 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order,
#ifndef H5_NO_DEPRECATED_SYMBOLS
/* Skip over some links in group, with H5Giterate */
- iter_info->nskipped = gskip = max_links / 2;
+ iter_info->nskipped = (unsigned)(gskip = (int)(max_links / 2));
iter_info->order = order;
iter_info->stop = -1;
iter_info->ncalled = 0;
- iter_info->curr = order != H5_ITER_DEC ? (unsigned)gskip : ((max_links - 1) - gskip);
+ iter_info->curr = order != H5_ITER_DEC ? (unsigned)gskip : ((max_links - 1) - (unsigned)gskip);
HDmemset(iter_info->visited, 0, sizeof(hbool_t) * iter_info->max_visit);
if(H5Giterate(group_id, ".", &gskip, group_iterate_old_cb, iter_info) < 0) TEST_ERROR
@@ -12561,7 +12582,7 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order,
#ifndef H5_NO_DEPRECATED_SYMBOLS
/* Iterate over links in group, stopping in the middle, with H5Giterate() */
- iter_info->nskipped = gskip = 0;
+ iter_info->nskipped = (unsigned)(gskip = 0);
iter_info->order = order;
iter_info->stop = 3;
iter_info->ncalled = 0;
diff --git a/test/mf.c b/test/mf.c
index 5c20b7a..4eca386 100644
--- a/test/mf.c
+++ b/test/mf.c
@@ -234,7 +234,7 @@ test_mf_eoa(const char *env_h5_drvr, hid_t fapl)
H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
type = H5FD_MEM_SUPER;
- addr1 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE30);
+ addr1 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE30);
/* nothing should be changed in meta_aggr */
H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &ma_size);
@@ -244,7 +244,7 @@ test_mf_eoa(const char *env_h5_drvr, hid_t fapl)
if (addr1 < (haddr_t)file_size)
TEST_ERROR
- addr2 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE50);
+ addr2 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE50);
/* nothing should be changed in meta_aggr */
H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &ma_size);
@@ -273,8 +273,8 @@ test_mf_eoa(const char *env_h5_drvr, hid_t fapl)
if(NULL == (f = (H5F_t *)H5VL_object(file)))
FAIL_STACK_ERROR
- H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr1, (hsize_t)TEST_BLOCK_SIZE30);
- H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr2, (hsize_t)TEST_BLOCK_SIZE50);
+ H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr1, (hsize_t)TEST_BLOCK_SIZE30);
+ H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr2, (hsize_t)TEST_BLOCK_SIZE50);
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
@@ -377,7 +377,7 @@ test_mf_eoa_shrink(const char *env_h5_drvr, hid_t fapl)
H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
type = H5FD_MEM_SUPER;
- addr = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE30);
+ addr = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE30);
if (addr < (haddr_t)file_size)
TEST_ERROR
@@ -409,7 +409,7 @@ test_mf_eoa_shrink(const char *env_h5_drvr, hid_t fapl)
H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
/* should succeed */
- if(H5MF_try_shrink(f, type, H5P_DATASET_XFER_DEFAULT, addr, (hsize_t)TEST_BLOCK_SIZE30) <= 0)
+ if(H5MF_try_shrink(f, type, H5AC_ind_read_dxpl_id, addr, (hsize_t)TEST_BLOCK_SIZE30) <= 0)
TEST_ERROR
/* nothing should be changed in meta_aggr */
@@ -453,13 +453,13 @@ test_mf_eoa_shrink(const char *env_h5_drvr, hid_t fapl)
H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
- addr = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE30);
+ addr = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE30);
if (addr < (haddr_t)file_size)
TEST_ERROR
/* should not succeed in shrinking */
- if(H5MF_try_shrink(f, type, H5P_DATASET_XFER_DEFAULT, addr, (hsize_t)TEST_BLOCK_SIZE30 - 10) > 0)
+ if(H5MF_try_shrink(f, type, H5AC_ind_read_dxpl_id, addr, (hsize_t)TEST_BLOCK_SIZE30 - 10) > 0)
TEST_ERROR
/* nothing should be changed in meta_aggr */
@@ -503,7 +503,7 @@ test_mf_eoa_shrink(const char *env_h5_drvr, hid_t fapl)
H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
/* should not succeed in shrinking */
- if(H5MF_try_shrink(f, type, H5P_DATASET_XFER_DEFAULT, addr, (hsize_t)TEST_BLOCK_SIZE30 + 10) > 0)
+ if(H5MF_try_shrink(f, type, H5AC_ind_read_dxpl_id, addr, (hsize_t)TEST_BLOCK_SIZE30 + 10) > 0)
TEST_ERROR
/* nothing should be changed in meta_aggr */
@@ -546,7 +546,7 @@ test_mf_eoa_shrink(const char *env_h5_drvr, hid_t fapl)
H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
/* should succeed in shrinking */
- if(H5MF_try_shrink(f, type, H5P_DATASET_XFER_DEFAULT, addr+10, (hsize_t)(TEST_BLOCK_SIZE30 - 10)) <= 0)
+ if(H5MF_try_shrink(f, type, H5AC_ind_read_dxpl_id, addr+10, (hsize_t)(TEST_BLOCK_SIZE30 - 10)) <= 0)
TEST_ERROR
/* nothing should be changed in meta_aggr */
@@ -656,7 +656,7 @@ test_mf_eoa_extend(const char *env_h5_drvr, hid_t fapl)
H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
type = H5FD_MEM_SUPER;
- addr = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE30);
+ addr = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE30);
if (addr < (haddr_t)file_size)
TEST_ERROR
@@ -685,7 +685,7 @@ test_mf_eoa_extend(const char *env_h5_drvr, hid_t fapl)
FAIL_STACK_ERROR
/* should succeed */
- was_extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)addr, (hsize_t)TEST_BLOCK_SIZE30, (hsize_t)TEST_BLOCK_SIZE50);
+ was_extended = H5MF_try_extend(f, H5AC_ind_read_dxpl_id, type, (haddr_t)addr, (hsize_t)TEST_BLOCK_SIZE30, (hsize_t)TEST_BLOCK_SIZE50);
if(was_extended <= 0)
TEST_ERROR
@@ -734,7 +734,7 @@ test_mf_eoa_extend(const char *env_h5_drvr, hid_t fapl)
H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
type = H5FD_MEM_SUPER;
- addr = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE30);
+ addr = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE30);
if(addr < (haddr_t)file_size)
TEST_ERROR
@@ -744,7 +744,7 @@ test_mf_eoa_extend(const char *env_h5_drvr, hid_t fapl)
if(new_ma_addr != ma_addr)
TEST_ERROR
- was_extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)addr, (hsize_t)(TEST_BLOCK_SIZE30-10), (hsize_t)(TEST_BLOCK_SIZE50));
+ was_extended = H5MF_try_extend(f, H5AC_ind_read_dxpl_id, type, (haddr_t)addr, (hsize_t)(TEST_BLOCK_SIZE30-10), (hsize_t)(TEST_BLOCK_SIZE50));
/* should not succeed */
if(was_extended > 0)
@@ -866,19 +866,19 @@ test_mf_tmp(const char *env_h5_drvr, hid_t fapl)
/* Reading & writing with a temporary address value should fail */
H5E_BEGIN_TRY {
- status = H5F_block_read(f, H5FD_MEM_SUPER, tmp_addr, sizeof(buf), H5P_DATASET_XFER_DEFAULT, &buf);
+ status = H5F_block_read(f, H5FD_MEM_SUPER, tmp_addr, sizeof(buf), H5AC_ind_read_dxpl_id, &buf);
} H5E_END_TRY;
if(status >= 0)
TEST_ERROR
H5E_BEGIN_TRY {
- status = H5F_block_write(f, H5FD_MEM_SUPER, tmp_addr, sizeof(buf), H5P_DATASET_XFER_DEFAULT, &buf);
+ status = H5F_block_write(f, H5FD_MEM_SUPER, tmp_addr, sizeof(buf), H5AC_ind_read_dxpl_id, &buf);
} H5E_END_TRY;
if(status >= 0)
TEST_ERROR
/* Freeing a temporary address value should fail */
H5E_BEGIN_TRY {
- status = H5MF_xfree(f, H5FD_MEM_SUPER, H5P_DATASET_XFER_DEFAULT, tmp_addr, (hsize_t)TEST_BLOCK_SIZE30);
+ status = H5MF_xfree(f, H5FD_MEM_SUPER, H5AC_ind_read_dxpl_id, tmp_addr, (hsize_t)TEST_BLOCK_SIZE30);
} H5E_END_TRY;
if(status >= 0)
TEST_ERROR
@@ -911,7 +911,7 @@ test_mf_tmp(const char *env_h5_drvr, hid_t fapl)
TEST_ERROR
/* Allocate 1/3 of the file as normal address space */
- if(HADDR_UNDEF == (norm_addr = H5MF_alloc(f, H5FD_MEM_DRAW, H5P_DATASET_XFER_DEFAULT, (hsize_t)(maxaddr / 3))))
+ if(HADDR_UNDEF == (norm_addr = H5MF_alloc(f, H5FD_MEM_DRAW, H5AC_ind_read_dxpl_id, (hsize_t)(maxaddr / 3))))
FAIL_STACK_ERROR
if(H5F_IS_TMP_ADDR(f, norm_addr))
TEST_ERROR
@@ -925,13 +925,13 @@ test_mf_tmp(const char *env_h5_drvr, hid_t fapl)
/* Test that pushing normal space allocation into temporary space fails */
H5E_BEGIN_TRY {
- check_addr = H5MF_alloc(f, H5FD_MEM_DRAW, H5P_DATASET_XFER_DEFAULT, (hsize_t)(maxaddr / 3));
+ check_addr = H5MF_alloc(f, H5FD_MEM_DRAW, H5AC_ind_read_dxpl_id, (hsize_t)(maxaddr / 3));
} H5E_END_TRY;
if(H5F_addr_defined(check_addr))
TEST_ERROR
/* Free the normal block (so the file doesn't blow up to a huge size) */
- if(H5MF_xfree(f, H5FD_MEM_DRAW, H5P_DATASET_XFER_DEFAULT, norm_addr, (hsize_t)(maxaddr / 3)) < 0)
+ if(H5MF_xfree(f, H5FD_MEM_DRAW, H5AC_ind_read_dxpl_id, norm_addr, (hsize_t)(maxaddr / 3)) < 0)
FAIL_STACK_ERROR
/* Close the file */
@@ -1014,7 +1014,7 @@ test_mf_fs_start(hid_t fapl)
/* Start up free-space manager */
type = H5FD_MEM_SUPER;
- if(H5MF_alloc_start(f, H5P_DATASET_XFER_DEFAULT, type) < 0)
+ if(H5MF_alloc_start(f, H5AC_ind_read_dxpl_id, type) < 0)
TEST_ERROR
if (f->shared->fs_state[type] != H5F_FS_STATE_OPEN)
@@ -1131,7 +1131,7 @@ test_mf_fs_alloc_free(hid_t fapl)
type = H5FD_MEM_SUPER;
- if(H5MF_alloc_start(f, H5P_DATASET_XFER_DEFAULT, type) < 0)
+ if(H5MF_alloc_start(f, H5AC_ind_read_dxpl_id, type) < 0)
TEST_ERROR
if (f->shared->fs_state[type] != H5F_FS_STATE_OPEN)
@@ -1144,13 +1144,13 @@ test_mf_fs_alloc_free(hid_t fapl)
/* Construct user data for callbacks */
udata.f = f;
- udata.dxpl_id = H5P_DATASET_XFER_DEFAULT;
+ udata.dxpl_id = H5AC_ind_read_dxpl_id;
udata.alloc_type = type;
udata.allow_sect_absorb = TRUE;
udata.allow_eoa_shrink_only = FALSE;
/* Add section A to free-space manager */
- if (H5FS_sect_add(f, H5P_DATASET_XFER_DEFAULT, f->shared->fs_man[type], (H5FS_section_info_t *)sect_node, H5FS_ADD_RETURNED_SPACE, &udata))
+ if (H5FS_sect_add(f, H5AC_ind_read_dxpl_id, f->shared->fs_man[type], (H5FS_section_info_t *)sect_node, H5FS_ADD_RETURNED_SPACE, &udata))
FAIL_STACK_ERROR
HDmemset(&state, 0, sizeof(frspace_state_t));
@@ -1162,7 +1162,7 @@ test_mf_fs_alloc_free(hid_t fapl)
TEST_ERROR
/* Allocate a block of 30 */
- addr = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE30);
+ addr = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE30);
/* Verify that the allocated block is section A in free-space */
if (addr != TEST_BLOCK_ADDR70)
@@ -1176,7 +1176,7 @@ test_mf_fs_alloc_free(hid_t fapl)
TEST_ERROR
/* Free the block to free-space */
- H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr, (hsize_t)TEST_BLOCK_SIZE30);
+ H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr, (hsize_t)TEST_BLOCK_SIZE30);
state.tot_space += TEST_BLOCK_SIZE30;
state.tot_sect_count += 1;
@@ -1185,7 +1185,7 @@ test_mf_fs_alloc_free(hid_t fapl)
TEST_ERROR
/* Remove section A from free-space */
- if(H5FS_sect_find(f, H5P_DATASET_XFER_DEFAULT, f->shared->fs_man[type],
+ if(H5FS_sect_find(f, H5AC_ind_read_dxpl_id, f->shared->fs_man[type],
(hsize_t)TEST_BLOCK_SIZE30, (H5FS_section_info_t **)&node) < 0)
TEST_ERROR
@@ -1218,7 +1218,7 @@ test_mf_fs_alloc_free(hid_t fapl)
type = H5FD_MEM_SUPER;
- if(H5MF_alloc_start(f, H5P_DATASET_XFER_DEFAULT, type) < 0)
+ if(H5MF_alloc_start(f, H5AC_ind_read_dxpl_id, type) < 0)
TEST_ERROR
if (f->shared->fs_state[type] != H5F_FS_STATE_OPEN)
@@ -1231,13 +1231,13 @@ test_mf_fs_alloc_free(hid_t fapl)
/* Construct user data for callbacks */
udata.f = f;
- udata.dxpl_id = H5P_DATASET_XFER_DEFAULT;
+ udata.dxpl_id = H5AC_ind_read_dxpl_id;
udata.alloc_type = type;
udata.allow_sect_absorb = TRUE;
udata.allow_eoa_shrink_only = FALSE;
/* Add section A to free-space manager */
- if (H5FS_sect_add(f, H5P_DATASET_XFER_DEFAULT, f->shared->fs_man[type], (H5FS_section_info_t *)sect_node, H5FS_ADD_RETURNED_SPACE, &udata))
+ if (H5FS_sect_add(f, H5AC_ind_read_dxpl_id, f->shared->fs_man[type], (H5FS_section_info_t *)sect_node, H5FS_ADD_RETURNED_SPACE, &udata))
FAIL_STACK_ERROR
HDmemset(&state, 0, sizeof(frspace_state_t));
@@ -1249,7 +1249,7 @@ test_mf_fs_alloc_free(hid_t fapl)
TEST_ERROR
/* Allocate a block of 20 */
- addr = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)(TEST_BLOCK_SIZE20));
+ addr = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)(TEST_BLOCK_SIZE20));
/* Verify that the allocated block is section A in free-space manager */
if (addr != TEST_BLOCK_ADDR70)
@@ -1262,7 +1262,7 @@ test_mf_fs_alloc_free(hid_t fapl)
TEST_ERROR
/* Free the block to free-space manager */
- H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr, (hsize_t)(TEST_BLOCK_SIZE20));
+ H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr, (hsize_t)(TEST_BLOCK_SIZE20));
/* Still 1 section in free-space because of merging */
state.tot_space += TEST_BLOCK_SIZE20;
@@ -1270,7 +1270,7 @@ test_mf_fs_alloc_free(hid_t fapl)
TEST_ERROR
/* Remove section A from free-space manager */
- if(H5FS_sect_find(f, H5P_DATASET_XFER_DEFAULT, f->shared->fs_man[type],
+ if(H5FS_sect_find(f, H5AC_ind_read_dxpl_id, f->shared->fs_man[type],
(hsize_t)TEST_BLOCK_SIZE30, (H5FS_section_info_t **)&node) < 0)
FAIL_STACK_ERROR
@@ -1303,7 +1303,7 @@ test_mf_fs_alloc_free(hid_t fapl)
type = H5FD_MEM_SUPER;
- if(H5MF_alloc_start(f, H5P_DATASET_XFER_DEFAULT, type) < 0)
+ if(H5MF_alloc_start(f, H5AC_ind_read_dxpl_id, type) < 0)
TEST_ERROR
if (f->shared->fs_state[type] != H5F_FS_STATE_OPEN)
@@ -1316,13 +1316,13 @@ test_mf_fs_alloc_free(hid_t fapl)
/* Construct user data for callbacks */
udata.f = f;
- udata.dxpl_id = H5P_DATASET_XFER_DEFAULT;
+ udata.dxpl_id = H5AC_ind_read_dxpl_id;
udata.alloc_type = type;
udata.allow_sect_absorb = TRUE;
udata.allow_eoa_shrink_only = FALSE;
/* Add section A to free-space manager */
- if (H5FS_sect_add(f, H5P_DATASET_XFER_DEFAULT, f->shared->fs_man[type], (H5FS_section_info_t *)sect_node, H5FS_ADD_RETURNED_SPACE, &udata))
+ if (H5FS_sect_add(f, H5AC_ind_read_dxpl_id, f->shared->fs_man[type], (H5FS_section_info_t *)sect_node, H5FS_ADD_RETURNED_SPACE, &udata))
FAIL_STACK_ERROR
HDmemset(&state, 0, sizeof(frspace_state_t));
@@ -1338,7 +1338,7 @@ test_mf_fs_alloc_free(hid_t fapl)
* Since free-space manager cannot fulfull the request,
* the block is obtained from file allocation
*/
- addr = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)(TEST_BLOCK_SIZE40));
+ addr = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)(TEST_BLOCK_SIZE40));
/* Verify that the allocated block is not section A in free-space */
if (addr == TEST_BLOCK_ADDR70)
@@ -1349,7 +1349,7 @@ test_mf_fs_alloc_free(hid_t fapl)
TEST_ERROR
/* Remove section A from free-space */
- if(H5FS_sect_find(f, H5P_DATASET_XFER_DEFAULT, f->shared->fs_man[type],
+ if(H5FS_sect_find(f, H5AC_ind_read_dxpl_id, f->shared->fs_man[type],
(hsize_t)TEST_BLOCK_SIZE30, (H5FS_section_info_t **)&node) < 0)
FAIL_STACK_ERROR
@@ -1362,7 +1362,7 @@ test_mf_fs_alloc_free(hid_t fapl)
TEST_ERROR
/* Free the block of size 40 to free-space */
- H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr, (hsize_t)(TEST_BLOCK_SIZE40));
+ H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr, (hsize_t)(TEST_BLOCK_SIZE40));
/*
* Free-space info is the same.
@@ -1489,7 +1489,7 @@ test_mf_fs_extend(hid_t fapl)
type = H5FD_MEM_SUPER;
- if(H5MF_alloc_start(f, H5P_DATASET_XFER_DEFAULT, type) < 0)
+ if(H5MF_alloc_start(f, H5AC_ind_read_dxpl_id, type) < 0)
TEST_ERROR
if (f->shared->fs_state[type] != H5F_FS_STATE_OPEN)
@@ -1502,13 +1502,13 @@ test_mf_fs_extend(hid_t fapl)
/* Construct user data for callbacks */
udata.f = f;
- udata.dxpl_id = H5P_DATASET_XFER_DEFAULT;
+ udata.dxpl_id = H5AC_ind_read_dxpl_id;
udata.alloc_type = type;
udata.allow_sect_absorb = TRUE;
udata.allow_eoa_shrink_only = FALSE;
/* Add section A to free-space manager */
- if (H5FS_sect_add(f, H5P_DATASET_XFER_DEFAULT, f->shared->fs_man[type], (H5FS_section_info_t *)sect_node1, H5FS_ADD_RETURNED_SPACE, &udata))
+ if (H5FS_sect_add(f, H5AC_ind_read_dxpl_id, f->shared->fs_man[type], (H5FS_section_info_t *)sect_node1, H5FS_ADD_RETURNED_SPACE, &udata))
FAIL_STACK_ERROR
HDmemset(&state, 0, sizeof(frspace_state_t));
@@ -1520,7 +1520,7 @@ test_mf_fs_extend(hid_t fapl)
TEST_ERROR
/* Allocate a block of 30 */
- addr = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE30);
+ addr = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE30);
/* Verify that the allocated block is section A in free-space manager */
if (addr != TEST_BLOCK_ADDR70)
@@ -1537,7 +1537,7 @@ test_mf_fs_extend(hid_t fapl)
sect_node2 = H5MF_sect_simple_new((haddr_t)TEST_BLOCK_ADDR100, (hsize_t)TEST_BLOCK_SIZE50);
/* Add section B to free-space manager */
- if (H5FS_sect_add(f, H5P_DATASET_XFER_DEFAULT, f->shared->fs_man[type], (H5FS_section_info_t *)sect_node2, H5FS_ADD_RETURNED_SPACE, &udata))
+ if (H5FS_sect_add(f, H5AC_ind_read_dxpl_id, f->shared->fs_man[type], (H5FS_section_info_t *)sect_node2, H5FS_ADD_RETURNED_SPACE, &udata))
FAIL_STACK_ERROR
state.tot_space += TEST_BLOCK_SIZE50;
@@ -1548,7 +1548,7 @@ test_mf_fs_extend(hid_t fapl)
TEST_ERROR
/* Try to extend the allocated block */
- was_extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)TEST_BLOCK_ADDR70, (hsize_t)TEST_BLOCK_SIZE30, (hsize_t)TEST_BLOCK_SIZE50);
+ was_extended = H5MF_try_extend(f, H5AC_ind_read_dxpl_id, type, (haddr_t)TEST_BLOCK_ADDR70, (hsize_t)TEST_BLOCK_SIZE30, (hsize_t)TEST_BLOCK_SIZE50);
/* should succeed */
if(was_extended <= 0)
@@ -1563,7 +1563,7 @@ test_mf_fs_extend(hid_t fapl)
TEST_ERROR
/* Free the extended block to free-space manager */
- H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr, (hsize_t)(TEST_BLOCK_SIZE30+TEST_BLOCK_SIZE50));
+ H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr, (hsize_t)(TEST_BLOCK_SIZE30+TEST_BLOCK_SIZE50));
/* Verify that the extended block is back into free-space */
state.tot_space += TEST_BLOCK_SIZE30+TEST_BLOCK_SIZE50;
@@ -1574,7 +1574,7 @@ test_mf_fs_extend(hid_t fapl)
TEST_ERROR
/* Remove the extended block */
- if(H5FS_sect_find(f, H5P_DATASET_XFER_DEFAULT, f->shared->fs_man[type],
+ if(H5FS_sect_find(f, H5AC_ind_read_dxpl_id, f->shared->fs_man[type],
(hsize_t)(TEST_BLOCK_SIZE30+TEST_BLOCK_SIZE50), (H5FS_section_info_t **)&node) < 0)
TEST_ERROR
@@ -1607,7 +1607,7 @@ test_mf_fs_extend(hid_t fapl)
type = H5FD_MEM_SUPER;
- if(H5MF_alloc_start(f, H5P_DATASET_XFER_DEFAULT, type) < 0)
+ if(H5MF_alloc_start(f, H5AC_ind_read_dxpl_id, type) < 0)
TEST_ERROR
if (f->shared->fs_state[type] != H5F_FS_STATE_OPEN)
@@ -1620,13 +1620,13 @@ test_mf_fs_extend(hid_t fapl)
/* Construct user data for callbacks */
udata.f = f;
- udata.dxpl_id = H5P_DATASET_XFER_DEFAULT;
+ udata.dxpl_id = H5AC_ind_read_dxpl_id;
udata.alloc_type = type;
udata.allow_sect_absorb = TRUE;
udata.allow_eoa_shrink_only = FALSE;
/* Add section A to free-space */
- if (H5FS_sect_add(f, H5P_DATASET_XFER_DEFAULT, f->shared->fs_man[type], (H5FS_section_info_t *)sect_node1, H5FS_ADD_RETURNED_SPACE, &udata))
+ if (H5FS_sect_add(f, H5AC_ind_read_dxpl_id, f->shared->fs_man[type], (H5FS_section_info_t *)sect_node1, H5FS_ADD_RETURNED_SPACE, &udata))
FAIL_STACK_ERROR
HDmemset(&state, 0, sizeof(frspace_state_t));
@@ -1638,7 +1638,7 @@ test_mf_fs_extend(hid_t fapl)
TEST_ERROR
/* Allocate a block of 30 */
- addr = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE30);
+ addr = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE30);
/* Verify that the allocated block is section A in free-space manager */
if (addr != TEST_BLOCK_ADDR70)
@@ -1655,7 +1655,7 @@ test_mf_fs_extend(hid_t fapl)
sect_node2 = H5MF_sect_simple_new((haddr_t)TEST_BLOCK_ADDR100, (hsize_t)TEST_BLOCK_SIZE50);
/* Add section B to free-space manager */
- if (H5FS_sect_add(f, H5P_DATASET_XFER_DEFAULT, f->shared->fs_man[type], (H5FS_section_info_t *)sect_node2, H5FS_ADD_RETURNED_SPACE, &udata))
+ if (H5FS_sect_add(f, H5AC_ind_read_dxpl_id, f->shared->fs_man[type], (H5FS_section_info_t *)sect_node2, H5FS_ADD_RETURNED_SPACE, &udata))
FAIL_STACK_ERROR
state.tot_space += TEST_BLOCK_SIZE50;
@@ -1666,7 +1666,7 @@ test_mf_fs_extend(hid_t fapl)
TEST_ERROR
/* Try to extend the allocated block */
- was_extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)TEST_BLOCK_ADDR70, (hsize_t)TEST_BLOCK_SIZE30, (hsize_t)(TEST_BLOCK_SIZE50+10));
+ was_extended = H5MF_try_extend(f, H5AC_ind_read_dxpl_id, type, (haddr_t)TEST_BLOCK_ADDR70, (hsize_t)TEST_BLOCK_SIZE30, (hsize_t)(TEST_BLOCK_SIZE50+10));
/* Should not be able to extend the allocated block */
if(was_extended)
@@ -1677,7 +1677,7 @@ test_mf_fs_extend(hid_t fapl)
TEST_ERROR
/* Free the allocated block A to free-space */
- H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr, (hsize_t)TEST_BLOCK_SIZE30);
+ H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr, (hsize_t)TEST_BLOCK_SIZE30);
/* the returned section A is merged with section B in free-space */
/* rest of the info remains the same */
@@ -1687,7 +1687,7 @@ test_mf_fs_extend(hid_t fapl)
TEST_ERROR
/* Remove the merged sections A & B from free-space */
- if(H5FS_sect_find(f, H5P_DATASET_XFER_DEFAULT, f->shared->fs_man[type],
+ if(H5FS_sect_find(f, H5AC_ind_read_dxpl_id, f->shared->fs_man[type],
(hsize_t)(TEST_BLOCK_SIZE30+TEST_BLOCK_SIZE50), (H5FS_section_info_t **)&node) < 0)
TEST_ERROR
@@ -1720,7 +1720,7 @@ test_mf_fs_extend(hid_t fapl)
type = H5FD_MEM_SUPER;
- if(H5MF_alloc_start(f, H5P_DATASET_XFER_DEFAULT, type) < 0)
+ if(H5MF_alloc_start(f, H5AC_ind_read_dxpl_id, type) < 0)
TEST_ERROR
if (f->shared->fs_state[type] != H5F_FS_STATE_OPEN)
@@ -1733,13 +1733,13 @@ test_mf_fs_extend(hid_t fapl)
/* Construct user data for callbacks */
udata.f = f;
- udata.dxpl_id = H5P_DATASET_XFER_DEFAULT;
+ udata.dxpl_id = H5AC_ind_read_dxpl_id;
udata.alloc_type = type;
udata.allow_sect_absorb = TRUE;
udata.allow_eoa_shrink_only = FALSE;
/* Add section A to free-space */
- if (H5FS_sect_add(f, H5P_DATASET_XFER_DEFAULT, f->shared->fs_man[type], (H5FS_section_info_t *)sect_node1, H5FS_ADD_RETURNED_SPACE, &udata))
+ if (H5FS_sect_add(f, H5AC_ind_read_dxpl_id, f->shared->fs_man[type], (H5FS_section_info_t *)sect_node1, H5FS_ADD_RETURNED_SPACE, &udata))
FAIL_STACK_ERROR
HDmemset(&state, 0, sizeof(frspace_state_t));
@@ -1751,7 +1751,7 @@ test_mf_fs_extend(hid_t fapl)
TEST_ERROR
/* Allocate a block of 30 */
- addr = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE30);
+ addr = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE30);
/* Verify that the allocated block is section A in free-space manager */
if (addr != TEST_BLOCK_ADDR70)
@@ -1768,7 +1768,7 @@ test_mf_fs_extend(hid_t fapl)
sect_node2 = H5MF_sect_simple_new((haddr_t)TEST_BLOCK_ADDR100, (hsize_t)TEST_BLOCK_SIZE50);
/* Add section B to free-space manager */
- if (H5FS_sect_add(f, H5P_DATASET_XFER_DEFAULT, f->shared->fs_man[type], (H5FS_section_info_t *)sect_node2, H5FS_ADD_RETURNED_SPACE, &udata))
+ if (H5FS_sect_add(f, H5AC_ind_read_dxpl_id, f->shared->fs_man[type], (H5FS_section_info_t *)sect_node2, H5FS_ADD_RETURNED_SPACE, &udata))
FAIL_STACK_ERROR
state.tot_space += TEST_BLOCK_SIZE50;
@@ -1779,7 +1779,7 @@ test_mf_fs_extend(hid_t fapl)
TEST_ERROR
/* Try to extend the allocated block */
- was_extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)TEST_BLOCK_ADDR70, (hsize_t)TEST_BLOCK_SIZE30, (hsize_t)(TEST_BLOCK_SIZE40));
+ was_extended = H5MF_try_extend(f, H5AC_ind_read_dxpl_id, type, (haddr_t)TEST_BLOCK_ADDR70, (hsize_t)TEST_BLOCK_SIZE30, (hsize_t)(TEST_BLOCK_SIZE40));
/* Should succeed in extending the allocated block */
if(was_extended <=0)
@@ -1791,7 +1791,7 @@ test_mf_fs_extend(hid_t fapl)
TEST_ERROR
/* Free the extended block */
- H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr, (hsize_t)(TEST_BLOCK_SIZE30+TEST_BLOCK_SIZE40));
+ H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr, (hsize_t)(TEST_BLOCK_SIZE30+TEST_BLOCK_SIZE40));
/* rest info is same, the extended section returned is merged with the section in free-space */
state.tot_space += (TEST_BLOCK_SIZE30+TEST_BLOCK_SIZE40);
@@ -1800,7 +1800,7 @@ test_mf_fs_extend(hid_t fapl)
TEST_ERROR
/* Remove the merged sections A & B from free-space */
- if(H5FS_sect_find(f, H5P_DATASET_XFER_DEFAULT, f->shared->fs_man[type],
+ if(H5FS_sect_find(f, H5AC_ind_read_dxpl_id, f->shared->fs_man[type],
(hsize_t)(TEST_BLOCK_SIZE30+TEST_BLOCK_SIZE50), (H5FS_section_info_t **)&node) < 0)
TEST_ERROR
@@ -1833,7 +1833,7 @@ test_mf_fs_extend(hid_t fapl)
type = H5FD_MEM_SUPER;
- if(H5MF_alloc_start(f, H5P_DATASET_XFER_DEFAULT, type) < 0)
+ if(H5MF_alloc_start(f, H5AC_ind_read_dxpl_id, type) < 0)
TEST_ERROR
if (f->shared->fs_state[type] != H5F_FS_STATE_OPEN)
@@ -1846,13 +1846,13 @@ test_mf_fs_extend(hid_t fapl)
/* Construct user data for callbacks */
udata.f = f;
- udata.dxpl_id = H5P_DATASET_XFER_DEFAULT;
+ udata.dxpl_id = H5AC_ind_read_dxpl_id;
udata.alloc_type = type;
udata.allow_sect_absorb = TRUE;
udata.allow_eoa_shrink_only = FALSE;
/* Add section A of size=20 to free-space */
- if (H5FS_sect_add(f, H5P_DATASET_XFER_DEFAULT, f->shared->fs_man[type], (H5FS_section_info_t *)sect_node1, H5FS_ADD_RETURNED_SPACE, &udata))
+ if (H5FS_sect_add(f, H5AC_ind_read_dxpl_id, f->shared->fs_man[type], (H5FS_section_info_t *)sect_node1, H5FS_ADD_RETURNED_SPACE, &udata))
FAIL_STACK_ERROR
HDmemset(&state, 0, sizeof(frspace_state_t));
@@ -1864,7 +1864,7 @@ test_mf_fs_extend(hid_t fapl)
TEST_ERROR
/* Allocate a block of size=20 */
- addr = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)(TEST_BLOCK_SIZE30-10));
+ addr = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)(TEST_BLOCK_SIZE30-10));
/* Verify that the allocated block is section A in free-space manager */
if (addr != TEST_BLOCK_ADDR70)
@@ -1881,7 +1881,7 @@ test_mf_fs_extend(hid_t fapl)
sect_node2 = H5MF_sect_simple_new((haddr_t)TEST_BLOCK_ADDR100, (hsize_t)TEST_BLOCK_SIZE50);
/* Add section B to free-space manager */
- if (H5FS_sect_add(f, H5P_DATASET_XFER_DEFAULT, f->shared->fs_man[type], (H5FS_section_info_t *)sect_node2, H5FS_ADD_RETURNED_SPACE, &udata))
+ if (H5FS_sect_add(f, H5AC_ind_read_dxpl_id, f->shared->fs_man[type], (H5FS_section_info_t *)sect_node2, H5FS_ADD_RETURNED_SPACE, &udata))
FAIL_STACK_ERROR
state.tot_space += TEST_BLOCK_SIZE50;
@@ -1892,7 +1892,7 @@ test_mf_fs_extend(hid_t fapl)
TEST_ERROR
/* Try to extend the allocated block */
- was_extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)TEST_BLOCK_ADDR70, (hsize_t)(TEST_BLOCK_SIZE30-10), (hsize_t)TEST_BLOCK_SIZE50);
+ was_extended = H5MF_try_extend(f, H5AC_ind_read_dxpl_id, type, (haddr_t)TEST_BLOCK_ADDR70, (hsize_t)(TEST_BLOCK_SIZE30-10), (hsize_t)TEST_BLOCK_SIZE50);
/* Should not succeed in extending the allocated block */
if(was_extended)
@@ -1903,7 +1903,7 @@ test_mf_fs_extend(hid_t fapl)
TEST_ERROR
/* Free the allocated block */
- H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr, (hsize_t)(TEST_BLOCK_SIZE30-10));
+ H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr, (hsize_t)(TEST_BLOCK_SIZE30-10));
state.tot_space += (TEST_BLOCK_SIZE30-10);
state.tot_sect_count += 1;
@@ -1913,7 +1913,7 @@ test_mf_fs_extend(hid_t fapl)
TEST_ERROR
/* Remove section A from free-space manger */
- if(H5FS_sect_find(f, H5P_DATASET_XFER_DEFAULT, f->shared->fs_man[type],
+ if(H5FS_sect_find(f, H5AC_ind_read_dxpl_id, f->shared->fs_man[type],
(hsize_t)(TEST_BLOCK_SIZE30-10), (H5FS_section_info_t **)&node) < 0)
TEST_ERROR
@@ -1922,7 +1922,7 @@ test_mf_fs_extend(hid_t fapl)
TEST_ERROR
/* Remove section B from free-space manager */
- if(H5FS_sect_find(f, H5P_DATASET_XFER_DEFAULT, f->shared->fs_man[type],
+ if(H5FS_sect_find(f, H5AC_ind_read_dxpl_id, f->shared->fs_man[type],
(hsize_t)TEST_BLOCK_SIZE50, (H5FS_section_info_t **)&node) < 0)
TEST_ERROR
@@ -2025,7 +2025,7 @@ test_mf_fs_absorb(const char *env_h5_drvr, hid_t fapl)
type = H5FD_MEM_SUPER;
- if(H5MF_alloc_start(f, H5P_DATASET_XFER_DEFAULT, type) < 0)
+ if(H5MF_alloc_start(f, H5AC_ind_read_dxpl_id, type) < 0)
TEST_ERROR
if (f->shared->fs_state[type] != H5F_FS_STATE_OPEN)
@@ -2034,7 +2034,7 @@ test_mf_fs_absorb(const char *env_h5_drvr, hid_t fapl)
TEST_ERROR
/* Allocate a section from meta_aggr */
- addr = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE30);
+ addr = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE30);
H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
@@ -2043,17 +2043,17 @@ test_mf_fs_absorb(const char *env_h5_drvr, hid_t fapl)
/* Construct user data for callbacks */
udata.f = f;
- udata.dxpl_id = H5P_DATASET_XFER_DEFAULT;
+ udata.dxpl_id = H5AC_ind_read_dxpl_id;
udata.alloc_type = type;
udata.allow_sect_absorb = TRUE;
udata.allow_eoa_shrink_only = FALSE;
/* When adding, meta_aggr is absorbed onto the beginning of the section */
- if (H5FS_sect_add(f, H5P_DATASET_XFER_DEFAULT, f->shared->fs_man[type], (H5FS_section_info_t *)sect_node, H5FS_ADD_RETURNED_SPACE, &udata))
+ if (H5FS_sect_add(f, H5AC_ind_read_dxpl_id, f->shared->fs_man[type], (H5FS_section_info_t *)sect_node, H5FS_ADD_RETURNED_SPACE, &udata))
FAIL_STACK_ERROR
/* Verify that the section did absorb the aggregator */
- if(H5FS_sect_find(f, H5P_DATASET_XFER_DEFAULT, f->shared->fs_man[type],
+ if(H5FS_sect_find(f, H5AC_ind_read_dxpl_id, f->shared->fs_man[type],
(hsize_t)TEST_BLOCK_SIZE2048, (H5FS_section_info_t **)&node) < 0)
TEST_ERROR
@@ -2069,7 +2069,7 @@ test_mf_fs_absorb(const char *env_h5_drvr, hid_t fapl)
f->shared->meta_aggr.size = ma_size;
/* Remove section from meta_aggr */
- H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr, (hsize_t)TEST_BLOCK_SIZE30);
+ H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr, (hsize_t)TEST_BLOCK_SIZE30);
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
@@ -2095,7 +2095,7 @@ test_mf_fs_absorb(const char *env_h5_drvr, hid_t fapl)
type = H5FD_MEM_SUPER;
- if(H5MF_alloc_start(f, H5P_DATASET_XFER_DEFAULT, type) < 0)
+ if(H5MF_alloc_start(f, H5AC_ind_read_dxpl_id, type) < 0)
TEST_ERROR
if (f->shared->fs_state[type] != H5F_FS_STATE_OPEN)
@@ -2104,29 +2104,29 @@ test_mf_fs_absorb(const char *env_h5_drvr, hid_t fapl)
TEST_ERROR
/* Allocate a section from meta_aggr */
- addr = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE30);
+ addr = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE30);
H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
/* Allocate a section from sdata_aggr */
stype = H5FD_MEM_DRAW;
- saddr = H5MF_alloc(f, stype, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE50);
+ saddr = H5MF_alloc(f, stype, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE50);
/* Add a section to free-space that adjoins the beginning of meta_aggr */
sect_node = H5MF_sect_simple_new((haddr_t)addr, (hsize_t)TEST_BLOCK_SIZE30);
/* Construct user data for callbacks */
udata.f = f;
- udata.dxpl_id = H5P_DATASET_XFER_DEFAULT;
+ udata.dxpl_id = H5AC_ind_read_dxpl_id;
udata.alloc_type = type;
udata.allow_sect_absorb = TRUE;
udata.allow_eoa_shrink_only = FALSE;
/* When adding, meta_aggr is absorbed onto the end of the section */
- if (H5FS_sect_add(f, H5P_DATASET_XFER_DEFAULT, f->shared->fs_man[type], (H5FS_section_info_t *)sect_node, H5FS_ADD_RETURNED_SPACE, &udata))
+ if (H5FS_sect_add(f, H5AC_ind_read_dxpl_id, f->shared->fs_man[type], (H5FS_section_info_t *)sect_node, H5FS_ADD_RETURNED_SPACE, &udata))
FAIL_STACK_ERROR
/* Verify that the section did absorb the aggregator */
- if(H5FS_sect_find(f, H5P_DATASET_XFER_DEFAULT, f->shared->fs_man[type],
+ if(H5FS_sect_find(f, H5AC_ind_read_dxpl_id, f->shared->fs_man[type],
(hsize_t)(ma_size+TEST_BLOCK_SIZE30), (H5FS_section_info_t **)&node) < 0)
TEST_ERROR
@@ -2142,9 +2142,9 @@ test_mf_fs_absorb(const char *env_h5_drvr, hid_t fapl)
f->shared->meta_aggr.size = ma_size;
/* Remove section from meta_aggr */
- H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr, (hsize_t)TEST_BLOCK_SIZE30);
+ H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr, (hsize_t)TEST_BLOCK_SIZE30);
/* Remove section from sdata_aggr */
- H5MF_xfree(f, stype, H5P_DATASET_XFER_DEFAULT, saddr, (hsize_t)TEST_BLOCK_SIZE50);
+ H5MF_xfree(f, stype, H5AC_ind_read_dxpl_id, saddr, (hsize_t)TEST_BLOCK_SIZE50);
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
@@ -2224,14 +2224,14 @@ test_mf_aggr_alloc1(const char *env_h5_drvr, hid_t fapl)
/* Allocate first block from meta_aggr */
type = H5FD_MEM_SUPER;
- addr1 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE30);
+ addr1 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE30);
H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if ((addr1+TEST_BLOCK_SIZE30) != ma_addr)
TEST_ERROR
/* Allocate second block from meta_aggr */
- addr2 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE50);
+ addr2 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE50);
H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if ((addr2+TEST_BLOCK_SIZE50) != ma_addr)
@@ -2259,8 +2259,8 @@ test_mf_aggr_alloc1(const char *env_h5_drvr, hid_t fapl)
FAIL_STACK_ERROR
/* Free the two blocks */
- H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr1, (hsize_t)TEST_BLOCK_SIZE30);
- H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr2, (hsize_t)TEST_BLOCK_SIZE50);
+ H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr1, (hsize_t)TEST_BLOCK_SIZE30);
+ H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr2, (hsize_t)TEST_BLOCK_SIZE50);
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
@@ -2354,13 +2354,13 @@ test_mf_aggr_alloc2(const char *env_h5_drvr, hid_t fapl)
FAIL_STACK_ERROR
type = H5FD_MEM_SUPER;
- addr1 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE30);
+ addr1 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE30);
H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if ((addr1+TEST_BLOCK_SIZE30) != ma_addr)
TEST_ERROR
- addr2 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE50);
+ addr2 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE50);
H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if ((addr2+TEST_BLOCK_SIZE50) != ma_addr)
@@ -2369,7 +2369,7 @@ test_mf_aggr_alloc2(const char *env_h5_drvr, hid_t fapl)
if (ma_size != (TEST_BLOCK_SIZE2048 - (TEST_BLOCK_SIZE30 + TEST_BLOCK_SIZE50)))
TEST_ERROR
- addr3 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE2058);
+ addr3 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE2058);
H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
@@ -2399,7 +2399,7 @@ test_mf_aggr_alloc2(const char *env_h5_drvr, hid_t fapl)
if(NULL == (f = (H5F_t *)H5VL_object(file)))
FAIL_STACK_ERROR
- H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr1, (hsize_t)TEST_BLOCK_SIZE30+TEST_BLOCK_SIZE50+TEST_BLOCK_SIZE2058);
+ H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr1, (hsize_t)TEST_BLOCK_SIZE30+TEST_BLOCK_SIZE50+TEST_BLOCK_SIZE2058);
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
@@ -2509,14 +2509,14 @@ test_mf_aggr_alloc3(const char *env_h5_drvr, hid_t fapl)
/* Allocate first block from meta_aggr */
type = H5FD_MEM_SUPER;
- addr1 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE30);
+ addr1 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE30);
H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if ((addr1+TEST_BLOCK_SIZE30) != ma_addr)
TEST_ERROR
/* Allocate second block from meta_aggr */
- addr2 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE50);
+ addr2 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE50);
H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
@@ -2527,14 +2527,14 @@ test_mf_aggr_alloc3(const char *env_h5_drvr, hid_t fapl)
/* Allocate first block from sdata_aggr */
stype = H5FD_MEM_DRAW;
- saddr1 = H5MF_alloc(f, stype, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE30);
+ saddr1 = H5MF_alloc(f, stype, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE30);
H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size);
if ((saddr1+TEST_BLOCK_SIZE30) != sdata_addr)
TEST_ERROR
if (sdata_size != (TEST_BLOCK_SIZE2048 - TEST_BLOCK_SIZE30)) TEST_ERROR
/* Allocate third block, which is from file allocation not from meta_aggr */
- addr3 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)(TEST_BLOCK_SIZE2058));
+ addr3 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)(TEST_BLOCK_SIZE2058));
H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size);
@@ -2544,7 +2544,7 @@ test_mf_aggr_alloc3(const char *env_h5_drvr, hid_t fapl)
if ((new_ma_addr != ma_addr) || (new_ma_size != ma_size)) TEST_ERROR
/* Allocate fourth block, which should be from meta_aggr */
- addr4 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE50);
+ addr4 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE50);
H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if ((addr4+TEST_BLOCK_SIZE50) != ma_addr)
@@ -2553,11 +2553,11 @@ test_mf_aggr_alloc3(const char *env_h5_drvr, hid_t fapl)
TEST_ERROR
/* Free all the allocated blocks */
- H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr1, (hsize_t)TEST_BLOCK_SIZE30);
- H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr2, (hsize_t)TEST_BLOCK_SIZE50);
- H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr3, (hsize_t)TEST_BLOCK_SIZE2058);
- H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr4, (hsize_t)TEST_BLOCK_SIZE50);
- H5MF_xfree(f, stype, H5P_DATASET_XFER_DEFAULT, saddr1, (hsize_t)TEST_BLOCK_SIZE30);
+ H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr1, (hsize_t)TEST_BLOCK_SIZE30);
+ H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr2, (hsize_t)TEST_BLOCK_SIZE50);
+ H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr3, (hsize_t)TEST_BLOCK_SIZE2058);
+ H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr4, (hsize_t)TEST_BLOCK_SIZE50);
+ H5MF_xfree(f, stype, H5AC_ind_read_dxpl_id, saddr1, (hsize_t)TEST_BLOCK_SIZE30);
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
@@ -2670,7 +2670,7 @@ test_mf_aggr_alloc4(const char *env_h5_drvr, hid_t fapl)
/* Allocate first block from meta_aggr */
type = H5FD_MEM_SUPER;
- addr1 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE30);
+ addr1 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE30);
H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
@@ -2681,19 +2681,19 @@ test_mf_aggr_alloc4(const char *env_h5_drvr, hid_t fapl)
/* Allocate first block from sdata_aggr */
stype = H5FD_MEM_DRAW;
- saddr1 = H5MF_alloc(f, stype, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE30);
+ saddr1 = H5MF_alloc(f, stype, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE30);
H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size);
if ((saddr1+TEST_BLOCK_SIZE30) != sdata_addr)
TEST_ERROR
/* Allocate second block from sdata_aggr */
- saddr2 = H5MF_alloc(f, stype, H5P_DATASET_XFER_DEFAULT, (hsize_t)(TEST_BLOCK_SIZE2048 - TEST_BLOCK_SIZE30));
+ saddr2 = H5MF_alloc(f, stype, H5AC_ind_read_dxpl_id, (hsize_t)(TEST_BLOCK_SIZE2048 - TEST_BLOCK_SIZE30));
H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size);
if (saddr2+(TEST_BLOCK_SIZE2048 - TEST_BLOCK_SIZE30) != sdata_addr)
TEST_ERROR
/* Allocate third block from sdata_aggr */
- saddr3 = H5MF_alloc(f, stype, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE50);
+ saddr3 = H5MF_alloc(f, stype, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE50);
H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size);
if ((saddr3+TEST_BLOCK_SIZE50) != sdata_addr)
@@ -2702,7 +2702,7 @@ test_mf_aggr_alloc4(const char *env_h5_drvr, hid_t fapl)
TEST_ERROR
/* Allocate second block of 2058, which is from file allocation, not from meta_aggr */
- addr2 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE2058);
+ addr2 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE2058);
if (addr2 != sdata_addr)
TEST_ERROR
@@ -2718,11 +2718,11 @@ test_mf_aggr_alloc4(const char *env_h5_drvr, hid_t fapl)
TEST_ERROR
/* Free all the allocated blocks */
- H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr1, (hsize_t)TEST_BLOCK_SIZE30);
- H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr2, (hsize_t)TEST_BLOCK_SIZE2058);
- H5MF_xfree(f, stype, H5P_DATASET_XFER_DEFAULT, saddr1, (hsize_t)TEST_BLOCK_SIZE30);
- H5MF_xfree(f, stype, H5P_DATASET_XFER_DEFAULT, saddr2, (hsize_t)TEST_BLOCK_SIZE2048 - TEST_BLOCK_SIZE30);
- H5MF_xfree(f, stype, H5P_DATASET_XFER_DEFAULT, saddr3, (hsize_t)TEST_BLOCK_SIZE50);
+ H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr1, (hsize_t)TEST_BLOCK_SIZE30);
+ H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr2, (hsize_t)TEST_BLOCK_SIZE2058);
+ H5MF_xfree(f, stype, H5AC_ind_read_dxpl_id, saddr1, (hsize_t)TEST_BLOCK_SIZE30);
+ H5MF_xfree(f, stype, H5AC_ind_read_dxpl_id, saddr2, (hsize_t)TEST_BLOCK_SIZE2048 - TEST_BLOCK_SIZE30);
+ H5MF_xfree(f, stype, H5AC_ind_read_dxpl_id, saddr3, (hsize_t)TEST_BLOCK_SIZE50);
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
@@ -2816,14 +2816,14 @@ test_mf_aggr_alloc5(const char *env_h5_drvr, hid_t fapl)
/* Allocate first block from meta_aggr */
type = H5FD_MEM_SUPER;
- addr1 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE30);
+ addr1 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE30);
H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if ((addr1+TEST_BLOCK_SIZE30) != ma_addr)
TEST_ERROR
/* Allocate second block from meta_aggr */
- addr2 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE50);
+ addr2 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE50);
H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if (addr2+TEST_BLOCK_SIZE50 != ma_addr)
@@ -2832,7 +2832,7 @@ test_mf_aggr_alloc5(const char *env_h5_drvr, hid_t fapl)
TEST_ERROR
/* Allocate third block from meta_aggr */
- addr3 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE1970);
+ addr3 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE1970);
H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size);
if (addr3 != ma_addr) TEST_ERROR
@@ -2841,9 +2841,9 @@ test_mf_aggr_alloc5(const char *env_h5_drvr, hid_t fapl)
TEST_ERROR
/* Free all the allocated blocks */
- H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr1, (hsize_t)TEST_BLOCK_SIZE30);
- H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr2, (hsize_t)TEST_BLOCK_SIZE50);
- H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr3, (hsize_t)TEST_BLOCK_SIZE1970);
+ H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr1, (hsize_t)TEST_BLOCK_SIZE30);
+ H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr2, (hsize_t)TEST_BLOCK_SIZE50);
+ H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr3, (hsize_t)TEST_BLOCK_SIZE1970);
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
@@ -2949,14 +2949,14 @@ test_mf_aggr_alloc6(const char *env_h5_drvr, hid_t fapl)
type = H5FD_MEM_SUPER;
/* Allocate first block from meta_aggr */
- addr1 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE30);
+ addr1 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE30);
H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if ((addr1+TEST_BLOCK_SIZE30) != ma_addr)
TEST_ERROR
/* Allocate second block from meta_aggr */
- addr2 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE50);
+ addr2 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE50);
H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if (addr2+TEST_BLOCK_SIZE50 != ma_addr)
@@ -2966,14 +2966,14 @@ test_mf_aggr_alloc6(const char *env_h5_drvr, hid_t fapl)
/* Allocate first block from sdata_aggr */
stype = H5FD_MEM_DRAW;
- saddr1 = H5MF_alloc(f, stype, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE30);
+ saddr1 = H5MF_alloc(f, stype, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE30);
H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size);
if ((saddr1+TEST_BLOCK_SIZE30) != sdata_addr) TEST_ERROR
if (sdata_size != (TEST_BLOCK_SIZE2048 - TEST_BLOCK_SIZE30)) TEST_ERROR
/* Allocate third block from meta_aggr */
- addr3 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE1970);
+ addr3 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE1970);
H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size);
@@ -2994,10 +2994,10 @@ test_mf_aggr_alloc6(const char *env_h5_drvr, hid_t fapl)
TEST_ERROR
/* Free all the allocated blocks */
- H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr1, (hsize_t)TEST_BLOCK_SIZE30);
- H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr2, (hsize_t)TEST_BLOCK_SIZE50);
- H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr3, (hsize_t)TEST_BLOCK_SIZE1970);
- H5MF_xfree(f, stype, H5P_DATASET_XFER_DEFAULT, saddr1, (hsize_t)TEST_BLOCK_SIZE30);
+ H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr1, (hsize_t)TEST_BLOCK_SIZE30);
+ H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr2, (hsize_t)TEST_BLOCK_SIZE50);
+ H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr3, (hsize_t)TEST_BLOCK_SIZE1970);
+ H5MF_xfree(f, stype, H5AC_ind_read_dxpl_id, saddr1, (hsize_t)TEST_BLOCK_SIZE30);
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
@@ -3113,13 +3113,13 @@ test_mf_aggr_alloc7(const char *env_h5_drvr, hid_t fapl)
/* Allocate the first block from meta_aggr */
type = H5FD_MEM_SUPER;
- addr1 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE30);
+ addr1 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE30);
H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if ((addr1+TEST_BLOCK_SIZE30) != ma_addr)
TEST_ERROR
/* Allocate the second block from meta_aggr */
- addr2 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE50);
+ addr2 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE50);
H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if (addr2+TEST_BLOCK_SIZE50 != ma_addr)
@@ -3129,13 +3129,13 @@ test_mf_aggr_alloc7(const char *env_h5_drvr, hid_t fapl)
/* Allocate the first block from sdata_aggr */
stype = H5FD_MEM_DRAW;
- saddr1 = H5MF_alloc(f, stype, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE30);
+ saddr1 = H5MF_alloc(f, stype, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE30);
H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size);
if ((saddr1+TEST_BLOCK_SIZE30) != sdata_addr)
TEST_ERROR
/* Allocate the second block from sdata_aggr */
- saddr2 = H5MF_alloc(f, stype, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE2048 - TEST_BLOCK_SIZE30);
+ saddr2 = H5MF_alloc(f, stype, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE2048 - TEST_BLOCK_SIZE30);
H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size);
if ((saddr2+(TEST_BLOCK_SIZE2048 - TEST_BLOCK_SIZE30)) != sdata_addr)
@@ -3143,7 +3143,7 @@ test_mf_aggr_alloc7(const char *env_h5_drvr, hid_t fapl)
if (sdata_size != 0) TEST_ERROR
/* Allocate the third block from sdata_aggr */
- saddr3 = H5MF_alloc(f, stype, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE50);
+ saddr3 = H5MF_alloc(f, stype, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE50);
H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size);
if ((saddr3+TEST_BLOCK_SIZE50) != sdata_addr)
@@ -3152,7 +3152,7 @@ test_mf_aggr_alloc7(const char *env_h5_drvr, hid_t fapl)
TEST_ERROR
/* Allocate the third block from meta_aggr */
- addr3 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE1970);
+ addr3 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE1970);
H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if (addr3 != sdata_addr) TEST_ERROR
@@ -3174,12 +3174,12 @@ test_mf_aggr_alloc7(const char *env_h5_drvr, hid_t fapl)
TEST_ERROR
/* Free all the allocated blocks */
- H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr1, (hsize_t)TEST_BLOCK_SIZE30);
- H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr2, (hsize_t)TEST_BLOCK_SIZE50);
- H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr3, (hsize_t)TEST_BLOCK_SIZE1970);
- H5MF_xfree(f, stype, H5P_DATASET_XFER_DEFAULT, saddr1, (hsize_t)TEST_BLOCK_SIZE30);
- H5MF_xfree(f, stype, H5P_DATASET_XFER_DEFAULT, saddr2, (hsize_t)(TEST_BLOCK_SIZE2048 - TEST_BLOCK_SIZE30));
- H5MF_xfree(f, stype, H5P_DATASET_XFER_DEFAULT, saddr3, (hsize_t)TEST_BLOCK_SIZE50);
+ H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr1, (hsize_t)TEST_BLOCK_SIZE30);
+ H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr2, (hsize_t)TEST_BLOCK_SIZE50);
+ H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr3, (hsize_t)TEST_BLOCK_SIZE1970);
+ H5MF_xfree(f, stype, H5AC_ind_read_dxpl_id, saddr1, (hsize_t)TEST_BLOCK_SIZE30);
+ H5MF_xfree(f, stype, H5AC_ind_read_dxpl_id, saddr2, (hsize_t)(TEST_BLOCK_SIZE2048 - TEST_BLOCK_SIZE30));
+ H5MF_xfree(f, stype, H5AC_ind_read_dxpl_id, saddr3, (hsize_t)TEST_BLOCK_SIZE50);
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
@@ -3274,7 +3274,7 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl)
/* Allocate the first block from meta_aggr */
type = H5FD_MEM_SUPER;
- addr = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE30);
+ addr = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE30);
H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if ((addr+TEST_BLOCK_SIZE30) != ma_addr)
TEST_ERROR
@@ -3286,7 +3286,7 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl)
new_addr = addr - 10;
/* Try to extend the block by an amount < (% * aggr->alloc_size) */
- was_extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)new_addr, (hsize_t)10, (hsize_t)(TEST_BLOCK_SIZE50));
+ was_extended = H5MF_try_extend(f, H5AC_ind_read_dxpl_id, type, (haddr_t)new_addr, (hsize_t)10, (hsize_t)(TEST_BLOCK_SIZE50));
/* should succeed */
if(!was_extended)
@@ -3299,10 +3299,10 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl)
if (new_ma_size != (f->shared->meta_aggr.alloc_size - TEST_BLOCK_SIZE50)) TEST_ERROR
/* Free the allocated blocks */
- H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr, (hsize_t)TEST_BLOCK_SIZE50);
+ H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr, (hsize_t)TEST_BLOCK_SIZE50);
/* Try to extend the block by an amount > (% * aggr->alloc_size) but amount < aggr->alloc_size */
- was_extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)new_addr, (hsize_t)10, (hsize_t)(TEST_BLOCK_SIZE700));
+ was_extended = H5MF_try_extend(f, H5AC_ind_read_dxpl_id, type, (haddr_t)new_addr, (hsize_t)10, (hsize_t)(TEST_BLOCK_SIZE700));
/* should succeed */
if(!was_extended)
@@ -3315,10 +3315,10 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl)
if (new_ma_size != (f->shared->meta_aggr.alloc_size * 2 - TEST_BLOCK_SIZE700)) TEST_ERROR
/* Free the allocated blocks */
- H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr, (hsize_t)TEST_BLOCK_SIZE700);
+ H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr, (hsize_t)TEST_BLOCK_SIZE700);
/* Try to extend the block by an amount > (% * aggr->alloc_size) but amount > aggr->alloc_size */
- was_extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)new_addr, (hsize_t)10, (hsize_t)(TEST_BLOCK_SIZE2058));
+ was_extended = H5MF_try_extend(f, H5AC_ind_read_dxpl_id, type, (haddr_t)new_addr, (hsize_t)10, (hsize_t)(TEST_BLOCK_SIZE2058));
/* should succeed */
if(!was_extended)
@@ -3331,7 +3331,7 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl)
if (new_ma_size != f->shared->meta_aggr.size) TEST_ERROR
/* Free the allocated blocks */
- H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr, (hsize_t)TEST_BLOCK_SIZE2058);
+ H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr, (hsize_t)TEST_BLOCK_SIZE2058);
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
@@ -3365,14 +3365,14 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl)
/* Allocate the first block from meta_aggr */
type = H5FD_MEM_SUPER;
- addr = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE30);
+ addr = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE30);
H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if ((addr+TEST_BLOCK_SIZE30) != ma_addr)
TEST_ERROR
/* Allocate the first block from sdata_aggr */
stype = H5FD_MEM_DRAW;
- saddr = H5MF_alloc(f, stype, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE50);
+ saddr = H5MF_alloc(f, stype, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE50);
H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size);
if ((saddr+TEST_BLOCK_SIZE50) != sdata_addr)
TEST_ERROR
@@ -3384,7 +3384,7 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl)
new_addr = addr - 10;
/* should be able to fulfill request from the aggreqator itself */
- was_extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)new_addr, (hsize_t)10, (hsize_t)(TEST_BLOCK_SIZE50));
+ was_extended = H5MF_try_extend(f, H5AC_ind_read_dxpl_id, type, (haddr_t)new_addr, (hsize_t)10, (hsize_t)(TEST_BLOCK_SIZE50));
if(!was_extended)
TEST_ERROR
@@ -3400,8 +3400,8 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl)
f->shared->meta_aggr.addr = ma_addr;
f->shared->meta_aggr.size = ma_size;
- H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr, (hsize_t)TEST_BLOCK_SIZE30);
- H5MF_xfree(f, stype, H5P_DATASET_XFER_DEFAULT, saddr, (hsize_t)TEST_BLOCK_SIZE50);
+ H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr, (hsize_t)TEST_BLOCK_SIZE30);
+ H5MF_xfree(f, stype, H5AC_ind_read_dxpl_id, saddr, (hsize_t)TEST_BLOCK_SIZE50);
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
@@ -3435,14 +3435,14 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl)
/* Allocate first block from meta_aggr */
type = H5FD_MEM_SUPER;
- addr = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE30);
+ addr = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE30);
H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if ((addr+TEST_BLOCK_SIZE30) != ma_addr)
TEST_ERROR
/* Allocate first block from sdata_aggr */
stype = H5FD_MEM_DRAW;
- saddr = H5MF_alloc(f, stype, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE50);
+ saddr = H5MF_alloc(f, stype, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE50);
H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size);
if ((saddr+TEST_BLOCK_SIZE50) != sdata_addr)
TEST_ERROR
@@ -3454,7 +3454,7 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl)
new_addr = addr - 10;
/* unable to fulfill request from the aggreqator itself */
- was_extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)new_addr, (hsize_t)10, (hsize_t)(TEST_BLOCK_SIZE50));
+ was_extended = H5MF_try_extend(f, H5AC_ind_read_dxpl_id, type, (haddr_t)new_addr, (hsize_t)10, (hsize_t)(TEST_BLOCK_SIZE50));
if(was_extended)
TEST_ERROR
@@ -3468,8 +3468,8 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl)
f->shared->meta_aggr.addr = ma_addr;
f->shared->meta_aggr.size = ma_size;
- H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr, (hsize_t)TEST_BLOCK_SIZE30);
- H5MF_xfree(f, stype, H5P_DATASET_XFER_DEFAULT, saddr, (hsize_t)TEST_BLOCK_SIZE50);
+ H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr, (hsize_t)TEST_BLOCK_SIZE30);
+ H5MF_xfree(f, stype, H5AC_ind_read_dxpl_id, saddr, (hsize_t)TEST_BLOCK_SIZE50);
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
@@ -3567,7 +3567,7 @@ test_mf_aggr_absorb(const char *env_h5_drvr, hid_t fapl)
/* Allocate block A from meta_aggr */
type = H5FD_MEM_SUPER;
- addr1 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE30);
+ addr1 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE30);
H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size);
ma_addr = new_ma_addr - TEST_BLOCK_SIZE30;
@@ -3575,7 +3575,7 @@ test_mf_aggr_absorb(const char *env_h5_drvr, hid_t fapl)
TEST_ERROR
/* should succeed */
- if(H5MF_try_shrink(f, type, H5P_DATASET_XFER_DEFAULT, addr1, (hsize_t)TEST_BLOCK_SIZE30) <= 0)
+ if(H5MF_try_shrink(f, type, H5AC_ind_read_dxpl_id, addr1, (hsize_t)TEST_BLOCK_SIZE30) <= 0)
TEST_ERROR
H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size);
@@ -3614,7 +3614,7 @@ test_mf_aggr_absorb(const char *env_h5_drvr, hid_t fapl)
/* Allocate block A from meta_aggr */
type = H5FD_MEM_SUPER;
- addr1 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE30);
+ addr1 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE30);
H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if ((addr1+TEST_BLOCK_SIZE30) != ma_addr) TEST_ERROR
@@ -3622,12 +3622,12 @@ test_mf_aggr_absorb(const char *env_h5_drvr, hid_t fapl)
/* Allocate block B from sdata_aggr */
stype = H5FD_MEM_DRAW;
- saddr1 = H5MF_alloc(f, stype, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE50);
+ saddr1 = H5MF_alloc(f, stype, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE50);
H5MF_aggr_query(f, &(f->shared->sdata_aggr), NULL, &sdata_size);
/* should succeed */
- if(H5MF_try_shrink(f, stype, H5P_DATASET_XFER_DEFAULT, saddr1, (hsize_t)TEST_BLOCK_SIZE50) <= 0)
+ if(H5MF_try_shrink(f, stype, H5AC_ind_read_dxpl_id, saddr1, (hsize_t)TEST_BLOCK_SIZE50) <= 0)
TEST_ERROR
H5MF_aggr_query(f, &(f->shared->sdata_aggr), &new_sdata_addr, &new_sdata_size);
@@ -3639,7 +3639,7 @@ test_mf_aggr_absorb(const char *env_h5_drvr, hid_t fapl)
if (new_ma_addr != ma_addr) TEST_ERROR
if (new_ma_size != (ma_size)) TEST_ERROR
- H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr1, (hsize_t)TEST_BLOCK_SIZE30);
+ H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr1, (hsize_t)TEST_BLOCK_SIZE30);
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
@@ -3673,35 +3673,35 @@ test_mf_aggr_absorb(const char *env_h5_drvr, hid_t fapl)
/* Allocate block A from meta_aggr */
type = H5FD_MEM_SUPER;
- addr1 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE30);
+ addr1 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE30);
H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if ((addr1+TEST_BLOCK_SIZE30) != ma_addr)
TEST_ERROR
/* Allocate block B from meta_aggr */
- addr2 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE50);
+ addr2 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE50);
H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if ((addr2+TEST_BLOCK_SIZE50) != ma_addr)
TEST_ERROR
/* Allocate block C from meta_aggr */
- addr3 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)(TEST_BLOCK_SIZE30+TEST_BLOCK_SIZE50));
+ addr3 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)(TEST_BLOCK_SIZE30+TEST_BLOCK_SIZE50));
H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if ((addr3+TEST_BLOCK_SIZE30+TEST_BLOCK_SIZE50) != ma_addr)
TEST_ERROR
/* should not succeed */
- if(H5MF_try_shrink(f, type, H5P_DATASET_XFER_DEFAULT, addr2, (hsize_t)TEST_BLOCK_SIZE50) > 0)
+ if(H5MF_try_shrink(f, type, H5AC_ind_read_dxpl_id, addr2, (hsize_t)TEST_BLOCK_SIZE50) > 0)
TEST_ERROR
/* aggregator info should be the same as before */
H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size);
if (new_ma_addr != ma_addr) TEST_ERROR
- H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr1, (hsize_t)TEST_BLOCK_SIZE30);
- H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr2, (hsize_t)TEST_BLOCK_SIZE50);
- H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr3, (hsize_t)(TEST_BLOCK_SIZE30+TEST_BLOCK_SIZE50));
+ H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr1, (hsize_t)TEST_BLOCK_SIZE30);
+ H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr2, (hsize_t)TEST_BLOCK_SIZE50);
+ H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr3, (hsize_t)(TEST_BLOCK_SIZE30+TEST_BLOCK_SIZE50));
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
@@ -3826,7 +3826,7 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Allocate a block of 30 from file allocation */
type = H5FD_MEM_SUPER;
- addr1 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE30);
+ addr1 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE30);
/* Verify that the allocated block is aligned */
if (addr1 % alignment) TEST_ERROR
@@ -3850,7 +3850,7 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
mis_align = alignment - tmp;
accum += (mis_align + TEST_BLOCK_SIZE50);
- addr2 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE50);
+ addr2 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE50);
/* Verify that the allocated block is aligned */
if (addr2 % alignment) TEST_ERROR
@@ -3867,8 +3867,8 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
TEST_ERROR
}
- H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr1, (hsize_t)TEST_BLOCK_SIZE30);
- H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr2, (hsize_t)TEST_BLOCK_SIZE50);
+ H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr1, (hsize_t)TEST_BLOCK_SIZE30);
+ H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr2, (hsize_t)TEST_BLOCK_SIZE50);
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
@@ -3902,7 +3902,7 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* allocate a block of 50 from meta_aggr */
type = H5FD_MEM_SUPER;
- addr1 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE50);
+ addr1 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE50);
/* address should be aligned */
if (addr1 % alignment) TEST_ERROR
@@ -3923,7 +3923,7 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
FAIL_STACK_ERROR
/* shrink the block */
- if(H5MF_try_shrink(f, type, H5P_DATASET_XFER_DEFAULT, addr1, (hsize_t)TEST_BLOCK_SIZE50) <= 0)
+ if(H5MF_try_shrink(f, type, H5AC_ind_read_dxpl_id, addr1, (hsize_t)TEST_BLOCK_SIZE50) <= 0)
TEST_ERROR
if(H5Fclose(file) < 0)
@@ -3957,7 +3957,7 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* allocate a block of 50 */
type = H5FD_MEM_SUPER;
- addr1 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE50);
+ addr1 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE50);
/* address should be aligned */
if (addr1 % alignment) TEST_ERROR
@@ -3978,7 +3978,7 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
FAIL_STACK_ERROR
/* try to extend the block */
- was_extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)addr1, (hsize_t)TEST_BLOCK_SIZE50, (hsize_t)TEST_BLOCK_SIZE30);
+ was_extended = H5MF_try_extend(f, H5AC_ind_read_dxpl_id, type, (haddr_t)addr1, (hsize_t)TEST_BLOCK_SIZE50, (hsize_t)TEST_BLOCK_SIZE30);
if (was_extended <=0) TEST_ERROR
@@ -4083,7 +4083,7 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
type = H5FD_MEM_SUPER;
- if(H5MF_alloc_start(f, H5P_DATASET_XFER_DEFAULT, type) < 0)
+ if(H5MF_alloc_start(f, H5AC_ind_read_dxpl_id, type) < 0)
TEST_ERROR
if (f->shared->fs_state[type] != H5F_FS_STATE_OPEN)
@@ -4095,13 +4095,13 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Construct user data for callbacks */
udata.f = f;
- udata.dxpl_id = H5P_DATASET_XFER_DEFAULT;
+ udata.dxpl_id = H5AC_ind_read_dxpl_id;
udata.alloc_type = type;
udata.allow_sect_absorb = TRUE;
udata.allow_eoa_shrink_only = FALSE;
/* Add section A to free-space manager */
- if (H5FS_sect_add(f, H5P_DATASET_XFER_DEFAULT, f->shared->fs_man[type], (H5FS_section_info_t *)sect_node, H5FS_ADD_RETURNED_SPACE, &udata))
+ if (H5FS_sect_add(f, H5AC_ind_read_dxpl_id, f->shared->fs_man[type], (H5FS_section_info_t *)sect_node, H5FS_ADD_RETURNED_SPACE, &udata))
FAIL_STACK_ERROR
HDmemset(&state, 0, sizeof(frspace_state_t));
@@ -4113,7 +4113,7 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
TEST_ERROR
/* Allocate a block of 50 */
- addr = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE50);
+ addr = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE50);
/* Verify that the allocated block is section A in free-space */
if (addr != (haddr_t)alignment) TEST_ERROR
@@ -4127,7 +4127,7 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
TEST_ERROR
/* Free the block to free-space */
- H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr, (hsize_t)TEST_BLOCK_SIZE50);
+ H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr, (hsize_t)TEST_BLOCK_SIZE50);
state.tot_space += TEST_BLOCK_SIZE50;
state.tot_sect_count += 1;
@@ -4153,7 +4153,7 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
type = H5FD_MEM_SUPER;
- if(H5MF_alloc_start(f, H5P_DATASET_XFER_DEFAULT, type) < 0)
+ if(H5MF_alloc_start(f, H5AC_ind_read_dxpl_id, type) < 0)
TEST_ERROR
if (f->shared->fs_state[type] != H5F_FS_STATE_OPEN)
@@ -4165,13 +4165,13 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Construct user data for callbacks */
udata.f = f;
- udata.dxpl_id = H5P_DATASET_XFER_DEFAULT;
+ udata.dxpl_id = H5AC_ind_read_dxpl_id;
udata.alloc_type = type;
udata.allow_sect_absorb = TRUE;
udata.allow_eoa_shrink_only = FALSE;
/* Add section A to free-space manager */
- if (H5FS_sect_add(f, H5P_DATASET_XFER_DEFAULT, f->shared->fs_man[type], (H5FS_section_info_t *)sect_node, H5FS_ADD_RETURNED_SPACE, &udata))
+ if (H5FS_sect_add(f, H5AC_ind_read_dxpl_id, f->shared->fs_man[type], (H5FS_section_info_t *)sect_node, H5FS_ADD_RETURNED_SPACE, &udata))
FAIL_STACK_ERROR
HDmemset(&state, 0, sizeof(frspace_state_t));
@@ -4183,7 +4183,7 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
TEST_ERROR
/* Allocate a block of 600 */
- addr = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE600);
+ addr = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE600);
/* Verify that the allocated block is aligned */
if (addr % alignment) TEST_ERROR
@@ -4197,7 +4197,7 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
TEST_ERROR
/* try to extend the block */
- was_extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)addr, (hsize_t)TEST_BLOCK_SIZE600, (hsize_t)TEST_BLOCK_SIZE200);
+ was_extended = H5MF_try_extend(f, H5AC_ind_read_dxpl_id, type, (haddr_t)addr, (hsize_t)TEST_BLOCK_SIZE600, (hsize_t)TEST_BLOCK_SIZE200);
if (was_extended <=0) TEST_ERROR
@@ -4208,7 +4208,7 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
TEST_ERROR
/* Free the block to free-space manager */
- H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr, (hsize_t)(TEST_BLOCK_SIZE600+TEST_BLOCK_SIZE200));
+ H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr, (hsize_t)(TEST_BLOCK_SIZE600+TEST_BLOCK_SIZE200));
/* only 1 section in free-space because of merging */
state.tot_space += (TEST_BLOCK_SIZE600+TEST_BLOCK_SIZE200);
@@ -4243,7 +4243,7 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
type = H5FD_MEM_SUPER;
- if(H5MF_alloc_start(f, H5P_DATASET_XFER_DEFAULT, type) < 0)
+ if(H5MF_alloc_start(f, H5AC_ind_read_dxpl_id, type) < 0)
TEST_ERROR
if (f->shared->fs_state[type] != H5F_FS_STATE_OPEN)
@@ -4255,13 +4255,13 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Construct user data for callbacks */
udata.f = f;
- udata.dxpl_id = H5P_DATASET_XFER_DEFAULT;
+ udata.dxpl_id = H5AC_ind_read_dxpl_id;
udata.alloc_type = type;
udata.allow_sect_absorb = TRUE;
udata.allow_eoa_shrink_only = FALSE;
/* Add section A to free-space manager */
- if (H5FS_sect_add(f, H5P_DATASET_XFER_DEFAULT, f->shared->fs_man[type], (H5FS_section_info_t *)sect_node, H5FS_ADD_RETURNED_SPACE, &udata))
+ if (H5FS_sect_add(f, H5AC_ind_read_dxpl_id, f->shared->fs_man[type], (H5FS_section_info_t *)sect_node, H5FS_ADD_RETURNED_SPACE, &udata))
FAIL_STACK_ERROR
HDmemset(&state, 0, sizeof(frspace_state_t));
@@ -4276,7 +4276,7 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
* Since free-space manager cannot fulfull the request because of alignment,
* the block is obtained from file allocation
*/
- addr = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)(TEST_BLOCK_SIZE40));
+ addr = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)(TEST_BLOCK_SIZE40));
/* Verify that the allocated block is aligned */
if (addr % alignment)
@@ -4472,7 +4472,7 @@ test_mf_align_alloc1(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Allocate a block of 30 from meta_aggr */
type = H5FD_MEM_SUPER;
- addr1 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE30);
+ addr1 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE30);
/* Verify that the allocated block is aligned */
if (addr1 % alignment) TEST_ERROR
@@ -4496,7 +4496,7 @@ test_mf_align_alloc1(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
mis_align = alignment - tmp;
/* Allocate a block of 50 from meta_aggr */
- addr2 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE50);
+ addr2 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE50);
/* Verify that the allocated block is aligned */
if (addr2 % alignment) TEST_ERROR
@@ -4518,7 +4518,7 @@ test_mf_align_alloc1(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
if ((tmp = ma_addr % alignment))
mis_align = alignment - tmp;
- addr3 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE80);
+ addr3 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE80);
/* Verify that the allocated block is aligned */
if (addr3 % alignment) TEST_ERROR
@@ -4541,7 +4541,7 @@ test_mf_align_alloc1(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
mis_align = alignment - tmp;
/* Allocate a block of 1970 from meta_aggr */
- addr4 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE1970);
+ addr4 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE1970);
/* Verify that the allocated block is aligned */
if (addr4 % alignment) TEST_ERROR
@@ -4562,10 +4562,10 @@ test_mf_align_alloc1(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
if(check_stats(f, f->shared->fs_man[type], &state))
TEST_ERROR
- H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr1, (hsize_t)TEST_BLOCK_SIZE30);
- H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr2, (hsize_t)TEST_BLOCK_SIZE50);
- H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr3, (hsize_t)TEST_BLOCK_SIZE80);
- H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr3, (hsize_t)TEST_BLOCK_SIZE1970);
+ H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr1, (hsize_t)TEST_BLOCK_SIZE30);
+ H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr2, (hsize_t)TEST_BLOCK_SIZE50);
+ H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr3, (hsize_t)TEST_BLOCK_SIZE80);
+ H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr3, (hsize_t)TEST_BLOCK_SIZE1970);
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
@@ -4730,7 +4730,7 @@ test_mf_align_alloc2(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Allocate a block of 30 from meta_aggr */
type = H5FD_MEM_SUPER;
- addr1 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE30);
+ addr1 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE30);
/* Verify that the allocated block is aligned */
if (addr1 % alignment) TEST_ERROR
@@ -4753,7 +4753,7 @@ test_mf_align_alloc2(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
if ((tmp = ma_addr % alignment))
mis_align = alignment - tmp;
- addr2 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE50);
+ addr2 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE50);
/* Verify that the allocated block is aligned */
if (addr2 % alignment) TEST_ERROR
@@ -4789,7 +4789,7 @@ test_mf_align_alloc2(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Allocate a block of 30 from sdata_aggr */
stype = H5FD_MEM_DRAW;
- saddr1 = H5MF_alloc(f, stype, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE30);
+ saddr1 = H5MF_alloc(f, stype, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE30);
/* fragment for alignment of block 30 for sdata_aggr is freed to free-space */
if (mis_align) {
@@ -4822,7 +4822,7 @@ test_mf_align_alloc2(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
mis_align = alignment - tmp;
/* Allocate a block of 80 from meta_aggr */
- addr3 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE80);
+ addr3 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE80);
/* Verify that the allocated block is aligned */
if (addr3 % alignment) TEST_ERROR
@@ -4850,10 +4850,10 @@ test_mf_align_alloc2(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
TEST_ERROR
}
- H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr1, (hsize_t)TEST_BLOCK_SIZE30);
- H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr2, (hsize_t)TEST_BLOCK_SIZE50);
- H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr3, (hsize_t)TEST_BLOCK_SIZE80);
- H5MF_xfree(f, stype, H5P_DATASET_XFER_DEFAULT, saddr1, (hsize_t)TEST_BLOCK_SIZE30);
+ H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr1, (hsize_t)TEST_BLOCK_SIZE30);
+ H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr2, (hsize_t)TEST_BLOCK_SIZE50);
+ H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr3, (hsize_t)TEST_BLOCK_SIZE80);
+ H5MF_xfree(f, stype, H5AC_ind_read_dxpl_id, saddr1, (hsize_t)TEST_BLOCK_SIZE30);
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
@@ -5072,7 +5072,7 @@ test_mf_align_alloc3(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Allocate a block of 30 from meta_aggr */
type = H5FD_MEM_SUPER;
- addr1 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE30);
+ addr1 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE30);
/* Verify that the allocated block is aligned */
if (addr1 % alignment) TEST_ERROR
@@ -5095,7 +5095,7 @@ test_mf_align_alloc3(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
mis_align = alignment - tmp;
/* Allocate a block of 50 from meta_aggr */
- addr2 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE50);
+ addr2 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE50);
/* Verify that the allocated block is aligned */
if (addr2 % alignment) TEST_ERROR
@@ -5130,7 +5130,7 @@ test_mf_align_alloc3(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Allocate a block of 30 from sdata_aggr */
stype = H5FD_MEM_DRAW;
- saddr1 = H5MF_alloc(f, stype, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE30);
+ saddr1 = H5MF_alloc(f, stype, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE30);
/* Verify that the allocated block is aligned */
if (saddr1 % alignment) TEST_ERROR
@@ -5151,7 +5151,7 @@ test_mf_align_alloc3(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
mis_align = alignment - tmp;
/* Allocate a block of 50 from sdata_aggr */
- saddr2 = H5MF_alloc(f, stype, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE50);
+ saddr2 = H5MF_alloc(f, stype, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE50);
/* Verify that the allocated block is aligned */
if (saddr2 % alignment) TEST_ERROR
@@ -5172,7 +5172,7 @@ test_mf_align_alloc3(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
mis_align = alignment - tmp;
/* Allocate a block of 80 from sdata_aggr */
- saddr3 = H5MF_alloc(f, stype, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE80);
+ saddr3 = H5MF_alloc(f, stype, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE80);
/* Verify that the allocated block is aligned */
if (saddr3 % alignment) TEST_ERROR
@@ -5194,7 +5194,7 @@ test_mf_align_alloc3(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
mis_align = alignment - tmp;
/* Allocate a block of 1034 for meta_aggr */
- addr3 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE1034);
+ addr3 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE1034);
/* Verify that the allocated block is aligned */
if (addr3 % alignment) TEST_ERROR
@@ -5375,7 +5375,7 @@ test_mf_align_alloc4(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Allocate a block of 30 from meta_aggr */
type = H5FD_MEM_SUPER;
- addr1 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE30);
+ addr1 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE30);
/* Verify that the allocated block is aligned */
if (addr1 % alignment) TEST_ERROR
@@ -5398,7 +5398,7 @@ test_mf_align_alloc4(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
mis_align = alignment - tmp;
/* Allocate a block of 2058 from meta_aggr */
- addr2 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE2058);
+ addr2 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE2058);
/* Verify that the allocated block is aligned */
if (addr2 % alignment) TEST_ERROR
@@ -5423,7 +5423,7 @@ test_mf_align_alloc4(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
mis_align = alignment - tmp;
/* Allocate a block of 5 from meta_aggr */
- addr3 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE5);
+ addr3 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE5);
/* fragment for alignment of block 5 is freed to free-space */
if (mis_align) {
@@ -5588,7 +5588,7 @@ test_mf_align_alloc5(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Allocate a block of 30 from meta_aggr */
type = H5FD_MEM_SUPER;
- addr1 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE30);
+ addr1 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE30);
/* Verify that the allocated block is aligned */
if (addr1 % alignment) TEST_ERROR
@@ -5612,7 +5612,7 @@ test_mf_align_alloc5(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Allocate a block of 30 from sdata_aggr */
stype = H5FD_MEM_DRAW;
- saddr1 = H5MF_alloc(f, stype, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE30);
+ saddr1 = H5MF_alloc(f, stype, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE30);
/* Verify that the allocated block is aligned */
if (saddr1 % alignment) TEST_ERROR
@@ -5633,7 +5633,7 @@ test_mf_align_alloc5(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
mis_align = alignment - tmp;
/* Allocate a block of 2058 from meta_aggr */
- addr2 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE2058);
+ addr2 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE2058);
/* Verify that the allocated block is aligned */
if (addr2 % alignment) TEST_ERROR
@@ -5854,7 +5854,7 @@ test_mf_align_alloc6(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Allocate a block of 30 from meta_aggr */
type = H5FD_MEM_SUPER;
- addr1 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE30);
+ addr1 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE30);
/* Verify that the allocated block is aligned */
if (addr1 % alignment) TEST_ERROR
@@ -5878,7 +5878,7 @@ test_mf_align_alloc6(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Allocate a block of 30 from sdata_aggr */
stype = H5FD_MEM_DRAW;
- saddr1 = H5MF_alloc(f, stype, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE30);
+ saddr1 = H5MF_alloc(f, stype, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE30);
/* Verify that the allocated block is aligned */
if (saddr1 % alignment) TEST_ERROR
@@ -5899,7 +5899,7 @@ test_mf_align_alloc6(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
mis_align = alignment - tmp;
/* Allocate a block of 50 from sdata_aggr */
- saddr2 = H5MF_alloc(f, stype, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE50);
+ saddr2 = H5MF_alloc(f, stype, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE50);
/* Verify that the allocated block is aligned */
if (saddr2 % alignment) TEST_ERROR
@@ -5920,7 +5920,7 @@ test_mf_align_alloc6(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
mis_align = alignment - tmp;
/* Allocate a block of 80 from sdata_aggr */
- saddr3 = H5MF_alloc(f, stype, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE80);
+ saddr3 = H5MF_alloc(f, stype, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE80);
/* Verify that the allocated block is aligned */
if (saddr3 % alignment) TEST_ERROR
@@ -5942,7 +5942,7 @@ test_mf_align_alloc6(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
mis_align = alignment - tmp;
/* Allocate a block of 2058 from meta_aggr */
- addr2 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE2058);
+ addr2 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE2058);
/* Verify that the allocated block is aligned */
if (addr2 % alignment) TEST_ERROR
@@ -6023,25 +6023,25 @@ test_mf_fs_persist(hid_t fapl_new, hid_t fcpl)
/* Allocate 6 blocks */
type = H5FD_MEM_SUPER;
- if(HADDR_UNDEF == (addr1 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE1)))
+ if(HADDR_UNDEF == (addr1 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE1)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (addr2 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE2)))
+ if(HADDR_UNDEF == (addr2 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE2)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (addr3 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE3)))
+ if(HADDR_UNDEF == (addr3 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE3)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (addr4 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE4)))
+ if(HADDR_UNDEF == (addr4 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE4)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (addr5 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE5)))
+ if(HADDR_UNDEF == (addr5 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE5)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (addr6 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE6)))
+ if(HADDR_UNDEF == (addr6 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE6)))
FAIL_STACK_ERROR
/* Put block #1, #3, #5 to H5FD_MEM_SUPER free-space manager */
- if(H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr1, (hsize_t)TEST_BLOCK_SIZE1) < 0)
+ if(H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr1, (hsize_t)TEST_BLOCK_SIZE1) < 0)
FAIL_STACK_ERROR
- if(H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr3, (hsize_t)TEST_BLOCK_SIZE3) < 0)
+ if(H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr3, (hsize_t)TEST_BLOCK_SIZE3) < 0)
FAIL_STACK_ERROR
- if(H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr5, (hsize_t)TEST_BLOCK_SIZE5) < 0)
+ if(H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr5, (hsize_t)TEST_BLOCK_SIZE5) < 0)
FAIL_STACK_ERROR
if(H5Fclose(file) < 0)
@@ -6060,7 +6060,7 @@ test_mf_fs_persist(hid_t fapl_new, hid_t fcpl)
TEST_ERROR
/* Start up H5FD_MEM_SUPER free-space manager */
- if(H5MF_alloc_open(f, H5P_DATASET_XFER_DEFAULT, type) < 0)
+ if(H5MF_alloc_open(f, H5AC_ind_read_dxpl_id, type) < 0)
FAIL_STACK_ERROR
/* Get info for free-space manager */
@@ -6075,13 +6075,13 @@ test_mf_fs_persist(hid_t fapl_new, hid_t fcpl)
TEST_ERROR
/* Retrieve block #3 from H5FD_MEM_SUPER free-space manager */
- if(HADDR_UNDEF == (tmp_addr = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE3)))
+ if(HADDR_UNDEF == (tmp_addr = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE3)))
FAIL_STACK_ERROR
if(tmp_addr != addr3)
TEST_ERROR
/* Retrieve block #1 from H5FD_MEM_SUPER free-space manager */
- if(HADDR_UNDEF == (tmp_addr = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE1)))
+ if(HADDR_UNDEF == (tmp_addr = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE1)))
FAIL_STACK_ERROR
if(tmp_addr != addr1)
TEST_ERROR
@@ -6102,7 +6102,7 @@ test_mf_fs_persist(hid_t fapl_new, hid_t fcpl)
TEST_ERROR
/* Retrieve block #5 from H5FD_MEM_SUPER free-space manager */
- if(HADDR_UNDEF == (tmp_addr = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE5)))
+ if(HADDR_UNDEF == (tmp_addr = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE5)))
FAIL_STACK_ERROR
if(tmp_addr != addr5)
TEST_ERROR
@@ -6149,25 +6149,25 @@ test_mf_fs_gone(hid_t fapl_new, hid_t fcpl)
/* Allocate 4 blocks */
type = H5FD_MEM_SUPER;
- if(HADDR_UNDEF == (addr1 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE1)))
+ if(HADDR_UNDEF == (addr1 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE1)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (addr2 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE2)))
+ if(HADDR_UNDEF == (addr2 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE2)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (addr3 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE3)))
+ if(HADDR_UNDEF == (addr3 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE3)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (addr4 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE4)))
+ if(HADDR_UNDEF == (addr4 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE4)))
FAIL_STACK_ERROR
/* Put block #1, #3 to H5FD_MEM_SUPER free-space manager */
- if(H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr1, (hsize_t)TEST_BLOCK_SIZE1) < 0)
+ if(H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr1, (hsize_t)TEST_BLOCK_SIZE1) < 0)
FAIL_STACK_ERROR
- if(H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr3, (hsize_t)TEST_BLOCK_SIZE3) < 0)
+ if(H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr3, (hsize_t)TEST_BLOCK_SIZE3) < 0)
FAIL_STACK_ERROR
/* Retrieve block #1, #3 from H5FD_MEM_SUPER free-space manager */
- if(HADDR_UNDEF == (addr3 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE3)))
+ if(HADDR_UNDEF == (addr3 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE3)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (addr1 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE1)))
+ if(HADDR_UNDEF == (addr1 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE1)))
FAIL_STACK_ERROR
if(H5Fclose(file) < 0)
@@ -6186,7 +6186,7 @@ test_mf_fs_gone(hid_t fapl_new, hid_t fcpl)
TEST_ERROR
/* Put block #3 to H5FD_MEM_SUPER free-space manager */
- if(H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr3, (hsize_t)TEST_BLOCK_SIZE3) < 0)
+ if(H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr3, (hsize_t)TEST_BLOCK_SIZE3) < 0)
FAIL_STACK_ERROR
if(H5Fclose(file) < 0)
@@ -6205,7 +6205,7 @@ test_mf_fs_gone(hid_t fapl_new, hid_t fcpl)
TEST_ERROR
/* Start up H5FD_MEM_SUPER free-space manager */
- if(H5MF_alloc_open(f, H5P_DATASET_XFER_DEFAULT, type) < 0)
+ if(H5MF_alloc_open(f, H5AC_ind_read_dxpl_id, type) < 0)
FAIL_STACK_ERROR
/* Get info for H5FD_MEM_SUPER free-space manager */
@@ -6219,7 +6219,7 @@ test_mf_fs_gone(hid_t fapl_new, hid_t fcpl)
TEST_ERROR
/* Put block #4 to H5FD_MEM_SUPER free-space manager */
- if(H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr4, (hsize_t)TEST_BLOCK_SIZE4) < 0)
+ if(H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr4, (hsize_t)TEST_BLOCK_SIZE4) < 0)
FAIL_STACK_ERROR
/* The H5FD_MEM_SUPER free-space manager will go away at H5MF_close() */
@@ -6284,36 +6284,36 @@ test_mf_fs_split(hid_t fapl_new, hid_t fcpl)
/* Allocate 4 blocks of type H5FD_MEM_SUPER */
type = H5FD_MEM_SUPER;
- if(HADDR_UNDEF == (addr1 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE1)))
+ if(HADDR_UNDEF == (addr1 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE1)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (addr2 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE2)))
+ if(HADDR_UNDEF == (addr2 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE2)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (addr3 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE3)))
+ if(HADDR_UNDEF == (addr3 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE3)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (addr4 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE4)))
+ if(HADDR_UNDEF == (addr4 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE4)))
FAIL_STACK_ERROR
/* Put block #1, #3 into H5FD_MEM_SUPER free-space manager */
- if(H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr1, (hsize_t)TEST_BLOCK_SIZE1) < 0)
+ if(H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr1, (hsize_t)TEST_BLOCK_SIZE1) < 0)
FAIL_STACK_ERROR
- if(H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr3, (hsize_t)TEST_BLOCK_SIZE3) < 0)
+ if(H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr3, (hsize_t)TEST_BLOCK_SIZE3) < 0)
FAIL_STACK_ERROR
/* Allocate 4 blocks of type H5FD_MEM_DRAW */
stype = H5FD_MEM_DRAW;
- if(HADDR_UNDEF == (saddr1 = H5MF_alloc(f, stype, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE1)))
+ if(HADDR_UNDEF == (saddr1 = H5MF_alloc(f, stype, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE1)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (saddr2 = H5MF_alloc(f, stype, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE2)))
+ if(HADDR_UNDEF == (saddr2 = H5MF_alloc(f, stype, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE2)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (saddr3 = H5MF_alloc(f, stype, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE3)))
+ if(HADDR_UNDEF == (saddr3 = H5MF_alloc(f, stype, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE3)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (saddr4 = H5MF_alloc(f, stype, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE4)))
+ if(HADDR_UNDEF == (saddr4 = H5MF_alloc(f, stype, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE4)))
FAIL_STACK_ERROR
/* Put block #1, #3 into H5FD_MEM_DRAW free-space manager */
- if(H5MF_xfree(f, stype, H5P_DATASET_XFER_DEFAULT, saddr1, (hsize_t)TEST_BLOCK_SIZE1) < 0)
+ if(H5MF_xfree(f, stype, H5AC_ind_read_dxpl_id, saddr1, (hsize_t)TEST_BLOCK_SIZE1) < 0)
FAIL_STACK_ERROR
- if(H5MF_xfree(f, stype, H5P_DATASET_XFER_DEFAULT, saddr3, (hsize_t)TEST_BLOCK_SIZE3) < 0)
+ if(H5MF_xfree(f, stype, H5AC_ind_read_dxpl_id, saddr3, (hsize_t)TEST_BLOCK_SIZE3) < 0)
FAIL_STACK_ERROR
if(H5Fclose(file) < 0)
@@ -6332,7 +6332,7 @@ test_mf_fs_split(hid_t fapl_new, hid_t fcpl)
TEST_ERROR
/* Start up H5FD_MEM_SUPER free-space manager */
- if(H5MF_alloc_open(f, H5P_DATASET_XFER_DEFAULT, type) < 0)
+ if(H5MF_alloc_open(f, H5AC_ind_read_dxpl_id, type) < 0)
FAIL_STACK_ERROR
/* Get free-space info */
@@ -6346,7 +6346,7 @@ test_mf_fs_split(hid_t fapl_new, hid_t fcpl)
TEST_ERROR
/* Retrieve block #1 from H5FD_MEM_SUPER free-space manager; block #2 still in free-space */
- if(HADDR_UNDEF == (tmp_addr = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE1)))
+ if(HADDR_UNDEF == (tmp_addr = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE1)))
FAIL_STACK_ERROR
if(tmp_addr != addr1)
TEST_ERROR
@@ -6356,7 +6356,7 @@ test_mf_fs_split(hid_t fapl_new, hid_t fcpl)
TEST_ERROR
/* Start up H5FD_MEM_DRAW free-space manager */
- if(H5MF_alloc_open(f, H5P_DATASET_XFER_DEFAULT, stype) < 0)
+ if(H5MF_alloc_open(f, H5AC_ind_read_dxpl_id, stype) < 0)
FAIL_STACK_ERROR
/* Get free-space info */
@@ -6370,13 +6370,13 @@ test_mf_fs_split(hid_t fapl_new, hid_t fcpl)
TEST_ERROR
/* Retrieve blocks #1 from H5FD_MEM_DRAW free-space manager */
- if(HADDR_UNDEF == (tmp_addr = H5MF_alloc(f, stype, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE1)))
+ if(HADDR_UNDEF == (tmp_addr = H5MF_alloc(f, stype, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE1)))
FAIL_STACK_ERROR
if(tmp_addr != saddr1)
TEST_ERROR
/* Retrieve blocks #3 from H5FD_MEM_DRAW free-space manager */
- if(HADDR_UNDEF == (tmp_addr = H5MF_alloc(f, stype, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE3)))
+ if(HADDR_UNDEF == (tmp_addr = H5MF_alloc(f, stype, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE3)))
FAIL_STACK_ERROR
if(tmp_addr != saddr3)
TEST_ERROR
@@ -6385,19 +6385,19 @@ test_mf_fs_split(hid_t fapl_new, hid_t fcpl)
/* Allocate 4 blocks of type H5FD_MEM_BTREE */
btype = H5FD_MEM_BTREE;
- if(HADDR_UNDEF == (baddr5 = H5MF_alloc(f, btype, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE5)))
+ if(HADDR_UNDEF == (baddr5 = H5MF_alloc(f, btype, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE5)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (baddr6 = H5MF_alloc(f, btype, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE6)))
+ if(HADDR_UNDEF == (baddr6 = H5MF_alloc(f, btype, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE6)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (baddr7 = H5MF_alloc(f, btype, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE7)))
+ if(HADDR_UNDEF == (baddr7 = H5MF_alloc(f, btype, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE7)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (baddr8 = H5MF_alloc(f, btype, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE8)))
+ if(HADDR_UNDEF == (baddr8 = H5MF_alloc(f, btype, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE8)))
FAIL_STACK_ERROR
/* Put block #5 & #7 into H5FD_MEM_BTREE free-space manager */
- if(H5MF_xfree(f, btype, H5P_DATASET_XFER_DEFAULT, baddr5, (hsize_t)TEST_BLOCK_SIZE5) < 0)
+ if(H5MF_xfree(f, btype, H5AC_ind_read_dxpl_id, baddr5, (hsize_t)TEST_BLOCK_SIZE5) < 0)
FAIL_STACK_ERROR
- if(H5MF_xfree(f, btype, H5P_DATASET_XFER_DEFAULT, baddr7, (hsize_t)TEST_BLOCK_SIZE7) < 0)
+ if(H5MF_xfree(f, btype, H5AC_ind_read_dxpl_id, baddr7, (hsize_t)TEST_BLOCK_SIZE7) < 0)
FAIL_STACK_ERROR
if(H5Fclose(file) < 0)
@@ -6420,7 +6420,7 @@ test_mf_fs_split(hid_t fapl_new, hid_t fcpl)
TEST_ERROR
/* Start up H5FD_MEM_SUPER free-space manager */
- if(H5MF_alloc_open(f, H5P_DATASET_XFER_DEFAULT, type) < 0)
+ if(H5MF_alloc_open(f, H5AC_ind_read_dxpl_id, type) < 0)
FAIL_STACK_ERROR
/* Get free-space info */
@@ -6432,13 +6432,13 @@ test_mf_fs_split(hid_t fapl_new, hid_t fcpl)
TEST_ERROR
/* Retrieve block #3 from H5FD_MEM_SUPER free-space manager */
- if(HADDR_UNDEF == (tmp_addr = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE3)))
+ if(HADDR_UNDEF == (tmp_addr = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE3)))
FAIL_STACK_ERROR
if(tmp_addr != addr3)
TEST_ERROR
/* Retrieve block #7 from H5FD_MEM_BTREE free-space manager */
- if(HADDR_UNDEF == (tmp_addr = H5MF_alloc(f, btype, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE7)))
+ if(HADDR_UNDEF == (tmp_addr = H5MF_alloc(f, btype, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE7)))
FAIL_STACK_ERROR
if(tmp_addr != baddr7)
TEST_ERROR
@@ -6460,7 +6460,7 @@ test_mf_fs_split(hid_t fapl_new, hid_t fcpl)
TEST_ERROR
/* Start up H5FD_MEM_SUPER free-space manager */
- if(H5MF_alloc_open(f, H5P_DATASET_XFER_DEFAULT, type) < 0)
+ if(H5MF_alloc_open(f, H5AC_ind_read_dxpl_id, type) < 0)
FAIL_STACK_ERROR
/* Get free-space info */
@@ -6519,36 +6519,36 @@ test_mf_fs_multi(hid_t fapl_new, hid_t fcpl)
/* Allocate 4 blocks of type H5FD_MEM_SUPER */
type = H5FD_MEM_SUPER;
- if(HADDR_UNDEF == (addr1 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE1)))
+ if(HADDR_UNDEF == (addr1 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE1)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (addr2 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE2)))
+ if(HADDR_UNDEF == (addr2 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE2)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (addr3 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE3)))
+ if(HADDR_UNDEF == (addr3 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE3)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (addr4 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE4)))
+ if(HADDR_UNDEF == (addr4 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE4)))
FAIL_STACK_ERROR
/* Put block #1, #3 into H5FD_MEM_SUPER free-space manager */
- if(H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr1, (hsize_t)TEST_BLOCK_SIZE1) < 0)
+ if(H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr1, (hsize_t)TEST_BLOCK_SIZE1) < 0)
FAIL_STACK_ERROR
- if(H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr3, (hsize_t)TEST_BLOCK_SIZE3) < 0)
+ if(H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr3, (hsize_t)TEST_BLOCK_SIZE3) < 0)
FAIL_STACK_ERROR
/* Allocate 4 blocks of type H5FD_MEM_DRAW */
stype = H5FD_MEM_DRAW;
- if(HADDR_UNDEF == (saddr1 = H5MF_alloc(f, stype, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE1)))
+ if(HADDR_UNDEF == (saddr1 = H5MF_alloc(f, stype, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE1)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (saddr2 = H5MF_alloc(f, stype, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE2)))
+ if(HADDR_UNDEF == (saddr2 = H5MF_alloc(f, stype, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE2)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (saddr3 = H5MF_alloc(f, stype, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE3)))
+ if(HADDR_UNDEF == (saddr3 = H5MF_alloc(f, stype, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE3)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (saddr4 = H5MF_alloc(f, stype, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE4)))
+ if(HADDR_UNDEF == (saddr4 = H5MF_alloc(f, stype, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE4)))
FAIL_STACK_ERROR
/* Put block #1, #3 into H5FD_MEM_DRAW free-space manager */
- if(H5MF_xfree(f, stype, H5P_DATASET_XFER_DEFAULT, saddr1, (hsize_t)TEST_BLOCK_SIZE1) < 0)
+ if(H5MF_xfree(f, stype, H5AC_ind_read_dxpl_id, saddr1, (hsize_t)TEST_BLOCK_SIZE1) < 0)
FAIL_STACK_ERROR
- if(H5MF_xfree(f, stype, H5P_DATASET_XFER_DEFAULT, saddr3, (hsize_t)TEST_BLOCK_SIZE3) < 0)
+ if(H5MF_xfree(f, stype, H5AC_ind_read_dxpl_id, saddr3, (hsize_t)TEST_BLOCK_SIZE3) < 0)
FAIL_STACK_ERROR
if(H5Fclose(file) < 0)
@@ -6567,7 +6567,7 @@ test_mf_fs_multi(hid_t fapl_new, hid_t fcpl)
TEST_ERROR
/* Start up H5FD_MEM_SUPER free-space manager */
- if(H5MF_alloc_open(f, H5P_DATASET_XFER_DEFAULT, type) < 0)
+ if(H5MF_alloc_open(f, H5AC_ind_read_dxpl_id, type) < 0)
FAIL_STACK_ERROR
/* Get free-space info */
@@ -6581,7 +6581,7 @@ test_mf_fs_multi(hid_t fapl_new, hid_t fcpl)
TEST_ERROR
/* Retrieve block #1 from H5FD_MEM_SUPER free-space manager; block #2 still in free-space */
- if(HADDR_UNDEF == (tmp_addr = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE1)))
+ if(HADDR_UNDEF == (tmp_addr = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE1)))
FAIL_STACK_ERROR
if(tmp_addr != addr1)
TEST_ERROR
@@ -6591,7 +6591,7 @@ test_mf_fs_multi(hid_t fapl_new, hid_t fcpl)
TEST_ERROR
/* Start up H5FD_MEM_DRAW free-space manager */
- if(H5MF_alloc_open(f, H5P_DATASET_XFER_DEFAULT, stype) < 0)
+ if(H5MF_alloc_open(f, H5AC_ind_read_dxpl_id, stype) < 0)
FAIL_STACK_ERROR
/* Get free-space info */
@@ -6605,32 +6605,32 @@ test_mf_fs_multi(hid_t fapl_new, hid_t fcpl)
TEST_ERROR
/* Retrieve blocks #1 from H5FD_MEM_DRAW free-space manager */
- if(HADDR_UNDEF == (tmp_addr = H5MF_alloc(f, stype, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE1)))
+ if(HADDR_UNDEF == (tmp_addr = H5MF_alloc(f, stype, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE1)))
FAIL_STACK_ERROR
if(tmp_addr != saddr1)
TEST_ERROR
/* Retrieve blocks #3 from H5FD_MEM_DRAW free-space manager */
- if(HADDR_UNDEF == (tmp_addr = H5MF_alloc(f, stype, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE3)))
+ if(HADDR_UNDEF == (tmp_addr = H5MF_alloc(f, stype, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE3)))
FAIL_STACK_ERROR
if(tmp_addr != saddr3)
TEST_ERROR
/* Allocate 4 blocks of type H5FD_MEM_BTREE */
btype = H5FD_MEM_BTREE;
- if(HADDR_UNDEF == (baddr1 = H5MF_alloc(f, btype, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE1)))
+ if(HADDR_UNDEF == (baddr1 = H5MF_alloc(f, btype, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE1)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (baddr2 = H5MF_alloc(f, btype, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE2)))
+ if(HADDR_UNDEF == (baddr2 = H5MF_alloc(f, btype, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE2)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (baddr3 = H5MF_alloc(f, btype, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE3)))
+ if(HADDR_UNDEF == (baddr3 = H5MF_alloc(f, btype, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE3)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (baddr4 = H5MF_alloc(f, btype, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE4)))
+ if(HADDR_UNDEF == (baddr4 = H5MF_alloc(f, btype, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE4)))
FAIL_STACK_ERROR
/* Put block #1 & #3 into H5FD_MEM_BTREE free-space manager */
- if(H5MF_xfree(f, btype, H5P_DATASET_XFER_DEFAULT, baddr1, (hsize_t)TEST_BLOCK_SIZE1) < 0)
+ if(H5MF_xfree(f, btype, H5AC_ind_read_dxpl_id, baddr1, (hsize_t)TEST_BLOCK_SIZE1) < 0)
FAIL_STACK_ERROR
- if(H5MF_xfree(f, btype, H5P_DATASET_XFER_DEFAULT, baddr3, (hsize_t)TEST_BLOCK_SIZE3) < 0)
+ if(H5MF_xfree(f, btype, H5AC_ind_read_dxpl_id, baddr3, (hsize_t)TEST_BLOCK_SIZE3) < 0)
FAIL_STACK_ERROR
if(H5Fclose(file) < 0)
@@ -6649,7 +6649,7 @@ test_mf_fs_multi(hid_t fapl_new, hid_t fcpl)
TEST_ERROR
/* Start up H5FD_MEM_SUPER free-space manager */
- if(H5MF_alloc_open(f, H5P_DATASET_XFER_DEFAULT, type) < 0)
+ if(H5MF_alloc_open(f, H5AC_ind_read_dxpl_id, type) < 0)
FAIL_STACK_ERROR
/* Get free-space info */
@@ -6661,7 +6661,7 @@ test_mf_fs_multi(hid_t fapl_new, hid_t fcpl)
TEST_ERROR
/* Retrieve block #3 from H5FD_MEM_SUPER free-space manager */
- if(HADDR_UNDEF == (tmp_addr = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE3)))
+ if(HADDR_UNDEF == (tmp_addr = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE3)))
FAIL_STACK_ERROR
if(tmp_addr != addr3)
TEST_ERROR
@@ -6675,7 +6675,7 @@ test_mf_fs_multi(hid_t fapl_new, hid_t fcpl)
TEST_ERROR
/* Start up H5FD_MEM_BTREE free-space manager */
- if(H5MF_alloc_open(f, H5P_DATASET_XFER_DEFAULT, btype) < 0)
+ if(H5MF_alloc_open(f, H5AC_ind_read_dxpl_id, btype) < 0)
FAIL_STACK_ERROR
/* Get free-space info */
@@ -6690,13 +6690,13 @@ test_mf_fs_multi(hid_t fapl_new, hid_t fcpl)
/* Allocate 2 blocks of type H5FD_MEM_GHEAP */
gtype = H5FD_MEM_GHEAP;
- if(HADDR_UNDEF == (gaddr2 = H5MF_alloc(f, gtype, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE2)))
+ if(HADDR_UNDEF == (gaddr2 = H5MF_alloc(f, gtype, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE2)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (gaddr1 = H5MF_alloc(f, gtype, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE1)))
+ if(HADDR_UNDEF == (gaddr1 = H5MF_alloc(f, gtype, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE1)))
FAIL_STACK_ERROR
/* Put block #2 into H5FD_MEM_GHEAP free-space manager */
- if(H5MF_xfree(f, gtype, H5P_DATASET_XFER_DEFAULT, gaddr2, (hsize_t)TEST_BLOCK_SIZE2) < 0)
+ if(H5MF_xfree(f, gtype, H5AC_ind_read_dxpl_id, gaddr2, (hsize_t)TEST_BLOCK_SIZE2) < 0)
FAIL_STACK_ERROR
if(H5Fclose(file) < 0)
@@ -6713,15 +6713,15 @@ test_mf_fs_multi(hid_t fapl_new, hid_t fcpl)
/* If H5FD_MEM_SUPER is there, should not find block #1 & #3 */
if(H5F_addr_defined(f->shared->fs_addr[type])) {
/* Start up H5FD_MEM_SUPER free-space manager */
- if(H5MF_alloc_open(f, H5P_DATASET_XFER_DEFAULT, type) < 0)
+ if(H5MF_alloc_open(f, H5AC_ind_read_dxpl_id, type) < 0)
FAIL_STACK_ERROR
- if((node_found = H5FS_sect_find(f, H5P_DATASET_XFER_DEFAULT, f->shared->fs_man[type],
+ if((node_found = H5FS_sect_find(f, H5AC_ind_read_dxpl_id, f->shared->fs_man[type],
(hsize_t)TEST_BLOCK_SIZE1, (H5FS_section_info_t **)&node)) < 0)
FAIL_STACK_ERROR
if(node_found) TEST_ERROR
- if((node_found = H5FS_sect_find(f, H5P_DATASET_XFER_DEFAULT, f->shared->fs_man[type],
+ if((node_found = H5FS_sect_find(f, H5AC_ind_read_dxpl_id, f->shared->fs_man[type],
(hsize_t)TEST_BLOCK_SIZE3, (H5FS_section_info_t **)&node)) < 0)
FAIL_STACK_ERROR
if(node_found) TEST_ERROR
@@ -6732,7 +6732,7 @@ test_mf_fs_multi(hid_t fapl_new, hid_t fcpl)
TEST_ERROR
/* Start up H5FD_MEM_GHEAP free-space manager */
- if(H5MF_alloc_open(f, H5P_DATASET_XFER_DEFAULT, gtype) < 0)
+ if(H5MF_alloc_open(f, H5AC_ind_read_dxpl_id, gtype) < 0)
FAIL_STACK_ERROR
/* Get free-space info */
@@ -6977,25 +6977,25 @@ test_filespace_strategy_threshold(hid_t fapl_new)
/* Allocate 6 blocks */
type = H5FD_MEM_SUPER;
- if(HADDR_UNDEF == (addr1 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE1)))
+ if(HADDR_UNDEF == (addr1 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE1)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (addr2 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE2)))
+ if(HADDR_UNDEF == (addr2 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE2)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (addr3 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE3)))
+ if(HADDR_UNDEF == (addr3 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE3)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (addr4 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE4)))
+ if(HADDR_UNDEF == (addr4 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE4)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (addr5 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE5)))
+ if(HADDR_UNDEF == (addr5 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE5)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (addr6 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE6)))
+ if(HADDR_UNDEF == (addr6 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE6)))
FAIL_STACK_ERROR
/* Put block #1, #3, #5 to H5FD_MEM_SUPER free-space manager */
- if(H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr1, (hsize_t)TEST_BLOCK_SIZE1) < 0)
+ if(H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr1, (hsize_t)TEST_BLOCK_SIZE1) < 0)
FAIL_STACK_ERROR
- if(H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr3, (hsize_t)TEST_BLOCK_SIZE3) < 0)
+ if(H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr3, (hsize_t)TEST_BLOCK_SIZE3) < 0)
FAIL_STACK_ERROR
- if(H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr5, (hsize_t)TEST_BLOCK_SIZE5) < 0)
+ if(H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr5, (hsize_t)TEST_BLOCK_SIZE5) < 0)
FAIL_STACK_ERROR
/* Retrieve the total amount of free space and # of free-space sections */
@@ -7026,7 +7026,7 @@ test_filespace_strategy_threshold(hid_t fapl_new)
TEST_ERROR
/* Open the free-space manager */
- if(H5MF_alloc_open(f, H5P_DATASET_XFER_DEFAULT, type) < 0)
+ if(H5MF_alloc_open(f, H5AC_ind_read_dxpl_id, type) < 0)
FAIL_STACK_ERROR
/* Retrieve the total amount of free space and # of free-space sections */
@@ -7040,7 +7040,7 @@ test_filespace_strategy_threshold(hid_t fapl_new)
/* Retrieve block #5 from H5FD_MEM_SUPER free-space manager */
if(HADDR_UNDEF ==
- (tmp_addr = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE5)))
+ (tmp_addr = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE5)))
FAIL_STACK_ERROR
/* Should be the same as before */
@@ -7129,23 +7129,23 @@ test_filespace_gone(hid_t fapl_new)
/* Allocate 6 blocks */
type = H5FD_MEM_SUPER;
- if(HADDR_UNDEF == (addr1 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE1)))
+ if(HADDR_UNDEF == (addr1 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE1)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (addr2 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE2)))
+ if(HADDR_UNDEF == (addr2 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE2)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (addr3 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE3)))
+ if(HADDR_UNDEF == (addr3 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE3)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (addr4 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE4)))
+ if(HADDR_UNDEF == (addr4 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE4)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (addr5 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE5)))
+ if(HADDR_UNDEF == (addr5 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE5)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (addr6 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE6)))
+ if(HADDR_UNDEF == (addr6 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE6)))
FAIL_STACK_ERROR
/* Put block #3, #5 to H5FD_MEM_SUPER free-space manager */
- if(H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr3, (hsize_t)TEST_BLOCK_SIZE3) < 0)
+ if(H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr3, (hsize_t)TEST_BLOCK_SIZE3) < 0)
FAIL_STACK_ERROR
- if(H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr5, (hsize_t)TEST_BLOCK_SIZE5) < 0)
+ if(H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr5, (hsize_t)TEST_BLOCK_SIZE5) < 0)
FAIL_STACK_ERROR
HDmemset(&state, 0, sizeof(frspace_state_t));
@@ -7157,17 +7157,17 @@ test_filespace_gone(hid_t fapl_new)
TEST_ERROR
/* section #2 is less than threshold but is merged into section #3 */
- if(H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr2, (hsize_t)TEST_BLOCK_SIZE2) < 0)
+ if(H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr2, (hsize_t)TEST_BLOCK_SIZE2) < 0)
FAIL_STACK_ERROR
state.tot_space += TEST_BLOCK_SIZE2;
if(check_stats(f, f->shared->fs_man[type], &state))
TEST_ERROR
- if(H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr4, (hsize_t)TEST_BLOCK_SIZE4) < 0)
+ if(H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr4, (hsize_t)TEST_BLOCK_SIZE4) < 0)
FAIL_STACK_ERROR
- if(H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr6, (hsize_t)TEST_BLOCK_SIZE6) < 0)
+ if(H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr6, (hsize_t)TEST_BLOCK_SIZE6) < 0)
FAIL_STACK_ERROR
/* all sections should be shrunk away except section #1 */
@@ -7176,7 +7176,7 @@ test_filespace_gone(hid_t fapl_new)
TEST_ERROR
/* section #1 is less than threshold but is shrunk away */
- if(H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr1, (hsize_t)TEST_BLOCK_SIZE1) < 0)
+ if(H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr1, (hsize_t)TEST_BLOCK_SIZE1) < 0)
FAIL_STACK_ERROR
/* free-space manager should be empty */
@@ -7396,29 +7396,29 @@ test_dichotomy(const char *env_h5_drvr, hid_t fapl)
/* Allocate the first block of type H5FD_MEM_SUPER */
type = H5FD_MEM_SUPER;
- addr1 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE30);
+ addr1 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE30);
/* Allocate the second block of type H5FD_MEM_SUPER */
- H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE50);
+ H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE50);
/* Allocate the first block of type H5FD_MEM_DRAW */
stype = H5FD_MEM_DRAW;
- saddr1 = H5MF_alloc(f, stype, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE30);
+ saddr1 = H5MF_alloc(f, stype, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE30);
/* Free the first block of type H5FD_MEM_SUPER */
- H5MF_xfree(f, type, H5P_DATASET_XFER_DEFAULT, addr1, (hsize_t)TEST_BLOCK_SIZE30);
+ H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr1, (hsize_t)TEST_BLOCK_SIZE30);
/* Allocate the second block of type H5FD_MEM_DRAW */
- saddr2 = H5MF_alloc(f, stype, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE30);
+ saddr2 = H5MF_alloc(f, stype, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE30);
/* Verify that saddr1 is not addr1 */
if(saddr2 == addr1) TEST_ERROR
/* Free the first block of type H5FD_MEM_DRAW */
- H5MF_xfree(f, stype, H5P_DATASET_XFER_DEFAULT, saddr1, (hsize_t)TEST_BLOCK_SIZE30);
+ H5MF_xfree(f, stype, H5AC_ind_read_dxpl_id, saddr1, (hsize_t)TEST_BLOCK_SIZE30);
/* Allocate the third block of type H5FD_MEM_SUPER */
- addr3 = H5MF_alloc(f, type, H5P_DATASET_XFER_DEFAULT, (hsize_t)TEST_BLOCK_SIZE30);
+ addr3 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TEST_BLOCK_SIZE30);
/* Verify that addr3 is not saddr1 */
if(addr3 == saddr1) TEST_ERROR
diff --git a/test/objcopy.c b/test/objcopy.c
index f3806cd..e435dd1 100644
--- a/test/objcopy.c
+++ b/test/objcopy.c
@@ -197,7 +197,7 @@ addr_insert(H5O_info_t *oi)
*
*-------------------------------------------------------------------------
*/
-static hbool_t
+static H5_ATTR_PURE hbool_t
addr_lookup(H5O_info_t *oi)
{
size_t n;
@@ -512,8 +512,12 @@ test_copy_attach_attribute_vl(hid_t loc_id)
ret_value = 0;
done:
- if(tid >0 && sid > 0)
- H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf);
+ if(tid >0 && sid > 0) {
+ hid_t dxpl_id = H5Pcreate(H5P_DATASET_XFER);
+ H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL);
+ H5Dvlen_reclaim(tid, sid, dxpl_id, buf);
+ H5Pclose(dxpl_id);
+ }
if(sid > 0)
H5Sclose(sid);
if(tid > 0)
@@ -1215,47 +1219,10 @@ compare_datasets(hid_t did, hid_t did2, hid_t pid, const void *wbuf)
/* Open the dataset creation property list for the destination dataset */
if((dcpl2 = H5Dget_create_plist(did2)) < 0) TEST_ERROR
- /* If external file storage is being used, the value stored in the
- * dcpl will be a heap ID, which is not guaranteed to be the same in
- * source and destination files.
- * Instead, compare the actual external file values and then
- * delete this property from the dcpls before comparing them.
- */
- if((ext_count = H5Pget_external_count(dcpl)) < 0) TEST_ERROR
-
- if(ext_count > 0)
- {
- unsigned x; /* Counter varaible */
- char name1[NAME_BUF_SIZE];
- char name2[NAME_BUF_SIZE];
- off_t offset1=0;
- off_t offset2=0;
- hsize_t size1=0;
- hsize_t size2=0;
-
- if(H5Pget_external_count(dcpl2) != ext_count) TEST_ERROR
-
- /* Ensure that all external file information is the same */
- for(x=0; x < (unsigned) ext_count; ++x)
- {
- if(H5Pget_external(dcpl, x, (size_t)NAME_BUF_SIZE, name1, &offset1, &size1) < 0) TEST_ERROR
- if(H5Pget_external(dcpl2, x, (size_t)NAME_BUF_SIZE, name2, &offset2, &size2) < 0) TEST_ERROR
-
- if(offset1 != offset2) TEST_ERROR
- if(size1 != size2) TEST_ERROR
- if(HDstrcmp(name1, name2) != 0) TEST_ERROR
- }
-
- /* Reset external file information from the dcpls */
- /* (Directly removing default property causes memory leak) */
- if (H5P_reset_external_file_test(dcpl) < 0) TEST_ERROR
- if (H5P_reset_external_file_test(dcpl2) < 0) TEST_ERROR
- }
-
/* Compare the rest of the dataset creation property lists */
if(H5Pequal(dcpl, dcpl2) != TRUE) TEST_ERROR
- /* Get the number of filters on dataset */
+ /* Get the number of filters on dataset (for later) */
if((nfilters = H5Pget_nfilters(dcpl)) < 0) TEST_ERROR
/* close the source dataset creation property list */
@@ -2305,9 +2272,7 @@ test_copy_dataset_compound(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
TESTING("H5Ocopy(): compound dataset");
-#ifdef H5_CLEAR_MEMORY
HDmemset(buf, 0, sizeof(buf));
-#endif /* H5_CLEAR_MEMORY */
for(i = 0; i < DIM_SIZE_1; i++) {
buf[i].a = i;
buf[i].d = (double)1.0F / (double)(i + 1);
@@ -3082,6 +3047,146 @@ error:
/*-------------------------------------------------------------------------
+ * Function: test_copy_dataset_no_edge_filt
+ *
+ * Purpose: Create a compressed, chunked dataset in SRC file and copy it to DST file
+ *
+ * Return: Success: 0
+ * Failure: number of errors
+ *
+ * Programmer: Neil Fortner
+ * Tuesday, May 11, 2010
+ * Mostly copied from test_copy_dataset_compressed, by
+ * Quincey Koziol
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+test_copy_dataset_no_edge_filt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
+ hid_t dst_fapl)
+{
+#ifdef H5_HAVE_FILTER_DEFLATE
+ hid_t fid_src = -1, fid_dst = -1; /* File IDs */
+ hid_t sid = -1; /* Dataspace ID */
+ hid_t pid = -1; /* Dataset creation property list ID */
+ hid_t did = -1, did2 = -1; /* Dataset IDs */
+ hsize_t dim2d[2]; /* Dataset dimensions */
+ hsize_t chunk_dim2d[2] ={CHUNK_SIZE_1, CHUNK_SIZE_2}; /* Chunk dimensions */
+ float buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
+ int i, j; /* Local index variables */
+ char src_filename[NAME_BUF_SIZE];
+ char dst_filename[NAME_BUF_SIZE];
+#endif /* H5_HAVE_FILTER_DEFLATE */
+
+ TESTING("H5Ocopy(): compressed dataset with no edge filters");
+
+#ifndef H5_HAVE_FILTER_DEFLATE
+ SKIPPED();
+ puts(" Deflation filter not available");
+#else /* H5_HAVE_FILTER_DEFLATE */
+ /* set initial data values */
+ for (i=0; i<DIM_SIZE_1; i++)
+ for (j=0; j<DIM_SIZE_2; j++)
+ buf[i][j] = 100.0F; /* Something easy to compress */
+
+ /* Initialize the filenames */
+ h5_fixname(FILENAME[0], src_fapl, src_filename, sizeof src_filename);
+ h5_fixname(FILENAME[1], dst_fapl, dst_filename, sizeof dst_filename);
+
+ /* Reset file address checking info */
+ addr_reset();
+
+ /* create source file */
+ if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) TEST_ERROR
+
+ /* Set dataspace dimensions */
+ dim2d[0]=DIM_SIZE_1;
+ dim2d[1]=DIM_SIZE_2;
+
+ /* create dataspace */
+ if((sid = H5Screate_simple(2, dim2d, NULL)) < 0) TEST_ERROR
+
+ /* create and set comp & chunk plist, and disable partial chunk filters */
+ if((pid = H5Pcreate(H5P_DATASET_CREATE)) < 0) TEST_ERROR
+ if(H5Pset_chunk(pid, 2, chunk_dim2d) < 0) TEST_ERROR
+ if(H5Pset_deflate(pid, 9) < 0) TEST_ERROR
+ if(H5Pset_chunk_opts(pid, H5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS) < 0) TEST_ERROR
+
+ /* create dataset */
+ if((did = H5Dcreate2(fid_src, NAME_DATASET_CHUNKED, H5T_NATIVE_FLOAT, sid, H5P_DEFAULT, pid, H5P_DEFAULT)) < 0) TEST_ERROR
+
+ /* close chunk plist */
+ if(H5Pclose(pid) < 0) TEST_ERROR
+
+ /* write data into file */
+ if(H5Dwrite(did, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) TEST_ERROR
+
+ /* close dataspace */
+ if(H5Sclose(sid) < 0) TEST_ERROR
+
+ /* attach attributes to the dataset */
+ if(test_copy_attach_attributes(did, H5T_NATIVE_INT) < 0) TEST_ERROR
+
+ /* close the dataset */
+ if(H5Dclose(did) < 0) TEST_ERROR
+
+ /* close the SRC file */
+ if(H5Fclose(fid_src) < 0) TEST_ERROR
+
+
+ /* open the source file with read-only */
+ if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) TEST_ERROR
+
+ /* create destination file */
+ if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) TEST_ERROR
+
+ /* Create an uncopied object in destination file so that addresses in source and destination files aren't the same */
+ if(H5Gclose(H5Gcreate2(fid_dst, NAME_GROUP_UNCOPIED, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
+
+ /* copy the dataset from SRC to DST */
+ if(H5Ocopy(fid_src, NAME_DATASET_CHUNKED, fid_dst, NAME_DATASET_CHUNKED, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
+
+ /* open the dataset for copy */
+ if((did = H5Dopen2(fid_src, NAME_DATASET_CHUNKED, H5P_DEFAULT)) < 0) TEST_ERROR
+
+ /* open the destination dataset */
+ if((did2 = H5Dopen2(fid_dst, NAME_DATASET_CHUNKED, H5P_DEFAULT)) < 0) TEST_ERROR
+
+ /* Check if the datasets are equal */
+ if(compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE) TEST_ERROR
+
+ /* close the destination dataset */
+ if(H5Dclose(did2) < 0) TEST_ERROR
+
+ /* close the source dataset */
+ if(H5Dclose(did) < 0) TEST_ERROR
+
+ /* close the SRC file */
+ if(H5Fclose(fid_src) < 0) TEST_ERROR
+
+ /* close the DST file */
+ if(H5Fclose(fid_dst) < 0) TEST_ERROR
+
+ PASSED();
+#endif /* H5_HAVE_FILTER_DEFLATE */
+ return 0;
+
+#ifdef H5_HAVE_FILTER_DEFLATE
+error:
+ H5E_BEGIN_TRY {
+ H5Dclose(did2);
+ H5Dclose(did);
+ H5Pclose(pid);
+ H5Sclose(sid);
+ H5Fclose(fid_dst);
+ H5Fclose(fid_src);
+ } H5E_END_TRY;
+ return 1;
+#endif /* H5_HAVE_FILTER_DEFLATE */
+} /* end test_copy_dataset_no_edge_filt */
+
+
+/*-------------------------------------------------------------------------
* Function: test_copy_dataset_compact
*
* Purpose: Create a compact dataset in SRC file and copy it to DST file
@@ -4028,6 +4133,7 @@ test_copy_dataset_contig_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_
hid_t tid = -1; /* Datatype ID */
hid_t sid = -1; /* Dataspace ID */
hid_t did = -1, did2 = -1; /* Dataset IDs */
+ hid_t dxpl_id = -1; /* Dataset transfer property list ID */
unsigned int i, j; /* Local index variables */
hsize_t dim1d[1]; /* Dataset dimensions */
hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
@@ -4111,7 +4217,12 @@ test_copy_dataset_contig_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_
/* Reclaim vlen buffer */
- if(H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf) < 0) TEST_ERROR
+ if(H5Tdetect_class(tid, H5T_VLEN) == TRUE) {
+ if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) TEST_ERROR
+ if(H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0) TEST_ERROR
+ if(H5Dvlen_reclaim(tid, sid, dxpl_id, buf) < 0) TEST_ERROR
+ if(H5Pclose(dxpl_id) < 0) TEST_ERROR
+ } /* end if */
/* close datatype */
if(H5Tclose(tid) < 0) TEST_ERROR
@@ -4127,6 +4238,7 @@ error:
H5Dclose(did2);
H5Dclose(did);
H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf);
+ H5Pclose(dxpl_id);
H5Tclose(tid);
H5Sclose(sid);
H5Fclose(fid_dst);
@@ -4158,6 +4270,7 @@ test_copy_dataset_chunked_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
hid_t sid = -1; /* Dataspace ID */
hid_t pid = -1; /* Dataset creation property list ID */
hid_t did = -1, did2 = -1; /* Dataset IDs */
+ hid_t dxpl_id = -1; /* Dataset transfer property list ID */
unsigned int i, j; /* Local index variables */
hsize_t dim1d[1]; /* Dataset dimensions */
hsize_t chunk_dim1d[1] = {CHUNK_SIZE_1}; /* Chunk dimensions */
@@ -4250,7 +4363,12 @@ test_copy_dataset_chunked_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
/* Reclaim vlen buffer */
- if(H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf) < 0) TEST_ERROR
+ if(H5Tdetect_class(tid, H5T_VLEN) == TRUE) {
+ if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) TEST_ERROR
+ if(H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0) TEST_ERROR
+ if(H5Dvlen_reclaim(tid, sid, dxpl_id, buf) < 0) TEST_ERROR
+ if(H5Pclose(dxpl_id) < 0) TEST_ERROR
+ } /* end if */
/* close datatype */
if(H5Tclose(tid) < 0) TEST_ERROR
@@ -4266,6 +4384,8 @@ error:
H5Dclose(did2);
H5Dclose(did);
H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf);
+ H5Pclose(dxpl_id);
+ H5Pclose(pid);
H5Tclose(tid);
H5Sclose(sid);
H5Fclose(fid_dst);
@@ -4297,6 +4417,7 @@ test_copy_dataset_compact_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
hid_t sid = -1; /* Dataspace ID */
hid_t pid = -1; /* Dataset creation property list ID */
hid_t did = -1, did2 = -1; /* Dataset IDs */
+ hid_t dxpl_id = -1; /* Dataset transfer property list ID */
unsigned int i, j; /* Local index variables */
hsize_t dim1d[1]; /* Dataset dimensions */
hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
@@ -4387,7 +4508,12 @@ test_copy_dataset_compact_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
/* Reclaim vlen buffer */
- if(H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf) < 0) TEST_ERROR
+ if(H5Tdetect_class(tid, H5T_VLEN) == TRUE) {
+ if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) TEST_ERROR
+ if(H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0) TEST_ERROR
+ if(H5Dvlen_reclaim(tid, sid, dxpl_id, buf) < 0) TEST_ERROR
+ if(H5Pclose(dxpl_id) < 0) TEST_ERROR
+ } /* end if */
/* close datatype */
if(H5Tclose(tid) < 0) TEST_ERROR
@@ -4403,6 +4529,7 @@ error:
H5Dclose(did2);
H5Dclose(did);
H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf);
+ H5Pclose(dxpl_id);
H5Tclose(tid);
H5Sclose(sid);
H5Fclose(fid_dst);
@@ -4550,6 +4677,7 @@ test_copy_dataset_compressed_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
hid_t tid = -1; /* Datatype ID */
hid_t pid = -1; /* Dataset creation property list ID */
hid_t did = -1, did2 = -1; /* Dataset IDs */
+ hid_t dxpl_id = -1; /* Dataset transfer property list ID */
hsize_t dim2d[2]; /* Dataset dimensions */
hsize_t chunk_dim2d[2] ={CHUNK_SIZE_1, CHUNK_SIZE_2}; /* Chunk dimensions */
hvl_t buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
@@ -4649,7 +4777,12 @@ test_copy_dataset_compressed_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
if(H5Fclose(fid_dst) < 0) TEST_ERROR
/* Reclaim vlen buffer */
- if(H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf) < 0) TEST_ERROR
+ if(H5Tdetect_class(tid, H5T_VLEN) == TRUE) {
+ if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) TEST_ERROR
+ if(H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0) TEST_ERROR
+ if(H5Dvlen_reclaim(tid, sid, dxpl_id, buf) < 0) TEST_ERROR
+ if(H5Pclose(dxpl_id) < 0) TEST_ERROR
+ } /* end if */
/* close datatype */
if(H5Tclose(tid) < 0) TEST_ERROR
@@ -4668,6 +4801,7 @@ error:
H5Dclose(did);
H5Pclose(pid);
H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf);
+ H5Pclose(dxpl_id);
H5Tclose(tid);
H5Sclose(sid);
H5Fclose(fid_dst);
@@ -6357,6 +6491,7 @@ test_copy_dataset_compact_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
hid_t sid = -1; /* Dataspace ID */
hid_t pid = -1; /* Dataset creation property list ID */
hid_t did = -1, did2 = -1; /* Dataset IDs */
+ hid_t dxpl_id = -1; /* Dataset transfer property list ID */
unsigned int i, j; /* Local index variables */
hsize_t dim1d[1]; /* Dataset dimensions */
hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
@@ -6456,7 +6591,12 @@ test_copy_dataset_compact_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
/* Reclaim vlen buffer */
- if(H5Dvlen_reclaim(tid_copy, sid, H5P_DEFAULT, buf) < 0) TEST_ERROR
+ if(H5Tdetect_class(tid_copy, H5T_VLEN) == TRUE) {
+ if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) TEST_ERROR
+ if(H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0) TEST_ERROR
+ if(H5Dvlen_reclaim(tid_copy, sid, dxpl_id, buf) < 0) TEST_ERROR
+ if(H5Pclose(dxpl_id) < 0) TEST_ERROR
+ } /* end if */
/* close datatype */
if(H5Tclose(tid_copy) < 0) TEST_ERROR
@@ -6473,6 +6613,7 @@ error:
H5Dclose(did2);
H5Dclose(did);
H5Dvlen_reclaim(tid_copy, sid, H5P_DEFAULT, buf);
+ H5Pclose(dxpl_id);
H5Tclose(tid);
H5Tclose(tid_copy);
H5Sclose(sid);
@@ -6504,6 +6645,7 @@ test_copy_dataset_contig_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl
hid_t tid = -1, tid_copy=-1; /* Datatype ID */
hid_t sid = -1; /* Dataspace ID */
hid_t did = -1, did2 = -1; /* Dataset IDs */
+ hid_t dxpl_id = -1; /* Dataset transfer property list ID */
unsigned int i, j; /* Local index variables */
hsize_t dim1d[1]; /* Dataset dimensions */
hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
@@ -6596,7 +6738,12 @@ test_copy_dataset_contig_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl
/* Reclaim vlen buffer */
- if(H5Dvlen_reclaim(tid_copy, sid, H5P_DEFAULT, buf) < 0) TEST_ERROR
+ if(H5Tdetect_class(tid_copy, H5T_VLEN) == TRUE) {
+ if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) TEST_ERROR
+ if(H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0) TEST_ERROR
+ if(H5Dvlen_reclaim(tid_copy, sid, dxpl_id, buf) < 0) TEST_ERROR
+ if(H5Pclose(dxpl_id) < 0) TEST_ERROR
+ } /* end if */
/* close datatype */
if(H5Tclose(tid_copy) < 0) TEST_ERROR
@@ -6612,6 +6759,7 @@ error:
H5Dclose(did2);
H5Dclose(did);
H5Dvlen_reclaim(tid_copy, sid, H5P_DEFAULT, buf);
+ H5Pclose(dxpl_id);
H5Tclose(tid);
H5Tclose(tid_copy);
H5Sclose(sid);
@@ -6644,6 +6792,7 @@ test_copy_dataset_chunked_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
hid_t sid = -1; /* Dataspace ID */
hid_t pid = -1; /* Dataset creation property list ID */
hid_t did = -1, did2 = -1; /* Dataset IDs */
+ hid_t dxpl_id = -1; /* Dataset transfer property list ID */
unsigned int i, j; /* Local index variables */
hsize_t dim1d[1]; /* Dataset dimensions */
hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
@@ -6744,7 +6893,12 @@ test_copy_dataset_chunked_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
/* Reclaim vlen buffer */
- if(H5Dvlen_reclaim(tid_copy, sid, H5P_DEFAULT, buf) < 0) TEST_ERROR
+ if(H5Tdetect_class(tid_copy, H5T_VLEN) == TRUE) {
+ if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) TEST_ERROR
+ if(H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0) TEST_ERROR
+ if(H5Dvlen_reclaim(tid_copy, sid, dxpl_id, buf) < 0) TEST_ERROR
+ if(H5Pclose(dxpl_id) < 0) TEST_ERROR
+ } /* end if */
/* close datatype */
if(H5Tclose(tid_copy) < 0) TEST_ERROR
@@ -6761,6 +6915,7 @@ error:
H5Dclose(did2);
H5Dclose(did);
H5Dvlen_reclaim(tid_copy, sid, H5P_DEFAULT, buf);
+ H5Pclose(dxpl_id);
H5Tclose(tid);
H5Tclose(tid_copy);
H5Sclose(sid);
@@ -6793,6 +6948,7 @@ test_copy_dataset_compressed_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_
hid_t sid = -1; /* Dataspace ID */
hid_t pid = -1; /* Dataset creation property list ID */
hid_t did = -1, did2 = -1; /* Dataset IDs */
+ hid_t dxpl_id = -1; /* Dataset transfer property list ID */
unsigned int i, j; /* Local index variables */
hsize_t dim1d[1]; /* Dataset dimensions */
hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
@@ -6894,7 +7050,12 @@ test_copy_dataset_compressed_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_
/* Reclaim vlen buffer */
- if(H5Dvlen_reclaim(tid_copy, sid, H5P_DEFAULT, buf) < 0) TEST_ERROR
+ if(H5Tdetect_class(tid_copy, H5T_VLEN) == TRUE) {
+ if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) TEST_ERROR
+ if(H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0) TEST_ERROR
+ if(H5Dvlen_reclaim(tid_copy, sid, dxpl_id, buf) < 0) TEST_ERROR
+ if(H5Pclose(dxpl_id) < 0) TEST_ERROR
+ } /* end if */
/* close datatype */
if(H5Tclose(tid_copy) < 0) TEST_ERROR
@@ -6911,6 +7072,7 @@ error:
H5Dclose(did2);
H5Dclose(did);
H5Dvlen_reclaim(tid_copy, sid, H5P_DEFAULT, buf);
+ H5Pclose(dxpl_id);
H5Tclose(tid);
H5Tclose(tid_copy);
H5Sclose(sid);
@@ -6943,6 +7105,7 @@ test_copy_dataset_compact_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
hid_t sid = -1; /* Dataspace ID */
hid_t pid = -1; /* Dataset creation property list ID */
hid_t did = -1, did2 = -1; /* Dataset IDs */
+ hid_t dxpl_id = -1; /* Dataset transfer property list ID */
unsigned int i, j, k; /* Local index variables */
hsize_t dim1d[1]; /* Dataset dimensions */
hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
@@ -7049,7 +7212,12 @@ test_copy_dataset_compact_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
if(H5Fclose(fid_dst) < 0) TEST_ERROR
/* Reclaim vlen buffer */
- if(H5Dvlen_reclaim(tid2, sid, H5P_DEFAULT, buf) < 0) TEST_ERROR
+ if(H5Tdetect_class(tid2, H5T_VLEN) == TRUE) {
+ if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) TEST_ERROR
+ if(H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0) TEST_ERROR
+ if(H5Dvlen_reclaim(tid2, sid, dxpl_id, buf) < 0) TEST_ERROR
+ if(H5Pclose(dxpl_id) < 0) TEST_ERROR
+ } /* end if */
/* close datatype */
if(H5Tclose(tid) < 0) TEST_ERROR
@@ -7066,6 +7234,8 @@ error:
H5Dclose(did2);
H5Dclose(did);
H5Dvlen_reclaim(tid2, sid, H5P_DEFAULT, buf);
+ H5Pclose(dxpl_id);
+ H5Pclose(pid);
H5Tclose(tid);
H5Tclose(tid2);
H5Sclose(sid);
@@ -7098,6 +7268,7 @@ test_copy_dataset_contig_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h
hid_t sid = -1; /* Dataspace ID */
hid_t pid = -1; /* Dataset creation property list ID */
hid_t did = -1, did2 = -1; /* Dataset IDs */
+ hid_t dxpl_id = -1; /* Dataset transfer property list ID */
unsigned int i, j, k; /* Local index variables */
hsize_t dim1d[1]; /* Dataset dimensions */
hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
@@ -7203,7 +7374,12 @@ test_copy_dataset_contig_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h
if(H5Fclose(fid_dst) < 0) TEST_ERROR
/* Reclaim vlen buffer */
- if(H5Dvlen_reclaim(tid2, sid, H5P_DEFAULT, buf) < 0) TEST_ERROR
+ if(H5Tdetect_class(tid2, H5T_VLEN) == TRUE) {
+ if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) TEST_ERROR
+ if(H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0) TEST_ERROR
+ if(H5Dvlen_reclaim(tid2, sid, dxpl_id, buf) < 0) TEST_ERROR
+ if(H5Pclose(dxpl_id) < 0) TEST_ERROR
+ } /* end if */
/* close datatype */
if(H5Tclose(tid) < 0) TEST_ERROR
@@ -7220,6 +7396,8 @@ error:
H5Dclose(did2);
H5Dclose(did);
H5Dvlen_reclaim(tid2, sid, H5P_DEFAULT, buf);
+ H5Pclose(dxpl_id);
+ H5Pclose(pid);
H5Tclose(tid);
H5Tclose(tid2);
H5Sclose(sid);
@@ -7252,6 +7430,7 @@ test_copy_dataset_chunked_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
hid_t sid = -1; /* Dataspace ID */
hid_t pid = -1; /* Dataset creation property list ID */
hid_t did = -1, did2 = -1; /* Dataset IDs */
+ hid_t dxpl_id = -1; /* Dataset transfer property list ID */
unsigned int i, j, k; /* Local index variables */
hsize_t dim1d[1]; /* Dataset dimensions */
hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
@@ -7359,7 +7538,12 @@ test_copy_dataset_chunked_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
/* Reclaim vlen buffer */
- if(H5Dvlen_reclaim(tid2, sid, H5P_DEFAULT, buf) < 0) TEST_ERROR
+ if(H5Tdetect_class(tid2, H5T_VLEN) == TRUE) {
+ if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) TEST_ERROR
+ if(H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0) TEST_ERROR
+ if(H5Dvlen_reclaim(tid2, sid, dxpl_id, buf) < 0) TEST_ERROR
+ if(H5Pclose(dxpl_id) < 0) TEST_ERROR
+ } /* end if */
/* close datatype */
if(H5Tclose(tid) < 0) TEST_ERROR
@@ -7377,6 +7561,7 @@ error:
H5Dclose(did2);
H5Dclose(did);
H5Dvlen_reclaim(tid2, sid, H5P_DEFAULT, buf);
+ H5Pclose(dxpl_id);
H5Tclose(tid);
H5Tclose(tid2);
H5Sclose(sid);
@@ -7409,6 +7594,7 @@ test_copy_dataset_compressed_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
hid_t sid = -1; /* Dataspace ID */
hid_t pid = -1; /* Dataset creation property list ID */
hid_t did = -1, did2 = -1; /* Dataset IDs */
+ hid_t dxpl_id = -1; /* Dataset transfer property list ID */
unsigned int i, j, k; /* Local index variables */
hsize_t dim1d[1]; /* Dataset dimensions */
hvl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
@@ -7516,7 +7702,12 @@ test_copy_dataset_compressed_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
/* Reclaim vlen buffer */
- if(H5Dvlen_reclaim(tid2, sid, H5P_DEFAULT, buf) < 0) TEST_ERROR
+ if(H5Tdetect_class(tid2, H5T_VLEN) == TRUE) {
+ if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) TEST_ERROR
+ if(H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0) TEST_ERROR
+ if(H5Dvlen_reclaim(tid2, sid, dxpl_id, buf) < 0) TEST_ERROR
+ if(H5Pclose(dxpl_id) < 0) TEST_ERROR
+ } /* end if */
/* close datatype */
if(H5Tclose(tid) < 0) TEST_ERROR
@@ -7534,6 +7725,7 @@ error:
H5Dclose(did2);
H5Dclose(did);
H5Dvlen_reclaim(tid2, sid, H5P_DEFAULT, buf);
+ H5Pclose(dxpl_id);
H5Tclose(tid);
H5Tclose(tid2);
H5Sclose(sid);
@@ -7576,6 +7768,7 @@ test_copy_dataset_contig_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
hid_t sid = -1; /* Dataspace ID */
hid_t did = -1; /* Dataset ID */
hid_t did2 = -1; /* Dataset ID */
+ hid_t dxpl_id = -1; /* Dataset transfer property list ID */
unsigned int i, j; /* Local index variables */
hsize_t dim1d[1]; /* Dataset dimensions */
cmpd_vl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
@@ -7665,7 +7858,12 @@ test_copy_dataset_contig_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
/* Reclaim vlen buffer */
- if(H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf) < 0) TEST_ERROR
+ if(H5Tdetect_class(tid, H5T_VLEN) == TRUE) {
+ if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) TEST_ERROR
+ if(H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0) TEST_ERROR
+ if(H5Dvlen_reclaim(tid, sid, dxpl_id, buf) < 0) TEST_ERROR
+ if(H5Pclose(dxpl_id) < 0) TEST_ERROR
+ } /* end if */
/* close datatype */
if(H5Tclose(tid2) < 0) TEST_ERROR
@@ -7682,6 +7880,7 @@ error:
H5Dclose(did2);
H5Dclose(did);
H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf);
+ H5Pclose(dxpl_id);
H5Tclose(tid2);
H5Tclose(tid);
H5Sclose(sid);
@@ -7714,6 +7913,7 @@ test_copy_dataset_chunked_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl
hid_t sid = -1; /* Dataspace ID */
hid_t pid = -1; /* Dataset creation property list ID */
hid_t did = -1, did2 = -1; /* Dataset IDs */
+ hid_t dxpl_id = -1; /* Dataset transfer property list ID */
unsigned int i, j; /* Local index variables */
hsize_t dim1d[1]; /* Dataset dimensions */
hsize_t chunk_dim1d[1] = {CHUNK_SIZE_1}; /* Chunk dimensions */
@@ -7811,7 +8011,12 @@ test_copy_dataset_chunked_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl
/* Reclaim vlen buffer */
- if(H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf) < 0) TEST_ERROR
+ if(H5Tdetect_class(tid, H5T_VLEN) == TRUE) {
+ if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) TEST_ERROR
+ if(H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0) TEST_ERROR
+ if(H5Dvlen_reclaim(tid, sid, dxpl_id, buf) < 0) TEST_ERROR
+ if(H5Pclose(dxpl_id) < 0) TEST_ERROR
+ } /* end if */
/* close datatype */
if(H5Tclose(tid2) < 0) TEST_ERROR
@@ -7828,6 +8033,8 @@ error:
H5Dclose(did2);
H5Dclose(did);
H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf);
+ H5Pclose(dxpl_id);
+ H5Pclose(pid);
H5Tclose(tid2);
H5Tclose(tid);
H5Sclose(sid);
@@ -7860,6 +8067,7 @@ test_copy_dataset_compact_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl
hid_t sid = -1; /* Dataspace ID */
hid_t pid = -1; /* Dataset creation property list ID */
hid_t did = -1, did2 = -1; /* Dataset IDs */
+ hid_t dxpl_id = -1; /* Dataset transfer property list ID */
unsigned int i, j; /* Local index variables */
hsize_t dim1d[1]; /* Dataset dimensions */
cmpd_vl_t buf[DIM_SIZE_1]; /* Buffer for writing data */
@@ -7956,7 +8164,12 @@ test_copy_dataset_compact_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl
/* Reclaim vlen buffer */
- if(H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf) < 0) TEST_ERROR
+ if(H5Tdetect_class(tid, H5T_VLEN) == TRUE) {
+ if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) TEST_ERROR
+ if(H5Pset_vlen_mem_manager(dxpl_id, NULL, NULL, NULL, NULL) < 0) TEST_ERROR
+ if(H5Dvlen_reclaim(tid, sid, dxpl_id, buf) < 0) TEST_ERROR
+ if(H5Pclose(dxpl_id) < 0) TEST_ERROR
+ } /* end if */
/* close datatype */
if(H5Tclose(tid2) < 0) TEST_ERROR
@@ -7973,6 +8186,8 @@ error:
H5Dclose(did2);
H5Dclose(did);
H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf);
+ H5Pclose(dxpl_id);
+ H5Pclose(pid);
H5Tclose(tid2);
H5Tclose(tid);
H5Sclose(sid);
@@ -12264,6 +12479,7 @@ main(void)
nerrors += test_copy_dataset_chunked_empty(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
nerrors += test_copy_dataset_chunked_sparse(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
nerrors += test_copy_dataset_compressed(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
+ nerrors += test_copy_dataset_no_edge_filt(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
nerrors += test_copy_dataset_compact(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
nerrors += test_copy_dataset_multi_ohdr_chunks(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
nerrors += test_copy_dataset_attr_named_dtype(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
diff --git a/test/ohdr.c b/test/ohdr.c
index 51e68cc..d885049 100644
--- a/test/ohdr.c
+++ b/test/ohdr.c
@@ -72,75 +72,77 @@ test_cont(char *filename, hid_t fapl)
HDmemset(&oh_locB, 0, sizeof(oh_locB));
/* Create the file to operate on */
- if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR
- if(NULL == (f = (H5F_t *)H5VL_object(file))) FAIL_STACK_ERROR
+ if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
+ FAIL_STACK_ERROR
+ if(NULL == (f = (H5F_t *)H5VL_object(file)))
+ FAIL_STACK_ERROR
if (H5AC_ignore_tags(f) < 0) {
- H5_FAILED();
- H5Eprint2(H5E_DEFAULT, stdout);
- goto error;
- }
+ H5_FAILED();
+ H5Eprint2(H5E_DEFAULT, stdout);
+ goto error;
+ } /* end if */
- if(H5O_create(f, H5P_DATASET_XFER_DEFAULT, (size_t)H5O_MIN_SIZE, (size_t)0, H5P_GROUP_CREATE_DEFAULT, &oh_locA/*out*/) < 0)
+ if(H5O_create(f, H5AC_ind_read_dxpl_id, (size_t)H5O_MIN_SIZE, (size_t)0, H5P_GROUP_CREATE_DEFAULT, &oh_locA/*out*/) < 0)
FAIL_STACK_ERROR
- if(H5O_create(f, H5P_DATASET_XFER_DEFAULT, (size_t)H5O_MIN_SIZE, (size_t)0, H5P_GROUP_CREATE_DEFAULT, &oh_locB/*out*/) < 0)
+ if(H5O_create(f, H5AC_ind_read_dxpl_id, (size_t)H5O_MIN_SIZE, (size_t)0, H5P_GROUP_CREATE_DEFAULT, &oh_locB/*out*/) < 0)
FAIL_STACK_ERROR
time_new = 11111111;
- if(H5O_msg_create(&oh_locA, H5O_NAME_ID, 0, 0, &long_name, H5P_DATASET_XFER_DEFAULT) < 0)
- FAIL_STACK_ERROR
+ if(H5O_msg_create(&oh_locA, H5O_NAME_ID, 0, 0, &long_name, H5AC_ind_read_dxpl_id) < 0)
+ FAIL_STACK_ERROR
- if(H5O_msg_create(&oh_locB, H5O_MTIME_ID, 0, 0, &time_new, H5P_DATASET_XFER_DEFAULT) < 0)
- FAIL_STACK_ERROR
- if(H5O_msg_create(&oh_locB, H5O_MTIME_ID, 0, 0, &time_new, H5P_DATASET_XFER_DEFAULT) < 0)
- FAIL_STACK_ERROR
- if(H5O_msg_create(&oh_locB, H5O_MTIME_ID, 0, 0, &time_new, H5P_DATASET_XFER_DEFAULT) < 0)
- FAIL_STACK_ERROR
+ if(H5O_msg_create(&oh_locB, H5O_MTIME_ID, 0, 0, &time_new, H5AC_ind_read_dxpl_id) < 0)
+ FAIL_STACK_ERROR
+ if(H5O_msg_create(&oh_locB, H5O_MTIME_ID, 0, 0, &time_new, H5AC_ind_read_dxpl_id) < 0)
+ FAIL_STACK_ERROR
+ if(H5O_msg_create(&oh_locB, H5O_MTIME_ID, 0, 0, &time_new, H5AC_ind_read_dxpl_id) < 0)
+ FAIL_STACK_ERROR
- if(H5O_msg_create(&oh_locA, H5O_MTIME_NEW_ID, 0, 0, &time_new, H5P_DATASET_XFER_DEFAULT) < 0)
- FAIL_STACK_ERROR
+ if(H5O_msg_create(&oh_locA, H5O_MTIME_NEW_ID, 0, 0, &time_new, H5AC_ind_read_dxpl_id) < 0)
+ FAIL_STACK_ERROR
- if(H5O_msg_create(&oh_locB, H5O_MTIME_ID, 0, 0, &time_new, H5P_DATASET_XFER_DEFAULT) < 0)
+ if(H5O_msg_create(&oh_locB, H5O_MTIME_ID, 0, 0, &time_new, H5AC_ind_read_dxpl_id) < 0)
FAIL_STACK_ERROR
- if(H5O_msg_create(&oh_locA, H5O_NAME_ID, 0, 0, &short_name, H5P_DATASET_XFER_DEFAULT) < 0)
- FAIL_STACK_ERROR
+ if(H5O_msg_create(&oh_locA, H5O_NAME_ID, 0, 0, &short_name, H5AC_ind_read_dxpl_id) < 0)
+ FAIL_STACK_ERROR
- if(1 != H5O_link(&oh_locA, 1, H5P_DATASET_XFER_DEFAULT))
+ if(1 != H5O_link(&oh_locA, 1, H5AC_ind_read_dxpl_id))
+ FAIL_STACK_ERROR
+ if(1 != H5O_link(&oh_locB, 1, H5AC_ind_read_dxpl_id))
FAIL_STACK_ERROR
- if(1 != H5O_link(&oh_locB, 1, H5P_DATASET_XFER_DEFAULT))
+ if(H5AC_flush(f, H5AC_ind_read_dxpl_id) < 0)
+ FAIL_STACK_ERROR
+ if(H5O_expunge_chunks_test(&oh_locA, H5AC_ind_read_dxpl_id) < 0)
FAIL_STACK_ERROR
- if(H5AC_flush(f, H5P_DATASET_XFER_DEFAULT) < 0)
- FAIL_STACK_ERROR
- if(H5O_expunge_chunks_test(&oh_locA, H5P_DATASET_XFER_DEFAULT) < 0)
- FAIL_STACK_ERROR
- if(H5O_get_hdr_info(&oh_locA, H5P_DATASET_XFER_DEFAULT, &hdr_info) < 0)
- FAIL_STACK_ERROR
+ if(H5O_get_hdr_info(&oh_locA, H5AC_ind_read_dxpl_id, &hdr_info) < 0)
+ FAIL_STACK_ERROR
nchunks = hdr_info.nchunks;
/* remove the 1st H5O_NAME_ID message */
- if(H5O_msg_remove(&oh_locA, H5O_NAME_ID, 0, FALSE, H5P_DATASET_XFER_DEFAULT) < 0)
- FAIL_STACK_ERROR
+ if(H5O_msg_remove(&oh_locA, H5O_NAME_ID, 0, FALSE, H5AC_ind_read_dxpl_id) < 0)
+ FAIL_STACK_ERROR
- if(H5O_get_hdr_info(&oh_locA, H5P_DATASET_XFER_DEFAULT, &hdr_info) < 0)
- FAIL_STACK_ERROR
+ if(H5O_get_hdr_info(&oh_locA, H5AC_ind_read_dxpl_id, &hdr_info) < 0)
+ FAIL_STACK_ERROR
if(hdr_info.nchunks >= nchunks)
- TEST_ERROR
+ TEST_ERROR
if(H5O_close(&oh_locA) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR
if(H5O_close(&oh_locB) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR
if(H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR
PASSED();
- return 0;
+ return SUCCEED;
error:
H5E_BEGIN_TRY {
@@ -149,8 +151,8 @@ error:
H5Fclose(file);
} H5E_END_TRY;
- return -1;
-} /* test_cont() */
+ return FAIL;
+} /* end test_cont() */
/*
* Verify that object headers are held in the cache until they are linked
@@ -192,14 +194,14 @@ test_ohdr_cache(char *filename, hid_t fapl)
FAIL_STACK_ERROR
/* Make a copy of the default DXPL */
- if((my_dxpl = H5Pcopy(H5P_DATASET_XFER_DEFAULT)) < 0)
+ if((my_dxpl = H5Pcopy(H5AC_ind_read_dxpl_id)) < 0)
FAIL_STACK_ERROR
/* Create the file to operate on */
if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, my_fapl)) < 0)
FAIL_STACK_ERROR
if(H5Pclose(my_fapl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR
if(NULL == (f = (H5F_t *)H5VL_object(file)))
FAIL_STACK_ERROR
if(H5AC_ignore_tags(f) < 0)
@@ -279,22 +281,303 @@ test_ohdr_cache(char *filename, hid_t fapl)
FAIL_STACK_ERROR
if(H5Pclose(my_dxpl) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR
if(H5Fclose(file) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR
PASSED();
- return 0;
+ return SUCCEED;
error:
H5E_BEGIN_TRY {
H5Fclose(file);
} H5E_END_TRY;
- return -1;
+ return FAIL;
} /* test_ohdr_cache() */
+/*
+ * To test objects with unknown messages in a file with:
+ * a) H5O_BOGUS_VALID_ID:
+ * --the bogus_id is within the range of H5O_msg_class_g[]
+ * b) H5O_BOGUS_INVALID_ID:
+ * --the bogus_id is outside the range of H5O_msg_class_g[]
+ *
+ * The test file is FILE_BOGUS: "tbogus.h5" generated with gen_bogus.c
+ * --objects that have unknown header messages with H5O_BOGUS_VALID_ID in "/"
+ * --objects that have unknown header messages with H5O_BOGUS_INVALID_ID in "/group"
+ *
+ * The test also uses the test file FILENAME[0] (ohdr.h5): the parameter "filename"
+ */
+static herr_t
+test_unknown(unsigned bogus_id, char *filename, hid_t fapl)
+{
+ hid_t fid = -1; /* file ID */
+ hid_t gid = -1; /* group ID */
+ hid_t did = -1; /* Dataset ID */
+ hid_t sid = -1; /* Dataspace ID */
+ hid_t aid = -1; /* Attribute ID */
+ hid_t loc = -1; /* location: file or group ID */
+ hid_t fid_bogus = -1; /* bogus file ID */
+ hid_t gid_bogus = -1; /* bogus group ID */
+ hid_t loc_bogus = -1; /* location: bogus file or group ID */
+ const char *testfile = H5_get_srcdir_filename(FILE_BOGUS);
+
+ TESTING("object with unknown header message and no flags set");
+
+ /* Open filename */
+ if((fid = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0)
+ FAIL_STACK_ERROR
+
+ /* Open FILE_BOGUS */
+ if((fid_bogus = H5Fopen(testfile, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
+ FAIL_STACK_ERROR
+
+ /* Set up location ID depending on bogus_id */
+ if(bogus_id == H5O_BOGUS_INVALID_ID) {
+ /* Open "group" in FILE_BOGUS */
+ if((gid_bogus = H5Gopen2(fid_bogus, "group", H5P_DEFAULT)) < 0)
+ FAIL_STACK_ERROR
+ loc_bogus = gid_bogus;
+
+ /* Create "group" in filename */
+ if((gid = H5Gcreate2(fid, "group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ FAIL_STACK_ERROR
+ loc = gid;
+
+ } else { /* H5O_BOGUS_VALID_ID */
+ loc_bogus = fid_bogus;
+ loc = fid;
+ } /* end else */
+
+ /* Open the dataset with the unknown header message, but no extra flags */
+ if((did = H5Dopen2(loc_bogus, "Dataset1", H5P_DEFAULT)) < 0)
+ FAIL_STACK_ERROR
+ if(H5Dclose(did) < 0)
+ FAIL_STACK_ERROR
+
+ PASSED();
+
+ TESTING("object in r/o file with unknown header message & 'fail if unknown and open for write' flag set");
+
+ /* Open the dataset with the unknown header message, and "fail if unknown and open for write" flag */
+ if((did = H5Dopen2(loc_bogus, "Dataset2", H5P_DEFAULT)) < 0)
+ FAIL_STACK_ERROR
+ if(H5Dclose(did) < 0)
+ FAIL_STACK_ERROR
+
+ PASSED();
+
+ TESTING("object in r/o file with unknown header message & 'fail if unknown always' flag set");
+
+ /* Attempt to open the dataset with the unknown header message, and "fail if unknown always" flag */
+ H5E_BEGIN_TRY {
+ did = H5Dopen2(loc_bogus, "Dataset3", H5P_DEFAULT);
+ } H5E_END_TRY;
+ if(did >= 0) {
+ H5Dclose(did);
+ TEST_ERROR
+ } /* end if */
+
+ PASSED();
+
+ TESTING("object with unknown header message & 'mark if unknown' flag set");
+
+ /* Copy object with "mark if unknown" flag on message into file (FILENAME[0]) that can be modified */
+ if(H5Ocopy(loc_bogus, "Dataset4", loc, "Dataset4", H5P_DEFAULT, H5P_DEFAULT) < 0)
+ FAIL_STACK_ERROR
+
+ /* Closing: filename */
+ if(bogus_id == H5O_BOGUS_INVALID_ID)
+ if(H5Gclose(gid) < 0)
+ FAIL_STACK_ERROR
+ if(H5Fclose(fid) < 0)
+ FAIL_STACK_ERROR
+
+ /* Re-open filename, with read-only permissions */
+ if((fid = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0)
+ FAIL_STACK_ERROR
+
+ /* Set up location ID depending on bogus_id */
+ if(bogus_id == H5O_BOGUS_INVALID_ID) {
+ /* Open "group" in filename */
+ if((gid = H5Gopen2(fid, "group", H5P_DEFAULT)) < 0)
+ FAIL_STACK_ERROR
+ loc = gid;
+ } else
+ loc = fid;
+
+ /* Open the dataset with the "mark if unknown" message */
+ if((did = H5Dopen2(loc, "Dataset4", H5P_DEFAULT)) < 0)
+ FAIL_STACK_ERROR
+
+ /* Check that the "unknown" message was _NOT_ marked */
+ if(H5O_check_msg_marked_test(did, FALSE) < 0)
+ FAIL_STACK_ERROR
+
+ /* Close the dataset */
+ if(H5Dclose(did) < 0)
+ FAIL_STACK_ERROR
+
+ /* Close "group" in filename depending on bogus_id */
+ if(bogus_id == H5O_BOGUS_INVALID_ID)
+ if(H5Gclose(gid) < 0)
+ FAIL_STACK_ERROR
+
+ /* Close filename (to flush change to object header) */
+ if(H5Fclose(fid) < 0)
+ FAIL_STACK_ERROR
+
+ /* Re-open filename */
+ if((fid = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0)
+ FAIL_STACK_ERROR
+
+ /* Set up location ID depending on bogus_id */
+ if(bogus_id == H5O_BOGUS_INVALID_ID) {
+ /* Open "group" in filename */
+ if((gid = H5Gopen2(fid, "group", H5P_DEFAULT)) < 0)
+ FAIL_STACK_ERROR
+ loc = gid;
+ } else
+ loc = fid;
+
+ /* Open the dataset with the "mark if unknown" message */
+ if((did = H5Dopen2(loc, "Dataset4", H5P_DEFAULT)) < 0)
+ FAIL_STACK_ERROR
+
+ /* Create data space */
+ if((sid = H5Screate(H5S_SCALAR)) < 0)
+ FAIL_STACK_ERROR
+
+ /* Create an attribute, to get the object header into write access */
+ if((aid = H5Acreate2(did, "Attr", H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ FAIL_STACK_ERROR
+
+ /* Close dataspace */
+ if(H5Sclose(sid) < 0)
+ FAIL_STACK_ERROR
+
+ /* Close attribute */
+ if(H5Aclose(aid) < 0)
+ FAIL_STACK_ERROR
+
+ /* Close the dataset */
+ if(H5Dclose(did) < 0)
+ FAIL_STACK_ERROR
+
+ /* Close "group" in filename depending on bogus_id */
+ if(bogus_id == H5O_BOGUS_INVALID_ID)
+ if(H5Gclose(gid) < 0)
+ FAIL_STACK_ERROR
+
+ /* Close filename (to flush change to object header) */
+ if(H5Fclose(fid) < 0)
+ FAIL_STACK_ERROR
+
+ /* Re-open filename */
+ if((fid = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0)
+ FAIL_STACK_ERROR
+
+ /* Set up location ID depending on bogus_id */
+ if(bogus_id == H5O_BOGUS_INVALID_ID) {
+ /* Open "group" in filename */
+ if((gid = H5Gopen2(fid, "group", H5P_DEFAULT)) < 0)
+ FAIL_STACK_ERROR
+ loc = gid;
+ } else
+ loc = fid;
+
+ /* Re-open the dataset with the "mark if unknown" message */
+ if((did = H5Dopen2(loc, "Dataset4", H5P_DEFAULT)) < 0)
+ FAIL_STACK_ERROR
+
+ /* Check that the "unknown" message was marked */
+ if(H5O_check_msg_marked_test(did, TRUE) < 0)
+ FAIL_STACK_ERROR
+
+ /* Close the dataset */
+ if(H5Dclose(did) < 0)
+ FAIL_STACK_ERROR
+
+ /* Closing: filename */
+ if(bogus_id == H5O_BOGUS_INVALID_ID)
+ if(H5Gclose(gid) < 0)
+ FAIL_STACK_ERROR
+ if(H5Fclose(fid) < 0)
+ FAIL_STACK_ERROR
+
+ PASSED();
+
+ /* Closing: FILE_BOGUS */
+ if(bogus_id == H5O_BOGUS_INVALID_ID)
+ if(H5Gclose(gid_bogus) < 0)
+ FAIL_STACK_ERROR
+ if(H5Fclose(fid_bogus) < 0)
+ FAIL_STACK_ERROR
+
+ TESTING("object in r/w file with unknown header message & 'fail if unknown and open for write' flag set");
+
+ /* Open FILE_BOGUS with RW intent this time */
+ if((fid_bogus = H5Fopen(testfile, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ FAIL_STACK_ERROR
+
+ /* Set up location ID */
+ if(bogus_id == H5O_BOGUS_INVALID_ID) {
+ /* Open "group" in FILE_BOGUS */
+ if((gid_bogus = H5Gopen2(fid_bogus, "group", H5P_DEFAULT)) < 0)
+ FAIL_STACK_ERROR
+ loc_bogus = gid_bogus;
+ } else
+ loc_bogus = fid_bogus;
+
+ /* Attempt to open the dataset with the unknown header message, and "fail if unknown and open for write" flag */
+ H5E_BEGIN_TRY {
+ did = H5Dopen2(loc_bogus, "Dataset2", H5P_DEFAULT);
+ } H5E_END_TRY;
+ if(did >= 0) {
+ H5Dclose(did);
+ TEST_ERROR
+ } /* end if */
+
+ PASSED();
+
+ TESTING("object in r/w file with unknown header message & 'fail if unknown always' flag set");
+
+ /* Attempt to open the dataset with the unknown header message, and "fail if unknown always" flag */
+ H5E_BEGIN_TRY {
+ did = H5Dopen2(loc_bogus, "Dataset3", H5P_DEFAULT);
+ } H5E_END_TRY;
+ if(did >= 0) {
+ H5Dclose(did);
+ TEST_ERROR
+ } /* end if */
+
+ /* Closing: FILE_BOGUS */
+ if(bogus_id == H5O_BOGUS_INVALID_ID)
+ if(H5Gclose(gid_bogus) < 0)
+ FAIL_STACK_ERROR
+ if(H5Fclose(fid_bogus) < 0)
+ FAIL_STACK_ERROR
+
+ PASSED();
+
+ return SUCCEED;
+
+error:
+ H5E_BEGIN_TRY {
+ H5Fclose(fid);
+ H5Gclose(gid);
+ H5Fclose(fid_bogus);
+ H5Gclose(gid_bogus);
+ H5Dclose(did);
+ H5Sclose(sid);
+ H5Aclose(aid);
+ } H5E_END_TRY;
+
+ return FAIL;
+} /* test_unknown() */
+
/*-------------------------------------------------------------------------
* Function: main
@@ -341,21 +624,20 @@ main(void)
if(H5Pset_libver_bounds(fapl, (b ? H5F_LIBVER_LATEST : H5F_LIBVER_EARLIEST), H5F_LIBVER_LATEST) < 0)
FAIL_STACK_ERROR
- /* test on object continuation block */
- if(test_cont(filename, fapl) < 0)
- FAIL_STACK_ERROR
+ /* test on object continuation block */
+ if(test_cont(filename, fapl) < 0)
+ TEST_ERROR
/* Create the file to operate on */
if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR
+ FAIL_STACK_ERROR
if(NULL == (f = (H5F_t *)H5VL_object(file)))
FAIL_STACK_ERROR
- if (H5AC_ignore_tags(f) < 0) {
- H5_FAILED();
- H5Eprint2(H5E_DEFAULT, stdout);
- goto error;
- }
-
+ if(H5AC_ignore_tags(f) < 0) {
+ H5_FAILED();
+ H5Eprint2(H5E_DEFAULT, stdout);
+ goto error;
+ } /* end if */
/*
* Test object header creation
@@ -363,47 +645,45 @@ main(void)
*/
TESTING("object header creation");
HDmemset(&oh_loc, 0, sizeof(oh_loc));
- if(H5O_create(f, H5P_DATASET_XFER_DEFAULT, (size_t)64, (size_t)0, H5P_GROUP_CREATE_DEFAULT, &oh_loc/*out*/) < 0)
+ if(H5O_create(f, H5AC_ind_read_dxpl_id, (size_t)64, (size_t)0, H5P_GROUP_CREATE_DEFAULT, &oh_loc/*out*/) < 0)
FAIL_STACK_ERROR
PASSED();
-
/* create a new message */
TESTING("message creation");
time_new = 11111111;
- if(H5O_msg_create(&oh_loc, H5O_MTIME_NEW_ID, 0, 0, &time_new, H5P_DATASET_XFER_DEFAULT) < 0)
+ if(H5O_msg_create(&oh_loc, H5O_MTIME_NEW_ID, 0, 0, &time_new, H5AC_ind_read_dxpl_id) < 0)
FAIL_STACK_ERROR
- if(1 != H5O_link(&oh_loc, 1, H5P_DATASET_XFER_DEFAULT))
+ if(1 != H5O_link(&oh_loc, 1, H5AC_ind_read_dxpl_id))
FAIL_STACK_ERROR
- if(H5AC_flush(f, H5P_DATASET_XFER_DEFAULT) < 0)
+ if(H5AC_flush(f, H5AC_ind_read_dxpl_id) < 0)
FAIL_STACK_ERROR
- if(H5AC_expunge_entry(f, H5P_DATASET_XFER_DEFAULT, H5AC_OHDR, oh_loc.addr, H5AC__NO_FLAGS_SET) < 0)
+ if(H5AC_expunge_entry(f, H5AC_ind_read_dxpl_id, H5AC_OHDR, oh_loc.addr, H5AC__NO_FLAGS_SET) < 0)
FAIL_STACK_ERROR
- if(NULL == H5O_msg_read(&oh_loc, H5O_MTIME_NEW_ID, &ro, H5P_DATASET_XFER_DEFAULT))
+ if(NULL == H5O_msg_read(&oh_loc, H5O_MTIME_NEW_ID, &ro, H5AC_ind_read_dxpl_id))
FAIL_STACK_ERROR
if(ro != time_new)
TEST_ERROR
PASSED();
-
/*
* Test modification of an existing message.
*/
TESTING("message modification");
time_new = 33333333;
- if(H5O_msg_write(&oh_loc, H5O_MTIME_NEW_ID, 0, 0, &time_new, H5P_DATASET_XFER_DEFAULT) < 0)
+ if(H5O_msg_write(&oh_loc, H5O_MTIME_NEW_ID, 0, 0, &time_new, H5AC_ind_read_dxpl_id) < 0)
FAIL_STACK_ERROR
- if(H5AC_flush(f, H5P_DATASET_XFER_DEFAULT) < 0)
+ if(H5AC_flush(f, H5AC_ind_read_dxpl_id) < 0)
FAIL_STACK_ERROR
- if(H5AC_expunge_entry(f, H5P_DATASET_XFER_DEFAULT, H5AC_OHDR, oh_loc.addr, H5AC__NO_FLAGS_SET) < 0)
+ if(H5AC_expunge_entry(f, H5AC_ind_read_dxpl_id, H5AC_OHDR, oh_loc.addr, H5AC__NO_FLAGS_SET) < 0)
FAIL_STACK_ERROR
- if(NULL == H5O_msg_read(&oh_loc, H5O_MTIME_NEW_ID, &ro, H5P_DATASET_XFER_DEFAULT))
+ if(NULL == H5O_msg_read(&oh_loc, H5O_MTIME_NEW_ID, &ro, H5AC_ind_read_dxpl_id))
FAIL_STACK_ERROR
if(ro != time_new)
TEST_ERROR
/* Make certain that chunk #0 in the object header can be encoded with a 1-byte size */
- if(H5O_get_hdr_info(&oh_loc, H5P_DATASET_XFER_DEFAULT, &hdr_info) < 0)
+ if(H5O_get_hdr_info(&oh_loc, H5AC_ind_read_dxpl_id, &hdr_info) < 0)
FAIL_STACK_ERROR
if(hdr_info.space.total >=256)
TEST_ERROR
@@ -421,16 +701,16 @@ main(void)
TESTING("object header overflow in memory");
for(i = 0; i < 40; i++) {
time_new = (i + 1) * 1000 + 1000000;
- if(H5O_msg_create(&oh_loc, H5O_MTIME_ID, 0, 0, &time_new, H5P_DATASET_XFER_DEFAULT) < 0)
+ if(H5O_msg_create(&oh_loc, H5O_MTIME_ID, 0, 0, &time_new, H5AC_ind_read_dxpl_id) < 0)
FAIL_STACK_ERROR
} /* end for */
- if(H5AC_flush(f, H5P_DATASET_XFER_DEFAULT) < 0)
+ if(H5AC_flush(f, H5AC_ind_read_dxpl_id) < 0)
FAIL_STACK_ERROR
- if(H5AC_expunge_entry(f, H5P_DATASET_XFER_DEFAULT, H5AC_OHDR, oh_loc.addr, H5AC__NO_FLAGS_SET) < 0)
+ if(H5AC_expunge_entry(f, H5AC_ind_read_dxpl_id, H5AC_OHDR, oh_loc.addr, H5AC__NO_FLAGS_SET) < 0)
FAIL_STACK_ERROR
/* Make certain that chunk #0 in the object header will be encoded with a 2-byte size */
- if(H5O_get_hdr_info(&oh_loc, H5P_DATASET_XFER_DEFAULT, &hdr_info) < 0)
+ if(H5O_get_hdr_info(&oh_loc, H5AC_ind_read_dxpl_id, &hdr_info) < 0)
FAIL_STACK_ERROR
if(hdr_info.space.total < 256)
TEST_ERROR
@@ -465,11 +745,11 @@ main(void)
TESTING("object header overflow on disk");
for(i = 0; i < 10; i++) {
time_new = (i + 1) * 1000 + 10;
- if(H5O_msg_create(&oh_loc, H5O_MTIME_NEW_ID, 0, 0, &time_new, H5P_DATASET_XFER_DEFAULT) < 0)
+ if(H5O_msg_create(&oh_loc, H5O_MTIME_NEW_ID, 0, 0, &time_new, H5AC_ind_read_dxpl_id) < 0)
FAIL_STACK_ERROR
- if(H5AC_flush(f, H5P_DATASET_XFER_DEFAULT) < 0)
+ if(H5AC_flush(f, H5AC_ind_read_dxpl_id) < 0)
FAIL_STACK_ERROR
- if(H5AC_expunge_entry(f, H5P_DATASET_XFER_DEFAULT, H5AC_OHDR, oh_loc.addr, H5AC__NO_FLAGS_SET) < 0)
+ if(H5AC_expunge_entry(f, H5AC_ind_read_dxpl_id, H5AC_OHDR, oh_loc.addr, H5AC__NO_FLAGS_SET) < 0)
FAIL_STACK_ERROR
} /* end for */
PASSED();
@@ -478,13 +758,13 @@ main(void)
* Delete all time messages.
*/
TESTING("message deletion");
- if(H5O_msg_remove(&oh_loc, H5O_MTIME_NEW_ID, H5O_ALL, TRUE, H5P_DATASET_XFER_DEFAULT) < 0)
+ if(H5O_msg_remove(&oh_loc, H5O_MTIME_NEW_ID, H5O_ALL, TRUE, H5AC_ind_read_dxpl_id) < 0)
FAIL_STACK_ERROR
- if(H5O_msg_remove(&oh_loc, H5O_MTIME_ID, H5O_ALL, TRUE, H5P_DATASET_XFER_DEFAULT) < 0)
+ if(H5O_msg_remove(&oh_loc, H5O_MTIME_ID, H5O_ALL, TRUE, H5AC_ind_read_dxpl_id) < 0)
FAIL_STACK_ERROR
- if(H5O_msg_read(&oh_loc, H5O_MTIME_NEW_ID, &ro, H5P_DATASET_XFER_DEFAULT))
+ if(H5O_msg_read(&oh_loc, H5O_MTIME_NEW_ID, &ro, H5AC_ind_read_dxpl_id))
FAIL_STACK_ERROR
- if(H5O_msg_read(&oh_loc, H5O_MTIME_ID, &ro, H5P_DATASET_XFER_DEFAULT))
+ if(H5O_msg_read(&oh_loc, H5O_MTIME_ID, &ro, H5AC_ind_read_dxpl_id))
FAIL_STACK_ERROR
PASSED();
@@ -495,23 +775,23 @@ main(void)
*/
TESTING("constant message handling");
time_new = 22222222;
- if(H5O_msg_create(&oh_loc, H5O_MTIME_NEW_ID, H5O_MSG_FLAG_CONSTANT, 0, &time_new, H5P_DATASET_XFER_DEFAULT) < 0)
+ if(H5O_msg_create(&oh_loc, H5O_MTIME_NEW_ID, H5O_MSG_FLAG_CONSTANT, 0, &time_new, H5AC_ind_read_dxpl_id) < 0)
FAIL_STACK_ERROR
- if(H5AC_flush(f, H5P_DATASET_XFER_DEFAULT) < 0)
+ if(H5AC_flush(f, H5AC_ind_read_dxpl_id) < 0)
FAIL_STACK_ERROR
- if(H5AC_expunge_entry(f, H5P_DATASET_XFER_DEFAULT, H5AC_OHDR, oh_loc.addr, H5AC__NO_FLAGS_SET) < 0)
+ if(H5AC_expunge_entry(f, H5AC_ind_read_dxpl_id, H5AC_OHDR, oh_loc.addr, H5AC__NO_FLAGS_SET) < 0)
FAIL_STACK_ERROR
- if(NULL == H5O_msg_read(&oh_loc, H5O_MTIME_NEW_ID, &ro, H5P_DATASET_XFER_DEFAULT))
+ if(NULL == H5O_msg_read(&oh_loc, H5O_MTIME_NEW_ID, &ro, H5AC_ind_read_dxpl_id))
FAIL_STACK_ERROR
if(ro != time_new)
TEST_ERROR
time_new = 33333333;
H5E_BEGIN_TRY {
- ret = H5O_msg_write(&oh_loc, H5O_MTIME_NEW_ID, 0, 0, &time_new, H5P_DATASET_XFER_DEFAULT);
+ ret = H5O_msg_write(&oh_loc, H5O_MTIME_NEW_ID, 0, 0, &time_new, H5AC_ind_read_dxpl_id);
} H5E_END_TRY;
if(ret >= 0)
TEST_ERROR
- if(H5O_msg_remove(&oh_loc, H5O_MTIME_NEW_ID, H5O_ALL, TRUE, H5P_DATASET_XFER_DEFAULT) < 0)
+ if(H5O_msg_remove(&oh_loc, H5O_MTIME_NEW_ID, H5O_ALL, TRUE, H5AC_ind_read_dxpl_id) < 0)
FAIL_STACK_ERROR
PASSED();
@@ -527,49 +807,49 @@ main(void)
*/
TESTING("locking messages");
HDmemset(&oh_loc, 0, sizeof(oh_loc));
- if(H5O_create(f, H5P_DATASET_XFER_DEFAULT, (size_t)64, (size_t)0, H5P_GROUP_CREATE_DEFAULT, &oh_loc/*out*/) < 0)
+ if(H5O_create(f, H5AC_ind_read_dxpl_id, (size_t)64, (size_t)0, H5P_GROUP_CREATE_DEFAULT, &oh_loc/*out*/) < 0)
FAIL_STACK_ERROR
- if(1 != H5O_link(&oh_loc, 1, H5P_DATASET_XFER_DEFAULT))
+ if(1 != H5O_link(&oh_loc, 1, H5AC_ind_read_dxpl_id))
FAIL_STACK_ERROR
/* Create second object header, to guarantee that first object header uses multiple chunks */
HDmemset(&oh_loc2, 0, sizeof(oh_loc2));
- if(H5O_create(f, H5P_DATASET_XFER_DEFAULT, (size_t)64, (size_t)0, H5P_GROUP_CREATE_DEFAULT, &oh_loc2/*out*/) < 0)
+ if(H5O_create(f, H5AC_ind_read_dxpl_id, (size_t)64, (size_t)0, H5P_GROUP_CREATE_DEFAULT, &oh_loc2/*out*/) < 0)
FAIL_STACK_ERROR
- if(1 != H5O_link(&oh_loc2, 1, H5P_DATASET_XFER_DEFAULT))
+ if(1 != H5O_link(&oh_loc2, 1, H5AC_ind_read_dxpl_id))
FAIL_STACK_ERROR
/* Fill object header with messages, creating multiple chunks */
for(i = 0; i < 10; i++) {
time_new = (i + 1) * 1000 + 10;
- if(H5O_msg_create(&oh_loc, H5O_MTIME_NEW_ID, 0, 0, &time_new, H5P_DATASET_XFER_DEFAULT) < 0)
+ if(H5O_msg_create(&oh_loc, H5O_MTIME_NEW_ID, 0, 0, &time_new, H5AC_ind_read_dxpl_id) < 0)
FAIL_STACK_ERROR
} /* end for */
/* Get # of object header chunks */
- if(H5O_get_hdr_info(&oh_loc, H5P_DATASET_XFER_DEFAULT, &hdr_info) < 0)
+ if(H5O_get_hdr_info(&oh_loc, H5AC_ind_read_dxpl_id, &hdr_info) < 0)
FAIL_STACK_ERROR
if(hdr_info.nchunks != 2)
TEST_ERROR
/* Add message to lock to object header */
time_new = 11111111;
- if(H5O_msg_create(&oh_loc, H5O_MTIME_ID, 0, 0, &time_new, H5P_DATASET_XFER_DEFAULT) < 0)
+ if(H5O_msg_create(&oh_loc, H5O_MTIME_ID, 0, 0, &time_new, H5AC_ind_read_dxpl_id) < 0)
FAIL_STACK_ERROR
/* Verify chunk index for message */
- if((chunkno = H5O_msg_get_chunkno(&oh_loc, H5O_MTIME_ID, H5P_DATASET_XFER_DEFAULT)) < 0)
+ if((chunkno = H5O_msg_get_chunkno(&oh_loc, H5O_MTIME_ID, H5AC_ind_read_dxpl_id)) < 0)
FAIL_STACK_ERROR
if(chunkno != 1)
TEST_ERROR
/* Lock the message into the chunk */
- if(H5O_msg_lock(&oh_loc, H5O_MTIME_ID, H5P_DATASET_XFER_DEFAULT) < 0)
+ if(H5O_msg_lock(&oh_loc, H5O_MTIME_ID, H5AC_ind_read_dxpl_id) < 0)
FAIL_STACK_ERROR
/* Attempt to lock the message twice */
H5E_BEGIN_TRY {
- ret = H5O_msg_lock(&oh_loc, H5O_MTIME_ID, H5P_DATASET_XFER_DEFAULT);
+ ret = H5O_msg_lock(&oh_loc, H5O_MTIME_ID, H5AC_ind_read_dxpl_id);
} H5E_END_TRY;
if(ret >= 0)
TEST_ERROR
@@ -577,22 +857,22 @@ main(void)
/* Delete all the other messages, which would move the message into
* chunk #0, if it wasn't locked
*/
- if(H5O_msg_remove(&oh_loc, H5O_MTIME_NEW_ID, H5O_ALL, TRUE, H5P_DATASET_XFER_DEFAULT) < 0)
+ if(H5O_msg_remove(&oh_loc, H5O_MTIME_NEW_ID, H5O_ALL, TRUE, H5AC_ind_read_dxpl_id) < 0)
FAIL_STACK_ERROR
/* Verify chunk index for message */
- if((chunkno = H5O_msg_get_chunkno(&oh_loc, H5O_MTIME_ID, H5P_DATASET_XFER_DEFAULT)) < 0)
+ if((chunkno = H5O_msg_get_chunkno(&oh_loc, H5O_MTIME_ID, H5AC_ind_read_dxpl_id)) < 0)
FAIL_STACK_ERROR
if(chunkno != 1)
TEST_ERROR
/* Unlock the message */
- if(H5O_msg_unlock(&oh_loc, H5O_MTIME_ID, H5P_DATASET_XFER_DEFAULT) < 0)
+ if(H5O_msg_unlock(&oh_loc, H5O_MTIME_ID, H5AC_ind_read_dxpl_id) < 0)
FAIL_STACK_ERROR
/* Attempt to unlock the message twice */
H5E_BEGIN_TRY {
- ret = H5O_msg_unlock(&oh_loc, H5O_MTIME_ID, H5P_DATASET_XFER_DEFAULT);
+ ret = H5O_msg_unlock(&oh_loc, H5O_MTIME_ID, H5AC_ind_read_dxpl_id);
} H5E_END_TRY;
if(ret >= 0)
TEST_ERROR
@@ -605,55 +885,55 @@ main(void)
/* Open first object header */
HDmemset(&oh_loc, 0, sizeof(oh_loc));
- if(H5O_create(f, H5P_DATASET_XFER_DEFAULT, (size_t)64, (size_t)0, H5P_GROUP_CREATE_DEFAULT, &oh_loc/*out*/) < 0)
+ if(H5O_create(f, H5AC_ind_read_dxpl_id, (size_t)64, (size_t)0, H5P_GROUP_CREATE_DEFAULT, &oh_loc/*out*/) < 0)
FAIL_STACK_ERROR
- if(1 != H5O_link(&oh_loc, 1, H5P_DATASET_XFER_DEFAULT))
+ if(1 != H5O_link(&oh_loc, 1, H5AC_ind_read_dxpl_id))
FAIL_STACK_ERROR
/* Create second object header, to guarantee that first object header uses multiple chunks */
HDmemset(&oh_loc2, 0, sizeof(oh_loc2));
- if(H5O_create(f, H5P_DATASET_XFER_DEFAULT, (size_t)64, (size_t)0, H5P_GROUP_CREATE_DEFAULT, &oh_loc2/*out*/) < 0)
+ if(H5O_create(f, H5AC_ind_read_dxpl_id, (size_t)64, (size_t)0, H5P_GROUP_CREATE_DEFAULT, &oh_loc2/*out*/) < 0)
FAIL_STACK_ERROR
- if(1 != H5O_link(&oh_loc2, 1, H5P_DATASET_XFER_DEFAULT))
+ if(1 != H5O_link(&oh_loc2, 1, H5AC_ind_read_dxpl_id))
FAIL_STACK_ERROR
/* Add message to move to object header */
time_new = 11111111;
- if(H5O_msg_create(&oh_loc, H5O_MTIME_ID, 0, 0, &time_new, H5P_DATASET_XFER_DEFAULT) < 0)
+ if(H5O_msg_create(&oh_loc, H5O_MTIME_ID, 0, 0, &time_new, H5AC_ind_read_dxpl_id) < 0)
FAIL_STACK_ERROR
/* Verify chunk index for message */
- if((chunkno = H5O_msg_get_chunkno(&oh_loc, H5O_MTIME_ID, H5P_DATASET_XFER_DEFAULT)) < 0)
+ if((chunkno = H5O_msg_get_chunkno(&oh_loc, H5O_MTIME_ID, H5AC_ind_read_dxpl_id)) < 0)
FAIL_STACK_ERROR
if(chunkno != 0)
TEST_ERROR
/* Lock the message into the chunk */
- if(H5O_msg_lock(&oh_loc, H5O_MTIME_ID, H5P_DATASET_XFER_DEFAULT) < 0)
+ if(H5O_msg_lock(&oh_loc, H5O_MTIME_ID, H5AC_ind_read_dxpl_id) < 0)
FAIL_STACK_ERROR
/* Fill object header with messages, creating multiple chunks */
/* (would normally move locked message to new chunk) */
for(i = 0; i < 10; i++) {
time_new = (i + 1) * 1000 + 10;
- if(H5O_msg_create(&oh_loc, H5O_MTIME_NEW_ID, 0, 0, &time_new, H5P_DATASET_XFER_DEFAULT) < 0)
+ if(H5O_msg_create(&oh_loc, H5O_MTIME_NEW_ID, 0, 0, &time_new, H5AC_ind_read_dxpl_id) < 0)
FAIL_STACK_ERROR
} /* end for */
/* Get # of object header chunks */
- if(H5O_get_hdr_info(&oh_loc, H5P_DATASET_XFER_DEFAULT, &hdr_info) < 0)
+ if(H5O_get_hdr_info(&oh_loc, H5AC_ind_read_dxpl_id, &hdr_info) < 0)
FAIL_STACK_ERROR
if(hdr_info.nchunks != 2)
TEST_ERROR
/* Verify chunk index for message */
- if((chunkno = H5O_msg_get_chunkno(&oh_loc, H5O_MTIME_ID, H5P_DATASET_XFER_DEFAULT)) < 0)
+ if((chunkno = H5O_msg_get_chunkno(&oh_loc, H5O_MTIME_ID, H5AC_ind_read_dxpl_id)) < 0)
FAIL_STACK_ERROR
if(chunkno != 0)
TEST_ERROR
/* Unlock the message */
- if(H5O_msg_unlock(&oh_loc, H5O_MTIME_ID, H5P_DATASET_XFER_DEFAULT) < 0)
+ if(H5O_msg_unlock(&oh_loc, H5O_MTIME_ID, H5AC_ind_read_dxpl_id) < 0)
FAIL_STACK_ERROR
/* Close object headers */
@@ -664,186 +944,29 @@ main(void)
PASSED();
+ /* Close the file we created */
+ if(H5Fclose(file) < 0)
+ TEST_ERROR
/* Test reading datasets with undefined object header messages
* and the various "fail/mark if unknown" object header message flags
*/
- HDputs("Accessing objects with unknown header messages:");
- {
- hid_t file2; /* File ID for 'bogus' object file */
- hid_t sid; /* Dataspace ID */
- hid_t aid; /* Attribute ID */
- const char *testfile = H5_get_srcdir_filename(FILE_BOGUS);
-
- TESTING("object with unknown header message and no flags set");
-
- /* Open the file with objects that have unknown header messages (generated with gen_bogus.c) */
- if((file2 = H5Fopen(testfile, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
- TEST_ERROR
-
- /* Open the dataset with the unknown header message, but no extra flags */
- if((dset = H5Dopen2(file2, "/Dataset1", H5P_DEFAULT)) < 0)
- TEST_ERROR
- if(H5Dclose(dset) < 0)
- TEST_ERROR
-
- PASSED();
-
- TESTING("object in r/o file with unknown header message & 'fail if unknown and open for write' flag set");
-
- /* Open the dataset with the unknown header message, and "fail if unknown and open for write" flag */
- if((dset = H5Dopen2(file2, "/Dataset2", H5P_DEFAULT)) < 0)
- TEST_ERROR
- if(H5Dclose(dset) < 0)
- TEST_ERROR
-
- PASSED();
-
- TESTING("object in r/o file with unknown header message & 'fail if unknown always' flag set");
-
- /* Attempt to open the dataset with the unknown header message, and "fail if unknown always" flag */
- H5E_BEGIN_TRY {
- dset = H5Dopen2(file2, "/Dataset3", H5P_DEFAULT);
- } H5E_END_TRY;
- if(dset >= 0) {
- H5Dclose(dset);
- TEST_ERROR
- } /* end if */
-
- PASSED();
-
- TESTING("object with unknown header message & 'mark if unknown' flag set");
-
- /* Copy object with "mark if unknown" flag on message into file that can be modified */
- if(H5Ocopy(file2, "/Dataset4", file, "/Dataset4", H5P_DEFAULT, H5P_DEFAULT) < 0)
- TEST_ERROR
-
- /* Close the file we created (to flush changes to file) */
- if(H5Fclose(file) < 0)
- TEST_ERROR
-
- /* Re-open the file created, with read-only permissions */
- if((file = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0)
- TEST_ERROR
-
- /* Open the dataset with the "mark if unknown" message */
- if((dset = H5Dopen2(file, "/Dataset4", H5P_DEFAULT)) < 0)
- TEST_ERROR
-
- /* Check that the "unknown" message was _NOT_ marked */
- if(H5O_check_msg_marked_test(dset, FALSE) < 0)
- FAIL_STACK_ERROR
-
- /* Close the dataset */
- if(H5Dclose(dset) < 0)
- TEST_ERROR
-
- /* Close the file we created (to flush change to object header) */
- if(H5Fclose(file) < 0)
- TEST_ERROR
-
- /* Re-open the file created */
- if((file = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0)
- TEST_ERROR
-
- /* Open the dataset with the "mark if unknown" message */
- if((dset = H5Dopen2(file, "/Dataset4", H5P_DEFAULT)) < 0)
- TEST_ERROR
-
- /* Create data space */
- if((sid = H5Screate(H5S_SCALAR)) < 0)
- FAIL_STACK_ERROR
-
- /* Create an attribute, to get the object header into write access */
- if((aid = H5Acreate2(dset, "Attr", H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
-
- /* Close dataspace */
- if(H5Sclose(sid) < 0)
- FAIL_STACK_ERROR
-
- /* Close attribute */
- if(H5Aclose(aid) < 0)
- FAIL_STACK_ERROR
-
- /* Close the dataset */
- if(H5Dclose(dset) < 0)
- TEST_ERROR
-
- /* Close the file we created (to flush change to object header) */
- if(H5Fclose(file) < 0)
- TEST_ERROR
-
- /* Re-open the file created */
- if((file = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0)
- TEST_ERROR
-
- /* Re-open the dataset with the "mark if unknown" message */
- if((dset = H5Dopen2(file, "/Dataset4", H5P_DEFAULT)) < 0)
- TEST_ERROR
-
- /* Check that the "unknown" message was marked */
- if(H5O_check_msg_marked_test(dset, TRUE) < 0)
- FAIL_STACK_ERROR
-
- /* Close the dataset */
- if(H5Dclose(dset) < 0)
- TEST_ERROR
-
- /* Close the file with the bogus objects */
- if(H5Fclose(file2) < 0)
- TEST_ERROR
-
- PASSED();
-
- /* Open the file with objects that have unknown header messages (generated with gen_bogus.c) with RW intent this time */
- if((file2 = H5Fopen(testfile, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
- TEST_ERROR
-
- TESTING("object in r/w file with unknown header message & 'fail if unknown and open for write' flag set");
-
- /* Attempt to open the dataset with the unknown header message, and "fail if unknown and open for write" flag */
- H5E_BEGIN_TRY {
- dset = H5Dopen2(file2, "/Dataset2", H5P_DEFAULT);
- } H5E_END_TRY;
- if(dset >= 0) {
- H5Dclose(dset);
- TEST_ERROR
- } /* end if */
-
- PASSED();
-
- TESTING("object in r/w file with unknown header message & 'fail if unknown always' flag set");
-
- /* Attempt to open the dataset with the unknown header message, and "fail if unknown always" flag */
- H5E_BEGIN_TRY {
- dset = H5Dopen2(file2, "/Dataset3", H5P_DEFAULT);
- } H5E_END_TRY;
- if(dset >= 0) {
- H5Dclose(dset);
- TEST_ERROR
- } /* end if */
-
- /* Close the file with the bogus objects */
- if(H5Fclose(file2) < 0)
- TEST_ERROR
-
- PASSED();
- }
-
- /* Close the file we created */
- if(H5Fclose(file) < 0)
+ HDputs("Accessing objects with unknown header messages: H5O_BOGUS_VALID_ID");
+ if(test_unknown(H5O_BOGUS_VALID_ID, filename, fapl) < 0)
+ TEST_ERROR
+ HDputs("Accessing objects with unknown header messages: H5O_BOGUS_INVALID_ID");
+ if(test_unknown(H5O_BOGUS_INVALID_ID, filename, fapl) < 0)
TEST_ERROR
- /* Test object header creation metadata cache issues */
- if(test_ohdr_cache(filename, fapl) < 0)
+ /* Test object header creation metadata cache issues */
+ if(test_ohdr_cache(filename, fapl) < 0)
TEST_ERROR
} /* end for */
/* Verify symbol table messages are cached */
if(h5_verify_cached_stabs(FILENAME, fapl) < 0) TEST_ERROR
- puts("All object header tests passed.");
+ HDputs("All object header tests passed.");
h5_cleanup(FILENAME, fapl);
return 0;
diff --git a/test/set_extent.c b/test/set_extent.c
index ae83ba2..7fe8d75 100644
--- a/test/set_extent.c
+++ b/test/set_extent.c
@@ -20,9 +20,6 @@
* Purpose: Tests the H5Dset_extent call
*/
-#include <time.h>
-#include <stdlib.h>
-#include "hdf5.h"
#include "h5test.h"
/*-------------------------------------------------------------------------
@@ -49,8 +46,9 @@ const char *FILENAME[] = {
#define CONFIG_COMPRESS 0x01u
#define CONFIG_FILL 0x02u
#define CONFIG_EARLY_ALLOC 0x04u
+#define CONFIG_UNFILT_EDGE 0x08u
#define CONFIG_ALL (CONFIG_COMPRESS + CONFIG_FILL \
- + CONFIG_EARLY_ALLOC)
+ + CONFIG_EARLY_ALLOC + CONFIG_UNFILT_EDGE)
#define FILL_VALUE -1
#define DO_RANKS_PRINT_CONFIG(TEST) { \
printf(" Config:\n"); \
@@ -59,6 +57,8 @@ const char *FILENAME[] = {
printf(" Fill value: %s\n", (do_fillvalue ? "yes" : "no")); \
printf(" Early allocation: %s\n", (config & CONFIG_EARLY_ALLOC ? "yes" \
: "no")); \
+ printf(" Edge chunk filters: %s\n", (config & CONFIG_UNFILT_EDGE \
+ ? "disabled" : "enabled")); \
} /* end DO_RANKS_PRINT_CONFIG */
#define RANK1 1
@@ -88,18 +88,22 @@ static int do_layouts( hid_t fapl );
static int test_rank1( hid_t fapl,
hid_t dcpl,
hbool_t do_fill_value,
+ hbool_t disable_edge_filters,
hbool_t set_istore_k);
static int test_rank2( hid_t fapl,
hid_t dcpl,
hbool_t do_fill_value,
+ hbool_t disable_edge_filters,
hbool_t set_istore_k);
static int test_rank3( hid_t fapl,
hid_t dcpl,
hbool_t do_fill_value,
+ hbool_t disable_edge_filters,
hbool_t set_istore_k);
static int test_random_rank4( hid_t fapl,
hid_t dcpl,
hbool_t do_fillvalue,
+ hbool_t disable_edge_filters,
hbool_t do_sparse);
static int test_external( hid_t fapl );
@@ -214,7 +218,8 @@ error:
static int do_ranks( hid_t fapl )
{
- hbool_t do_fillvalue = 0;
+ hbool_t do_fillvalue = FALSE;
+ hbool_t disable_edge_filters = FALSE;
hid_t dcpl = -1;
int fillvalue = FILL_VALUE;
unsigned config;
@@ -250,6 +255,11 @@ static int do_ranks( hid_t fapl )
if(H5Pset_alloc_time(dcpl, H5D_ALLOC_TIME_EARLY) < 0)
TEST_ERROR
+ if(config & CONFIG_UNFILT_EDGE)
+ disable_edge_filters = TRUE;
+ else
+ disable_edge_filters = FALSE;
+
/* Run tests */
if(do_fillvalue) {
unsigned ifset;
@@ -264,25 +274,25 @@ static int do_ranks( hid_t fapl )
if(H5Pset_fill_time(dcpl, H5D_FILL_TIME_ALLOC) < 0)
TEST_ERROR
- if(test_rank1(fapl, dcpl, do_fillvalue, FALSE) < 0) {
+ if(test_rank1(fapl, dcpl, do_fillvalue, disable_edge_filters, FALSE) < 0) {
DO_RANKS_PRINT_CONFIG("Rank 1")
printf(" Fill time: %s\n", (ifset ? "H5D_FILL_TIME_IFSET"
: "H5D_FILL_TIME_ALLOC"));
goto error;
} /* end if */
- if(test_rank2(fapl, dcpl, do_fillvalue, FALSE) < 0) {
+ if(test_rank2(fapl, dcpl, do_fillvalue, disable_edge_filters, FALSE) < 0) {
DO_RANKS_PRINT_CONFIG("Rank 2")
printf(" Fill time: %s\n", (ifset ? "H5D_FILL_TIME_IFSET"
: "H5D_FILL_TIME_ALLOC"));
goto error;
} /* end if */
- if(test_rank3(fapl, dcpl, do_fillvalue, FALSE) < 0) {
+ if(test_rank3(fapl, dcpl, do_fillvalue, disable_edge_filters, FALSE) < 0) {
DO_RANKS_PRINT_CONFIG("Rank 3")
printf(" Fill time: %s\n", (ifset ? "H5D_FILL_TIME_IFSET"
: "H5D_FILL_TIME_ALLOC"));
goto error;
} /* end if */
- if(test_rank2(fapl, dcpl, do_fillvalue, TRUE) < 0) {
+ if(test_rank2(fapl, dcpl, do_fillvalue, disable_edge_filters, TRUE) < 0) {
DO_RANKS_PRINT_CONFIG("Rank 2 with non-default indexed storage B-tree")
printf(" Fill time: %s\n", (ifset ? "H5D_FILL_TIME_IFSET"
: "H5D_FILL_TIME_ALLOC"));
@@ -296,19 +306,19 @@ static int do_ranks( hid_t fapl )
if(H5Pset_fill_time(dcpl, H5D_FILL_TIME_ALLOC) < 0)
TEST_ERROR
- if(test_rank1(fapl, dcpl, do_fillvalue, FALSE) < 0) {
+ if(test_rank1(fapl, dcpl, do_fillvalue, disable_edge_filters, FALSE) < 0) {
DO_RANKS_PRINT_CONFIG("Rank 1")
goto error;
} /* end if */
- if(test_rank2(fapl, dcpl, do_fillvalue, FALSE) < 0) {
+ if(test_rank2(fapl, dcpl, do_fillvalue, disable_edge_filters, FALSE) < 0) {
DO_RANKS_PRINT_CONFIG("Rank 2")
goto error;
} /* end if */
- if(test_rank3(fapl, dcpl, do_fillvalue, FALSE) < 0) {
+ if(test_rank3(fapl, dcpl, do_fillvalue, disable_edge_filters, FALSE) < 0) {
DO_RANKS_PRINT_CONFIG("Rank 3")
goto error;
} /* end if */
- if(test_rank2(fapl, dcpl, do_fillvalue, TRUE) < 0) {
+ if(test_rank2(fapl, dcpl, do_fillvalue, disable_edge_filters, TRUE) < 0) {
DO_RANKS_PRINT_CONFIG("Rank 2 with non-default indexed storage B-tree")
goto error;
} /* end if */
@@ -319,13 +329,13 @@ static int do_ranks( hid_t fapl )
if(H5Pset_fill_time(dcpl, H5D_FILL_TIME_IFSET) < 0)
TEST_ERROR
- if(test_random_rank4(fapl, dcpl, do_fillvalue, FALSE) < 0) {
+ if(test_random_rank4(fapl, dcpl, do_fillvalue, disable_edge_filters, FALSE) < 0) {
DO_RANKS_PRINT_CONFIG("Randomized rank 4")
goto error;
} /* end if */
if(!(config & CONFIG_EARLY_ALLOC))
- if(test_random_rank4(fapl, dcpl, do_fillvalue, TRUE) < 0) {
+ if(test_random_rank4(fapl, dcpl, do_fillvalue, disable_edge_filters, TRUE) < 0) {
DO_RANKS_PRINT_CONFIG("Randomized rank 4 with sparse allocation")
goto error;
} /* end if */
@@ -379,6 +389,7 @@ error:
static int test_rank1( hid_t fapl,
hid_t dcpl,
hbool_t do_fill_value,
+ hbool_t disable_edge_filters,
hbool_t set_istore_k)
{
@@ -401,468 +412,302 @@ static int test_rank1( hid_t fapl,
int comp_value;
char filename[NAME_BUF_SIZE];
- if ( do_fill_value )
- {
+ if(do_fill_value)
comp_value = FILL_VALUE;
- }
else
- {
comp_value = 0;
- }
-
-
- for( i = 0; i < DIM0; i++ )
- {
+ for(i = 0; i < DIM0; i++ )
buf_o[i] = 2;
- }
/* create a file creation property list */
- if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
- {
+ if((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
TEST_ERROR
- }
- if ( set_istore_k )
- {
- /* set non-default indexed storage B-tree internal 'K' value */
- if (H5Pset_istore_k(fcpl,ISTORE_IK) < 0)
- {
+ /* set non-default indexed storage B-tree internal 'K' value */
+ if(set_istore_k)
+ if(H5Pset_istore_k(fcpl,ISTORE_IK) < 0)
TEST_ERROR
- }
- }
/* create a new file */
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
- if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl)) < 0)
- {
+ if((fid = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl)) < 0)
TEST_ERROR
- }
/* close property list */
if(H5Pclose(fcpl) < 0)
- {
TEST_ERROR
- }
/* create the data space with unlimited dimensions. */
- if ((sid = H5Screate_simple(RANK1, dims_o, maxdims)) < 0)
- {
+ if((sid = H5Screate_simple(RANK1, dims_o, maxdims)) < 0)
TEST_ERROR
- }
/* modify dataset creation properties, i.e. enable chunking. */
- if ((my_dcpl = H5Pcopy (dcpl)) < 0)
- {
+ if((my_dcpl = H5Pcopy (dcpl)) < 0)
TEST_ERROR
- }
- if (H5Pset_chunk(my_dcpl, RANK1, dims_c) < 0)
- {
+ if(H5Pset_chunk(my_dcpl, RANK1, dims_c) < 0)
TEST_ERROR
- }
+ if(disable_edge_filters)
+ if(H5Pset_chunk_opts(my_dcpl, H5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS) < 0)
+ TEST_ERROR
/*-------------------------------------------------------------------------
- * create, write dataset
- *-------------------------------------------------------------------------
- */
+ * create, write dataset
+ *-------------------------------------------------------------------------
+ */
/* create a dataset */
- if ((did = H5Dcreate2(fid , "dset1", H5T_NATIVE_INT, sid, H5P_DEFAULT, my_dcpl, H5P_DEFAULT)) < 0)
- {
+ if((did = H5Dcreate2(fid , "dset1", H5T_NATIVE_INT, sid, H5P_DEFAULT, my_dcpl, H5P_DEFAULT)) < 0)
TEST_ERROR
- }
/* write */
- if (H5Dwrite(did , H5T_NATIVE_INT, sid, H5S_ALL, H5P_DEFAULT, buf_o) < 0)
- {
+ if(H5Dwrite(did , H5T_NATIVE_INT, sid, H5S_ALL, H5P_DEFAULT, buf_o) < 0)
TEST_ERROR
- }
-
#if defined (H5_SET_EXTENT_DEBUG)
- printf("\n");
+ printf("\n buf_o: ");
for (i = 0; i < (int)dims_o[0]; i++ )
- {
-
printf("%d ", buf_o[i]);
-
- }
printf("\n");
#endif
-
-
- if (H5Sclose(sid) < 0)
- {
+ if(H5Sclose(sid) < 0)
TEST_ERROR
- }
/*-------------------------------------------------------------------------
- * set new dimensions for the array; expand it
- *-------------------------------------------------------------------------
- */
+ * set new dimensions for the array; expand it
+ *-------------------------------------------------------------------------
+ */
/* set new dimensions for the array. */
- if (H5Dset_extent(did , dims_e) < 0)
- {
+ if(H5Dset_extent(did , dims_e) < 0)
TEST_ERROR
- }
/* get the space */
- if ((sid = H5Dget_space(did)) < 0)
- {
+ if((sid = H5Dget_space(did)) < 0)
TEST_ERROR
- }
/* get dimensions */
- if (H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0)
- {
+ if(H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0)
TEST_ERROR
- }
- if (H5Sclose(sid) < 0)
- {
+ if(H5Sclose(sid) < 0)
TEST_ERROR
- }
-
/* check dimensions */
for( i = 0; i < RANK1; i++ )
- {
if (dims_r[i] != dims_e[i])
TEST_ERROR
- }
/* read */
if (H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_e) < 0)
TEST_ERROR
-
#if defined (H5_SET_EXTENT_DEBUG)
- printf("\n");
+ printf("\n buf_e: ");
for (i = 0; i < (int)dims_r[0]; i++ )
- {
-
printf("%d ", buf_e[i]);
-
- }
printf("\n");
#endif
-
-
-
/* compare the read array with the expanded array */
for (i = 0; i < (int)dims_r[0]; i++ )
- {
-
- if ( i >= DIM0 )
- {
- if(buf_e[i] != comp_value)
- {
+ if(i >= DIM0) {
+ if(buf_e[i] != comp_value) {
printf("buf_e[%d] = %d\n", i, buf_e[i]);
- printf("value = %d\n", comp_value);
+ printf("expected = %d\n", comp_value);
TEST_ERROR
- }
- }
- else
- {
+ } /* end if */
+ } /* end if */
+ else {
if(buf_e[i] != buf_o[i])
TEST_ERROR
- }
- }
-
+ } /* end else */
/*-------------------------------------------------------------------------
- * shrink
- *
- *-------------------------------------------------------------------------
- */
+ * shrink
+ *-------------------------------------------------------------------------
+ */
/* set new dimensions for the array. */
- if (H5Dset_extent(did , dims_s) < 0)
- {
+ if(H5Dset_extent(did , dims_s) < 0)
TEST_ERROR
- }
/* get the space */
- if ((sid = H5Dget_space(did)) < 0)
- {
+ if((sid = H5Dget_space(did)) < 0)
TEST_ERROR
- }
/* get dimensions */
- if (H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0)
- {
+ if(H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0)
TEST_ERROR
- }
- if (H5Sclose(sid) < 0)
- {
+ if(H5Sclose(sid) < 0)
TEST_ERROR
- }
/* check dimensions */
for( i = 0; i < RANK1; i++ )
- {
if (dims_r[i] != dims_s[i])
TEST_ERROR
- }
-
-
/* for this case we close and reopen file */
- if ( set_istore_k )
- {
-
- if (H5Dclose(did) < 0)
- {
+ if(set_istore_k) {
+ if(H5Dclose(did) < 0)
TEST_ERROR
- }
- if (H5Fclose(fid) < 0)
- {
+ if(H5Fclose(fid) < 0)
TEST_ERROR
- }
- if ((fid = H5Fopen( filename, H5F_ACC_RDWR, fapl ))<0)
- {
+ if((fid = H5Fopen( filename, H5F_ACC_RDWR, fapl ))<0)
TEST_ERROR
- }
- if ((did = H5Dopen2( fid , "dset1", H5P_DEFAULT ))<0)
- {
+ if((did = H5Dopen2( fid , "dset1", H5P_DEFAULT ))<0)
TEST_ERROR
- }
-
-
-
- }
+ } /* end if */
/*-------------------------------------------------------------------------
- * read
- *-------------------------------------------------------------------------
- */
+ * read
+ *-------------------------------------------------------------------------
+ */
/* read */
- if (H5Dread( did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_s ) < 0)
- {
+ if(H5Dread( did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_s ) < 0)
TEST_ERROR
- }
#if defined (H5_SET_EXTENT_DEBUG)
- printf("\n");
+ printf("\n dims_r: ");
for (i = 0; i < (int)dims_r[0]; i++ )
- {
-
printf("%d ", buf_s[i]);
- }
printf("\n");
-
#endif
-
-
-
/* compare the read array with the shrinked array */
for( i = 0; i < (int)dims_r[0]; i++ )
- {
-
- if ( buf_s[i] != buf_o[i] )
- {
+ if(buf_s[i] != buf_o[i]) {
printf("buf_s[%d] = %d\n", i, buf_s[i]);
printf("buf_o[%d] = %d\n", i, buf_o[i]);
TEST_ERROR
- }
- }
-
+ } /* end if */
/*-------------------------------------------------------------------------
- * expand it back to original size
- *-------------------------------------------------------------------------
- */
+ * expand it back to original size
+ *-------------------------------------------------------------------------
+ */
/* set new dimensions for the array */
- if (H5Dset_extent(did, dims_o) < 0)
- {
+ if(H5Dset_extent(did, dims_o) < 0)
TEST_ERROR
- }
/* get the space */
- if ((sid = H5Dget_space(did)) < 0)
- {
+ if((sid = H5Dget_space(did)) < 0)
TEST_ERROR
- }
/* get dimensions. */
- if (H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0)
- {
+ if(H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0)
TEST_ERROR
- }
- if (H5Sclose(sid) < 0)
- {
+ if(H5Sclose(sid) < 0)
TEST_ERROR
- }
-
/* check dimensions */
for( i = 0; i < RANK1; i++ )
- {
if (dims_r[i] != dims_o[i])
TEST_ERROR
- }
-
/* read */
- if (H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_r) < 0)
+ if(H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_r) < 0)
TEST_ERROR
#if defined (H5_SET_EXTENT_DEBUG)
- printf("\n");
+ printf("\n dims_r: ");
for (i = 0; i < (int)dims_r[0]; i++ )
- {
-
printf("%d ", buf_r[i]);
-
- }
printf("\n");
#endif
-
-
/* compare the read array with the original array */
- for (i = 0; i < (int)dims_r[0]; i++ )
- {
-
- if (i >= DIMS0 )
- {
- if(buf_r[i] != comp_value)
- {
+ for(i = 0; i < (int)dims_r[0]; i++ )
+ if(i >= DIMS0 ) {
+ if(buf_r[i] != comp_value) {
printf("buf_r[%d] = %d\n", i, buf_r[i] );
- printf("value = %d\n", comp_value);
+ printf("expected = %d\n", comp_value);
TEST_ERROR
- }
- }
- else
- {
+ } /* end if */
+ } /* end if */
+ else {
if(buf_r[i] != buf_o[i])
TEST_ERROR
- }
- }
+ } /* end else */
/*-------------------------------------------------------------------------
- * shrink to 0
- *
- *-------------------------------------------------------------------------
- */
+ * shrink to 0
+ *-------------------------------------------------------------------------
+ */
dims_s[0] = 0;
/* set new dimensions for the array. */
- if (H5Dset_extent(did , dims_s) < 0)
- {
+ if(H5Dset_extent(did , dims_s) < 0)
TEST_ERROR
- }
/* get the space */
- if ((sid = H5Dget_space(did)) < 0)
- {
+ if((sid = H5Dget_space(did)) < 0)
TEST_ERROR
- }
/* get dimensions */
- if (H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0)
- {
+ if(H5Sget_simple_extent_dims(sid, dims_r, NULL) < 0)
TEST_ERROR
- }
-
- if (H5Sclose(sid) < 0)
- {
+ if(H5Sclose(sid) < 0)
TEST_ERROR
- }
/* check dimensions */
for( i = 0; i < RANK1; i++ )
- {
- if (dims_r[i] != dims_s[i])
+ if(dims_r[i] != dims_s[i])
TEST_ERROR
- }
/*-------------------------------------------------------------------------
- * close dataset
- *-------------------------------------------------------------------------
- */
+ * close dataset
+ *-------------------------------------------------------------------------
+ */
- if (H5Dclose(did) < 0)
- {
+ if(H5Dclose(did) < 0)
TEST_ERROR
- }
-
-
-
-
- /*-------------------------------------------------------------------------
- * test a dataset with non initialized chunks
- *-------------------------------------------------------------------------
- */
+ /*-------------------------------------------------------------------------
+ * test a dataset with non initialized chunks
+ *-------------------------------------------------------------------------
+ */
- if ((sid = H5Screate_simple(RANK1, dims_o, maxdims)) < 0)
- {
+ if((sid = H5Screate_simple(RANK1, dims_o, maxdims)) < 0)
TEST_ERROR
- }
- if ((did = H5Dcreate2(fid , "dset3", H5T_NATIVE_INT, sid, H5P_DEFAULT, my_dcpl, H5P_DEFAULT)) < 0)
- {
+ if((did = H5Dcreate2(fid , "dset3", H5T_NATIVE_INT, sid, H5P_DEFAULT, my_dcpl, H5P_DEFAULT)) < 0)
TEST_ERROR
- }
+
/* set new dimensions for the array */
dims_o[ 0 ] = 0;
- if (H5Dset_extent( did , dims_o ) < 0)
- {
+ if(H5Dset_extent( did , dims_o ) < 0)
TEST_ERROR
- }
-
-
- if (H5Dclose(did) < 0)
- {
+ if(H5Dclose(did) < 0)
TEST_ERROR
- }
- if (H5Sclose(sid) < 0)
- {
+ if(H5Sclose(sid) < 0)
TEST_ERROR
- }
-
-
-
/*-------------------------------------------------------------------------
- * close property list
- *-------------------------------------------------------------------------
- */
-
-
- if (H5Pclose(my_dcpl) < 0)
- {
+ * close property list
+ *-------------------------------------------------------------------------
+ */
+ if(H5Pclose(my_dcpl) < 0)
TEST_ERROR
- }
-
- if (H5Fclose( fid ) < 0)
- {
+ if(H5Fclose(fid) < 0)
TEST_ERROR
- }
-
return 0;
-
-
error:
H5E_BEGIN_TRY
@@ -875,7 +720,7 @@ error:
} H5E_END_TRY;
return -1;
-}
+} /* end test_rank1() */
/*-------------------------------------------------------------------------
* test usage with a 2D rank
@@ -885,6 +730,7 @@ error:
static int test_rank2( hid_t fapl,
hid_t dcpl,
hbool_t do_fill_value,
+ hbool_t disable_edge_filters,
hbool_t set_istore_k)
{
@@ -965,6 +811,9 @@ static int test_rank2( hid_t fapl,
{
TEST_ERROR
}
+ if(disable_edge_filters)
+ if(H5Pset_chunk_opts(my_dcpl, H5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS) < 0)
+ TEST_ERROR
/*-------------------------------------------------------------------------
* Procedure 1
@@ -1500,6 +1349,7 @@ error:
static int test_rank3( hid_t fapl,
hid_t dcpl,
hbool_t do_fill_value,
+ hbool_t disable_edge_filters,
hbool_t set_istore_k)
{
@@ -1586,6 +1436,9 @@ static int test_rank3( hid_t fapl,
{
TEST_ERROR
}
+ if(disable_edge_filters)
+ if(H5Pset_chunk_opts(my_dcpl, H5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS) < 0)
+ TEST_ERROR
/*-------------------------------------------------------------------------
* create, write array
@@ -2660,7 +2513,7 @@ error:
*-------------------------------------------------------------------------
*/
static int test_random_rank4( hid_t fapl, hid_t dcpl, hbool_t do_fillvalue,
- hbool_t do_sparse )
+ hbool_t disable_edge_filters, hbool_t do_sparse )
{
hid_t file = -1;
hid_t dset = -1;
@@ -2704,6 +2557,9 @@ static int test_random_rank4( hid_t fapl, hid_t dcpl, hbool_t do_fillvalue,
TEST_ERROR
if(H5Pset_chunk(my_dcpl, 4, cdims) < 0)
TEST_ERROR
+ if(disable_edge_filters)
+ if(H5Pset_chunk_opts(my_dcpl, H5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS) < 0)
+ TEST_ERROR
if((dset = H5Dcreate2(file, "dset", H5T_NATIVE_INT, fspace, H5P_DEFAULT,
my_dcpl, H5P_DEFAULT)) < 0)
TEST_ERROR
diff --git a/test/tarray.c b/test/tarray.c
index 9c79f41..4a87981 100644
--- a/test/tarray.c
+++ b/test/tarray.c
@@ -34,41 +34,67 @@
#define ARRAY1_DIM1 4
/* 3-D array datatype */
-#define ARRAY2_RANK 3
-#define ARRAY2_DIM1 3
-#define ARRAY2_DIM2 4
-#define ARRAY2_DIM3 5
+#define ARRAY2_RANK 3
+#define ARRAY2_DIM1 3
+#define ARRAY2_DIM2 4
+#define ARRAY2_DIM3 5
/* 2-D array datatype */
-#define ARRAY3_RANK 2
-#define ARRAY3_DIM1 6
-#define ARRAY3_DIM2 3
+#define ARRAY3_RANK 2
+#define ARRAY3_DIM1 6
+#define ARRAY3_DIM2 3
/* 1-D dataset with fixed dimensions */
-#define SPACE1_RANK 1
-#define SPACE1_DIM1 4
+#define SPACE1_RANK 1
+#define SPACE1_DIM1 4
-/****************************************************************
-**
-** test_array_atomic_1d(): Test basic array datatype code.
-** Tests 1-D array of atomic datatypes
-**
-****************************************************************/
+/* Parameters used with the test_array_bkg() test */
+#define FIELDNAME "ArrayofStructures"
+#define LENGTH 5
+#define ALEN 10
+#define RANK 1
+#define NMAX 100
+
+/* Struct used with test_array_bkg() test */
+typedef struct
+{
+ int nsubfields;
+ char *name[NMAX];
+ size_t offset[NMAX];
+ hid_t datatype[NMAX];
+
+} CmpDTSinfo;
+
+/* Forward declarations for custom vlen memory manager functions */
+void *test_array_alloc_custom(size_t size, void *info);
+void test_array_free_custom(void *mem, void *info);
+
+
+/*-------------------------------------------------------------------------
+ * Function: test_array_atomic_1d
+ *
+ * Purpose: Test basic array datatype code.
+ * Tests 1-D array of atomic datatypes.
+ *
+ * Return: void
+ *
+ *-------------------------------------------------------------------------
+ */
static void
test_array_atomic_1d(void)
{
- int wdata[SPACE1_DIM1][ARRAY1_DIM1]; /* Information to write */
- int rdata[SPACE1_DIM1][ARRAY1_DIM1]; /* Information read in */
- hid_t fid1; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t sid1; /* Dataspace ID */
- hid_t tid1; /* Datatype ID */
- hsize_t sdims1[] = {SPACE1_DIM1};
- hsize_t tdims1[] = {ARRAY1_DIM1};
- int ndims; /* Array rank for reading */
- hsize_t rdims1[H5S_MAX_RANK]; /* Array dimensions for reading */
- int i,j; /* counting variables */
- herr_t ret; /* Generic return value */
+ int wdata[SPACE1_DIM1][ARRAY1_DIM1]; /* Information to write */
+ int rdata[SPACE1_DIM1][ARRAY1_DIM1]; /* Information read in */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid1; /* Dataspace ID */
+ hid_t tid1; /* Datatype ID */
+ hsize_t sdims1[] = {SPACE1_DIM1};
+ hsize_t tdims1[] = {ARRAY1_DIM1};
+ int ndims; /* Array rank for reading */
+ hsize_t rdims1[H5S_MAX_RANK]; /* Array dimensions for reading */
+ int i,j; /* counting variables */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing 1-D Array of Atomic Datatypes Functionality\n"));
@@ -167,36 +193,41 @@ test_array_atomic_1d(void)
CHECK(ret, FAIL, "H5Fclose");
} /* end test_array_atomic_1d() */
-/****************************************************************
-**
-** test_array_funcs(): Test some type functions that are and
-** aren't supposed to work with array type.
-**
-****************************************************************/
+
+/*-------------------------------------------------------------------------
+ * Function: test_array_funcs
+ *
+ * Purpose: Test some type functions that are and aren't supposed to
+ * work with array type.
+ *
+ * Return: void
+ *
+ *-------------------------------------------------------------------------
+ */
static void
test_array_funcs(void)
{
- hid_t type; /* Datatype ID */
- hsize_t tdims1[] = {ARRAY1_DIM1};
- int size;
- H5T_pad_t inpad;
- H5T_norm_t norm;
- H5T_cset_t cset;
- H5T_str_t strpad;
- herr_t ret; /* Generic return value */
+ hid_t type; /* Datatype ID */
+ hsize_t tdims1[] = {ARRAY1_DIM1};
+ size_t size;
+ H5T_pad_t inpad;
+ H5T_norm_t norm;
+ H5T_cset_t cset;
+ H5T_str_t strpad;
+ herr_t ret; /* Generic return value */
/* Create a datatype to refer to */
type = H5Tarray_create2(H5T_IEEE_F32BE, ARRAY1_RANK, tdims1);
CHECK(type, FAIL, "H5Tarray_create2");
size=H5Tget_precision(type);
- CHECK(size, FAIL, "H5Tget_precision");
+ CHECK(size, 0, "H5Tget_precision");
size=H5Tget_size(type);
- CHECK(size, FAIL, "H5Tget_size");
+ CHECK(size, 0, "H5Tget_size");
size=H5Tget_ebias(type);
- CHECK(size, FAIL, "H5Tget_ebias");
+ CHECK(size, 0, "H5Tget_ebias");
ret=H5Tset_pad(type, H5T_PAD_ZERO, H5T_PAD_ONE);
CHECK(ret, FAIL, "H5Tset_pad");
@@ -223,29 +254,34 @@ test_array_funcs(void)
/* Close datatype */
ret = H5Tclose(type);
CHECK(ret, FAIL, "H5Tclose");
-} /* end test_array_funcs */
+} /* end test_array_funcs() */
-/****************************************************************
-**
-** test_array_atomic_3d(): Test basic array datatype code.
-** Tests 3-D array of atomic datatypes
-**
-****************************************************************/
+
+/*-------------------------------------------------------------------------
+ * Function: test_array_atomic_3d
+ *
+ * Purpose: Test basic array datatype code.
+ * Tests 3-D array of atomic datatypes.
+ *
+ * Return: void
+ *
+ *-------------------------------------------------------------------------
+ */
static void
test_array_atomic_3d(void)
{
int wdata[SPACE1_DIM1][ARRAY2_DIM1][ARRAY2_DIM2][ARRAY2_DIM3]; /* Information to write */
int rdata[SPACE1_DIM1][ARRAY2_DIM1][ARRAY2_DIM2][ARRAY2_DIM3]; /* Information read in */
- hid_t fid; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t sid; /* Dataspace ID */
- hid_t tid; /* Datatype ID */
- hsize_t sdims1[] = {SPACE1_DIM1};
- hsize_t tdims2[] = {ARRAY2_DIM1,ARRAY2_DIM2,ARRAY2_DIM3};
- int ndims; /* Array rank for reading */
- hsize_t rdims2[H5S_MAX_RANK]; /* Array dimensions for reading */
- int i,j,k,l; /* counting variables */
- herr_t ret; /* Generic return value */
+ hid_t fid; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid; /* Dataspace ID */
+ hid_t tid; /* Datatype ID */
+ hsize_t sdims1[] = {SPACE1_DIM1};
+ hsize_t tdims2[] = {ARRAY2_DIM1,ARRAY2_DIM2,ARRAY2_DIM3};
+ int ndims; /* Array rank for reading */
+ hsize_t rdims2[H5S_MAX_RANK]; /* Array dimensions for reading */
+ int i,j,k,l; /* counting variables */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing 3-D Array of Atomic Datatypes Functionality\n"));
@@ -349,31 +385,36 @@ test_array_atomic_3d(void)
} /* end test_array_atomic_3d() */
-/****************************************************************
-**
-** test_array_array_atomic(): Test basic array datatype code.
-** Tests 1-D array 2-D arrays of atomic datatypes
-**
-****************************************************************/
+
+/*-------------------------------------------------------------------------
+ * Function: test_array_array_atomic
+ *
+ * Purpose: Test basic array datatype code.
+ * Tests 1-D array 2-D arrays of atomic datatypes.
+ *
+ * Return: void
+ *
+ *-------------------------------------------------------------------------
+ */
static void
test_array_array_atomic(void)
{
int wdata[SPACE1_DIM1][ARRAY1_DIM1][ARRAY3_DIM1][ARRAY3_DIM2]; /* Information to write */
int rdata[SPACE1_DIM1][ARRAY1_DIM1][ARRAY3_DIM1][ARRAY3_DIM2]; /* Information read in */
- hid_t fid; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t sid; /* Dataspace ID */
- hid_t tid1; /* 1-D array Datatype ID */
- hid_t tid2; /* 2-D array Datatype ID */
- hsize_t sdims1[] = {SPACE1_DIM1};
- hsize_t tdims1[] = {ARRAY1_DIM1};
- hsize_t tdims2[] = {ARRAY3_DIM1,ARRAY3_DIM2};
- int ndims1; /* Array rank for reading */
- int ndims2; /* Array rank for reading */
- hsize_t rdims1[H5S_MAX_RANK]; /* Array dimensions for reading */
- hsize_t rdims2[H5S_MAX_RANK]; /* Array dimensions for reading */
- int i,j,k,l; /* counting variables */
- herr_t ret; /* Generic return value */
+ hid_t fid; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid; /* Dataspace ID */
+ hid_t tid1; /* 1-D array Datatype ID */
+ hid_t tid2; /* 2-D array Datatype ID */
+ hsize_t sdims1[] = {SPACE1_DIM1};
+ hsize_t tdims1[] = {ARRAY1_DIM1};
+ hsize_t tdims2[] = {ARRAY3_DIM1,ARRAY3_DIM2};
+ int ndims1; /* Array rank for reading */
+ int ndims2; /* Array rank for reading */
+ hsize_t rdims1[H5S_MAX_RANK]; /* Array dimensions for reading */
+ hsize_t rdims2[H5S_MAX_RANK]; /* Array dimensions for reading */
+ int i,j,k,l; /* counting variables */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing 1-D Array 2-D Arrays of Atomic Datatypes Functionality\n"));
@@ -503,12 +544,17 @@ test_array_array_atomic(void)
CHECK(ret, FAIL, "H5Fclose");
} /* end test_array_array_atomic() */
-/****************************************************************
-**
-** test_array_compound_atomic(): Test basic array datatype code.
-** Tests 1-D array of compound datatypes (with no array fields)
-**
-****************************************************************/
+
+/*-------------------------------------------------------------------------
+ * Function: test_array_compound_atomic
+ *
+ * Purpose: Test basic array datatype code.
+ * Tests 1-D array of compound datatypes (with no array fields).
+ *
+ * Return: void
+ *
+ *-------------------------------------------------------------------------
+ */
static void
test_array_compound_atomic(void)
{
@@ -516,23 +562,24 @@ test_array_compound_atomic(void)
int i;
float f;
} s1_t;
- s1_t wdata[SPACE1_DIM1][ARRAY1_DIM1]; /* Information to write */
- s1_t rdata[SPACE1_DIM1][ARRAY1_DIM1]; /* Information read in */
- hid_t fid1; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t sid1; /* Dataspace ID */
- hid_t tid1; /* Array Datatype ID */
- hid_t tid2; /* Compound Datatype ID */
- hsize_t sdims1[] = {SPACE1_DIM1};
- hsize_t tdims1[] = {ARRAY1_DIM1};
- int ndims; /* Array rank for reading */
- hsize_t rdims1[H5S_MAX_RANK]; /* Array dimensions for reading */
- int nmemb; /* Number of compound members */
- char *mname; /* Name of compound field */
- size_t off; /* Offset of compound field */
- hid_t mtid; /* Datatype ID for field */
- int i,j; /* counting variables */
- herr_t ret; /* Generic return value */
+
+ s1_t wdata[SPACE1_DIM1][ARRAY1_DIM1]; /* Information to write */
+ s1_t rdata[SPACE1_DIM1][ARRAY1_DIM1]; /* Information read in */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid1; /* Dataspace ID */
+ hid_t tid1; /* Array Datatype ID */
+ hid_t tid2; /* Compound Datatype ID */
+ hsize_t sdims1[] = {SPACE1_DIM1};
+ hsize_t tdims1[] = {ARRAY1_DIM1};
+ int ndims; /* Array rank for reading */
+ hsize_t rdims1[H5S_MAX_RANK]; /* Array dimensions for reading */
+ int nmemb; /* Number of compound members */
+ char *mname; /* Name of compound field */
+ size_t off; /* Offset of compound field */
+ hid_t mtid; /* Datatype ID for field */
+ int i,j; /* counting variables */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing 1-D Array of Compound Atomic Datatypes Functionality\n"));
@@ -541,7 +588,7 @@ test_array_compound_atomic(void)
for(i = 0; i < SPACE1_DIM1; i++)
for(j = 0; j < ARRAY1_DIM1; j++) {
wdata[i][j].i = i * 10 + j;
- wdata[i][j].f = (float)(i * 2.5F + j);
+ wdata[i][j].f = (float)i * 2.5F + (float)j;
} /* end for */
/* Create file */
@@ -704,12 +751,17 @@ test_array_compound_atomic(void)
CHECK(ret, FAIL, "H5Fclose");
} /* end test_array_compound_atomic() */
-/****************************************************************
-**
-** test_array_compound_array(): Test basic array datatype code.
-** Tests 1-D array of compound datatypes (with array fields)
-**
-****************************************************************/
+
+/*-------------------------------------------------------------------------
+ * Function: test_array_compound_array
+ *
+ * Purpose: Test basic array datatype code.
+ * Tests 1-D array of compound datatypes (with array fields).
+ *
+ * Return: void
+ *
+ *-------------------------------------------------------------------------
+ */
static void
test_array_compound_array(void)
{
@@ -717,25 +769,26 @@ test_array_compound_array(void)
int i;
float f[ARRAY1_DIM1];
} s1_t;
- s1_t wdata[SPACE1_DIM1][ARRAY1_DIM1]; /* Information to write */
- s1_t rdata[SPACE1_DIM1][ARRAY1_DIM1]; /* Information read in */
- hid_t fid1; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t sid1; /* Dataspace ID */
- hid_t tid1; /* Array Datatype ID */
- hid_t tid2; /* Compound Datatype ID */
- hid_t tid3; /* Nested Array Datatype ID */
- hsize_t sdims1[] = {SPACE1_DIM1};
- hsize_t tdims1[] = {ARRAY1_DIM1};
- int ndims; /* Array rank for reading */
- hsize_t rdims1[H5S_MAX_RANK]; /* Array dimensions for reading */
- int nmemb; /* Number of compound members */
- char *mname; /* Name of compound field */
- size_t off; /* Offset of compound field */
- hid_t mtid; /* Datatype ID for field */
- H5T_class_t mclass; /* Datatype class for field */
- int i,j,k; /* counting variables */
- herr_t ret; /* Generic return value */
+
+ s1_t wdata[SPACE1_DIM1][ARRAY1_DIM1]; /* Information to write */
+ s1_t rdata[SPACE1_DIM1][ARRAY1_DIM1]; /* Information read in */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid1; /* Dataspace ID */
+ hid_t tid1; /* Array Datatype ID */
+ hid_t tid2; /* Compound Datatype ID */
+ hid_t tid3; /* Nested Array Datatype ID */
+ hsize_t sdims1[] = {SPACE1_DIM1};
+ hsize_t tdims1[] = {ARRAY1_DIM1};
+ int ndims; /* Array rank for reading */
+ hsize_t rdims1[H5S_MAX_RANK]; /* Array dimensions for reading */
+ int nmemb; /* Number of compound members */
+ char *mname; /* Name of compound field */
+ size_t off; /* Offset of compound field */
+ hid_t mtid; /* Datatype ID for field */
+ H5T_class_t mclass; /* Datatype class for field */
+ int i,j,k; /* counting variables */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing 1-D Array of Compound Array Datatypes Functionality\n"));
@@ -745,7 +798,7 @@ test_array_compound_array(void)
for(j=0; j<ARRAY1_DIM1; j++) {
wdata[i][j].i=i*10+j;
for(k=0; k<ARRAY1_DIM1; k++)
- wdata[i][j].f[k]=(float)(i * 10.0F + j * 2.5F + k);
+ wdata[i][j].f[k] = (float)i * 10.0F + (float)j * 2.5F + (float)k;
} /* end for */
/* Create file */
@@ -949,9 +1002,6 @@ test_array_compound_array(void)
} /* end test_array_compound_array() */
-void *test_array_alloc_custom(size_t size, void *info);
-void test_array_free_custom(void *mem, void *info);
-
/****************************************************************
**
** test_array_alloc_custom(): Test VL datatype custom memory
@@ -960,80 +1010,113 @@ void test_array_free_custom(void *mem, void *info);
** allocated.
**
****************************************************************/
-void *test_array_alloc_custom(size_t size, void *info)
+
+/*-------------------------------------------------------------------------
+ * Function: test_array_alloc_custom
+ *
+ * Purpose: Memory allocator for testing VL datatype custom memory
+ * allocation routines.
+ *
+ * This routine just uses malloc to allocate the memory and
+ * increments the amount of memory allocated.
+ *
+ * Return:
+ *
+ * Success: A memory buffer
+ * Failure: NULL
+ *
+ *-------------------------------------------------------------------------
+ */
+void *
+test_array_alloc_custom(size_t size, void *info)
{
- void *ret_value=NULL; /* Pointer to return */
- int *mem_used=(int *)info; /* Get the pointer to the memory used */
- size_t extra; /* Extra space needed */
+ void *ret_value = NULL; /* Pointer to return */
+ size_t *mem_used = (size_t *)info; /* Pointer to the memory used */
+ size_t extra; /* Extra space needed */
/*
* This weird contortion is required on the DEC Alpha to keep the
* alignment correct - QAK
*/
- extra=MAX(sizeof(void *),sizeof(size_t));
+ extra = MAX(sizeof(void *), sizeof(size_t));
- if((ret_value=HDmalloc(extra+size))!=NULL) {
- *(size_t *)ret_value=size;
- *mem_used+=size;
+ if((ret_value = HDmalloc(extra+size)) != NULL) {
+ *(size_t *)ret_value = size;
+ *mem_used += size;
} /* end if */
- ret_value=((unsigned char *)ret_value)+extra;
- return(ret_value);
-}
-/****************************************************************
-**
-** test_array_free_custom(): Test VL datatype custom memory
-** allocation routines. This routine just uses free to
-** release the memory and decrements the amount of memory
-** allocated.
-**
-****************************************************************/
-void test_array_free_custom(void *_mem, void *info)
+ ret_value = ((unsigned char *)ret_value) + extra;
+ return ret_value;
+} /* end test_array_alloc_custom() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: test_array_free_custom
+ *
+ * Purpose: Memory free function for testing VL datatype custom memory
+ * allocation routines.
+ *
+ * This routine just uses free to free the memory and
+ * decrements the amount of memory allocated.
+ *
+ * Return: void
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+test_array_free_custom(void *_mem, void *info)
{
- unsigned char *mem;
- int *mem_used=(int *)info; /* Get the pointer to the memory used */
- size_t extra; /* Extra space needed */
+ unsigned char *mem = NULL; /* Pointer to mem to be freed */
+ size_t *mem_used = (size_t *)info; /* Pointer to the memory used */
+ size_t extra; /* Extra space needed */
/*
* This weird contortion is required on the DEC Alpha to keep the
* alignment correct - QAK
*/
- extra=MAX(sizeof(void *),sizeof(size_t));
+ extra = MAX(sizeof(void *), sizeof(size_t));
- if(_mem!=NULL) {
- mem=((unsigned char *)_mem)-extra;
- *mem_used-=*(size_t *)mem;
+ if(_mem != NULL) {
+ mem = ((unsigned char *)_mem) - extra;
+ *mem_used -= *(size_t *)mem;
HDfree(mem);
} /* end if */
-}
-/****************************************************************
-**
-** test_array_vlen_atomic(): Test basic array datatype code.
-** Tests 1-D array of atomic VL datatypes
-**
-****************************************************************/
+ return;
+} /* end test_array_free_custom() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: test_array_vlen_atomic
+ *
+ * Purpose: Test basic array datatype code.
+ * Tests 1-D array of atomic VL datatypes.
+ *
+ * Return: void
+ *
+ *-------------------------------------------------------------------------
+ */
static void
test_array_vlen_atomic(void)
{
- hvl_t wdata[SPACE1_DIM1][ARRAY1_DIM1]; /* Information to write */
- hvl_t rdata[SPACE1_DIM1][ARRAY1_DIM1]; /* Information read in */
- hid_t fid1; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t sid1; /* Dataspace ID */
- hid_t tid1; /* Array Datatype ID */
- hid_t tid2; /* VL Datatype ID */
- hid_t tid3; /* Atomic Datatype ID */
- hsize_t sdims1[] = {SPACE1_DIM1};
- hsize_t tdims1[] = {ARRAY1_DIM1};
- int ndims; /* Array rank for reading */
- hsize_t rdims1[H5S_MAX_RANK]; /* Array dimensions for reading */
- H5T_class_t mclass; /* Datatype class for VL */
- hid_t xfer_pid; /* Dataset transfer property list ID */
- hsize_t size; /* Number of bytes which will be used */
- int mem_used=0; /* Memory used during allocation */
- int i,j,k; /* counting variables */
- herr_t ret; /* Generic return value */
+ hvl_t wdata[SPACE1_DIM1][ARRAY1_DIM1]; /* Information to write */
+ hvl_t rdata[SPACE1_DIM1][ARRAY1_DIM1]; /* Information read in */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid1; /* Dataspace ID */
+ hid_t tid1; /* Array Datatype ID */
+ hid_t tid2; /* VL Datatype ID */
+ hid_t tid3; /* Atomic Datatype ID */
+ hsize_t sdims1[] = {SPACE1_DIM1};
+ hsize_t tdims1[] = {ARRAY1_DIM1};
+ int ndims; /* Array rank for reading */
+ hsize_t rdims1[H5S_MAX_RANK]; /* Array dimensions for reading */
+ H5T_class_t mclass; /* Datatype class for VL */
+ hid_t xfer_pid; /* Dataset transfer property list ID */
+ hsize_t size; /* Number of bytes which will be used */
+ size_t mem_used=0; /* Memory used during allocation */
+ int i,j,k; /* counting variables */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing 1-D Array of Atomic Variable-Length Datatypes Functionality\n"));
@@ -1041,10 +1124,10 @@ test_array_vlen_atomic(void)
/* Initialize array data to write */
for(i=0; i<SPACE1_DIM1; i++)
for(j=0; j<ARRAY1_DIM1; j++) {
- wdata[i][j].p=HDmalloc((i+j+1)*sizeof(unsigned int));
- wdata[i][j].len=i+j+1;
+ wdata[i][j].p=HDmalloc((size_t)(i+j+1) * sizeof(unsigned int));
+ wdata[i][j].len = (size_t)(i+j+1);
for(k=0; k<(i+j+1); k++)
- ((unsigned int *)wdata[i][j].p)[k]=i*100+j*10+k;
+ ((unsigned int *)wdata[i][j].p)[k] = (unsigned int)(i*100+j*10+k);
} /* end for */
/* Create file */
@@ -1217,34 +1300,39 @@ test_array_vlen_atomic(void)
} /* end test_array_vlen_atomic() */
-/****************************************************************
-**
-** test_array_vlen_array(): Test basic array datatype code.
-** Tests 1-D array of 1-D array VL datatypes
-**
-****************************************************************/
+
+/*-------------------------------------------------------------------------
+ * Function: test_array_vlen_array
+ *
+ * Purpose: Test basic array datatype code.
+ * Tests 1-D array of 1-D array VL datatypes.
+ *
+ * Return: void
+ *
+ *-------------------------------------------------------------------------
+ */
static void
test_array_vlen_array(void)
{
- hvl_t wdata[SPACE1_DIM1][ARRAY1_DIM1]; /* Information to write */
- hvl_t rdata[SPACE1_DIM1][ARRAY1_DIM1]; /* Information read in */
- hid_t fid1; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t sid1; /* Dataspace ID */
- hid_t tid1; /* Array Datatype ID */
- hid_t tid2; /* VL Datatype ID */
- hid_t tid3; /* Nested Array Datatype ID */
- hid_t tid4; /* Atomic Datatype ID */
- hsize_t sdims1[] = {SPACE1_DIM1};
- hsize_t tdims1[] = {ARRAY1_DIM1};
- int ndims; /* Array rank for reading */
- hsize_t rdims1[H5S_MAX_RANK]; /* Array dimensions for reading */
- H5T_class_t mclass; /* Datatype class for VL */
- hid_t xfer_pid; /* Dataset transfer property list ID */
- hsize_t size; /* Number of bytes which will be used */
- int mem_used=0; /* Memory used during allocation */
- int i,j,k,l; /* Index variables */
- herr_t ret; /* Generic return value */
+ hvl_t wdata[SPACE1_DIM1][ARRAY1_DIM1]; /* Information to write */
+ hvl_t rdata[SPACE1_DIM1][ARRAY1_DIM1]; /* Information read in */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid1; /* Dataspace ID */
+ hid_t tid1; /* Array Datatype ID */
+ hid_t tid2; /* VL Datatype ID */
+ hid_t tid3; /* Nested Array Datatype ID */
+ hid_t tid4; /* Atomic Datatype ID */
+ hsize_t sdims1[] = {SPACE1_DIM1};
+ hsize_t tdims1[] = {ARRAY1_DIM1};
+ int ndims; /* Array rank for reading */
+ hsize_t rdims1[H5S_MAX_RANK]; /* Array dimensions for reading */
+ H5T_class_t mclass; /* Datatype class for VL */
+ hid_t xfer_pid; /* Dataset transfer property list ID */
+ hsize_t size; /* Number of bytes which will be used */
+ size_t mem_used=0; /* Memory used during allocation */
+ int i,j,k,l; /* Index variables */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing 1-D Array of 1-D Array Variable-Length Datatypes Functionality\n"));
@@ -1252,11 +1340,11 @@ test_array_vlen_array(void)
/* Initialize array data to write */
for(i=0; i<SPACE1_DIM1; i++)
for(j=0; j<ARRAY1_DIM1; j++) {
- wdata[i][j].p=HDmalloc((i+j+1)*(sizeof(unsigned int)*ARRAY1_DIM1));
- wdata[i][j].len=i+j+1;
+ wdata[i][j].p = HDmalloc((size_t)(i+j+1) * sizeof(unsigned int) * (size_t)ARRAY1_DIM1);
+ wdata[i][j].len = (size_t)(i+j+1);
for(k=0; k<(i+j+1); k++)
for(l=0; l<ARRAY1_DIM1; l++)
- ((unsigned int *)wdata[i][j].p)[k*ARRAY1_DIM1+l]=i*1000+j*100+k*10+l;
+ ((unsigned int *)wdata[i][j].p)[k*ARRAY1_DIM1+l] = (unsigned int)(i*1000+j*100+k*10+l);
} /* end for */
/* Create file */
@@ -1467,28 +1555,18 @@ test_array_vlen_array(void)
} /* end test_array_vlen_array() */
-#define FIELDNAME "ArrayofStructures"
-#define LENGTH 5
-#define ALEN 10
-#define RANK 1
-#define NMAX 100
-
-typedef struct
-{
- int nsubfields;
- char *name[NMAX];
- size_t offset[NMAX];
- hid_t datatype[NMAX];
-
-} CmpDTSinfo;
-
-/****************************************************************
-**
-** test_array_bkg(): Test basic array datatype code.
-** Tests reading compound datatype with array fields and
-** writing partial fields.
-**
-****************************************************************/
+
+/*-------------------------------------------------------------------------
+ * Function: test_array_bkg
+ *
+ * Purpose: Test basic array datatype code.
+ * Tests reading compound datatype with array fields and
+ * writing partial fields.
+ *
+ * Return: void
+ *
+ *-------------------------------------------------------------------------
+ */
static void
test_array_bkg(void)
{
@@ -1505,8 +1583,7 @@ test_array_bkg(void)
int i, j;
unsigned ndims[3] = {1,1,1};
- typedef struct
- {
+ typedef struct {
int a[ALEN];
float b[ALEN];
double c[ALEN];
@@ -1514,10 +1591,9 @@ test_array_bkg(void)
CmpField cf[LENGTH];
CmpField cfr[LENGTH];
- CmpDTSinfo dtsinfo;
+ CmpDTSinfo *dtsinfo = NULL;
- typedef struct
- {
+ typedef struct {
float b[ALEN];
} fld_t;
@@ -1529,42 +1605,43 @@ test_array_bkg(void)
/* Initialize the data */
/* ------------------- */
- for (i = 0; i < LENGTH; i++)
- {
- for (j = 0; j < ALEN; j++)
- {
- cf[i].a[j] = 100*(i+1) + j;
- cf[i].b[j] = (float)(100.0F*(i+1) + 0.01F*j);
- cf[i].c[j] = (double)(100.0F*(i+1) + 0.02F*j);
- }
- }
+ dtsinfo = (CmpDTSinfo *)HDmalloc(sizeof(CmpDTSinfo));
+ CHECK(dtsinfo, NULL, "HDmalloc");
+ HDmemset(dtsinfo, 0, sizeof(CmpDTSinfo));
+ for (i = 0; i < LENGTH; i++) {
+ for (j = 0; j < ALEN; j++) {
+ cf[i].a[j] = 100 * (i + 1) + j;
+ cf[i].b[j] = 100.0F * ((float)i + 1.0F) + 0.01F * (float)j;
+ cf[i].c[j] = (double)(100.0F * ((float)i + 1.0F) + 0.02F * (float)j);
+ } /* end for */
+ } /* end for */
/* Set the number of data members */
/* ------------------------------ */
- dtsinfo.nsubfields = 3;
+ dtsinfo->nsubfields = 3;
/* Initialize the offsets */
/* ----------------------- */
- dtsinfo.offset[0] = HOFFSET(CmpField, a);
- dtsinfo.offset[1] = HOFFSET(CmpField, b);
- dtsinfo.offset[2] = HOFFSET(CmpField, c);
+ dtsinfo->offset[0] = HOFFSET(CmpField, a);
+ dtsinfo->offset[1] = HOFFSET(CmpField, b);
+ dtsinfo->offset[2] = HOFFSET(CmpField, c);
/* Initialize the data type IDs */
/* ---------------------------- */
- dtsinfo.datatype[0] = H5T_NATIVE_INT;
- dtsinfo.datatype[1] = H5T_NATIVE_FLOAT;
- dtsinfo.datatype[2] = H5T_NATIVE_DOUBLE;
+ dtsinfo->datatype[0] = H5T_NATIVE_INT;
+ dtsinfo->datatype[1] = H5T_NATIVE_FLOAT;
+ dtsinfo->datatype[2] = H5T_NATIVE_DOUBLE;
/* Initialize the names of data members */
/* ------------------------------------ */
- for (i = 0; i < dtsinfo.nsubfields; i++)
- dtsinfo.name[i] = (char *)HDcalloc((size_t)20, sizeof(char));
+ for (i = 0; i < dtsinfo->nsubfields; i++)
+ dtsinfo->name[i] = (char *)HDcalloc((size_t)20, sizeof(char));
- strcpy(dtsinfo.name[0], "One");
- strcpy(dtsinfo.name[1], "Two");
- strcpy(dtsinfo.name[2], "Three");
+ HDstrcpy(dtsinfo->name[0], "One");
+ HDstrcpy(dtsinfo->name[1], "Two");
+ HDstrcpy(dtsinfo->name[2], "Three");
/* Create file */
@@ -1585,17 +1662,16 @@ test_array_bkg(void)
/* Add members to the compound data type */
/* -------------------------------------- */
- for ( i = 0; i < dtsinfo.nsubfields; i++)
- {
- array_dt = H5Tarray_create2(dtsinfo.datatype[i], ndims[i], dima);
+ for ( i = 0; i < dtsinfo->nsubfields; i++) {
+ array_dt = H5Tarray_create2(dtsinfo->datatype[i], ndims[i], dima);
CHECK(array_dt, FAIL, "H5Tarray_create2");
- status = H5Tinsert (type, dtsinfo.name[i], dtsinfo.offset[i], array_dt);
+ status = H5Tinsert (type, dtsinfo->name[i], dtsinfo->offset[i], array_dt);
CHECK(status, FAIL, "H5Tinsert");
status = H5Tclose(array_dt);
CHECK(status, FAIL, "H5Tclose");
- }
+ } /* end for */
/* Create the dataset */
/* ------------------ */
@@ -1617,23 +1693,23 @@ test_array_bkg(void)
if(cf[i].a[j]!=cfr[i].a[j]) {
TestErrPrintf("Field a data doesn't match, cf[%d].a[%d]=%d, cfr[%d].a[%d]=%d\n",(int)i,(int)j,(int)cf[i].a[j],(int)i,(int)j,(int)cfr[i].a[j]);
continue;
- }
+ } /* end if */
if(!H5_FLT_ABS_EQUAL(cf[i].b[j],cfr[i].b[j])) {
TestErrPrintf("Field b data doesn't match, cf[%d].b[%d]=%f, cfr[%d].b[%d]=%f\n",(int)i,(int)j,(double)cf[i].b[j],(int)i,(int)j,(double)cfr[i].b[j]);
continue;
- }
+ } /* end if */
if(!H5_DBL_ABS_EQUAL(cf[i].c[j],cfr[i].c[j])) {
TestErrPrintf("Field c data doesn't match, cf[%d].b[%d]=%f, cfr[%d].b[%d]=%f\n",(int)i,(int)j,(double)cf[i].c[j],(int)i,(int)j,(double)cfr[i].c[j]);
continue;
- }
- }
- }
+ } /* end if */
+ } /* end for */
+ } /* end for */
/* Release memory resources */
/* ------------------------ */
- for (i = 0; i < dtsinfo.nsubfields; i++)
- HDfree(dtsinfo.name[i]);
+ for (i = 0; i < dtsinfo->nsubfields; i++)
+ HDfree(dtsinfo->name[i]);
/* Release IDs */
@@ -1651,9 +1727,9 @@ test_array_bkg(void)
CHECK(status, FAIL, "H5Fclose");
-/******************************/
-/* Reopen the file and update */
-/******************************/
+ /******************************/
+ /* Reopen the file and update */
+ /******************************/
fid = H5Fopen(FILENAME, H5F_ACC_RDWR, H5P_DEFAULT);
CHECK(fid, FAIL, "H5Fopen");
@@ -1674,7 +1750,7 @@ test_array_bkg(void)
/* -------------------------------- */
for (i=0; i< LENGTH; i++)
for (j = 0; j < ALEN; j++)
- cf[i].b[j]=fld[i].b[j] = 1.313F;
+ cf[i].b[j] = fld[i].b[j] = 1.313F;
status = H5Dwrite (dataset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, fld);
CHECK(status, FAIL, "H5Dwrite");
@@ -1688,7 +1764,7 @@ test_array_bkg(void)
if(!H5_FLT_ABS_EQUAL(fld[i].b[j],fldr[i].b[j])) {
TestErrPrintf("Field data doesn't match, fld[%d].b[%d]=%f, fldr[%d].b[%d]=%f\n",(int)i,(int)j,(double)fld[i].b[j],(int)i,(int)j,(double)fldr[i].b[j]);
continue;
- }
+ } /* end if */
status = H5Tclose (type);
CHECK(status, FAIL, "H5Tclose");
@@ -1710,17 +1786,17 @@ test_array_bkg(void)
if(cf[i].a[j]!=cfr[i].a[j]) {
TestErrPrintf("Field a data doesn't match, cf[%d].a[%d]=%d, cfr[%d].a[%d]=%d\n",(int)i,(int)j,(int)cf[i].a[j],(int)i,(int)j,(int)cfr[i].a[j]);
continue;
- }
+ } /* end if */
if(!H5_FLT_ABS_EQUAL(cf[i].b[j],cfr[i].b[j])) {
TestErrPrintf("Field b data doesn't match, cf[%d].b[%d]=%f, cfr[%d].b[%d]=%f\n",(int)i,(int)j,(double)cf[i].b[j],(int)i,(int)j,(double)cfr[i].b[j]);
continue;
- }
+ } /* end if */
if(!H5_DBL_ABS_EQUAL(cf[i].c[j],cfr[i].c[j])) {
TestErrPrintf("Field c data doesn't match, cf[%d].b[%d]=%f, cfr[%d].b[%d]=%f\n",(int)i,(int)j,(double)cf[i].c[j],(int)i,(int)j,(double)cfr[i].c[j]);
continue;
- }
- }
- }
+ } /* end if */
+ } /* end for */
+ } /* end for */
status = H5Dclose(dataset);
CHECK(status, FAIL, "H5Dclose");
@@ -1731,9 +1807,9 @@ test_array_bkg(void)
status = H5Fclose(fid);
CHECK(status, FAIL, "H5Fclose");
-/****************************************************/
-/* Reopen the file and print out all the data again */
-/****************************************************/
+ /****************************************************/
+ /* Reopen the file and print out all the data again */
+ /****************************************************/
fid = H5Fopen(FILENAME, H5F_ACC_RDWR, H5P_DEFAULT);
CHECK(fid, FAIL, "H5Fopen");
@@ -1747,7 +1823,7 @@ test_array_bkg(void)
/* Reset the data to read in */
/* ------------------------- */
- memset(cfr, 0, sizeof(CmpField)*LENGTH);
+ HDmemset(cfr, 0, sizeof(CmpField)*LENGTH);
status = H5Dread(dataset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, cfr);
CHECK(status, FAIL, "H5Dread");
@@ -1759,17 +1835,17 @@ test_array_bkg(void)
if(cf[i].a[j]!=cfr[i].a[j]) {
TestErrPrintf("Field a data doesn't match, cf[%d].a[%d]=%d, cfr[%d].a[%d]=%d\n",(int)i,(int)j,(int)cf[i].a[j],(int)i,(int)j,(int)cfr[i].a[j]);
continue;
- }
+ } /* end if */
if(!H5_FLT_ABS_EQUAL(cf[i].b[j],cfr[i].b[j])) {
TestErrPrintf("Field b data doesn't match, cf[%d].b[%d]=%f, cfr[%d].b[%d]=%f\n",(int)i,(int)j,(double)cf[i].b[j],(int)i,(int)j,(double)cfr[i].b[j]);
continue;
- }
+ } /* end if */
if(!H5_DBL_ABS_EQUAL(cf[i].c[j],cfr[i].c[j])) {
TestErrPrintf("Field c data doesn't match, cf[%d].b[%d]=%f, cfr[%d].b[%d]=%f\n",(int)i,(int)j,(double)cf[i].c[j],(int)i,(int)j,(double)cfr[i].c[j]);
continue;
- }
- }
- }
+ } /* end if */
+ } /* end for */
+ } /* end for */
status = H5Dclose(dataset);
CHECK(status, FAIL, "H5Dclose");
@@ -1779,34 +1855,42 @@ test_array_bkg(void)
status = H5Fclose(fid);
CHECK(status, FAIL, "H5Fclose");
+
+ HDfree(dtsinfo);
} /* end test_array_bkg() */
-/****************************************************************
-**
-** test_compat(): Test array datatype compatibility code.
-** Reads file containing old version of datatype object header
-** messages for compound datatypes and verifies reading the older
-** version of the is working correctly.
-**
-****************************************************************/
+
+/*-------------------------------------------------------------------------
+ * Function: test_compat
+ *
+ * Purpose: Test array datatype compatibility code.
+ *
+ * Reads file containing old version of datatype object header
+ * messages for compound datatypes and verifies reading the older
+ * version of the is working correctly.
+ *
+ * Return: void
+ *
+ *-------------------------------------------------------------------------
+ */
static void
test_compat(void)
{
const char *testfile = H5_get_srcdir_filename(TESTFILE); /* Corrected test file name */
- hid_t fid1; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t tid1; /* Array Datatype ID */
- hid_t tid2; /* Datatype ID */
- hsize_t tdims1[] = {ARRAY1_DIM1};
- int ndims; /* Array rank for reading */
- hsize_t rdims1[H5S_MAX_RANK]; /* Array dimensions for reading */
- H5T_class_t mclass; /* Datatype class for VL */
- int nmemb; /* Number of compound members */
- char *mname; /* Name of compound field */
- size_t off; /* Offset of compound field */
- hid_t mtid; /* Datatype ID for field */
- int i; /* Index variables */
- herr_t ret; /* Generic return value */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t tid1; /* Array Datatype ID */
+ hid_t tid2; /* Datatype ID */
+ hsize_t tdims1[] = {ARRAY1_DIM1};
+ int ndims; /* Array rank for reading */
+ hsize_t rdims1[H5S_MAX_RANK]; /* Array dimensions for reading */
+ H5T_class_t mclass; /* Datatype class for VL */
+ int nmemb; /* Number of compound members */
+ char *mname; /* Name of compound field */
+ size_t off; /* Offset of compound field */
+ hid_t mtid; /* Datatype ID for field */
+ int i; /* Index variables */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Array Datatypes Compatibility Functionality\n"));
@@ -2064,17 +2148,22 @@ test_compat(void)
/* Close the file */
ret = H5Fclose(fid1);
CHECK_I(ret, "H5Fclose");
- }
+ } /* end if */
else
printf("***cannot open the pre-created compound datatype test file (%s)\n",testfile);
} /* end test_compat() */
-/****************************************************************
-**
-** test_array(): Main array datatype testing routine.
-**
-****************************************************************/
+
+/*-------------------------------------------------------------------------
+ * Function: test_array
+ *
+ * Purpose: Main array datatype testing routine.
+ *
+ * Return: void
+ *
+ *-------------------------------------------------------------------------
+ */
void
test_array(void)
{
@@ -2082,39 +2171,38 @@ test_array(void)
MESSAGE(5, ("Testing Array Datatypes\n"));
/* These tests use the same file... */
- test_array_atomic_1d(); /* Test 1-D array of atomic datatypes */
- test_array_atomic_3d(); /* Test 3-D array of atomic datatypes */
- test_array_array_atomic(); /* Test 1-D array of 2-D arrays of atomic datatypes */
- test_array_compound_atomic(); /* Test 1-D array of compound datatypes (with no array fields) */
- test_array_compound_array(); /* Test 1-D array of compound datatypes (with array fields) */
- test_array_vlen_atomic(); /* Test 1-D array of atomic VL datatypes */
- test_array_vlen_array(); /* Test 1-D array of 1-D array VL datatypes */
- test_array_funcs(); /* Test type functions with array types */
+ test_array_atomic_1d(); /* Test 1-D array of atomic datatypes */
+ test_array_atomic_3d(); /* Test 3-D array of atomic datatypes */
+ test_array_array_atomic(); /* Test 1-D array of 2-D arrays of atomic datatypes */
+ test_array_compound_atomic(); /* Test 1-D array of compound datatypes (with no array fields) */
+ test_array_compound_array(); /* Test 1-D array of compound datatypes (with array fields) */
+ test_array_vlen_atomic(); /* Test 1-D array of atomic VL datatypes */
+ test_array_vlen_array(); /* Test 1-D array of 1-D array VL datatypes */
+ test_array_funcs(); /* Test type functions with array types */
- test_array_bkg(); /* Read compound datatype with array fields and background fields read */
+ test_array_bkg(); /* Read compound datatype with array fields and background fields read */
/* This test uses a custom file */
- test_compat(); /* Test compatibility changes for compound datatype fields */
-} /* test_array() */
+ test_compat(); /* Test compatibility changes for compound datatype fields */
+
+} /* end test_array() */
/*-------------------------------------------------------------------------
- * Function: cleanup_array
+ * Function: cleanup_array
*
- * Purpose: Cleanup temporary test files
+ * Purpose: Cleanup temporary test files
*
- * Return: none
+ * Return: void
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* June 8, 1999
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
void
cleanup_array(void)
{
remove(FILENAME);
-}
+} /* end cleanup_array() */
diff --git a/test/tbogus.h5 b/test/tbogus.h5
index 875fbd8..91ab76f 100644
--- a/test/tbogus.h5
+++ b/test/tbogus.h5
Binary files differ
diff --git a/test/tfile.c b/test/tfile.c
index f0c3930..badf548 100644
--- a/test/tfile.c
+++ b/test/tfile.c
@@ -52,6 +52,9 @@
#define FILE1 "tfile1.h5"
#define SFILE1 "sys_file1"
+#define REOPEN_FILE "tfile_reopen.h5"
+#define REOPEN_DSET "dset"
+
#define F2_USERBLOCK_SIZE (hsize_t)512
#define F2_OFFSET_SIZE 8
#define F2_LENGTH_SIZE 8
@@ -532,6 +535,59 @@ test_file_open(void)
/****************************************************************
**
+** test_file_reopen(): File reopen test routine.
+**
+****************************************************************/
+static void
+test_file_reopen(void)
+{
+ hid_t fid = -1; /* file ID from initial open */
+ hid_t rfid = -1; /* file ID from reopen */
+ hid_t did = -1; /* dataset ID (both opens) */
+ hid_t sid = -1; /* dataspace ID for dataset creation */
+ hsize_t dims = 6; /* dataspace size */
+ herr_t ret; /* Generic return value */
+
+ /* Output message about test being performed */
+ MESSAGE(5, ("Testing File Re-opening\n"));
+
+ /* Create file via first ID */
+ fid = H5Fcreate(REOPEN_FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK_I(fid, "H5Fcreate");
+
+ /* Create a dataset in the file */
+ sid = H5Screate_simple(1, &dims, &dims);
+ CHECK_I(sid, "H5Screate_simple")
+ did = H5Dcreate2(fid, REOPEN_DSET, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK_I(did, "H5Dcreate2");
+
+ /* Close dataset and dataspace */
+ ret = H5Sclose(sid);
+ CHECK(ret, FAIL, "H5Sclose");
+ ret = H5Dclose(did);
+ CHECK(ret, FAIL, "H5Dclose");
+
+ /* Reopen the file with a different file ID */
+ rfid = H5Freopen(fid);
+ CHECK_I(rfid, "H5Freopen");
+
+ /* Reopen the dataset through the reopen file ID */
+ did = H5Dopen2(rfid, REOPEN_DSET, H5P_DEFAULT);
+ CHECK_I(did, "H5Dopen2");
+
+ /* Close and clean up */
+ ret = H5Dclose(did);
+ CHECK(ret, FAIL, "H5Dclose");
+ ret = H5Fclose(fid);
+ CHECK(ret, FAIL, "H5Fclose");
+ ret = H5Fclose(rfid);
+ CHECK(ret, FAIL, "H5Fclose");
+ HDremove(REOPEN_FILE);
+
+} /* test_file_reopen() */
+
+/****************************************************************
+**
** test_file_close(): low-level file close test routine.
** It mainly tests behavior with close degree.
**
@@ -3231,8 +3287,10 @@ test_filespace_compatible(void)
CHECK(fd_new, FAIL, "HDopen");
/* Copy data */
- while((nread = HDread(fd_old, buf, (size_t)READ_OLD_BUFSIZE)) > 0)
- HDwrite(fd_new, buf, (size_t)nread);
+ while((nread = HDread(fd_old, buf, (size_t)READ_OLD_BUFSIZE)) > 0) {
+ ssize_t write_err = HDwrite(fd_new, buf, (size_t)nread);
+ CHECK(write_err, -1, "HDwrite");
+ } /* end while */
/* Close the files */
ret = HDclose(fd_old);
@@ -3686,8 +3744,9 @@ test_file(void)
/* Output message about test being performed */
MESSAGE(5, ("Testing Low-Level File I/O\n"));
- test_file_create(); /* Test file creation(also creation templates)*/
- test_file_open(); /* Test file opening */
+ test_file_create(); /* Test file creation(also creation templates)*/
+ test_file_open(); /* Test file opening */
+ test_file_reopen(); /* Test file reopening */
test_file_close(); /* Test file close behavior */
test_get_file_id(); /* Test H5Iget_file_id */
test_get_obj_ids(); /* Test H5Fget_obj_ids for Jira Issue 8528 */
@@ -3741,5 +3800,7 @@ cleanup_file(void)
HDremove(FILE3);
HDremove(FILE4);
HDremove(FILE5);
+ HDremove(FILE6);
+ HDremove(FILE7);
}
diff --git a/test/tgenprop.c b/test/tgenprop.c
index c4f3a3f..b670c0d 100644
--- a/test/tgenprop.c
+++ b/test/tgenprop.c
@@ -1780,7 +1780,7 @@ test_genprop_path(void)
CHECK_PTR(path, "H5P_get_class_path_test");
if(HDstrcmp(path,CLASS1_PATH)!=0)
TestErrPrintf("Class names don't match!, path=%s, CLASS1_PATH=%s\n",path,CLASS1_PATH);
- HDfree(path);
+ H5free_memory(path);
/* Create another new generic class, derived from first class */
cid2 = H5Pcreate_class(cid1,CLASS2_NAME, NULL, NULL, NULL, NULL, NULL, NULL);
@@ -1805,7 +1805,7 @@ test_genprop_path(void)
VERIFY(ret, 1, "H5Pequal");
/* Release the path string */
- HDfree(path);
+ H5free_memory(path);
/* Close class */
ret = H5Pclose_class(cid3);
diff --git a/test/tmisc.c b/test/tmisc.c
index 9ecc2be..44d6e98 100644
--- a/test/tmisc.c
+++ b/test/tmisc.c
@@ -462,7 +462,8 @@ static void test_misc2_write_attribute(void)
ret = H5Aread(att1, type, &data_check);
CHECK(ret, FAIL, "H5Aread");
- HDfree(data_check.string);
+ ret = H5Dvlen_reclaim(type, dataspace, H5P_DEFAULT, &data_check);
+ CHECK(ret, FAIL, "H5Dvlen_reclaim");
ret = H5Aclose(att1);
CHECK(ret, FAIL, "HAclose");
@@ -487,7 +488,8 @@ static void test_misc2_write_attribute(void)
ret = H5Aread(att2, type, &data_check);
CHECK(ret, FAIL, "H5Aread");
- HDfree(data_check.string);
+ ret = H5Dvlen_reclaim(type, dataspace, H5P_DEFAULT, &data_check);
+ CHECK(ret, FAIL, "H5Dvlen_reclaim");
ret = H5Aclose(att2);
CHECK(ret, FAIL, "HAclose");
@@ -514,6 +516,7 @@ static void test_misc2_read_attribute(const char *filename, const char *att_name
{
hid_t file, root, att;
hid_t type;
+ hid_t space;
herr_t ret;
misc2_struct data_check;
@@ -528,10 +531,17 @@ static void test_misc2_read_attribute(const char *filename, const char *att_name
att = H5Aopen(root, att_name, H5P_DEFAULT);
CHECK(att, FAIL, "H5Aopen");
+ space = H5Aget_space(att);
+ CHECK(space, FAIL, "H5Aget_space");
+
ret = H5Aread(att, type, &data_check);
CHECK(ret, FAIL, "H5Aread");
- HDfree(data_check.string);
+ ret = H5Dvlen_reclaim(type, space, H5P_DEFAULT, &data_check);
+ CHECK(ret, FAIL, "H5Dvlen_reclaim");
+
+ ret = H5Sclose(space);
+ CHECK(ret, FAIL, "H5Sclose");
ret = H5Aclose(att);
CHECK(ret, FAIL, "H5Aclose");
diff --git a/test/tvlstr.c b/test/tvlstr.c
index 02bd59d..dbc3083 100644
--- a/test/tvlstr.c
+++ b/test/tvlstr.c
@@ -604,7 +604,7 @@ static void test_write_vl_string_attribute(void)
if(HDstrcmp(string_att_check,string_att) != 0)
TestErrPrintf("VL string attributes don't match!, string_att=%s, string_att_check=%s\n",string_att,string_att_check);
- HDfree(string_att_check);
+ H5free_memory(string_att_check);
string_att_check = NULL;
ret = H5Aclose(att);
@@ -626,7 +626,7 @@ static void test_write_vl_string_attribute(void)
if(HDstrcmp(string_att_check,string_att_write) != 0)
TestErrPrintf("VL string attributes don't match!, string_att_write=%s, string_att_check=%s\n",string_att_write,string_att_check);
- HDfree(string_att_check);
+ H5free_memory(string_att_check);
string_att_check = NULL;
/* The attribute string written is freed below, in the test_read_vl_string_attribute() test */
@@ -687,7 +687,7 @@ static void test_read_vl_string_attribute(void)
if(HDstrcmp(string_att_check,string_att) != 0)
TestErrPrintf("VL string attributes don't match!, string_att=%s, string_att_check=%s\n",string_att,string_att_check);
- HDfree(string_att_check);
+ H5free_memory(string_att_check);
string_att_check = NULL;
ret = H5Aclose(att);
@@ -704,7 +704,7 @@ static void test_read_vl_string_attribute(void)
if(HDstrcmp(string_att_check,string_att_write) != 0)
TestErrPrintf("VL string attributes don't match!, string_att_write=%s, string_att_check=%s\n",string_att_write,string_att_check);
- HDfree(string_att_check);
+ H5free_memory(string_att_check);
string_att_check = NULL;
}
@@ -762,7 +762,8 @@ static void read_scalar_dset(hid_t file, hid_t type, hid_t space, char *name, ch
if(HDstrcmp(data, data_read))
TestErrPrintf("Expected %s for dataset %s but read %s\n", data, name, data_read);
- HDfree(data_read);
+ ret = H5Dvlen_reclaim(type, space, H5P_DEFAULT, &data_read);
+ CHECK(ret, FAIL, "H5Dvlen_reclaim");
}
/****************************************************************
diff --git a/test/vds.c b/test/vds.c
index eff01c1..1c3dcca 100644
--- a/test/vds.c
+++ b/test/vds.c
@@ -38,6 +38,7 @@ const char *FILENAME[] = {
"vds_src_0",
"vds_src_1",
"vds%%_src",
+ "vds_dapl",
NULL
};
@@ -447,7 +448,7 @@ test_api_get_ex_dcpl(test_api_config_t config, hid_t fapl, hid_t dcpl,
} /* end else */
/* Verify examination DCPL is equal to original DCPL. Do not compare the
- * plist to itselt, and do not do the comparison if we reopened the file,
+ * plist to itself, and do not do the comparison if we reopened the file,
* because in that case the extent of the source dset will not be corrent.
*/
if((*ex_dcpl != dcpl) && (config != TEST_API_REOPEN_FILE)) {
@@ -11093,13 +11094,156 @@ error:
/*-------------------------------------------------------------------------
+ * Function: test_dapl_values
+ *
+ * Purpose: Ensure that H5Dget_access_plist returns correct values.
+ *
+ * Return: Success: 0
+ * Failure: 1
+ *
+ * Programmer: Dana Robinson
+ * March 2016
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+test_dapl_values(hid_t fapl_id)
+{
+ hid_t fid = -1; /* file to write to */
+ hid_t dcpl_id = -1; /* dataset creation properties */
+ hid_t dapl_id1 = -1; /* dataset access properties */
+ hid_t dapl_id2 = -1; /* dataset access properties */
+ hid_t vds_sid = -1; /* vds data space */
+ hid_t src_sid = -1; /* source data space */
+ hid_t did1 = -1; /* dataset */
+ hid_t did2 = -1; /* dataset */
+ hsize_t start; /* hyperslab start */
+ hsize_t stride; /* hyperslab count */
+ hsize_t count; /* hyperslab count */
+ hsize_t block; /* hyperslab count */
+ hsize_t dims; /* dataset size */
+ hsize_t max_dims; /* dataset max size */
+ H5D_vds_view_t view; /* view from dapl */
+ hsize_t gap_size; /* gap size from dapl */
+ char filename[1024]; /* file names */
+
+ TESTING("H5Dget_access_plist() returns dapl w/ correct values");
+
+ /* Create the file */
+ h5_fixname(FILENAME[5], fapl_id, filename, sizeof(filename));
+ if((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id)) < 0)
+ FAIL_STACK_ERROR
+
+ /* Create the dcpl and set up VDS mapping */
+ if((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ FAIL_STACK_ERROR
+ /* source */
+ dims = 42;
+ if((src_sid = H5Screate_simple(1, &dims, NULL)) < 0)
+ FAIL_STACK_ERROR
+ /* vds */
+ dims = 0;
+ max_dims = H5S_UNLIMITED;
+ if((vds_sid = H5Screate_simple(1, &dims, &max_dims)) < 0)
+ FAIL_STACK_ERROR
+ start = 0;
+ stride = 42;
+ count = H5S_UNLIMITED;
+ block = 42;
+ if(H5Sselect_hyperslab(vds_sid, H5S_SELECT_SET, &start, &stride, &count, &block) < 0)
+ FAIL_STACK_ERROR
+ /* map */
+ if(H5Pset_virtual(dcpl_id, vds_sid, "f-%b.h5", "/dset1", src_sid) < 0)
+ FAIL_STACK_ERROR
+
+ /* Create the dapls and set values
+ * There are two of them. The reason for this is that the only way
+ * to set the printf gap is to use the default view and using the
+ * default isn't the best way to test setting and getting the view.
+ */
+ /* dapl 1 */
+ if((dapl_id1 = H5Pcreate(H5P_DATASET_ACCESS)) < 0)
+ FAIL_STACK_ERROR
+ if(H5Pset_virtual_view(dapl_id1, H5D_VDS_FIRST_MISSING) < 0)
+ FAIL_STACK_ERROR
+ /* dapl 2 */
+ if((dapl_id2 = H5Pcreate(H5P_DATASET_ACCESS)) < 0)
+ FAIL_STACK_ERROR
+ /* default but we set it explicitly to be sure */
+ if(H5Pset_virtual_view(dapl_id2, H5D_VDS_LAST_AVAILABLE) < 0)
+ FAIL_STACK_ERROR
+ if(H5Pset_virtual_printf_gap(dapl_id2, 123) < 0)
+ FAIL_STACK_ERROR
+
+ /* Create the datasets */
+ if((did1 = H5Dcreate2(fid, "dset1", H5T_NATIVE_INT, vds_sid, H5P_DEFAULT, dcpl_id, dapl_id1)) < 0)
+ FAIL_STACK_ERROR
+ if((did2 = H5Dcreate2(fid, "dset2", H5T_NATIVE_INT, vds_sid, H5P_DEFAULT, dcpl_id, dapl_id2)) < 0)
+ FAIL_STACK_ERROR
+
+ /* Close the dapls */
+ if(H5Pclose(dapl_id1) < 0)
+ FAIL_STACK_ERROR
+ dapl_id1 = -1;
+ if(H5Pclose(dapl_id2) < 0)
+ FAIL_STACK_ERROR
+ dapl_id2 = -1;
+
+ /* Get a data access property lists from the dataset */
+ if((dapl_id1 = H5Dget_access_plist(did1)) < 0)
+ FAIL_STACK_ERROR
+ if((dapl_id2 = H5Dget_access_plist(did2)) < 0)
+ FAIL_STACK_ERROR
+
+ /* Check the values from the dapls */
+ /* dapl 1 */
+ if(H5Pget_virtual_view(dapl_id1, &view) < 0)
+ FAIL_STACK_ERROR
+ if(H5D_VDS_FIRST_MISSING != view)
+ TEST_ERROR
+ /* dapl 2 */
+ if(H5Pget_virtual_view(dapl_id2, &view) < 0)
+ FAIL_STACK_ERROR
+ if(H5D_VDS_LAST_AVAILABLE != view)
+ TEST_ERROR
+ if(H5Pget_virtual_printf_gap(dapl_id2, &gap_size) < 0)
+ FAIL_STACK_ERROR
+ if(gap_size != 123)
+
+ /* Close everything */
+ if(H5Sclose(vds_sid) < 0) FAIL_STACK_ERROR
+ if(H5Sclose(src_sid) < 0) FAIL_STACK_ERROR
+ if(H5Dclose(did1) < 0) FAIL_STACK_ERROR
+ if(H5Dclose(did2) < 0) FAIL_STACK_ERROR
+ if(H5Pclose(dapl_id1) < 0) FAIL_STACK_ERROR
+ if(H5Pclose(dapl_id2) < 0) FAIL_STACK_ERROR
+ if(H5Pclose(dcpl_id) < 0) FAIL_STACK_ERROR
+ if(H5Fclose(fid) < 0) FAIL_STACK_ERROR
+
+ PASSED();
+ return 0;
+
+ error:
+ H5E_BEGIN_TRY {
+ H5Dclose(did1);
+ H5Dclose(did2);
+ H5Pclose(dapl_id1);
+ H5Pclose(dapl_id2);
+ H5Pclose(dcpl_id);
+ H5Sclose(vds_sid);
+ H5Sclose(src_sid);
+ H5Fclose(fid);
+ } H5E_END_TRY;
+ return 1;
+} /* end test_dapl_values() */
+
+
+/*-------------------------------------------------------------------------
* Function: main
*
* Purpose: Tests datasets with virtual layout
*
- * Return: Success: exit(0)
- *
- * Failure: exit(1)
+ * Return: EXIT_SUCCESS/EXIT_FAILURE
*
* Programmer: Neil Fortner
* Tuesday, February 17, 2015
@@ -11119,7 +11263,7 @@ main(void)
h5_reset();
fapl = h5_fileaccess();
- h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
+ h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
for(test_api_config = (int)TEST_API_BASIC; test_api_config < (int)TEST_API_NTESTS; test_api_config++)
nerrors += test_api((test_api_config_t)test_api_config, fapl);
@@ -11131,6 +11275,8 @@ main(void)
nerrors += test_all(bit_config, fapl);
} /* end for */
+ nerrors += test_dapl_values(fapl);
+
/* Verify symbol table messages are cached */
nerrors += (h5_verify_cached_stabs(FILENAME, fapl) < 0 ? 1 : 0);
@@ -11139,12 +11285,12 @@ main(void)
printf("All virtual dataset tests passed.\n");
h5_cleanup(FILENAME, fapl);
- return 0;
+ return EXIT_SUCCESS;
error:
nerrors = MAX(1, nerrors);
printf("***** %d VIRTUAL DATASET TEST%s FAILED! *****\n",
nerrors, 1 == nerrors ? "" : "S");
- return 1;
+ return EXIT_FAILURE;
} /* end main() */