summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2018-04-29 08:04:21 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2018-04-29 08:04:21 (GMT)
commit01f196b31a03f072b685f998b0805c1f90322c2b (patch)
tree6e1cae004705ade1c870e4c6612a76b55be3c331 /test
parentda4b69097756158fdbfcbf52b5b552e2034d263d (diff)
parentb3c5284692093953132c6c8227e0980b670bf4ad (diff)
downloadhdf5-01f196b31a03f072b685f998b0805c1f90322c2b.zip
hdf5-01f196b31a03f072b685f998b0805c1f90322c2b.tar.gz
hdf5-01f196b31a03f072b685f998b0805c1f90322c2b.tar.bz2
Merge branch 'develop' of https://bitbucket.hdfgroup.org/scm/hdffv/hdf5 into merge_hyperslab_updates
Diffstat (limited to 'test')
-rw-r--r--test/CMakeLists.txt377
-rw-r--r--test/CMakeTests.cmake716
-rw-r--r--test/CMakeVFDTests.cmake318
-rw-r--r--test/COPYING11
-rw-r--r--test/H5srcdir.h10
-rw-r--r--test/H5srcdir_str.h.in10
-rw-r--r--test/Makefile.am61
-rw-r--r--test/accum.c307
-rw-r--r--test/accum_swmr_reader.c26
-rw-r--r--test/app_ref.c10
-rw-r--r--test/atomic_reader.c10
-rw-r--r--test/atomic_writer.c10
-rw-r--r--test/bad_offset.h5bin0 -> 3312 bytes
-rw-r--r--test/big.c16
-rw-r--r--test/bittests.c10
-rw-r--r--test/btree2.c1856
-rw-r--r--test/cache.c241
-rw-r--r--test/cache_api.c10
-rw-r--r--test/cache_common.c117
-rw-r--r--test/cache_common.h10
-rw-r--r--test/cache_image.c20
-rw-r--r--test/cache_logging.c10
-rw-r--r--test/cache_tagging.c60
-rw-r--r--test/chunk_info.c11
-rw-r--r--test/cmpd_dset.c10
-rw-r--r--test/cork.c11
-rw-r--r--test/cross_read.c12
-rw-r--r--test/dangle.c113
-rw-r--r--test/dsets.c3611
-rw-r--r--test/dt_arith.c10
-rw-r--r--test/dtransform.c10
-rw-r--r--test/dtypes.c691
-rw-r--r--test/dynlib1.c97
-rw-r--r--test/dynlib2.c94
-rw-r--r--test/dynlib3.c105
-rw-r--r--test/dynlib4.c104
-rw-r--r--test/earray.c174
-rw-r--r--test/efc.c1549
-rw-r--r--test/enc_dec_plist.c10
-rw-r--r--test/enc_dec_plist_cross_platform.c14
-rw-r--r--test/enum.c10
-rw-r--r--test/err_compat.c10
-rw-r--r--test/error_test.c426
-rw-r--r--test/evict_on_close.c109
-rw-r--r--test/extend.c10
-rw-r--r--test/external.c18
-rw-r--r--test/farray.c148
-rw-r--r--test/fheap.c2741
-rw-r--r--test/file_image.c16
-rw-r--r--test/filenotclosed.c146
-rw-r--r--test/fillval.c12
-rw-r--r--test/filter_fail.c10
-rw-r--r--test/filter_plugin.c1559
-rw-r--r--test/filter_plugin1_dsets.c93
-rw-r--r--test/filter_plugin2_dsets.c88
-rw-r--r--test/filter_plugin3_dsets.c119
-rw-r--r--test/filter_plugin4_groups.c106
-rw-r--r--test/flush1.c10
-rw-r--r--test/flush2.c10
-rw-r--r--test/flushrefresh.c9
-rw-r--r--test/freespace.c414
-rw-r--r--test/gen_bad_compound.c10
-rw-r--r--test/gen_bad_offset.c147
-rw-r--r--test/gen_bad_ohdr.c10
-rw-r--r--test/gen_bogus.c10
-rw-r--r--test/gen_bounds.c619
-rw-r--r--test/gen_cross.c55
-rw-r--r--test/gen_deflate.c10
-rw-r--r--test/gen_file_image.c10
-rw-r--r--test/gen_filespace.c10
-rw-r--r--test/gen_filters.c10
-rw-r--r--test/gen_mergemsg.c10
-rw-r--r--test/gen_new_array.c10
-rw-r--r--test/gen_new_fill.c10
-rw-r--r--test/gen_new_group.c10
-rw-r--r--test/gen_new_mtime.c10
-rw-r--r--test/gen_new_super.c10
-rw-r--r--test/gen_noencoder.c10
-rw-r--r--test/gen_nullspace.c10
-rw-r--r--test/gen_old_array.c10
-rw-r--r--test/gen_old_group.c10
-rw-r--r--test/gen_old_layout.c10
-rw-r--r--test/gen_old_mtime.c10
-rw-r--r--test/gen_plist.c24
-rw-r--r--test/gen_sizes_lheap.c10
-rw-r--r--test/gen_specmetaread.c10
-rw-r--r--test/gen_udlinks.c10
-rw-r--r--test/genall5.c137
-rw-r--r--test/genall5.h10
-rw-r--r--test/getname.c10
-rw-r--r--test/gheap.c414
-rw-r--r--test/h5test.c91
-rw-r--r--test/h5test.h16
-rw-r--r--test/hyperslab.c422
-rw-r--r--test/istore.c512
-rw-r--r--test/lheap.c30
-rw-r--r--test/links.c38
-rw-r--r--test/links_env.c10
-rw-r--r--test/mf.c889
-rw-r--r--test/mount.c10
-rw-r--r--test/mtime.c10
-rw-r--r--test/ntypes.c10
-rw-r--r--test/objcopy.c2385
-rw-r--r--test/ohdr.c348
-rw-r--r--test/page_buffer.c276
-rw-r--r--test/plugin.c1073
-rw-r--r--test/pool.c10
-rw-r--r--test/reserved.c10
-rw-r--r--test/set_extent.c68
-rw-r--r--test/space_overflow.c10
-rw-r--r--test/stab.c12
-rw-r--r--test/swmr.c44
-rw-r--r--test/swmr_addrem_writer.c10
-rw-r--r--test/swmr_check_compat_vfd.c10
-rw-r--r--test/swmr_common.c10
-rw-r--r--test/swmr_common.h10
-rw-r--r--test/swmr_generator.c10
-rw-r--r--test/swmr_reader.c10
-rw-r--r--test/swmr_remove_reader.c12
-rw-r--r--test/swmr_remove_writer.c12
-rw-r--r--test/swmr_sparse_reader.c10
-rw-r--r--test/swmr_sparse_writer.c10
-rw-r--r--test/swmr_start_write.c175
-rw-r--r--test/swmr_writer.c10
-rw-r--r--test/tarray.c74
-rw-r--r--test/tattr.c1252
-rw-r--r--test/tcheck_version.c10
-rw-r--r--test/tchecksum.c12
-rw-r--r--test/tconfig.c67
-rw-r--r--test/tcoords.c20
-rw-r--r--test/test_filenotclosed.sh.in41
-rw-r--r--test/test_filter_plugin.sh.in113
-rw-r--r--test/test_plugin.sh.in102
-rw-r--r--test/test_usecases.sh.in10
-rw-r--r--test/testcheck_version.sh.in10
-rw-r--r--test/testerror.sh.in10
-rw-r--r--test/testfiles/error_test_14
-rw-r--r--test/testfiles/plist_files/dapl_32bebin186 -> 199 bytes
-rw-r--r--test/testfiles/plist_files/dapl_32lebin186 -> 199 bytes
-rw-r--r--test/testfiles/plist_files/dapl_64bebin186 -> 199 bytes
-rw-r--r--test/testfiles/plist_files/dapl_64lebin186 -> 199 bytes
-rw-r--r--test/testfiles/plist_files/def_dapl_32bebin181 -> 194 bytes
-rw-r--r--test/testfiles/plist_files/def_dapl_32lebin181 -> 194 bytes
-rw-r--r--test/testfiles/plist_files/def_dapl_64bebin181 -> 194 bytes
-rw-r--r--test/testfiles/plist_files/def_dapl_64lebin181 -> 194 bytes
-rw-r--r--test/testfiles/plist_files/def_dxpl_32bebin245 -> 225 bytes
-rw-r--r--test/testfiles/plist_files/def_dxpl_32lebin245 -> 225 bytes
-rw-r--r--test/testfiles/plist_files/def_dxpl_64bebin245 -> 225 bytes
-rw-r--r--test/testfiles/plist_files/def_dxpl_64lebin245 -> 225 bytes
-rw-r--r--test/testfiles/plist_files/def_fapl_32bebin1520 -> 1711 bytes
-rw-r--r--test/testfiles/plist_files/def_fapl_32lebin1520 -> 1711 bytes
-rw-r--r--test/testfiles/plist_files/def_fapl_64bebin1520 -> 1711 bytes
-rw-r--r--test/testfiles/plist_files/def_fapl_64lebin1520 -> 1711 bytes
-rw-r--r--test/testfiles/plist_files/dxpl_32bebin249 -> 229 bytes
-rw-r--r--test/testfiles/plist_files/dxpl_32lebin249 -> 229 bytes
-rw-r--r--test/testfiles/plist_files/dxpl_64bebin249 -> 229 bytes
-rw-r--r--test/testfiles/plist_files/dxpl_64lebin249 -> 229 bytes
-rw-r--r--test/testfiles/plist_files/fapl_32bebin1522 -> 1713 bytes
-rw-r--r--test/testfiles/plist_files/fapl_32lebin1522 -> 1713 bytes
-rw-r--r--test/testfiles/plist_files/fapl_64bebin1522 -> 1713 bytes
-rw-r--r--test/testfiles/plist_files/fapl_64lebin1522 -> 1713 bytes
-rw-r--r--test/testfiles/plist_files/lapl_32bebin1625 -> 1816 bytes
-rw-r--r--test/testfiles/plist_files/lapl_32lebin1625 -> 1816 bytes
-rw-r--r--test/testfiles/plist_files/lapl_64bebin1625 -> 1816 bytes
-rw-r--r--test/testfiles/plist_files/lapl_64lebin1625 -> 1816 bytes
-rw-r--r--test/testflushrefresh.sh.in10
-rw-r--r--test/testframe.c10
-rw-r--r--test/testhdf5.c10
-rw-r--r--test/testhdf5.h246
-rw-r--r--test/testlibinfo.sh.in10
-rw-r--r--test/testlinks_env.sh.in10
-rw-r--r--test/testmeta.c10
-rw-r--r--test/testswmr.sh.in10
-rw-r--r--test/testvdsswmr.sh.in10
-rw-r--r--test/tfile.c2758
-rw-r--r--test/tgenprop.c164
-rw-r--r--test/th5o.c205
-rw-r--r--test/th5s.c414
-rw-r--r--test/theap.c52
-rw-r--r--test/tid.c695
-rw-r--r--test/titerate.c72
-rw-r--r--test/tmeta.c10
-rw-r--r--test/tmisc.c582
-rw-r--r--test/trefer.c188
-rw-r--r--test/trefstr.c42
-rw-r--r--test/tselect.c140
-rw-r--r--test/tskiplist.c166
-rw-r--r--test/tsohm.c10
-rw-r--r--test/ttime.c24
-rw-r--r--test/ttsafe.c10
-rw-r--r--test/ttsafe.h13
-rw-r--r--test/ttsafe_acreate.c10
-rw-r--r--test/ttsafe_cancel.c10
-rw-r--r--test/ttsafe_dcreate.c10
-rw-r--r--test/ttsafe_error.c14
-rw-r--r--test/ttst.c28
-rw-r--r--test/tunicode.c10
-rw-r--r--test/tvlstr.c68
-rw-r--r--test/tvltypes.c153
-rw-r--r--test/twriteorder.c22
-rw-r--r--test/unlink.c10
-rw-r--r--test/unregister.c24
-rw-r--r--test/use.h10
-rw-r--r--test/use_append_chunk.c10
-rw-r--r--test/use_append_mchunks.c10
-rw-r--r--test/use_common.c24
-rw-r--r--test/use_disable_mdc_flushes.c10
-rw-r--r--test/vds.c1539
-rw-r--r--test/vds_swmr.h10
-rw-r--r--test/vds_swmr_gen.c10
-rw-r--r--test/vds_swmr_reader.c12
-rw-r--r--test/vds_swmr_writer.c10
-rw-r--r--test/vfd.c166
213 files changed, 20146 insertions, 14725 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index d7965cb..3756dc0 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -1,5 +1,5 @@
-cmake_minimum_required (VERSION 3.2.2)
-PROJECT (HDF5_TEST)
+cmake_minimum_required (VERSION 3.10)
+project (HDF5_TEST C)
#-----------------------------------------------------------------------------
# Apply Definitions to compiler in this directory and below
@@ -9,13 +9,12 @@ add_definitions (${HDF_EXTRA_C_FLAGS})
#-----------------------------------------------------------------------------
# Generate the H5srcdir_str.h file containing user settings needed by compilation
#-----------------------------------------------------------------------------
-set (srcdir ${CMAKE_CURRENT_SOURCE_DIR})
+set (srcdir ${HDF5_TEST_SOURCE_DIR})
configure_file (${HDF5_TEST_SOURCE_DIR}/H5srcdir_str.h.in H5srcdir_str.h @ONLY)
-INCLUDE_DIRECTORIES (${CMAKE_CURRENT_BINARY_DIR})
-#-----------------------------------------------------------------------------
+#################################################################################
# Define Test Library Sources
-#-----------------------------------------------------------------------------
+#################################################################################
set (TEST_LIB_SOURCES
${HDF5_TEST_SOURCE_DIR}/h5test.c
${HDF5_TEST_SOURCE_DIR}/testframe.c
@@ -30,15 +29,17 @@ set (TEST_LIB_HEADERS
)
add_library (${HDF5_TEST_LIB_TARGET} STATIC ${TEST_LIB_SOURCES} ${TEST_LIB_HEADERS})
+set_property(TARGET ${HDF5_TEST_LIB_TARGET} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_TEST_BINARY_DIR}")
TARGET_C_PROPERTIES (${HDF5_TEST_LIB_TARGET} STATIC " " " ")
if (MSVC)
- target_link_libraries (${HDF5_TEST_LIB_TARGET} "ws2_32.lib")
+ target_link_libraries (${HDF5_TEST_LIB_TARGET} PRIVATE "ws2_32.lib")
endif ()
if (MINGW)
- target_link_libraries (${HDF5_TEST_LIB_TARGET} "wsock32.lib")
+ target_link_libraries (${HDF5_TEST_LIB_TARGET} PRIVATE "wsock32.lib")
endif ()
-target_link_libraries (${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
-H5_SET_LIB_OPTIONS (${HDF5_TEST_LIB_TARGET} ${HDF5_TEST_LIB_NAME} STATIC)
+target_link_libraries (${HDF5_TEST_LIB_TARGET} PUBLIC ${LINK_LIBS})
+target_link_libraries (${HDF5_TEST_LIB_TARGET} PUBLIC ${HDF5_LIB_TARGET})
+H5_SET_LIB_OPTIONS (${HDF5_TEST_LIB_TARGET} ${HDF5_TEST_LIB_NAME} STATIC 0)
set_target_properties (${HDF5_TEST_LIB_TARGET} PROPERTIES
FOLDER libraries/test
INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
@@ -46,15 +47,17 @@ set_target_properties (${HDF5_TEST_LIB_TARGET} PROPERTIES
if (BUILD_SHARED_LIBS)
add_library (${HDF5_TEST_LIBSH_TARGET} SHARED ${TEST_LIB_SOURCES} ${TEST_LIB_HEADERS})
+ set_property(TARGET ${HDF5_TEST_LIBSH_TARGET} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_TEST_BINARY_DIR}")
TARGET_C_PROPERTIES (${HDF5_TEST_LIBSH_TARGET} SHARED " " " ")
if (MSVC)
- target_link_libraries (${HDF5_TEST_LIBSH_TARGET} "ws2_32.lib")
+ target_link_libraries (${HDF5_TEST_LIBSH_TARGET} PRIVATE "ws2_32.lib")
endif ()
if (MINGW)
- target_link_libraries (${HDF5_TEST_LIBSH_TARGET} "wsock32.lib")
+ target_link_libraries (${HDF5_TEST_LIBSH_TARGET} PRIVATE "wsock32.lib")
endif ()
- target_link_libraries (${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
- H5_SET_LIB_OPTIONS (${HDF5_TEST_LIBSH_TARGET} ${HDF5_TEST_LIB_NAME} SHARED ${HDF5_PACKAGE_SOVERSION})
+ target_link_libraries (${HDF5_TEST_LIBSH_TARGET} PUBLIC ${LINK_LIBS})
+ target_link_libraries (${HDF5_TEST_LIBSH_TARGET} PUBLIC ${HDF5_LIBSH_TARGET})
+ H5_SET_LIB_OPTIONS (${HDF5_TEST_LIBSH_TARGET} ${HDF5_TEST_LIB_NAME} SHARED "LIB")
set_target_properties (${HDF5_TEST_LIBSH_TARGET} PROPERTIES
FOLDER libraries/test
COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB"
@@ -69,77 +72,79 @@ if (BUILD_SHARED_LIBS)
endif ()
endif ()
-#-----------------------------------------------------------------------------
-# If plugin library tests can be tested
-#-----------------------------------------------------------------------------
+#################################################################################
+# If filter plugin tests can be tested
+#################################################################################
# make plugins dir
- file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/testdir1")
- file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/testdir2")
+ file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/filter_plugin_dir1")
+ file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/filter_plugin_dir2")
#-----------------------------------------------------------------------------
- # Define Plugin Test Sources
+ # Define Filter Plugin Test Sources
#-----------------------------------------------------------------------------
- set (TEST_PLUGIN_LIBS
- dynlib1
- dynlib3
+ set (FILTER_PLUGINS_FOR_DIR1
+ filter_plugin1_dsets
+ filter_plugin3_dsets
)
- set (TEST2_PLUGIN_LIBS
- dynlib2
- dynlib4
+ set (FILTER_PLUGINS_FOR_DIR2
+ filter_plugin2_dsets
+ filter_plugin4_groups
)
- foreach (test_lib ${TEST_PLUGIN_LIBS})
- set (HDF5_TEST_PLUGIN_LIB_CORENAME "${test_lib}")
- set (HDF5_TEST_PLUGIN_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TEST_PLUGIN_LIB_CORENAME}")
- set (HDF5_TEST_PLUGIN_LIB_TARGET ${HDF5_TEST_PLUGIN_LIB_CORENAME})
- add_definitions (${HDF_EXTRA_C_FLAGS})
- INCLUDE_DIRECTORIES (${HDF5_SRC_DIR})
+ foreach (plugin_name ${FILTER_PLUGINS_FOR_DIR1})
+ set (HDF5_TEST_PLUGIN_CORENAME "${plugin_name}")
+ set (HDF5_TEST_PLUGIN_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TEST_PLUGIN_CORENAME}")
+ set (HDF5_TEST_PLUGIN_TARGET ${HDF5_TEST_PLUGIN_CORENAME})
- 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_PACKAGE_SOVERSION})
- set_target_properties (${HDF5_TEST_PLUGIN_LIB_TARGET} PROPERTIES FOLDER libraries/TEST_PLUGIN)
+ add_library (${HDF5_TEST_PLUGIN_TARGET} SHARED ${HDF5_TEST_SOURCE_DIR}/${plugin_name}.c)
+ set_property(TARGET ${HDF5_TEST_PLUGIN_TARGET} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
+ TARGET_C_PROPERTIES (${HDF5_TEST_PLUGIN_TARGET} SHARED " " " ")
+ target_link_libraries (${HDF5_TEST_PLUGIN_TARGET} PUBLIC ${HDF5_TEST_LIB_TARGET})
+ H5_SET_LIB_OPTIONS (${HDF5_TEST_PLUGIN_TARGET} ${HDF5_TEST_PLUGIN_NAME} SHARED "LIB")
+ set_target_properties (${HDF5_TEST_PLUGIN_TARGET} PROPERTIES FOLDER libraries/TEST_PLUGIN)
#-----------------------------------------------------------------------------
- # Copy plugin library to a plugins folder
+ # Copy the filter plugin to a plugins folder
#-----------------------------------------------------------------------------
add_custom_command (
- TARGET ${HDF5_TEST_PLUGIN_LIB_TARGET}
+ TARGET ${HDF5_TEST_PLUGIN_TARGET}
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different
- "$<TARGET_FILE:${HDF5_TEST_PLUGIN_LIB_TARGET}>"
- "${CMAKE_BINARY_DIR}/testdir1/$<TARGET_FILE_NAME:${HDF5_TEST_PLUGIN_LIB_TARGET}>"
+ "$<TARGET_FILE:${HDF5_TEST_PLUGIN_TARGET}>"
+ "${CMAKE_BINARY_DIR}/filter_plugin_dir1/$<TARGET_FILE_NAME:${HDF5_TEST_PLUGIN_TARGET}>"
)
endforeach ()
- foreach (test_lib ${TEST2_PLUGIN_LIBS})
- set (HDF5_TEST_PLUGIN_LIB_CORENAME "${test_lib}")
- set (HDF5_TEST_PLUGIN_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TEST_PLUGIN_LIB_CORENAME}")
- set (HDF5_TEST_PLUGIN_LIB_TARGET ${HDF5_TEST_PLUGIN_LIB_CORENAME})
- add_definitions (${HDF_EXTRA_C_FLAGS})
- INCLUDE_DIRECTORIES (${HDF5_SRC_DIR})
+ foreach (plugin_name ${FILTER_PLUGINS_FOR_DIR2})
+ set (HDF5_TEST_PLUGIN_CORENAME "${plugin_name}")
+ set (HDF5_TEST_PLUGIN_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TEST_PLUGIN_CORENAME}")
+ set (HDF5_TEST_PLUGIN_TARGET ${HDF5_TEST_PLUGIN_CORENAME})
- 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_PACKAGE_SOVERSION})
- set_target_properties (${HDF5_TEST_PLUGIN_LIB_TARGET} PROPERTIES FOLDER libraries/TEST_PLUGIN)
+ add_library (${HDF5_TEST_PLUGIN_TARGET} SHARED ${HDF5_TEST_SOURCE_DIR}/${plugin_name}.c)
+ set_property(TARGET ${HDF5_TEST_PLUGIN_TARGET} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
+ TARGET_C_PROPERTIES (${HDF5_TEST_PLUGIN_TARGET} SHARED " " " ")
+ target_link_libraries (${HDF5_TEST_PLUGIN_TARGET} PUBLIC ${HDF5_TEST_LIB_TARGET})
+ H5_SET_LIB_OPTIONS (${HDF5_TEST_PLUGIN_TARGET} ${HDF5_TEST_PLUGIN_NAME} SHARED "LIB")
+ set_target_properties (${HDF5_TEST_PLUGIN_TARGET} PROPERTIES FOLDER libraries/TEST_PLUGIN)
#-----------------------------------------------------------------------------
- # Copy plugin library to a plugins folder
+ # Copy the filter plugin to a plugins folder
#-----------------------------------------------------------------------------
add_custom_command (
- TARGET ${HDF5_TEST_PLUGIN_LIB_TARGET}
+ TARGET ${HDF5_TEST_PLUGIN_TARGET}
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different
- "$<TARGET_FILE:${HDF5_TEST_PLUGIN_LIB_TARGET}>"
- "${CMAKE_BINARY_DIR}/testdir2/$<TARGET_FILE_NAME:${HDF5_TEST_PLUGIN_LIB_TARGET}>"
+ "$<TARGET_FILE:${HDF5_TEST_PLUGIN_TARGET}>"
+ "${CMAKE_BINARY_DIR}/filter_plugin_dir2/$<TARGET_FILE_NAME:${HDF5_TEST_PLUGIN_TARGET}>"
)
endforeach ()
+#################################################################################
+# Test program sources
+#################################################################################
+
set (testhdf5_SOURCES
${HDF5_TEST_SOURCE_DIR}/testhdf5.c
${HDF5_TEST_SOURCE_DIR}/tarray.c
@@ -168,38 +173,24 @@ set (testhdf5_SOURCES
${HDF5_TEST_SOURCE_DIR}/tvlstr.c
)
-#-- Adding test for testhdf5
-add_executable (testhdf5 ${testhdf5_SOURCES})
-TARGET_NAMING (testhdf5 STATIC)
-TARGET_C_PROPERTIES (testhdf5 STATIC " " " ")
-target_link_libraries (testhdf5 ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
-set_target_properties (testhdf5 PROPERTIES FOLDER test)
-if (BUILD_SHARED_LIBS)
- add_executable (testhdf5-shared ${testhdf5_SOURCES})
- TARGET_NAMING (testhdf5-shared SHARED)
- TARGET_C_PROPERTIES (testhdf5-shared SHARED " " " ")
- target_link_libraries (testhdf5-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
- set_target_properties (testhdf5-shared PROPERTIES FOLDER test)
-endif ()
+set (cache_image_SOURCES
+ ${HDF5_TEST_SOURCE_DIR}/cache_image.c
+ ${HDF5_TEST_SOURCE_DIR}/genall5.c
+)
-MACRO (ADD_H5_EXE file)
- add_executable (${file} ${HDF5_TEST_SOURCE_DIR}/${file}.c)
- TARGET_NAMING (${file} STATIC)
- TARGET_C_PROPERTIES (${file} STATIC " " " ")
- target_link_libraries (${file} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
- set_target_properties (${file} PROPERTIES FOLDER test)
- if (BUILD_SHARED_LIBS)
- add_executable (${file}-shared ${HDF5_TEST_SOURCE_DIR}/${file}.c)
- TARGET_NAMING (${file}-shared SHARED)
- TARGET_C_PROPERTIES (${file}-shared SHARED " " " ")
- target_link_libraries (${file}-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
- set_target_properties (${file}-shared PROPERTIES FOLDER test)
- endif ()
-ENDMACRO ()
+set (ttsafe_SOURCES
+ ${HDF5_TEST_SOURCE_DIR}/ttsafe.c
+ ${HDF5_TEST_SOURCE_DIR}/ttsafe_dcreate.c
+ ${HDF5_TEST_SOURCE_DIR}/ttsafe_error.c
+ ${HDF5_TEST_SOURCE_DIR}/ttsafe_cancel.c
+ ${HDF5_TEST_SOURCE_DIR}/ttsafe_acreate.c
+)
set (H5_TESTS
+ testhdf5 # multiple source
cache
cache_api
+ cache_image # multiple source
cache_tagging
lheap
ohdr
@@ -212,9 +203,11 @@ set (H5_TESTS
fheap
pool
accum
+ hyperslab
istore
bittests
dt_arith
+ page_buffer
dtypes
dsets
cmpd_dset
@@ -235,6 +228,7 @@ set (H5_TESTS
app_ref
enum
set_extent
+ ttsafe # multiple source
enc_dec_plist
enc_dec_plist_cross_platform
getname
@@ -246,7 +240,6 @@ set (H5_TESTS
cross_read
freespace
mf
- page_buffer
vds
file_image
unregister
@@ -255,104 +248,74 @@ set (H5_TESTS
swmr
)
-foreach (test ${H5_TESTS})
- ADD_H5_EXE(${test})
-endforeach ()
-
-set (H5_SWMR_TESTS
- swmr_addrem_writer
- swmr_check_compat_vfd
- swmr_generator
- swmr_reader
- swmr_remove_reader
- swmr_remove_writer
- swmr_sparse_reader
- swmr_sparse_writer
- swmr_start_write
- swmr_writer
-)
-
-foreach (test ${H5_SWMR_TESTS})
- ADD_H5_EXE(${test})
-endforeach ()
+macro (ADD_H5_EXE file)
+ add_executable (${file} ${HDF5_TEST_SOURCE_DIR}/${file}.c)
+ set_property(TARGET ${file} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_TEST_BINARY_DIR}")
+ TARGET_C_PROPERTIES (${file} STATIC " " " ")
+ target_link_libraries (${file} PUBLIC ${HDF5_TEST_LIB_TARGET})
+ set_target_properties (${file} PROPERTIES FOLDER test)
+ if (BUILD_SHARED_LIBS)
+ add_executable (${file}-shared ${HDF5_TEST_SOURCE_DIR}/${file}.c)
+ set_property(TARGET ${file}-shared APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_TEST_BINARY_DIR}")
+ TARGET_C_PROPERTIES (${file}-shared SHARED " " " ")
+ target_link_libraries (${file}-shared PUBLIC ${HDF5_TEST_LIBSH_TARGET})
+ set_target_properties (${file}-shared PROPERTIES FOLDER test)
+ endif ()
+endmacro ()
-set (H5_VDS_SWMR_TESTS
- vds_swmr_gen
- vds_swmr_reader
- vds_swmr_writer
+set (H5_TESTS_MULTIPLE
+ testhdf5
+ cache_image
+ ttsafe
)
-
-foreach (test ${H5_VDS_SWMR_TESTS})
- ADD_H5_EXE(${test})
+# Only build single source tests here
+foreach (test ${H5_TESTS})
+ if (NOT ${test} IN_LIST H5_TESTS_MULTIPLE)
+ ADD_H5_EXE(${test})
+ endif ()
endforeach ()
##############################################################################
+### M U L T I P L E S O U R C E T E S T S ###
##############################################################################
-### A D D I T I O N A L T E S T S ###
-##############################################################################
-##############################################################################
+
+#-- Adding test for testhdf5
+add_executable (testhdf5 ${testhdf5_SOURCES})
+set_property(TARGET testhdf5 APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
+TARGET_C_PROPERTIES (testhdf5 STATIC " " " ")
+target_link_libraries (testhdf5 ${HDF5_TEST_LIB_TARGET})
+set_target_properties (testhdf5 PROPERTIES FOLDER test)
+if (BUILD_SHARED_LIBS)
+ add_executable (testhdf5-shared ${testhdf5_SOURCES})
+ set_property(TARGET testhdf5-shared APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
+ TARGET_C_PROPERTIES (testhdf5-shared SHARED " " " ")
+ target_link_libraries (testhdf5-shared PUBLIC ${HDF5_TEST_LIBSH_TARGET})
+ set_target_properties (testhdf5-shared PROPERTIES FOLDER test)
+endif ()
#-- Adding test for cache_image
-add_executable (cache_image
- ${HDF5_TEST_SOURCE_DIR}/cache_image.c
- ${HDF5_TEST_SOURCE_DIR}/genall5.c
-)
-TARGET_NAMING (cache_image STATIC)
+add_executable (cache_image ${cache_image_SOURCES})
+set_property(TARGET cache_image APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (cache_image STATIC " " " ")
target_link_libraries (cache_image ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
set_target_properties (cache_image PROPERTIES FOLDER test)
if (BUILD_SHARED_LIBS)
- add_executable (cache_image-shared
- ${HDF5_TEST_SOURCE_DIR}/cache_image.c
- ${HDF5_TEST_SOURCE_DIR}/genall5.c
- )
- TARGET_NAMING (cache_image-shared SHARED)
+ add_executable (cache_image-shared ${cache_image_SOURCES})
+ set_property(TARGET cache_image-shared APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (cache_image-shared SHARED " " " ")
target_link_libraries (cache_image-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
set_target_properties (cache_image-shared PROPERTIES FOLDER test)
endif ()
-#-- Adding test for hyperslab
-add_executable (hyperslab ${HDF5_TEST_SOURCE_DIR}/hyperslab.c)
-TARGET_NAMING (hyperslab STATIC)
-TARGET_C_PROPERTIES (hyperslab STATIC " " " ")
-target_link_libraries (hyperslab ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
-set_target_properties (hyperslab PROPERTIES FOLDER test)
-if (BUILD_SHARED_LIBS)
- add_executable (hyperslab-shared ${HDF5_TEST_SOURCE_DIR}/hyperslab.c)
- TARGET_NAMING (hyperslab-shared SHARED)
- TARGET_C_PROPERTIES (hyperslab-shared SHARED " " " ")
- target_link_libraries (hyperslab-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
- set_target_properties (hyperslab-shared PROPERTIES FOLDER test)
- if (HDF5_ENABLE_THREADSAFE)
- set_property (TARGET hyperslab-shared
- APPEND PROPERTY COMPILE_DEFINITIONS
- "H5_HAVE_THREADSAFE"
- )
- endif ()
-endif ()
-
#-- Adding test for ttsafe
-add_executable (ttsafe
- ${HDF5_TEST_SOURCE_DIR}/ttsafe.c
- ${HDF5_TEST_SOURCE_DIR}/ttsafe_dcreate.c
- ${HDF5_TEST_SOURCE_DIR}/ttsafe_error.c
- ${HDF5_TEST_SOURCE_DIR}/ttsafe_cancel.c
- ${HDF5_TEST_SOURCE_DIR}/ttsafe_acreate.c
-)
-TARGET_NAMING (ttsafe STATIC)
+add_executable (ttsafe ${ttsafe_SOURCES})
+set_property(TARGET ttsafe APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (ttsafe STATIC " " " ")
target_link_libraries (ttsafe ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
set_target_properties (ttsafe PROPERTIES FOLDER test)
if (BUILD_SHARED_LIBS)
- add_executable (ttsafe-shared
- ${HDF5_TEST_SOURCE_DIR}/ttsafe.c
- ${HDF5_TEST_SOURCE_DIR}/ttsafe_dcreate.c
- ${HDF5_TEST_SOURCE_DIR}/ttsafe_error.c
- ${HDF5_TEST_SOURCE_DIR}/ttsafe_cancel.c
- ${HDF5_TEST_SOURCE_DIR}/ttsafe_acreate.c
- )
- TARGET_NAMING (ttsafe-shared SHARED)
+ add_executable (ttsafe-shared ${ttsafe_SOURCES})
+ set_property(TARGET ttsafe-shared APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (ttsafe-shared SHARED " " " ")
target_link_libraries (ttsafe-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
set_target_properties (ttsafe-shared PROPERTIES FOLDER test)
@@ -364,6 +327,10 @@ if (BUILD_SHARED_LIBS)
endif ()
endif ()
+##############################################################################
+### A D D I T I O N A L T E S T S ###
+##############################################################################
+
set (H5_CHECK_TESTS
error_test
err_compat
@@ -372,6 +339,7 @@ set (H5_CHECK_TESTS
atomic_writer
atomic_reader
links_env
+ filenotclosed
flushrefresh
)
@@ -379,11 +347,54 @@ foreach (test ${H5_CHECK_TESTS})
ADD_H5_EXE(${test})
endforeach ()
+#-- Adding test for libinfo
+set (GREP_RUNNER ${PROJECT_BINARY_DIR}/GrepRunner.cmake)
+file (WRITE ${GREP_RUNNER}
+ "file (STRINGS \${TEST_PROGRAM} TEST_RESULT REGEX \"SUMMARY OF THE HDF5 CONFIGURATION\")
+if (\${TEST_RESULT} STREQUAL \"0\")
+ message (FATAL_ERROR \"Failed: The output: \${TEST_RESULT} of \${TEST_PROGRAM} did not contain SUMMARY OF THE HDF5 CONFIGURATION\")
+else ()
+ message (STATUS \"COMMAND Result: \${TEST_RESULT}\")
+endif ()
+"
+)
+
+##############################################################################
+### S W I M M E R T E S T S ###
+##############################################################################
+
+set (H5_SWMR_TESTS
+ swmr_addrem_writer
+ swmr_check_compat_vfd
+ swmr_generator
+ swmr_reader
+ swmr_remove_reader
+ swmr_remove_writer
+ swmr_sparse_reader
+ swmr_sparse_writer
+ swmr_start_write
+ swmr_writer
+)
+
+foreach (test ${H5_SWMR_TESTS})
+ ADD_H5_EXE(${test})
+endforeach ()
+
+set (H5_VDS_SWMR_TESTS
+ vds_swmr_gen
+ vds_swmr_reader
+ vds_swmr_writer
+)
+
+foreach (test ${H5_VDS_SWMR_TESTS})
+ ADD_H5_EXE(${test})
+endforeach ()
+
#-- Adding test for accum_swmr_reader
# This has to be copied to the test directory for execve() to find it
# and it can't be renamed (i.e., no <foo>-shared).
add_executable (accum_swmr_reader ${HDF5_TEST_SOURCE_DIR}/accum_swmr_reader.c)
-TARGET_NAMING (accum_swmr_reader STATIC)
+set_property(TARGET accum_swmr_reader APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (accum_swmr_reader STATIC " " " ")
target_link_libraries (accum_swmr_reader ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
set_target_properties (accum_swmr_reader PROPERTIES FOLDER test)
@@ -394,33 +405,21 @@ if (BUILD_SHARED_LIBS)
set_target_properties (accum-shared PROPERTIES DEPENDS accum_swmr_reader)
endif ()
-#-- Adding test for libinfo
-set (GREP_RUNNER ${PROJECT_BINARY_DIR}/GrepRunner.cmake)
-file (WRITE ${GREP_RUNNER}
- "file (STRINGS \${TEST_PROGRAM} TEST_RESULT REGEX \"SUMMARY OF THE HDF5 CONFIGURATION\")
-if (\${TEST_RESULT} STREQUAL \"0\")
- message (FATAL_ERROR \"Failed: The output: \${TEST_RESULT} of \${TEST_PROGRAM} did not contain SUMMARY OF THE HDF5 CONFIGURATION\")
-else ()
- message (STATUS \"COMMAND Result: \${TEST_RESULT}\")
-endif ()
-"
-)
-
##############################################################################
### P L U G I N T E S T S
##############################################################################
if (BUILD_SHARED_LIBS)
- add_executable (plugin ${HDF5_TEST_SOURCE_DIR}/plugin.c)
- TARGET_NAMING (plugin SHARED)
- TARGET_C_PROPERTIES (plugin SHARED " " " ")
- target_link_libraries (plugin ${HDF5_TEST_LIB_TARGET})
- set_target_properties (plugin PROPERTIES FOLDER test)
+ add_executable (filter_plugin ${HDF5_TEST_SOURCE_DIR}/filter_plugin.c)
+ set_property(TARGET filter_plugin APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
+ TARGET_C_PROPERTIES (filter_plugin SHARED " " " ")
+ target_link_libraries (filter_plugin ${HDF5_TEST_LIB_TARGET})
+ set_target_properties (filter_plugin PROPERTIES FOLDER test)
else ()
- add_executable (plugin ${HDF5_TEST_SOURCE_DIR}/plugin.c)
- TARGET_NAMING (plugin STATIC)
- TARGET_C_PROPERTIES (plugin STATIC " " " ")
- target_link_libraries (plugin ${HDF5_TEST_LIB_TARGET})
- set_target_properties (plugin PROPERTIES FOLDER test)
+ add_executable (filter_plugin ${HDF5_TEST_SOURCE_DIR}/filter_plugin.c)
+ set_property(TARGET filter_plugin APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
+ TARGET_C_PROPERTIES (filter_plugin STATIC " " " ")
+ target_link_libraries (filter_plugin ${HDF5_TEST_LIB_TARGET})
+ set_target_properties (filter_plugin PROPERTIES FOLDER test)
endif ()
##############################################################################
@@ -428,13 +427,13 @@ endif ()
##############################################################################
set (use_append_chunk_SOURCES ${HDF5_TEST_SOURCE_DIR}/use_append_chunk.c ${HDF5_TEST_SOURCE_DIR}/use_common.c)
add_executable (use_append_chunk ${use_append_chunk_SOURCES})
-TARGET_NAMING (use_append_chunk STATIC)
+set_property(TARGET use_append_chunk APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (use_append_chunk STATIC " " " ")
target_link_libraries (use_append_chunk ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
set_target_properties (use_append_chunk PROPERTIES FOLDER test)
if (BUILD_SHARED_LIBS)
add_executable (use_append_chunk-shared ${use_append_chunk_SOURCES})
- TARGET_NAMING (use_append_chunk-shared SHARED)
+ set_property(TARGET use_append_chunk-shared APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (use_append_chunk-shared SHARED " " " ")
target_link_libraries (use_append_chunk-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
set_target_properties (use_append_chunk-shared PROPERTIES FOLDER test)
@@ -442,13 +441,13 @@ endif ()
set (use_append_mchunks_SOURCES ${HDF5_TEST_SOURCE_DIR}/use_append_mchunks.c ${HDF5_TEST_SOURCE_DIR}/use_common.c)
add_executable (use_append_mchunks ${use_append_mchunks_SOURCES})
-TARGET_NAMING (use_append_mchunks STATIC)
+set_property(TARGET use_append_mchunks APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (use_append_mchunks STATIC " " " ")
target_link_libraries (use_append_mchunks ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
set_target_properties (use_append_mchunks PROPERTIES FOLDER test)
if (BUILD_SHARED_LIBS)
add_executable (use_append_mchunks-shared ${use_append_mchunks_SOURCES})
- TARGET_NAMING (use_append_mchunks-shared SHARED)
+ set_property(TARGET use_append_mchunks-shared APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (use_append_mchunks-shared SHARED " " " ")
target_link_libraries (use_append_mchunks-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
set_target_properties (use_append_mchunks-shared PROPERTIES FOLDER test)
@@ -456,13 +455,13 @@ endif ()
set (use_disable_mdc_flushes_SOURCES ${HDF5_TEST_SOURCE_DIR}/use_disable_mdc_flushes.c)
add_executable (use_disable_mdc_flushes ${use_disable_mdc_flushes_SOURCES})
-TARGET_NAMING (use_disable_mdc_flushes STATIC)
+set_property(TARGET use_disable_mdc_flushes APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (use_disable_mdc_flushes STATIC " " " ")
target_link_libraries (use_disable_mdc_flushes ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
set_target_properties (use_disable_mdc_flushes PROPERTIES FOLDER test)
if (BUILD_SHARED_LIBS)
add_executable (use_disable_mdc_flushes-shared ${use_disable_mdc_flushes_SOURCES})
- TARGET_NAMING (use_disable_mdc_flushes-shared SHARED)
+ set_property(TARGET use_disable_mdc_flushes-shared APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (use_disable_mdc_flushes-shared SHARED " " " ")
target_link_libraries (use_disable_mdc_flushes-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
set_target_properties (use_disable_mdc_flushes-shared PROPERTIES FOLDER test)
diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake
index f372acf..7b93311 100644
--- a/test/CMakeTests.cmake
+++ b/test/CMakeTests.cmake
@@ -1,4 +1,15 @@
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+#
+
##############################################################################
##############################################################################
### T E S T I N G ###
@@ -15,27 +26,6 @@ if (BUILD_SHARED_LIBS)
file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST-shared/testfiles/plist_files")
endif ()
-if (HDF5_TEST_VFD)
- set (VFD_LIST
- sec2
- stdio
- core
- core_paged
- split
- multi
- family
- )
- if (DIRECT_VFD)
- set (VFD_LIST ${VFD_LIST} direct)
- endif ()
- foreach (vfdtest ${VFD_LIST})
- file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdtest}")
- #if (BUILD_SHARED_LIBS)
- # file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdtest}-shared")
- #endif ()
- endforeach ()
-endif ()
-
# --------------------------------------------------------------------
# Copy all the HDF5 files from the source directory into the test directory
# --------------------------------------------------------------------
@@ -64,16 +54,6 @@ foreach (h5_tfile ${HDF5_TEST_FILES})
HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/${h5_tfile}" "${PROJECT_BINARY_DIR}/H5TEST-shared/${h5_tfile}" "HDF5_TEST_LIBSH_files")
endif ()
endforeach ()
-if (HDF5_TEST_VFD)
- foreach (vfdtest ${VFD_LIST})
- foreach (h5_tfile ${HDF5_TEST_FILES})
- HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/${h5_tfile}" "${PROJECT_BINARY_DIR}/${vfdtest}/${h5_tfile}" "HDF5_TEST_LIB_files")
- if (BUILD_SHARED_LIBS)
- HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/${h5_tfile}" "${PROJECT_BINARY_DIR}/${vfdtest}-shared/${h5_tfile}" "HDF5_TEST_LIBSH_files")
- endif ()
- endforeach ()
- endforeach ()
-endif ()
# --------------------------------------------------------------------
# Copy all the HDF5 files from the test directory into the source directory
@@ -92,16 +72,6 @@ foreach (ref_file ${HDF5_REFERENCE_FILES})
HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/${ref_file}" "${PROJECT_BINARY_DIR}/H5TEST-shared/${ref_file}" "HDF5_TEST_LIBSH_files")
endif ()
endforeach ()
-if (HDF5_TEST_VFD)
- foreach (vfdtest ${VFD_LIST})
- foreach (ref_file ${HDF5_REFERENCE_FILES})
- HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/${ref_file}" "${PROJECT_BINARY_DIR}/${vfdtest}/${ref_file}" "HDF5_TEST_LIB_files")
- if (BUILD_SHARED_LIBS)
- HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/${ref_file}" "${PROJECT_BINARY_DIR}/${vfdtest}-shared/${ref_file}" "HDF5_TEST_LIBSH_files")
- endif ()
- endforeach ()
- endforeach ()
-endif ()
# --------------------------------------------------------------------
# Copy test files from test/testfiles/plist_files dir to test dir
@@ -172,6 +142,7 @@ endforeach ()
set (HDF5_REFERENCE_TEST_FILES
aggr.h5
bad_compound.h5
+ bad_offset.h5
be_data.h5
be_extlink1.h5
be_extlink2.h5
@@ -226,16 +197,7 @@ foreach (h5_file ${HDF5_REFERENCE_TEST_FILES})
HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/${h5_file}" "${HDF5_TEST_BINARY_DIR}/H5TEST-shared/${h5_file}" "HDF5_TEST_LIBSH_files")
endif ()
endforeach ()
-if (HDF5_TEST_VFD)
- foreach (vfdtest ${VFD_LIST})
- foreach (h5_file ${HDF5_REFERENCE_TEST_FILES})
- HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/${h5_file}" "${HDF5_TEST_BINARY_DIR}/${vfdtest}/${h5_file}" "HDF5_TEST_LIB_files")
- if (BUILD_SHARED_LIBS)
- HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/${h5_file}" "${HDF5_TEST_BINARY_DIR}/${vfdtest}-shared/${h5_file}" "HDF5_TEST_LIBSH_files")
- endif ()
- endforeach ()
- endforeach ()
-endif ()
+
add_custom_target(HDF5_TEST_LIB_files ALL COMMENT "Copying files needed by HDF5_TEST_LIB tests" DEPENDS ${HDF5_TEST_LIB_files_list})
if (BUILD_SHARED_LIBS)
add_custom_target(HDF5_TEST_LIBSH_files ALL COMMENT "Copying files needed by HDF5_TEST_LIBSH tests" DEPENDS ${HDF5_TEST_LIBSH_files_list})
@@ -256,6 +218,7 @@ add_test (NAME H5TEST-clear-testhdf5-objects
tfile5.h5
tfile6.h5
tfile7.h5
+ tfilespace.h5
th5o_file
th5s1.h5
tselect.h5
@@ -322,6 +285,7 @@ else ()
tfile5.h5
tfile6.h5
tfile7.h5
+ tfilespace.h5
th5o_file
th5s1.h5
tselect.h5
@@ -438,7 +402,6 @@ set (test_CLEANFILES
extlinks19B00026.h5
extlinks19B00027.h5
extlinks19B00028.h5
- tmp
big.data
big*.h5
stdio.h5
@@ -506,7 +469,7 @@ set (test_CLEANFILES
multi_file-r.h5
multi_file-s.h5
core_file
- plugin.h5
+ filter_plugin.h5
new_move_a.h5
new_move_b.h5
ntypes.h5
@@ -559,6 +522,7 @@ set (test_CLEANFILES
flushrefresh_VERIFICATION_CHECKPOINT1
flushrefresh_VERIFICATION_CHECKPOINT2
flushrefresh_VERIFICATION_DONE
+ filenotclosed.h5
atomic_data
accum_swmr_big.h5
ohdr_swmr.h5
@@ -567,6 +531,7 @@ set (test_CLEANFILES
cache_logging.out
vds_swmr.h5
vds_swmr_src_*.h5
+ tmp/vds_src_2.h5
)
# Remove any output file left over from previous test run
@@ -578,97 +543,43 @@ add_test (NAME H5TEST-clear-objects
${HDF5_TEST_BINARY_DIR}/H5TEST
)
-set (H5TEST_TESTS
- #testhdf5
- #cache
- cache_api
- cache_tagging
- lheap
- ohdr
- stab
- gheap
- evict_on_close
- farray
- earray
- btree2
- fheap
- pool
- accum
- #hyperslab
- istore
- bittests
- dt_arith
- dtypes
- dsets
- cmpd_dset
- filter_fail
- extend
- external
- efc
- objcopy
- links
- unlink
- twriteorder
- big
- mtime
- fillval
- mount
- flush1
- flush2
- app_ref
- enum
- set_extent
- ttsafe
- enc_dec_plist
- enc_dec_plist_cross_platform
- getname
- vfd
- ntypes
- dangle
- dtransform
- reserved
- cross_read
- freespace
- mf
- page_buffer
- vds
- file_image
- unregister
- cache_logging
- cork
- swmr
+set (H5TEST_SEPARATE_TESTS
+ testhdf5
+ cache
+ cache_image
)
-
-foreach (test ${H5TEST_TESTS})
- if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME H5TEST-${test} COMMAND $<TARGET_FILE:${test}>)
- set_tests_properties (H5TEST-${test} PROPERTIES
- DEPENDS H5TEST-clear-objects
- ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST"
- WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
- )
- else ()
- if (${test} STREQUAL "big" AND CYGWIN)
- add_test (NAME H5TEST-${test}
- COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${test}"
+foreach (test ${H5_TESTS})
+ if (NOT ${test} IN_LIST H5TEST_SEPARATE_TESTS)
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME H5TEST-${test} COMMAND $<TARGET_FILE:${test}>)
+ set_tests_properties (H5TEST-${test} PROPERTIES
+ DEPENDS H5TEST-clear-objects
+ ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
else ()
- add_test (NAME H5TEST-${test} COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:${test}>"
- -D "TEST_ARGS:STRING="
- -D "TEST_EXPECT=0"
- -D "TEST_SKIP_COMPARE=TRUE"
- -D "TEST_OUTPUT=${test}.txt"
- #-D "TEST_REFERENCE=${test}.out"
- -D "TEST_FOLDER=${HDF5_TEST_BINARY_DIR}/H5TEST"
- -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ if ("${test}" STREQUAL "big" AND CYGWIN)
+ add_test (NAME H5TEST-${test}
+ COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${test}"
+ )
+ else ()
+ add_test (NAME H5TEST-${test} COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:${test}>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_EXPECT=0"
+ -D "TEST_SKIP_COMPARE=TRUE"
+ -D "TEST_OUTPUT=${test}.txt"
+ #-D "TEST_REFERENCE=${test}.out"
+ -D "TEST_FOLDER=${HDF5_TEST_BINARY_DIR}/H5TEST"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ endif ()
+ set_tests_properties (H5TEST-${test} PROPERTIES
+ DEPENDS H5TEST-clear-objects
+ ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
endif ()
- set_tests_properties (H5TEST-${test} PROPERTIES
- DEPENDS H5TEST-clear-objects
- ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST"
- WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
- )
endif ()
endforeach ()
@@ -688,28 +599,30 @@ if (BUILD_SHARED_LIBS)
${HDF5_TEST_BINARY_DIR}/H5TEST-shared
)
- foreach (test ${H5TEST_TESTS})
- if (${test} STREQUAL "big" AND CYGWIN)
- add_test (NAME H5TEST-shared-${test}
- COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${test}-shared"
- )
- else ()
- add_test (NAME H5TEST-shared-${test} COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:${test}-shared>"
- -D "TEST_ARGS:STRING="
- -D "TEST_EXPECT=0"
- -D "TEST_SKIP_COMPARE=TRUE"
- -D "TEST_OUTPUT=${test}.txt"
- #-D "TEST_REFERENCE=${test}.out"
- -D "TEST_FOLDER=${HDF5_TEST_BINARY_DIR}/H5TEST-shared"
- -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ foreach (test ${H5_TESTS})
+ if (NOT ${test} IN_LIST H5TEST_SEPARATE_TESTS)
+ if ("${test}" STREQUAL "big" AND CYGWIN)
+ add_test (NAME H5TEST-shared-${test}
+ COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${test}-shared"
+ )
+ else ()
+ add_test (NAME H5TEST-shared-${test} COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:${test}-shared>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_EXPECT=0"
+ -D "TEST_SKIP_COMPARE=TRUE"
+ -D "TEST_OUTPUT=${test}.txt"
+ #-D "TEST_REFERENCE=${test}.out"
+ -D "TEST_FOLDER=${HDF5_TEST_BINARY_DIR}/H5TEST-shared"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ endif ()
+ set_tests_properties (H5TEST-shared-${test} PROPERTIES
+ DEPENDS H5TEST-shared-clear-objects
+ ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
)
endif ()
- set_tests_properties (H5TEST-shared-${test} PROPERTIES
- DEPENDS H5TEST-shared-clear-objects
- ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared"
- WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
- )
endforeach ()
set_tests_properties (H5TEST-shared-flush2 PROPERTIES DEPENDS H5TEST-shared-flush1)
@@ -719,12 +632,6 @@ if (BUILD_SHARED_LIBS)
set_tests_properties (H5TEST-shared-objcopy PROPERTIES TIMEOUT 1800)
endif ()
-##############################################################################
-##############################################################################
-### A D D I T I O N A L T E S T S ###
-##############################################################################
-##############################################################################
-
#-- Adding test for cache
if (NOT CYGWIN)
add_test (NAME H5TEST-clear-cache-objects
@@ -768,6 +675,89 @@ add_test (
add_test (NAME H5TEST-cache_image COMMAND $<TARGET_FILE:cache_image>)
set_tests_properties (H5TEST-cache_image PROPERTIES
DEPENDS H5TEST-clear-cache_image-objects
+ ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST;HDF5TestExpress=${HDF_TEST_EXPRESS}"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
+)
+
+if (BUILD_SHARED_LIBS)
+ #-- Adding test for cache
+ if (NOT CYGWIN AND NOT WIN32)
+ add_test (NAME H5TEST-shared-clear-cache-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ cache_test.h5
+ WORKING_DIRECTORY
+ ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
+ )
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME H5TEST-shared-cache COMMAND $<TARGET_FILE:cache-shared>)
+ else ()
+ add_test (NAME H5TEST-shared-cache COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:cache-shared>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_EXPECT=0"
+ -D "TEST_SKIP_COMPARE=TRUE"
+ -D "TEST_OUTPUT=cache-shared.txt"
+ #-D "TEST_REFERENCE=cache-shared.out"
+ -D "TEST_FOLDER=${HDF5_TEST_BINARY_DIR}/H5TEST-shared"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ endif ()
+ set_tests_properties (H5TEST-shared-cache PROPERTIES
+ DEPENDS H5TEST-shared-clear-cache-objects
+ ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared;HDF5TestExpress=${HDF_TEST_EXPRESS}"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
+ )
+ set_tests_properties (H5TEST-shared-cache PROPERTIES TIMEOUT 1800)
+ endif ()
+endif ()
+
+
+##############################################################################
+##############################################################################
+### A D D I T I O N A L T E S T S ###
+##############################################################################
+##############################################################################
+# H5_CHECK_TESTS
+#---------------
+# error_test
+# err_compat
+# tcheck_version
+# testmeta
+# atomic_writer
+# atomic_reader
+# links_env
+# filenotclosed
+# flushrefresh
+##############################################################################
+# autotools script tests
+# error_test and err_compat are built at the same time as the other tests, but executed by testerror.sh.
+# NOT CONVERTED tcheck_version is used by testcheck_version.sh.
+# NOT CONVERTED accum_swmr_reader is used by accum.c.
+# NOT CONVERTED atomic_writer and atomic_reader are standalone programs.
+# links_env is used by testlinks_env.sh
+# filenotclosed is used by test_filenotclosed.sh
+# NOT CONVERTED flushrefresh is used by testflushrefresh.sh.
+# NOT CONVERTED use_append_chunk, use_append_mchunks and use_disable_mdc_flushes are used by test_usecases.sh
+# NOT CONVERTED swmr_* files (besides swmr.c) are used by testswmr.sh.
+# NOT CONVERTED vds_swmr_* files are used by testvdsswmr.sh
+# NOT CONVERTED 'make check' doesn't run them directly, so they are not included in TEST_PROG.
+# NOT CONVERTED Also build testmeta, which is used for timings test. It builds quickly,
+# NOT CONVERTED and this lets automake keep all its test programs in one place.
+##############################################################################
+
+#-- Adding test for filenotclosed
+add_test (
+ NAME H5TEST-clear-filenotclosed-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ filenotclosed.h5
+ WORKING_DIRECTORY
+ ${HDF5_TEST_BINARY_DIR}/H5TEST
+)
+add_test (NAME H5TEST-filenotclosed COMMAND $<TARGET_FILE:filenotclosed>)
+set_tests_properties (H5TEST-filenotclosed PROPERTIES
+ DEPENDS H5TEST-clear-filenotclosed-objects
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
@@ -808,21 +798,28 @@ add_test (NAME H5TEST-clear-error_test-objects
WORKING_DIRECTORY
${HDF5_TEST_BINARY_DIR}/H5TEST
)
-add_test (NAME H5TEST-error_test COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:error_test>"
- -D "TEST_ARGS:STRING="
- -D "TEST_EXPECT=0"
- -D "TEST_MASK_ERROR=true"
- -D "TEST_OUTPUT=error_test.txt"
- -D "TEST_REFERENCE=error_test_1"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/H5TEST"
- -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
-)
-set_tests_properties (H5TEST-error_test PROPERTIES
- DEPENDS H5TEST-clear-error_test-objects
- ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST;HDF5_PLUGIN_PRELOAD=::"
- WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
-)
+if (HDF5_USE_16_API_DEFAULT)
+ add_test (
+ NAME H5TEST-error_test-SKIPPED
+ COMMAND ${CMAKE_COMMAND} -E echo "SKIP $<TARGET_FILE:error_test>"
+ )
+else ()
+ add_test (NAME H5TEST-error_test COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:error_test>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_EXPECT=0"
+ -D "TEST_MASK_ERROR=true"
+ -D "TEST_OUTPUT=error_test.txt"
+ -D "TEST_REFERENCE=error_test_1"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/H5TEST"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ set_tests_properties (H5TEST-error_test PROPERTIES
+ DEPENDS H5TEST-clear-error_test-objects
+ ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST;HDF5_PLUGIN_PRELOAD=::"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
+ )
+endif ()
#-- Adding test for links_env
add_test (NAME H5TEST-clear-links_env-objects
@@ -861,37 +858,6 @@ add_test (NAME H5TEST-testlibinfo
)
if (BUILD_SHARED_LIBS)
- #-- Adding test for cache
- if (NOT CYGWIN AND NOT WIN32)
- add_test (NAME H5TEST-shared-clear-cache-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- cache_test.h5
- WORKING_DIRECTORY
- ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
- )
- if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME H5TEST-shared-cache COMMAND $<TARGET_FILE:cache-shared>)
- else ()
- add_test (NAME H5TEST-shared-cache COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:cache-shared>"
- -D "TEST_ARGS:STRING="
- -D "TEST_EXPECT=0"
- -D "TEST_SKIP_COMPARE=TRUE"
- -D "TEST_OUTPUT=cache-shared.txt"
- #-D "TEST_REFERENCE=cache-shared.out"
- -D "TEST_FOLDER=${HDF5_TEST_BINARY_DIR}/H5TEST-shared"
- -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
- )
- endif ()
- set_tests_properties (H5TEST-shared-cache PROPERTIES
- DEPENDS H5TEST-shared-clear-cache-objects
- ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared;HDF5TestExpress=${HDF_TEST_EXPRESS}"
- WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
- )
- set_tests_properties (H5TEST-shared-cache PROPERTIES TIMEOUT 1800)
- endif ()
-
#-- Adding test for err_compat
if (HDF5_ENABLE_DEPRECATED_SYMBOLS)
add_test (NAME H5TEST-shared-clear-err_compat-objects
@@ -928,21 +894,28 @@ if (BUILD_SHARED_LIBS)
WORKING_DIRECTORY
${HDF5_TEST_BINARY_DIR}/H5TEST-shared
)
- add_test (NAME H5TEST-shared-error_test COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:error_test-shared>"
- -D "TEST_ARGS:STRING="
- -D "TEST_EXPECT=0"
- -D "TEST_MASK_ERROR=true"
- -D "TEST_OUTPUT=error_test.txt"
- -D "TEST_REFERENCE=error_test_1"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/H5TEST-shared"
- -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
- )
- set_tests_properties (H5TEST-shared-error_test PROPERTIES
- DEPENDS H5TEST-shared-clear-error_test-objects
- ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared;HDF5_PLUGIN_PRELOAD=::"
- WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
- )
+ if (HDF5_USE_16_API_DEFAULT)
+ add_test (
+ NAME H5TEST-shared-error_test-SKIPPED
+ COMMAND ${CMAKE_COMMAND} -E echo "SKIP $<TARGET_FILE:error_test-shared>"
+ )
+ else ()
+ add_test (NAME H5TEST-shared-error_test COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:error_test-shared>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_EXPECT=0"
+ -D "TEST_MASK_ERROR=true"
+ -D "TEST_OUTPUT=error_test.txt"
+ -D "TEST_REFERENCE=error_test_1"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/H5TEST-shared"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ set_tests_properties (H5TEST-shared-error_test PROPERTIES
+ DEPENDS H5TEST-shared-clear-error_test-objects
+ ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared;HDF5_PLUGIN_PRELOAD=::"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
+ )
+ endif ()
#-- Adding test for links_env
add_test (NAME H5TEST-shared-clear-links_env-objects
@@ -982,21 +955,33 @@ if (BUILD_SHARED_LIBS)
endif ()
##############################################################################
-### P L U G I N T E S T S
+### F I L T E R P L U G I N T E S T S
##############################################################################
if (WIN32)
set (CMAKE_SEP "\;")
+ set (BIN_REL_PATH "../../")
else ()
set (CMAKE_SEP ":")
+ set (BIN_REL_PATH "../")
endif ()
-add_test (NAME H5PLUGIN-plugin COMMAND $<TARGET_FILE:plugin>)
-set_tests_properties (H5PLUGIN-plugin PROPERTIES
- ENVIRONMENT "HDF5_PLUGIN_PATH=${CMAKE_BINARY_DIR}/testdir1${CMAKE_SEP}${CMAKE_BINARY_DIR}/testdir2;srcdir=${HDF5_TEST_BINARY_DIR}"
+add_test (NAME H5PLUGIN-filter_plugin COMMAND $<TARGET_FILE:filter_plugin>)
+set_tests_properties (H5PLUGIN-filter_plugin PROPERTIES
+ ENVIRONMENT "HDF5_PLUGIN_PATH=${CMAKE_BINARY_DIR}/filter_plugin_dir1${CMAKE_SEP}${CMAKE_BINARY_DIR}/filter_plugin_dir2;srcdir=${HDF5_TEST_BINARY_DIR}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}
)
##############################################################################
+# HDFFV-9655 relative plugin test disabled
+#
+#add_test (NAME H5PLUGIN-pluginRelative COMMAND $<TARGET_FILE:plugin>)
+#set_tests_properties (H5PLUGIN-pluginRelative PROPERTIES
+# ENVIRONMENT "HDF5_PLUGIN_PATH=@/${BIN_REL_PATH}testdir1${CMAKE_SEP}@/${BIN_REL_PATH}testdir2;srcdir=${HDF5_TEST_BINARY_DIR}"
+# WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}
+#)
+##############################################################################
+
+##############################################################################
### S W M R T E S T S
##############################################################################
# testflushrefresh.sh: flushrefresh
@@ -1011,272 +996,7 @@ set_tests_properties (H5PLUGIN-plugin PROPERTIES
##############################################################################
if (HDF5_TEST_VFD)
-
- set (H5_VFD_TESTS
- testhdf5
-# cache
- cache_api
- cache_tagging
- lheap
- ohdr
- stab
- gheap
- evict_on_close
- pool
-# accum
- farray
- earray
- btree2
-# fheap
- hyperslab
- istore
- bittests
- dt_arith
- dtypes
- dsets
- cmpd_dset
- filter_fail
- extend
- external
- efc
- objcopy
- links
- unlink
-# big
- mtime
- fillval
- mount
- flush1
- flush2
- app_ref
- enum
- set_extent
- ttsafe
- getname
-# vfd
- ntypes
- dangle
- dtransform
- reserved
- cross_read
- freespace
- mf
-# error_test
-# err_compat
- #tcheck_version
-# testmeta
-# links_env
- unregister
- )
- if (NOT CYGWIN)
- set (H5_VFD_TESTS ${H5_VFD_TESTS} big cache)
- endif ()
-
- # Windows only macro
- macro (CHECK_VFD_TEST vfdtest vfdname resultcode)
- if (${vfdtest} STREQUAL "flush1" OR ${vfdtest} STREQUAL "flush2")
- if (${vfdname} STREQUAL "multi" OR ${vfdname} STREQUAL "split")
- if (NOT BUILD_SHARED_LIBS AND NOT CMAKE_BUILD_TYPE MATCHES Debug)
- add_test (NAME VFD-${vfdname}-${vfdtest}
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:${vfdtest}>"
- -D "TEST_ARGS:STRING="
- -D "TEST_VFD:STRING=${vfdname}"
- -D "TEST_EXPECT=${resultcode}"
- -D "TEST_OUTPUT=${vfdname}-${vfdtest}"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}"
- -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
- )
- set_tests_properties (VFD-${vfdname}-${vfdtest} PROPERTIES
- ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}"
- WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}
- )
- if (BUILD_SHARED_LIBS)
- add_test (NAME VFD-${vfdname}-${test}-shared
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:${vfdtest}-shared>"
- -D "TEST_ARGS:STRING="
- -D "TEST_VFD:STRING=${vfdname}"
- -D "TEST_EXPECT=${resultcode}"
- -D "TEST_OUTPUT=${vfdname}-${vfdtest}-shared"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared"
- -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
- )
- set_tests_properties (VFD-${vfdname}-${vfdtest}-shared PROPERTIES
- ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared"
- WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared
- )
- endif ()
- else ()
- add_test (NAME VFD-${vfdname}-${vfdtest}
- COMMAND ${CMAKE_COMMAND} -E echo "SKIP VFD-${vfdname}-${vfdtest}"
- )
- if (BUILD_SHARED_LIBS)
- add_test (NAME VFD-${vfdname}-${test}-shared
- COMMAND ${CMAKE_COMMAND} -E echo "SKIP VFD-${vfdname}-${vfdtest}-shared"
- )
- endif ()
- endif ()
- else ()
- add_test (NAME VFD-${vfdname}-${vfdtest}
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:${vfdtest}>"
- -D "TEST_ARGS:STRING="
- -D "TEST_VFD:STRING=${vfdname}"
- -D "TEST_EXPECT=${resultcode}"
- -D "TEST_OUTPUT=${vfdname}-${vfdtest}"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}"
- -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
- )
- set_tests_properties (VFD-${vfdname}-${vfdtest} PROPERTIES
- ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}"
- WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}
- )
- if (BUILD_SHARED_LIBS)
- add_test (NAME VFD-${vfdname}-${test}-shared
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:${vfdtest}-shared>"
- -D "TEST_ARGS:STRING="
- -D "TEST_VFD:STRING=${vfdname}"
- -D "TEST_EXPECT=${resultcode}"
- -D "TEST_OUTPUT=${vfdname}-${vfdtest}-shared"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared"
- -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
- )
- set_tests_properties (VFD-${vfdname}-${vfdtest}-shared PROPERTIES
- ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared"
- WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared
- )
- endif ()
- endif ()
- else ()
- add_test (NAME VFD-${vfdname}-${vfdtest}
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:${vfdtest}>"
- -D "TEST_ARGS:STRING="
- -D "TEST_VFD:STRING=${vfdname}"
- -D "TEST_EXPECT=${resultcode}"
- -D "TEST_OUTPUT=${vfdname}-${vfdtest}"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}"
- -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
- )
- set_tests_properties (VFD-${vfdname}-${vfdtest} PROPERTIES
- ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname};HDF5TestExpress=${HDF_TEST_EXPRESS}"
- WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}
- )
- if (BUILD_SHARED_LIBS AND NOT ${vfdtest} STREQUAL "cache")
- add_test (NAME VFD-${vfdname}-${vfdtest}-shared
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:${vfdtest}-shared>"
- -D "TEST_ARGS:STRING="
- -D "TEST_VFD:STRING=${vfdname}"
- -D "TEST_EXPECT=${resultcode}"
- -D "TEST_OUTPUT=${vfdname}-${vfdtest}-shared"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared"
- -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
- )
- set_tests_properties (VFD-${vfdname}-${vfdtest}-shared PROPERTIES
- ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared;HDF5TestExpress=${HDF_TEST_EXPRESS}"
- WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared
- )
- endif ()
- endif ()
- endmacro ()
-
- macro (ADD_VFD_TEST vfdname resultcode)
- foreach (test ${H5_VFD_TESTS})
- if (WIN32)
- CHECK_VFD_TEST (${test} ${vfdname} ${resultcode})
- else ()
- add_test (NAME VFD-${vfdname}-${test}
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:${test}>"
- -D "TEST_ARGS:STRING="
- -D "TEST_VFD:STRING=${vfdname}"
- -D "TEST_EXPECT=${resultcode}"
- -D "TEST_OUTPUT=${vfdname}-${test}"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}"
- -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
- )
- set_tests_properties (VFD-${vfdname}-${test} PROPERTIES
- ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}"
- WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}
- )
- if (BUILD_SHARED_LIBS)
- add_test (NAME VFD-${vfdname}-${test}-shared
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:${test}-shared>"
- -D "TEST_ARGS:STRING="
- -D "TEST_VFD:STRING=${vfdname}"
- -D "TEST_EXPECT=${resultcode}"
- -D "TEST_OUTPUT=${vfdname}-${test}-shared"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared"
- -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
- )
- set_tests_properties (VFD-${vfdname}-${test}-shared PROPERTIES
- ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared"
- WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared
- )
- endif ()
- endif ()
- endforeach ()
- set_tests_properties (VFD-${vfdname}-flush2 PROPERTIES DEPENDS VFD-${vfdname}-flush1)
- set_tests_properties (VFD-${vfdname}-flush1 PROPERTIES TIMEOUT 10)
- set_tests_properties (VFD-${vfdname}-flush2 PROPERTIES TIMEOUT 10)
- set_tests_properties (VFD-${vfdname}-istore PROPERTIES TIMEOUT 1800)
- if (NOT CYGWIN)
- set_tests_properties (VFD-${vfdname}-cache PROPERTIES TIMEOUT 1800)
- endif ()
- if (BUILD_SHARED_LIBS)
- set_tests_properties (VFD-${vfdname}-flush2-shared PROPERTIES DEPENDS VFD-${vfdname}-flush1-shared)
- set_tests_properties (VFD-${vfdname}-flush1-shared PROPERTIES TIMEOUT 10)
- set_tests_properties (VFD-${vfdname}-flush2-shared PROPERTIES TIMEOUT 10)
- set_tests_properties (VFD-${vfdname}-istore-shared PROPERTIES TIMEOUT 1800)
- if (NOT CYGWIN AND NOT WIN32)
- set_tests_properties (VFD-${vfdname}-cache-shared PROPERTIES TIMEOUT 1800)
- endif ()
- endif ()
- if (HDF5_TEST_FHEAP_VFD)
- add_test (NAME VFD-${vfdname}-fheap
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:fheap>"
- -D "TEST_ARGS:STRING="
- -D "TEST_VFD:STRING=${vfdname}"
- -D "TEST_EXPECT=${resultcode}"
- -D "TEST_OUTPUT=${vfdname}-fheap"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}"
- -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
- )
- set_tests_properties (VFD-${vfdname}-fheap PROPERTIES
- TIMEOUT 1800
- ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname};HDF5TestExpress=${HDF_TEST_EXPRESS}"
- WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}
- )
- if (BUILD_SHARED_LIBS)
- add_test (NAME VFD-${vfdname}-fheap-shared
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:fheap-shared>"
- -D "TEST_ARGS:STRING="
- -D "TEST_VFD:STRING=${vfdname}"
- -D "TEST_EXPECT=${resultcode}"
- -D "TEST_OUTPUT=${vfdname}-fheap-shared"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared"
- -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
- )
- set_tests_properties (VFD-${vfdname}-fheap-shared PROPERTIES
- TIMEOUT 1800
- ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared;HDF5TestExpress=${HDF_TEST_EXPRESS}"
- WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared
- )
- endif ()
- endif ()
- endmacro ()
-
- # Run test with different Virtual File Driver
- foreach (vfd ${VFD_LIST})
- ADD_VFD_TEST (${vfd} 0)
- endforeach ()
-
+ include (CMakeVFDTests.cmake)
endif ()
##############################################################################
@@ -1288,7 +1008,7 @@ endif ()
if (HDF5_BUILD_GENERATORS)
macro (ADD_H5_GENERATOR genfile)
add_executable (${genfile} ${HDF5_TEST_SOURCE_DIR}/${genfile}.c)
- TARGET_NAMING (${genfile} STATIC)
+ set_property(TARGET ${genfile} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (${genfile} STATIC " " " ")
target_link_libraries (${genfile} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (${genfile} PROPERTIES FOLDER generator/test)
@@ -1296,8 +1016,10 @@ if (HDF5_BUILD_GENERATORS)
# generator executables
set (H5_GENERATORS
+ gen_bad_offset
gen_bad_ohdr
gen_bogus
+ gen_bounds
gen_cross
gen_deflate
gen_filters
diff --git a/test/CMakeVFDTests.cmake b/test/CMakeVFDTests.cmake
new file mode 100644
index 0000000..be02110
--- /dev/null
+++ b/test/CMakeVFDTests.cmake
@@ -0,0 +1,318 @@
+
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+#
+
+##############################################################################
+##############################################################################
+### T E S T I N G ###
+##############################################################################
+##############################################################################
+# included from CMakeTEsts.cmake
+
+set (VFD_LIST
+ sec2
+ stdio
+ core
+ core_paged
+ split
+ multi
+ family
+)
+if (DIRECT_VFD)
+ set (VFD_LIST ${VFD_LIST} direct)
+endif ()
+
+foreach (vfdtest ${VFD_LIST})
+ file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdtest}")
+ file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdtest}/testfiles")
+ file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdtest}/testfiles/plist_files")
+ if (BUILD_SHARED_LIBS)
+ file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdtest}-shared")
+ file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdtest}-shared/testfiles")
+ file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdtest}-shared/testfiles/plist_files")
+ endif ()
+endforeach ()
+
+foreach (vfdtest ${VFD_LIST})
+ foreach (h5_tfile ${HDF5_TEST_FILES})
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/${h5_tfile}" "${PROJECT_BINARY_DIR}/${vfdtest}/${h5_tfile}" "HDF5_VFDTEST_LIB_files")
+ if (BUILD_SHARED_LIBS)
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/${h5_tfile}" "${PROJECT_BINARY_DIR}/${vfdtest}-shared/${h5_tfile}" "HDF5_VFDTEST_LIBSH_files")
+ endif ()
+ endforeach ()
+endforeach ()
+
+foreach (vfdtest ${VFD_LIST})
+ foreach (ref_file ${HDF5_REFERENCE_FILES})
+ HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/${ref_file}" "${PROJECT_BINARY_DIR}/${vfdtest}/${ref_file}" "HDF5_VFDTEST_LIB_files")
+ if (BUILD_SHARED_LIBS)
+ HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/${ref_file}" "${PROJECT_BINARY_DIR}/${vfdtest}-shared/${ref_file}" "HDF5_VFDTEST_LIBSH_files")
+ endif ()
+ endforeach ()
+endforeach ()
+
+foreach (vfdtest ${VFD_LIST})
+ foreach (h5_file ${HDF5_REFERENCE_TEST_FILES})
+ HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/${h5_file}" "${HDF5_TEST_BINARY_DIR}/${vfdtest}/${h5_file}" "HDF5_VFDTEST_LIB_files")
+ if (BUILD_SHARED_LIBS)
+ HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/${h5_file}" "${HDF5_TEST_BINARY_DIR}/${vfdtest}-shared/${h5_file}" "HDF5_VFDTEST_LIBSH_files")
+ endif ()
+ endforeach ()
+endforeach ()
+
+foreach (vfdtest ${VFD_LIST})
+ foreach (plistfile ${HDF5_REFERENCE_PLIST_FILES})
+ HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/plist_files/${plistfile}" "${PROJECT_BINARY_DIR}/${vfdtest}/testfiles/plist_files/${plistfile}" "HDF5_VFDTEST_LIB_files")
+ HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/plist_files/def_${plistfile}" "${PROJECT_BINARY_DIR}/${vfdtest}/testfiles/plist_files/def_${plistfile}" "HDF5_VFDTEST_LIB_files")
+ if (BUILD_SHARED_LIBS)
+ HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/plist_files/${plistfile}" "${PROJECT_BINARY_DIR}/${vfdtest}-shared/testfiles/plist_files/${plistfile}" "HDF5_VFDTEST_LIBSH_files")
+ HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/plist_files/def_${plistfile}" "${PROJECT_BINARY_DIR}/${vfdtest}-shared/testfiles/plist_files/def_${plistfile}" "HDF5_VFDTEST_LIBSH_files")
+ endif ()
+ endforeach ()
+endforeach ()
+
+add_custom_target(HDF5_VFDTEST_LIB_files ALL COMMENT "Copying files needed by HDF5_VFDTEST_LIB tests" DEPENDS ${HDF5_VFDTEST_LIB_files_list})
+if (BUILD_SHARED_LIBS)
+ add_custom_target(HDF5_VFDTEST_LIBSH_files ALL COMMENT "Copying files needed by HDF5_VFDTEST_LIBSH tests" DEPENDS ${HDF5_VFDTEST_LIBSH_files_list})
+endif ()
+
+##############################################################################
+##############################################################################
+### V F D T E S T S ###
+##############################################################################
+##############################################################################
+
+ set (H5_VFD_SKIP_TESTS
+ cache
+ accum
+ fheap
+ big
+ vfd
+ error_test
+ err_compat
+ tcheck_version
+ testmeta
+ links_env
+ )
+ if (NOT CYGWIN)
+ list (REMOVE_ITEM H5_VFD_SKIP_TESTS big cache)
+ endif ()
+
+ # Windows only macro
+ macro (CHECK_VFD_TEST vfdtest vfdname resultcode)
+ if ("${vfdtest}" STREQUAL "flush1" OR "${vfdtest}" STREQUAL "flush2")
+ if ("${vfdname}" STREQUAL "multi" OR "${vfdname}" STREQUAL "split")
+ if (NOT BUILD_SHARED_LIBS AND NOT ${HDF_CFG_NAME} MATCHES "Debug")
+ add_test (NAME VFD-${vfdname}-${vfdtest}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:${vfdtest}>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_VFD:STRING=${vfdname}"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_OUTPUT=${vfdname}-${vfdtest}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}"
+ -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
+ )
+ set_tests_properties (VFD-${vfdname}-${vfdtest} PROPERTIES
+ ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}
+ )
+ if (BUILD_SHARED_LIBS)
+ add_test (NAME VFD-${vfdname}-${test}-shared
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:${vfdtest}-shared>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_VFD:STRING=${vfdname}"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_OUTPUT=${vfdname}-${vfdtest}-shared"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared"
+ -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
+ )
+ set_tests_properties (VFD-${vfdname}-${vfdtest}-shared PROPERTIES
+ ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared
+ )
+ endif ()
+ else ()
+ add_test (NAME VFD-${vfdname}-${vfdtest}
+ COMMAND ${CMAKE_COMMAND} -E echo "SKIP VFD-${vfdname}-${vfdtest}"
+ )
+ if (BUILD_SHARED_LIBS)
+ add_test (NAME VFD-${vfdname}-${test}-shared
+ COMMAND ${CMAKE_COMMAND} -E echo "SKIP VFD-${vfdname}-${vfdtest}-shared"
+ )
+ endif ()
+ endif ()
+ else ()
+ add_test (NAME VFD-${vfdname}-${vfdtest}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:${vfdtest}>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_VFD:STRING=${vfdname}"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_OUTPUT=${vfdname}-${vfdtest}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}"
+ -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
+ )
+ set_tests_properties (VFD-${vfdname}-${vfdtest} PROPERTIES
+ ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}
+ )
+ if (BUILD_SHARED_LIBS)
+ add_test (NAME VFD-${vfdname}-${test}-shared
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:${vfdtest}-shared>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_VFD:STRING=${vfdname}"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_OUTPUT=${vfdname}-${vfdtest}-shared"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared"
+ -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
+ )
+ set_tests_properties (VFD-${vfdname}-${vfdtest}-shared PROPERTIES
+ ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared
+ )
+ endif ()
+ endif ()
+ else ()
+ add_test (NAME VFD-${vfdname}-${vfdtest}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:${vfdtest}>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_VFD:STRING=${vfdname}"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_OUTPUT=${vfdname}-${vfdtest}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}"
+ -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
+ )
+ set_tests_properties (VFD-${vfdname}-${vfdtest} PROPERTIES
+ ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname};HDF5TestExpress=${HDF_TEST_EXPRESS}"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}
+ )
+ if (BUILD_SHARED_LIBS AND NOT "${vfdtest}" STREQUAL "cache")
+ add_test (NAME VFD-${vfdname}-${vfdtest}-shared
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:${vfdtest}-shared>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_VFD:STRING=${vfdname}"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_OUTPUT=${vfdname}-${vfdtest}-shared"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared"
+ -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
+ )
+ set_tests_properties (VFD-${vfdname}-${vfdtest}-shared PROPERTIES
+ ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared;HDF5TestExpress=${HDF_TEST_EXPRESS}"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared
+ )
+ endif ()
+ endif ()
+ endmacro ()
+
+ macro (DO_VFD_TEST vfdtest vfdname resultcode)
+ add_test (NAME VFD-${vfdname}-${vfdtest}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:${vfdtest}>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_VFD:STRING=${vfdname}"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_OUTPUT=${vfdname}-${vfdtest}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}"
+ -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
+ )
+ set_tests_properties (VFD-${vfdname}-${vfdtest} PROPERTIES
+ ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}
+ )
+ if (BUILD_SHARED_LIBS)
+ add_test (NAME VFD-${vfdname}-${vfdtest}-shared
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:${vfdtest}-shared>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_VFD:STRING=${vfdname}"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_OUTPUT=${vfdname}-${vfdtest}-shared"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared"
+ -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
+ )
+ set_tests_properties (VFD-${vfdname}-${vfdtest}-shared PROPERTIES
+ ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared
+ )
+ endif ()
+ endmacro ()
+
+ macro (ADD_VFD_TEST vfdname resultcode)
+ foreach (test ${H5_TESTS})
+ if (NOT ${test} IN_LIST H5_VFD_SKIP_TESTS)
+ if (WIN32)
+ CHECK_VFD_TEST (${test} ${vfdname} ${resultcode})
+ else ()
+ DO_VFD_TEST (${test} ${vfdname} ${resultcode})
+ endif ()
+ endif ()
+ endforeach ()
+ set_tests_properties (VFD-${vfdname}-flush2 PROPERTIES DEPENDS VFD-${vfdname}-flush1)
+ set_tests_properties (VFD-${vfdname}-flush1 PROPERTIES TIMEOUT 10)
+ set_tests_properties (VFD-${vfdname}-flush2 PROPERTIES TIMEOUT 10)
+ set_tests_properties (VFD-${vfdname}-istore PROPERTIES TIMEOUT 1800)
+ if (NOT CYGWIN)
+ set_tests_properties (VFD-${vfdname}-cache PROPERTIES TIMEOUT 1800)
+ endif ()
+ if (BUILD_SHARED_LIBS)
+ set_tests_properties (VFD-${vfdname}-flush2-shared PROPERTIES DEPENDS VFD-${vfdname}-flush1-shared)
+ set_tests_properties (VFD-${vfdname}-flush1-shared PROPERTIES TIMEOUT 10)
+ set_tests_properties (VFD-${vfdname}-flush2-shared PROPERTIES TIMEOUT 10)
+ set_tests_properties (VFD-${vfdname}-istore-shared PROPERTIES TIMEOUT 1800)
+ if (NOT CYGWIN AND NOT WIN32)
+ set_tests_properties (VFD-${vfdname}-cache-shared PROPERTIES TIMEOUT 1800)
+ endif ()
+ endif ()
+ if (HDF5_TEST_FHEAP_VFD)
+ add_test (NAME VFD-${vfdname}-fheap
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:fheap>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_VFD:STRING=${vfdname}"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_OUTPUT=${vfdname}-fheap"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}"
+ -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
+ )
+ set_tests_properties (VFD-${vfdname}-fheap PROPERTIES
+ TIMEOUT 1800
+ ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname};HDF5TestExpress=${HDF_TEST_EXPRESS}"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}
+ )
+ if (BUILD_SHARED_LIBS)
+ add_test (NAME VFD-${vfdname}-fheap-shared
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:fheap-shared>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_VFD:STRING=${vfdname}"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_OUTPUT=${vfdname}-fheap-shared"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared"
+ -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
+ )
+ set_tests_properties (VFD-${vfdname}-fheap-shared PROPERTIES
+ TIMEOUT 1800
+ ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared;HDF5TestExpress=${HDF_TEST_EXPRESS}"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared
+ )
+ endif ()
+ endif ()
+ endmacro ()
+
+ # Run test with different Virtual File Driver
+ foreach (vfd ${VFD_LIST})
+ ADD_VFD_TEST (${vfd} 0)
+ endforeach ()
diff --git a/test/COPYING b/test/COPYING
index 6903daf..6497ace 100644
--- a/test/COPYING
+++ b/test/COPYING
@@ -5,12 +5,9 @@
The files and subdirectories in this directory are part of HDF5.
The full HDF5 copyright notice, including terms governing use,
- modification, and redistribution, is contained in the files COPYING
- and Copyright.html. COPYING can be found at the root of the source
- code distribution tree; Copyright.html can be found at the root
- level of an installed copy of the electronic HDF5 document set and
- is linked from the top-level documents page. It can also be found
- at http://www.hdfgroup.org/HDF5/doc/Copyright.html. If you do not
- have access to either file, you may request a copy from
+ modification, and redistribution, is contained in the COPYING file
+ which can be found at the root of the source code distribution tree
+ or in https://support.hdfgroup.org/ftp/HDF5/releases. If you do
+ not have access to either file, you may request a copy from
help@hdfgroup.org.
diff --git a/test/H5srcdir.h b/test/H5srcdir.h
index 2f04295..32fe8c9 100644
--- a/test/H5srcdir.h
+++ b/test/H5srcdir.h
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
diff --git a/test/H5srcdir_str.h.in b/test/H5srcdir_str.h.in
index d472124..bab1df3 100644
--- a/test/H5srcdir_str.h.in
+++ b/test/H5srcdir_str.h.in
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* If you are reading this file and it has a '.h' suffix, it was automatically
diff --git a/test/Makefile.am b/test/Makefile.am
index a64cd0e..ab81f50 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -5,12 +5,10 @@
#
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
-# the files COPYING and Copyright.html. COPYING can be found at the root
-# of the source code distribution tree; Copyright.html can be found at the
-# root level of an installed copy of the electronic HDF5 document set and
-# is linked from the top-level documents page. It can also be found at
-# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have
-# access to either file, you may request a copy from help@hdfgroup.org.
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
##
## Makefile.am
## Run automake to generate a Makefile.in from this file.
@@ -27,22 +25,24 @@ AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_builddir)/src
# testerror.sh: err_compat, error_test
# testlibinfo.sh:
# testcheck_version.sh: tcheck_version
-# tetlinks_env.sh: links_env
+# testlinks_env.sh: links_env
# testflushrefresh.sh: flushrefresh
-# test_usecases.sh: use_append_chunk, use_append_mchunks, use_disable_mdc_flushes
# testswmr.sh: swmr*
# testvdsswmr.sh: vds_swmr*
-TEST_SCRIPT = testerror.sh testlibinfo.sh testcheck_version.sh testlinks_env.sh \
+# test_filenotclosed.sh: filenotclosed.c
+# test_filter_plugin.sh: filter_plugin.c
+# test_usecases.sh: use_append_chunk, use_append_mchunks, use_disable_mdc_flushes
+TEST_SCRIPT = testerror.sh testlibinfo.sh testcheck_version.sh testlinks_env.sh test_filenotclosed.sh\
testswmr.sh testvdsswmr.sh testflushrefresh.sh test_usecases.sh
-SCRIPT_DEPEND = error_test$(EXEEXT) err_compat$(EXEEXT) links_env$(EXEEXT) \
+SCRIPT_DEPEND = error_test$(EXEEXT) err_compat$(EXEEXT) links_env$(EXEEXT) test_filenotclosed$(EXEEXT) \
flushrefresh$(EXEEXT) use_append_chunk$(EXEEXT) use_append_mchunks$(EXEEXT) use_disable_mdc_flushes$(EXEEXT) \
swmr_generator$(EXEEXT) swmr_reader$(EXEEXT) swmr_writer$(EXEEXT) \
swmr_remove_reader$(EXEEXT) swmr_remove_writer$(EXEEXT) swmr_addrem_writer$(EXEEXT) \
swmr_sparse_reader$(EXEEXT) swmr_sparse_writer$(EXEEXT) swmr_start_write$(EXEEXT) \
vds_swmr_gen$(EXEEXT) vds_swmr_reader$(EXEEXT) vds_swmr_writer$(EXEEXT)
if HAVE_SHARED_CONDITIONAL
- TEST_SCRIPT += test_plugin.sh
- SCRIPT_DEPEND += plugin$(EXEEXT)
+ TEST_SCRIPT += test_filter_plugin.sh
+ SCRIPT_DEPEND += filter_plugin$(EXEEXT)
endif
check_SCRIPTS = $(TEST_SCRIPT)
@@ -67,6 +67,7 @@ TEST_PROG= testhdf5 \
# accum_swmr_reader is used by accum.c.
# atomic_writer and atomic_reader are standalone programs.
# links_env is used by testlinks_env.sh
+# filenotclosed is used by test_filenotclosed.sh
# flushrefresh is used by testflushrefresh.sh.
# use_append_chunk, use_append_mchunks and use_disable_mdc_flushes are used by test_usecases.sh
# swmr_* files (besides swmr.c) are used by testswmr.sh.
@@ -76,12 +77,12 @@ TEST_PROG= testhdf5 \
# and this lets automake keep all its test programs in one place.
check_PROGRAMS=$(TEST_PROG) error_test err_compat tcheck_version \
testmeta accum_swmr_reader atomic_writer atomic_reader \
- links_env flushrefresh use_append_chunk use_append_mchunks use_disable_mdc_flushes \
+ links_env filenotclosed flushrefresh use_append_chunk use_append_mchunks use_disable_mdc_flushes \
swmr_generator swmr_start_write swmr_reader swmr_writer swmr_remove_reader \
swmr_remove_writer swmr_addrem_writer swmr_sparse_reader swmr_sparse_writer \
swmr_check_compat_vfd vds_swmr_gen vds_swmr_reader vds_swmr_writer
if HAVE_SHARED_CONDITIONAL
- check_PROGRAMS+= plugin
+ check_PROGRAMS+= filter_plugin
endif
# These programs generate test files for the tests. They don't need to be
@@ -94,7 +95,7 @@ endif
BUILD_ALL_PROGS=gen_bad_ohdr gen_bogus gen_cross gen_deflate gen_filters gen_new_array \
gen_new_fill gen_new_group gen_new_mtime gen_new_super gen_noencoder \
gen_nullspace gen_udlinks space_overflow gen_filespace gen_specmetaread \
- gen_sizes_lheap gen_file_image gen_plist
+ gen_sizes_lheap gen_file_image gen_plist gen_bad_offset gen_bounds
if BUILD_ALL_CONDITIONAL
noinst_PROGRAMS=$(BUILD_ALL_PROGS)
@@ -102,19 +103,17 @@ endif
if HAVE_SHARED_CONDITIONAL
# The libh5test library provides common support code for the tests.
- noinst_LTLIBRARIES=libh5test.la
-
- # The libdynlib1, libdynlib2, libdynlib3, and libdynlib4 library for testing plugin module plugin.c.
- # Build it as shared library if configure is enabled for shared library.
- lib_LTLIBRARIES=libdynlib1.la libdynlib2.la libdynlib3.la libdynlib4.la
- libdynlib1_la_SOURCES=dynlib1.c
- libdynlib2_la_SOURCES=dynlib2.c
- libdynlib3_la_SOURCES=dynlib3.c
- libdynlib4_la_SOURCES=dynlib4.c
-
-install-exec-hook:
- $(RM) $(DESTDIR)$(libdir)/*dynlib*
-
+ # The filter_plugin* libraries are for use in filter_plugin.c.
+ # Build them as shared libraries if that option was enabled in configure.
+ noinst_LTLIBRARIES=libh5test.la libfilter_plugin1_dsets.la libfilter_plugin2_dsets.la libfilter_plugin3_dsets.la libfilter_plugin4_groups.la
+ libfilter_plugin1_dsets_la_SOURCES=filter_plugin1_dsets.c
+ libfilter_plugin2_dsets_la_SOURCES=filter_plugin2_dsets.c
+ libfilter_plugin3_dsets_la_SOURCES=filter_plugin3_dsets.c
+ libfilter_plugin4_groups_la_SOURCES=filter_plugin4_groups.c
+ libfilter_plugin1_dsets_la_LDFLAGS=$(AM_LDFLAGS) -avoid-version -module -shared -export-dynamic -rpath /nowhere
+ libfilter_plugin2_dsets_la_LDFLAGS=$(AM_LDFLAGS) -avoid-version -module -shared -export-dynamic -rpath /nowhere
+ libfilter_plugin3_dsets_la_LDFLAGS=$(AM_LDFLAGS) -avoid-version -module -shared -export-dynamic -rpath /nowhere
+ libfilter_plugin4_groups_la_LDFLAGS=$(AM_LDFLAGS) -avoid-version -module -shared -export-dynamic -rpath /nowhere
else
# The libh5test library provides common support code for the tests.
noinst_LTLIBRARIES=libh5test.la
@@ -175,7 +174,7 @@ CHECK_CLEANFILES+=accum.h5 cmpd_dset.h5 compact_dataset.h5 dataset.h5 dset_offse
tmisc[0-9]*.h5 set_extent[1-5].h5 ext[12].bin \
getname.h5 getname[1-3].h5 sec2_file.h5 direct_file.h5 \
family_file000[0-3][0-9].h5 new_family_v16_000[0-3][0-9].h5 \
- multi_file-[rs].h5 core_file plugin.h5 \
+ multi_file-[rs].h5 core_file filter_plugin.h5 \
new_move_[ab].h5 ntypes.h5 dangle.h5 error_test.h5 err_compat.h5 \
dtransform.h5 test_filters.h5 get_file_name.h5 tstint[1-2].h5 \
unlink_chunked.h5 btree2.h5 btree2_tmp.h5 objcopy_src.h5 objcopy_dst.h5 \
@@ -205,7 +204,7 @@ use_append_mchunks_SOURCES=use_append_mchunks.c use_common.c
use_disable_mdc_flushes_SOURCES=use_disable_mdc_flushes.c
# Temporary files.
-DISTCLEANFILES=testerror.sh testlibinfo.sh testcheck_version.sh testlinks_env.sh test_plugin.sh \
- testswmr.sh testvdsswmr.sh test_usecases.sh testflushrefresh.sh
+DISTCLEANFILES=testerror.sh testlibinfo.sh testcheck_version.sh testlinks_env.sh test_filter_plugin.sh \
+ testswmr.sh testvdsswmr.sh test_usecases.sh testflushrefresh.sh test_filenotclosed.sh
include $(top_srcdir)/config/conclude.am
diff --git a/test/accum.c b/test/accum.c
index d134bbc..19006b6 100644
--- a/test/accum.c
+++ b/test/accum.c
@@ -4,12 +4,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* Programmer: Mike McGreevy
@@ -22,6 +20,8 @@
#define H5FD_TESTING
#include "H5Fpkg.h"
#include "H5FDpkg.h"
+
+#include "H5CXprivate.h" /* API Contexts */
#include "H5Iprivate.h"
/* Filename */
@@ -41,33 +41,30 @@
#define RAND_SEG_LEN (1024)
#define RANDOM_BASE_OFF (1024 * 1024)
-/* Make file global to all tests */
-H5F_t * f = NULL;
-
/* Function Prototypes */
-unsigned test_write_read(const H5F_io_info2_t *fio_info);
-unsigned test_write_read_nonacc_front(const H5F_io_info2_t *fio_info);
-unsigned test_write_read_nonacc_end(const H5F_io_info2_t *fio_info);
-unsigned test_accum_overlap(const H5F_io_info2_t *fio_info);
-unsigned test_accum_overlap_clean(const H5F_io_info2_t *fio_info);
-unsigned test_accum_overlap_size(const H5F_io_info2_t *fio_info);
-unsigned test_accum_non_overlap_size(const H5F_io_info2_t *fio_info);
-unsigned test_accum_adjust(const H5F_io_info2_t *fio_info);
-unsigned test_read_after(const H5F_io_info2_t *fio_info);
-unsigned test_free(const H5F_io_info2_t *fio_info);
-unsigned test_big(const H5F_io_info2_t *fio_info);
-unsigned test_random_write(const H5F_io_info2_t *fio_info);
+unsigned test_write_read(H5F_t *f);
+unsigned test_write_read_nonacc_front(H5F_t *f);
+unsigned test_write_read_nonacc_end(H5F_t *f);
+unsigned test_accum_overlap(H5F_t *f);
+unsigned test_accum_overlap_clean(H5F_t *f);
+unsigned test_accum_overlap_size(H5F_t *f);
+unsigned test_accum_non_overlap_size(H5F_t *f);
+unsigned test_accum_adjust(H5F_t *f);
+unsigned test_read_after(H5F_t *f);
+unsigned test_free(H5F_t *f);
+unsigned test_big(H5F_t *f);
+unsigned test_random_write(H5F_t *f);
unsigned test_swmr_write_big(hbool_t newest_format);
/* Helper Function Prototypes */
-void accum_printf(void);
+void accum_printf(const H5F_t *f);
/* Private Test H5Faccum Function Wrappers */
-#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)
+#define accum_write(a,s,b) H5F_block_write(f, H5FD_MEM_DEFAULT, (haddr_t)(a), (size_t)(s), (b))
+#define accum_read(a,s,b) H5F_block_read(f, H5FD_MEM_DEFAULT, (haddr_t)(a), (size_t)(s), (b))
+#define accum_free(f,a,s) H5F__accum_free(f, H5FD_MEM_DEFAULT, (haddr_t)(a), (hsize_t)(s))
+#define accum_flush(f) H5F__accum_flush(f)
+#define accum_reset(f) H5F__accum_reset(f, TRUE)
/* ================= */
/* Main Test Routine */
@@ -90,9 +87,11 @@ void accum_printf(void);
int
main(void)
{
- H5F_io_info2_t fio_info; /* I/O info for operation */
unsigned nerrors = 0; /* track errors */
+ hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
hid_t fid = -1;
+ H5F_t * f = NULL; /* File for all tests */
+
/* Test Setup */
puts("Testing the metadata accumulator");
@@ -100,6 +99,10 @@ main(void)
/* Create a test file */
if((fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ /* Push API context */
+ if(H5CX_push() < 0) FAIL_STACK_ERROR
+ api_ctx_pushed = TRUE;
+
/* Get H5F_t * to internal file structure */
if(NULL == (f = (H5F_t *)H5I_object(fid))) FAIL_STACK_ERROR
@@ -107,27 +110,26 @@ main(void)
file a ways. 10MB should do. */
if(H5FD_set_eoa(f->shared->lf, H5FD_MEM_DEFAULT, (haddr_t)(1024*1024*10)) < 0) FAIL_STACK_ERROR
- /* Set up I/O info for operation */
- fio_info.f = f;
- if(NULL == (fio_info.meta_dxpl = (H5P_genplist_t *)H5I_object(H5AC_ind_read_dxpl_id))) FAIL_STACK_ERROR
- if(NULL == (fio_info.raw_dxpl = (H5P_genplist_t *)H5I_object(H5AC_rawdata_dxpl_id))) FAIL_STACK_ERROR
-
/* Reset metadata accumulator for the file */
- if(accum_reset(&fio_info) < 0) FAIL_STACK_ERROR
+ if(accum_reset(f) < 0) FAIL_STACK_ERROR
/* Test Functions */
- nerrors += test_write_read(&fio_info);
- nerrors += test_write_read_nonacc_front(&fio_info);
- nerrors += test_write_read_nonacc_end(&fio_info);
- nerrors += test_accum_overlap(&fio_info);
- nerrors += test_accum_overlap_clean(&fio_info);
- nerrors += test_accum_overlap_size(&fio_info);
- nerrors += test_accum_non_overlap_size(&fio_info);
- nerrors += test_accum_adjust(&fio_info);
- nerrors += test_read_after(&fio_info);
- nerrors += test_free(&fio_info);
- nerrors += test_big(&fio_info);
- nerrors += test_random_write(&fio_info);
+ nerrors += test_write_read(f);
+ nerrors += test_write_read_nonacc_front(f);
+ nerrors += test_write_read_nonacc_end(f);
+ nerrors += test_accum_overlap(f);
+ nerrors += test_accum_overlap_clean(f);
+ nerrors += test_accum_overlap_size(f);
+ nerrors += test_accum_non_overlap_size(f);
+ nerrors += test_accum_adjust(f);
+ nerrors += test_read_after(f);
+ nerrors += test_free(f);
+ nerrors += test_big(f);
+ nerrors += test_random_write(f);
+
+ /* Pop API context */
+ if(api_ctx_pushed && H5CX_pop() < 0) FAIL_STACK_ERROR
+ api_ctx_pushed = FALSE;
/* End of test code, close and delete file */
if(H5Fclose(fid) < 0) TEST_ERROR
@@ -144,6 +146,8 @@ main(void)
return 0;
error:
+ if(api_ctx_pushed) H5CX_pop();
+
puts("*** TESTS FAILED ***");
return 1;
} /* end main() */
@@ -167,7 +171,7 @@ error:
*-------------------------------------------------------------------------
*/
unsigned
-test_write_read(const H5F_io_info2_t *fio_info)
+test_write_read(H5F_t *f)
{
int i = 0;
int *write_buf, *read_buf;
@@ -190,7 +194,7 @@ test_write_read(const H5F_io_info2_t *fio_info)
if(accum_read(0, 1024, read_buf) < 0) FAIL_STACK_ERROR;
if(HDmemcmp(write_buf, read_buf, (size_t)1024) != 0) TEST_ERROR;
- if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
+ if(accum_reset(f) < 0) FAIL_STACK_ERROR;
PASSED();
@@ -223,7 +227,7 @@ error:
*-------------------------------------------------------------------------
*/
unsigned
-test_write_read_nonacc_front(const H5F_io_info2_t *fio_info)
+test_write_read_nonacc_front(H5F_t *f)
{
int i = 0;
int *write_buf, *read_buf;
@@ -243,13 +247,13 @@ test_write_read_nonacc_front(const H5F_io_info2_t *fio_info)
/* Do a simple write/read/verify of data */
/* Write 1KB at Address 0 */
if(accum_write(0, 1024, write_buf) < 0) FAIL_STACK_ERROR;
- if(accum_flush(fio_info) < 0) FAIL_STACK_ERROR;
- if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
+ if(accum_flush(f) < 0) FAIL_STACK_ERROR;
+ if(accum_reset(f) < 0) FAIL_STACK_ERROR;
if(accum_write(1024, 1024, write_buf) < 0) FAIL_STACK_ERROR;
if(accum_read(0, 1024, read_buf) < 0) FAIL_STACK_ERROR;
if(HDmemcmp(write_buf, read_buf, (size_t)1024) != 0) TEST_ERROR;
- if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
+ if(accum_reset(f) < 0) FAIL_STACK_ERROR;
PASSED();
@@ -282,7 +286,7 @@ error:
*-------------------------------------------------------------------------
*/
unsigned
-test_write_read_nonacc_end(const H5F_io_info2_t *fio_info)
+test_write_read_nonacc_end(H5F_t *f)
{
int i = 0;
int *write_buf, *read_buf;
@@ -302,13 +306,13 @@ test_write_read_nonacc_end(const H5F_io_info2_t *fio_info)
/* Do a simple write/read/verify of data */
/* Write 1KB at Address 0 */
if(accum_write(1024, 1024, write_buf) < 0) FAIL_STACK_ERROR;
- if(accum_flush(fio_info) < 0) FAIL_STACK_ERROR;
- if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
+ if(accum_flush(f) < 0) FAIL_STACK_ERROR;
+ if(accum_reset(f) < 0) FAIL_STACK_ERROR;
if(accum_write(0, 1024, write_buf) < 0) FAIL_STACK_ERROR;
if(accum_read(1024, 1024, read_buf) < 0) FAIL_STACK_ERROR;
if(HDmemcmp(write_buf, read_buf, (size_t)1024) != 0) TEST_ERROR;
- if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
+ if(accum_reset(f) < 0) FAIL_STACK_ERROR;
PASSED();
@@ -341,7 +345,7 @@ error:
*-------------------------------------------------------------------------
*/
unsigned
-test_free(const H5F_io_info2_t *fio_info)
+test_free(H5F_t *f)
{
int i = 0;
int32_t *wbuf = NULL;
@@ -364,38 +368,38 @@ test_free(const H5F_io_info2_t *fio_info)
if(accum_write(0, 256 * sizeof(int32_t), wbuf) < 0) FAIL_STACK_ERROR;
- if(accum_free(fio_info, 0, 256 * sizeof(int32_t)) < 0) FAIL_STACK_ERROR;
+ if(accum_free(f, 0, 256 * sizeof(int32_t)) < 0) FAIL_STACK_ERROR;
/* Free an empty accumulator */
- if(accum_free(fio_info, 0, 256 * 1024 * sizeof(int32_t)) < 0) FAIL_STACK_ERROR;
+ if(accum_free(f, 0, 256 * 1024 * sizeof(int32_t)) < 0) FAIL_STACK_ERROR;
/* Write second quarter of the accumulator */
if(accum_write(64 * sizeof(int32_t), 64 * sizeof(int32_t), wbuf) < 0) FAIL_STACK_ERROR;
/* Free the second quarter of the accumulator, the requested area
* is bigger than the data region on the right side. */
- if(accum_free(fio_info, 64 * sizeof(int32_t), 65 * sizeof(int32_t)) < 0) FAIL_STACK_ERROR;
+ if(accum_free(f, 64 * sizeof(int32_t), 65 * sizeof(int32_t)) < 0) FAIL_STACK_ERROR;
/* Write half of the accumulator. */
if(accum_write(0, 128 * sizeof(int32_t), wbuf) < 0) FAIL_STACK_ERROR;
/* Free the first block of 4B */
- if(accum_free(fio_info, 0, sizeof(int32_t)) < 0) FAIL_STACK_ERROR;
+ if(accum_free(f, 0, sizeof(int32_t)) < 0) FAIL_STACK_ERROR;
/* Check that the accumulator still contains the correct data */
if(accum_read(1 * sizeof(int32_t), 127 * sizeof(int32_t), rbuf) < 0) FAIL_STACK_ERROR;
if(HDmemcmp(wbuf + 1, rbuf, 127 * sizeof(int32_t)) != 0) TEST_ERROR;
/* Free the block of 4B at 127*4B */
- if(accum_free(fio_info, 127 * sizeof(int32_t), sizeof(int32_t)) < 0) FAIL_STACK_ERROR;
+ if(accum_free(f, 127 * sizeof(int32_t), sizeof(int32_t)) < 0) FAIL_STACK_ERROR;
/* Check that the accumulator still contains the correct data */
if(accum_read(1 * sizeof(int32_t), 126 * sizeof(int32_t), rbuf) < 0) FAIL_STACK_ERROR;
if(HDmemcmp(wbuf + 1, rbuf, 126 * sizeof(int32_t)) != 0) TEST_ERROR;
/* Free the block of 4B at 2*4B */
- if(accum_free(fio_info, 2 * sizeof(int32_t), sizeof(int32_t)) < 0) FAIL_STACK_ERROR;
+ if(accum_free(f, 2 * sizeof(int32_t), sizeof(int32_t)) < 0) FAIL_STACK_ERROR;
/* Check that the accumulator still contains the correct data */
if(accum_read(1 * sizeof(int32_t), 1 * sizeof(int32_t), rbuf) < 0) FAIL_STACK_ERROR;
@@ -408,10 +412,10 @@ test_free(const H5F_io_info2_t *fio_info)
* entirely before dirty section */
if(accum_write(64 * sizeof(int32_t), 128 * sizeof(int32_t), wbuf) < 0) FAIL_STACK_ERROR;
HDmemcpy(expect + 64, wbuf, 128 * sizeof(int32_t));
- if(accum_flush(fio_info) < 0) FAIL_STACK_ERROR;
+ if(accum_flush(f) < 0) FAIL_STACK_ERROR;
if(accum_write(68 * sizeof(int32_t), 4 * sizeof(int32_t), wbuf) < 0) FAIL_STACK_ERROR;
HDmemcpy(expect + 68, wbuf, 4 * sizeof(int32_t));
- if(accum_free(fio_info, 62 * sizeof(int32_t), 4 * sizeof(int32_t)) < 0) FAIL_STACK_ERROR;
+ if(accum_free(f, 62 * sizeof(int32_t), 4 * sizeof(int32_t)) < 0) FAIL_STACK_ERROR;
/* Check that the accumulator still contains the correct data */
if(accum_read(66 * sizeof(int32_t), 126 * sizeof(int32_t), rbuf) < 0) FAIL_STACK_ERROR;
@@ -422,10 +426,10 @@ test_free(const H5F_io_info2_t *fio_info)
* completely contains dirty section */
if(accum_write(64 * sizeof(int32_t), 128 * sizeof(int32_t), wbuf) < 0) FAIL_STACK_ERROR;
HDmemcpy(expect + 64, wbuf, 128 * sizeof(int32_t));
- if(accum_flush(fio_info) < 0) FAIL_STACK_ERROR;
+ if(accum_flush(f) < 0) FAIL_STACK_ERROR;
if(accum_write(68 * sizeof(int32_t), 4 * sizeof(int32_t), wbuf) < 0) FAIL_STACK_ERROR;
HDmemcpy(expect + 68, wbuf, 4 * sizeof(int32_t));
- if(accum_free(fio_info, 62 * sizeof(int32_t), 16 * sizeof(int32_t)) < 0) FAIL_STACK_ERROR;
+ if(accum_free(f, 62 * sizeof(int32_t), 16 * sizeof(int32_t)) < 0) FAIL_STACK_ERROR;
/* Check that the accumulator still contains the correct data */
if(accum_read(78 * sizeof(int32_t), 114 * sizeof(int32_t), rbuf) < 0) FAIL_STACK_ERROR;
@@ -436,10 +440,10 @@ test_free(const H5F_io_info2_t *fio_info)
* before dirty section */
if(accum_write(64 * sizeof(int32_t), 128 * sizeof(int32_t), wbuf) < 0) FAIL_STACK_ERROR;
HDmemcpy(expect + 64, wbuf, 128 * sizeof(int32_t));
- if(accum_flush(fio_info) < 0) FAIL_STACK_ERROR;
+ if(accum_flush(f) < 0) FAIL_STACK_ERROR;
if(accum_write(72 * sizeof(int32_t), 4 * sizeof(int32_t), wbuf) < 0) FAIL_STACK_ERROR;
HDmemcpy(expect + 72, wbuf, 4 * sizeof(int32_t));
- if(accum_free(fio_info, 66 * sizeof(int32_t), 4 * sizeof(int32_t)) < 0) FAIL_STACK_ERROR;
+ if(accum_free(f, 66 * sizeof(int32_t), 4 * sizeof(int32_t)) < 0) FAIL_STACK_ERROR;
/* Check that the accumulator still contains the correct data */
if(accum_read(70 * sizeof(int32_t), 122 * sizeof(int32_t), rbuf) < 0) FAIL_STACK_ERROR;
@@ -450,10 +454,10 @@ test_free(const H5F_io_info2_t *fio_info)
* dirty section, and ends in dirty section */
if(accum_write(64 * sizeof(int32_t), 128 * sizeof(int32_t), wbuf) < 0) FAIL_STACK_ERROR;
HDmemcpy(expect + 64, wbuf, 128 * sizeof(int32_t));
- if(accum_flush(fio_info) < 0) FAIL_STACK_ERROR;
+ if(accum_flush(f) < 0) FAIL_STACK_ERROR;
if(accum_write(72 * sizeof(int32_t), 4 * sizeof(int32_t), wbuf) < 0) FAIL_STACK_ERROR;
HDmemcpy(expect + 72, wbuf, 4 * sizeof(int32_t));
- if(accum_free(fio_info, 70 * sizeof(int32_t), 4 * sizeof(int32_t)) < 0) FAIL_STACK_ERROR;
+ if(accum_free(f, 70 * sizeof(int32_t), 4 * sizeof(int32_t)) < 0) FAIL_STACK_ERROR;
/* Check that the accumulator still contains the correct data */
if(accum_read(74 * sizeof(int32_t), 118 * sizeof(int32_t), rbuf) < 0) FAIL_STACK_ERROR;
@@ -464,10 +468,10 @@ test_free(const H5F_io_info2_t *fio_info)
* contains dirty section */
if(accum_write(64 * sizeof(int32_t), 128 * sizeof(int32_t), wbuf) < 0) FAIL_STACK_ERROR;
HDmemcpy(expect + 64, wbuf, 128 * sizeof(int32_t));
- if(accum_flush(fio_info) < 0) FAIL_STACK_ERROR;
+ if(accum_flush(f) < 0) FAIL_STACK_ERROR;
if(accum_write(72 * sizeof(int32_t), 4 * sizeof(int32_t), wbuf) < 0) FAIL_STACK_ERROR;
HDmemcpy(expect + 72, wbuf, 4 * sizeof(int32_t));
- if(accum_free(fio_info, 70 * sizeof(int32_t), 8 * sizeof(int32_t)) < 0) FAIL_STACK_ERROR;
+ if(accum_free(f, 70 * sizeof(int32_t), 8 * sizeof(int32_t)) < 0) FAIL_STACK_ERROR;
/* Check that the accumulator still contains the correct data */
if(accum_read(78 * sizeof(int32_t), 114 * sizeof(int32_t), rbuf) < 0) FAIL_STACK_ERROR;
@@ -478,10 +482,10 @@ test_free(const H5F_io_info2_t *fio_info)
* of dirty section, and ends in dirty section */
if(accum_write(64 * sizeof(int32_t), 128 * sizeof(int32_t), wbuf) < 0) FAIL_STACK_ERROR;
HDmemcpy(expect + 64, wbuf, 128 * sizeof(int32_t));
- if(accum_flush(fio_info) < 0) FAIL_STACK_ERROR;
+ if(accum_flush(f) < 0) FAIL_STACK_ERROR;
if(accum_write(72 * sizeof(int32_t), 8 * sizeof(int32_t), wbuf) < 0) FAIL_STACK_ERROR;
HDmemcpy(expect + 72, wbuf, 8 * sizeof(int32_t));
- if(accum_free(fio_info, 72 * sizeof(int32_t), 4 * sizeof(int32_t)) < 0) FAIL_STACK_ERROR;
+ if(accum_free(f, 72 * sizeof(int32_t), 4 * sizeof(int32_t)) < 0) FAIL_STACK_ERROR;
/* Check that the accumulator still contains the correct data */
if(accum_read(76 * sizeof(int32_t), 116 * sizeof(int32_t), rbuf) < 0) FAIL_STACK_ERROR;
@@ -494,7 +498,7 @@ test_free(const H5F_io_info2_t *fio_info)
HDfree(expect);
expect = NULL;
- if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
+ if(accum_reset(f) < 0) FAIL_STACK_ERROR;
PASSED();
@@ -528,7 +532,7 @@ error:
*-------------------------------------------------------------------------
*/
unsigned
-test_accum_overlap(const H5F_io_info2_t *fio_info)
+test_accum_overlap(H5F_t *f)
{
int i = 0;
int32_t *wbuf, *rbuf;
@@ -664,7 +668,7 @@ test_accum_overlap(const H5F_io_info2_t *fio_info)
if(accum_read(112, 6 * sizeof(int32_t), rbuf) < 0) FAIL_STACK_ERROR;
if(HDmemcmp(wbuf, rbuf, 6 * sizeof(int32_t)) != 0) TEST_ERROR;
- if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
+ if(accum_reset(f) < 0) FAIL_STACK_ERROR;
PASSED();
@@ -700,7 +704,7 @@ error:
*-------------------------------------------------------------------------
*/
unsigned
-test_accum_overlap_clean(const H5F_io_info2_t *fio_info)
+test_accum_overlap_clean(H5F_t *f)
{
int i = 0;
int32_t *wbuf, *rbuf;
@@ -726,7 +730,7 @@ test_accum_overlap_clean(const H5F_io_info2_t *fio_info)
/* Case 2: End of new piece aligns with start of clean accumulated data */
/* Write 5 2's at address 20 */
/* @0:| 222221111111111| */
- if(accum_flush(fio_info) < 0) FAIL_STACK_ERROR;
+ if(accum_flush(f) < 0) FAIL_STACK_ERROR;
for(i = 0; i < 5; i++)
wbuf[i] = 2;
if(accum_write(20, 5 * sizeof(int32_t), wbuf) < 0) FAIL_STACK_ERROR;
@@ -766,7 +770,7 @@ test_accum_overlap_clean(const H5F_io_info2_t *fio_info)
/* Case 6: New piece completely within clean accumulated data */
/* Write 3 6's at address 44 */
/* @0:| 333334666511111| */
- if(accum_flush(fio_info) < 0) FAIL_STACK_ERROR;
+ if(accum_flush(f) < 0) FAIL_STACK_ERROR;
for(i = 0; i < 3; i++)
wbuf[i] = 6;
if(accum_write(44, 3 * sizeof(int32_t), wbuf) < 0) FAIL_STACK_ERROR;
@@ -776,7 +780,7 @@ test_accum_overlap_clean(const H5F_io_info2_t *fio_info)
/* Case 7: New piece overlaps start of clean accumulated data */
/* Write 2 7's at address 16 */
/* @0:| 7733334666511111| */
- if(accum_flush(fio_info) < 0) FAIL_STACK_ERROR;
+ if(accum_flush(f) < 0) FAIL_STACK_ERROR;
for(i = 0; i < 2; i++)
wbuf[i] = 7;
if(accum_write(16, 2 * sizeof(int32_t), wbuf) < 0) FAIL_STACK_ERROR;
@@ -796,7 +800,7 @@ test_accum_overlap_clean(const H5F_io_info2_t *fio_info)
/* Case 9: Start of new piece aligns with end of clean accumulated data */
/* Write 3 9's at address 80 */
/* @0:| 88883334666511111999| */
- if(accum_flush(fio_info) < 0) FAIL_STACK_ERROR;
+ if(accum_flush(f) < 0) FAIL_STACK_ERROR;
for(i = 0; i < 3; i++)
wbuf[i] = 9;
if(accum_write(80, 3 * sizeof(int32_t), wbuf) < 0) FAIL_STACK_ERROR;
@@ -806,7 +810,7 @@ test_accum_overlap_clean(const H5F_io_info2_t *fio_info)
/* Case 10: New piece overlaps end of clean accumulated data */
/* Write 3 2's at address 88 */
/* @0:| 888833346665111119922| */
- if(accum_flush(fio_info) < 0) FAIL_STACK_ERROR;
+ if(accum_flush(f) < 0) FAIL_STACK_ERROR;
for(i = 0; i < 2; i++)
wbuf[i] = 2;
if(accum_write(88, 2 * sizeof(int32_t), wbuf) < 0) FAIL_STACK_ERROR;
@@ -844,7 +848,7 @@ test_accum_overlap_clean(const H5F_io_info2_t *fio_info)
if(accum_read(12, 22 * sizeof(int32_t), rbuf) < 0) FAIL_STACK_ERROR;
if(HDmemcmp(wbuf, rbuf, 22 * sizeof(int32_t)) != 0) TEST_ERROR;
- if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
+ if(accum_reset(f) < 0) FAIL_STACK_ERROR;
PASSED();
@@ -879,7 +883,7 @@ error:
*-------------------------------------------------------------------------
*/
unsigned
-test_accum_non_overlap_size(const H5F_io_info2_t *fio_info)
+test_accum_non_overlap_size(H5F_t *f)
{
int i = 0;
int32_t *wbuf, *rbuf;
@@ -911,7 +915,7 @@ test_accum_non_overlap_size(const H5F_io_info2_t *fio_info)
if(accum_read(0, 20 * sizeof(int32_t), rbuf) < 0) FAIL_STACK_ERROR;
if(HDmemcmp(wbuf, rbuf, 20 * sizeof(int32_t)) != 0) TEST_ERROR;
- if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
+ if(accum_reset(f) < 0) FAIL_STACK_ERROR;
PASSED();
@@ -946,7 +950,7 @@ error:
*-------------------------------------------------------------------------
*/
unsigned
-test_accum_overlap_size(const H5F_io_info2_t *fio_info)
+test_accum_overlap_size(H5F_t *f)
{
int i = 0;
int32_t *wbuf, *rbuf;
@@ -978,7 +982,7 @@ test_accum_overlap_size(const H5F_io_info2_t *fio_info)
if(accum_read(60, 72 * sizeof(int32_t), rbuf) < 0) FAIL_STACK_ERROR;
if(HDmemcmp(wbuf, rbuf, 72 * sizeof(int32_t)) != 0) TEST_ERROR;
- if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
+ if(accum_reset(f) < 0) FAIL_STACK_ERROR;
PASSED();
@@ -1024,7 +1028,7 @@ error:
*-------------------------------------------------------------------------
*/
unsigned
-test_accum_adjust(const H5F_io_info2_t *fio_info)
+test_accum_adjust(H5F_t *f)
{
int i = 0;
int s = 1048576; /* size of buffer */
@@ -1070,7 +1074,7 @@ test_accum_adjust(const H5F_io_info2_t *fio_info)
if(HDmemcmp(wbuf, rbuf, (size_t)1024) != 0) TEST_ERROR;
/* Reset accumulator for next case */
- if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
+ if(accum_reset(f) < 0) FAIL_STACK_ERROR;
/* ================================================================ */
/* Case 2: Prepending large block to large, fully dirty accumulator */
@@ -1099,7 +1103,7 @@ test_accum_adjust(const H5F_io_info2_t *fio_info)
if(HDmemcmp(wbuf, rbuf, (size_t)1048571) != 0) TEST_ERROR;
/* Reset accumulator for next case */
- if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
+ if(accum_reset(f) < 0) FAIL_STACK_ERROR;
/* ========================================================= */
/* Case 3: Appending small block to large, clean accumulator */
@@ -1113,7 +1117,7 @@ test_accum_adjust(const H5F_io_info2_t *fio_info)
/* Flush the accumulator -- we want to test the case when
accumulator contains clean data */
- if(accum_flush(fio_info) < 0) FAIL_STACK_ERROR
+ if(accum_flush(f) < 0) FAIL_STACK_ERROR
/* Write a small (1KB) block to the end of the accumulator */
/* ==> Accumulator will need more buffer space */
@@ -1134,7 +1138,7 @@ test_accum_adjust(const H5F_io_info2_t *fio_info)
if(HDmemcmp(wbuf, rbuf, (size_t)1024) != 0) TEST_ERROR;
/* Reset accumulator for next case */
- if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
+ if(accum_reset(f) < 0) FAIL_STACK_ERROR;
/* ==================================================================== */
/* Case 4: Appending small block to large, partially dirty accumulator, */
@@ -1148,7 +1152,7 @@ test_accum_adjust(const H5F_io_info2_t *fio_info)
if(accum_write(0, (1024 * 1024) - 5, wbuf) < 0) FAIL_STACK_ERROR;
/* Flush the accumulator to clean it */
- if(accum_flush(fio_info) < 0) FAIL_STACK_ERROR
+ if(accum_flush(f) < 0) FAIL_STACK_ERROR
/* write to part of the accumulator so just the start of it is dirty */
if(accum_write(0, 5, wbuf) < 0) FAIL_STACK_ERROR;
@@ -1174,7 +1178,7 @@ test_accum_adjust(const H5F_io_info2_t *fio_info)
if(HDmemcmp(wbuf, rbuf, (size_t)349523) != 0) TEST_ERROR;
/* Reset accumulator for next case */
- if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
+ if(accum_reset(f) < 0) FAIL_STACK_ERROR;
/* ==================================================================== */
/* Case 5: Appending small block to large, partially dirty accumulator, */
@@ -1185,7 +1189,7 @@ test_accum_adjust(const H5F_io_info2_t *fio_info)
if(accum_write(0, (1024 * 1024) - 5, wbuf) < 0) FAIL_STACK_ERROR;
/* Flush the accumulator to clean it */
- if(accum_flush(fio_info) < 0) FAIL_STACK_ERROR
+ if(accum_flush(f) < 0) FAIL_STACK_ERROR
/* write to part of the accumulator so it's dirty, but not entirely dirty */
/* (just the begging few bytes will be clean) */
@@ -1211,7 +1215,7 @@ test_accum_adjust(const H5F_io_info2_t *fio_info)
if(HDmemcmp(wbuf, rbuf, (size_t)10) != 0) TEST_ERROR;
/* Reset accumulator for next case */
- if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
+ if(accum_reset(f) < 0) FAIL_STACK_ERROR;
/* ================================================================= */
/* Case 6: Appending small block to large, fully dirty accumulator */
@@ -1242,7 +1246,7 @@ test_accum_adjust(const H5F_io_info2_t *fio_info)
if(accum_read(1048571, 349523, rbuf) < 0) FAIL_STACK_ERROR;
if(HDmemcmp(wbuf, rbuf, (size_t)349523) != 0) TEST_ERROR;
- if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
+ if(accum_reset(f) < 0) FAIL_STACK_ERROR;
PASSED();
@@ -1280,7 +1284,7 @@ error:
*-------------------------------------------------------------------------
*/
unsigned
-test_read_after(const H5F_io_info2_t *fio_info)
+test_read_after(H5F_t *f)
{
int i = 0;
int s = 128; /* size of buffer */
@@ -1325,7 +1329,7 @@ test_read_after(const H5F_io_info2_t *fio_info)
if(accum_read(512, 512, rbuf) < 0) FAIL_STACK_ERROR;
if(HDmemcmp(wbuf, rbuf, (size_t)128) != 0) TEST_ERROR;
- if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
+ if(accum_reset(f) < 0) FAIL_STACK_ERROR;
PASSED();
@@ -1359,7 +1363,7 @@ error:
*-------------------------------------------------------------------------
*/
unsigned
-test_big(const H5F_io_info2_t *fio_info)
+test_big(H5F_t *f)
{
uint8_t *wbuf, *wbuf2, *rbuf, *zbuf; /* Buffers for reading & writing, etc */
unsigned u; /* Local index variable */
@@ -1395,7 +1399,7 @@ test_big(const H5F_io_info2_t *fio_info)
/* Reset data in file back to zeros & reset the read buffer */
if(accum_write(0, BIG_BUF_SIZE, zbuf) < 0) FAIL_STACK_ERROR;
HDmemset(rbuf, 0, (size_t)BIG_BUF_SIZE);
- if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
+ if(accum_reset(f) < 0) FAIL_STACK_ERROR;
/* Write small section to middle of accumulator */
@@ -1414,7 +1418,7 @@ test_big(const H5F_io_info2_t *fio_info)
/* Reset data in file back to zeros & reset the read buffer */
if(accum_write(1024, 1024, zbuf) < 0) FAIL_STACK_ERROR;
HDmemset(rbuf, 0, (size_t)BIG_BUF_SIZE);
- if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
+ if(accum_reset(f) < 0) FAIL_STACK_ERROR;
/* Write small section to overlap with end of "big" region */
@@ -1432,7 +1436,7 @@ test_big(const H5F_io_info2_t *fio_info)
/* Reset data in file back to zeros & reset the read buffer */
if(accum_write(BIG_BUF_SIZE - 512, 1024, zbuf) < 0) FAIL_STACK_ERROR;
HDmemset(rbuf, 0, (size_t)BIG_BUF_SIZE);
- if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
+ if(accum_reset(f) < 0) FAIL_STACK_ERROR;
/* Write small section to overlap with beginning of "big" region */
@@ -1450,7 +1454,7 @@ test_big(const H5F_io_info2_t *fio_info)
/* Reset data in file back to zeros & reset the read buffer */
if(accum_write(0, 1024, zbuf) < 0) FAIL_STACK_ERROR;
HDmemset(rbuf, 0, (size_t)BIG_BUF_SIZE);
- if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
+ if(accum_reset(f) < 0) FAIL_STACK_ERROR;
/* Write small section to middle of accumulator */
@@ -1472,7 +1476,7 @@ test_big(const H5F_io_info2_t *fio_info)
/* Reset data in file back to zeros & reset the read buffer */
if(accum_write(0, BIG_BUF_SIZE, zbuf) < 0) FAIL_STACK_ERROR;
HDmemset(rbuf, 0, (size_t)BIG_BUF_SIZE);
- if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
+ if(accum_reset(f) < 0) FAIL_STACK_ERROR;
/* Write small section to overlap with end of "big" region */
@@ -1495,7 +1499,7 @@ test_big(const H5F_io_info2_t *fio_info)
/* Reset data in file back to zeros & reset the read buffer */
if(accum_write(0, BIG_BUF_SIZE + 512, zbuf) < 0) FAIL_STACK_ERROR;
HDmemset(rbuf, 0, (size_t)(BIG_BUF_SIZE + 512));
- if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
+ if(accum_reset(f) < 0) FAIL_STACK_ERROR;
/* Write small section to be past "big" region */
@@ -1523,7 +1527,7 @@ test_big(const H5F_io_info2_t *fio_info)
/* Reset data in file back to zeros & reset the read buffer */
if(accum_write(0, BIG_BUF_SIZE + 1536, zbuf) < 0) FAIL_STACK_ERROR;
HDmemset(rbuf, 0, (size_t)(BIG_BUF_SIZE + 1024));
- if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
+ if(accum_reset(f) < 0) FAIL_STACK_ERROR;
/* Write small section to be past "big" region */
@@ -1551,7 +1555,7 @@ test_big(const H5F_io_info2_t *fio_info)
/* Reset data in file back to zeros & reset the read buffer */
if(accum_write(1536, BIG_BUF_SIZE, zbuf) < 0) FAIL_STACK_ERROR;
HDmemset(rbuf, 0, (size_t)(BIG_BUF_SIZE + 1536));
- if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
+ if(accum_reset(f) < 0) FAIL_STACK_ERROR;
/* Write small section before "big" region */
@@ -1578,7 +1582,7 @@ test_big(const H5F_io_info2_t *fio_info)
/* Reset data in file back to zeros & reset the read buffer */
if(accum_write(512, BIG_BUF_SIZE, zbuf) < 0) FAIL_STACK_ERROR;
HDmemset(rbuf, 0, (size_t)(BIG_BUF_SIZE + 512));
- if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
+ if(accum_reset(f) < 0) FAIL_STACK_ERROR;
/* Write small section before "big" region */
@@ -1606,7 +1610,7 @@ test_big(const H5F_io_info2_t *fio_info)
/* Reset data in file back to zeros & reset the read buffer */
if(accum_write(0, BIG_BUF_SIZE + 1536, zbuf) < 0) FAIL_STACK_ERROR;
HDmemset(rbuf, 0, (size_t)(BIG_BUF_SIZE + 1536));
- if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
+ if(accum_reset(f) < 0) FAIL_STACK_ERROR;
/* Write small section before "big" region */
@@ -1630,7 +1634,7 @@ test_big(const H5F_io_info2_t *fio_info)
if(HDmemcmp(wbuf2, rbuf + 512, (size_t)BIG_BUF_SIZE) != 0) TEST_ERROR;
- if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
+ if(accum_reset(f) < 0) FAIL_STACK_ERROR;
PASSED();
@@ -1667,7 +1671,7 @@ error:
*-------------------------------------------------------------------------
*/
unsigned
-test_random_write(const H5F_io_info2_t *fio_info)
+test_random_write(H5F_t *f)
{
uint8_t *wbuf, *rbuf; /* Buffers for reading & writing */
unsigned seed = 0; /* Random # seed */
@@ -1767,7 +1771,7 @@ HDfprintf(stderr, "Random # seed was: %u\n", seed);
/* Verify data read back in */
if(HDmemcmp(wbuf, rbuf, (size_t)RANDOM_BUF_SIZE) != 0) TEST_ERROR;
- if(accum_reset(fio_info) < 0) FAIL_STACK_ERROR;
+ if(accum_reset(f) < 0) FAIL_STACK_ERROR;
PASSED();
@@ -1821,15 +1825,14 @@ test_swmr_write_big(hbool_t newest_format)
pid_t pid; /* Process ID */
#endif /* H5_HAVE_UNISTD_H */
int status; /* Status returned from child process */
- H5F_io_info2_t fio_info; /* I/O info for operation */
char *new_argv[] = {NULL};
char *driver = NULL; /* VFD string (from env variable) */
+ hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
- if(newest_format) {
- TESTING("SWMR write of large metadata: with latest format");
- } else {
- TESTING("SWMR write of large metadata: with non-latest-format");
- } /* end if */
+ if(newest_format)
+ TESTING("SWMR write of large metadata: with latest format")
+ else
+ TESTING("SWMR write of large metadata: with non-latest-format")
#if !(defined(H5_HAVE_FORK) && defined(H5_HAVE_WAITPID))
@@ -1873,16 +1876,13 @@ test_swmr_write_big(hbool_t newest_format)
if((fid = H5Fopen(SWMR_FILENAME, H5F_ACC_RDWR | H5F_ACC_SWMR_WRITE, fapl)) < 0)
FAIL_STACK_ERROR
+ /* Push API context */
+ if(H5CX_push() < 0) FAIL_STACK_ERROR
+ api_ctx_pushed = TRUE;
+
/* Get H5F_t * to internal file structure */
if(NULL == (rf = (H5F_t *)H5I_object(fid))) FAIL_STACK_ERROR
- /* Set up I/O info for operation */
- fio_info.f = rf;
- if(NULL == (fio_info.meta_dxpl = (H5P_genplist_t *)H5I_object(H5AC_ind_read_dxpl_id)))
- FAIL_STACK_ERROR
- if(NULL == (fio_info.raw_dxpl = (H5P_genplist_t *)H5I_object(H5AC_rawdata_dxpl_id)))
- FAIL_STACK_ERROR
-
/* We'll be writing lots of garbage data, so extend the
file a ways. 10MB should do. */
if(H5FD_set_eoa(rf->shared->lf, H5FD_MEM_DEFAULT, (haddr_t)(1024*1024*10)) < 0)
@@ -1892,7 +1892,7 @@ test_swmr_write_big(hbool_t newest_format)
FAIL_STACK_ERROR;
/* Reset metadata accumulator for the file */
- if(accum_reset(&fio_info) < 0)
+ if(accum_reset(rf) < 0)
FAIL_STACK_ERROR;
/* Allocate space for the write & read buffers */
@@ -1906,16 +1906,16 @@ test_swmr_write_big(hbool_t newest_format)
wbuf[u] = (uint8_t)u;
/* Write [1024, 1024] bytes with wbuf */
- if(H5F_block_write(rf, H5FD_MEM_DEFAULT, (haddr_t)1024, (size_t)1024, H5AC_ind_read_dxpl_id, wbuf) < 0)
+ if(H5F_block_write(rf, H5FD_MEM_DEFAULT, (haddr_t)1024, (size_t)1024, wbuf) < 0)
FAIL_STACK_ERROR;
/* Read the data */
- if(H5F_block_read(rf, H5FD_MEM_DEFAULT, (haddr_t)1024, (size_t)1024, H5AC_ind_read_dxpl_id, rbuf) < 0)
+ if(H5F_block_read(rf, H5FD_MEM_DEFAULT, (haddr_t)1024, (size_t)1024, rbuf) < 0)
FAIL_STACK_ERROR;
/* Verify the data read is correct */
if(HDmemcmp(wbuf, rbuf, (size_t)1024) != 0)
TEST_ERROR;
/* Flush the data to disk */
- if(accum_reset(&fio_info) < 0)
+ if(accum_reset(rf) < 0)
FAIL_STACK_ERROR;
/* Initialize wbuf with all 1s */
@@ -1927,10 +1927,10 @@ test_swmr_write_big(hbool_t newest_format)
wbuf2[u] = (uint8_t)(u + 1);
/* Write [1024,1024] with wbuf--all 1s */
- if(H5F_block_write(rf, H5FD_MEM_DEFAULT, (haddr_t)1024, (size_t)1024, H5AC_ind_read_dxpl_id, wbuf) < 0)
+ if(H5F_block_write(rf, H5FD_MEM_DEFAULT, (haddr_t)1024, (size_t)1024, wbuf) < 0)
FAIL_STACK_ERROR;
/* Read the data */
- if(H5F_block_read(rf, H5FD_MEM_DEFAULT, (haddr_t)1024, (size_t)1024, H5AC_ind_read_dxpl_id, rbuf) < 0)
+ if(H5F_block_read(rf, H5FD_MEM_DEFAULT, (haddr_t)1024, (size_t)1024, rbuf) < 0)
FAIL_STACK_ERROR;
/* Verify the data read is correct */
if(HDmemcmp(wbuf, rbuf, (size_t)1024) != 0)
@@ -1938,10 +1938,10 @@ test_swmr_write_big(hbool_t newest_format)
/* The data stays in the accumulator */
/* Write a large piece of metadata [2048, BIG_BUF_SIZE] with wbuf2 */
- if(H5F_block_write(rf, H5FD_MEM_DEFAULT, (haddr_t)2048, (size_t)BIG_BUF_SIZE, H5AC_ind_read_dxpl_id, wbuf2) < 0)
+ if(H5F_block_write(rf, H5FD_MEM_DEFAULT, (haddr_t)2048, (size_t)BIG_BUF_SIZE, wbuf2) < 0)
FAIL_STACK_ERROR;
/* Read the data */
- if(H5F_block_read(rf, H5FD_MEM_DEFAULT, (haddr_t)2048, (size_t)BIG_BUF_SIZE, H5AC_ind_read_dxpl_id, rbuf) < 0)
+ if(H5F_block_read(rf, H5FD_MEM_DEFAULT, (haddr_t)2048, (size_t)BIG_BUF_SIZE, rbuf) < 0)
FAIL_STACK_ERROR;
/* Verify the data read is correct */
if(HDmemcmp(wbuf2, rbuf, (size_t)BIG_BUF_SIZE) != 0)
@@ -1952,9 +1952,9 @@ test_swmr_write_big(hbool_t newest_format)
HDperror("fork");
FAIL_STACK_ERROR;
} else if(0 == pid) { /* Child process */
- /* Run the reader */
- status = HDexecv(SWMR_READER, new_argv);
- printf("errno from execv = %s\n", strerror(errno));
+ /* Run the reader */
+ status = HDexecv(SWMR_READER, new_argv);
+ printf("errno from execv = %s\n", strerror(errno));
FAIL_STACK_ERROR;
} /* end if */
@@ -1964,17 +1964,22 @@ test_swmr_write_big(hbool_t newest_format)
/* Check if child process terminates normally and its return value */
if(WIFEXITED(status) && !WEXITSTATUS(status)) {
- /* Flush the accumulator */
- if(accum_reset(&fio_info) < 0)
+ /* Flush the accumulator */
+ if(accum_reset(rf) < 0)
+ FAIL_STACK_ERROR;
+ /* Close the property list */
+ if(H5Pclose(fapl) < 0)
+ FAIL_STACK_ERROR;
+
+ /* Close and remove the file */
+ if(H5Fclose(fid) < 0)
FAIL_STACK_ERROR;
- /* Close the property list */
- if(H5Pclose(fapl) < 0)
- FAIL_STACK_ERROR;
- /* Close and remove the file */
- if(H5Fclose(fid) < 0)
- FAIL_STACK_ERROR;
- HDremove(SWMR_FILENAME);
+ /* Pop API context */
+ if(api_ctx_pushed && H5CX_pop() < 0) FAIL_STACK_ERROR
+ api_ctx_pushed = FALSE;
+
+ HDremove(SWMR_FILENAME);
/* Release memory */
if(wbuf2)
@@ -1989,7 +1994,11 @@ error:
/* Closing and remove the file */
H5Pclose(fapl);
H5Fclose(fid);
+
+ if(api_ctx_pushed) H5CX_pop();
+
HDremove(SWMR_FILENAME);
+
/* Release memory */
if(wbuf2)
HDfree(wbuf2);
@@ -2017,7 +2026,7 @@ error:
*-------------------------------------------------------------------------
*/
void
-accum_printf(void)
+accum_printf(const H5F_t *f)
{
H5F_meta_accum_t * accum = &f->shared->accum;
diff --git a/test/accum_swmr_reader.c b/test/accum_swmr_reader.c
index d98fe70..5bda46a 100644
--- a/test/accum_swmr_reader.c
+++ b/test/accum_swmr_reader.c
@@ -4,12 +4,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include "h5test.h"
@@ -19,6 +17,8 @@
#include "H5Fpkg.h"
#include "H5FDpkg.h"
+
+#include "H5CXprivate.h" /* API Contexts */
#include "H5Iprivate.h"
/* Filename: this is the same as the define in accum.c used by test_swmr_write_big() */
@@ -50,6 +50,7 @@ main(void)
uint8_t rbuf[1024]; /* Buffer for reading */
uint8_t buf[1024]; /* Buffer for holding the expected data */
char *driver = NULL; /* VFD string (from env variable) */
+ hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
/* Skip this test if SWMR I/O is not supported for the VFD specified
* by the environment variable.
@@ -72,12 +73,16 @@ main(void)
if((fid = H5Fopen(SWMR_FILENAME, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, fapl)) < 0)
FAIL_STACK_ERROR
+ /* Push API context */
+ if(H5CX_push() < 0) FAIL_STACK_ERROR
+ api_ctx_pushed = TRUE;
+
/* Get H5F_t * to internal file structure */
if(NULL == (f = (H5F_t *)H5I_object(fid)))
FAIL_STACK_ERROR
/* Should read in [1024, 2024] with buf data */
- if(H5F_block_read(f, H5FD_MEM_DEFAULT, (haddr_t)1024, (size_t)1024, H5AC_ind_read_dxpl_id, rbuf) < 0)
+ if(H5F_block_read(f, H5FD_MEM_DEFAULT, (haddr_t)1024, (size_t)1024, rbuf) < 0)
FAIL_STACK_ERROR;
/* Verify the data read is correct */
@@ -90,10 +95,17 @@ main(void)
if(H5Fclose(fid) < 0)
FAIL_STACK_ERROR;
+ /* Pop API context */
+ if(api_ctx_pushed && H5CX_pop() < 0) FAIL_STACK_ERROR
+ api_ctx_pushed = FALSE;
+
return EXIT_SUCCESS;
error:
H5Fclose(fid);
+
+ if(api_ctx_pushed) H5CX_pop();
+
return EXIT_FAILURE;
} /* end main() */
diff --git a/test/app_ref.c b/test/app_ref.c
index 4b72bcb..3ef3fef 100644
--- a/test/app_ref.c
+++ b/test/app_ref.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
diff --git a/test/atomic_reader.c b/test/atomic_reader.c
index 94d9c74..3e3a20a 100644
--- a/test/atomic_reader.c
+++ b/test/atomic_reader.c
@@ -4,12 +4,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*-------------------------------------------------------------------------
*
diff --git a/test/atomic_writer.c b/test/atomic_writer.c
index ec1e8c9..218d4da 100644
--- a/test/atomic_writer.c
+++ b/test/atomic_writer.c
@@ -4,12 +4,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*-------------------------------------------------------------------------
diff --git a/test/bad_offset.h5 b/test/bad_offset.h5
new file mode 100644
index 0000000..231dca2
--- /dev/null
+++ b/test/bad_offset.h5
Binary files differ
diff --git a/test/big.c b/test/big.c
index 0505e54..fe52aef 100644
--- a/test/big.c
+++ b/test/big.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
@@ -174,7 +172,7 @@ is_sparse(void)
int fd;
h5_stat_t sb;
- if ((fd=HDopen("x.h5", O_RDWR|O_TRUNC|O_CREAT, 0666)) < 0) return 0;
+ if ((fd = HDopen("x.h5", O_RDWR|O_TRUNC|O_CREAT, H5_POSIX_CREATE_MODE_RW)) < 0) return 0;
if (HDlseek(fd, (off_t)(1024*1024), SEEK_SET)!=1024*1024) return 0;
if (5!=HDwrite(fd, "hello", (size_t)5)) return 0;
if (HDclose(fd) < 0) return 0;
@@ -212,7 +210,7 @@ supports_big(void)
int fd = -1;
fsizes_t fsize = NO_FILE;
- if((fd=HDopen("y.h5", O_RDWR|O_TRUNC|O_CREAT, 0666)) < 0)
+ if((fd=HDopen("y.h5", O_RDWR|O_TRUNC|O_CREAT, H5_POSIX_CREATE_MODE_RW)) < 0)
goto error;
/* Write a few byte at the beginning */
@@ -295,7 +293,7 @@ enough_room(hid_t fapl)
/* Create files */
for (i=0; i<NELMTS(fd); i++) {
HDsnprintf(name, sizeof(name), filename, i);
- if ((fd[i]=HDopen(name, O_RDWR|O_CREAT|O_TRUNC, 0666)) < 0) {
+ if ((fd[i]=HDopen(name, O_RDWR|O_CREAT|O_TRUNC, H5_POSIX_CREATE_MODE_RW)) < 0) {
goto done;
}
if ((off_t)size != HDlseek(fd[i], (off_t)size, SEEK_SET)) {
diff --git a/test/bittests.c b/test/bittests.c
index cf83ead..ccd725c 100644
--- a/test/bittests.c
+++ b/test/bittests.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
diff --git a/test/btree2.c b/test/btree2.c
index ea16583..e2874b7 100644
--- a/test/btree2.c
+++ b/test/btree2.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
@@ -27,6 +25,7 @@
#include "H5B2pkg.h"
/* Other private headers that this test requires */
+#include "H5CXprivate.h" /* API Contexts */
#include "H5Iprivate.h"
const char *FILENAME[] = {
@@ -147,11 +146,11 @@ error:
*-------------------------------------------------------------------------
*/
static int
-create_btree(H5F_t *f, hid_t dxpl, const H5B2_create_t *cparam,
+create_btree(H5F_t *f, const H5B2_create_t *cparam,
H5B2_t **bt2, haddr_t *bt2_addr)
{
/* Create the v2 B-tree & get its address */
- if(NULL == (*bt2 = H5B2_create(f, dxpl, cparam, f)))
+ if(NULL == (*bt2 = H5B2_create(f, cparam, f)))
FAIL_STACK_ERROR
if(H5B2_get_addr(*bt2, bt2_addr/*out*/) < 0)
FAIL_STACK_ERROR
@@ -221,17 +220,17 @@ error:
*-------------------------------------------------------------------------
*/
static int
-reopen_btree(H5F_t *f, hid_t dxpl, H5B2_t **bt2, haddr_t bt2_addr,
+reopen_btree(H5F_t *f, H5B2_t **bt2, haddr_t bt2_addr,
const bt2_test_param_t *tparam)
{
/* Check for closing & re-opening the B-tree */
if(tparam->reopen_btree) {
/* Close (empty) v2 B-tree */
- if(H5B2_close(*bt2, dxpl) < 0)
+ if(H5B2_close(*bt2) < 0)
FAIL_STACK_ERROR
/* Re-open v2 B-tree */
- if(NULL == (*bt2 = H5B2_open(f, dxpl, bt2_addr, f)))
+ if(NULL == (*bt2 = H5B2_open(f, bt2_addr, f)))
FAIL_STACK_ERROR
} /* end if */
@@ -291,11 +290,11 @@ error:
*-------------------------------------------------------------------------
*/
static int
-check_node_depth(H5B2_t *bt2, hid_t dxpl, void *record, unsigned depth)
+check_node_depth(H5B2_t *bt2, void *record, unsigned depth)
{
int rec_depth; /* Depth of record in B-tree */
- if((rec_depth = H5B2_get_node_depth_test(bt2, dxpl, record)) < 0)
+ if((rec_depth = H5B2__get_node_depth_test(bt2, record)) < 0)
FAIL_STACK_ERROR
if((unsigned)rec_depth != depth)
TEST_ERROR
@@ -322,12 +321,12 @@ error:
*-------------------------------------------------------------------------
*/
static int
-check_node_info(H5B2_t *bt2, hid_t dxpl, hsize_t record,
+check_node_info(H5B2_t *bt2, hsize_t record,
H5B2_node_info_test_t *ninfo)
{
H5B2_node_info_test_t rec_ninfo; /* Node info for record in B-tree */
- if(H5B2_get_node_info_test(bt2, dxpl, &record, &rec_ninfo) < 0)
+ if(H5B2__get_node_info_test(bt2, &record, &rec_ninfo) < 0)
FAIL_STACK_ERROR
if(rec_ninfo.depth != ninfo->depth)
TEST_ERROR
@@ -657,7 +656,6 @@ test_insert_basic(hid_t fapl, const H5B2_create_t *cparam,
{
hid_t file = -1; /* File ID */
H5F_t *f = NULL; /* Internal file object pointer */
- hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
haddr_t bt2_addr; /* Address of B-tree created */
hsize_t record; /* Record to insert into tree */
@@ -674,7 +672,7 @@ test_insert_basic(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Create the v2 B-tree & get its address */
- if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ if(create_btree(f, cparam, &bt2, &bt2_addr) < 0)
TEST_ERROR
PASSED();
@@ -685,12 +683,12 @@ test_insert_basic(hid_t fapl, const H5B2_create_t *cparam,
TESTING("B-tree iteration: empty B-tree");
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Attempt to iterate over a B-tree with no records */
idx = 0;
- if(H5B2_iterate(bt2, dxpl, iter_cb, &idx) < 0)
+ if(H5B2_iterate(bt2, iter_cb, &idx) < 0)
FAIL_STACK_ERROR
/* Make certain that the index hasn't changed */
if(idx != 0)
@@ -698,13 +696,13 @@ test_insert_basic(hid_t fapl, const H5B2_create_t *cparam,
/* Attempt to find record in B-tree with no records */
idx = 0;
- if(H5B2_find(bt2, dxpl, &idx, find_cb, NULL) != FALSE)
+ if(H5B2_find(bt2, &idx, find_cb, NULL) != FALSE)
TEST_ERROR
/* Attempt to index record in B-tree with no records */
idx = 0;
H5E_BEGIN_TRY {
- ret = H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)0, find_cb, NULL);
+ ret = H5B2_index(bt2, H5_ITER_INC, (hsize_t)0, find_cb, NULL);
} H5E_END_TRY;
/* Should fail */
if(ret != FAIL)
@@ -718,37 +716,37 @@ test_insert_basic(hid_t fapl, const H5B2_create_t *cparam,
TESTING("B-tree insert: first record");
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
record = 42;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
/* Attempt to find non-existant record in B-tree with 1 record */
/* (Should not be found, but not fail) */
idx = 41;
- if(H5B2_find(bt2, dxpl, &idx, find_cb, &idx) != FALSE)
+ if(H5B2_find(bt2, &idx, find_cb, &idx) != FALSE)
TEST_ERROR
/* Try again with NULL 'op' */
/* (Should not be found, but not fail) */
- if(H5B2_find(bt2, dxpl, &idx, NULL, NULL) != FALSE)
+ if(H5B2_find(bt2, &idx, NULL, NULL) != FALSE)
TEST_ERROR
/* Attempt to find existant record in B-tree with 1 record */
idx = 42;
- if(H5B2_find(bt2, dxpl, &idx, find_cb, &idx) != TRUE)
+ if(H5B2_find(bt2, &idx, find_cb, &idx) != TRUE)
TEST_ERROR
/* Try again with NULL 'op' */
- if(H5B2_find(bt2, dxpl, &idx, NULL, NULL) != TRUE)
+ if(H5B2_find(bt2, &idx, NULL, NULL) != TRUE)
TEST_ERROR
/* Attempt to index non-existant record in B-tree with 1 record */
idx = 0;
H5E_BEGIN_TRY {
- ret = H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)1, find_cb, NULL);
+ ret = H5B2_index(bt2, H5_ITER_INC, (hsize_t)1, find_cb, NULL);
} H5E_END_TRY;
/* Should fail */
if(ret != FAIL)
@@ -756,7 +754,7 @@ test_insert_basic(hid_t fapl, const H5B2_create_t *cparam,
/* Attempt to index existing record in B-tree with 1 record */
idx = 42;
- if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)0, find_cb, &idx) < 0)
+ if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)0, find_cb, &idx) < 0)
TEST_ERROR
PASSED();
@@ -767,45 +765,45 @@ test_insert_basic(hid_t fapl, const H5B2_create_t *cparam,
TESTING("B-tree insert: several records");
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/*
* Test inserting second record into v2 B-tree, before all other records
*/
record = 34;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
/*
* Test inserting third record into v2 B-tree, after all other records
*/
record = 56;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
/*
* Test inserting fourth record into v2 B-tree, in the middle of other records
*/
record = 38;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
/* Attempt to find non-existant record in level-0 B-tree with several records */
/* (Should not be found, but not fail) */
idx = 41;
- if(H5B2_find(bt2, dxpl, &idx, find_cb, &idx) != FALSE)
+ if(H5B2_find(bt2, &idx, find_cb, &idx) != FALSE)
TEST_ERROR
/* Attempt to find existant record in level-0 B-tree with several record */
idx = 56;
- if(H5B2_find(bt2, dxpl, &idx, find_cb, &idx) != TRUE)
+ if(H5B2_find(bt2, &idx, find_cb, &idx) != TRUE)
TEST_ERROR
/* Attempt to index non-existant record in B-tree with several records */
idx = 0;
H5E_BEGIN_TRY {
- ret = H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)4, find_cb, NULL);
+ ret = H5B2_index(bt2, H5_ITER_INC, (hsize_t)4, find_cb, NULL);
} H5E_END_TRY;
/* Should fail */
if(ret != FAIL)
@@ -813,20 +811,20 @@ test_insert_basic(hid_t fapl, const H5B2_create_t *cparam,
/* Attempt to index existing record in B-tree with several records */
idx = 34;
- if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)0, find_cb, &idx) < 0)
+ if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)0, find_cb, &idx) < 0)
TEST_ERROR
idx = 38;
- if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)1, find_cb, &idx) < 0)
+ if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)1, find_cb, &idx) < 0)
TEST_ERROR
idx = 42;
- if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)2, find_cb, &idx) < 0)
+ if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)2, find_cb, &idx) < 0)
TEST_ERROR
idx = 56;
- if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)3, find_cb, &idx) < 0)
+ if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)3, find_cb, &idx) < 0)
TEST_ERROR
/* Close the v2 B-tree */
- if(H5B2_close(bt2, dxpl) < 0)
+ if(H5B2_close(bt2) < 0)
FAIL_STACK_ERROR
bt2 = NULL;
@@ -842,7 +840,7 @@ test_insert_basic(hid_t fapl, const H5B2_create_t *cparam,
error:
H5E_BEGIN_TRY {
if(bt2)
- H5B2_close(bt2, dxpl);
+ H5B2_close(bt2);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -871,7 +869,6 @@ test_insert_split_root(hid_t fapl, const H5B2_create_t *cparam,
{
hid_t file = -1; /* File ID */
H5F_t *f = NULL; /* Internal file object pointer */
- hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
haddr_t bt2_addr; /* Address of B-tree created */
hsize_t record; /* Record to insert into tree */
@@ -890,13 +887,13 @@ test_insert_split_root(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Create the v2 B-tree & get its address */
- if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ if(create_btree(f, cparam, &bt2, &bt2_addr) < 0)
TEST_ERROR
/* Insert records to fill root leaf node */
for(u = 0; u < (INSERT_SPLIT_ROOT_NREC - 1); u++) {
record = u + 2;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
} /* end for */
@@ -906,16 +903,16 @@ test_insert_split_root(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = (hsize_t)33;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)0) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Insert record to split root leaf node */
record = INSERT_SPLIT_ROOT_NREC + 1;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
/* Check up on B-tree */
@@ -924,20 +921,20 @@ test_insert_split_root(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = (hsize_t)33;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Insert a couple more records, on the left side of the B-tree */
record = 0;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
record = 1;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
/* Check up on B-tree */
@@ -946,17 +943,17 @@ test_insert_split_root(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = (hsize_t)33;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Iterate over B-tree to check records have been inserted correctly */
idx = 0;
- if(H5B2_iterate(bt2, dxpl, iter_cb, &idx) < 0)
+ if(H5B2_iterate(bt2, iter_cb, &idx) < 0)
FAIL_STACK_ERROR
/* Make certain that the index is correct */
@@ -966,23 +963,23 @@ test_insert_split_root(hid_t fapl, const H5B2_create_t *cparam,
/* Attempt to find non-existant record in level-1 B-tree */
/* (Should not be found, but not fail) */
idx = INSERT_SPLIT_ROOT_NREC + 10;
- if(H5B2_find(bt2, dxpl, &idx, find_cb, &idx) != FALSE)
+ if(H5B2_find(bt2, &idx, find_cb, &idx) != FALSE)
TEST_ERROR
/* Attempt to find existant record in root of level-1 B-tree */
idx = 33;
- if(H5B2_find(bt2, dxpl, &idx, find_cb, &idx) != TRUE)
+ if(H5B2_find(bt2, &idx, find_cb, &idx) != TRUE)
FAIL_STACK_ERROR
/* Attempt to find existant record in leaf of level-1 B-tree */
idx = 56;
- if(H5B2_find(bt2, dxpl, &idx, find_cb, &idx) != TRUE)
+ if(H5B2_find(bt2, &idx, find_cb, &idx) != TRUE)
FAIL_STACK_ERROR
/* Attempt to index non-existant record in level-1 B-tree */
idx = 0;
H5E_BEGIN_TRY {
- ret = H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)(INSERT_SPLIT_ROOT_NREC+2), find_cb, NULL);
+ ret = H5B2_index(bt2, H5_ITER_INC, (hsize_t)(INSERT_SPLIT_ROOT_NREC+2), find_cb, NULL);
} H5E_END_TRY;
/* Should fail */
if(ret != FAIL)
@@ -990,21 +987,21 @@ test_insert_split_root(hid_t fapl, const H5B2_create_t *cparam,
/* Attempt to index existing record in root of level-1 B-tree */
idx = 33;
- if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)33, find_cb, &idx) < 0)
+ if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)33, find_cb, &idx) < 0)
FAIL_STACK_ERROR
/* Attempt to index existing record in left leaf of level-1 B-tree */
idx = 0;
- if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)0, find_cb, &idx) < 0)
+ if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)0, find_cb, &idx) < 0)
FAIL_STACK_ERROR
/* Attempt to index existing record in right leaf of level-1 B-tree */
idx = 50;
- if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)50, find_cb, &idx) < 0)
+ if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)50, find_cb, &idx) < 0)
FAIL_STACK_ERROR
/* Close the v2 B-tree */
- if(H5B2_close(bt2, dxpl) < 0)
+ if(H5B2_close(bt2) < 0)
FAIL_STACK_ERROR
bt2 = NULL;
@@ -1018,7 +1015,7 @@ test_insert_split_root(hid_t fapl, const H5B2_create_t *cparam,
error:
H5E_BEGIN_TRY {
if(bt2)
- H5B2_close(bt2, dxpl);
+ H5B2_close(bt2);
H5Fclose(file);
} H5E_END_TRY;
return 1;
@@ -1048,7 +1045,6 @@ test_insert_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
{
hid_t file = -1; /* File ID */
H5F_t *f = NULL; /* Internal file object pointer */
- hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
haddr_t bt2_addr; /* Address of B-tree created */
hsize_t record; /* Record to insert into tree */
@@ -1065,13 +1061,13 @@ test_insert_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Create the v2 B-tree & get its address */
- if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ if(create_btree(f, cparam, &bt2, &bt2_addr) < 0)
TEST_ERROR
/* Insert enough records to force root to split into 2 leaves */
for(u = 0; u < INSERT_SPLIT_ROOT_NREC; u++) {
record = u + (INSERT_SPLIT_ROOT_NREC/2) + 1;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
} /* end for */
@@ -1081,18 +1077,18 @@ test_insert_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = (hsize_t)INSERT_SPLIT_ROOT_NREC;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Force redistribution from left node into right node */
for(u = 0; u < (INSERT_SPLIT_ROOT_NREC / 2) + 1; u++) {
record = u;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
} /* end for */
@@ -1102,11 +1098,11 @@ test_insert_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = (hsize_t)((INSERT_SPLIT_ROOT_NREC / 2) + (INSERT_SPLIT_ROOT_NREC / 4) + 1);
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
/* Close the v2 B-tree */
- if(H5B2_close(bt2, dxpl) < 0)
+ if(H5B2_close(bt2) < 0)
FAIL_STACK_ERROR
bt2 = NULL;
@@ -1118,13 +1114,13 @@ test_insert_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
TESTING("B-tree insert: redistribute 2 leaves in level 1 B-tree (r->l)");
/* Create the v2 B-tree & get its address */
- if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ if(create_btree(f, cparam, &bt2, &bt2_addr) < 0)
TEST_ERROR
/* Insert enough records to force root to split into 2 leaves */
for(u = 0; u < INSERT_SPLIT_ROOT_NREC; u++) {
record = u;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
} /* end for */
@@ -1134,17 +1130,17 @@ test_insert_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = (hsize_t)(INSERT_SPLIT_ROOT_NREC / 2);
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Force redistribution from left node into right node */
for(u = 0; u < (INSERT_SPLIT_ROOT_NREC / 2) + 1; u++) {
record = u + INSERT_SPLIT_ROOT_NREC;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
} /* end for */
@@ -1154,11 +1150,11 @@ test_insert_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = (hsize_t)((INSERT_SPLIT_ROOT_NREC / 2) + (INSERT_SPLIT_ROOT_NREC / 4) + 1);
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
/* Close the v2 B-tree */
- if(H5B2_close(bt2, dxpl) < 0)
+ if(H5B2_close(bt2) < 0)
FAIL_STACK_ERROR
bt2 = NULL;
@@ -1173,7 +1169,7 @@ test_insert_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
error:
H5E_BEGIN_TRY {
if(bt2)
- H5B2_close(bt2, dxpl);
+ H5B2_close(bt2);
H5Fclose(file);
} H5E_END_TRY;
return 1;
@@ -1203,7 +1199,6 @@ test_insert_level1_side_split(hid_t fapl, const H5B2_create_t *cparam,
{
hid_t file = -1; /* File ID */
H5F_t *f = NULL; /* Internal file object pointer */
- hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
haddr_t bt2_addr; /* Address of B-tree created */
hsize_t record; /* Record to insert into tree */
@@ -1220,13 +1215,13 @@ test_insert_level1_side_split(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Create the v2 B-tree & get its address */
- if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ if(create_btree(f, cparam, &bt2, &bt2_addr) < 0)
TEST_ERROR
/* Insert enough records to force root to split into 2 leaves */
for(u = 0; u < INSERT_SPLIT_ROOT_NREC; u++) {
record = u + INSERT_SPLIT_ROOT_NREC;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
} /* end for */
@@ -1236,17 +1231,17 @@ test_insert_level1_side_split(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = INSERT_SPLIT_ROOT_NREC + (INSERT_SPLIT_ROOT_NREC / 2);
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Force left node to split */
for(u = 0; u < INSERT_SPLIT_ROOT_NREC; u++) {
record = u;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
} /* end for */
@@ -1256,14 +1251,14 @@ test_insert_level1_side_split(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = 31;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
record = 63;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
/* Close the v2 B-tree */
- if(H5B2_close(bt2, dxpl) < 0)
+ if(H5B2_close(bt2) < 0)
FAIL_STACK_ERROR
bt2 = NULL;
@@ -1275,13 +1270,13 @@ test_insert_level1_side_split(hid_t fapl, const H5B2_create_t *cparam,
TESTING("B-tree insert: split side leaf into 2 leaves in level 1 B-tree (r->l)");
/* Create the v2 B-tree & get its address */
- if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ if(create_btree(f, cparam, &bt2, &bt2_addr) < 0)
TEST_ERROR
/* Insert enough records to force root to split into 2 leaves */
for(u = 0; u < INSERT_SPLIT_ROOT_NREC; u++) {
record = u;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
} /* end for */
@@ -1291,17 +1286,17 @@ test_insert_level1_side_split(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = (INSERT_SPLIT_ROOT_NREC / 2);
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Force right node to split */
for(u = 0; u < INSERT_SPLIT_ROOT_NREC; u++) {
record = u + INSERT_SPLIT_ROOT_NREC;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
} /* end for */
@@ -1311,14 +1306,14 @@ test_insert_level1_side_split(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = 62;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
record = 94;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
/* Close the v2 B-tree */
- if(H5B2_close(bt2, dxpl) < 0)
+ if(H5B2_close(bt2) < 0)
FAIL_STACK_ERROR
bt2 = NULL;
@@ -1333,7 +1328,7 @@ test_insert_level1_side_split(hid_t fapl, const H5B2_create_t *cparam,
error:
H5E_BEGIN_TRY {
if(bt2)
- H5B2_close(bt2, dxpl);
+ H5B2_close(bt2);
H5Fclose(file);
} H5E_END_TRY;
return 1;
@@ -1365,7 +1360,6 @@ test_insert_level1_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
{
hid_t file = -1; /* File ID */
H5F_t *f = NULL; /* Internal file object pointer */
- hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
haddr_t bt2_addr; /* Address of B-tree created */
hsize_t record; /* Record to insert into tree */
@@ -1383,13 +1377,13 @@ test_insert_level1_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Create the v2 B-tree & get its address */
- if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ if(create_btree(f, cparam, &bt2, &bt2_addr) < 0)
TEST_ERROR
/* Insert enough records to force root to split into 2 leaves */
for(u = 0; u < INSERT_SPLIT_ROOT_NREC; u++) {
record = u + (INSERT_SPLIT_ROOT_NREC + (INSERT_SPLIT_ROOT_NREC / 2) + 1);
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
} /* end for */
@@ -1399,17 +1393,17 @@ test_insert_level1_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = (2 * INSERT_SPLIT_ROOT_NREC);
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Force left node to split */
for(u = 0; u < INSERT_SPLIT_ROOT_NREC; u++) {
record = u;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
} /* end for */
@@ -1419,20 +1413,20 @@ test_insert_level1_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = (INSERT_SPLIT_ROOT_NREC / 2);
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
record = (INSERT_SPLIT_ROOT_NREC + (INSERT_SPLIT_ROOT_NREC / 2) + 1);
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Insert records to force middle node to redistribute */
for(u = 0; u < ((INSERT_SPLIT_ROOT_NREC / 2) + 1); u++) {
record = u + INSERT_SPLIT_ROOT_NREC;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
} /* end for */
@@ -1442,19 +1436,19 @@ test_insert_level1_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = 52;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
record = 105;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Iterate over B-tree to check records have been inserted correctly */
idx = 0;
- if(H5B2_iterate(bt2, dxpl, iter_cb, &idx) < 0)
+ if(H5B2_iterate(bt2, iter_cb, &idx) < 0)
FAIL_STACK_ERROR
/* Make certain that the index is correct */
@@ -1462,7 +1456,7 @@ test_insert_level1_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Close the v2 B-tree */
- if(H5B2_close(bt2, dxpl) < 0)
+ if(H5B2_close(bt2) < 0)
FAIL_STACK_ERROR
bt2 = NULL;
@@ -1477,7 +1471,7 @@ test_insert_level1_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
error:
H5E_BEGIN_TRY {
if(bt2)
- H5B2_close(bt2, dxpl);
+ H5B2_close(bt2);
H5Fclose(file);
} H5E_END_TRY;
return 1;
@@ -1508,7 +1502,6 @@ test_insert_level1_middle_split(hid_t fapl, const H5B2_create_t *cparam,
{
hid_t file = -1; /* File ID */
H5F_t *f = NULL; /* Internal file object pointer */
- hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
haddr_t bt2_addr; /* Address of B-tree created */
hsize_t record; /* Record to insert into tree */
@@ -1526,13 +1519,13 @@ test_insert_level1_middle_split(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Create the v2 B-tree & get its address */
- if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ if(create_btree(f, cparam, &bt2, &bt2_addr) < 0)
TEST_ERROR
/* Insert enough records to force root to split into 2 leaves */
for(u = 0; u < INSERT_SPLIT_ROOT_NREC; u++) {
record = u + (INSERT_SPLIT_ROOT_NREC * 2);
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
} /* end for */
@@ -1542,17 +1535,17 @@ test_insert_level1_middle_split(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = (2 * INSERT_SPLIT_ROOT_NREC) + (INSERT_SPLIT_ROOT_NREC / 2);
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Force split from left node into right node */
for(u = 0; u < (INSERT_SPLIT_ROOT_NREC * 2); u++) {
record = u;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
} /* end for */
@@ -1562,22 +1555,22 @@ test_insert_level1_middle_split(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = 62;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
record = 94;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
record = 126;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Iterate over B-tree to check records have been inserted correctly */
idx = 0;
- if(H5B2_iterate(bt2, dxpl, iter_cb, &idx) < 0)
+ if(H5B2_iterate(bt2, iter_cb, &idx) < 0)
FAIL_STACK_ERROR
/* Make certain that the index is correct */
@@ -1585,7 +1578,7 @@ test_insert_level1_middle_split(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Close the v2 B-tree */
- if(H5B2_close(bt2, dxpl) < 0)
+ if(H5B2_close(bt2) < 0)
FAIL_STACK_ERROR
bt2 = NULL;
@@ -1600,7 +1593,7 @@ test_insert_level1_middle_split(hid_t fapl, const H5B2_create_t *cparam,
error:
H5E_BEGIN_TRY {
if(bt2)
- H5B2_close(bt2, dxpl);
+ H5B2_close(bt2);
H5Fclose(file);
} H5E_END_TRY;
return 1;
@@ -1627,7 +1620,6 @@ test_insert_make_level2(hid_t fapl, const H5B2_create_t *cparam,
{
hid_t file = -1; /* File ID */
H5F_t *f = NULL; /* Internal file object pointer */
- hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
haddr_t bt2_addr; /* Address of B-tree created */
hsize_t record; /* Record to insert into tree */
@@ -1646,18 +1638,18 @@ test_insert_make_level2(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Create the v2 B-tree & get its address */
- if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ if(create_btree(f, cparam, &bt2, &bt2_addr) < 0)
TEST_ERROR
/* Insert enough records to force root to split into 2 internal nodes */
for(u = 0; u < (INSERT_SPLIT_ROOT_NREC * 9); u++) {
record = u + 2;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
} /* end for */
for(; u < ((INSERT_SPLIT_ROOT_NREC * 29) + 1); u++) {
record = u + 4;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
} /* end for */
@@ -1667,37 +1659,37 @@ test_insert_make_level2(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = 948;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)2) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Add some extra records to left-most leaf */
record = 0;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
record = 1;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
/* Add some extra records to middle leaf */
record = (INSERT_SPLIT_ROOT_NREC * 9) + 2;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
record = (INSERT_SPLIT_ROOT_NREC * 9) + 3;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Iterate over B-tree to check records have been inserted correctly */
idx = 0;
- if(H5B2_iterate(bt2, dxpl, iter_cb, &idx) < 0)
+ if(H5B2_iterate(bt2, iter_cb, &idx) < 0)
FAIL_STACK_ERROR
/* Make certain that the index is correct */
@@ -1707,43 +1699,43 @@ test_insert_make_level2(hid_t fapl, const H5B2_create_t *cparam,
/* Attempt to find non-existant record in level-2 B-tree */
/* (Should not be found, but not fail) */
idx = INSERT_SPLIT_ROOT_NREC * 30;
- if(H5B2_find(bt2, dxpl, &idx, find_cb, &idx) != FALSE)
+ if(H5B2_find(bt2, &idx, find_cb, &idx) != FALSE)
TEST_ERROR
/* Attempt to find existant record in root of level-2 B-tree */
idx = 948;
- if(H5B2_find(bt2, dxpl, &idx, find_cb, &idx) != TRUE)
+ if(H5B2_find(bt2, &idx, find_cb, &idx) != TRUE)
FAIL_STACK_ERROR
/* Check with B-tree */
record = 948;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)2) < 0)
TEST_ERROR
/* Attempt to find existant record in internal node of level-2 B-tree */
idx = 505;
- if(H5B2_find(bt2, dxpl, &idx, find_cb, &idx) != TRUE)
+ if(H5B2_find(bt2, &idx, find_cb, &idx) != TRUE)
FAIL_STACK_ERROR
/* Check with B-tree */
record = 505;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
/* Attempt to find existant record in leaf of level-2 B-tree */
idx = 555;
- if(H5B2_find(bt2, dxpl, &idx, find_cb, &idx) != TRUE)
+ if(H5B2_find(bt2, &idx, find_cb, &idx) != TRUE)
FAIL_STACK_ERROR
/* Check with B-tree */
record = 555;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)0) < 0)
TEST_ERROR
/* Attempt to index non-existant record in level-2 B-tree */
idx = 0;
H5E_BEGIN_TRY {
- ret = H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)(INSERT_SPLIT_ROOT_NREC * 30), find_cb, NULL);
+ ret = H5B2_index(bt2, H5_ITER_INC, (hsize_t)(INSERT_SPLIT_ROOT_NREC * 30), find_cb, NULL);
} H5E_END_TRY;
/* Should fail */
if(ret != FAIL)
@@ -1751,21 +1743,21 @@ test_insert_make_level2(hid_t fapl, const H5B2_create_t *cparam,
/* Attempt to index existing record in root of level-2 B-tree */
idx = 948;
- if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)948, find_cb, &idx) < 0)
+ if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)948, find_cb, &idx) < 0)
FAIL_STACK_ERROR
/* Attempt to index existing record in internal node of level-2 B-tree */
idx = 505;
- if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)505, find_cb, &idx) < 0)
+ if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)505, find_cb, &idx) < 0)
FAIL_STACK_ERROR
/* Attempt to index existing record in leaf of level-2 B-tree */
idx = 555;
- if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)555, find_cb, &idx) < 0)
+ if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)555, find_cb, &idx) < 0)
FAIL_STACK_ERROR
/* Close the v2 B-tree */
- if(H5B2_close(bt2, dxpl) < 0)
+ if(H5B2_close(bt2) < 0)
FAIL_STACK_ERROR
bt2 = NULL;
@@ -1780,7 +1772,7 @@ test_insert_make_level2(hid_t fapl, const H5B2_create_t *cparam,
error:
H5E_BEGIN_TRY {
if(bt2)
- H5B2_close(bt2, dxpl);
+ H5B2_close(bt2);
H5Fclose(file);
} H5E_END_TRY;
return 1;
@@ -1809,7 +1801,6 @@ test_insert_level2_leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
{
hid_t file = -1; /* File ID */
H5F_t *f = NULL; /* Internal file object pointer */
- hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
haddr_t bt2_addr; /* Address of B-tree created */
hsize_t record; /* Record to insert into tree */
@@ -1827,19 +1818,19 @@ test_insert_level2_leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Create the v2 B-tree & get its address */
- if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ if(create_btree(f, cparam, &bt2, &bt2_addr) < 0)
TEST_ERROR
/* Insert enough records to force root to split into 2 internal nodes */
/* And fill rightmost leaf */
for(u = 0; u < (INSERT_SPLIT_ROOT_NREC * 8); u++) {
record = u + (INSERT_SPLIT_ROOT_NREC / 2) + 1;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
} /* end for */
for(; u < ((INSERT_SPLIT_ROOT_NREC * 29) + (INSERT_SPLIT_ROOT_NREC / 2)); u++) {
record = u + INSERT_SPLIT_ROOT_NREC + 1;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
} /* end for */
@@ -1849,22 +1840,22 @@ test_insert_level2_leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = 1008;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)2) < 0)
TEST_ERROR
record = 1859;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
record = 1921;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)0) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Insert record to force redistribution of rightmost leaf */
record = u + INSERT_SPLIT_ROOT_NREC + 1;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
/* Check up on B-tree */
@@ -1873,13 +1864,13 @@ test_insert_level2_leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = 1008;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)2) < 0)
TEST_ERROR
record = 1875;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
record = 1922;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)0) < 0)
TEST_ERROR
PASSED();
@@ -1887,7 +1878,7 @@ test_insert_level2_leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
TESTING("B-tree insert: redistrib left-most leaf in level 2 B-tree");
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Check up on B-tree */
@@ -1896,13 +1887,13 @@ test_insert_level2_leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = 1008;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)2) < 0)
TEST_ERROR
record = 94;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
record = 32;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)0) < 0)
TEST_ERROR
/* Add more records to left-most leaf, to force a 2->1 split and then a
@@ -1910,7 +1901,7 @@ test_insert_level2_leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
*/
for(u = 0; u < (INSERT_SPLIT_ROOT_NREC / 2) + 1; u++) {
record = u;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
} /* end for */
@@ -1920,13 +1911,13 @@ test_insert_level2_leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = 1008;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)2) < 0)
TEST_ERROR
record = 47;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
record = 0;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)0) < 0)
TEST_ERROR
PASSED();
@@ -1934,7 +1925,7 @@ test_insert_level2_leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
TESTING("B-tree insert: redistrib middle leaf in level 2 B-tree");
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Check up on B-tree */
@@ -1943,22 +1934,22 @@ test_insert_level2_leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = 1008;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) /* Record in root node */
+ if(check_node_depth(bt2, &record, (unsigned)2) < 0) /* Record in root node */
TEST_ERROR
record = 535;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) /* Record in middle node before insertion point */
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0) /* Record in middle node before insertion point */
TEST_ERROR
record = 630;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) /* Record in middle node after insertion point */
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0) /* Record in middle node after insertion point */
TEST_ERROR
record = 568;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) /* Record in leaf node just after insertion point */
+ if(check_node_depth(bt2, &record, (unsigned)0) < 0) /* Record in leaf node just after insertion point */
TEST_ERROR
/* Add more records to middle leaf, to force a split and a 3 node redistribution on middle leaf */
for(u = 0; u < (INSERT_SPLIT_ROOT_NREC / 2) + 1; u++) {
record = u + (INSERT_SPLIT_ROOT_NREC * 8) + (INSERT_SPLIT_ROOT_NREC / 2) + 1;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
} /* end for */
@@ -1968,25 +1959,25 @@ test_insert_level2_leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = 1008;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0) /* Record in root node */
+ if(check_node_depth(bt2, &record, (unsigned)2) < 0) /* Record in root node */
TEST_ERROR
record = 524;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) /* Record in middle node before insertion point */
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0) /* Record in middle node before insertion point */
TEST_ERROR
record = 577;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0) /* Record in middle node after insertion point */
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0) /* Record in middle node after insertion point */
TEST_ERROR
record = 568;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0) /* Record in leaf node just after insertion point */
+ if(check_node_depth(bt2, &record, (unsigned)0) < 0) /* Record in leaf node just after insertion point */
TEST_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Iterate over B-tree to check records have been inserted correctly */
idx = 0;
- if(H5B2_iterate(bt2, dxpl, iter_cb, &idx) < 0)
+ if(H5B2_iterate(bt2, iter_cb, &idx) < 0)
FAIL_STACK_ERROR
/* Make certain that the index is correct */
@@ -1994,7 +1985,7 @@ test_insert_level2_leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Close the v2 B-tree */
- if(H5B2_close(bt2, dxpl) < 0)
+ if(H5B2_close(bt2) < 0)
FAIL_STACK_ERROR
bt2 = NULL;
@@ -2009,7 +2000,7 @@ test_insert_level2_leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
error:
H5E_BEGIN_TRY {
if(bt2)
- H5B2_close(bt2, dxpl);
+ H5B2_close(bt2);
H5Fclose(file);
} H5E_END_TRY;
return 1;
@@ -2038,7 +2029,6 @@ test_insert_level2_leaf_split(hid_t fapl, const H5B2_create_t *cparam,
{
hid_t file = -1; /* File ID */
H5F_t *f = NULL; /* Internal file object pointer */
- hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
haddr_t bt2_addr; /* Address of B-tree created */
hsize_t record; /* Record to insert into tree */
@@ -2056,18 +2046,18 @@ test_insert_level2_leaf_split(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Create the v2 B-tree & get its address */
- if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ if(create_btree(f, cparam, &bt2, &bt2_addr) < 0)
TEST_ERROR
/* Insert enough records to force root to split into 2 internal nodes */
for(u = 0; u < (INSERT_SPLIT_ROOT_NREC * 8); u++) {
record = u + 1;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
} /* end for */
for(; u < ((INSERT_SPLIT_ROOT_NREC * 29) + (INSERT_SPLIT_ROOT_NREC / 2)); u++) {
record = u + 2;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
} /* end for */
@@ -2077,23 +2067,23 @@ test_insert_level2_leaf_split(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = 946; /* Record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)2) < 0)
TEST_ERROR
record = 1797; /* Right-most record in right internal node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
record = 1859; /* Right-most record in right-most leaf */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)0) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Insert enough records to force right-most leaf to split */
for(u = 0; u < ((INSERT_SPLIT_ROOT_NREC / 2) + 1); u++) {
record = u + (INSERT_SPLIT_ROOT_NREC * 29) + (INSERT_SPLIT_ROOT_NREC / 2) + 2;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
} /* end for */
@@ -2103,16 +2093,16 @@ test_insert_level2_leaf_split(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = 946; /* Record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)2) < 0)
TEST_ERROR
record = 1828; /* Next-to-right-most record in right-most internal node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
record = 1860; /* Right-most record in right-most internal node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
record = 1891; /* Right-most record in right-most leaf */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)0) < 0)
TEST_ERROR
PASSED();
@@ -2120,7 +2110,7 @@ test_insert_level2_leaf_split(hid_t fapl, const H5B2_create_t *cparam,
TESTING("B-tree insert: split left-most leaf in level 2 B-tree");
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Check up on B-tree */
@@ -2129,18 +2119,18 @@ test_insert_level2_leaf_split(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = 946; /* Record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)2) < 0)
TEST_ERROR
record = 63; /* Left-most record in left-most internal node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
record = 1; /* Left-most record in left-most leaf */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)0) < 0)
TEST_ERROR
/* Add another record to left-most leaf, to force a 1->2 node split on left leaf */
record = 0;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
/* Check up on B-tree */
@@ -2149,16 +2139,16 @@ test_insert_level2_leaf_split(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = 946; /* Record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)2) < 0)
TEST_ERROR
record = 63; /* Left-most record in left-most internal node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
record = 32; /* Left-most record in left internal node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
record = 0; /* Left-most record in left-most leaf */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)0) < 0)
TEST_ERROR
PASSED();
@@ -2166,7 +2156,7 @@ test_insert_level2_leaf_split(hid_t fapl, const H5B2_create_t *cparam,
TESTING("B-tree insert: split middle leaf in level 2 B-tree");
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Check up on B-tree */
@@ -2175,21 +2165,21 @@ test_insert_level2_leaf_split(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = 946; /* Record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)2) < 0)
TEST_ERROR
record = 504; /* Record in internal node just before insertion point */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
record = 568; /* Record in internal node just after insertion point */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
record = 506; /* Record in leaf node just after insertion point */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)0) < 0)
TEST_ERROR
/* Add another record to middle leaf, to force a node split on middle leaf */
record = (INSERT_SPLIT_ROOT_NREC * 8) + 1;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
/* Check up on B-tree */
@@ -2198,28 +2188,28 @@ test_insert_level2_leaf_split(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = 946; /* Record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)2) < 0)
TEST_ERROR
record = 504; /* Left-most record of split in left internal node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
record = 537; /* Middle record of split in left internal node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
record = 568; /* Right-most record of split in left internal node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
record = 506; /* Record in leaf node just after insertion point */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)0) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Iterate over B-tree to check records have been inserted correctly */
idx = 0;
- if(H5B2_iterate(bt2, dxpl, iter_cb, &idx) < 0)
+ if(H5B2_iterate(bt2, iter_cb, &idx) < 0)
FAIL_STACK_ERROR
/* Make certain that the index is correct */
@@ -2227,7 +2217,7 @@ test_insert_level2_leaf_split(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Close the v2 B-tree */
- if(H5B2_close(bt2, dxpl) < 0)
+ if(H5B2_close(bt2) < 0)
FAIL_STACK_ERROR
bt2 = NULL;
@@ -2242,7 +2232,7 @@ test_insert_level2_leaf_split(hid_t fapl, const H5B2_create_t *cparam,
error:
H5E_BEGIN_TRY {
if(bt2)
- H5B2_close(bt2, dxpl);
+ H5B2_close(bt2);
H5Fclose(file);
} H5E_END_TRY;
return 1;
@@ -2272,7 +2262,6 @@ test_insert_level2_2internal_redistrib(hid_t fapl, const H5B2_create_t *cparam,
{
hid_t file = -1; /* File ID */
H5F_t *f = NULL; /* Internal file object pointer */
- hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
haddr_t bt2_addr; /* Address of B-tree created */
hsize_t record; /* Record to insert into tree */
@@ -2290,14 +2279,14 @@ test_insert_level2_2internal_redistrib(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Create the v2 B-tree & get its address */
- if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ if(create_btree(f, cparam, &bt2, &bt2_addr) < 0)
TEST_ERROR
/* Insert enough records to force root to split into 2 internal nodes */
/* And fill up right internal node, to just before to redistribute it */
for(u = 0; u < (INSERT_SPLIT_ROOT_NREC * 44); u++) {
record = u + (INSERT_SPLIT_ROOT_NREC * 6) - 4;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
} /* end for */
@@ -2307,22 +2296,22 @@ test_insert_level2_2internal_redistrib(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = 1318; /* Record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)2) < 0)
TEST_ERROR
record = 3114; /* Right-most record in right internal node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
record = 3145; /* Right-most record in right leaf node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)0) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Insert record to redistribute right-most internal node */
record = u + (INSERT_SPLIT_ROOT_NREC * 6) - 4;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
/* Check up on B-tree */
@@ -2331,13 +2320,13 @@ test_insert_level2_2internal_redistrib(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = 1822; /* Record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)2) < 0)
TEST_ERROR
record = 3114; /* Right-most record in right internal node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
record = 3146; /* Right-most record in right leaf node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)0) < 0)
TEST_ERROR
PASSED();
@@ -2345,7 +2334,7 @@ test_insert_level2_2internal_redistrib(hid_t fapl, const H5B2_create_t *cparam,
TESTING("B-tree insert: redist. 2 internal (l->r) in level 2 B-tree");
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Check up on B-tree */
@@ -2354,19 +2343,19 @@ test_insert_level2_2internal_redistrib(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = 1822; /* Record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)2) < 0)
TEST_ERROR
record = 436; /* Left-most record in left internal node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
record = 374; /* Left-most record in left leaf node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)0) < 0)
TEST_ERROR
/* Force left-most internal node to redistribute */
for(u = 0; u < ((INSERT_SPLIT_ROOT_NREC * 6) - 4); u++) {
record = u;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
} /* end for */
@@ -2376,22 +2365,22 @@ test_insert_level2_2internal_redistrib(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = 1570; /* Record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)2) < 0)
TEST_ERROR
record = 61; /* Left-most record in left internal node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
record = 0; /* Left-most record in left leaf node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)0) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Iterate over B-tree to check records have been inserted correctly */
idx = 0;
- if(H5B2_iterate(bt2, dxpl, iter_cb, &idx) < 0)
+ if(H5B2_iterate(bt2, iter_cb, &idx) < 0)
FAIL_STACK_ERROR
/* Make certain that the index is correct */
@@ -2399,7 +2388,7 @@ test_insert_level2_2internal_redistrib(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Close the v2 B-tree */
- if(H5B2_close(bt2, dxpl) < 0)
+ if(H5B2_close(bt2) < 0)
FAIL_STACK_ERROR
bt2 = NULL;
@@ -2414,7 +2403,7 @@ test_insert_level2_2internal_redistrib(hid_t fapl, const H5B2_create_t *cparam,
error:
H5E_BEGIN_TRY {
if(bt2)
- H5B2_close(bt2, dxpl);
+ H5B2_close(bt2);
H5Fclose(file);
} H5E_END_TRY;
return 1;
@@ -2444,7 +2433,6 @@ test_insert_level2_2internal_split(hid_t fapl, const H5B2_create_t *cparam,
{
hid_t file = -1; /* File ID */
H5F_t *f = NULL; /* Internal file object pointer */
- hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
haddr_t bt2_addr; /* Address of B-tree created */
hsize_t record; /* Record to insert into tree */
@@ -2462,14 +2450,14 @@ test_insert_level2_2internal_split(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Create the v2 B-tree & get its address */
- if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ if(create_btree(f, cparam, &bt2, &bt2_addr) < 0)
TEST_ERROR
/* Insert enough records to force root to split into 2 internal nodes */
/* (And fill up two child internal nodes) */
for(u = 0; u < (INSERT_SPLIT_ROOT_NREC * 59); u++) {
record = u + (INSERT_SPLIT_ROOT_NREC * 14) - (INSERT_SPLIT_ROOT_NREC / 4) + 3;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
} /* end for */
@@ -2479,22 +2467,22 @@ test_insert_level2_2internal_split(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = 2759; /* Record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)2) < 0)
TEST_ERROR
record = 4555; /* Right-most record in right internal node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
record = 4586; /* Right-most record in right leaf node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)0) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Insert record to split right-most internal node */
record = u + (INSERT_SPLIT_ROOT_NREC * 14) - (INSERT_SPLIT_ROOT_NREC / 4) + 3;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
/* Check up on B-tree */
@@ -2503,16 +2491,16 @@ test_insert_level2_2internal_split(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = 2759; /* Left record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)2) < 0)
TEST_ERROR
record = 3704; /* Right record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)2) < 0)
TEST_ERROR
record = 4555; /* Right-most record in right internal node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
record = 4387; /* Right-most record in right leaf node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)0) < 0)
TEST_ERROR
PASSED();
@@ -2520,7 +2508,7 @@ test_insert_level2_2internal_split(hid_t fapl, const H5B2_create_t *cparam,
TESTING("B-tree insert: split side internal node to 2 in level 2 B-tree (l->2)");
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Check up on B-tree */
@@ -2529,19 +2517,19 @@ test_insert_level2_2internal_split(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = 2759; /* Left record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)2) < 0)
TEST_ERROR
record = 932; /* Left-most record in left internal node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
record = 870; /* Left-most record in left leaf node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)0) < 0)
TEST_ERROR
/* Force left-most internal node to split */
for(u = 0; u < ((INSERT_SPLIT_ROOT_NREC * 14) - (INSERT_SPLIT_ROOT_NREC / 4) + 3); u++) {
record = u;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
} /* end for */
@@ -2551,25 +2539,25 @@ test_insert_level2_2internal_split(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = 870; /* Left record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)2) < 0)
TEST_ERROR
record = 1814; /* Next-to-left-most record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)2) < 0)
TEST_ERROR
record = 61; /* Left-most record in left internal node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
record = 0; /* Left-most record in left leaf node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)0) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Iterate over B-tree to check records have been inserted correctly */
idx = 0;
- if(H5B2_iterate(bt2, dxpl, iter_cb, &idx) < 0)
+ if(H5B2_iterate(bt2, iter_cb, &idx) < 0)
FAIL_STACK_ERROR
/* Make certain that the index is correct */
@@ -2577,7 +2565,7 @@ test_insert_level2_2internal_split(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Close the v2 B-tree */
- if(H5B2_close(bt2, dxpl) < 0)
+ if(H5B2_close(bt2) < 0)
FAIL_STACK_ERROR
bt2 = NULL;
@@ -2592,7 +2580,7 @@ test_insert_level2_2internal_split(hid_t fapl, const H5B2_create_t *cparam,
error:
H5E_BEGIN_TRY {
if(bt2)
- H5B2_close(bt2, dxpl);
+ H5B2_close(bt2);
H5Fclose(file);
} H5E_END_TRY;
return 1;
@@ -2623,7 +2611,6 @@ test_insert_level2_3internal_redistrib(hid_t fapl, const H5B2_create_t *cparam,
{
hid_t file = -1; /* File ID */
H5F_t *f = NULL; /* Internal file object pointer */
- hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
haddr_t bt2_addr; /* Address of B-tree created */
hsize_t record; /* Record to insert into tree */
@@ -2641,18 +2628,18 @@ test_insert_level2_3internal_redistrib(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Create the v2 B-tree & get its address */
- if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ if(create_btree(f, cparam, &bt2, &bt2_addr) < 0)
TEST_ERROR
/* Insert enough records to force root to split into 3 internal nodes */
for(u = 0; u < (INSERT_SPLIT_ROOT_NREC * 36); u++) {
record = u;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
} /* end for */
for(; u < ((INSERT_SPLIT_ROOT_NREC * 59) + 1); u++) {
record = u + (INSERT_SPLIT_ROOT_NREC * 13) + ((3 * INSERT_SPLIT_ROOT_NREC) / 4) + 3;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
} /* end for */
@@ -2662,29 +2649,29 @@ test_insert_level2_3internal_redistrib(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = 1889; /* Left record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)2) < 0)
TEST_ERROR
record = 3703; /* Right record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)2) < 0)
TEST_ERROR
record = 2267; /* Record to left of insertion point in middle internal node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
record = 3199; /* Record to right of insertion point in middle internal node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
record = 3137; /* Record just above insertion point in leaf node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)0) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Insert records to fill up middle internal node */
for(u = 0; u < ((INSERT_SPLIT_ROOT_NREC * 13) + ((3 * INSERT_SPLIT_ROOT_NREC) / 4) + 2); u++) {
record = u + (INSERT_SPLIT_ROOT_NREC * 36);
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
} /* end for */
@@ -2694,28 +2681,28 @@ test_insert_level2_3internal_redistrib(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = 1889; /* Left record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)2) < 0)
TEST_ERROR
record = 3703; /* Right record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)2) < 0)
TEST_ERROR
record = 3104; /* Record to left of insertion point in middle internal node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
record = 3137; /* Record to right of insertion point in middle internal node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
record = 3135; /* Record just above insertion point in leaf node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)0) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Insert another record, forcing the middle internal node to redistribute */
record = u + (INSERT_SPLIT_ROOT_NREC * 36);
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
/* Check up on B-tree */
@@ -2724,30 +2711,30 @@ test_insert_level2_3internal_redistrib(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = 1574; /* Left record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)2) < 0)
TEST_ERROR
record = 3104; /* Right record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)2) < 0)
TEST_ERROR
#ifdef NONE
record = 2862; /* Record to left of insertion point in right internal node (now) */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
#endif /* NONE */
record = 3137; /* Record to right of insertion point in right internal node (now) */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
record = 3135; /* Record just above insertion point in leaf node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)0) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Iterate over B-tree to check records have been inserted correctly */
idx = 0;
- if(H5B2_iterate(bt2, dxpl, iter_cb, &idx) < 0)
+ if(H5B2_iterate(bt2, iter_cb, &idx) < 0)
FAIL_STACK_ERROR
/* Make certain that the index is correct */
@@ -2755,7 +2742,7 @@ test_insert_level2_3internal_redistrib(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Close the v2 B-tree */
- if(H5B2_close(bt2, dxpl) < 0)
+ if(H5B2_close(bt2) < 0)
FAIL_STACK_ERROR
bt2 = NULL;
@@ -2770,7 +2757,7 @@ test_insert_level2_3internal_redistrib(hid_t fapl, const H5B2_create_t *cparam,
error:
H5E_BEGIN_TRY {
if(bt2)
- H5B2_close(bt2, dxpl);
+ H5B2_close(bt2);
H5Fclose(file);
} H5E_END_TRY;
return 1;
@@ -2801,7 +2788,6 @@ test_insert_level2_3internal_split(hid_t fapl, const H5B2_create_t *cparam,
{
hid_t file = -1; /* File ID */
H5F_t *f = NULL; /* Internal file object pointer */
- hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
haddr_t bt2_addr; /* Address of B-tree created */
hsize_t record; /* Record to insert into tree */
@@ -2819,24 +2805,24 @@ test_insert_level2_3internal_split(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Create the v2 B-tree & get its address */
- if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ if(create_btree(f, cparam, &bt2, &bt2_addr) < 0)
TEST_ERROR
/* Insert enough records to force root to split into 3 internal nodes */
/* (and fill right internal node) */
for(u = 0; u < (INSERT_SPLIT_ROOT_NREC * 31); u++) {
record = u;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
} /* end for */
for(; u < (INSERT_SPLIT_ROOT_NREC * 74); u++) {
record = u + ((INSERT_SPLIT_ROOT_NREC * 13) + ((3 * INSERT_SPLIT_ROOT_NREC) / 4) + 3);
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
} /* end for */
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Check up on B-tree */
@@ -2845,25 +2831,25 @@ test_insert_level2_3internal_split(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = 1889; /* Left record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)2) < 0)
TEST_ERROR
record = 3703; /* Right record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)2) < 0)
TEST_ERROR
record = 1952; /* Record to left of insertion point in middle internal node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
record = 2884; /* Record to right of insertion point in middle internal node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
record = 2822; /* Record just after insertion point in leaf node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)0) < 0)
TEST_ERROR
/* Insert records to fill up middle internal node */
for(u = 0; u < ((INSERT_SPLIT_ROOT_NREC * 13) + ((3 * INSERT_SPLIT_ROOT_NREC) / 4) + 2); u++) {
record = u + (INSERT_SPLIT_ROOT_NREC * 31);
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
} /* end for */
@@ -2873,28 +2859,28 @@ test_insert_level2_3internal_split(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = 1889; /* Left record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)2) < 0)
TEST_ERROR
record = 3703; /* Right record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)2) < 0)
TEST_ERROR
record = 2789; /* Record to left of insertion point in middle internal node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
record = 2822; /* Record to right of insertion point in middle internal node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
record = 2823; /* Record just above insertion point in leaf node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)0) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Insert record to split middle internal node */
record = u + (INSERT_SPLIT_ROOT_NREC * 31);
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
/* Check up on B-tree */
@@ -2903,33 +2889,33 @@ test_insert_level2_3internal_split(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record = 1889; /* Left record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)2) < 0)
TEST_ERROR
record = 2789; /* Middle record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)2) < 0)
TEST_ERROR
record = 3703; /* Right record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)2) < 0)
TEST_ERROR
#ifdef NONE
record = 3049; /* Record to left of insertion point in middle internal node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
#endif /* NONE */
record = 2822; /* Record to right of insertion point in middle internal node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
record = 2823; /* Record just above insertion point in leaf node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)0) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Iterate over B-tree to check records have been inserted correctly */
idx = 0;
- if(H5B2_iterate(bt2, dxpl, iter_cb, &idx) < 0)
+ if(H5B2_iterate(bt2, iter_cb, &idx) < 0)
FAIL_STACK_ERROR
/* Make certain that the index is correct */
@@ -2937,7 +2923,7 @@ test_insert_level2_3internal_split(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Close the v2 B-tree */
- if(H5B2_close(bt2, dxpl) < 0)
+ if(H5B2_close(bt2) < 0)
FAIL_STACK_ERROR
bt2 = NULL;
@@ -2952,7 +2938,7 @@ test_insert_level2_3internal_split(hid_t fapl, const H5B2_create_t *cparam,
error:
H5E_BEGIN_TRY {
if(bt2)
- H5B2_close(bt2, dxpl);
+ H5B2_close(bt2);
H5Fclose(file);
} H5E_END_TRY;
return 1;
@@ -2981,7 +2967,6 @@ test_insert_lots(hid_t fapl, const H5B2_create_t *cparam,
hid_t file = -1; /* File ID */
char filename[1024]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
- hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
haddr_t bt2_addr; /* Address of B-tree created */
hsize_t record; /* Record to insert into tree */
@@ -3040,13 +3025,13 @@ HDfprintf(stderr,"curr_time=%lu\n",(unsigned long)curr_time);
STACK_ERROR
/* Create the v2 B-tree & get its address */
- if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ if(create_btree(f, cparam, &bt2, &bt2_addr) < 0)
TEST_ERROR
/* Insert random records */
for(u = 0; u < INSERT_MANY; u++) {
record = records[u];
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
} /* end for */
@@ -3057,7 +3042,7 @@ HDfprintf(stderr,"curr_time=%lu\n",(unsigned long)curr_time);
TEST_ERROR
/* Close the v2 B-tree */
- if(H5B2_close(bt2, dxpl) < 0)
+ if(H5B2_close(bt2) < 0)
FAIL_STACK_ERROR
bt2 = NULL;
@@ -3078,7 +3063,7 @@ HDfprintf(stderr,"curr_time=%lu\n",(unsigned long)curr_time);
STACK_ERROR
/* Re-open v2 B-tree */
- if(NULL == (bt2 = H5B2_open(f, dxpl, bt2_addr, f)))
+ if(NULL == (bt2 = H5B2_open(f, bt2_addr, f)))
FAIL_STACK_ERROR
/* Check up on B-tree after re-open */
@@ -3089,7 +3074,7 @@ HDfprintf(stderr,"curr_time=%lu\n",(unsigned long)curr_time);
/* Iterate over B-tree to check records have been inserted correctly */
idx = 0;
- if(H5B2_iterate(bt2, dxpl, iter_cb, &idx) < 0)
+ if(H5B2_iterate(bt2, iter_cb, &idx) < 0)
FAIL_STACK_ERROR
/* Make certain that the index is correct */
@@ -3099,7 +3084,7 @@ HDfprintf(stderr,"curr_time=%lu\n",(unsigned long)curr_time);
/* Attempt to find non-existant record in level-4 B-tree */
/* (Should not be found, but not fail) */
idx = INSERT_MANY * 2;
- if(H5B2_find(bt2, dxpl, &idx, find_cb, &idx) != FALSE)
+ if(H5B2_find(bt2, &idx, find_cb, &idx) != FALSE)
TEST_ERROR
/* Find random records */
@@ -3108,19 +3093,19 @@ HDfprintf(stderr,"curr_time=%lu\n",(unsigned long)curr_time);
idx = (hsize_t)(HDrandom()%INSERT_MANY);
/* Attempt to find existant record in root of level-4 B-tree */
- if(H5B2_find(bt2, dxpl, &idx, find_cb, &idx) != TRUE)
+ if(H5B2_find(bt2, &idx, find_cb, &idx) != TRUE)
FAIL_STACK_ERROR
} /* end for */
/* Attempt to index non-existant record in level-4 B-tree, in increasing & decreasing order */
H5E_BEGIN_TRY {
- ret = H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)(INSERT_MANY*3), find_cb, NULL);
+ ret = H5B2_index(bt2, H5_ITER_INC, (hsize_t)(INSERT_MANY*3), find_cb, NULL);
} H5E_END_TRY;
/* Should fail */
if(ret != FAIL)
TEST_ERROR
H5E_BEGIN_TRY {
- ret = H5B2_index(bt2, dxpl, H5_ITER_DEC, (hsize_t)(INSERT_MANY*3), find_cb, NULL);
+ ret = H5B2_index(bt2, H5_ITER_DEC, (hsize_t)(INSERT_MANY*3), find_cb, NULL);
} H5E_END_TRY;
/* Should fail */
if(ret != FAIL)
@@ -3133,12 +3118,12 @@ HDfprintf(stderr,"curr_time=%lu\n",(unsigned long)curr_time);
/* Attempt to find existant record in root of level-4 B-tree */
/* (in increasing order) */
- if(H5B2_index(bt2, dxpl, H5_ITER_INC, idx, find_cb, &idx) < 0)
+ if(H5B2_index(bt2, H5_ITER_INC, idx, find_cb, &idx) < 0)
FAIL_STACK_ERROR
/* Attempt to find existant record in root of level-4 B-tree */
/* (in decreasing order) */
- if(H5B2_index(bt2, dxpl, H5_ITER_DEC, idx, find_dec_cb, &idx) < 0)
+ if(H5B2_index(bt2, H5_ITER_DEC, idx, find_dec_cb, &idx) < 0)
FAIL_STACK_ERROR
} /* end for */
@@ -3147,12 +3132,12 @@ HDfprintf(stderr,"curr_time=%lu\n",(unsigned long)curr_time);
TESTING("B-tree insert: attempt duplicate record in level 4 B-tree");
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
record = INSERT_MANY / 2;
H5E_BEGIN_TRY {
- ret = H5B2_insert(bt2, dxpl, &record);
+ ret = H5B2_insert(bt2, &record);
} H5E_END_TRY;
/* Should fail */
if(ret != FAIL)
@@ -3167,7 +3152,7 @@ HDfprintf(stderr,"curr_time=%lu\n",(unsigned long)curr_time);
TEST_ERROR
/* Close the v2 B-tree */
- if(H5B2_close(bt2, dxpl) < 0)
+ if(H5B2_close(bt2) < 0)
FAIL_STACK_ERROR
bt2 = NULL;
@@ -3184,7 +3169,7 @@ HDfprintf(stderr,"curr_time=%lu\n",(unsigned long)curr_time);
error:
H5E_BEGIN_TRY {
if(bt2)
- H5B2_close(bt2, dxpl);
+ H5B2_close(bt2);
H5Fclose(file);
} H5E_END_TRY;
HDfree(records);
@@ -3211,7 +3196,6 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam,
{
hid_t file = -1; /* File ID */
H5F_t *f = NULL; /* Internal file object pointer */
- hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
haddr_t bt2_addr; /* Address of B-tree created */
H5B2_test_rec_t record; /* Record to insert into tree */
@@ -3224,7 +3208,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Create the v2 B-tree & get its address */
- if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ if(create_btree(f, cparam, &bt2, &bt2_addr) < 0)
TEST_ERROR
/*
@@ -3233,47 +3217,47 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam,
TESTING("B-tree update: inserting first record in empty B-tree");
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
record.key = 42;
record.val = 72;
- if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0)
FAIL_STACK_ERROR
/* Attempt to find non-existant record in B-tree with 1 record */
/* (Should not be found, but not fail) */
find.key = 10;
find.val = (hsize_t)-1;
- if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != FALSE)
+ if(H5B2_find(bt2, &find, find_rec_cb, &find) != FALSE)
FAIL_STACK_ERROR
if(find.val != (hsize_t)-1)
TEST_ERROR
/* Try again with NULL 'op' */
/* (Should not be found, but not fail) */
- if(H5B2_find(bt2, dxpl, &find, NULL, NULL) != FALSE)
+ if(H5B2_find(bt2, &find, NULL, NULL) != FALSE)
FAIL_STACK_ERROR
if(find.val != (hsize_t)-1)
TEST_ERROR
/* Attempt to find existant record in B-tree with 1 record */
find.key = 42;
- if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE)
+ if(H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE)
FAIL_STACK_ERROR
if(find.val != 72)
TEST_ERROR
/* Try again with NULL 'op' */
find.val = (hsize_t)-1;
- if(H5B2_find(bt2, dxpl, &find, NULL, NULL) != TRUE)
+ if(H5B2_find(bt2, &find, NULL, NULL) != TRUE)
FAIL_STACK_ERROR
if(find.val != (hsize_t)-1)
TEST_ERROR
/* Attempt to index non-existant record in B-tree with 1 record */
H5E_BEGIN_TRY {
- ret = H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)1, index_rec_cb, NULL);
+ ret = H5B2_index(bt2, H5_ITER_INC, (hsize_t)1, index_rec_cb, NULL);
} H5E_END_TRY;
/* Should fail */
if(ret != FAIL)
@@ -3281,7 +3265,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam,
/* Attempt to index existing record in B-tree with 1 record */
find.key = (hsize_t)-1;
- if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)0, index_rec_cb, &find) < 0)
+ if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)0, index_rec_cb, &find) < 0)
FAIL_STACK_ERROR
if(find.key != 42)
TEST_ERROR
@@ -3297,47 +3281,47 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam,
TESTING("B-tree update: update only record in B-tree");
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
modify.key = 42;
modify.val = 43;
- if(H5B2_update(bt2, dxpl, &modify, modify_rec_cb, &modify) < 0)
+ if(H5B2_update(bt2, &modify, modify_rec_cb, &modify) < 0)
FAIL_STACK_ERROR
/* Attempt to find non-existant record in B-tree with 1 record */
/* (Should not be found, but not fail) */
find.key = 10;
find.val = (hsize_t)-1;
- if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != FALSE)
+ if(H5B2_find(bt2, &find, find_rec_cb, &find) != FALSE)
FAIL_STACK_ERROR
if(find.val != (hsize_t)-1)
TEST_ERROR
/* Try again with NULL 'op' */
/* (Should not be found, but not fail) */
- if(H5B2_find(bt2, dxpl, &find, NULL, NULL) != FALSE)
+ if(H5B2_find(bt2, &find, NULL, NULL) != FALSE)
FAIL_STACK_ERROR
if(find.val != (hsize_t)-1)
TEST_ERROR
/* Attempt to find modified record in B-tree with 1 record */
find.key = 42;
- if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE)
+ if(H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE)
FAIL_STACK_ERROR
if(find.val != 43)
TEST_ERROR
/* Try again with NULL 'op' */
find.val = (hsize_t)-1;
- if(H5B2_find(bt2, dxpl, &find, NULL, NULL) != TRUE)
+ if(H5B2_find(bt2, &find, NULL, NULL) != TRUE)
FAIL_STACK_ERROR
if(find.val != (hsize_t)-1)
TEST_ERROR
/* Attempt to index non-existant record in B-tree with 1 record */
H5E_BEGIN_TRY {
- ret = H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)1, index_rec_cb, NULL);
+ ret = H5B2_index(bt2, H5_ITER_INC, (hsize_t)1, index_rec_cb, NULL);
} H5E_END_TRY;
/* Should fail */
if(ret != FAIL)
@@ -3346,7 +3330,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam,
/* Attempt to index existing record in B-tree with 1 record */
find.key = (hsize_t)-1;
find.val = (hsize_t)-1;
- if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)0, index_rec_cb, &find) < 0)
+ if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)0, index_rec_cb, &find) < 0)
FAIL_STACK_ERROR
if(find.key != 42)
TEST_ERROR
@@ -3362,7 +3346,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam,
TESTING("B-tree update: insert several records");
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/*
@@ -3370,7 +3354,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam,
*/
record.key = 34;
record.val = 11;
- if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0)
FAIL_STACK_ERROR
/*
@@ -3378,7 +3362,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam,
*/
record.key = 56;
record.val = 12;
- if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0)
FAIL_STACK_ERROR
/*
@@ -3386,28 +3370,28 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam,
*/
record.key = 38;
record.val = 13;
- if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0)
FAIL_STACK_ERROR
/* Attempt to find non-existant record in level-0 B-tree with several records */
/* (Should not be found, but not fail) */
find.key = 10;
find.val = (hsize_t)-1;
- if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != FALSE)
+ if(H5B2_find(bt2, &find, find_rec_cb, &find) != FALSE)
TEST_ERROR
if(find.val != (hsize_t)-1)
TEST_ERROR
/* Attempt to find existant record in level-0 B-tree with several records */
find.key = 56;
- if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE)
+ if(H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE)
TEST_ERROR
if(find.val != 12)
TEST_ERROR
/* Attempt to index non-existant record in B-tree with several records */
H5E_BEGIN_TRY {
- ret = H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)4, index_rec_cb, NULL);
+ ret = H5B2_index(bt2, H5_ITER_INC, (hsize_t)4, index_rec_cb, NULL);
} H5E_END_TRY;
/* Should fail */
if(ret != FAIL)
@@ -3416,7 +3400,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam,
/* Attempt to index existing record in B-tree with several records */
find.key = (hsize_t)-1;
find.val = (hsize_t)-1;
- if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)0, index_rec_cb, &find) < 0)
+ if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)0, index_rec_cb, &find) < 0)
TEST_ERROR
if(find.key != 34)
TEST_ERROR
@@ -3424,7 +3408,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
find.key = (hsize_t)-1;
find.val = (hsize_t)-1;
- if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)1, index_rec_cb, &find) < 0)
+ if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)1, index_rec_cb, &find) < 0)
TEST_ERROR
if(find.key != 38)
TEST_ERROR
@@ -3432,7 +3416,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
find.key = (hsize_t)-1;
find.val = (hsize_t)-1;
- if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)2, index_rec_cb, &find) < 0)
+ if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)2, index_rec_cb, &find) < 0)
TEST_ERROR
if(find.key != 42)
TEST_ERROR
@@ -3440,7 +3424,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
find.key = (hsize_t)-1;
find.val = (hsize_t)-1;
- if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)3, index_rec_cb, &find) < 0)
+ if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)3, index_rec_cb, &find) < 0)
TEST_ERROR
if(find.key != 56)
TEST_ERROR
@@ -3458,43 +3442,43 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam,
record.key = 34;
modify.key = 34;
modify.val = 21;
- if(H5B2_update(bt2, dxpl, &record, modify_rec_cb, &modify) < 0)
+ if(H5B2_update(bt2, &record, modify_rec_cb, &modify) < 0)
FAIL_STACK_ERROR
record.key = 38;
modify.key = 38;
modify.val = 23;
- if(H5B2_update(bt2, dxpl, &record, modify_rec_cb, &modify) < 0)
+ if(H5B2_update(bt2, &record, modify_rec_cb, &modify) < 0)
FAIL_STACK_ERROR
record.key = 42;
modify.key = 42;
modify.val = 24;
- if(H5B2_update(bt2, dxpl, &record, modify_rec_cb, &modify) < 0)
+ if(H5B2_update(bt2, &record, modify_rec_cb, &modify) < 0)
FAIL_STACK_ERROR
record.key = 56;
modify.key = 56;
modify.val = 22;
- if(H5B2_update(bt2, dxpl, &record, modify_rec_cb, &modify) < 0)
+ if(H5B2_update(bt2, &record, modify_rec_cb, &modify) < 0)
FAIL_STACK_ERROR
/* Attempt to find non-existant record in level-0 B-tree with several records */
/* (Should not be found, but not fail) */
find.key = 41;
find.val = (hsize_t)-1;
- if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != FALSE)
+ if(H5B2_find(bt2, &find, find_rec_cb, &find) != FALSE)
TEST_ERROR
if(find.val != (hsize_t)-1)
TEST_ERROR
/* Attempt to find existant record in level-0 B-tree with several record */
find.key = 56;
- if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE)
+ if(H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE)
TEST_ERROR
if(find.val != 22)
TEST_ERROR
/* Attempt to index non-existant record in B-tree with several records */
H5E_BEGIN_TRY {
- ret = H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)4, index_rec_cb, NULL);
+ ret = H5B2_index(bt2, H5_ITER_INC, (hsize_t)4, index_rec_cb, NULL);
} H5E_END_TRY;
/* Should fail */
if(ret != FAIL)
@@ -3503,7 +3487,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam,
/* Attempt to index existing record in B-tree with several records */
find.key = (hsize_t)-1;
find.val = (hsize_t)-1;
- if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)0, index_rec_cb, &find) < 0)
+ if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)0, index_rec_cb, &find) < 0)
TEST_ERROR
if(find.key != 34)
TEST_ERROR
@@ -3511,7 +3495,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
find.key = (hsize_t)-1;
find.val = (hsize_t)-1;
- if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)1, index_rec_cb, &find) < 0)
+ if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)1, index_rec_cb, &find) < 0)
TEST_ERROR
if(find.key != 38)
TEST_ERROR
@@ -3519,7 +3503,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
find.key = (hsize_t)-1;
find.val = (hsize_t)-1;
- if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)2, index_rec_cb, &find) < 0)
+ if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)2, index_rec_cb, &find) < 0)
TEST_ERROR
if(find.key != 42)
TEST_ERROR
@@ -3527,7 +3511,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
find.key = (hsize_t)-1;
find.val = (hsize_t)-1;
- if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)3, index_rec_cb, &find) < 0)
+ if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)3, index_rec_cb, &find) < 0)
TEST_ERROR
if(find.key != 56)
TEST_ERROR
@@ -3535,7 +3519,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Close the v2 B-tree */
- if(H5B2_close(bt2, dxpl) < 0)
+ if(H5B2_close(bt2) < 0)
FAIL_STACK_ERROR
bt2 = NULL;
@@ -3552,7 +3536,7 @@ test_update_basic(hid_t fapl, const H5B2_create_t *cparam,
error:
H5E_BEGIN_TRY {
if(bt2)
- H5B2_close(bt2, dxpl);
+ H5B2_close(bt2);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -3581,7 +3565,6 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam,
{
hid_t file = -1; /* File ID */
H5F_t *f = NULL; /* Internal file object pointer */
- hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
haddr_t bt2_addr; /* Address of B-tree created */
H5B2_test_rec_t record; /* Record to insert into tree */
@@ -3602,14 +3585,14 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Create the v2 B-tree & get its address */
- if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ if(create_btree(f, cparam, &bt2, &bt2_addr) < 0)
TEST_ERROR
/* Insert records to fill root leaf node */
for(u = 0; u < (INSERT_SPLIT_ROOT_NREC_REC - 1); u++) {
record.key = u + 2;
record.val = u * 2 + 4;
- if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0)
FAIL_STACK_ERROR
} /* end for */
@@ -3619,17 +3602,17 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record.key = 33;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)0) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Insert record to split root leaf node */
record.key = INSERT_SPLIT_ROOT_NREC_REC + 1;
record.val = (INSERT_SPLIT_ROOT_NREC_REC - 1) * 2 + 4;
- if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0)
FAIL_STACK_ERROR
/* Check up on B-tree */
@@ -3638,13 +3621,13 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record.key = 33;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
/* Iterate over B-tree to check records have been inserted correctly */
idx.key = 2;
idx.val = 4;
- if(H5B2_iterate(bt2, dxpl, iter_rec_cb, &idx) < 0)
+ if(H5B2_iterate(bt2, iter_rec_cb, &idx) < 0)
FAIL_STACK_ERROR
/* Make certain that the index is correct */
@@ -3652,7 +3635,7 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Modify all records */
@@ -3660,7 +3643,7 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam,
record.key = u + 2;
modify.key = u + 2;
modify.val = u * 2 + 5;
- if(H5B2_update(bt2, dxpl, &record, modify_rec_cb, &modify) < 0)
+ if(H5B2_update(bt2, &record, modify_rec_cb, &modify) < 0)
FAIL_STACK_ERROR
} /* end for */
@@ -3670,13 +3653,13 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record.key = 33;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
/* Iterate over B-tree to check records have been inserted correctly */
idx.key = 2;
idx.val = 5;
- if(H5B2_iterate(bt2, dxpl, iter_rec_cb, &idx) < 0)
+ if(H5B2_iterate(bt2, iter_rec_cb, &idx) < 0)
FAIL_STACK_ERROR
/* Make certain that the index is correct */
@@ -3685,17 +3668,17 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam,
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Insert a couple more records, on the left side of the B-tree */
record.key = 0;
record.val = 1;
- if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0)
FAIL_STACK_ERROR
record.key = 1;
record.val = 3;
- if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0)
FAIL_STACK_ERROR
/* Check up on B-tree */
@@ -3704,18 +3687,18 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record.key = 33;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Iterate over B-tree to check records have been inserted correctly */
idx.key = 0;
idx.val = 1;
- if(H5B2_iterate(bt2, dxpl, iter_rec_cb, &idx) < 0)
+ if(H5B2_iterate(bt2, iter_rec_cb, &idx) < 0)
FAIL_STACK_ERROR
/* Make certain that the index is correct */
@@ -3726,7 +3709,7 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam,
/* (Should not be found, but not fail) */
find.key = 800;
find.val = (hsize_t)-1;
- if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != FALSE)
+ if(H5B2_find(bt2, &find, find_rec_cb, &find) != FALSE)
TEST_ERROR
if(find.val != (hsize_t)-1)
TEST_ERROR
@@ -3734,7 +3717,7 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam,
/* Attempt to find existant record in root of level-1 B-tree */
find.key = 33;
find.val = (hsize_t)-1;
- if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE)
+ if(H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE)
FAIL_STACK_ERROR
if(find.key != 33)
TEST_ERROR
@@ -3744,7 +3727,7 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam,
/* Attempt to find existant record in leaf of level-1 B-tree */
find.key = 56;
find.val = (hsize_t)-1;
- if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE)
+ if(H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE)
FAIL_STACK_ERROR
if(find.key != 56)
TEST_ERROR
@@ -3753,7 +3736,7 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam,
/* Attempt to index non-existant record in level-1 B-tree */
H5E_BEGIN_TRY {
- ret = H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)(INSERT_SPLIT_ROOT_NREC_REC + 2), index_rec_cb, NULL);
+ ret = H5B2_index(bt2, H5_ITER_INC, (hsize_t)(INSERT_SPLIT_ROOT_NREC_REC + 2), index_rec_cb, NULL);
} H5E_END_TRY;
/* Should fail */
if(ret != FAIL)
@@ -3762,7 +3745,7 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam,
/* Attempt to index existing record in root of level-1 B-tree */
find.key = (hsize_t)-1;
find.val = (hsize_t)-1;
- if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)33, index_rec_cb, &find) < 0)
+ if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)33, index_rec_cb, &find) < 0)
FAIL_STACK_ERROR
if(find.key != 33)
TEST_ERROR
@@ -3772,7 +3755,7 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam,
/* Attempt to index existing record in left leaf of level-1 B-tree */
find.key = (hsize_t)-1;
find.val = (hsize_t)-1;
- if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)0, index_rec_cb, &find) < 0)
+ if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)0, index_rec_cb, &find) < 0)
FAIL_STACK_ERROR
if(find.key != 0)
TEST_ERROR
@@ -3782,7 +3765,7 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam,
/* Attempt to index existing record in right leaf of level-1 B-tree */
find.key = (hsize_t)-1;
find.val = (hsize_t)-1;
- if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)50, index_rec_cb, &find) < 0)
+ if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)50, index_rec_cb, &find) < 0)
FAIL_STACK_ERROR
if(find.key != 50)
TEST_ERROR
@@ -3790,7 +3773,7 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Close the v2 B-tree */
- if(H5B2_close(bt2, dxpl) < 0)
+ if(H5B2_close(bt2) < 0)
FAIL_STACK_ERROR
bt2 = NULL;
@@ -3804,7 +3787,7 @@ test_update_split_root(hid_t fapl, const H5B2_create_t *cparam,
error:
H5E_BEGIN_TRY {
if(bt2)
- H5B2_close(bt2, dxpl);
+ H5B2_close(bt2);
H5Fclose(file);
} H5E_END_TRY;
return 1;
@@ -3834,7 +3817,6 @@ test_update_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
{
hid_t file = -1; /* File ID */
H5F_t *f = NULL; /* Internal file object pointer */
- hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
haddr_t bt2_addr; /* Address of B-tree created */
H5B2_test_rec_t record; /* Record to insert into tree */
@@ -3851,14 +3833,14 @@ test_update_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Create the v2 B-tree & get its address */
- if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ if(create_btree(f, cparam, &bt2, &bt2_addr) < 0)
TEST_ERROR
/* Insert enough records to force root to split into 2 leaves */
for(u = 0; u < INSERT_SPLIT_ROOT_NREC_REC; u++) {
record.key = u + (INSERT_SPLIT_ROOT_NREC_REC / 2) + 1;
record.val = u + (INSERT_SPLIT_ROOT_NREC_REC / 2) + 10;
- if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0)
FAIL_STACK_ERROR
} /* end for */
@@ -3868,11 +3850,11 @@ test_update_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record.key = INSERT_SPLIT_ROOT_NREC_REC;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
@@ -3880,7 +3862,7 @@ test_update_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
for(u = 0; u < (INSERT_SPLIT_ROOT_NREC_REC / 2) + 1; u++) {
record.key = u;
record.val = u + 9;
- if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0)
FAIL_STACK_ERROR
} /* end for */
@@ -3890,11 +3872,11 @@ test_update_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record.key = (INSERT_SPLIT_ROOT_NREC_REC / 2) + (INSERT_SPLIT_ROOT_NREC_REC / 4);
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
/* Close the v2 B-tree */
- if(H5B2_close(bt2, dxpl) < 0)
+ if(H5B2_close(bt2) < 0)
FAIL_STACK_ERROR
bt2 = NULL;
@@ -3906,14 +3888,14 @@ test_update_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
TESTING("B-tree update: redistribute 2 leaves in level 1 B-tree (r->l)");
/* Create the v2 B-tree & get its address */
- if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ if(create_btree(f, cparam, &bt2, &bt2_addr) < 0)
TEST_ERROR
/* Insert enough records to force root to split into 2 leaves */
for(u = 0; u < INSERT_SPLIT_ROOT_NREC_REC; u++) {
record.key = u;
record.val = u + 9;
- if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0)
FAIL_STACK_ERROR
} /* end for */
@@ -3923,18 +3905,18 @@ test_update_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record.key = (INSERT_SPLIT_ROOT_NREC_REC / 2) - 1;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Force redistribution from left node into right node */
for(u = 0; u < (INSERT_SPLIT_ROOT_NREC_REC / 2) + 1; u++) {
record.key = u + INSERT_SPLIT_ROOT_NREC_REC;
record.val = u + INSERT_SPLIT_ROOT_NREC_REC + 9;
- if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0)
FAIL_STACK_ERROR
} /* end for */
@@ -3944,11 +3926,11 @@ test_update_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record.key = (INSERT_SPLIT_ROOT_NREC_REC / 2) + (INSERT_SPLIT_ROOT_NREC_REC / 4) - 1;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
/* Close the v2 B-tree */
- if(H5B2_close(bt2, dxpl) < 0)
+ if(H5B2_close(bt2) < 0)
FAIL_STACK_ERROR
bt2 = NULL;
@@ -3963,7 +3945,7 @@ test_update_level1_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
error:
H5E_BEGIN_TRY {
if(bt2)
- H5B2_close(bt2, dxpl);
+ H5B2_close(bt2);
H5Fclose(file);
} H5E_END_TRY;
return 1;
@@ -3993,7 +3975,6 @@ test_update_level1_side_split(hid_t fapl, const H5B2_create_t *cparam,
{
hid_t file = -1; /* File ID */
H5F_t *f = NULL; /* Internal file object pointer */
- hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
haddr_t bt2_addr; /* Address of B-tree created */
H5B2_test_rec_t record; /* Record to insert into tree */
@@ -4010,14 +3991,14 @@ test_update_level1_side_split(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Create the v2 B-tree & get its address */
- if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ if(create_btree(f, cparam, &bt2, &bt2_addr) < 0)
TEST_ERROR
/* Insert enough records to force root to split into 2 leaves */
for(u = 0; u < INSERT_SPLIT_ROOT_NREC_REC; u++) {
record.key = u + INSERT_SPLIT_ROOT_NREC_REC;
record.val = u + INSERT_SPLIT_ROOT_NREC_REC + 10;
- if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0)
FAIL_STACK_ERROR
} /* end for */
@@ -4027,18 +4008,18 @@ test_update_level1_side_split(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record.key = INSERT_SPLIT_ROOT_NREC_REC + (INSERT_SPLIT_ROOT_NREC_REC / 2) - 1;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Force left node to split */
for(u = 0; u < INSERT_SPLIT_ROOT_NREC_REC; u++) {
record.key = u;
record.val = u + 10;
- if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0)
FAIL_STACK_ERROR
} /* end for */
@@ -4048,14 +4029,14 @@ test_update_level1_side_split(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record.key = 31;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
record.key = 64;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
/* Close the v2 B-tree */
- if(H5B2_close(bt2, dxpl) < 0)
+ if(H5B2_close(bt2) < 0)
FAIL_STACK_ERROR
bt2 = NULL;
@@ -4067,14 +4048,14 @@ test_update_level1_side_split(hid_t fapl, const H5B2_create_t *cparam,
TESTING("B-tree update: split side leaf into 2 leaves in level 1 B-tree (r->l)");
/* Create the v2 B-tree & get its address */
- if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ if(create_btree(f, cparam, &bt2, &bt2_addr) < 0)
TEST_ERROR
/* Insert enough records to force root to split into 2 leaves */
for(u = 0; u < INSERT_SPLIT_ROOT_NREC_REC; u++) {
record.key = u;
record.val = u + 10;
- if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0)
FAIL_STACK_ERROR
} /* end for */
@@ -4084,18 +4065,18 @@ test_update_level1_side_split(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record.key = (INSERT_SPLIT_ROOT_NREC_REC / 2) - 1;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Force right node to split */
for(u = 0; u < INSERT_SPLIT_ROOT_NREC_REC; u++) {
record.key = u + INSERT_SPLIT_ROOT_NREC_REC;
record.val = u + INSERT_SPLIT_ROOT_NREC_REC + 10;
- if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0)
FAIL_STACK_ERROR
} /* end for */
@@ -4105,14 +4086,14 @@ test_update_level1_side_split(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record.key = 63;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
record.key = 95;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
/* Close the v2 B-tree */
- if(H5B2_close(bt2, dxpl) < 0)
+ if(H5B2_close(bt2) < 0)
FAIL_STACK_ERROR
bt2 = NULL;
@@ -4127,7 +4108,7 @@ test_update_level1_side_split(hid_t fapl, const H5B2_create_t *cparam,
error:
H5E_BEGIN_TRY {
if(bt2)
- H5B2_close(bt2, dxpl);
+ H5B2_close(bt2);
H5Fclose(file);
} H5E_END_TRY;
return 1;
@@ -4159,7 +4140,6 @@ test_update_level1_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
{
hid_t file = -1; /* File ID */
H5F_t *f = NULL; /* Internal file object pointer */
- hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
haddr_t bt2_addr; /* Address of B-tree created */
H5B2_test_rec_t record; /* Record to insert into tree */
@@ -4177,14 +4157,14 @@ test_update_level1_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Create the v2 B-tree & get its address */
- if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ if(create_btree(f, cparam, &bt2, &bt2_addr) < 0)
TEST_ERROR
/* Insert enough records to force root to split into 2 leaves */
for(u = 0; u < INSERT_SPLIT_ROOT_NREC_REC; u++) {
record.key = u + (INSERT_SPLIT_ROOT_NREC_REC + (INSERT_SPLIT_ROOT_NREC_REC / 2) + 1);
record.val = record.key * 2;
- if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0)
FAIL_STACK_ERROR
} /* end for */
@@ -4194,18 +4174,18 @@ test_update_level1_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record.key = (2 * INSERT_SPLIT_ROOT_NREC_REC);
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Force left node to split */
for(u = 0; u < INSERT_SPLIT_ROOT_NREC_REC; u++) {
record.key = u;
record.val = record.key * 2;
- if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0)
FAIL_STACK_ERROR
} /* end for */
@@ -4215,21 +4195,21 @@ test_update_level1_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record.key = (INSERT_SPLIT_ROOT_NREC_REC / 2) - 1;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
record.key = INSERT_SPLIT_ROOT_NREC_REC + (INSERT_SPLIT_ROOT_NREC_REC / 2) + 1;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Insert records to force middle node to redistribute */
for(u = 0; u < ((INSERT_SPLIT_ROOT_NREC_REC / 2) + 1); u++) {
record.key = u + INSERT_SPLIT_ROOT_NREC_REC;
record.val = record.key * 2;
- if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0)
FAIL_STACK_ERROR
} /* end for */
@@ -4239,20 +4219,20 @@ test_update_level1_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record.key = 52;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
record.key = 107;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Iterate over B-tree to check records have been inserted correctly */
idx.key = 0;
idx.val = 0;
- if(H5B2_iterate(bt2, dxpl, iter_rec_cb, &idx) < 0)
+ if(H5B2_iterate(bt2, iter_rec_cb, &idx) < 0)
FAIL_STACK_ERROR
/* Make certain that the index is correct */
@@ -4260,7 +4240,7 @@ test_update_level1_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Close the v2 B-tree */
- if(H5B2_close(bt2, dxpl) < 0)
+ if(H5B2_close(bt2) < 0)
FAIL_STACK_ERROR
bt2 = NULL;
@@ -4275,7 +4255,7 @@ test_update_level1_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cparam,
error:
H5E_BEGIN_TRY {
if(bt2)
- H5B2_close(bt2, dxpl);
+ H5B2_close(bt2);
H5Fclose(file);
} H5E_END_TRY;
return 1;
@@ -4306,7 +4286,6 @@ test_update_level1_middle_split(hid_t fapl, const H5B2_create_t *cparam,
{
hid_t file = -1; /* File ID */
H5F_t *f = NULL; /* Internal file object pointer */
- hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
haddr_t bt2_addr; /* Address of B-tree created */
H5B2_test_rec_t record; /* Record to insert into tree */
@@ -4324,14 +4303,14 @@ test_update_level1_middle_split(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Create the v2 B-tree & get its address */
- if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ if(create_btree(f, cparam, &bt2, &bt2_addr) < 0)
TEST_ERROR
/* Insert enough records to force root to split into 2 leaves */
for(u = 0; u < INSERT_SPLIT_ROOT_NREC_REC; u++) {
record.key = u + (INSERT_SPLIT_ROOT_NREC_REC * 2);
record.val = record.key * 2;
- if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0)
FAIL_STACK_ERROR
} /* end for */
@@ -4341,18 +4320,18 @@ test_update_level1_middle_split(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record.key = (2 * INSERT_SPLIT_ROOT_NREC_REC) + (INSERT_SPLIT_ROOT_NREC_REC / 2) - 1;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Force split from left node into right node */
for(u = 0; u < (INSERT_SPLIT_ROOT_NREC_REC * 2); u++) {
record.key = u;
record.val = record.key * 2;
- if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0)
FAIL_STACK_ERROR
} /* end for */
@@ -4362,23 +4341,23 @@ test_update_level1_middle_split(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record.key = 63;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
record.key = 95;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
record.key = 128;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Iterate over B-tree to check records have been inserted correctly */
idx.key = 0;
idx.val = 0;
- if(H5B2_iterate(bt2, dxpl, iter_rec_cb, &idx) < 0)
+ if(H5B2_iterate(bt2, iter_rec_cb, &idx) < 0)
FAIL_STACK_ERROR
/* Make certain that the index is correct */
@@ -4386,7 +4365,7 @@ test_update_level1_middle_split(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Close the v2 B-tree */
- if(H5B2_close(bt2, dxpl) < 0)
+ if(H5B2_close(bt2) < 0)
FAIL_STACK_ERROR
bt2 = NULL;
@@ -4401,7 +4380,7 @@ test_update_level1_middle_split(hid_t fapl, const H5B2_create_t *cparam,
error:
H5E_BEGIN_TRY {
if(bt2)
- H5B2_close(bt2, dxpl);
+ H5B2_close(bt2);
H5Fclose(file);
} H5E_END_TRY;
return 1;
@@ -4428,7 +4407,6 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam,
{
hid_t file = -1; /* File ID */
H5F_t *f = NULL; /* Internal file object pointer */
- hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
haddr_t bt2_addr; /* Address of B-tree created */
H5B2_test_rec_t record; /* Record to insert into tree */
@@ -4448,20 +4426,20 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Create the v2 B-tree & get its address */
- if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ if(create_btree(f, cparam, &bt2, &bt2_addr) < 0)
TEST_ERROR
/* Insert enough records to force root to split into 2 internal nodes */
for(u = 0; u < (INSERT_SPLIT_ROOT_NREC_REC * 9); u++) {
record.key = u + 2; /* Leave a gap for later insertion */
record.val = record.key * 2;
- if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0)
FAIL_STACK_ERROR
} /* end for */
for(; u < (INSERT_SPLIT_ROOT_NREC_REC * 41); u++) {
record.key = u + 4; /* Leave a gap for later insertion */
record.val = record.key * 2;
- if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0)
FAIL_STACK_ERROR
} /* end for */
@@ -4471,42 +4449,42 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record.key = 1347;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)2) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Add some extra records to left-most leaf */
record.key = 0;
record.val = record.key * 2;
- if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0)
FAIL_STACK_ERROR
record.key = 1;
record.val = record.key * 2;
- if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0)
FAIL_STACK_ERROR
/* Add some extra records to middle leaf */
record.key = (INSERT_SPLIT_ROOT_NREC_REC * 9) + 2;
record.val = record.key * 2;
- if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0)
FAIL_STACK_ERROR
record.key = (INSERT_SPLIT_ROOT_NREC_REC * 9) + 3;
record.val = record.key * 2;
- if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Iterate over B-tree to check records have been inserted correctly */
idx.key = 0;
idx.val = 0;
- if(H5B2_iterate(bt2, dxpl, iter_rec_cb, &idx) < 0)
+ if(H5B2_iterate(bt2, iter_rec_cb, &idx) < 0)
FAIL_STACK_ERROR
/* Make certain that the index is correct */
@@ -4517,7 +4495,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam,
/* (Should not be found, but not fail) */
find.key = INSERT_SPLIT_ROOT_NREC_REC * 42;
find.val = (hsize_t)-1;
- if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != FALSE)
+ if(H5B2_find(bt2, &find, find_rec_cb, &find) != FALSE)
TEST_ERROR
if(find.val != (hsize_t)-1)
TEST_ERROR
@@ -4525,45 +4503,45 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam,
/* Attempt to find existant record in root of level-2 B-tree */
find.key = 1347;
find.val = (hsize_t)-1;
- if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE)
+ if(H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE)
FAIL_STACK_ERROR
if(find.val != (1347 * 2))
TEST_ERROR
/* Check with B-tree */
record.key = 1347;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)2) < 0)
TEST_ERROR
/* Attempt to find existant record in internal node of level-2 B-tree */
find.key = 513;
find.val = (hsize_t)-1;
- if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE)
+ if(H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE)
FAIL_STACK_ERROR
if(find.val != (513 * 2))
TEST_ERROR
/* Check with B-tree */
record.key = 513;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
/* Attempt to find existant record in leaf of level-2 B-tree */
find.key = 555;
find.val = (hsize_t)-1;
- if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE)
+ if(H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE)
FAIL_STACK_ERROR
if(find.val != (555 * 2))
TEST_ERROR
/* Check with B-tree */
record.key = 555;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)0) < 0)
TEST_ERROR
/* Attempt to index non-existant record in level-2 B-tree */
H5E_BEGIN_TRY {
- ret = H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)(INSERT_SPLIT_ROOT_NREC_REC * 42), index_rec_cb, NULL);
+ ret = H5B2_index(bt2, H5_ITER_INC, (hsize_t)(INSERT_SPLIT_ROOT_NREC_REC * 42), index_rec_cb, NULL);
} H5E_END_TRY;
/* Should fail */
if(ret != FAIL)
@@ -4572,7 +4550,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam,
/* Attempt to index existing record in root of level-2 B-tree */
find.key = (hsize_t)-1;
find.val = (hsize_t)-1;
- if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)1347, index_rec_cb, &find) < 0)
+ if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)1347, index_rec_cb, &find) < 0)
FAIL_STACK_ERROR
if(find.key != 1347)
TEST_ERROR
@@ -4582,7 +4560,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam,
/* Attempt to index existing record in internal node of level-2 B-tree */
find.key = (hsize_t)-1;
find.val = (hsize_t)-1;
- if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)513, index_rec_cb, &find) < 0)
+ if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)513, index_rec_cb, &find) < 0)
FAIL_STACK_ERROR
if(find.key != 513)
TEST_ERROR
@@ -4592,7 +4570,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam,
/* Attempt to index existing record in leaf of level-2 B-tree */
find.key = (hsize_t)-1;
find.val = (hsize_t)-1;
- if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)555, index_rec_cb, &find) < 0)
+ if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)555, index_rec_cb, &find) < 0)
FAIL_STACK_ERROR
if(find.key != 555)
TEST_ERROR
@@ -4600,7 +4578,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Close the v2 B-tree */
- if(H5B2_close(bt2, dxpl) < 0)
+ if(H5B2_close(bt2) < 0)
FAIL_STACK_ERROR
bt2 = NULL;
@@ -4613,20 +4591,20 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam,
TESTING("B-tree update: make level 2 B-tree (r->l)");
/* Create the v2 B-tree & get its address */
- if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ if(create_btree(f, cparam, &bt2, &bt2_addr) < 0)
TEST_ERROR
/* Insert enough records to force root to split into 2 internal nodes */
for(u = 0; u < (INSERT_SPLIT_ROOT_NREC_REC * 9); u++) {
record.key = ((INSERT_SPLIT_ROOT_NREC_REC * 41) + 1) - u;
record.val = record.key * 2;
- if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0)
FAIL_STACK_ERROR
} /* end for */
for(; u < (INSERT_SPLIT_ROOT_NREC_REC * 41); u++) {
record.key = ((INSERT_SPLIT_ROOT_NREC_REC * 41) + 1) - (u +2); /* Leave a gap for later insertion */
record.val = record.key * 2;
- if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0)
FAIL_STACK_ERROR
} /* end for */
@@ -4636,42 +4614,42 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record.key = 1344;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)2) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Add some extra records to right-most leaf */
record.key = (INSERT_SPLIT_ROOT_NREC_REC * 41) + 2;
record.val = record.key * 2;
- if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0)
FAIL_STACK_ERROR
record.key = (INSERT_SPLIT_ROOT_NREC_REC * 41) + 3;
record.val = record.key * 2;
- if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0)
FAIL_STACK_ERROR
/* Add some extra records to middle leaf */
record.key = ((INSERT_SPLIT_ROOT_NREC_REC * 41) - (INSERT_SPLIT_ROOT_NREC_REC * 9));
record.val = record.key * 2;
- if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0)
FAIL_STACK_ERROR
record.key = ((INSERT_SPLIT_ROOT_NREC_REC * 41) - (INSERT_SPLIT_ROOT_NREC_REC * 9)) + 1;
record.val = record.key * 2;
- if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Iterate over B-tree to check records have been inserted correctly */
idx.key = 0;
idx.val = 0;
- if(H5B2_iterate(bt2, dxpl, iter_rec_cb, &idx) < 0)
+ if(H5B2_iterate(bt2, iter_rec_cb, &idx) < 0)
FAIL_STACK_ERROR
/* Make certain that the index is correct */
@@ -4682,7 +4660,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam,
/* (Should not be found, but not fail) */
find.key = INSERT_SPLIT_ROOT_NREC_REC * 42;
find.val = (hsize_t)-1;
- if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != FALSE)
+ if(H5B2_find(bt2, &find, find_rec_cb, &find) != FALSE)
TEST_ERROR
if(find.val != (hsize_t)-1)
TEST_ERROR
@@ -4690,45 +4668,45 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam,
/* Attempt to find existant record in root of level-2 B-tree */
find.key = 1344;
find.val = (hsize_t)-1;
- if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE)
+ if(H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE)
FAIL_STACK_ERROR
if(find.val != (1344 * 2))
TEST_ERROR
/* Check with B-tree */
record.key = 1344;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)2) < 0)
TEST_ERROR
/* Attempt to find existant record in internal node of level-2 B-tree */
find.key = 512;
find.val = (hsize_t)-1;
- if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE)
+ if(H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE)
FAIL_STACK_ERROR
if(find.val != (512 * 2))
TEST_ERROR
/* Check with B-tree */
record.key = 512;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
/* Attempt to find existant record in leaf of level-2 B-tree */
find.key = 555;
find.val = (hsize_t)-1;
- if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE)
+ if(H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE)
FAIL_STACK_ERROR
if(find.val != (555 * 2))
TEST_ERROR
/* Check with B-tree */
record.key = 555;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)0) < 0)
TEST_ERROR
/* Attempt to index non-existant record in level-2 B-tree */
H5E_BEGIN_TRY {
- ret = H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)(INSERT_SPLIT_ROOT_NREC_REC * 42), index_rec_cb, NULL);
+ ret = H5B2_index(bt2, H5_ITER_INC, (hsize_t)(INSERT_SPLIT_ROOT_NREC_REC * 42), index_rec_cb, NULL);
} H5E_END_TRY;
/* Should fail */
if(ret != FAIL)
@@ -4737,7 +4715,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam,
/* Attempt to index existing record in root of level-2 B-tree */
find.key = (hsize_t)-1;
find.val = (hsize_t)-1;
- if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)1344, index_rec_cb, &find) < 0)
+ if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)1344, index_rec_cb, &find) < 0)
FAIL_STACK_ERROR
if(find.key != 1344)
TEST_ERROR
@@ -4747,7 +4725,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam,
/* Attempt to index existing record in internal node of level-2 B-tree */
find.key = (hsize_t)-1;
find.val = (hsize_t)-1;
- if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)512, index_rec_cb, &find) < 0)
+ if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)512, index_rec_cb, &find) < 0)
FAIL_STACK_ERROR
if(find.key != 512)
TEST_ERROR
@@ -4757,7 +4735,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam,
/* Attempt to index existing record in leaf of level-2 B-tree */
find.key = (hsize_t)-1;
find.val = (hsize_t)-1;
- if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)555, index_rec_cb, &find) < 0)
+ if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)555, index_rec_cb, &find) < 0)
FAIL_STACK_ERROR
if(find.key != 555)
TEST_ERROR
@@ -4765,7 +4743,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Close the v2 B-tree */
- if(H5B2_close(bt2, dxpl) < 0)
+ if(H5B2_close(bt2) < 0)
FAIL_STACK_ERROR
bt2 = NULL;
@@ -4778,20 +4756,20 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam,
TESTING("B-tree update: make level 2 B-tree (l+r->middle)");
/* Create the v2 B-tree & get its address */
- if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ if(create_btree(f, cparam, &bt2, &bt2_addr) < 0)
TEST_ERROR
/* Insert enough records to force root to split into 2 internal nodes */
for(u = 0; u < (INSERT_SPLIT_ROOT_NREC_REC * 9); u++) {
record.key = ((INSERT_SPLIT_ROOT_NREC_REC * 41) + 3) - u;
record.val = record.key * 2;
- if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0)
FAIL_STACK_ERROR
} /* end for */
for(; u < (INSERT_SPLIT_ROOT_NREC_REC * 41); u++) {
record.key = u - ((INSERT_SPLIT_ROOT_NREC_REC * 9) - 2); /* Leave a gap for later insertion */
record.val = record.key * 2;
- if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0)
FAIL_STACK_ERROR
} /* end for */
@@ -4801,52 +4779,52 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam,
if(check_stats(bt2, &bt2_stat) < 0)
TEST_ERROR
record.key = 1345;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)2) < 0)
TEST_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Add some extra records to right-most leaf */
record.key = (INSERT_SPLIT_ROOT_NREC_REC * 41) + 4;
record.val = record.key * 2;
- if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0)
FAIL_STACK_ERROR
record.key = (INSERT_SPLIT_ROOT_NREC_REC * 41) + 5;
record.val = record.key * 2;
- if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0)
FAIL_STACK_ERROR
/* Add some extra records to middle leaf */
record.key = ((INSERT_SPLIT_ROOT_NREC_REC * 41) - (INSERT_SPLIT_ROOT_NREC_REC * 9)) + 2;
record.val = record.key * 2;
- if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0)
FAIL_STACK_ERROR
record.key = ((INSERT_SPLIT_ROOT_NREC_REC * 41) - (INSERT_SPLIT_ROOT_NREC_REC * 9)) + 3;
record.val = record.key * 2;
- if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0)
FAIL_STACK_ERROR
/* Add some extra records to left-most leaf */
record.key = 0;
record.val = record.key * 2;
- if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0)
FAIL_STACK_ERROR
record.key = 1;
record.val = record.key * 2;
- if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Iterate over B-tree to check records have been inserted correctly */
idx.key = 0;
idx.val = 0;
- if(H5B2_iterate(bt2, dxpl, iter_rec_cb, &idx) < 0)
+ if(H5B2_iterate(bt2, iter_rec_cb, &idx) < 0)
FAIL_STACK_ERROR
/* Make certain that the index is correct */
@@ -4857,7 +4835,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam,
/* (Should not be found, but not fail) */
find.key = INSERT_SPLIT_ROOT_NREC_REC * 42;
find.val = (hsize_t)-1;
- if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != FALSE)
+ if(H5B2_find(bt2, &find, find_rec_cb, &find) != FALSE)
TEST_ERROR
if(find.val != (hsize_t)-1)
TEST_ERROR
@@ -4865,45 +4843,45 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam,
/* Attempt to find existant record in root of level-2 B-tree */
find.key = 1345;
find.val = (hsize_t)-1;
- if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE)
+ if(H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE)
FAIL_STACK_ERROR
if(find.val != (1345 * 2))
TEST_ERROR
/* Check with B-tree */
record.key = 1345;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)2) < 0)
TEST_ERROR
/* Attempt to find existant record in internal node of level-2 B-tree */
find.key = 513;
find.val = (hsize_t)-1;
- if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE)
+ if(H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE)
FAIL_STACK_ERROR
if(find.val != (513 * 2))
TEST_ERROR
/* Check with B-tree */
record.key = 513;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
/* Attempt to find existant record in leaf of level-2 B-tree */
find.key = 555;
find.val = (hsize_t)-1;
- if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE)
+ if(H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE)
FAIL_STACK_ERROR
if(find.val != (555 * 2))
TEST_ERROR
/* Check with B-tree */
record.key = 555;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)0) < 0)
TEST_ERROR
/* Attempt to index non-existant record in level-2 B-tree */
H5E_BEGIN_TRY {
- ret = H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)(INSERT_SPLIT_ROOT_NREC_REC * 42), index_rec_cb, NULL);
+ ret = H5B2_index(bt2, H5_ITER_INC, (hsize_t)(INSERT_SPLIT_ROOT_NREC_REC * 42), index_rec_cb, NULL);
} H5E_END_TRY;
/* Should fail */
if(ret != FAIL)
@@ -4912,7 +4890,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam,
/* Attempt to index existing record in level-2 B-tree */
find.key = (hsize_t)-1;
find.val = (hsize_t)-1;
- if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)1345, index_rec_cb, &find) < 0)
+ if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)1345, index_rec_cb, &find) < 0)
FAIL_STACK_ERROR
if(find.key != 1345)
TEST_ERROR
@@ -4922,7 +4900,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam,
/* Attempt to index existing record in internal node of level-2 B-tree */
find.key = (hsize_t)-1;
find.val = (hsize_t)-1;
- if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)513, index_rec_cb, &find) < 0)
+ if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)513, index_rec_cb, &find) < 0)
FAIL_STACK_ERROR
if(find.key != 513)
TEST_ERROR
@@ -4932,7 +4910,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam,
/* Attempt to index existing record in leaf of level-2 B-tree */
find.key = (hsize_t)-1;
find.val = (hsize_t)-1;
- if(H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)555, index_rec_cb, &find) < 0)
+ if(H5B2_index(bt2, H5_ITER_INC, (hsize_t)555, index_rec_cb, &find) < 0)
FAIL_STACK_ERROR
if(find.key != 555)
TEST_ERROR
@@ -4940,7 +4918,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Close the v2 B-tree */
- if(H5B2_close(bt2, dxpl) < 0)
+ if(H5B2_close(bt2) < 0)
FAIL_STACK_ERROR
bt2 = NULL;
@@ -4955,7 +4933,7 @@ test_update_make_level2(hid_t fapl, const H5B2_create_t *cparam,
error:
H5E_BEGIN_TRY {
if(bt2)
- H5B2_close(bt2, dxpl);
+ H5B2_close(bt2);
H5Fclose(file);
} H5E_END_TRY;
return 1;
@@ -4982,7 +4960,6 @@ test_update_lots(hid_t fapl, const H5B2_create_t *cparam,
{
hid_t file = -1; /* File ID */
H5F_t *f = NULL; /* Internal file object pointer */
- hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
haddr_t bt2_addr; /* Address of B-tree created */
time_t curr_time; /* Current time, for seeding random number generator */
@@ -5035,13 +5012,13 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
TEST_ERROR
/* Create the v2 B-tree & get its address */
- if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ if(create_btree(f, cparam, &bt2, &bt2_addr) < 0)
TEST_ERROR
/* Insert random records */
for(u = 0; u < INSERT_MANY_REC; u++) {
record = records[u];
- if(H5B2_update(bt2, dxpl, &record, no_modify_cb, NULL) < 0)
+ if(H5B2_update(bt2, &record, no_modify_cb, NULL) < 0)
FAIL_STACK_ERROR
} /* end for */
@@ -5052,7 +5029,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
TEST_ERROR
/* Close the v2 B-tree */
- if(H5B2_close(bt2, dxpl) < 0)
+ if(H5B2_close(bt2) < 0)
FAIL_STACK_ERROR
bt2 = NULL;
@@ -5066,7 +5043,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
TEST_ERROR
/* Re-open v2 B-tree */
- if(NULL == (bt2 = H5B2_open(f, dxpl, bt2_addr, f)))
+ if(NULL == (bt2 = H5B2_open(f, bt2_addr, f)))
FAIL_STACK_ERROR
/* Check up on B-tree after re-open */
@@ -5078,7 +5055,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
/* Iterate over B-tree to check records have been inserted correctly */
iter.key = 0;
iter.val = 0;
- if(H5B2_iterate(bt2, dxpl, iter_rec_cb, &iter) < 0)
+ if(H5B2_iterate(bt2, iter_rec_cb, &iter) < 0)
FAIL_STACK_ERROR
/* Make certain that the index is correct */
@@ -5089,7 +5066,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
/* (Should not be found, but not fail) */
find.key = INSERT_MANY_REC * 2;
find.val = (hsize_t)-1;
- if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != FALSE)
+ if(H5B2_find(bt2, &find, find_rec_cb, &find) != FALSE)
TEST_ERROR
if(find.val != (hsize_t)-1)
TEST_ERROR
@@ -5101,7 +5078,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
find.val = (hsize_t)-1;
/* Attempt to find existant record in level-4 B-tree */
- if(H5B2_find(bt2, dxpl, &find, find_rec_cb, &find) != TRUE)
+ if(H5B2_find(bt2, &find, find_rec_cb, &find) != TRUE)
FAIL_STACK_ERROR
if(find.val != (find.key * 2))
TEST_ERROR
@@ -5109,13 +5086,13 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
/* Attempt to index non-existant record in level-4 B-tree, in increasing & decreasing order */
H5E_BEGIN_TRY {
- ret = H5B2_index(bt2, dxpl, H5_ITER_INC, (hsize_t)(INSERT_MANY_REC * 3), find_rec_cb, NULL);
+ ret = H5B2_index(bt2, H5_ITER_INC, (hsize_t)(INSERT_MANY_REC * 3), find_rec_cb, NULL);
} H5E_END_TRY;
/* Should fail */
if(ret != FAIL)
TEST_ERROR
H5E_BEGIN_TRY {
- ret = H5B2_index(bt2, dxpl, H5_ITER_DEC, (hsize_t)(INSERT_MANY_REC * 3), find_rec_cb, NULL);
+ ret = H5B2_index(bt2, H5_ITER_DEC, (hsize_t)(INSERT_MANY_REC * 3), find_rec_cb, NULL);
} H5E_END_TRY;
/* Should fail */
if(ret != FAIL)
@@ -5134,7 +5111,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
/* Attempt to find existant record in level-4 B-tree */
/* (in increasing order) */
- if(H5B2_index(bt2, dxpl, H5_ITER_INC, idx, index_rec_cb, &find) < 0)
+ if(H5B2_index(bt2, H5_ITER_INC, idx, index_rec_cb, &find) < 0)
FAIL_STACK_ERROR
if(find.key != idx)
TEST_ERROR
@@ -5147,7 +5124,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
/* Attempt to find existant record in level-4 B-tree */
/* (in decreasing order) */
- if(H5B2_index(bt2, dxpl, H5_ITER_DEC, idx, index_rec_cb, &find) < 0)
+ if(H5B2_index(bt2, H5_ITER_DEC, idx, index_rec_cb, &find) < 0)
FAIL_STACK_ERROR
if(find.key != (INSERT_MANY_REC - (idx + 1)))
TEST_ERROR
@@ -5160,13 +5137,13 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
TESTING("B-tree update: update record in level 4 B-tree");
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
record.key = INSERT_MANY_REC / 2;
modify.key = INSERT_MANY_REC / 2;
modify.val = record.key * 3;
- if(H5B2_update(bt2, dxpl, &record, modify_rec_cb, &modify) < 0)
+ if(H5B2_update(bt2, &record, modify_rec_cb, &modify) < 0)
FAIL_STACK_ERROR
/* Query the number of records in the B-tree */
@@ -5178,7 +5155,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
TEST_ERROR
/* Close the v2 B-tree */
- if(H5B2_close(bt2, dxpl) < 0)
+ if(H5B2_close(bt2) < 0)
FAIL_STACK_ERROR
bt2 = NULL;
@@ -5196,7 +5173,7 @@ error:
HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
H5E_BEGIN_TRY {
if(bt2)
- H5B2_close(bt2, dxpl);
+ H5B2_close(bt2);
H5Fclose(file);
} H5E_END_TRY;
HDfree(records);
@@ -5224,7 +5201,6 @@ test_remove_basic(hid_t fapl, const H5B2_create_t *cparam,
{
hid_t file = -1; /* File ID */
H5F_t *f = NULL; /* Internal file object pointer */
- hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
haddr_t bt2_addr; /* Address of B-tree created */
hsize_t record; /* Record to insert into tree */
@@ -5241,7 +5217,7 @@ test_remove_basic(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Create the v2 B-tree & get its address */
- if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ if(create_btree(f, cparam, &bt2, &bt2_addr) < 0)
TEST_ERROR
/* Query the number of records in the B-tree */
@@ -5255,7 +5231,7 @@ test_remove_basic(hid_t fapl, const H5B2_create_t *cparam,
/* Attempt to remove a record from a B-tree with no records */
record = 0;
H5E_BEGIN_TRY {
- ret = H5B2_remove(bt2, dxpl, &record, NULL, NULL);
+ ret = H5B2_remove(bt2, &record, NULL, NULL);
} H5E_END_TRY;
/* Should fail */
if(ret != FAIL)
@@ -5266,12 +5242,12 @@ test_remove_basic(hid_t fapl, const H5B2_create_t *cparam,
TESTING("B-tree remove: non-existant record from 1 record B-tree");
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Insert one record into B-tree */
record = 42;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
/* Query the number of records in the B-tree */
@@ -5293,7 +5269,7 @@ test_remove_basic(hid_t fapl, const H5B2_create_t *cparam,
/* Attempt to remove a non-existant record from a B-tree with 1 record */
record = 0;
H5E_BEGIN_TRY {
- ret = H5B2_remove(bt2, dxpl, &record, NULL, NULL);
+ ret = H5B2_remove(bt2, &record, NULL, NULL);
} H5E_END_TRY;
/* Should fail */
if(ret != FAIL)
@@ -5305,12 +5281,12 @@ test_remove_basic(hid_t fapl, const H5B2_create_t *cparam,
TESTING("B-tree remove: existant record from 1 record B-tree");
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
record = 42;
rrecord = 0;
- if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0)
+ if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0)
FAIL_STACK_ERROR
/* Make certain that the record value is correct */
@@ -5339,21 +5315,21 @@ test_remove_basic(hid_t fapl, const H5B2_create_t *cparam,
TESTING("B-tree remove: adding records to B-tree after removal");
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Insert several records into B-tree again */
record = 42;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
record = 34;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
record = 56;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
record = 38;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
/* Query the number of records in the B-tree */
@@ -5370,12 +5346,12 @@ test_remove_basic(hid_t fapl, const H5B2_create_t *cparam,
TESTING("B-tree remove: non-existant record from level-0 B-tree");
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
record = 0;
H5E_BEGIN_TRY {
- ret = H5B2_remove(bt2, dxpl, &record, NULL, NULL);
+ ret = H5B2_remove(bt2, &record, NULL, NULL);
} H5E_END_TRY;
/* Should fail */
if(ret != FAIL)
@@ -5387,12 +5363,12 @@ test_remove_basic(hid_t fapl, const H5B2_create_t *cparam,
TESTING("B-tree remove: mult. existant records from level-0 B-tree");
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
record = 42;
rrecord = 0;
- if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0)
+ if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0)
FAIL_STACK_ERROR
/* Make certain that the record value is correct */
@@ -5417,7 +5393,7 @@ test_remove_basic(hid_t fapl, const H5B2_create_t *cparam,
record = 34;
rrecord = 0;
- if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0)
+ if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0)
FAIL_STACK_ERROR
/* Make certain that the record value is correct */
@@ -5442,7 +5418,7 @@ test_remove_basic(hid_t fapl, const H5B2_create_t *cparam,
record = 56;
rrecord = 0;
- if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0)
+ if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0)
FAIL_STACK_ERROR
/* Make certain that the record value is correct */
@@ -5467,7 +5443,7 @@ test_remove_basic(hid_t fapl, const H5B2_create_t *cparam,
record = 38;
rrecord = 0;
- if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0)
+ if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0)
FAIL_STACK_ERROR
/* Make certain that the record value is correct */
@@ -5491,7 +5467,7 @@ test_remove_basic(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Close the v2 B-tree */
- if(H5B2_close(bt2, dxpl) < 0)
+ if(H5B2_close(bt2) < 0)
FAIL_STACK_ERROR
bt2 = NULL;
@@ -5506,7 +5482,7 @@ test_remove_basic(hid_t fapl, const H5B2_create_t *cparam,
error:
H5E_BEGIN_TRY {
if(bt2)
- H5B2_close(bt2, dxpl);
+ H5B2_close(bt2);
H5Fclose(file);
} H5E_END_TRY;
return 1;
@@ -5532,7 +5508,6 @@ test_remove_level1_noredistrib(hid_t fapl, const H5B2_create_t *cparam,
{
hid_t file = -1; /* File ID */
H5F_t *f = NULL; /* Internal file object pointer */
- hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
haddr_t bt2_addr; /* Address of B-tree created */
hsize_t record; /* Record to insert into tree */
@@ -5550,13 +5525,13 @@ test_remove_level1_noredistrib(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Create the v2 B-tree & get its address */
- if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ if(create_btree(f, cparam, &bt2, &bt2_addr) < 0)
TEST_ERROR
/* Create level-1 B-tree with 3 leaves */
for(u = 0; u < (INSERT_SPLIT_ROOT_NREC * 2); u++) {
record = u;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
} /* end for */
@@ -5579,7 +5554,7 @@ test_remove_level1_noredistrib(hid_t fapl, const H5B2_create_t *cparam,
/* Attempt to remove a non-existant record from a B-tree with 1 record */
record = (INSERT_SPLIT_ROOT_NREC * 2) + 1;
H5E_BEGIN_TRY {
- ret = H5B2_remove(bt2, dxpl, &record, NULL, NULL);
+ ret = H5B2_remove(bt2, &record, NULL, NULL);
} H5E_END_TRY;
/* Should fail */
if(ret != FAIL)
@@ -5599,22 +5574,22 @@ test_remove_level1_noredistrib(hid_t fapl, const H5B2_create_t *cparam,
TESTING("B-tree remove: record from right leaf of level-1 B-tree");
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Check up on B-tree */
record = 62; /* Left record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
record = 94; /* Right record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
record = (INSERT_SPLIT_ROOT_NREC * 2) - 2;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)0) < 0)
TEST_ERROR
rrecord = 0;
- if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0)
+ if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0)
FAIL_STACK_ERROR
/* Make certain that the record value is correct */
@@ -5623,10 +5598,10 @@ test_remove_level1_noredistrib(hid_t fapl, const H5B2_create_t *cparam,
/* Make certain that the leaf nodes didn't redistribute */
record = 62; /* Left record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
record = 94; /* Right record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
/* Query the number of records in the B-tree */
@@ -5643,16 +5618,16 @@ test_remove_level1_noredistrib(hid_t fapl, const H5B2_create_t *cparam,
TESTING("B-tree remove: record from left leaf of level-1 B-tree");
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Check up on B-tree */
record = 0;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)0) < 0)
TEST_ERROR
rrecord = 1;
- if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0)
+ if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0)
FAIL_STACK_ERROR
/* Make certain that the record value is correct */
@@ -5661,10 +5636,10 @@ test_remove_level1_noredistrib(hid_t fapl, const H5B2_create_t *cparam,
/* Make certain that the leaf nodes didn't redistribute */
record = 62; /* Left record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
record = 94; /* Right record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
/* Query the number of records in the B-tree */
@@ -5681,16 +5656,16 @@ test_remove_level1_noredistrib(hid_t fapl, const H5B2_create_t *cparam,
TESTING("B-tree remove: record from middle leaf of level-1 B-tree");
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Check up on B-tree */
record = INSERT_SPLIT_ROOT_NREC;
- if(check_node_depth(bt2, dxpl, &record, (unsigned)0) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)0) < 0)
TEST_ERROR
rrecord = 0;
- if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0)
+ if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0)
FAIL_STACK_ERROR
/* Make certain that the record value is correct */
@@ -5699,10 +5674,10 @@ test_remove_level1_noredistrib(hid_t fapl, const H5B2_create_t *cparam,
/* Make certain that the leaf nodes didn't redistribute */
record = 62; /* Left record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
record = 94; /* Right record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
/* Query the number of records in the B-tree */
@@ -5714,7 +5689,7 @@ test_remove_level1_noredistrib(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Close the v2 B-tree */
- if(H5B2_close(bt2, dxpl) < 0)
+ if(H5B2_close(bt2) < 0)
FAIL_STACK_ERROR
bt2 = NULL;
@@ -5729,7 +5704,7 @@ test_remove_level1_noredistrib(hid_t fapl, const H5B2_create_t *cparam,
error:
H5E_BEGIN_TRY {
if(bt2)
- H5B2_close(bt2, dxpl);
+ H5B2_close(bt2);
H5Fclose(file);
} H5E_END_TRY;
return 1;
@@ -5755,7 +5730,6 @@ test_remove_level1_redistrib(hid_t fapl, const H5B2_create_t *cparam,
{
hid_t file = -1; /* File ID */
H5F_t *f = NULL; /* Internal file object pointer */
- hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
haddr_t bt2_addr; /* Address of B-tree created */
hsize_t record; /* Record to insert into tree */
@@ -5772,22 +5746,22 @@ test_remove_level1_redistrib(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Create the v2 B-tree & get its address */
- if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ if(create_btree(f, cparam, &bt2, &bt2_addr) < 0)
TEST_ERROR
/* Create level-1 B-tree with 3 leaves */
for(u = 0; u < (INSERT_SPLIT_ROOT_NREC * 2); u++) {
record = u;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
} /* end for */
/* Check record values in root of B-tree */
record = 62; /* Left record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
record = 94; /* Right record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
/* Query the number of records in the B-tree */
@@ -5807,14 +5781,14 @@ test_remove_level1_redistrib(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Attempt to remove enough records from right leaf of a level-1 B-tree to force redistribution */
for(u = 0; u < 8; u++) {
record = (INSERT_SPLIT_ROOT_NREC * 2) - (u + 1);
rrecord = HSIZET_MAX;
- if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0)
+ if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0)
FAIL_STACK_ERROR
/* Make certain that the record value is correct */
@@ -5832,10 +5806,10 @@ test_remove_level1_redistrib(hid_t fapl, const H5B2_create_t *cparam,
/* Check record values in root of B-tree */
record = 62; /* Left record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
record = 90; /* Right record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
PASSED();
@@ -5844,13 +5818,13 @@ test_remove_level1_redistrib(hid_t fapl, const H5B2_create_t *cparam,
TESTING("B-tree remove: redistribute 2 leaves in level-1 B-tree (l->r)");
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
for(u = 0; u < 39; u++) {
record = u;
rrecord = HSIZET_MAX;
- if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0)
+ if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0)
FAIL_STACK_ERROR
/* Make certain that the record value is correct */
@@ -5868,10 +5842,10 @@ test_remove_level1_redistrib(hid_t fapl, const H5B2_create_t *cparam,
/* Check record values in root of B-tree */
record = 64; /* Left record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
record = 90; /* Right record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
PASSED();
@@ -5880,13 +5854,13 @@ test_remove_level1_redistrib(hid_t fapl, const H5B2_create_t *cparam,
TESTING("B-tree remove: redistribute 3 leaves in level-1 B-tree");
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
for(u = 0; u < 2; u++) {
record = INSERT_SPLIT_ROOT_NREC + 2 + u;
rrecord = HSIZET_MAX;
- if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0)
+ if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0)
FAIL_STACK_ERROR
/* Make certain that the record value is correct */
@@ -5904,14 +5878,14 @@ test_remove_level1_redistrib(hid_t fapl, const H5B2_create_t *cparam,
/* Check record values in root of B-tree */
record = 64; /* Left record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
record = 91; /* Right record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
/* Close the v2 B-tree */
- if(H5B2_close(bt2, dxpl) < 0)
+ if(H5B2_close(bt2) < 0)
FAIL_STACK_ERROR
bt2 = NULL;
@@ -5926,7 +5900,7 @@ test_remove_level1_redistrib(hid_t fapl, const H5B2_create_t *cparam,
error:
H5E_BEGIN_TRY {
if(bt2)
- H5B2_close(bt2, dxpl);
+ H5B2_close(bt2);
H5Fclose(file);
} H5E_END_TRY;
return 1;
@@ -5952,7 +5926,6 @@ test_remove_level1_2leaf_merge(hid_t fapl, const H5B2_create_t *cparam,
{
hid_t file = -1; /* File ID */
H5F_t *f = NULL; /* Internal file object pointer */
- hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
haddr_t bt2_addr; /* Address of B-tree created */
hsize_t record; /* Record to insert into tree */
@@ -5969,24 +5942,24 @@ test_remove_level1_2leaf_merge(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Create the v2 B-tree & get its address */
- if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ if(create_btree(f, cparam, &bt2, &bt2_addr) < 0)
TEST_ERROR
/* Create level-1 B-tree with 3 leaves */
for(u = 0; u < (INSERT_SPLIT_ROOT_NREC * 2); u++) {
record = u;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
} /* end for */
/* Check record values in root of B-tree */
record = 62; /* Left record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
ninfo.depth = 1;
ninfo.nrec = 2;
record = 94; /* Right record in root node */
- if(check_node_info(bt2, dxpl, record, &ninfo) < 0)
+ if(check_node_info(bt2, record, &ninfo) < 0)
TEST_ERROR
/* Query the number of records in the B-tree */
@@ -6006,14 +5979,14 @@ test_remove_level1_2leaf_merge(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Attempt to remove enough records from right leaf of a level-1 B-tree to force redistribution */
for(u = 0; u < (INSERT_SPLIT_ROOT_NREC / 4); u++) {
record = (INSERT_SPLIT_ROOT_NREC * 2) - (u + 1);
rrecord = HSIZET_MAX;
- if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0)
+ if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0)
FAIL_STACK_ERROR
/* Make certain that the record value is correct */
@@ -6033,7 +6006,7 @@ test_remove_level1_2leaf_merge(hid_t fapl, const H5B2_create_t *cparam,
ninfo.depth = 1;
ninfo.nrec = 1;
record = 62; /* Left record in root node */
- if(check_node_info(bt2, dxpl, record, &ninfo) < 0)
+ if(check_node_info(bt2, record, &ninfo) < 0)
TEST_ERROR
PASSED();
@@ -6042,31 +6015,31 @@ test_remove_level1_2leaf_merge(hid_t fapl, const H5B2_create_t *cparam,
TESTING("B-tree remove: merge 2 leaves to 1 in level-1 B-tree (l->r)");
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Fill B-tree back up */
for(u = 0; u < (INSERT_SPLIT_ROOT_NREC / 4); u++) {
record = (INSERT_SPLIT_ROOT_NREC * 2) - (u + 1);
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
} /* end for */
/* Check record values in root of B-tree */
record = 62; /* Left record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
ninfo.depth = 1;
ninfo.nrec = 2;
record = 94; /* Right record in root node */
- if(check_node_info(bt2, dxpl, record, &ninfo) < 0)
+ if(check_node_info(bt2, record, &ninfo) < 0)
TEST_ERROR
/* Remove records */
for(u = 0; u < ((3 * INSERT_SPLIT_ROOT_NREC) / 4) - 1; u++) {
record = u;
rrecord = HSIZET_MAX;
- if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0)
+ if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0)
FAIL_STACK_ERROR
/* Make certain that the record value is correct */
@@ -6086,11 +6059,11 @@ test_remove_level1_2leaf_merge(hid_t fapl, const H5B2_create_t *cparam,
ninfo.depth = 1;
ninfo.nrec = 1;
record = 94; /* Left record in root node */
- if(check_node_info(bt2, dxpl, record, &ninfo) < 0)
+ if(check_node_info(bt2, record, &ninfo) < 0)
TEST_ERROR
/* Close the v2 B-tree */
- if(H5B2_close(bt2, dxpl) < 0)
+ if(H5B2_close(bt2) < 0)
FAIL_STACK_ERROR
bt2 = NULL;
@@ -6105,7 +6078,7 @@ test_remove_level1_2leaf_merge(hid_t fapl, const H5B2_create_t *cparam,
error:
H5E_BEGIN_TRY {
if(bt2)
- H5B2_close(bt2, dxpl);
+ H5B2_close(bt2);
H5Fclose(file);
} H5E_END_TRY;
return 1;
@@ -6131,7 +6104,6 @@ test_remove_level1_3leaf_merge(hid_t fapl, const H5B2_create_t *cparam,
{
hid_t file = -1; /* File ID */
H5F_t *f = NULL; /* Internal file object pointer */
- hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
haddr_t bt2_addr; /* Address of B-tree created */
hsize_t record; /* Record to insert into tree */
@@ -6148,24 +6120,24 @@ test_remove_level1_3leaf_merge(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Create the v2 B-tree & get its address */
- if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ if(create_btree(f, cparam, &bt2, &bt2_addr) < 0)
TEST_ERROR
/* Create level-1 B-tree with 3 leaves */
for(u = 0; u < (INSERT_SPLIT_ROOT_NREC * 2); u++) {
record = u;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
} /* end for */
/* Check record values in root of B-tree */
record = 62; /* Left record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
ninfo.depth = 1;
ninfo.nrec = 2;
record = 94; /* Right record in root node */
- if(check_node_info(bt2, dxpl, record, &ninfo) < 0)
+ if(check_node_info(bt2, record, &ninfo) < 0)
TEST_ERROR
/* Query the number of records in the B-tree */
@@ -6185,14 +6157,14 @@ test_remove_level1_3leaf_merge(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Attempt to remove enough records from middle leaf of a level-1 B-tree to force merge */
for(u = 0; u < ((5 * INSERT_SPLIT_ROOT_NREC) / 6) - 1; u++) {
record = ((3 * INSERT_SPLIT_ROOT_NREC) / 2) - (u + 1);
rrecord = HSIZET_MAX;
- if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0)
+ if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0)
FAIL_STACK_ERROR
/* Make certain that the record value is correct */
@@ -6212,11 +6184,11 @@ test_remove_level1_3leaf_merge(hid_t fapl, const H5B2_create_t *cparam,
ninfo.depth = 1;
ninfo.nrec = 1;
record = 37; /* Only record in root node */
- if(check_node_info(bt2, dxpl, record, &ninfo) < 0)
+ if(check_node_info(bt2, record, &ninfo) < 0)
TEST_ERROR
/* Close the v2 B-tree */
- if(H5B2_close(bt2, dxpl) < 0)
+ if(H5B2_close(bt2) < 0)
FAIL_STACK_ERROR
bt2 = NULL;
@@ -6231,7 +6203,7 @@ test_remove_level1_3leaf_merge(hid_t fapl, const H5B2_create_t *cparam,
error:
H5E_BEGIN_TRY {
if(bt2)
- H5B2_close(bt2, dxpl);
+ H5B2_close(bt2);
H5Fclose(file);
} H5E_END_TRY;
return 1;
@@ -6257,7 +6229,6 @@ test_remove_level1_promote(hid_t fapl, const H5B2_create_t *cparam,
{
hid_t file = -1; /* File ID */
H5F_t *f = NULL; /* Internal file object pointer */
- hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
haddr_t bt2_addr; /* Address of B-tree created */
hsize_t record; /* Record to insert into tree */
@@ -6274,30 +6245,30 @@ test_remove_level1_promote(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Create the v2 B-tree & get its address */
- if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ if(create_btree(f, cparam, &bt2, &bt2_addr) < 0)
TEST_ERROR
/* Create level-1 B-tree with 5 leaves */
for(u = 0; u < (INSERT_SPLIT_ROOT_NREC * 4); u++) {
record = u;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
} /* end for */
/* Check record values in root of B-tree */
record = 62; /* Left-most record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
record = 125; /* Center-Left record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
record = 188; /* Center-Right record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
ninfo.depth = 1;
ninfo.nrec = 4;
record = 220; /* Right-most record in root node */
- if(check_node_info(bt2, dxpl, record, &ninfo) < 0)
+ if(check_node_info(bt2, record, &ninfo) < 0)
TEST_ERROR
/* Query the number of records in the B-tree */
@@ -6317,13 +6288,13 @@ test_remove_level1_promote(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Attempt to remove record from root node of a level-1 B-tree to force promotion from right leaf */
record = 220;
rrecord = HSIZET_MAX;
- if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0)
+ if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0)
FAIL_STACK_ERROR
/* Make certain that the record value is correct */
@@ -6332,18 +6303,18 @@ test_remove_level1_promote(hid_t fapl, const H5B2_create_t *cparam,
/* Check record values in root of B-tree */
record = 62; /* Left-most record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
record = 125; /* Center-Left record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
record = 188; /* Center-Right record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
ninfo.depth = 1;
ninfo.nrec = 4;
record = 221; /* Right-most record in root node */
- if(check_node_info(bt2, dxpl, record, &ninfo) < 0)
+ if(check_node_info(bt2, record, &ninfo) < 0)
TEST_ERROR
/* Query the number of records in the B-tree */
@@ -6364,12 +6335,12 @@ test_remove_level1_promote(hid_t fapl, const H5B2_create_t *cparam,
TESTING("B-tree remove: promote from left leaf of level-1 B-tree");
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
record = 62;
rrecord = HSIZET_MAX;
- if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0)
+ if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0)
FAIL_STACK_ERROR
/* Make certain that the record value is correct */
@@ -6378,18 +6349,18 @@ test_remove_level1_promote(hid_t fapl, const H5B2_create_t *cparam,
/* Check record values in root of B-tree */
record = 63; /* Left-most record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
record = 125; /* Center-Left record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
record = 188; /* Center-Right record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
ninfo.depth = 1;
ninfo.nrec = 4;
record = 221; /* Right-most record in root node */
- if(check_node_info(bt2, dxpl, record, &ninfo) < 0)
+ if(check_node_info(bt2, record, &ninfo) < 0)
TEST_ERROR
/* Query the number of records in the B-tree */
@@ -6406,12 +6377,12 @@ test_remove_level1_promote(hid_t fapl, const H5B2_create_t *cparam,
TESTING("B-tree remove: promote from middle leaf of level-1 B-tree");
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
record = 125;
rrecord = HSIZET_MAX;
- if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0)
+ if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0)
FAIL_STACK_ERROR
/* Make certain that the record value is correct */
@@ -6420,18 +6391,18 @@ test_remove_level1_promote(hid_t fapl, const H5B2_create_t *cparam,
/* Check record values in root of B-tree */
record = 63; /* Left-most record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
record = 126; /* Center-Left record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
record = 188; /* Center-Right record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
ninfo.depth = 1;
ninfo.nrec = 4;
record = 221; /* Right-most record in root node */
- if(check_node_info(bt2, dxpl, record, &ninfo) < 0)
+ if(check_node_info(bt2, record, &ninfo) < 0)
TEST_ERROR
/* Query the number of records in the B-tree */
@@ -6443,7 +6414,7 @@ test_remove_level1_promote(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Close the v2 B-tree */
- if(H5B2_close(bt2, dxpl) < 0)
+ if(H5B2_close(bt2) < 0)
FAIL_STACK_ERROR
bt2 = NULL;
@@ -6458,7 +6429,7 @@ test_remove_level1_promote(hid_t fapl, const H5B2_create_t *cparam,
error:
H5E_BEGIN_TRY {
if(bt2)
- H5B2_close(bt2, dxpl);
+ H5B2_close(bt2);
H5Fclose(file);
} H5E_END_TRY;
return 1;
@@ -6484,7 +6455,6 @@ test_remove_level1_promote_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cpar
{
hid_t file = -1; /* File ID */
H5F_t *f = NULL; /* Internal file object pointer */
- hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
haddr_t bt2_addr; /* Address of B-tree created */
hsize_t record; /* Record to insert into tree */
@@ -6501,24 +6471,24 @@ test_remove_level1_promote_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cpar
TEST_ERROR
/* Create the v2 B-tree & get its address */
- if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ if(create_btree(f, cparam, &bt2, &bt2_addr) < 0)
TEST_ERROR
/* Create level-1 B-tree with 3 leaves */
for(u = 0; u < (INSERT_SPLIT_ROOT_NREC * 2); u++) {
record = u;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
} /* end for */
/* Check record values in root of B-tree */
record = 62; /* Left-most record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
ninfo.depth = 1;
ninfo.nrec = 2;
record = 94; /* Right record in root node */
- if(check_node_info(bt2, dxpl, record, &ninfo) < 0)
+ if(check_node_info(bt2, record, &ninfo) < 0)
TEST_ERROR
/* Query the number of records in the B-tree */
@@ -6538,7 +6508,7 @@ test_remove_level1_promote_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cpar
TEST_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Attempt to remove record from root node of a level-1 B-tree to force promotion from right leaf */
@@ -6547,7 +6517,7 @@ test_remove_level1_promote_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cpar
for(u = 0; u < 7; u++) {
record = (INSERT_SPLIT_ROOT_NREC * 2) - (u + 1);
rrecord = HSIZET_MAX;
- if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0)
+ if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0)
FAIL_STACK_ERROR
/* Make certain that the record value is correct */
@@ -6565,7 +6535,7 @@ test_remove_level1_promote_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cpar
record = 94;
rrecord = HSIZET_MAX;
- if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0)
+ if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0)
FAIL_STACK_ERROR
/* Make certain that the record value is correct */
@@ -6574,12 +6544,12 @@ test_remove_level1_promote_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cpar
/* Check record values in root of B-tree */
record = 62; /* Left-most record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
ninfo.depth = 1;
ninfo.nrec = 2;
record = 90; /* Right record in root node */
- if(check_node_info(bt2, dxpl, record, &ninfo) < 0)
+ if(check_node_info(bt2, record, &ninfo) < 0)
TEST_ERROR
/* Query the number of records in the B-tree */
@@ -6591,7 +6561,7 @@ test_remove_level1_promote_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cpar
TEST_ERROR
/* Close the v2 B-tree */
- if(H5B2_close(bt2, dxpl) < 0)
+ if(H5B2_close(bt2) < 0)
FAIL_STACK_ERROR
bt2 = NULL;
@@ -6606,7 +6576,7 @@ test_remove_level1_promote_2leaf_redistrib(hid_t fapl, const H5B2_create_t *cpar
error:
H5E_BEGIN_TRY {
if(bt2)
- H5B2_close(bt2, dxpl);
+ H5B2_close(bt2);
H5Fclose(file);
} H5E_END_TRY;
return 1;
@@ -6632,7 +6602,6 @@ test_remove_level1_promote_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cpar
{
hid_t file = -1; /* File ID */
H5F_t *f = NULL; /* Internal file object pointer */
- hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
haddr_t bt2_addr; /* Address of B-tree created */
hsize_t record; /* Record to insert into tree */
@@ -6649,24 +6618,24 @@ test_remove_level1_promote_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cpar
TEST_ERROR
/* Create the v2 B-tree & get its address */
- if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ if(create_btree(f, cparam, &bt2, &bt2_addr) < 0)
TEST_ERROR
/* Create level-1 B-tree with 3 leaves */
for(u = 0; u < (INSERT_SPLIT_ROOT_NREC * 2); u++) {
record = u;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
} /* end for */
/* Check record values in root of B-tree */
record = 62; /* Left-most record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
ninfo.depth = 1;
ninfo.nrec = 2;
record = 94; /* Right record in root node */
- if(check_node_info(bt2, dxpl, record, &ninfo) < 0)
+ if(check_node_info(bt2, record, &ninfo) < 0)
TEST_ERROR
/* Query the number of records in the B-tree */
@@ -6686,7 +6655,7 @@ test_remove_level1_promote_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cpar
TEST_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Attempt to remove record from root node of a level-1 B-tree to force promotion from middle leaf */
@@ -6695,7 +6664,7 @@ test_remove_level1_promote_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cpar
for(u = 0; u < 7; u++) {
record = 63 + u;
rrecord = HSIZET_MAX;
- if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0)
+ if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0)
FAIL_STACK_ERROR
/* Make certain that the record value is correct */
@@ -6713,7 +6682,7 @@ test_remove_level1_promote_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cpar
record = 62;
rrecord = HSIZET_MAX;
- if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0)
+ if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0)
FAIL_STACK_ERROR
/* Make certain that the record value is correct */
@@ -6722,12 +6691,12 @@ test_remove_level1_promote_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cpar
/* Check record values in root of B-tree */
record = 39; /* Left record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
ninfo.depth = 1;
ninfo.nrec = 2;
record = 86; /* Right record in root node */
- if(check_node_info(bt2, dxpl, record, &ninfo) < 0)
+ if(check_node_info(bt2, record, &ninfo) < 0)
TEST_ERROR
/* Query the number of records in the B-tree */
@@ -6739,7 +6708,7 @@ test_remove_level1_promote_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cpar
TEST_ERROR
/* Close the v2 B-tree */
- if(H5B2_close(bt2, dxpl) < 0)
+ if(H5B2_close(bt2) < 0)
FAIL_STACK_ERROR
bt2 = NULL;
@@ -6754,7 +6723,7 @@ test_remove_level1_promote_3leaf_redistrib(hid_t fapl, const H5B2_create_t *cpar
error:
H5E_BEGIN_TRY {
if(bt2)
- H5B2_close(bt2, dxpl);
+ H5B2_close(bt2);
H5Fclose(file);
} H5E_END_TRY;
return 1;
@@ -6780,7 +6749,6 @@ test_remove_level1_promote_2leaf_merge(hid_t fapl, const H5B2_create_t *cparam,
{
hid_t file = -1; /* File ID */
H5F_t *f = NULL; /* Internal file object pointer */
- hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
haddr_t bt2_addr; /* Address of B-tree created */
hsize_t record; /* Record to insert into tree */
@@ -6797,24 +6765,24 @@ test_remove_level1_promote_2leaf_merge(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Create the v2 B-tree & get its address */
- if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ if(create_btree(f, cparam, &bt2, &bt2_addr) < 0)
TEST_ERROR
/* Create level-1 B-tree with 3 leaves */
for(u = 0; u < (INSERT_SPLIT_ROOT_NREC * 2); u++) {
record = u;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
} /* end for */
/* Check record values in root of B-tree */
record = 62; /* Left-most record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
ninfo.depth = 1;
ninfo.nrec = 2;
record = 94; /* Right record in root node */
- if(check_node_info(bt2, dxpl, record, &ninfo) < 0)
+ if(check_node_info(bt2, record, &ninfo) < 0)
TEST_ERROR
/* Query the number of records in the B-tree */
@@ -6834,7 +6802,7 @@ test_remove_level1_promote_2leaf_merge(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Attempt to remove record from root node of a level-1 B-tree to force promotion from right leaf */
@@ -6843,7 +6811,7 @@ test_remove_level1_promote_2leaf_merge(hid_t fapl, const H5B2_create_t *cparam,
for(u = 0; u < 14; u++) {
record = (INSERT_SPLIT_ROOT_NREC * 2) - (u + 1);
rrecord = HSIZET_MAX;
- if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0)
+ if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0)
FAIL_STACK_ERROR
/* Make certain that the record value is correct */
@@ -6861,7 +6829,7 @@ test_remove_level1_promote_2leaf_merge(hid_t fapl, const H5B2_create_t *cparam,
record = 87;
rrecord = HSIZET_MAX;
- if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0)
+ if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0)
FAIL_STACK_ERROR
/* Make certain that the record value is correct */
@@ -6872,7 +6840,7 @@ test_remove_level1_promote_2leaf_merge(hid_t fapl, const H5B2_create_t *cparam,
ninfo.depth = 1;
ninfo.nrec = 1;
record = 62; /* Middle record in root node */
- if(check_node_info(bt2, dxpl, record, &ninfo) < 0)
+ if(check_node_info(bt2, record, &ninfo) < 0)
TEST_ERROR
/* Query the number of records in the B-tree */
@@ -6884,7 +6852,7 @@ test_remove_level1_promote_2leaf_merge(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Close the v2 B-tree */
- if(H5B2_close(bt2, dxpl) < 0)
+ if(H5B2_close(bt2) < 0)
FAIL_STACK_ERROR
bt2 = NULL;
@@ -6899,7 +6867,7 @@ test_remove_level1_promote_2leaf_merge(hid_t fapl, const H5B2_create_t *cparam,
error:
H5E_BEGIN_TRY {
if(bt2)
- H5B2_close(bt2, dxpl);
+ H5B2_close(bt2);
H5Fclose(file);
} H5E_END_TRY;
return 1;
@@ -6925,7 +6893,6 @@ test_remove_level1_promote_3leaf_merge(hid_t fapl, const H5B2_create_t *cparam,
{
hid_t file = -1; /* File ID */
H5F_t *f = NULL; /* Internal file object pointer */
- hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
haddr_t bt2_addr; /* Address of B-tree created */
hsize_t record; /* Record to insert into tree */
@@ -6942,24 +6909,24 @@ test_remove_level1_promote_3leaf_merge(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Create the v2 B-tree & get its address */
- if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ if(create_btree(f, cparam, &bt2, &bt2_addr) < 0)
TEST_ERROR
/* Create level-2 B-tree with 3 leaves */
for(u = 0; u < (INSERT_SPLIT_ROOT_NREC * 2); u++) {
record = u;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
} /* end for */
/* Check record values in root of B-tree */
record = 62; /* Left-most record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)1) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)1) < 0)
TEST_ERROR
ninfo.depth = 1;
ninfo.nrec = 2;
record = 94; /* Right record in root node */
- if(check_node_info(bt2, dxpl, record, &ninfo) < 0)
+ if(check_node_info(bt2, record, &ninfo) < 0)
TEST_ERROR
/* Query the number of records in the B-tree */
@@ -6979,7 +6946,7 @@ test_remove_level1_promote_3leaf_merge(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Attempt to remove record from root node of a level-1 B-tree to force promotion from middle leaf */
@@ -6988,7 +6955,7 @@ test_remove_level1_promote_3leaf_merge(hid_t fapl, const H5B2_create_t *cparam,
for(u = 0; u < 50; u++) {
record = ((3 * INSERT_SPLIT_ROOT_NREC) / 2) - (u + 1);
rrecord = HSIZET_MAX;
- if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0)
+ if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0)
FAIL_STACK_ERROR
/* Make certain that the record value is correct */
@@ -7006,7 +6973,7 @@ test_remove_level1_promote_3leaf_merge(hid_t fapl, const H5B2_create_t *cparam,
record = 25;
rrecord = HSIZET_MAX;
- if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0)
+ if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0)
FAIL_STACK_ERROR
/* Make certain that the record value is correct */
@@ -7017,7 +6984,7 @@ test_remove_level1_promote_3leaf_merge(hid_t fapl, const H5B2_create_t *cparam,
ninfo.depth = 1;
ninfo.nrec = 1;
record = 37; /* Right record in root node */
- if(check_node_info(bt2, dxpl, record, &ninfo) < 0)
+ if(check_node_info(bt2, record, &ninfo) < 0)
TEST_ERROR
/* Query the number of records in the B-tree */
@@ -7029,7 +6996,7 @@ test_remove_level1_promote_3leaf_merge(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Close the v2 B-tree */
- if(H5B2_close(bt2, dxpl) < 0)
+ if(H5B2_close(bt2) < 0)
FAIL_STACK_ERROR
bt2 = NULL;
@@ -7044,7 +7011,7 @@ test_remove_level1_promote_3leaf_merge(hid_t fapl, const H5B2_create_t *cparam,
error:
H5E_BEGIN_TRY {
if(bt2)
- H5B2_close(bt2, dxpl);
+ H5B2_close(bt2);
H5Fclose(file);
} H5E_END_TRY;
return 1;
@@ -7070,7 +7037,6 @@ test_remove_level1_collapse(hid_t fapl, const H5B2_create_t *cparam,
{
hid_t file = -1; /* File ID */
H5F_t *f = NULL; /* Internal file object pointer */
- hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
haddr_t bt2_addr; /* Address of B-tree created */
hsize_t record; /* Record to insert into tree */
@@ -7087,13 +7053,13 @@ test_remove_level1_collapse(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Create the v2 B-tree & get its address */
- if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ if(create_btree(f, cparam, &bt2, &bt2_addr) < 0)
TEST_ERROR
/* Create level-1 B-tree with 2 leaves */
for(u = 0; u < INSERT_SPLIT_ROOT_NREC; u++) {
record = u;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
} /* end for */
@@ -7101,7 +7067,7 @@ test_remove_level1_collapse(hid_t fapl, const H5B2_create_t *cparam,
ninfo.depth = 1;
ninfo.nrec = 1;
record = 31; /* Middle record in root node */
- if(check_node_info(bt2, dxpl, record, &ninfo) < 0)
+ if(check_node_info(bt2, record, &ninfo) < 0)
TEST_ERROR
/* Query the number of records in the B-tree */
@@ -7121,14 +7087,14 @@ test_remove_level1_collapse(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Attempt to remove records from B-tree to force a single leaf for the B-tree */
for(u = 0; u < 14; u++) {
record = INSERT_SPLIT_ROOT_NREC - (u + 1);
rrecord = HSIZET_MAX;
- if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0)
+ if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0)
FAIL_STACK_ERROR
/* Make certain that the record value is correct */
@@ -7148,7 +7114,7 @@ test_remove_level1_collapse(hid_t fapl, const H5B2_create_t *cparam,
ninfo.depth = 0;
ninfo.nrec = (uint16_t)(INSERT_SPLIT_ROOT_NREC - u);
record = 31; /* Middle record in root node */
- if(check_node_info(bt2, dxpl, record, &ninfo) < 0)
+ if(check_node_info(bt2, record, &ninfo) < 0)
TEST_ERROR
/* Query the number of records in the B-tree */
@@ -7168,7 +7134,7 @@ test_remove_level1_collapse(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Close the v2 B-tree */
- if(H5B2_close(bt2, dxpl) < 0)
+ if(H5B2_close(bt2) < 0)
FAIL_STACK_ERROR
bt2 = NULL;
@@ -7183,7 +7149,7 @@ test_remove_level1_collapse(hid_t fapl, const H5B2_create_t *cparam,
error:
H5E_BEGIN_TRY {
if(bt2)
- H5B2_close(bt2, dxpl);
+ H5B2_close(bt2);
H5Fclose(file);
} H5E_END_TRY;
return 1;
@@ -7209,7 +7175,6 @@ test_remove_level2_promote(hid_t fapl, const H5B2_create_t *cparam,
{
hid_t file = -1; /* File ID */
H5F_t *f = NULL; /* Internal file object pointer */
- hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
haddr_t bt2_addr; /* Address of B-tree created */
hsize_t record; /* Record to insert into tree */
@@ -7226,24 +7191,24 @@ test_remove_level2_promote(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Create the v2 B-tree & get its address */
- if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ if(create_btree(f, cparam, &bt2, &bt2_addr) < 0)
TEST_ERROR
/* Create level-2 B-tree with 3 internal nodes */
for(u = 0; u < ((INSERT_SPLIT_ROOT_NREC * 59) + 1); u++) {
record = u;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
} /* end for */
/* Check record values in root of B-tree */
record = 1889; /* Left record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)2) < 0)
TEST_ERROR
ninfo.depth = 2;
ninfo.nrec = 2;
record = 2834; /* Right record in root node */
- if(check_node_info(bt2, dxpl, record, &ninfo) < 0)
+ if(check_node_info(bt2, record, &ninfo) < 0)
TEST_ERROR
/* Query the number of records in the B-tree */
@@ -7263,20 +7228,20 @@ test_remove_level2_promote(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Check information about record in right internal node */
ninfo.depth = 1;
ninfo.nrec = 14;
record = 2960; /* Record in right internal node */
- if(check_node_info(bt2, dxpl, record, &ninfo) < 0)
+ if(check_node_info(bt2, record, &ninfo) < 0)
TEST_ERROR
/* Attempt to remove record from right internal node of a level-2 B-tree to force promotion */
record = 2960;
rrecord = HSIZET_MAX;
- if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0)
+ if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0)
FAIL_STACK_ERROR
/* Make certain that the record value is correct */
@@ -7287,7 +7252,7 @@ test_remove_level2_promote(hid_t fapl, const H5B2_create_t *cparam,
ninfo.depth = 1;
ninfo.nrec = 14;
record = 2961; /* Record in right internal node */
- if(check_node_info(bt2, dxpl, record, &ninfo) < 0)
+ if(check_node_info(bt2, record, &ninfo) < 0)
TEST_ERROR
/* Query the number of records in the B-tree */
@@ -7304,19 +7269,19 @@ test_remove_level2_promote(hid_t fapl, const H5B2_create_t *cparam,
TESTING("B-tree remove: promote from left internal of level-2 B-tree");
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Check information about record in left internal node */
ninfo.depth = 1;
ninfo.nrec = 29;
record = 1133; /* Record in left internal node */
- if(check_node_info(bt2, dxpl, record, &ninfo) < 0)
+ if(check_node_info(bt2, record, &ninfo) < 0)
TEST_ERROR
record = 1133;
rrecord = HSIZET_MAX;
- if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0)
+ if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0)
FAIL_STACK_ERROR
/* Make certain that the record value is correct */
@@ -7327,7 +7292,7 @@ test_remove_level2_promote(hid_t fapl, const H5B2_create_t *cparam,
ninfo.depth = 1;
ninfo.nrec = 29;
record = 1134; /* Record in left internal node */
- if(check_node_info(bt2, dxpl, record, &ninfo) < 0)
+ if(check_node_info(bt2, record, &ninfo) < 0)
TEST_ERROR
/* Query the number of records in the B-tree */
@@ -7344,19 +7309,19 @@ test_remove_level2_promote(hid_t fapl, const H5B2_create_t *cparam,
TESTING("B-tree remove: promote from middle internal of level-2 B-tree");
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Check information about record in middle internal node */
ninfo.depth = 1;
ninfo.nrec = 14;
record = 2267; /* Record in middle internal node */
- if(check_node_info(bt2, dxpl, record, &ninfo) < 0)
+ if(check_node_info(bt2, record, &ninfo) < 0)
TEST_ERROR
record = 2267;
rrecord = HSIZET_MAX;
- if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0)
+ if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0)
FAIL_STACK_ERROR
/* Make certain that the record value is correct */
@@ -7367,7 +7332,7 @@ test_remove_level2_promote(hid_t fapl, const H5B2_create_t *cparam,
ninfo.depth = 1;
ninfo.nrec = 14;
record = 2268; /* Record in middle internal node */
- if(check_node_info(bt2, dxpl, record, &ninfo) < 0)
+ if(check_node_info(bt2, record, &ninfo) < 0)
TEST_ERROR
/* Query the number of records in the B-tree */
@@ -7384,19 +7349,19 @@ test_remove_level2_promote(hid_t fapl, const H5B2_create_t *cparam,
TESTING("B-tree remove: promote record from root of level-2 B-tree");
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Check information about record in root node */
ninfo.depth = 2;
ninfo.nrec = 2;
record = 1889; /* Left record in root node */
- if(check_node_info(bt2, dxpl, record, &ninfo) < 0)
+ if(check_node_info(bt2, record, &ninfo) < 0)
TEST_ERROR
record = 1889;
rrecord = HSIZET_MAX;
- if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0)
+ if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0)
FAIL_STACK_ERROR
/* Make certain that the record value is correct */
@@ -7407,7 +7372,7 @@ test_remove_level2_promote(hid_t fapl, const H5B2_create_t *cparam,
ninfo.depth = 2;
ninfo.nrec = 2;
record = 1890; /* Left record in root node */
- if(check_node_info(bt2, dxpl, record, &ninfo) < 0)
+ if(check_node_info(bt2, record, &ninfo) < 0)
TEST_ERROR
/* Query the number of records in the B-tree */
@@ -7419,19 +7384,19 @@ test_remove_level2_promote(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Check information about record in root node */
ninfo.depth = 2;
ninfo.nrec = 2;
record = 2834; /* Right record in root node */
- if(check_node_info(bt2, dxpl, record, &ninfo) < 0)
+ if(check_node_info(bt2, record, &ninfo) < 0)
TEST_ERROR
record = 2834;
rrecord = HSIZET_MAX;
- if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0)
+ if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0)
FAIL_STACK_ERROR
/* Make certain that the record value is correct */
@@ -7442,7 +7407,7 @@ test_remove_level2_promote(hid_t fapl, const H5B2_create_t *cparam,
ninfo.depth = 2;
ninfo.nrec = 2;
record = 2835; /* Right record in root node */
- if(check_node_info(bt2, dxpl, record, &ninfo) < 0)
+ if(check_node_info(bt2, record, &ninfo) < 0)
TEST_ERROR
/* Query the number of records in the B-tree */
@@ -7454,7 +7419,7 @@ test_remove_level2_promote(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Close the v2 B-tree */
- if(H5B2_close(bt2, dxpl) < 0)
+ if(H5B2_close(bt2) < 0)
FAIL_STACK_ERROR
bt2 = NULL;
@@ -7469,7 +7434,7 @@ test_remove_level2_promote(hid_t fapl, const H5B2_create_t *cparam,
error:
H5E_BEGIN_TRY {
if(bt2)
- H5B2_close(bt2, dxpl);
+ H5B2_close(bt2);
H5Fclose(file);
} H5E_END_TRY;
return 1;
@@ -7495,7 +7460,6 @@ test_remove_level2_promote_2internal_redistrib(hid_t fapl, const H5B2_create_t *
{
hid_t file = -1; /* File ID */
H5F_t *f = NULL; /* Internal file object pointer */
- hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
haddr_t bt2_addr; /* Address of B-tree created */
hsize_t record; /* Record to insert into tree */
@@ -7512,24 +7476,24 @@ test_remove_level2_promote_2internal_redistrib(hid_t fapl, const H5B2_create_t *
TEST_ERROR
/* Create the v2 B-tree & get its address */
- if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ if(create_btree(f, cparam, &bt2, &bt2_addr) < 0)
TEST_ERROR
/* Create level-2 B-tree with 3 internal nodes */
for(u = 0; u < ((INSERT_SPLIT_ROOT_NREC * 59) + 1); u++) {
record = u;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
} /* end for */
/* Check record values in root of B-tree */
record = 1889; /* Left record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)2) < 0)
TEST_ERROR
ninfo.depth = 2;
ninfo.nrec = 2;
record = 2834; /* Right record in root node */
- if(check_node_info(bt2, dxpl, record, &ninfo) < 0)
+ if(check_node_info(bt2, record, &ninfo) < 0)
TEST_ERROR
/* Query the number of records in the B-tree */
@@ -7549,21 +7513,21 @@ test_remove_level2_promote_2internal_redistrib(hid_t fapl, const H5B2_create_t *
TEST_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Check status of B-tree */
ninfo.depth = 1;
ninfo.nrec = 14;
record = 3685; /* Right-most record in root node */
- if(check_node_info(bt2, dxpl, record, &ninfo) < 0)
+ if(check_node_info(bt2, record, &ninfo) < 0)
TEST_ERROR
/* Attempt to remove record from right internal node of a level-2 B-tree to force promotion w/redistribution */
for(u = 0; u < 8; u++) {
record = ((INSERT_SPLIT_ROOT_NREC * 59) + 1) - (u + 1);
rrecord = HSIZET_MAX;
- if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0)
+ if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0)
FAIL_STACK_ERROR
/* Make certain that the record value is correct */
@@ -7581,7 +7545,7 @@ test_remove_level2_promote_2internal_redistrib(hid_t fapl, const H5B2_create_t *
record = 3685;
rrecord = HSIZET_MAX;
- if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0)
+ if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0)
FAIL_STACK_ERROR
/* Make certain that the record value is correct */
@@ -7592,7 +7556,7 @@ test_remove_level2_promote_2internal_redistrib(hid_t fapl, const H5B2_create_t *
ninfo.depth = 1;
ninfo.nrec = 14;
record = 3681; /* Right-most record in root node */
- if(check_node_info(bt2, dxpl, record, &ninfo) < 0)
+ if(check_node_info(bt2, record, &ninfo) < 0)
TEST_ERROR
/* Query the number of records in the B-tree */
@@ -7604,7 +7568,7 @@ test_remove_level2_promote_2internal_redistrib(hid_t fapl, const H5B2_create_t *
TEST_ERROR
/* Close the v2 B-tree */
- if(H5B2_close(bt2, dxpl) < 0)
+ if(H5B2_close(bt2) < 0)
FAIL_STACK_ERROR
bt2 = NULL;
@@ -7619,7 +7583,7 @@ test_remove_level2_promote_2internal_redistrib(hid_t fapl, const H5B2_create_t *
error:
H5E_BEGIN_TRY {
if(bt2)
- H5B2_close(bt2, dxpl);
+ H5B2_close(bt2);
H5Fclose(file);
} H5E_END_TRY;
return 1;
@@ -7645,7 +7609,6 @@ test_remove_level2_promote_3internal_redistrib(hid_t fapl, const H5B2_create_t *
{
hid_t file = -1; /* File ID */
H5F_t *f = NULL; /* Internal file object pointer */
- hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
haddr_t bt2_addr; /* Address of B-tree created */
hsize_t record; /* Record to insert into tree */
@@ -7662,24 +7625,24 @@ test_remove_level2_promote_3internal_redistrib(hid_t fapl, const H5B2_create_t *
TEST_ERROR
/* Create the v2 B-tree & get its address */
- if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ if(create_btree(f, cparam, &bt2, &bt2_addr) < 0)
TEST_ERROR
/* Create level-2 B-tree with 3 internal nodes */
for(u = 0; u < ((INSERT_SPLIT_ROOT_NREC * 59) + 1); u++) {
record = u;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
} /* end for */
/* Check record values in root of B-tree */
record = 1889; /* Left record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)2) < 0)
TEST_ERROR
ninfo.depth = 2;
ninfo.nrec = 2;
record = 2834; /* Right record in root node */
- if(check_node_info(bt2, dxpl, record, &ninfo) < 0)
+ if(check_node_info(bt2, record, &ninfo) < 0)
TEST_ERROR
/* Query the number of records in the B-tree */
@@ -7699,21 +7662,21 @@ test_remove_level2_promote_3internal_redistrib(hid_t fapl, const H5B2_create_t *
TEST_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Check status of B-tree */
ninfo.depth = 1;
ninfo.nrec = 29;
record = 62; /* Left-most record in left node */
- if(check_node_info(bt2, dxpl, record, &ninfo) < 0)
+ if(check_node_info(bt2, record, &ninfo) < 0)
TEST_ERROR
/* Attempt to remove record from left internal node of a level-2 B-tree to force promotion w/redistribution */
for(u = 0; u < 38; u++) {
record = 63 + u;
rrecord = HSIZET_MAX;
- if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0)
+ if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0)
FAIL_STACK_ERROR
/* Make certain that the record value is correct */
@@ -7731,7 +7694,7 @@ test_remove_level2_promote_3internal_redistrib(hid_t fapl, const H5B2_create_t *
record = 62;
rrecord = HSIZET_MAX;
- if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0)
+ if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0)
FAIL_STACK_ERROR
/* Make certain that the record value is correct */
@@ -7742,7 +7705,7 @@ test_remove_level2_promote_3internal_redistrib(hid_t fapl, const H5B2_create_t *
ninfo.depth = 1;
ninfo.nrec = 29;
record = 49; /* Left-most record in left node */
- if(check_node_info(bt2, dxpl, record, &ninfo) < 0)
+ if(check_node_info(bt2, record, &ninfo) < 0)
TEST_ERROR
/* Query the number of records in the B-tree */
@@ -7754,7 +7717,7 @@ test_remove_level2_promote_3internal_redistrib(hid_t fapl, const H5B2_create_t *
TEST_ERROR
/* Close the v2 B-tree */
- if(H5B2_close(bt2, dxpl) < 0)
+ if(H5B2_close(bt2) < 0)
FAIL_STACK_ERROR
bt2 = NULL;
@@ -7769,7 +7732,7 @@ test_remove_level2_promote_3internal_redistrib(hid_t fapl, const H5B2_create_t *
error:
H5E_BEGIN_TRY {
if(bt2)
- H5B2_close(bt2, dxpl);
+ H5B2_close(bt2);
H5Fclose(file);
} H5E_END_TRY;
return 1;
@@ -7795,7 +7758,6 @@ test_remove_level2_promote_2internal_merge(hid_t fapl, const H5B2_create_t *cpar
{
hid_t file = -1; /* File ID */
H5F_t *f = NULL; /* Internal file object pointer */
- hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
haddr_t bt2_addr; /* Address of B-tree created */
hsize_t record; /* Record to insert into tree */
@@ -7812,24 +7774,24 @@ test_remove_level2_promote_2internal_merge(hid_t fapl, const H5B2_create_t *cpar
TEST_ERROR
/* Create the v2 B-tree & get its address */
- if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ if(create_btree(f, cparam, &bt2, &bt2_addr) < 0)
TEST_ERROR
/* Create level-2 B-tree with 3 internal nodes */
for(u = 0; u < ((INSERT_SPLIT_ROOT_NREC * 59) + 1); u++) {
record = u;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
} /* end for */
/* Check record values in root of B-tree */
record = 1889; /* Left record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)2) < 0)
TEST_ERROR
ninfo.depth = 2;
ninfo.nrec = 2;
record = 2834; /* Right record in root node */
- if(check_node_info(bt2, dxpl, record, &ninfo) < 0)
+ if(check_node_info(bt2, record, &ninfo) < 0)
TEST_ERROR
/* Query the number of records in the B-tree */
@@ -7849,21 +7811,21 @@ test_remove_level2_promote_2internal_merge(hid_t fapl, const H5B2_create_t *cpar
TEST_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Check information about record in right internal node */
ninfo.depth = 1;
ninfo.nrec = 14;
record = 3685; /* Right-most record in right internal node */
- if(check_node_info(bt2, dxpl, record, &ninfo) < 0)
+ if(check_node_info(bt2, record, &ninfo) < 0)
TEST_ERROR
/* Attempt to remove record from right internal node of a level-2 B-tree to force promotion w/redistribution */
for(u = 0; u < 15; u++) {
record = ((INSERT_SPLIT_ROOT_NREC * 59) + 1) - (u + 1);
rrecord = HSIZET_MAX;
- if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0)
+ if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0)
FAIL_STACK_ERROR
/* Make certain that the record value is correct */
@@ -7882,7 +7844,7 @@ test_remove_level2_promote_2internal_merge(hid_t fapl, const H5B2_create_t *cpar
/* Force merge by promoting current right-most record */
record = 3678;
rrecord = HSIZET_MAX;
- if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0)
+ if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0)
FAIL_STACK_ERROR
/* Make certain that the record value is correct */
@@ -7893,7 +7855,7 @@ test_remove_level2_promote_2internal_merge(hid_t fapl, const H5B2_create_t *cpar
ninfo.depth = 1;
ninfo.nrec = 13;
record = 3653; /* Right-most record in right internal node (now) */
- if(check_node_info(bt2, dxpl, record, &ninfo) < 0)
+ if(check_node_info(bt2, record, &ninfo) < 0)
TEST_ERROR
/* Query the number of records in the B-tree */
@@ -7905,7 +7867,7 @@ test_remove_level2_promote_2internal_merge(hid_t fapl, const H5B2_create_t *cpar
TEST_ERROR
/* Close the v2 B-tree */
- if(H5B2_close(bt2, dxpl) < 0)
+ if(H5B2_close(bt2) < 0)
FAIL_STACK_ERROR
bt2 = NULL;
@@ -7920,7 +7882,7 @@ test_remove_level2_promote_2internal_merge(hid_t fapl, const H5B2_create_t *cpar
error:
H5E_BEGIN_TRY {
if(bt2)
- H5B2_close(bt2, dxpl);
+ H5B2_close(bt2);
H5Fclose(file);
} H5E_END_TRY;
return 1;
@@ -7946,7 +7908,6 @@ test_remove_level2_promote_3internal_merge(hid_t fapl, const H5B2_create_t *cpar
{
hid_t file = -1; /* File ID */
H5F_t *f = NULL; /* Internal file object pointer */
- hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
haddr_t bt2_addr; /* Address of B-tree created */
hsize_t record; /* Record to insert into tree */
@@ -7963,24 +7924,24 @@ test_remove_level2_promote_3internal_merge(hid_t fapl, const H5B2_create_t *cpar
TEST_ERROR
/* Create the v2 B-tree & get its address */
- if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ if(create_btree(f, cparam, &bt2, &bt2_addr) < 0)
TEST_ERROR
/* Create level-2 B-tree with 3 internal nodes */
for(u = 0; u < ((INSERT_SPLIT_ROOT_NREC * 59) + 1); u++) {
record = u;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
} /* end for */
/* Check record values in root of B-tree */
record = 1889; /* Left record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)2) < 0)
TEST_ERROR
ninfo.depth = 2;
ninfo.nrec = 2;
record = 2834; /* Right record in root node */
- if(check_node_info(bt2, dxpl, record, &ninfo) < 0)
+ if(check_node_info(bt2, record, &ninfo) < 0)
TEST_ERROR
/* Query the number of records in the B-tree */
@@ -8000,21 +7961,21 @@ test_remove_level2_promote_3internal_merge(hid_t fapl, const H5B2_create_t *cpar
TEST_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Check information about record in left internal node */
ninfo.depth = 1;
ninfo.nrec = 29;
record = 62; /* Left-most record in left internal node */
- if(check_node_info(bt2, dxpl, record, &ninfo) < 0)
+ if(check_node_info(bt2, record, &ninfo) < 0)
TEST_ERROR
/* Attempt to remove record from left internal node of a level-2 B-tree to force promotion w/redistribution */
for(u = 0; u < 112; u++) {
record = 48 + u;
rrecord = HSIZET_MAX;
- if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0)
+ if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0)
FAIL_STACK_ERROR
/* Make certain that the record value is correct */
@@ -8033,7 +7994,7 @@ test_remove_level2_promote_3internal_merge(hid_t fapl, const H5B2_create_t *cpar
/* Force merge of left-most internal nodes by promotion */
record = 25;
rrecord = HSIZET_MAX;
- if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0)
+ if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0)
FAIL_STACK_ERROR
/* Make certain that the record value is correct */
@@ -8044,7 +8005,7 @@ test_remove_level2_promote_3internal_merge(hid_t fapl, const H5B2_create_t *cpar
ninfo.depth = 1;
ninfo.nrec = 28;
record = 37; /* Left-most record in left internal node (now) */
- if(check_node_info(bt2, dxpl, record, &ninfo) < 0)
+ if(check_node_info(bt2, record, &ninfo) < 0)
TEST_ERROR
/* Query the number of records in the B-tree */
@@ -8056,7 +8017,7 @@ test_remove_level2_promote_3internal_merge(hid_t fapl, const H5B2_create_t *cpar
TEST_ERROR
/* Close the v2 B-tree */
- if(H5B2_close(bt2, dxpl) < 0)
+ if(H5B2_close(bt2) < 0)
FAIL_STACK_ERROR
bt2 = NULL;
@@ -8071,7 +8032,7 @@ test_remove_level2_promote_3internal_merge(hid_t fapl, const H5B2_create_t *cpar
error:
H5E_BEGIN_TRY {
if(bt2)
- H5B2_close(bt2, dxpl);
+ H5B2_close(bt2);
H5Fclose(file);
} H5E_END_TRY;
return 1;
@@ -8097,7 +8058,6 @@ test_remove_level2_2internal_merge_left(hid_t fapl, const H5B2_create_t *cparam,
{
hid_t file = -1; /* File ID */
H5F_t *f = NULL; /* Internal file object pointer */
- hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
haddr_t bt2_addr; /* Address of B-tree created */
hsize_t record; /* Record to insert into tree */
@@ -8114,24 +8074,24 @@ test_remove_level2_2internal_merge_left(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Create the v2 B-tree & get its address */
- if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ if(create_btree(f, cparam, &bt2, &bt2_addr) < 0)
TEST_ERROR
/* Create level-2 B-tree with 3 internal nodes */
for(u = 0; u < ((INSERT_SPLIT_ROOT_NREC * 59) + 1); u++) {
record = u;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
} /* end for */
/* Check record values in root of B-tree */
record = 1889; /* Left record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)2) < 0)
TEST_ERROR
ninfo.depth = 2;
ninfo.nrec = 2;
record = 2834; /* Right record in root node */
- if(check_node_info(bt2, dxpl, record, &ninfo) < 0)
+ if(check_node_info(bt2, record, &ninfo) < 0)
TEST_ERROR
/* Query the number of records in the B-tree */
@@ -8151,14 +8111,14 @@ test_remove_level2_2internal_merge_left(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Attempt to remove records from a level-2 B-tree to force 2 internal nodes to merge */
for(u = 0; u < ((INSERT_SPLIT_ROOT_NREC * 21) + 15); u++) {
record = u;
rrecord = HSIZET_MAX;
- if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0)
+ if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0)
FAIL_STACK_ERROR
/* Make certain that the record value is correct */
@@ -8178,11 +8138,11 @@ test_remove_level2_2internal_merge_left(hid_t fapl, const H5B2_create_t *cparam,
ninfo.depth = 2;
ninfo.nrec = 1;
record = 2834; /* Middle record in root node */
- if(check_node_info(bt2, dxpl, record, &ninfo) < 0)
+ if(check_node_info(bt2, record, &ninfo) < 0)
TEST_ERROR
/* Close the v2 B-tree */
- if(H5B2_close(bt2, dxpl) < 0)
+ if(H5B2_close(bt2) < 0)
FAIL_STACK_ERROR
bt2 = NULL;
@@ -8197,7 +8157,7 @@ test_remove_level2_2internal_merge_left(hid_t fapl, const H5B2_create_t *cparam,
error:
H5E_BEGIN_TRY {
if(bt2)
- H5B2_close(bt2, dxpl);
+ H5B2_close(bt2);
H5Fclose(file);
} H5E_END_TRY;
return 1;
@@ -8223,7 +8183,6 @@ test_remove_level2_2internal_merge_right(hid_t fapl, const H5B2_create_t *cparam
{
hid_t file = -1; /* File ID */
H5F_t *f = NULL; /* Internal file object pointer */
- hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
haddr_t bt2_addr; /* Address of B-tree created */
hsize_t record; /* Record to insert into tree */
@@ -8240,24 +8199,24 @@ test_remove_level2_2internal_merge_right(hid_t fapl, const H5B2_create_t *cparam
TEST_ERROR
/* Create the v2 B-tree & get its address */
- if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ if(create_btree(f, cparam, &bt2, &bt2_addr) < 0)
TEST_ERROR
/* Create level-2 B-tree with 3 internal nodes */
for(u = 0; u < ((INSERT_SPLIT_ROOT_NREC * 59) + 1); u++) {
record = u;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
} /* end for */
/* Check record values in root of B-tree */
record = 1889; /* Left record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)2) < 0)
TEST_ERROR
ninfo.depth = 2;
ninfo.nrec = 2;
record = 2834; /* Right record in root node */
- if(check_node_info(bt2, dxpl, record, &ninfo) < 0)
+ if(check_node_info(bt2, record, &ninfo) < 0)
TEST_ERROR
/* Query the number of records in the B-tree */
@@ -8277,14 +8236,14 @@ test_remove_level2_2internal_merge_right(hid_t fapl, const H5B2_create_t *cparam
TEST_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Attempt to remove records from a level-2 B-tree to force 2 internal nodes to merge */
for(u = 0; u < ((INSERT_SPLIT_ROOT_NREC * 5) + 17); u++) {
record = ((INSERT_SPLIT_ROOT_NREC * 59) + 1) - (u + 1);
rrecord = HSIZET_MAX;
- if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0)
+ if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0)
FAIL_STACK_ERROR
/* Make certain that the record value is correct */
@@ -8304,11 +8263,11 @@ test_remove_level2_2internal_merge_right(hid_t fapl, const H5B2_create_t *cparam
ninfo.depth = 2;
ninfo.nrec = 1;
record = 1889; /* Middle record in root node */
- if(check_node_info(bt2, dxpl, record, &ninfo) < 0)
+ if(check_node_info(bt2, record, &ninfo) < 0)
TEST_ERROR
/* Close the v2 B-tree */
- if(H5B2_close(bt2, dxpl) < 0)
+ if(H5B2_close(bt2) < 0)
FAIL_STACK_ERROR
bt2 = NULL;
@@ -8323,7 +8282,7 @@ test_remove_level2_2internal_merge_right(hid_t fapl, const H5B2_create_t *cparam
error:
H5E_BEGIN_TRY {
if(bt2)
- H5B2_close(bt2, dxpl);
+ H5B2_close(bt2);
H5Fclose(file);
} H5E_END_TRY;
return 1;
@@ -8349,7 +8308,6 @@ test_remove_level2_3internal_merge(hid_t fapl, const H5B2_create_t *cparam,
{
hid_t file = -1; /* File ID */
H5F_t *f = NULL; /* Internal file object pointer */
- hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
haddr_t bt2_addr; /* Address of B-tree created */
hsize_t record; /* Record to insert into tree */
@@ -8366,24 +8324,24 @@ test_remove_level2_3internal_merge(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Create the v2 B-tree & get its address */
- if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ if(create_btree(f, cparam, &bt2, &bt2_addr) < 0)
TEST_ERROR
/* Create level-2 B-tree with 3 internal nodes */
for(u = 0; u < ((INSERT_SPLIT_ROOT_NREC * 59) + 1); u++) {
record = u;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
} /* end for */
/* Check record values in root of B-tree */
record = 1889; /* Left record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)2) < 0)
TEST_ERROR
ninfo.depth = 2;
ninfo.nrec = 2;
record = 2834; /* Right record in root node */
- if(check_node_info(bt2, dxpl, record, &ninfo) < 0)
+ if(check_node_info(bt2, record, &ninfo) < 0)
TEST_ERROR
/* Query the number of records in the B-tree */
@@ -8403,14 +8361,14 @@ test_remove_level2_3internal_merge(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Attempt to remove record from middle internal node of a level-2 B-tree to force promotion w/redistribution */
for(u = 0; u < ((INSERT_SPLIT_ROOT_NREC * 23) + 15); u++) {
record = (INSERT_SPLIT_ROOT_NREC * 20) + u;
rrecord = HSIZET_MAX;
- if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0)
+ if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0)
FAIL_STACK_ERROR
/* Make certain that the record value is correct */
@@ -8430,11 +8388,11 @@ test_remove_level2_3internal_merge(hid_t fapl, const H5B2_create_t *cparam,
ninfo.depth = 2;
ninfo.nrec = 1;
record = 1196; /* Right record in root node */
- if(check_node_info(bt2, dxpl, record, &ninfo) < 0)
+ if(check_node_info(bt2, record, &ninfo) < 0)
TEST_ERROR
/* Close the v2 B-tree */
- if(H5B2_close(bt2, dxpl) < 0)
+ if(H5B2_close(bt2) < 0)
FAIL_STACK_ERROR
bt2 = NULL;
@@ -8449,7 +8407,7 @@ test_remove_level2_3internal_merge(hid_t fapl, const H5B2_create_t *cparam,
error:
H5E_BEGIN_TRY {
if(bt2)
- H5B2_close(bt2, dxpl);
+ H5B2_close(bt2);
H5Fclose(file);
} H5E_END_TRY;
return 1;
@@ -8475,7 +8433,6 @@ test_remove_level2_collapse_right(hid_t fapl, const H5B2_create_t *cparam,
{
hid_t file = -1; /* File ID */
H5F_t *f = NULL; /* Internal file object pointer */
- hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
haddr_t bt2_addr; /* Address of B-tree created */
hsize_t record; /* Record to insert into tree */
@@ -8493,24 +8450,24 @@ test_remove_level2_collapse_right(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Create the v2 B-tree & get its address */
- if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ if(create_btree(f, cparam, &bt2, &bt2_addr) < 0)
TEST_ERROR
/* Create level-2 B-tree with 3 internal nodes */
for(u = 0; u < ((INSERT_SPLIT_ROOT_NREC * 59) + 1); u++) {
record = u;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
} /* end for */
/* Check record values in root of B-tree */
record = 1889; /* Left record in root node */
- if(check_node_depth(bt2, dxpl, &record, (unsigned)2) < 0)
+ if(check_node_depth(bt2, &record, (unsigned)2) < 0)
TEST_ERROR
ninfo.depth = 2;
ninfo.nrec = 2;
record = 2834; /* Right record in root node */
- if(check_node_info(bt2, dxpl, record, &ninfo) < 0)
+ if(check_node_info(bt2, record, &ninfo) < 0)
TEST_ERROR
/* Query the number of records in the B-tree */
@@ -8530,14 +8487,14 @@ test_remove_level2_collapse_right(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Attempt to remove records from a level-2 B-tree to force back to level-1 */
for(u = 0; u < (INSERT_SPLIT_ROOT_NREC * 34) + 17; u++) {
record = ((INSERT_SPLIT_ROOT_NREC * 59) + 1) - (u + 1);
rrecord = HSIZET_MAX;
- if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0)
+ if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0)
FAIL_STACK_ERROR
/* Make certain that the record value is correct */
@@ -8560,7 +8517,7 @@ test_remove_level2_collapse_right(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Close the v2 B-tree */
- if(H5B2_close(bt2, dxpl) < 0)
+ if(H5B2_close(bt2) < 0)
FAIL_STACK_ERROR
bt2 = NULL;
@@ -8575,7 +8532,7 @@ test_remove_level2_collapse_right(hid_t fapl, const H5B2_create_t *cparam,
error:
H5E_BEGIN_TRY {
if(bt2)
- H5B2_close(bt2, dxpl);
+ H5B2_close(bt2);
H5Fclose(file);
} H5E_END_TRY;
return 1;
@@ -8601,7 +8558,6 @@ gen_l4_btree2(const char *filename, hid_t fapl, const H5B2_create_t *cparam,
{
hid_t file = -1; /* File ID */
H5F_t *f = NULL; /* Internal file object pointer */
- hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
hsize_t record; /* Record to insert into tree */
unsigned u; /* Local index variable */
@@ -8620,13 +8576,13 @@ gen_l4_btree2(const char *filename, hid_t fapl, const H5B2_create_t *cparam,
STACK_ERROR
/* Create the v2 B-tree & get its address */
- if(create_btree(f, dxpl, cparam, &bt2, bt2_addr) < 0)
+ if(create_btree(f, cparam, &bt2, bt2_addr) < 0)
TEST_ERROR
/* Insert random records */
for(u = 0; u < INSERT_MANY; u++) {
record = records[u];
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
} /* end for */
@@ -8637,7 +8593,7 @@ gen_l4_btree2(const char *filename, hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Close the v2 B-tree */
- if(H5B2_close(bt2, dxpl) < 0)
+ if(H5B2_close(bt2) < 0)
FAIL_STACK_ERROR
bt2 = NULL;
@@ -8650,7 +8606,7 @@ gen_l4_btree2(const char *filename, hid_t fapl, const H5B2_create_t *cparam,
error:
H5E_BEGIN_TRY {
if(bt2)
- H5B2_close(bt2, dxpl);
+ H5B2_close(bt2);
H5Fclose(file);
} H5E_END_TRY;
@@ -8682,7 +8638,6 @@ test_remove_lots(const char *env_h5_drvr, hid_t fapl, const H5B2_create_t *cpara
int fd = -1; /* File descriptor */
h5_stat_t sb; /* Stat buffer for file */
void *file_data = NULL; /* Copy of file data */
- hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
haddr_t bt2_addr; /* Address of B-tree created */
hsize_t record; /* Record to insert into tree */
@@ -8738,7 +8693,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
/* Make a copy of the file in memory, in order to speed up deletion testing */
/* Open the file just created */
- if((fd = HDopen(filename, O_RDONLY, 0)) < 0)
+ if((fd = HDopen(filename, O_RDONLY)) < 0)
TEST_ERROR
/* Retrieve the file's size */
@@ -8786,14 +8741,14 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
} /* end for */
/* Re-open v2 B-tree */
- if(NULL == (bt2 = H5B2_open(f, dxpl, bt2_addr, f)))
+ if(NULL == (bt2 = H5B2_open(f, bt2_addr, f)))
FAIL_STACK_ERROR
/* Remove all records */
for(u = 0; u < INSERT_MANY; u++) {
record = records[u];
rrecord = HSIZET_MAX;
- if(H5B2_remove(bt2, dxpl, &record, remove_cb, &rrecord) < 0)
+ if(H5B2_remove(bt2, &record, remove_cb, &rrecord) < 0)
FAIL_STACK_ERROR
/* Make certain that the record value is correct */
@@ -8818,7 +8773,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
TEST_ERROR
/* Close the v2 B-tree */
- if(H5B2_close(bt2, dxpl) < 0)
+ if(H5B2_close(bt2) < 0)
FAIL_STACK_ERROR
bt2 = NULL;
@@ -8835,7 +8790,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
/* Re-write the file's data with the copy in memory */
/* Open the file just created */
- if((fd = HDopen(filename, O_RDWR|O_CREAT|O_TRUNC, 0666)) < 0)
+ if((fd = HDopen(filename, O_RDWR|O_CREAT|O_TRUNC, H5_POSIX_CREATE_MODE_RW)) < 0)
TEST_ERROR
/* Write file's data from memory */
@@ -8870,7 +8825,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
STACK_ERROR
/* Re-open v2 B-tree */
- if(NULL == (bt2 = H5B2_open(f, dxpl, bt2_addr, f)))
+ if(NULL == (bt2 = H5B2_open(f, bt2_addr, f)))
FAIL_STACK_ERROR
/* Remove all records */
@@ -8880,7 +8835,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
rrecord = HSIZET_MAX;
/* Remove random record */
- if(H5B2_remove_by_idx(bt2, dxpl, H5_ITER_INC, (hsize_t)rem_idx, remove_cb, &rrecord) < 0)
+ if(H5B2_remove_by_idx(bt2, H5_ITER_INC, (hsize_t)rem_idx, remove_cb, &rrecord) < 0)
FAIL_STACK_ERROR
/* Make certain that the record value is correct */
@@ -8905,7 +8860,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
TEST_ERROR
/* Close the v2 B-tree */
- if(H5B2_close(bt2, dxpl) < 0)
+ if(H5B2_close(bt2) < 0)
FAIL_STACK_ERROR
bt2 = NULL;
@@ -8922,7 +8877,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
/* Re-write the file's data with the copy in memory */
/* Open the file just created */
- if((fd = HDopen(filename, O_RDWR|O_CREAT|O_TRUNC, 0666)) < 0)
+ if((fd = HDopen(filename, O_RDWR|O_CREAT|O_TRUNC, H5_POSIX_CREATE_MODE_RW)) < 0)
TEST_ERROR
/* Write file's data from memory */
@@ -8958,14 +8913,14 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
STACK_ERROR
/* Re-open v2 B-tree */
- if(NULL == (bt2 = H5B2_open(f, dxpl, bt2_addr, f)))
+ if(NULL == (bt2 = H5B2_open(f, bt2_addr, f)))
FAIL_STACK_ERROR
/* Remove all records */
for(u = 0; u < INSERT_MANY; u++) {
/* Remove first record */
rrecord = HSIZET_MAX;
- if(H5B2_remove_by_idx(bt2, dxpl, H5_ITER_INC, (hsize_t)0, remove_cb, &rrecord) < 0)
+ if(H5B2_remove_by_idx(bt2, H5_ITER_INC, (hsize_t)0, remove_cb, &rrecord) < 0)
FAIL_STACK_ERROR
/* Make certain that the record value is correct */
@@ -8990,7 +8945,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
TEST_ERROR
/* Close the v2 B-tree */
- if(H5B2_close(bt2, dxpl) < 0)
+ if(H5B2_close(bt2) < 0)
FAIL_STACK_ERROR
bt2 = NULL;
@@ -9007,7 +8962,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
/* Re-write the file's data with the copy in memory */
/* Open the file just created */
- if((fd = HDopen(filename, O_RDWR|O_CREAT|O_TRUNC, 0666)) < 0)
+ if((fd = HDopen(filename, O_RDWR|O_CREAT|O_TRUNC, H5_POSIX_CREATE_MODE_RW)) < 0)
TEST_ERROR
/* Write file's data from memory */
@@ -9043,14 +8998,14 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
STACK_ERROR
/* Re-open v2 B-tree */
- if(NULL == (bt2 = H5B2_open(f, dxpl, bt2_addr, f)))
+ if(NULL == (bt2 = H5B2_open(f, bt2_addr, f)))
FAIL_STACK_ERROR
/* Remove all records */
for(u = 0; u < INSERT_MANY; u++) {
/* Remove last record */
rrecord = HSIZET_MAX;
- if(H5B2_remove_by_idx(bt2, dxpl, H5_ITER_DEC, (hsize_t)0, remove_cb, &rrecord) < 0)
+ if(H5B2_remove_by_idx(bt2, H5_ITER_DEC, (hsize_t)0, remove_cb, &rrecord) < 0)
FAIL_STACK_ERROR
/* Make certain that the record value is correct */
@@ -9075,7 +9030,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
TEST_ERROR
/* Close the v2 B-tree */
- if(H5B2_close(bt2, dxpl) < 0)
+ if(H5B2_close(bt2) < 0)
FAIL_STACK_ERROR
bt2 = NULL;
@@ -9095,7 +9050,7 @@ HDfprintf(stderr, "curr_time = %lu\n", (unsigned long)curr_time);
error:
H5E_BEGIN_TRY {
if(bt2)
- H5B2_close(bt2, dxpl);
+ H5B2_close(bt2);
H5Fclose(file);
} H5E_END_TRY;
@@ -9130,7 +9085,6 @@ test_find_neighbor(hid_t fapl, const H5B2_create_t *cparam,
{
hid_t file = -1; /* File ID */
H5F_t *f = NULL; /* Internal file object pointer */
- hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
haddr_t bt2_addr; /* Address of B-tree created */
hsize_t record; /* Record to insert into tree */
@@ -9158,45 +9112,45 @@ test_find_neighbor(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Create the v2 B-tree & get its address */
- if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ if(create_btree(f, cparam, &bt2, &bt2_addr) < 0)
TEST_ERROR
/* Insert records */
for(u = 0; u < FIND_NEIGHBOR; u++) {
record = records[u];
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
} /* end for */
/* Attempt to find record B-tree less than a value */
search = 0;
H5E_BEGIN_TRY {
- ret = H5B2_neighbor(bt2, dxpl, H5B2_COMPARE_LESS, &search, neighbor_cb, &record);
+ ret = H5B2_neighbor(bt2, H5B2_COMPARE_LESS, &search, neighbor_cb, &record);
} H5E_END_TRY;
/* Should fail */
if(ret != FAIL)
TEST_ERROR
search = 1;
- if(H5B2_neighbor(bt2, dxpl, H5B2_COMPARE_LESS, &search, neighbor_cb, &record) < 0)
+ if(H5B2_neighbor(bt2, H5B2_COMPARE_LESS, &search, neighbor_cb, &record) < 0)
FAIL_STACK_ERROR
if(record != 0)
TEST_ERROR
search = 2;
- if(H5B2_neighbor(bt2, dxpl, H5B2_COMPARE_LESS, &search, neighbor_cb, &record) < 0)
+ if(H5B2_neighbor(bt2, H5B2_COMPARE_LESS, &search, neighbor_cb, &record) < 0)
FAIL_STACK_ERROR
if(record != 0)
TEST_ERROR
search = 3;
- if(H5B2_neighbor(bt2, dxpl, H5B2_COMPARE_LESS, &search, neighbor_cb, &record) < 0)
+ if(H5B2_neighbor(bt2, H5B2_COMPARE_LESS, &search, neighbor_cb, &record) < 0)
FAIL_STACK_ERROR
if(record != 2)
TEST_ERROR
search = 4;
- if(H5B2_neighbor(bt2, dxpl, H5B2_COMPARE_LESS, &search, neighbor_cb, &record) < 0)
+ if(H5B2_neighbor(bt2, H5B2_COMPARE_LESS, &search, neighbor_cb, &record) < 0)
FAIL_STACK_ERROR
if(record != 2)
TEST_ERROR
@@ -9205,12 +9159,12 @@ test_find_neighbor(hid_t fapl, const H5B2_create_t *cparam,
ninfo.depth = 1;
ninfo.nrec = 14;
record = 250; /* Record in left internal node */
- if(check_node_info(bt2, dxpl, record, &ninfo) < 0)
+ if(check_node_info(bt2, record, &ninfo) < 0)
TEST_ERROR
/* Neighbor is in internal node */
search = 251;
- if(H5B2_neighbor(bt2, dxpl, H5B2_COMPARE_LESS, &search, neighbor_cb, &record) < 0)
+ if(H5B2_neighbor(bt2, H5B2_COMPARE_LESS, &search, neighbor_cb, &record) < 0)
FAIL_STACK_ERROR
if(record != 250)
TEST_ERROR
@@ -9219,18 +9173,18 @@ test_find_neighbor(hid_t fapl, const H5B2_create_t *cparam,
ninfo.depth = 2;
ninfo.nrec = 1;
record = 1888; /* Record in root node */
- if(check_node_info(bt2, dxpl, record, &ninfo) < 0)
+ if(check_node_info(bt2, record, &ninfo) < 0)
TEST_ERROR
/* Neighbor is in root node */
search = 1889;
- if(H5B2_neighbor(bt2, dxpl, H5B2_COMPARE_LESS, &search, neighbor_cb, &record) < 0)
+ if(H5B2_neighbor(bt2, H5B2_COMPARE_LESS, &search, neighbor_cb, &record) < 0)
FAIL_STACK_ERROR
if(record != 1888)
TEST_ERROR
search = (FIND_NEIGHBOR * 2) + 1;
- if(H5B2_neighbor(bt2, dxpl, H5B2_COMPARE_LESS, &search, neighbor_cb, &record) < 0)
+ if(H5B2_neighbor(bt2, H5B2_COMPARE_LESS, &search, neighbor_cb, &record) < 0)
FAIL_STACK_ERROR
if(record != ((FIND_NEIGHBOR - 1) * 2))
TEST_ERROR
@@ -9243,38 +9197,38 @@ test_find_neighbor(hid_t fapl, const H5B2_create_t *cparam,
TESTING("B-tree find: nearest neighbor greater than a value");
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Attempt to find record B-tree less than a value */
search = (FIND_NEIGHBOR * 2) + 1;
H5E_BEGIN_TRY {
- ret = H5B2_neighbor(bt2, dxpl, H5B2_COMPARE_GREATER, &search, neighbor_cb, &record);
+ ret = H5B2_neighbor(bt2, H5B2_COMPARE_GREATER, &search, neighbor_cb, &record);
} H5E_END_TRY;
/* Should fail */
if(ret != FAIL)
TEST_ERROR
search = 0;
- if(H5B2_neighbor(bt2, dxpl, H5B2_COMPARE_GREATER, &search, neighbor_cb, &record) < 0)
+ if(H5B2_neighbor(bt2, H5B2_COMPARE_GREATER, &search, neighbor_cb, &record) < 0)
FAIL_STACK_ERROR
if(record != 2)
TEST_ERROR
search = 1;
- if(H5B2_neighbor(bt2, dxpl, H5B2_COMPARE_GREATER, &search, neighbor_cb, &record) < 0)
+ if(H5B2_neighbor(bt2, H5B2_COMPARE_GREATER, &search, neighbor_cb, &record) < 0)
FAIL_STACK_ERROR
if(record != 2)
TEST_ERROR
search = 2;
- if(H5B2_neighbor(bt2, dxpl, H5B2_COMPARE_GREATER, &search, neighbor_cb, &record) < 0)
+ if(H5B2_neighbor(bt2, H5B2_COMPARE_GREATER, &search, neighbor_cb, &record) < 0)
FAIL_STACK_ERROR
if(record != 4)
TEST_ERROR
search = 3;
- if(H5B2_neighbor(bt2, dxpl, H5B2_COMPARE_GREATER, &search, neighbor_cb, &record) < 0)
+ if(H5B2_neighbor(bt2, H5B2_COMPARE_GREATER, &search, neighbor_cb, &record) < 0)
FAIL_STACK_ERROR
if(record != 4)
TEST_ERROR
@@ -9283,31 +9237,31 @@ test_find_neighbor(hid_t fapl, const H5B2_create_t *cparam,
ninfo.depth = 1;
ninfo.nrec = 16;
record = 2896; /* Record in right internal node */
- if(check_node_info(bt2, dxpl, record, &ninfo) < 0)
+ if(check_node_info(bt2, record, &ninfo) < 0)
TEST_ERROR
/* Neighbor is in internal node */
search = 2895;
- if(H5B2_neighbor(bt2, dxpl, H5B2_COMPARE_GREATER, &search, neighbor_cb, &record) < 0)
+ if(H5B2_neighbor(bt2, H5B2_COMPARE_GREATER, &search, neighbor_cb, &record) < 0)
FAIL_STACK_ERROR
if(record != 2896)
TEST_ERROR
/* Neighbor is in root node */
search = 1887;
- if(H5B2_neighbor(bt2, dxpl, H5B2_COMPARE_GREATER, &search, neighbor_cb, &record) < 0)
+ if(H5B2_neighbor(bt2, H5B2_COMPARE_GREATER, &search, neighbor_cb, &record) < 0)
FAIL_STACK_ERROR
if(record != 1888)
TEST_ERROR
search = ((FIND_NEIGHBOR - 1) * 2) - 1;
- if(H5B2_neighbor(bt2, dxpl, H5B2_COMPARE_GREATER, &search, neighbor_cb, &record) < 0)
+ if(H5B2_neighbor(bt2, H5B2_COMPARE_GREATER, &search, neighbor_cb, &record) < 0)
FAIL_STACK_ERROR
if(record != ((FIND_NEIGHBOR - 1) * 2))
TEST_ERROR
/* Close the v2 B-tree */
- if(H5B2_close(bt2, dxpl) < 0)
+ if(H5B2_close(bt2) < 0)
FAIL_STACK_ERROR
bt2 = NULL;
@@ -9324,7 +9278,7 @@ test_find_neighbor(hid_t fapl, const H5B2_create_t *cparam,
error:
H5E_BEGIN_TRY {
if(bt2)
- H5B2_close(bt2, dxpl);
+ H5B2_close(bt2);
H5Fclose(file);
} H5E_END_TRY;
HDfree(records);
@@ -9354,7 +9308,6 @@ test_delete(hid_t fapl, const H5B2_create_t *cparam)
H5F_t *f = NULL; /* Internal file object pointer */
h5_stat_size_t empty_size; /* Size of an empty file */
h5_stat_size_t file_size; /* Size of each file created */
- hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
haddr_t bt2_addr; /* Address of B-tree created */
hsize_t record; /* Record to insert into tree */
@@ -9393,18 +9346,18 @@ test_delete(hid_t fapl, const H5B2_create_t *cparam)
STACK_ERROR
/* Create the v2 B-tree & get its address */
- if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ if(create_btree(f, cparam, &bt2, &bt2_addr) < 0)
TEST_ERROR
/* Close the v2 B-tree */
- if(H5B2_close(bt2, dxpl) < 0)
+ if(H5B2_close(bt2) < 0)
FAIL_STACK_ERROR
bt2 = NULL;
/*
* Delete v2 B-tree
*/
- if(H5B2_delete(f, dxpl, bt2_addr, f, NULL, NULL) < 0)
+ if(H5B2_delete(f, bt2_addr, f, NULL, NULL) < 0)
FAIL_STACK_ERROR
/* Close the file */
@@ -9437,13 +9390,13 @@ test_delete(hid_t fapl, const H5B2_create_t *cparam)
STACK_ERROR
/* Create the v2 B-tree & get its address */
- if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ if(create_btree(f, cparam, &bt2, &bt2_addr) < 0)
TEST_ERROR
/* Insert records */
for(u = 0; u < DELETE_SMALL; u++) {
record = u;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
} /* end for */
@@ -9454,14 +9407,14 @@ test_delete(hid_t fapl, const H5B2_create_t *cparam)
TEST_ERROR
/* Close the v2 B-tree */
- if(H5B2_close(bt2, dxpl) < 0)
+ if(H5B2_close(bt2) < 0)
FAIL_STACK_ERROR
bt2 = NULL;
/*
* Delete v2 B-tree
*/
- if(H5B2_delete(f, H5AC_ind_read_dxpl_id, bt2_addr, f, NULL, NULL) < 0)
+ if(H5B2_delete(f, bt2_addr, f, NULL, NULL) < 0)
FAIL_STACK_ERROR
/* Close file */
@@ -9494,13 +9447,13 @@ test_delete(hid_t fapl, const H5B2_create_t *cparam)
STACK_ERROR
/* Create the v2 B-tree & get its address */
- if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ if(create_btree(f, cparam, &bt2, &bt2_addr) < 0)
TEST_ERROR
/* Insert records */
for(u = 0; u < DELETE_MEDIUM; u++) {
record = u;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
} /* end for */
@@ -9511,14 +9464,14 @@ test_delete(hid_t fapl, const H5B2_create_t *cparam)
TEST_ERROR
/* Close the v2 B-tree */
- if(H5B2_close(bt2, dxpl) < 0)
+ if(H5B2_close(bt2) < 0)
FAIL_STACK_ERROR
bt2 = NULL;
/*
* Delete v2 B-tree
*/
- if(H5B2_delete(f, dxpl, bt2_addr, f, NULL, NULL) < 0)
+ if(H5B2_delete(f, bt2_addr, f, NULL, NULL) < 0)
FAIL_STACK_ERROR
/* Close file */
@@ -9551,13 +9504,13 @@ test_delete(hid_t fapl, const H5B2_create_t *cparam)
STACK_ERROR
/* Create the v2 B-tree & get its address */
- if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ if(create_btree(f, cparam, &bt2, &bt2_addr) < 0)
TEST_ERROR
/* Insert records */
for(u = 0; u < DELETE_LARGE; u++) {
record = u;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
} /* end for */
@@ -9568,14 +9521,14 @@ test_delete(hid_t fapl, const H5B2_create_t *cparam)
TEST_ERROR
/* Close the v2 B-tree */
- if(H5B2_close(bt2, dxpl) < 0)
+ if(H5B2_close(bt2) < 0)
FAIL_STACK_ERROR
bt2 = NULL;
/*
* Delete v2 B-tree
*/
- if(H5B2_delete(f, dxpl, bt2_addr, f, NULL, NULL) < 0)
+ if(H5B2_delete(f, bt2_addr, f, NULL, NULL) < 0)
FAIL_STACK_ERROR
/* Close file */
@@ -9597,7 +9550,7 @@ test_delete(hid_t fapl, const H5B2_create_t *cparam)
error:
H5E_BEGIN_TRY {
if(bt2)
- H5B2_close(bt2, dxpl);
+ H5B2_close(bt2);
H5Fclose(file);
} H5E_END_TRY;
return 1;
@@ -9624,7 +9577,6 @@ test_modify(hid_t fapl, const H5B2_create_t *cparam,
{
hid_t file = -1; /* File ID */
H5F_t *f = NULL; /* Internal file object pointer */
- hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
haddr_t bt2_addr; /* Address of B-tree created */
hsize_t record; /* Record to insert into tree */
@@ -9645,13 +9597,13 @@ test_modify(hid_t fapl, const H5B2_create_t *cparam,
TEST_ERROR
/* Create the v2 B-tree & get its address */
- if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ if(create_btree(f, cparam, &bt2, &bt2_addr) < 0)
TEST_ERROR
/* Create level-2 B-tree with 3 internal nodes */
for(u = 0; u < ((INSERT_SPLIT_ROOT_NREC * 59) + 1); u++) {
record = u * 5;
- if(H5B2_insert(bt2, dxpl, &record) < 0)
+ if(H5B2_insert(bt2, &record) < 0)
FAIL_STACK_ERROR
} /* end for */
@@ -9665,7 +9617,7 @@ test_modify(hid_t fapl, const H5B2_create_t *cparam,
record = 3;
modify = 4;
H5E_BEGIN_TRY {
- ret = H5B2_modify(bt2, dxpl, &record, modify_cb, &modify);
+ ret = H5B2_modify(bt2, &record, modify_cb, &modify);
} H5E_END_TRY;
/* Should fail */
if(ret != FAIL)
@@ -9676,33 +9628,33 @@ test_modify(hid_t fapl, const H5B2_create_t *cparam,
TESTING("B-tree modify: modify record in leaf node");
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Check status of B-tree */
ninfo.depth = 0;
ninfo.nrec = 62;
record = 4330; /* Record in leaf node */
- if(check_node_info(bt2, dxpl, record, &ninfo) < 0)
+ if(check_node_info(bt2, record, &ninfo) < 0)
TEST_ERROR
/* Attempt to modify a record in a leaf node */
record = 4330;
modify = 4331;
- if(H5B2_modify(bt2, dxpl, &record, modify_cb, &modify) < 0)
+ if(H5B2_modify(bt2, &record, modify_cb, &modify) < 0)
FAIL_STACK_ERROR
/* Check status of B-tree */
ninfo.depth = 0;
ninfo.nrec = 62;
record = 4331; /* Record in leaf node */
- if(check_node_info(bt2, dxpl, record, &ninfo) < 0)
+ if(check_node_info(bt2, record, &ninfo) < 0)
TEST_ERROR
/* Attempt to find modified record */
record = 4331;
found = 4331;
- if(H5B2_find(bt2, dxpl, &record, find_cb, &found) != TRUE)
+ if(H5B2_find(bt2, &record, find_cb, &found) != TRUE)
FAIL_STACK_ERROR
if(found != 4331)
TEST_ERROR
@@ -9711,7 +9663,7 @@ test_modify(hid_t fapl, const H5B2_create_t *cparam,
record = 4330;
found = HSIZET_MAX;
H5E_BEGIN_TRY {
- ret = H5B2_modify(bt2, dxpl, &record, modify_cb, &modify);
+ ret = H5B2_modify(bt2, &record, modify_cb, &modify);
} H5E_END_TRY;
/* Should fail */
if(ret != FAIL)
@@ -9722,33 +9674,33 @@ test_modify(hid_t fapl, const H5B2_create_t *cparam,
TESTING("B-tree modify: modify record in internal node");
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Check status of B-tree */
ninfo.depth = 1;
ninfo.nrec = 29;
record = 5350; /* Record in internal node */
- if(check_node_info(bt2, dxpl, record, &ninfo) < 0)
+ if(check_node_info(bt2, record, &ninfo) < 0)
TEST_ERROR
/* Attempt to modify a record in an internal node */
record = 5350;
modify = 5352;
- if(H5B2_modify(bt2, dxpl, &record, modify_cb, &modify) < 0)
+ if(H5B2_modify(bt2, &record, modify_cb, &modify) < 0)
FAIL_STACK_ERROR
/* Check status of B-tree */
ninfo.depth = 1;
ninfo.nrec = 29;
record = 5352; /* Record in internal node */
- if(check_node_info(bt2, dxpl, record, &ninfo) < 0)
+ if(check_node_info(bt2, record, &ninfo) < 0)
TEST_ERROR
/* Attempt to find modified record */
record = 5352;
found = 5352;
- if(H5B2_find(bt2, dxpl, &record, find_cb, &found) != TRUE)
+ if(H5B2_find(bt2, &record, find_cb, &found) != TRUE)
STACK_ERROR
if(found != 5352)
TEST_ERROR
@@ -9757,7 +9709,7 @@ test_modify(hid_t fapl, const H5B2_create_t *cparam,
record = 5350;
found = 5350;
H5E_BEGIN_TRY {
- ret = H5B2_modify(bt2, dxpl, &record, modify_cb, &modify);
+ ret = H5B2_modify(bt2, &record, modify_cb, &modify);
} H5E_END_TRY;
/* Should fail */
if(ret != FAIL)
@@ -9768,33 +9720,33 @@ test_modify(hid_t fapl, const H5B2_create_t *cparam,
TESTING("B-tree modify: modify record in root node");
/* Check for closing & re-opening the B-tree */
- if(reopen_btree(f, dxpl, &bt2, bt2_addr, tparam) < 0)
+ if(reopen_btree(f, &bt2, bt2_addr, tparam) < 0)
TEST_ERROR
/* Check status of B-tree */
ninfo.depth = 2;
ninfo.nrec = 2;
record = 9445; /* Record in root node */
- if(check_node_info(bt2, dxpl, record, &ninfo) < 0)
+ if(check_node_info(bt2, record, &ninfo) < 0)
TEST_ERROR
/* Attempt to modify a record in a root node */
record = 9445;
modify = 9448;
- if(H5B2_modify(bt2, dxpl, &record, modify_cb, &modify) < 0)
+ if(H5B2_modify(bt2, &record, modify_cb, &modify) < 0)
FAIL_STACK_ERROR
/* Check status of B-tree */
ninfo.depth = 2;
ninfo.nrec = 2;
record = 9448; /* Record in root node */
- if(check_node_info(bt2, dxpl, record, &ninfo) < 0)
+ if(check_node_info(bt2, record, &ninfo) < 0)
TEST_ERROR
/* Attempt to find modified record */
record = 9448;
found = 9448;
- if(H5B2_find(bt2, dxpl, &record, find_cb, &found) != TRUE)
+ if(H5B2_find(bt2, &record, find_cb, &found) != TRUE)
STACK_ERROR
if(found != 9448)
TEST_ERROR
@@ -9803,14 +9755,14 @@ test_modify(hid_t fapl, const H5B2_create_t *cparam,
record = 9445;
found = 9445;
H5E_BEGIN_TRY {
- ret = H5B2_modify(bt2, dxpl, &record, modify_cb, &modify);
+ ret = H5B2_modify(bt2, &record, modify_cb, &modify);
} H5E_END_TRY;
/* Should fail */
if(ret != FAIL)
TEST_ERROR
/* Close the v2 B-tree */
- if(H5B2_close(bt2, dxpl) < 0)
+ if(H5B2_close(bt2) < 0)
FAIL_STACK_ERROR
bt2 = NULL;
@@ -9825,7 +9777,7 @@ test_modify(hid_t fapl, const H5B2_create_t *cparam,
error:
H5E_BEGIN_TRY {
if(bt2)
- H5B2_close(bt2, dxpl);
+ H5B2_close(bt2);
H5Fclose(file);
} H5E_END_TRY;
return 1;
@@ -9858,7 +9810,6 @@ test_open_twice_diff(hid_t fapl, const H5B2_create_t *cparam)
hid_t file00 = -1; /* File ID */
H5F_t *f = NULL; /* Internal file object pointer */
H5F_t *f2 = NULL; /* Internal file object pointer */
- hid_t dxpl = H5AC_ind_read_dxpl_id; /* DXPL to use */
H5B2_t *bt2 = NULL; /* v2 B-tree wrapper */
H5B2_t *bt2_2 = NULL; /* Second v2 B-tree wrapper */
haddr_t bt2_addr; /* Address of B-tree created */
@@ -9883,15 +9834,15 @@ test_open_twice_diff(hid_t fapl, const H5B2_create_t *cparam)
FAIL_STACK_ERROR
/* Create the v2 B-tree & get its address */
- if(create_btree(f, dxpl, cparam, &bt2, &bt2_addr) < 0)
+ if(create_btree(f, cparam, &bt2, &bt2_addr) < 0)
TEST_ERROR
/* Re-open v2 B-tree */
- if(NULL == (bt2_2 = H5B2_open(f, dxpl, bt2_addr, f)))
+ if(NULL == (bt2_2 = H5B2_open(f, bt2_addr, f)))
FAIL_STACK_ERROR
/* Close the second v2 B-tree wrapper */
- if(H5B2_close(bt2_2, dxpl) < 0)
+ if(H5B2_close(bt2_2) < 0)
FAIL_STACK_ERROR
bt2_2 = NULL;
@@ -9903,7 +9854,7 @@ test_open_twice_diff(hid_t fapl, const H5B2_create_t *cparam)
FAIL_STACK_ERROR
/* Close the first v2 B-tree wrapper */
- if(H5B2_close(bt2, dxpl) < 0)
+ if(H5B2_close(bt2) < 0)
FAIL_STACK_ERROR
bt2 = NULL;
@@ -9933,7 +9884,7 @@ test_open_twice_diff(hid_t fapl, const H5B2_create_t *cparam)
FAIL_STACK_ERROR
/* Open the B-tree through the second file handle */
- if(NULL == (bt2_2 = H5B2_open(f2, dxpl, bt2_addr, f2)))
+ if(NULL == (bt2_2 = H5B2_open(f2, bt2_addr, f2)))
FAIL_STACK_ERROR
/* Close the extra file handles */
@@ -9943,7 +9894,7 @@ test_open_twice_diff(hid_t fapl, const H5B2_create_t *cparam)
FAIL_STACK_ERROR
/* Close the second v2 B-tree */
- if(H5B2_close(bt2_2, dxpl) < 0)
+ if(H5B2_close(bt2_2) < 0)
FAIL_STACK_ERROR
bt2_2 = NULL;
@@ -9960,9 +9911,9 @@ test_open_twice_diff(hid_t fapl, const H5B2_create_t *cparam)
error:
H5E_BEGIN_TRY {
if(bt2)
- H5B2_close(bt2, dxpl);
+ H5B2_close(bt2);
if(bt2)
- H5B2_close(bt2_2, dxpl);
+ H5B2_close(bt2_2);
H5Fclose(file);
H5Fclose(file2);
H5Fclose(file0);
@@ -9996,6 +9947,7 @@ main(void)
unsigned reopen; /* Whether to reopen B-tree during tests */
int ExpressMode;
const char *envval = NULL;
+ hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
envval = HDgetenv("HDF5_DRIVER");
if(envval == NULL)
@@ -10011,6 +9963,10 @@ main(void)
/* Initialize v2 B-tree creation parameters */
init_cparam(&cparam, &cparam2);
+ /* Push API context */
+ if(H5CX_push() < 0) FAIL_STACK_ERROR
+ api_ctx_pushed = TRUE;
+
/* Loop over re-opening B-tree during tests */
for(reopen = FALSE; reopen <= TRUE; reopen++) {
if(reopen) {
@@ -10099,6 +10055,10 @@ main(void)
/* Verify symbol table messages are cached */
nerrors += (h5_verify_cached_stabs(FILENAME, fapl) < 0 ? 1 : 0);
+ /* Pop API context */
+ if(api_ctx_pushed && H5CX_pop() < 0) FAIL_STACK_ERROR
+ api_ctx_pushed = FALSE;
+
if(nerrors)
goto error;
@@ -10115,6 +10075,8 @@ error:
H5Pclose(fapl);
} H5E_END_TRY;
+ if(api_ctx_pushed) H5CX_pop();
+
return 1;
} /* end main() */
diff --git a/test/cache.c b/test/cache.c
index ba6fb0e..d5e3c6c 100644
--- a/test/cache.c
+++ b/test/cache.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* Programmer: John Mainzer
@@ -241,10 +239,16 @@ smoke_check_1(int express_test, unsigned paged)
H5F_t * file_ptr = NULL;
if(paged)
- TESTING("smoke check #1 -- all clean, ins, dest, ren, 4/2 MB cache, paged aggregation")
+ TESTING("smoke check #1P -- all clean, ins, dest, ren, 4/2 MB cache")
else
TESTING("smoke check #1 -- all clean, ins, dest, ren, 4/2 MB cache")
+ if ( paged && ( express_test > 0 ) ) {
+
+ SKIPPED();
+ return(0);
+ }
+
switch (express_test)
{
case 0:
@@ -442,10 +446,16 @@ smoke_check_2(int express_test, unsigned paged)
H5F_t * file_ptr = NULL;
if(paged)
- TESTING("smoke check #2 -- ~1/2 dirty, ins, dest, ren, 4/2 MB cache, paged aggregation")
+ TESTING("smoke check #2P -- ~1/2 dirty, ins, dest, ren, 4/2 MB cache")
else
TESTING("smoke check #2 -- ~1/2 dirty, ins, dest, ren, 4/2 MB cache")
+ if ( paged && ( express_test > 0 ) ) {
+
+ SKIPPED();
+ return(0);
+ }
+
switch (express_test)
{
case 0:
@@ -642,10 +652,16 @@ smoke_check_3(int express_test, unsigned paged)
H5F_t * file_ptr = NULL;
if(paged)
- TESTING("smoke check #3 -- all clean, ins, dest, ren, 2/1 KB cache, paged aggregation")
+ TESTING("smoke check #3P -- all clean, ins, dest, ren, 2/1 KB cache")
else
TESTING("smoke check #3 -- all clean, ins, dest, ren, 2/1 KB cache")
+ if ( paged && ( express_test > 0 ) ) {
+
+ SKIPPED();
+ return(0);
+ }
+
switch (express_test)
{
case 0:
@@ -843,10 +859,16 @@ smoke_check_4(int express_test, unsigned paged)
H5F_t * file_ptr = NULL;
if(paged)
- TESTING("smoke check #4 -- ~1/2 dirty, ins, dest, ren, 2/1 KB cache, paged aggregation")
+ TESTING("smoke check #4P -- ~1/2 dirty, ins, dest, ren, 2/1 KB cache")
else
TESTING("smoke check #4 -- ~1/2 dirty, ins, dest, ren, 2/1 KB cache")
+ if ( paged && ( express_test > 0 ) ) {
+
+ SKIPPED();
+ return(0);
+ }
+
switch (express_test)
{
case 0:
@@ -1092,10 +1114,16 @@ smoke_check_5(int express_test, unsigned paged)
};
if(paged)
- TESTING("smoke check #5 -- all clean, ins, prot, unprot, AR cache 1, paged aggregation")
+ TESTING("smoke check #5P -- all clean, ins, prot, unprot, AR cache 1")
else
TESTING("smoke check #5 -- all clean, ins, prot, unprot, AR cache 1")
+ if ( paged && ( express_test > 0 ) ) {
+
+ SKIPPED();
+ return(0);
+ }
+
switch (express_test)
{
case 0:
@@ -1330,10 +1358,16 @@ smoke_check_6(int express_test, unsigned paged)
};
if(paged)
- TESTING("smoke check #6 -- ~1/2 dirty, ins, prot, unprot, AR cache 1, paged aggregation")
+ TESTING("smoke check #6P -- ~1/2 dirty, ins, prot, unprot, AR cache 1")
else
TESTING("smoke check #6 -- ~1/2 dirty, ins, prot, unprot, AR cache 1")
+ if ( paged && ( express_test > 0 ) ) {
+
+ SKIPPED();
+ return(0);
+ }
+
pass = TRUE;
switch (express_test)
@@ -1569,10 +1603,16 @@ smoke_check_7(int express_test, unsigned paged)
};
if(paged)
- TESTING("smoke check #7 -- all clean, ins, prot, unprot, AR cache 2, paged aggregation")
+ TESTING("smoke check #7P -- all clean, ins, prot, unprot, AR cache 2")
else
TESTING("smoke check #7 -- all clean, ins, prot, unprot, AR cache 2")
+ if ( paged && ( express_test > 0 ) ) {
+
+ SKIPPED();
+ return(0);
+ }
+
switch (express_test)
{
case 0:
@@ -1808,10 +1848,16 @@ smoke_check_8(int express_test, unsigned paged)
};
if(paged)
- TESTING("smoke check #8 -- ~1/2 dirty, ins, prot, unprot, AR cache 2, paged aggregation")
+ TESTING("smoke check #8P -- ~1/2 dirty, ins, prot, unprot, AR cache 2")
else
TESTING("smoke check #8 -- ~1/2 dirty, ins, prot, unprot, AR cache 2")
+ if ( paged && ( express_test > 0 ) ) {
+
+ SKIPPED();
+ return(0);
+ }
+
switch (express_test)
{
case 0:
@@ -2008,10 +2054,16 @@ smoke_check_9(int express_test, unsigned paged)
H5C_t * cache_ptr = NULL;
if(paged)
- TESTING("smoke check #9 -- all clean, ins, dest, ren, 4/2 MB, corked, paged aggregation")
+ TESTING("smoke check #9P -- all clean, ins, dest, ren, 4/2 MB, corked")
else
TESTING("smoke check #9 -- all clean, ins, dest, ren, 4/2 MB, corked")
+ if ( paged && ( express_test > 0 ) ) {
+
+ SKIPPED();
+ return(0);
+ }
+
switch (express_test)
{
case 0:
@@ -2330,10 +2382,16 @@ smoke_check_10(int express_test, unsigned paged)
H5C_t * cache_ptr = NULL;
if(paged)
- TESTING("smoke check #10 -- ~1/2 dirty, ins, dest, ren, 4/2 MB, corked, paged aggregation")
+ TESTING("smoke check #10P -- ~1/2 dirty, ins, dest, ren, 4/2 MB, corked")
else
TESTING("smoke check #10 -- ~1/2 dirty, ins, dest, ren, 4/2 MB, corked")
+ if ( paged && ( express_test > 0 ) ) {
+
+ SKIPPED();
+ return(0);
+ }
+
switch (express_test)
{
case 0:
@@ -2646,7 +2704,7 @@ express_test, unsigned paged)
#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
if(paged)
- TESTING("write permitted check -- 1/0 MB cache, paged aggregation")
+ TESTING("write permitted check -- 1/0 MB cache (paged aggregation)")
else
TESTING("write permitted check -- 1/0 MB cache")
@@ -3058,13 +3116,14 @@ check_insert_entry(unsigned paged)
(cache_ptr->pel_len != 2) ||
(cache_ptr->pel_size != 2 * entry_sizes[entry_type]) ||
(cache_ptr->LRU_list_len != 2) ||
- (cache_ptr->LRU_list_size != 2 * entry_sizes[entry_type]) ||
+ (cache_ptr->LRU_list_size != 2 * entry_sizes[entry_type])
#if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS
- (cache_ptr->dLRU_list_len != 2) ||
+ || (cache_ptr->dLRU_list_len != 2) ||
(cache_ptr->dLRU_list_size != 2 * entry_sizes[entry_type]) ||
-#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
(cache_ptr->cLRU_list_len != 0) ||
- (cache_ptr->cLRU_list_size != (size_t)0)) {
+ (cache_ptr->cLRU_list_size != (size_t)0)
+#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
+ ) {
pass = FALSE;
failure_mssg = "Unexpected insert results 10.";
@@ -3250,7 +3309,7 @@ check_flush_cache__empty_cache(H5F_t * file_ptr)
if(pass) {
- result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__NO_FLAGS_SET);
+ result = H5C_flush_cache(file_ptr, H5C__NO_FLAGS_SET);
if(result < 0) {
@@ -3261,7 +3320,7 @@ check_flush_cache__empty_cache(H5F_t * file_ptr)
if(pass) {
- result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__FLUSH_INVALIDATE_FLAG);
+ result = H5C_flush_cache(file_ptr, H5C__FLUSH_INVALIDATE_FLAG);
if(result < 0) {
@@ -3272,7 +3331,7 @@ check_flush_cache__empty_cache(H5F_t * file_ptr)
if(pass) {
- result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__FLUSH_CLEAR_ONLY_FLAG);
+ result = H5C_flush_cache(file_ptr, H5C__FLUSH_CLEAR_ONLY_FLAG);
if(result < 0) {
@@ -3284,7 +3343,7 @@ check_flush_cache__empty_cache(H5F_t * file_ptr)
if(pass) {
- result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__FLUSH_MARKED_ENTRIES_FLAG);
+ result = H5C_flush_cache(file_ptr, H5C__FLUSH_MARKED_ENTRIES_FLAG);
if(result < 0) {
@@ -4955,7 +5014,7 @@ check_flush_cache__multi_entry_test(H5F_t * file_ptr,
if(pass) {
- result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, flush_flags);
+ result = H5C_flush_cache(file_ptr, flush_flags);
if(result < 0) {
@@ -5029,7 +5088,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, H5AC_ind_read_dxpl_id, H5C__FLUSH_INVALIDATE_FLAG);
+ result = H5C_flush_cache(file_ptr, H5C__FLUSH_INVALIDATE_FLAG);
if(result < 0) {
@@ -5186,7 +5245,7 @@ check_flush_cache__pe_multi_entry_test(H5F_t * file_ptr,
if(pass) {
- result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, flush_flags);
+ result = H5C_flush_cache(file_ptr, flush_flags);
if(result < 0) {
@@ -5260,7 +5319,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, H5AC_ind_read_dxpl_id, H5C__FLUSH_INVALIDATE_FLAG);
+ result = H5C_flush_cache(file_ptr, H5C__FLUSH_INVALIDATE_FLAG);
if(result < 0) {
@@ -9263,7 +9322,7 @@ check_flush_cache__flush_op_test(H5F_t * file_ptr,
if(pass) {
- result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, flush_flags);
+ result = H5C_flush_cache(file_ptr, flush_flags);
if(result < 0) {
@@ -9455,7 +9514,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, H5AC_ind_read_dxpl_id, H5C__FLUSH_INVALIDATE_FLAG);
+ result = H5C_flush_cache(file_ptr, H5C__FLUSH_INVALIDATE_FLAG);
if(result < 0) {
@@ -10734,7 +10793,7 @@ check_flush_cache__flush_op_eviction_test(H5F_t * file_ptr)
if(pass) {
- result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__FLUSH_INVALIDATE_FLAG);
+ result = H5C_flush_cache(file_ptr, H5C__FLUSH_INVALIDATE_FLAG);
if(result < 0) {
@@ -12463,7 +12522,7 @@ check_flush_cache__single_entry_test(H5F_t * file_ptr,
if(pass) {
- result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, flush_flags);
+ result = H5C_flush_cache(file_ptr, flush_flags);
if(result < 0) {
@@ -12522,7 +12581,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, H5AC_ind_read_dxpl_id, H5C__FLUSH_INVALIDATE_FLAG);
+ result = H5C_flush_cache(file_ptr, H5C__FLUSH_INVALIDATE_FLAG);
if(result < 0) {
@@ -12655,7 +12714,7 @@ check_flush_cache__pinned_single_entry_test(H5F_t * file_ptr,
if(pass) {
- result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, flush_flags);
+ result = H5C_flush_cache(file_ptr, flush_flags);
if(result < 0) {
@@ -12730,7 +12789,7 @@ check_flush_cache__pinned_single_entry_test(H5F_t * file_ptr,
if(pass) {
- result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__FLUSH_INVALIDATE_FLAG);
+ result = H5C_flush_cache(file_ptr, H5C__FLUSH_INVALIDATE_FLAG);
if(result < 0) {
@@ -13329,7 +13388,7 @@ check_multiple_read_protect(unsigned paged)
test_entry_t * entry_ptr;
if(paged)
- TESTING("multiple read only protects on a single entry (paged aggregation)")
+ TESTING("multiple read only protects on a single entry (paged aggr)")
else
TESTING("multiple read only protects on a single entry")
@@ -14292,7 +14351,7 @@ check_resize_entry(unsigned paged)
} else {
- result = H5C_unprotect(file_ptr, H5AC_ind_read_dxpl_id,
+ result = H5C_unprotect(file_ptr,
entry_ptr->addr, (void *)entry_ptr, H5C__DIRTIED_FLAG);
if(result < 0) {
@@ -14377,7 +14436,7 @@ check_resize_entry(unsigned paged)
} else {
- result = H5C_unprotect(file_ptr, H5AC_ind_read_dxpl_id,
+ result = H5C_unprotect(file_ptr,
entry_ptr->addr, (void *)entry_ptr, H5C__DIRTIED_FLAG);
if(result < 0) {
@@ -14737,7 +14796,7 @@ check_resize_entry(unsigned paged)
} else {
- result = H5C_unprotect(file_ptr, H5AC_ind_read_dxpl_id,
+ result = H5C_unprotect(file_ptr,
entry_ptr->addr, (void *)entry_ptr, H5C__DIRTIED_FLAG);
if(result < 0) {
@@ -14824,7 +14883,7 @@ check_resize_entry(unsigned paged)
} else {
- result = H5C_unprotect(file_ptr, H5AC_ind_read_dxpl_id,
+ result = H5C_unprotect(file_ptr,
entry_ptr->addr, (void *)entry_ptr, H5C__DIRTIED_FLAG);
if(result < 0) {
@@ -15897,7 +15956,7 @@ check_flush_protected_err(unsigned paged)
protect_entry(file_ptr, 0, 0);
- if(H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__NO_FLAGS_SET) >= 0) {
+ if(H5C_flush_cache(file_ptr, H5C__NO_FLAGS_SET) >= 0) {
pass = FALSE;
failure_mssg = "flush succeeded on cache with protected entry.\n";
@@ -15906,7 +15965,7 @@ check_flush_protected_err(unsigned paged)
unprotect_entry(file_ptr, 0, 0, H5C__DIRTIED_FLAG);
- if(H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__NO_FLAGS_SET) < 0) {
+ if(H5C_flush_cache(file_ptr, H5C__NO_FLAGS_SET) < 0) {
pass = FALSE;
failure_mssg = "flush failed after unprotect.\n";
@@ -15954,7 +16013,7 @@ check_destroy_pinned_err(unsigned paged)
H5F_t * file_ptr = NULL;
if(paged)
- TESTING("destroy cache with permanently pinned entry error (paged aggregation)")
+ TESTING("destroy cache with permanently pinned entry error (pgd aggr)")
else
TESTING("destroy cache with permanently pinned entry error")
@@ -15973,19 +16032,19 @@ check_destroy_pinned_err(unsigned paged)
protect_entry(file_ptr, 0, 0);
unprotect_entry(file_ptr, 0, 0, H5C__PIN_ENTRY_FLAG);
- if(H5C_prep_for_file_close(file_ptr, H5P_DATASET_XFER_DEFAULT) < 0) {
+ if(H5C_prep_for_file_close(file_ptr) < 0) {
pass = FALSE;
failure_mssg = "unexpected failure of prep for file close.\n";
} /* end if */
- if(H5C_dest(file_ptr, H5AC_ind_read_dxpl_id) >= 0) {
+ if(H5C_dest(file_ptr) >= 0) {
pass = FALSE;
failure_mssg = "destroy succeeded on cache with pinned entry.\n";
} /* end if */
else {
unpin_entry(0, 0);
- if(H5C_dest(file_ptr, H5AC_ind_read_dxpl_id) < 0) {
+ if(H5C_dest(file_ptr) < 0) {
pass = FALSE;
failure_mssg = "destroy failed after unpin.\n";
} /* end if */
@@ -16063,20 +16122,20 @@ check_destroy_protected_err(unsigned paged)
* we are trying to test, put the call to H5C_prep_for_file_close()
* prior to the final protect call.
*/
- if(H5C_prep_for_file_close(file_ptr, H5P_DATASET_XFER_DEFAULT) < 0) {
+ if(H5C_prep_for_file_close(file_ptr) < 0) {
pass = FALSE;
failure_mssg = "unexpected failure of prep for file close.\n";
} /* end if */
protect_entry(file_ptr, 0, 0);
- if(H5C_dest(file_ptr, H5AC_ind_read_dxpl_id) >= 0) {
+ if(H5C_dest(file_ptr) >= 0) {
pass = FALSE;
failure_mssg = "destroy succeeded on cache with protected entry.\n";
} /* end if */
else {
unprotect_entry(file_ptr, 0, 0, H5C__DIRTIED_FLAG);
- if(H5C_dest(file_ptr, H5AC_ind_read_dxpl_id) < 0) {
+ if(H5C_dest(file_ptr) < 0) {
pass = FALSE;
failure_mssg = "destroy failed after unprotect.\n";
} /* end if */
@@ -16156,7 +16215,7 @@ check_duplicate_insert_err(unsigned paged)
base_addr = entries[0];
entry_ptr = &(base_addr[0]);
- result = H5C_insert_entry(file_ptr, H5AC_ind_read_dxpl_id,
+ result = H5C_insert_entry(file_ptr,
types[0], entry_ptr->addr,
(void *)entry_ptr, H5C__NO_FLAGS_SET);
@@ -16242,7 +16301,7 @@ check_double_pin_err(unsigned paged)
if(pass) {
- result = H5C_unprotect(file_ptr, H5AC_ind_read_dxpl_id,
+ result = H5C_unprotect(file_ptr,
entry_ptr->addr, (void *)entry_ptr, H5C__PIN_ENTRY_FLAG);
if(result > 0) {
@@ -16328,7 +16387,7 @@ check_double_unpin_err(unsigned paged)
if(pass) {
- result = H5C_unprotect(file_ptr, H5AC_ind_read_dxpl_id,
+ result = H5C_unprotect(file_ptr,
entry_ptr->addr, (void *)entry_ptr, H5C__UNPIN_ENTRY_FLAG);
if(result > 0) {
@@ -16532,7 +16591,7 @@ check_double_protect_err(unsigned paged)
if(pass) {
- cache_entry_ptr = (H5C_cache_entry_t *)H5C_protect(file_ptr, H5AC_ind_read_dxpl_id,
+ cache_entry_ptr = (H5C_cache_entry_t *)H5C_protect(file_ptr,
types[0], entry_ptr->addr,
&entry_ptr->addr, H5C__NO_FLAGS_SET);
@@ -16614,7 +16673,7 @@ check_double_unprotect_err(unsigned paged)
if(pass) {
- result = H5C_unprotect(file_ptr, H5AC_ind_read_dxpl_id,
+ result = H5C_unprotect(file_ptr,
entry_ptr->addr, (void *)entry_ptr, H5C__NO_FLAGS_SET);
if(result > 0) {
@@ -16782,7 +16841,7 @@ check_expunge_entry_errs(unsigned paged)
if(pass) {
- result = H5C_expunge_entry(file_ptr, H5AC_ind_read_dxpl_id,
+ result = H5C_expunge_entry(file_ptr,
types[0], entry_ptr->addr, H5C__NO_FLAGS_SET);
if(result > 0) {
@@ -16800,7 +16859,7 @@ check_expunge_entry_errs(unsigned paged)
if(pass) {
- result = H5C_expunge_entry(file_ptr, H5AC_ind_read_dxpl_id,
+ result = H5C_expunge_entry(file_ptr,
types[0], entry_ptr->addr, H5C__NO_FLAGS_SET);
if(result > 0) {
@@ -16818,7 +16877,7 @@ check_expunge_entry_errs(unsigned paged)
if(pass) {
- result = H5C_expunge_entry(file_ptr, H5AC_ind_read_dxpl_id,
+ result = H5C_expunge_entry(file_ptr,
types[0], entry_ptr->addr, H5C__NO_FLAGS_SET);
if(result < 0) {
@@ -17115,7 +17174,7 @@ check_unprotect_ro_dirty_err(unsigned paged)
if(pass) {
- result = H5C_unprotect(file_ptr, H5AC_ind_read_dxpl_id,
+ result = H5C_unprotect(file_ptr,
entry_ptr->addr, (void *)entry_ptr, H5C__DIRTIED_FLAG);
if(result >= 0) {
@@ -17157,7 +17216,7 @@ check_unprotect_ro_dirty_err(unsigned paged)
if(pass) {
- result = H5C_unprotect(file_ptr, H5AC_ind_read_dxpl_id,
+ result = H5C_unprotect(file_ptr,
entry_ptr->addr, (void *)entry_ptr, H5C__DIRTIED_FLAG);
if(result > 0) {
@@ -17244,7 +17303,7 @@ check_protect_ro_rw_err(unsigned paged)
if(pass) {
- thing_ptr = (H5C_cache_entry_t *)H5C_protect(file_ptr, H5AC_ind_read_dxpl_id,
+ thing_ptr = (H5C_cache_entry_t *)H5C_protect(file_ptr,
types[0], entry_ptr->addr,
&entry_ptr->addr, H5C__NO_FLAGS_SET);
@@ -17339,7 +17398,7 @@ check_protect_retries(unsigned paged)
entry_ptr->max_verify_ct = 3;
entry_ptr->verify_ct = 0;
- cache_entry_ptr = (H5C_cache_entry_t *)H5C_protect(file_ptr, H5AC_ind_read_dxpl_id,
+ cache_entry_ptr = (H5C_cache_entry_t *)H5C_protect(file_ptr,
types[type], entry_ptr->addr, &entry_ptr->addr, H5C__READ_ONLY_FLAG);
if((cache_entry_ptr != (void *)entry_ptr) ||
@@ -17384,7 +17443,7 @@ check_protect_retries(unsigned paged)
entry_ptr->max_verify_ct = 11;
entry_ptr->verify_ct = 0;
- cache_entry_ptr = (H5C_cache_entry_t *)H5C_protect(file_ptr, H5AC_ind_read_dxpl_id,
+ cache_entry_ptr = (H5C_cache_entry_t *)H5C_protect(file_ptr,
types[type], entry_ptr->addr, &entry_ptr->addr, H5C__READ_ONLY_FLAG);
/* H5C_protect() should fail after all retries fail */
@@ -24438,7 +24497,7 @@ check_auto_cache_resize_epoch_markers(unsigned paged)
};
if(paged)
- TESTING("automatic cache resize epoch marker management (paged aggregation)")
+ TESTING("automatic cache resize epoch marker management (paged aggr)")
else
TESTING("automatic cache resize epoch marker management")
@@ -28230,13 +28289,13 @@ check_metadata_blizzard_absence(hbool_t fill_via_insertion, unsigned paged)
if(fill_via_insertion) {
if(paged)
- TESTING("to ensure metadata blizzard absence when inserting (paged aggregation)")
+ TESTING("to ensure metadata blizzard absence when inserting (pgd aggr)")
else
TESTING("to ensure metadata blizzard absence when inserting")
} /* end if */
else {
if(paged)
- TESTING("to ensure metadata blizzard absence on protect/unprotect (paged aggregation)")
+ TESTING("to ensure metadata blizzard absence on protect/unprotect (pa)")
else
TESTING("to ensure metadata blizzard absence on protect/unprotect")
} /* end else */
@@ -30959,7 +31018,7 @@ check_flush_deps_order(unsigned paged)
/* Reset index for tracking flush order */
flush_order = 0;
- result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__NO_FLAGS_SET);
+ result = H5C_flush_cache(file_ptr, H5C__NO_FLAGS_SET);
if(result < 0) CACHE_ERROR("flushing entries with flush dependendices")
/* Change expected values, and verify the status of the entries
@@ -31065,7 +31124,7 @@ check_flush_deps_order(unsigned paged)
/* Reset index for tracking flush order */
flush_order = 0;
- result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__NO_FLAGS_SET);
+ result = H5C_flush_cache(file_ptr, H5C__NO_FLAGS_SET);
if(result < 0) CACHE_ERROR("flushing entries with flush dependendices")
/* Change expected values, and verify the status of the entries
@@ -31177,7 +31236,7 @@ check_flush_deps_order(unsigned paged)
/* Reset index for tracking flush order */
flush_order = 0;
- result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__NO_FLAGS_SET);
+ result = H5C_flush_cache(file_ptr, H5C__NO_FLAGS_SET);
if(result < 0) CACHE_ERROR("flushing entries with flush dependendices")
/* Change expected values, and verify the status of the entries
@@ -31296,7 +31355,7 @@ check_flush_deps_order(unsigned paged)
/* Reset index for tracking flush order */
flush_order = 0;
- result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__NO_FLAGS_SET);
+ result = H5C_flush_cache(file_ptr, H5C__NO_FLAGS_SET);
if(result < 0) CACHE_ERROR("flushing entries with flush dependendices")
/* Change expected values, and verify the status of the entries
@@ -31472,7 +31531,7 @@ check_flush_deps_order(unsigned paged)
/* Reset index for tracking flush order */
flush_order = 0;
- result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__NO_FLAGS_SET);
+ result = H5C_flush_cache(file_ptr, H5C__NO_FLAGS_SET);
if(result < 0) CACHE_ERROR("flushing entries with flush dependendices")
/* Change expected values, and verify the status of the entries
@@ -31682,7 +31741,7 @@ check_flush_deps_order(unsigned paged)
/* Reset index for tracking flush order */
flush_order = 0;
- result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__NO_FLAGS_SET);
+ result = H5C_flush_cache(file_ptr, H5C__NO_FLAGS_SET);
if(result < 0) CACHE_ERROR("flushing entries with flush dependendices")
/* Change expected values, and verify the status of the entries
@@ -31840,7 +31899,7 @@ check_flush_deps_order(unsigned paged)
/* Reset index for tracking flush order */
flush_order = 0;
- result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__NO_FLAGS_SET);
+ result = H5C_flush_cache(file_ptr, H5C__NO_FLAGS_SET);
if(result < 0) CACHE_ERROR("flushing entries with flush dependendices")
/* Change expected values, and verify the status of the entries
@@ -31974,7 +32033,7 @@ check_flush_deps_order(unsigned paged)
/* Reset index for tracking flush order */
flush_order = 0;
- result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__NO_FLAGS_SET);
+ result = H5C_flush_cache(file_ptr, H5C__NO_FLAGS_SET);
if(result < 0) CACHE_ERROR("flushing entries with flush dependendices")
/* Change expected values, and verify the status of the entries
@@ -32167,7 +32226,7 @@ check_flush_deps_order(unsigned paged)
/* Reset index for tracking flush order */
flush_order = 0;
- result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__NO_FLAGS_SET);
+ result = H5C_flush_cache(file_ptr, H5C__NO_FLAGS_SET);
if(result < 0) CACHE_ERROR("flushing entries with flush dependendices")
/* Change expected values, and verify the status of the entries
@@ -32406,7 +32465,7 @@ check_flush_deps_order(unsigned paged)
/* Reset index for tracking flush order */
flush_order = 0;
- result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__NO_FLAGS_SET);
+ result = H5C_flush_cache(file_ptr, H5C__NO_FLAGS_SET);
if(result < 0) CACHE_ERROR("flushing entries with flush dependendices")
/* Change expected values, and verify the status of the entries
@@ -32663,7 +32722,7 @@ check_flush_deps_order(unsigned paged)
/* Reset index for tracking flush order */
flush_order = 0;
- result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__NO_FLAGS_SET);
+ result = H5C_flush_cache(file_ptr, H5C__NO_FLAGS_SET);
if(result < 0) CACHE_ERROR("flushing entries with flush dependendices")
/* Change expected values, and verify the status of the entries
@@ -32950,7 +33009,7 @@ check_flush_deps_order(unsigned paged)
/* Reset index for tracking flush order */
flush_order = 0;
- result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__NO_FLAGS_SET);
+ result = H5C_flush_cache(file_ptr, H5C__NO_FLAGS_SET);
if(result < 0) CACHE_ERROR("flushing entries with flush dependendices")
/* Change expected values, and verify the status of the entries
@@ -33266,7 +33325,7 @@ check_flush_deps_order(unsigned paged)
/* Reset index for tracking flush order */
flush_order = 0;
- result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__NO_FLAGS_SET);
+ result = H5C_flush_cache(file_ptr, H5C__NO_FLAGS_SET);
if(result < 0) CACHE_ERROR("flushing entries with flush dependendices")
/* Change expected values, and verify the status of the entries
@@ -34383,7 +34442,7 @@ check_entry_deletions_during_scans(unsigned paged)
H5F_t * file_ptr = NULL;
if(paged)
- TESTING("entry deletion during list scan detection and adaption (paged aggregation)")
+ TESTING("entry deletion during list scan detection and adaption (par)")
else
TESTING("entry deletion during list scan detection and adaption")
@@ -34604,7 +34663,7 @@ cedds__expunge_dirty_entry_in_flush_test(H5F_t * file_ptr)
if(pass) {
- result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__FLUSH_INVALIDATE_FLAG);
+ result = H5C_flush_cache(file_ptr, H5C__FLUSH_INVALIDATE_FLAG);
if(result < 0) {
@@ -34956,7 +35015,7 @@ cedds__H5C_make_space_in_cache(H5F_t * file_ptr)
if(pass) {
- result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__FLUSH_INVALIDATE_FLAG);
+ result = H5C_flush_cache(file_ptr, H5C__FLUSH_INVALIDATE_FLAG);
if(result < 0) {
@@ -35392,7 +35451,7 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t * file_ptr)
if(pass) {
- result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__FLUSH_INVALIDATE_FLAG);
+ result = H5C_flush_cache(file_ptr, H5C__FLUSH_INVALIDATE_FLAG);
if(result < 0) {
@@ -35779,7 +35838,7 @@ cedds__H5C_flush_invalidate_cache__bucket_scan(H5F_t * file_ptr)
if(pass) {
- result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__FLUSH_INVALIDATE_FLAG);
+ result = H5C_flush_cache(file_ptr, H5C__FLUSH_INVALIDATE_FLAG);
if(result < 0) {
@@ -36252,7 +36311,7 @@ check_stats__smoke_check_1(H5F_t * file_ptr)
if(pass) {
- result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id, H5C__FLUSH_INVALIDATE_FLAG);
+ result = H5C_flush_cache(file_ptr, H5C__FLUSH_INVALIDATE_FLAG);
if(result < 0) {
@@ -36394,6 +36453,18 @@ main(void)
/* Test with paged aggregation enabled or not */
/* Each test will call setup_cache() which set up the file space strategy according to "paged" */
for(paged = FALSE; paged <= TRUE; paged++) {
+
+ if ( paged ) {
+
+ HDfprintf(stdout,
+ "\n\nRe-running tests with paged aggregation:\n");
+
+ if ( express_test > 0 )
+ HDfprintf(stdout, " Skipping smoke checks.\n");
+
+ HDfprintf(stdout, "\n");
+ }
+
nerrs += smoke_check_1(express_test, paged);
nerrs += smoke_check_2(express_test, paged);
nerrs += smoke_check_3(express_test, paged);
diff --git a/test/cache_api.c b/test/cache_api.c
index 867f055..7c0ffa3 100644
--- a/test/cache_api.c
+++ b/test/cache_api.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* Programmer: John Mainzer
diff --git a/test/cache_common.c b/test/cache_common.c
index 52dbb52..5596601 100644
--- a/test/cache_common.c
+++ b/test/cache_common.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* Programmer: John Mainzer
@@ -19,6 +17,7 @@
* This file contains common code for tests of the cache
* implemented in H5C.c
*/
+#include "H5CXprivate.h" /* API Contexts */
#include "H5MFprivate.h"
#include "H5MMprivate.h"
#include "cache_common.h"
@@ -131,37 +130,37 @@ static herr_t monster_image_len(const void *thing, size_t *image_len_ptr);
static herr_t variable_image_len(const void *thing, size_t *image_len_ptr);
static herr_t notify_image_len(const void *thing, size_t *image_len_ptr);
-static herr_t pico_pre_serialize(H5F_t *f, hid_t dxpl_id, void *thing,
+static herr_t pico_pre_serialize(H5F_t *f, void *thing,
haddr_t addr, size_t len, haddr_t *new_addr_ptr,
size_t *new_len_ptr, unsigned *flags_ptr);
-static herr_t nano_pre_serialize(H5F_t *f, hid_t dxpl_id, void *thing,
+static herr_t nano_pre_serialize(H5F_t *f, void *thing,
haddr_t addr, size_t len, haddr_t *new_addr_ptr,
size_t *new_len_ptr, unsigned *flags_ptr);
-static herr_t micro_pre_serialize(H5F_t *f, hid_t dxpl_id, void *thing,
+static herr_t micro_pre_serialize(H5F_t *f, void *thing,
haddr_t addr, size_t len, haddr_t *new_addr_ptr,
size_t *new_len_ptr, unsigned *flags_ptr);
-static herr_t tiny_pre_serialize(H5F_t *f, hid_t dxpl_id, void *thing,
+static herr_t tiny_pre_serialize(H5F_t *f, void *thing,
haddr_t addr, size_t len, haddr_t *new_addr_ptr,
size_t *new_len_ptr, unsigned *flags_ptr);
-static herr_t small_pre_serialize(H5F_t *f, hid_t dxpl_id, void *thing,
+static herr_t small_pre_serialize(H5F_t *f, void *thing,
haddr_t addr, size_t len, haddr_t *new_addr_ptr,
size_t *new_len_ptr, unsigned *flags_ptr);
-static herr_t medium_pre_serialize(H5F_t *f, hid_t dxpl_id, void *thing,
+static herr_t medium_pre_serialize(H5F_t *f, void *thing,
haddr_t addr, size_t len, haddr_t *new_addr_ptr,
size_t *new_len_ptr, unsigned *flags_ptr);
-static herr_t large_pre_serialize(H5F_t *f, hid_t dxpl_id, void *thing,
+static herr_t large_pre_serialize(H5F_t *f, void *thing,
haddr_t addr, size_t len, haddr_t *new_addr_ptr,
size_t *new_len_ptr, unsigned *flags_ptr);
-static herr_t huge_pre_serialize(H5F_t *f, hid_t dxpl_id, void *thing,
+static herr_t huge_pre_serialize(H5F_t *f, void *thing,
haddr_t addr, size_t len, haddr_t *new_addr_ptr,
size_t *new_len_ptr, unsigned *flags_ptr);
-static herr_t monster_pre_serialize(H5F_t *f, hid_t dxpl_id, void *thing,
+static herr_t monster_pre_serialize(H5F_t *f, void *thing,
haddr_t addr, size_t len, haddr_t *new_addr_ptr,
size_t *new_len_ptr, unsigned *flags_ptr);
-static herr_t variable_pre_serialize(H5F_t *f, hid_t dxpl_id, void *thing,
+static herr_t variable_pre_serialize(H5F_t *f, void *thing,
haddr_t addr, size_t len, haddr_t *new_addr_ptr,
size_t *new_len_ptr, unsigned *flags_ptr);
-static herr_t notify_pre_serialize(H5F_t *f, hid_t dxpl_id, void *thing,
+static herr_t notify_pre_serialize(H5F_t *f, void *thing,
haddr_t addr, size_t len, haddr_t *new_addr_ptr,
size_t *new_len_ptr, unsigned *flags_ptr);
@@ -214,7 +213,7 @@ static herr_t get_final_load_size(const void *image, size_t image_len,
static void *deserialize(const void *image_ptr, size_t len, void *udata_ptr,
hbool_t *dirty_ptr, int32_t entry_type);
static herr_t image_len(const void *thing, size_t *image_len_ptr, int32_t entry_type);
-static herr_t pre_serialize(H5F_t *f, hid_t dxpl_id, void *thing,
+static herr_t pre_serialize(H5F_t *f, void *thing,
haddr_t addr, size_t len, haddr_t *new_addr_ptr, size_t *new_len_ptr,
unsigned *flags_ptr);
static herr_t serialize(const H5F_t *f, void *image_ptr, size_t len,
@@ -1125,7 +1124,6 @@ notify_image_len(const void *thing, size_t *image_length)
*/
herr_t
pre_serialize(H5F_t *f,
- hid_t H5_ATTR_UNUSED dxpl_id,
void *thing,
haddr_t addr,
size_t len,
@@ -1210,7 +1208,6 @@ pre_serialize(H5F_t *f,
herr_t
pico_pre_serialize(H5F_t *f,
- hid_t dxpl_id,
void *thing,
haddr_t addr,
size_t len,
@@ -1218,13 +1215,12 @@ pico_pre_serialize(H5F_t *f,
size_t *new_len_ptr,
unsigned *flags_ptr)
{
- return pre_serialize(f, dxpl_id, thing, addr, len,
+ return pre_serialize(f, thing, addr, len,
new_addr_ptr, new_len_ptr, flags_ptr);
}
herr_t
nano_pre_serialize(H5F_t *f,
- hid_t dxpl_id,
void *thing,
haddr_t addr,
size_t len,
@@ -1232,13 +1228,12 @@ nano_pre_serialize(H5F_t *f,
size_t *new_len_ptr,
unsigned *flags_ptr)
{
- return pre_serialize(f, dxpl_id, thing, addr, len,
+ return pre_serialize(f, thing, addr, len,
new_addr_ptr, new_len_ptr, flags_ptr);
}
herr_t
micro_pre_serialize(H5F_t *f,
- hid_t dxpl_id,
void *thing,
haddr_t addr,
size_t len,
@@ -1246,13 +1241,12 @@ micro_pre_serialize(H5F_t *f,
size_t *new_len_ptr,
unsigned *flags_ptr)
{
- return pre_serialize(f, dxpl_id, thing, addr, len,
+ return pre_serialize(f, thing, addr, len,
new_addr_ptr, new_len_ptr, flags_ptr);
}
herr_t
tiny_pre_serialize(H5F_t *f,
- hid_t dxpl_id,
void *thing,
haddr_t addr,
size_t len,
@@ -1260,13 +1254,12 @@ tiny_pre_serialize(H5F_t *f,
size_t *new_len_ptr,
unsigned *flags_ptr)
{
- return pre_serialize(f, dxpl_id, thing, addr, len,
+ return pre_serialize(f, thing, addr, len,
new_addr_ptr, new_len_ptr, flags_ptr);
}
herr_t
small_pre_serialize(H5F_t *f,
- hid_t dxpl_id,
void *thing,
haddr_t addr,
size_t len,
@@ -1274,13 +1267,12 @@ small_pre_serialize(H5F_t *f,
size_t *new_len_ptr,
unsigned *flags_ptr)
{
- return pre_serialize(f, dxpl_id, thing, addr, len,
+ return pre_serialize(f, thing, addr, len,
new_addr_ptr, new_len_ptr, flags_ptr);
}
herr_t
medium_pre_serialize(H5F_t *f,
- hid_t dxpl_id,
void *thing,
haddr_t addr,
size_t len,
@@ -1288,13 +1280,12 @@ medium_pre_serialize(H5F_t *f,
size_t *new_len_ptr,
unsigned *flags_ptr)
{
- return pre_serialize(f, dxpl_id, thing, addr, len,
+ return pre_serialize(f, thing, addr, len,
new_addr_ptr, new_len_ptr, flags_ptr);
}
herr_t
large_pre_serialize(H5F_t *f,
- hid_t dxpl_id,
void *thing,
haddr_t addr,
size_t len,
@@ -1302,13 +1293,12 @@ large_pre_serialize(H5F_t *f,
size_t *new_len_ptr,
unsigned *flags_ptr)
{
- return pre_serialize(f, dxpl_id, thing, addr, len,
+ return pre_serialize(f, thing, addr, len,
new_addr_ptr, new_len_ptr, flags_ptr);
}
herr_t
huge_pre_serialize(H5F_t *f,
- hid_t dxpl_id,
void *thing,
haddr_t addr,
size_t len,
@@ -1316,13 +1306,12 @@ huge_pre_serialize(H5F_t *f,
size_t *new_len_ptr,
unsigned *flags_ptr)
{
- return pre_serialize(f, dxpl_id, thing, addr, len,
+ return pre_serialize(f, thing, addr, len,
new_addr_ptr, new_len_ptr, flags_ptr);
}
herr_t
monster_pre_serialize(H5F_t *f,
- hid_t dxpl_id,
void *thing,
haddr_t addr,
size_t len,
@@ -1330,13 +1319,12 @@ monster_pre_serialize(H5F_t *f,
size_t *new_len_ptr,
unsigned *flags_ptr)
{
- return pre_serialize(f, dxpl_id, thing, addr, len,
+ return pre_serialize(f, thing, addr, len,
new_addr_ptr, new_len_ptr, flags_ptr);
}
herr_t
variable_pre_serialize(H5F_t *f,
- hid_t dxpl_id,
void *thing,
haddr_t addr,
size_t len,
@@ -1344,13 +1332,12 @@ variable_pre_serialize(H5F_t *f,
size_t *new_len_ptr,
unsigned *flags_ptr)
{
- return pre_serialize(f, dxpl_id, thing, addr, len,
+ return pre_serialize(f, thing, addr, len,
new_addr_ptr, new_len_ptr, flags_ptr);
}
herr_t
notify_pre_serialize(H5F_t *f,
- hid_t dxpl_id,
void *thing,
haddr_t addr,
size_t len,
@@ -1358,7 +1345,7 @@ notify_pre_serialize(H5F_t *f,
size_t *new_len_ptr,
unsigned *flags_ptr)
{
- return pre_serialize(f, dxpl_id, thing, addr, len,
+ return pre_serialize(f, thing, addr, len,
new_addr_ptr, new_len_ptr, flags_ptr);
}
@@ -2438,8 +2425,10 @@ reset_entries(void)
base_addr[j].header.ro_ref_count = FALSE;
base_addr[j].header.next = NULL;
base_addr[j].header.prev = NULL;
+#if H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS
base_addr[j].header.aux_next = NULL;
base_addr[j].header.aux_prev = NULL;
+#endif /* H5C_MAINTAIN_CLEAN_AND_DIRTY_LRU_LISTS */
base_addr[j].self = &(base_addr[j]);
base_addr[j].cache_ptr = NULL;
@@ -3279,6 +3268,9 @@ setup_cache(size_t max_cache_size,
} /* end if */
} /* end if */
+ /* Push API context */
+ H5CX_push();
+
if(show_progress) /* 4 */
HDfprintf(stdout, "%s() - %0d -- pass = %d\n",
FUNC, mile_stone++, (int)pass);
@@ -3379,8 +3371,7 @@ setup_cache(size_t max_cache_size,
FUNC, mile_stone++, (int)pass);
if(pass) { /* allocate space for test entries */
- actual_base_addr = H5MF_alloc(file_ptr, H5FD_MEM_DEFAULT, H5AC_ind_read_dxpl_id,
- (hsize_t)(ADDR_SPACE_SIZE + BASE_ADDR));
+ actual_base_addr = H5MF_alloc(file_ptr, H5FD_MEM_DEFAULT, (hsize_t)(ADDR_SPACE_SIZE + BASE_ADDR));
if(actual_base_addr == HADDR_UNDEF) {
pass = FALSE;
@@ -3455,7 +3446,7 @@ takedown_cache(H5F_t * file_ptr,
H5C_stats(cache_ptr, "test cache", dump_detailed_stats);
}
- if ( H5C_prep_for_file_close(file_ptr, H5P_DATASET_XFER_DEFAULT) < 0 ) {
+ if ( H5C_prep_for_file_close(file_ptr) < 0 ) {
pass = FALSE;
failure_mssg = "unexpected failure of prep for file close.\n";
@@ -3463,7 +3454,7 @@ takedown_cache(H5F_t * file_ptr,
flush_cache(file_ptr, TRUE, FALSE, FALSE);
- H5C_dest(file_ptr, H5AC_ind_read_dxpl_id);
+ H5C_dest(file_ptr);
if ( saved_cache != NULL ) {
@@ -3493,7 +3484,7 @@ takedown_cache(H5F_t * file_ptr,
HDassert ( file_ptr );
}
- H5MF_xfree(file_ptr, H5FD_MEM_DEFAULT, H5AC_ind_read_dxpl_id, saved_actual_base_addr,
+ H5MF_xfree(file_ptr, H5FD_MEM_DEFAULT, saved_actual_base_addr,
(hsize_t)(ADDR_SPACE_SIZE + BASE_ADDR));
saved_actual_base_addr = HADDR_UNDEF;
}
@@ -3509,6 +3500,9 @@ takedown_cache(H5F_t * file_ptr,
}
+ /* Pop API context */
+ H5CX_pop();
+
if ( ( ! try_core_file_driver ) || ( core_file_driver_failed ) ) {
if ( h5_fixname(FILENAME[0], H5P_DEFAULT, filename, sizeof(filename))
@@ -3582,8 +3576,7 @@ expunge_entry(H5F_t * file_ptr,
HDassert( ! ( entry_ptr->header.is_pinned ) );
HDassert( ! ( entry_ptr->is_pinned ) );
- result = H5C_expunge_entry(file_ptr, H5AC_ind_read_dxpl_id,
- types[type], entry_ptr->addr, H5C__NO_FLAGS_SET);
+ result = H5C_expunge_entry(file_ptr, types[type], entry_ptr->addr, H5C__NO_FLAGS_SET);
if ( result < 0 ) {
@@ -3634,12 +3627,10 @@ flush_cache(H5F_t * file_ptr,
cache_ptr = file_ptr->shared->cache;
if(destroy_entries)
- result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id,
- H5C__FLUSH_INVALIDATE_FLAG);
+ result = H5C_flush_cache(file_ptr, H5C__FLUSH_INVALIDATE_FLAG);
else
- result = H5C_flush_cache(file_ptr, H5AC_ind_read_dxpl_id,
- H5C__NO_FLAGS_SET);
+ result = H5C_flush_cache(file_ptr, H5C__NO_FLAGS_SET);
if(dump_stats)
H5C_stats(cache_ptr, "test cache", dump_detailed_stats);
@@ -3767,7 +3758,6 @@ insert_entry(H5F_t * file_ptr,
{
H5C_t * cache_ptr;
herr_t result;
- hid_t xfer = H5AC_ind_read_dxpl_id;
hbool_t insert_pinned;
test_entry_t * base_addr;
test_entry_t * entry_ptr;
@@ -3798,13 +3788,9 @@ insert_entry(H5F_t * file_ptr,
/* Set the base address of the entry type into the property list as tag */
/* Use to cork entries for the object */
- if(H5AC_tag(xfer, baddrs, NULL) < 0) {
- pass = FALSE;
- failure_mssg = "error in H5P_set().";
- }
+ H5AC_tag(baddrs, NULL);
- result = H5C_insert_entry(file_ptr, xfer,
- types[type], entry_ptr->addr, (void *)entry_ptr, flags);
+ result = H5C_insert_entry(file_ptr, types[type], entry_ptr->addr, (void *)entry_ptr, flags);
if ( ( result < 0 ) ||
( entry_ptr->header.is_protected ) ||
@@ -4050,7 +4036,6 @@ protect_entry(H5F_t * file_ptr, int32_t type, int32_t idx)
test_entry_t * base_addr;
test_entry_t * entry_ptr;
haddr_t baddrs;
- hid_t xfer = H5AC_ind_read_dxpl_id;
H5C_cache_entry_t * cache_entry_ptr;
if(pass) {
@@ -4071,12 +4056,9 @@ protect_entry(H5F_t * file_ptr, int32_t type, int32_t idx)
/* Set the base address of the entry type into the property list as tag */
/* Use to cork entries for the object */
- if(H5AC_tag(xfer, baddrs, NULL) < 0) {
- pass = FALSE;
- failure_mssg = "error in H5P_set().";
- } /* end if */
+ H5AC_tag(baddrs, NULL);
- cache_entry_ptr = (H5C_cache_entry_t *)H5C_protect(file_ptr, xfer,
+ cache_entry_ptr = (H5C_cache_entry_t *)H5C_protect(file_ptr,
types[type], entry_ptr->addr, &entry_ptr->addr,
H5C__NO_FLAGS_SET);
@@ -4180,7 +4162,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, H5AC_ind_read_dxpl_id,
+ cache_entry_ptr = (H5C_cache_entry_t *)H5C_protect(file_ptr,
types[type], entry_ptr->addr, &entry_ptr->addr, H5C__READ_ONLY_FLAG);
if ( ( cache_entry_ptr != (void *)entry_ptr ) ||
@@ -4396,8 +4378,7 @@ unprotect_entry(H5F_t * file_ptr,
mark_flush_dep_dirty(entry_ptr);
} /* end if */
- result = H5C_unprotect(file_ptr, H5AC_ind_read_dxpl_id,
- entry_ptr->addr, (void *)entry_ptr, flags);
+ result = H5C_unprotect(file_ptr, entry_ptr->addr, (void *)entry_ptr, flags);
if ( ( result < 0 ) ||
( ( entry_ptr->header.is_protected ) &&
diff --git a/test/cache_common.h b/test/cache_common.h
index f17c16b..8999e44 100644
--- a/test/cache_common.h
+++ b/test/cache_common.h
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* Programmer: John Mainzer
diff --git a/test/cache_image.c b/test/cache_image.c
index dfbd02e..58b0b8f 100644
--- a/test/cache_image.c
+++ b/test/cache_image.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* Programmer: John Mainzer
@@ -7714,6 +7712,7 @@ get_free_sections_test(void)
static unsigned
evict_on_close_test(void)
{
+#ifndef H5_HAVE_PARALLEL
const char * fcn_name = "evict_on_close_test()";
char filename[512];
hbool_t show_progress = FALSE;
@@ -7722,9 +7721,16 @@ evict_on_close_test(void)
H5F_t *file_ptr = NULL;
H5C_t *cache_ptr = NULL;
int cp = 0;
+#endif /* H5_HAVE_PARALLEL */
TESTING("Cache image / evict on close interaction");
+#ifdef H5_HAVE_PARALLEL
+ SKIPPED();
+ HDputs(" EoC not supported in the parallel library.");
+ return 0;
+#else
+
pass = TRUE;
if ( show_progress )
@@ -8013,6 +8019,7 @@ evict_on_close_test(void)
FUNC, failure_mssg);
return !pass;
+#endif /* H5_HAVE_PARALLEL */
} /* evict_on_close_test() */
@@ -8072,4 +8079,3 @@ main(void)
} /* main() */
-
diff --git a/test/cache_logging.c b/test/cache_logging.c
index 9190a8a..b4ed53b 100644
--- a/test/cache_logging.c
+++ b/test/cache_logging.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* Purpose: Tests the metadata cache logging framework */
diff --git a/test/cache_tagging.c b/test/cache_tagging.c
index 957187b..7a2bb49 100644
--- a/test/cache_tagging.c
+++ b/test/cache_tagging.c
@@ -1,14 +1,13 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* Programmer: Mike McGreevy
@@ -23,6 +22,7 @@
#include "testhdf5.h"
#include "cache_common.h"
+#include "H5CXprivate.h" /* API Contexts */
#include "H5HLprivate.h"
/* ============ */
@@ -350,7 +350,7 @@ evict_entries(hid_t fid)
/* Evict all we can from the cache to examine full tag creation tree */
/* This function will likely return failure since the root group
* is still protected. Thus, don't check its return value. */
- H5C_flush_cache(f, H5P_DEFAULT, H5C__FLUSH_INVALIDATE_FLAG);
+ H5C_flush_cache(f, H5C__FLUSH_INVALIDATE_FLAG);
return 0;
@@ -3632,11 +3632,14 @@ error:
static unsigned
check_invalid_tag_application(void)
{
+#if H5C_DO_TAGGING_SANITY_CHECKS
/* Variables */
H5F_t * f = NULL;
- hid_t fid, dxpl_id = -1;
+ hid_t fid = -1;
haddr_t addr;
H5HL_t * lheap = NULL;
+ hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
+#endif /* H5C_DO_TAGGING_SANITY_CHECKS */
/* Testing Macro */
TESTING("failure on invalid tag application");
@@ -3645,38 +3648,43 @@ check_invalid_tag_application(void)
/* Create a test file */
if ( (fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0 ) TEST_ERROR;
+ /* Push API context */
+ if(H5CX_push() < 0) TEST_ERROR
+ api_ctx_pushed = TRUE;
+
/* Get internal file pointer*/
if ( NULL == (f = (H5F_t *)H5I_object(fid)) ) TEST_ERROR;
- /* Create dxpl */
- if ( (dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) TEST_ERROR;
-
/* 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_read_dxpl_id, (size_t)1024, &addr) >= 0) TEST_ERROR;
+ if ( H5HL_create(f, (size_t)1024, &addr) >= 0) TEST_ERROR;
- /* Now set up a tag in the dxpl */
- if ( H5AC_tag(H5AC_ind_read_dxpl_id, (haddr_t)25, NULL) < 0) TEST_ERROR;
+ /* Now set up a tag in the API context */
+ H5AC_tag((haddr_t)25, NULL);
/* Verify the same call to H5HL_create now works as intended, with a tag set up. */
- if ( H5HL_create(f, H5AC_ind_read_dxpl_id, (size_t)1024, &addr) < 0) TEST_ERROR;
+ if ( H5HL_create(f, (size_t)1024, &addr) < 0) TEST_ERROR;
- /* Reset dxpl to use invalid tag. */
- if ( H5AC_tag(H5AC_ind_read_dxpl_id, H5AC__INVALID_TAG, NULL) < 0) TEST_ERROR;
+ /* Reset API context to use invalid tag. */
+ H5AC_tag(H5AC__INVALID_TAG, NULL);
/* 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_read_dxpl_id, addr, H5AC__NO_FLAGS_SET)) != NULL ) TEST_ERROR;
+ if (( lheap = H5HL_protect(f, addr, H5AC__NO_FLAGS_SET)) != NULL ) TEST_ERROR;
/* Again, set up a valid tag in the DXPL */
- if ( H5AC_tag(H5AC_ind_read_dxpl_id, (haddr_t)25, NULL) < 0) TEST_ERROR;
+ H5AC_tag((haddr_t)25, NULL);
/* Call H5HL_protect again to protect the local heap. This should succeed. */
- if (( lheap = H5HL_protect(f, H5AC_ind_read_dxpl_id, addr, H5AC__NO_FLAGS_SET)) == NULL ) TEST_ERROR;
+ if (( lheap = H5HL_protect(f, 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;
+ /* Pop API context */
+ if(api_ctx_pushed && H5CX_pop() < 0) TEST_ERROR
+ api_ctx_pushed = FALSE;
+
/* Close open objects and file */
if ( H5Fclose(fid) < 0 ) TEST_ERROR;
@@ -3684,12 +3692,16 @@ check_invalid_tag_application(void)
PASSED();
#else
SKIPPED();
- printf(" test skipped because sanity checking on tag value is disabled.\n");
-#endif
+ HDprintf(" test skipped because sanity checking on tag value is disabled.\n");
+#endif /* H5C_DO_TAGGING_SANITY_CHECKS */
return 0;
error:
+#if H5C_DO_TAGGING_SANITY_CHECKS
+ if(api_ctx_pushed) H5CX_pop();
+#endif /* H5C_DO_TAGGING_SANITY_CHECKS */
+
return 1;
} /* check_invalid_tag_application */
@@ -3792,10 +3804,10 @@ main(void)
HDremove(FILENAME2);
/* Return Errors */
- return(nerrs > 0);
+ return nerrs > 0;
error:
/* Return with Error */
- return(1);
+ return 1;
} /* main */
diff --git a/test/chunk_info.c b/test/chunk_info.c
index 68bf774..e3006cc 100644
--- a/test/chunk_info.c
+++ b/test/chunk_info.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
@@ -23,7 +21,6 @@
*/
-#include "hdf5.h"
#include "h5test.h"
#define PRINT_DATA
diff --git a/test/cmpd_dset.c b/test/cmpd_dset.c
index b44a847..5d6cfc7 100644
--- a/test/cmpd_dset.c
+++ b/test/cmpd_dset.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
diff --git a/test/cork.c b/test/cork.c
index 6cca163..8c685ee 100644
--- a/test/cork.c
+++ b/test/cork.c
@@ -1,14 +1,13 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* Programmer: Vailin Choi
diff --git a/test/cross_read.c b/test/cross_read.c
index 8df81f0..2219151 100644
--- a/test/cross_read.c
+++ b/test/cross_read.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
@@ -228,7 +226,9 @@ check_file(char *filename)
const char *pathname = H5_get_srcdir_filename(filename); /* Corrected test file name */
hid_t fid = -1; /* file ID */
int nerrors = 0; /* # of datasets with errors */
+#if !defined(H5_HAVE_FILTER_DEFLATE) || !defined(H5_HAVE_FILTER_SZIP)
const char *not_supported= " filter is not enabled."; /* no filter message */
+#endif
/* Open the file. */
if((fid = H5Fopen(pathname, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
diff --git a/test/dangle.c b/test/dangle.c
index 4c8ce6b..75e9c84 100644
--- a/test/dangle.c
+++ b/test/dangle.c
@@ -5,22 +5,19 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
* Tuesday, May 13, 2003
*
- * Purpose: Test dangling IDs
+ * Purpose: Test dangling IDs
*/
#include "h5test.h"
-#include "H5private.h"
const char *FILENAME[] = {
"dangle",
@@ -34,17 +31,17 @@ const char *FILENAME[] = {
#define TYPENAME "Type"
#define ATTRNAME "Attribute"
-
+
/*-------------------------------------------------------------------------
- * Function: test_dangle_dataset
+ * Function: test_dangle_dataset
*
- * Purpose: Check for dangling dataset IDs causing problems on library
+ * Purpose: Check for dangling dataset IDs causing problems on library
* shutdown
*
- * Return: Success: zero
- * Failure: non-zero
+ * Return: Success: zero
+ * Failure: non-zero
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, May 13, 2003
*
* Modifications:
@@ -54,7 +51,7 @@ const char *FILENAME[] = {
static int
test_dangle_dataset(H5F_close_degree_t degree)
{
- char filename[1024];
+ char filename[1024];
hid_t fid; /* File ID */
hid_t fapl; /* File access property list */
hid_t dsid; /* Dataset ID */
@@ -130,17 +127,17 @@ error:
return 1;
}
-
+
/*-------------------------------------------------------------------------
- * Function: test_dangle_group
+ * Function: test_dangle_group
*
- * Purpose: Check for dangling group IDs causing problems on library
+ * Purpose: Check for dangling group IDs causing problems on library
* shutdown
*
- * Return: Success: zero
- * Failure: non-zero
+ * Return: Success: zero
+ * Failure: non-zero
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, May 13, 2003
*
* Modifications:
@@ -150,7 +147,7 @@ error:
static int
test_dangle_group(H5F_close_degree_t degree)
{
- char filename[1024];
+ char filename[1024];
hid_t fid; /* File ID */
hid_t fapl; /* File access property list */
hid_t gid; /* Group ID */
@@ -221,17 +218,17 @@ error:
return 1;
}
-
+
/*-------------------------------------------------------------------------
- * Function: test_dangle_datatype1
+ * Function: test_dangle_datatype1
*
- * Purpose: Check for dangling datatype IDs causing problems on library
+ * Purpose: Check for dangling datatype IDs causing problems on library
* shutdown
*
- * Return: Success: zero
- * Failure: non-zero
+ * Return: Success: zero
+ * Failure: non-zero
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, May 13, 2003
*
* Modifications:
@@ -241,7 +238,7 @@ error:
static int
test_dangle_datatype1(H5F_close_degree_t degree)
{
- char filename[1024];
+ char filename[1024];
hid_t fid; /* File ID */
hid_t fapl; /* File access property list */
hid_t tid; /* Datatype ID */
@@ -317,17 +314,17 @@ error:
return 1;
}
-
+
/*-------------------------------------------------------------------------
- * Function: test_dangle_datatype2
+ * Function: test_dangle_datatype2
*
- * Purpose: Check for dangling datatype IDs causing problems on library
+ * Purpose: Check for dangling datatype IDs causing problems on library
* shutdown
*
- * Return: Success: zero
- * Failure: non-zero
+ * Return: Success: zero
+ * Failure: non-zero
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, August 25, 2005
*
* Modifications:
@@ -337,7 +334,7 @@ error:
static int
test_dangle_datatype2(H5F_close_degree_t degree)
{
- char filename[1024];
+ char filename[1024];
hid_t fid; /* File ID */
hid_t fapl; /* File access property list */
hid_t did; /* Dataset ID */
@@ -404,17 +401,17 @@ error:
return 1;
}
-
+
/*-------------------------------------------------------------------------
- * Function: test_dangle_attribute
+ * Function: test_dangle_attribute
*
- * Purpose: Check for dangling attribute IDs causing problems on library
+ * Purpose: Check for dangling attribute IDs causing problems on library
* shutdown
*
- * Return: Success: zero
- * Failure: non-zero
+ * Return: Success: zero
+ * Failure: non-zero
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Wednesday, June 18, 2003
*
* Modifications:
@@ -424,7 +421,7 @@ error:
static int
test_dangle_attribute(H5F_close_degree_t degree)
{
- char filename[1024];
+ char filename[1024];
hid_t fid; /* File ID */
hid_t fapl; /* File access property list */
hid_t dsid; /* Dataset ID */
@@ -511,17 +508,17 @@ error:
return 1;
}
-
+
/*-------------------------------------------------------------------------
- * Function: test_dangle_force
+ * Function: test_dangle_force
*
- * Purpose: Shut down all danging IDs with generic file & ID routines,
+ * Purpose: Shut down all danging IDs with generic file & ID routines,
* instead of letting library shut then down.
*
- * Return: Success: zero
- * Failure: non-zero
+ * Return: Success: zero
+ * Failure: non-zero
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Friday, October 29, 2010
*
*-------------------------------------------------------------------------
@@ -529,7 +526,7 @@ error:
static int
test_dangle_force(void)
{
- char filename[1024];
+ char filename[1024];
hid_t fid; /* File ID */
hid_t gid, gid2; /* Group IDs */
hid_t dsid, dsid2; /* Dataset IDs */
@@ -627,7 +624,7 @@ test_dangle_force(void)
/* Release object ID array */
HDfree(objs);
-
+
PASSED();
return 0;
@@ -637,16 +634,16 @@ error:
return 1;
}
-
+
/*-------------------------------------------------------------------------
- * Function: main
+ * Function: main
*
- * Purpose: Executes dangling ID tests
+ * Purpose: Executes dangling ID tests
*
- * Return: Success: zero
- * Failure: non-zero
+ * Return: Success: zero
+ * Failure: non-zero
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, May 13, 2003
*
* Modifications:
@@ -656,7 +653,7 @@ error:
int
main(void)
{
- int nerrors=0;
+ int nerrors=0;
/* Run tests w/weak file close */
puts("Testing dangling objects with weak file close:");
diff --git a/test/dsets.c b/test/dsets.c
index c090174..ca1e3d5 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -5,31 +5,50 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
- * Tuesday, December 9, 1997
+ * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Tuesday, December 9, 1997
*
- * Purpose: Tests the dataset interface (H5D)
+ * Purpose: Tests the dataset interface (H5D)
*/
-
-#define H5D_FRIEND /*suppress error about including H5Dpkg */
+#define H5D_FRIEND /*suppress error about including H5Dpkg */
#define H5D_TESTING
-
-#define H5FD_FRIEND /*suppress error about including H5FDpkg */
+#define H5FD_FRIEND /*suppress error about including H5FDpkg */
#define H5FD_TESTING
-#define H5Z_FRIEND /*suppress error about including H5Zpkg */
+#define H5Z_FRIEND /*suppress error about including H5Zpkg */
-#include "h5test.h"
+#include "testhdf5.h"
#include "H5srcdir.h"
+
+#include "H5Bprivate.h"
+#include "H5CXprivate.h" /* API Contexts */
+#include "H5Iprivate.h"
+#include "H5Pprivate.h"
+
+#define H5F_FRIEND /*suppress error about including H5Fpkg */
+#define H5F_TESTING
+#include "H5Fpkg.h" /* File access */
+
+#define H5S_FRIEND /*suppress error about including H5Spkg */
+#include "H5Spkg.h" /* Dataspace */
+
+#define H5T_FRIEND /*suppress error about including H5Tpkg */
+#include "H5Tpkg.h" /* Datatype */
+
+#define H5A_FRIEND /*suppress error about including H5Apkg */
+#include "H5Apkg.h" /* Attributes */
+
+/* Use in version bound test */
+#define H5O_FRIEND /*suppress error about including H5Opkg */
+#include "H5Opkg.h" /* Object headers */
+
#include "H5Dpkg.h"
#include "H5FDpkg.h"
#include "H5VMprivate.h"
@@ -39,71 +58,74 @@
#endif
const char *FILENAME[] = {
- "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 */
+ "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 */
+ "zero_chunk", /* 16 */
"chunk_single", /* 17 */
"swmr_non_latest", /* 18 */
"earray_hdr_fd", /* 19 */
"farray_hdr_fd", /* 20 */
"bt2_hdr_fd", /* 21 */
- "storage_size", /* 22 */
+ "storage_size", /* 22 */
"dls_01_strings", /* 23 */
+ "power2up", /* 24 */
+ "version_bounds", /* 25 */
NULL
};
+
#define FILENAME_BUF_SIZE 1024
#define KB 1024
#define FILE_DEFLATE_NAME "deflate.h5"
/* Dataset names for testing filters */
-#define DSET_DEFAULT_NAME "default"
-#define DSET_CHUNKED_NAME "chunked"
-#define DSET_COMPACT_NAME "compact"
-#define DSET_SIMPLE_IO_NAME "simple_io"
-#define DSET_USERBLOCK_IO_NAME "userblock_io"
-#define DSET_COMPACT_IO_NAME "compact_io"
-#define DSET_COMPACT_MAX_NAME "max_compact"
-#define DSET_COMPACT_MAX2_NAME "max_compact_2"
-#define DSET_CONV_BUF_NAME "conv_buf"
-#define DSET_TCONV_NAME "tconv"
-#define DSET_DEFLATE_NAME "deflate"
-#define DSET_SHUFFLE_NAME "shuffle"
-#define DSET_FLETCHER32_NAME "fletcher32"
-#define DSET_FLETCHER32_NAME_2 "fletcher32_2"
-#define DSET_FLETCHER32_NAME_3 "fletcher32_3"
-#define DSET_SHUF_DEF_FLET_NAME "shuffle+deflate+fletcher32"
-#define DSET_SHUF_DEF_FLET_NAME_2 "shuffle+deflate+fletcher32_2"
+#define DSET_DEFAULT_NAME "default"
+#define DSET_CHUNKED_NAME "chunked"
+#define DSET_COMPACT_NAME "compact"
+#define DSET_SIMPLE_IO_NAME "simple_io"
+#define DSET_USERBLOCK_IO_NAME "userblock_io"
+#define DSET_COMPACT_IO_NAME "compact_io"
+#define DSET_COMPACT_MAX_NAME "max_compact"
+#define DSET_COMPACT_MAX2_NAME "max_compact_2"
+#define DSET_CONV_BUF_NAME "conv_buf"
+#define DSET_TCONV_NAME "tconv"
+#define DSET_DEFLATE_NAME "deflate"
+#define DSET_SHUFFLE_NAME "shuffle"
+#define DSET_FLETCHER32_NAME "fletcher32"
+#define DSET_FLETCHER32_NAME_2 "fletcher32_2"
+#define DSET_FLETCHER32_NAME_3 "fletcher32_3"
+#define DSET_SHUF_DEF_FLET_NAME "shuffle+deflate+fletcher32"
+#define DSET_SHUF_DEF_FLET_NAME_2 "shuffle+deflate+fletcher32_2"
#ifdef H5_HAVE_FILTER_SZIP
-#define DSET_SZIP_NAME "szip"
-#define DSET_SHUF_SZIP_FLET_NAME "shuffle+szip+fletcher32"
-#define DSET_SHUF_SZIP_FLET_NAME_2 "shuffle+szip+fletcher32_2"
+#define DSET_SZIP_NAME "szip"
+#define DSET_SHUF_SZIP_FLET_NAME "shuffle+szip+fletcher32"
+#define DSET_SHUF_SZIP_FLET_NAME_2 "shuffle+szip+fletcher32_2"
#endif /* H5_HAVE_FILTER_SZIP */
-#define DSET_BOGUS_NAME "bogus"
-#define DSET_MISSING_NAME "missing"
-#define DSET_CAN_APPLY_NAME "can_apply"
-#define DSET_CAN_APPLY_NAME2 "can_apply2"
+#define DSET_BOGUS_NAME "bogus"
+#define DSET_MISSING_NAME "missing"
+#define DSET_CAN_APPLY_NAME "can_apply"
+#define DSET_CAN_APPLY_NAME2 "can_apply2"
#ifdef H5_HAVE_FILTER_SZIP
-#define DSET_CAN_APPLY_SZIP_NAME "can_apply_szip"
+#define DSET_CAN_APPLY_SZIP_NAME "can_apply_szip"
#endif /* H5_HAVE_FILTER_SZIP */
-#define DSET_SET_LOCAL_NAME "set_local"
-#define DSET_SET_LOCAL_NAME_2 "set_local_2"
-#define DSET_ONEBYTE_SHUF_NAME "onebyte_shuffle"
+#define DSET_SET_LOCAL_NAME "set_local"
+#define DSET_SET_LOCAL_NAME_2 "set_local_2"
+#define DSET_ONEBYTE_SHUF_NAME "onebyte_shuffle"
#define DSET_NBIT_INT_NAME "nbit_int"
#define DSET_NBIT_FLOAT_NAME "nbit_float"
#define DSET_NBIT_DOUBLE_NAME "nbit_double"
@@ -119,27 +141,27 @@ const char *FILENAME[] = {
#define DSET_SCALEOFFSET_FLOAT_NAME_2 "scaleoffset_float_2"
#define DSET_SCALEOFFSET_DOUBLE_NAME "scaleoffset_double"
#define DSET_SCALEOFFSET_DOUBLE_NAME_2 "scaleoffset_double_2"
-#define DSET_COMPARE_DCPL_NAME "compare_dcpl"
-#define DSET_COMPARE_DCPL_NAME_2 "compare_dcpl_2"
-#define DSET_COPY_DCPL_NAME_1 "copy_dcpl_1"
-#define DSET_COPY_DCPL_NAME_2 "copy_dcpl_2"
-#define COPY_DCPL_EXTFILE_NAME "ext_file"
-#define DSET_DEPREC_NAME "deprecated"
-#define DSET_DEPREC_NAME_CHUNKED "deprecated_chunked"
-#define DSET_DEPREC_NAME_COMPACT "deprecated_compact"
-#define DSET_DEPREC_NAME_FILTER "deprecated_filter"
+#define DSET_COMPARE_DCPL_NAME "compare_dcpl"
+#define DSET_COMPARE_DCPL_NAME_2 "compare_dcpl_2"
+#define DSET_COPY_DCPL_NAME_1 "copy_dcpl_1"
+#define DSET_COPY_DCPL_NAME_2 "copy_dcpl_2"
+#define COPY_DCPL_EXTFILE_NAME "ext_file"
+#define DSET_DEPREC_NAME "deprecated"
+#define DSET_DEPREC_NAME_CHUNKED "deprecated_chunked"
+#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 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
/* Dataset names used for testing header flush dependencies */
#define DSET_EARRAY_HDR_FD "earray_hdr_fd"
#define DSET_FARRAY_HDR_FD "farray_hdr_fd"
-#define DSET_BT2_HDR_FD "bt2_hdr_fd"
+#define DSET_BT2_HDR_FD "bt2_hdr_fd"
/* Dataset names for testing Implicit Indexing */
#define DSET_SINGLE_MAX "DSET_SINGLE_MAX"
@@ -149,14 +171,14 @@ const char *FILENAME[] = {
#define SIXTY_FOUR_KB 65536
/* Temporary filter IDs used for testing */
-#define H5Z_FILTER_BOGUS 305
-#define H5Z_FILTER_CORRUPT 306
-#define H5Z_FILTER_CAN_APPLY_TEST 307
-#define H5Z_FILTER_SET_LOCAL_TEST 308
-#define H5Z_FILTER_DEPREC 309
-#define H5Z_FILTER_EXPAND 310
-#define H5Z_FILTER_CAN_APPLY_TEST2 311
-#define H5Z_FILTER_COUNT 312
+#define H5Z_FILTER_BOGUS 305
+#define H5Z_FILTER_CORRUPT 306
+#define H5Z_FILTER_CAN_APPLY_TEST 307
+#define H5Z_FILTER_SET_LOCAL_TEST 308
+#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
@@ -185,15 +207,15 @@ const char *FILENAME[] = {
/* Names for noencoder test */
#ifdef H5_HAVE_FILTER_SZIP
-#define NOENCODER_FILENAME "noencoder.h5"
+#define NOENCODER_FILENAME "noencoder.h5"
#define NOENCODER_COPY_FILENAME "noencoder.h5.copy"
-#define NOENCODER_TEST_DATASET "noencoder_tdset.h5"
-#define NOENCODER_SZIP_DATASET "noencoder_szip_dset.h5"
+#define NOENCODER_TEST_DATASET "noencoder_tdset.h5"
+#define NOENCODER_SZIP_DATASET "noencoder_szip_dset.h5"
#define NOENCODER_SZIP_SHUFF_FLETCH_DATASET "noencoder_szip_shuffle_fletcher_dset.h5"
#endif /* H5_HAVE_FILTER_SZIP */
/* Names for zero-dim test */
-#define ZERODIM_DATASET "zerodim"
+#define ZERODIM_DATASET "zerodim"
#define ZERODIM_DATASET2 "zerodim2"
/* Parameters for zero-dim test */
@@ -224,8 +246,8 @@ const char *FILENAME[] = {
#define BYPASS_DATASET1 "Dset1"
#define BYPASS_DATASET2 "Dset2"
-#define T_BYPASS_DATASET1 "T_Dset1"
-#define T_BYPASS_DATASET2 "T_Dset2"
+#define T_BYPASS_DATASET1 "T_Dset1"
+#define T_BYPASS_DATASET2 "T_Dset2"
#define BYPASS_DIM 1000
#define BYPASS_CHUNK_DIM 500
@@ -237,7 +259,7 @@ const char *FILENAME[] = {
#define EARRAY_CHUNK_DIM 3
#define EARRAY_EXTEND_INCR 15
#define EARRAY_MAX_EXTEND 75
-
+
/* Parameters for datasets in query storage size tests */
#define STORAGE_SIZE_DIM1 12
#define STORAGE_SIZE_DIM2 6
@@ -249,8 +271,8 @@ const char *FILENAME[] = {
/* Shared global arrays */
#define DSET_DIM1 100
#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];
+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;
@@ -269,32 +291,32 @@ const char *OLD_FILENAME[] = { /* Files created under 1.6 branch and 1.8 branch
/* Local prototypes for filter functions */
static size_t filter_bogus(unsigned int flags, size_t cd_nelmts,
- const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf);
+ const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf);
static htri_t can_apply_bogus(hid_t dcpl_id, hid_t type_id, hid_t space_id);
static herr_t set_local_bogus2(hid_t dcpl_id, hid_t type_id, hid_t space_id);
static size_t filter_bogus2(unsigned int flags, size_t cd_nelmts,
- const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf);
+ const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf);
static size_t filter_bogus3(unsigned int flags, size_t cd_nelmts,
- const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf);
+ const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf);
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);
+ 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);
+ 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);
+ 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 */
+ 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
*
@@ -303,12 +325,7 @@ const H5Z_class2_t H5Z_COUNT[1] = {{
* appropriate.
*
* Return: Success: Data chunk size
- *
* Failure: 0
- *
- * Programmer: Neil Fortner
- * Wednesday, March 17, 2010
- *
*-------------------------------------------------------------------------
*/
static size_t
@@ -324,28 +341,23 @@ filter_count(unsigned int flags, size_t H5_ATTR_UNUSED cd_nelmts,
return nbytes;
}
-
+
/*-------------------------------------------------------------------------
- * Function: test_create
- *
- * Purpose: Attempts to create a dataset.
- *
- * Return: Success: 0
+ * Function: test_create
*
- * Failure: -1
- *
- * Programmer: Robb Matzke
- * Tuesday, December 9, 1997
+ * Purpose: Attempts to create a dataset.
*
+ * Return: Success: 0
+ * Failure: -1
*-------------------------------------------------------------------------
*/
static herr_t
test_create(hid_t file)
{
- hid_t dataset, space, small_space, create_parms;
- hsize_t dims[2], small_dims[2];
- herr_t status;
- hsize_t csize[2];
+ hid_t dataset, space, small_space, create_parms;
+ hsize_t dims[2], small_dims[2];
+ herr_t status;
+ hsize_t csize[2];
TESTING("create, open, close");
@@ -362,11 +374,11 @@ test_create(hid_t file)
assert(space>=0);
/*
- * Create a dataset using the default dataset creation properties. We're
+ * Create a dataset using the default dataset creation properties. We're
* not sure what they are, so we won't check.
*/
dataset = H5Dcreate2(file, DSET_DEFAULT_NAME, H5T_NATIVE_DOUBLE, space,
- H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if(dataset < 0) goto error;
/* Close the dataset */
@@ -382,13 +394,13 @@ test_create(hid_t file)
* reporting.
*/
H5E_BEGIN_TRY {
- dataset = H5Dcreate2(file, DSET_DEFAULT_NAME, H5T_NATIVE_DOUBLE, space,
- H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ dataset = H5Dcreate2(file, DSET_DEFAULT_NAME, H5T_NATIVE_DOUBLE, space,
+ H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
} H5E_END_TRY;
if(dataset >= 0) {
- H5_FAILED();
- puts(" Library allowed overwrite of existing dataset.");
- goto error;
+ H5_FAILED();
+ puts(" Library allowed overwrite of existing dataset.");
+ goto error;
}
/*
@@ -405,12 +417,12 @@ test_create(hid_t file)
* reporting.
*/
H5E_BEGIN_TRY {
- dataset = H5Dopen2(file, "does_not_exist", H5P_DEFAULT);
+ dataset = H5Dopen2(file, "does_not_exist", H5P_DEFAULT);
} H5E_END_TRY;
if(dataset >= 0) {
- H5_FAILED();
- puts(" Opened a non-existent dataset.");
- goto error;
+ H5_FAILED();
+ puts(" Opened a non-existent dataset.");
+ goto error;
}
/*
@@ -427,12 +439,12 @@ test_create(hid_t file)
assert(status >= 0);
H5E_BEGIN_TRY {
dataset = H5Dcreate2(file, DSET_CHUNKED_NAME, H5T_NATIVE_DOUBLE, space,
- H5P_DEFAULT, create_parms, H5P_DEFAULT);
+ H5P_DEFAULT, create_parms, H5P_DEFAULT);
} H5E_END_TRY;
if(dataset >= 0) {
- H5_FAILED();
- puts(" Opened a dataset with incorrect chunking parameters.");
- goto error;
+ H5_FAILED();
+ puts(" Opened a dataset with incorrect chunking parameters.");
+ goto error;
}
csize[0] = 5;
@@ -441,7 +453,7 @@ test_create(hid_t file)
assert(status >= 0);
dataset = H5Dcreate2(file, DSET_CHUNKED_NAME, H5T_NATIVE_DOUBLE, space,
- H5P_DEFAULT, create_parms, H5P_DEFAULT);
+ H5P_DEFAULT, create_parms, H5P_DEFAULT);
if(dataset < 0) goto error;
H5Pclose(create_parms);
@@ -476,21 +488,16 @@ test_create(hid_t file)
return -1;
}
-
+
/*-------------------------------------------------------------------------
- * Function: test_simple_io
- *
- * Purpose: Tests simple I/O. That is, reading and writing a complete
- * multi-dimensional array without data type or data space
- * conversions, without compression, and stored contiguously.
- *
- * Return: Success: 0
- *
- * Failure: -1
+ * Function: test_simple_io
*
- * Programmer: Robb Matzke
- * Wednesday, December 10, 1997
+ * Purpose: Tests simple I/O. That is, reading and writing a complete
+ * multi-dimensional array without data type or data space
+ * conversions, without compression, and stored contiguously.
*
+ * Return: Success: 0
+ * Failure: -1
*-------------------------------------------------------------------------
*/
static herr_t
@@ -571,7 +578,7 @@ test_simple_io(const char *env_h5_drvr, hid_t fapl)
if(H5Fclose(file) < 0) goto error;
file = -1;
- f = HDopen(filename, O_RDONLY, 0);
+ f = HDopen(filename, O_RDONLY);
HDlseek(f, (off_t)offset, SEEK_SET);
if(HDread(f, rdata, sizeof(int)*DSET_DIM1*DSET_DIM2) < 0)
goto error;
@@ -595,8 +602,8 @@ test_simple_io(const char *env_h5_drvr, hid_t fapl)
PASSED();
} /* end if */
else {
- SKIPPED();
- puts(" Current VFD doesn't support continuous address space");
+ SKIPPED();
+ puts(" Current VFD doesn't support continuous address space");
} /* end else */
return 0;
@@ -617,28 +624,23 @@ error:
return -1;
}
-
+
/*-------------------------------------------------------------------------
- * Function: test_userblock_offset
- *
- * Purpose: Tests H5Dget_offset when user block exists.
+ * Function: test_userblock_offset
*
- * Return: Success: 0
- *
- * Failure: -1
- *
- * Programmer: Raymond Lu
- * Wednesday, November 27, 2002
+ * Purpose: Tests H5Dget_offset when user block exists.
*
+ * Return: Success: 0
+ * Failure: -1
*-------------------------------------------------------------------------
*/
static herr_t
test_userblock_offset(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
{
char filename[FILENAME_BUF_SIZE];
- hid_t file = -1, fcpl = -1, dataset = -1, space = -1;
- int i, j;
- hsize_t dims[2];
+ hid_t file = -1, fcpl = -1, dataset = -1, space = -1;
+ int i, j;
+ hsize_t dims[2];
int f = -1;
haddr_t offset;
int rdata[DSET_DIM1][DSET_DIM2];
@@ -651,9 +653,9 @@ test_userblock_offset(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
if((fcpl=H5Pcreate(H5P_FILE_CREATE)) < 0) goto error;
if(H5Pset_userblock(fcpl, (hsize_t)USER_BLOCK) < 0) goto error;
- if(new_format)
- if(H5Pset_file_space_page_size(fcpl, (hsize_t)USER_BLOCK) < 0)
- goto error;
+ if(new_format)
+ if(H5Pset_file_space_page_size(fcpl, (hsize_t)USER_BLOCK) < 0)
+ goto error;
if((file=H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl)) < 0)
goto error;
@@ -685,7 +687,7 @@ test_userblock_offset(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
if(H5Fclose(file) < 0) goto error;
file = -1;
- f = HDopen(filename, O_RDONLY, 0);
+ f = HDopen(filename, O_RDONLY);
HDlseek(f, (off_t)offset, SEEK_SET);
if(HDread(f, rdata, sizeof(int)*DSET_DIM1*DSET_DIM2) < 0)
goto error;
@@ -708,8 +710,8 @@ test_userblock_offset(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
PASSED();
} /* end if */
else {
- SKIPPED();
- puts(" Current VFD doesn't support continuous address space");
+ SKIPPED();
+ puts(" Current VFD doesn't support continuous address space");
} /* end else */
return 0;
@@ -728,7 +730,7 @@ error:
return -1;
}
-
+
/*-------------------------------------------------------------------------
* Function: test_compact_io
*
@@ -738,22 +740,22 @@ error:
* compact dataset.
*
* Return: Success: 0
- *
* Failure: -1
- *
- * Programmer: Raymond Lu
- * August 8, 2002
- *
*-------------------------------------------------------------------------
*/
static herr_t
test_compact_io(hid_t fapl)
{
hid_t file, dataset, space, plist;
+ hid_t verfile = -1, new_fapl = -1;
hsize_t dims[2];
int wbuf[16][8], rbuf[16][8];
- char filename[FILENAME_BUF_SIZE];
- int i, j, n;
+ char filename[FILENAME_BUF_SIZE];
+ H5F_libver_t low, high; /* File format bounds */
+ H5F_t *fp; /* Internal file pointer */
+ H5D_t *dsetp; /* Internal dataset pointer */
+ int i, j, n; /* Indices */
+ herr_t ret; /* Generic return value */
TESTING("compact dataset I/O");
@@ -792,8 +794,6 @@ test_compact_io(hid_t fapl)
if(H5Dget_offset(dataset)!=HADDR_UNDEF) TEST_ERROR
/* Close file */
- if(H5Sclose(space) < 0) TEST_ERROR
- if(H5Pclose(plist) < 0) TEST_ERROR
if(H5Dclose(dataset) < 0) TEST_ERROR
if(H5Fclose(file) < 0) TEST_ERROR
@@ -817,19 +817,113 @@ test_compact_io(hid_t fapl)
printf(" wbuf[%d][%d]=%d\n", i, j, wbuf[i][j]);
printf(" rbuf[%d][%d]=%d\n", i, j, rbuf[i][j]);
goto error;
- } /* end if */
+ } /* end */
if(H5Dclose(dataset) < 0) TEST_ERROR
if(H5Fclose(file) < 0) TEST_ERROR
- PASSED();
- return 0;
+ /**************************************
+ * Additional test for version bounds *
+ **************************************/
+
+ /* Create a copy of file access property list */
+ if((new_fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) TEST_ERROR
+
+ /* Loop through all the combinations of low/high library format bounds,
+ skipping invalid combinations.
+ - Create a file, create and write a compact dataset, and verify its data
+ - Verify the dataset's layout and fill message versions */
+ for(low = H5F_LIBVER_EARLIEST; low < H5F_LIBVER_NBOUNDS; low++) {
+ for(high = H5F_LIBVER_EARLIEST; high < H5F_LIBVER_NBOUNDS; high++) {
+
+ /* Set version bounds */
+ H5E_BEGIN_TRY {
+ ret = H5Pset_libver_bounds(new_fapl, low, high);
+ } H5E_END_TRY;
+
+ if (ret < 0) /* Invalid low/high combinations */
+ continue;
+
+ /* Create a file */
+ h5_fixname(FILENAME[25], new_fapl, filename, sizeof filename);
+ if((verfile = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, new_fapl)) < 0)
+ TEST_ERROR
+
+ /* Create the compact dataset */
+ dataset = H5Dcreate2(verfile, DSET_DEFAULT_NAME, H5T_NATIVE_INT, space, H5P_DEFAULT, plist, H5P_DEFAULT);
+ if(dataset < 0) TEST_ERROR
+
+ /* Write the same data as of DSET_COMPACT_IO_NAME */
+ if(H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, wbuf) < 0)
+ TEST_ERROR
+
+ /* Close DSET_DEFAULT_NAME, then reopen it to read and verify
+ the data */
+ if(H5Dclose(dataset) < 0) TEST_ERROR
+ if((dataset = H5Dopen2(verfile, DSET_DEFAULT_NAME, H5P_DEFAULT)) < 0)
+ TEST_ERROR
+ if(H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf) < 0)
+ TEST_ERROR
+
+ /* Check that the values read are the same as the values written */
+ for(i = 0; i < 16; i++)
+ for(j = 0; j < 8; j++)
+ if(rbuf[i][j] != wbuf[i][j]) {
+ H5_FAILED();
+ printf(" Read different values than written.\n");
+ printf(" At index %d,%d\n", i, j);
+ printf(" wbuf[%d][%d]=%d\n", i, j, wbuf[i][j]);
+ printf(" rbuf[%d][%d]=%d\n", i, j, rbuf[i][j]);
+ goto error;
+ } /* end */
+
+ /* Get the internal file pointer */
+ if((fp = (H5F_t *)H5I_object(verfile)) == NULL) TEST_ERROR
+
+ /* Get the internal dataset pointer */
+ if((dsetp = (H5D_t *)H5I_object(dataset)) == NULL) TEST_ERROR
+
+ /* Verify the dataset's layout and fill message versions */
+ if(fp->shared->low_bound == H5F_LIBVER_EARLIEST) {
+ VERIFY(dsetp->shared->layout.version, H5O_LAYOUT_VERSION_DEFAULT, "layout_ver_bounds");
+ VERIFY(dsetp->shared->dcpl_cache.fill.version, H5O_FILL_VERSION_2, "fill_ver_bounds");
+ } else {
+ VERIFY(dsetp->shared->layout.version, H5O_layout_ver_bounds[fp->shared->low_bound], "layout_ver_bounds");
+ VERIFY(dsetp->shared->dcpl_cache.fill.version, H5O_fill_ver_bounds[fp->shared->low_bound], "fill_ver_bounds");
+ }
+
+ /* Close the dataset and delete from the file */
+ if(H5Dclose(dataset) < 0) TEST_ERROR
+ if(H5Ldelete(verfile, DSET_DEFAULT_NAME, H5P_DEFAULT) < 0)
+ TEST_ERROR
+
+ /* Close the file */
+ if(H5Fclose(verfile) < 0) TEST_ERROR
+
+ } /* end for high */
+ } /* end for low */
+
+ if(H5Pclose(new_fapl) < 0) TEST_ERROR
+ if(H5Sclose(space) < 0) TEST_ERROR
+ if(H5Pclose(plist) < 0) TEST_ERROR
+
+ PASSED();
+ return 0;
error:
- return -1;
+ H5E_BEGIN_TRY {
+ H5Sclose(space);
+ H5Pclose(plist);
+ H5Pclose(new_fapl);
+ H5Dclose(dataset);
+ H5Fclose(file);
+ H5Fclose(verfile);
+ } H5E_END_TRY;
+
+ return -1;
}
-
+
/*-------------------------------------------------------------------------
* Function: test_max_compact
*
@@ -837,10 +931,6 @@ test_compact_io(hid_t fapl)
*
* Return: Success: 0
* Failure: -1
- *
- * Programmer: Raymond Lu
- * August 8, 2002
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -854,7 +944,7 @@ test_max_compact(hid_t fapl)
size_t compact_size;
int *wbuf = NULL;
int *rbuf = NULL;
- char filename[FILENAME_BUF_SIZE];
+ char filename[FILENAME_BUF_SIZE];
int n;
size_t u;
@@ -986,36 +1076,33 @@ error:
return -1;
} /* end test_max_compact() */
-
+
/*-------------------------------------------------------------------------
* Function: test_layout_extend
*
* Purpose: Verify that the creation of extendible dataset with dataspace:
- * cur_dims < max_dims (max_dims can be fixed size or H5S_UNLIMITED)
- * will behave as follows:
- * H5D_COMPACT layout: fail
- * H5D_CONTIGUOUS layout: fail
- * H5D_CHUNKED layout: succeed
+ * cur_dims < max_dims (max_dims can be fixed size or H5S_UNLIMITED)
+ * will behave as follows:
+ * H5D_COMPACT layout: fail
+ * H5D_CONTIGUOUS layout: fail
+ * H5D_CHUNKED layout: succeed
*
* Return: Success: 0
* Failure: -1
- *
- * Programmer: Vailin Choi; August 2010
- *
*-------------------------------------------------------------------------
*/
static herr_t
test_layout_extend(hid_t fapl)
{
- char filename[FILENAME_BUF_SIZE]; /* File name */
- hid_t fid = -1; /* File id */
- hid_t sid_fix = -1, sid_unlim = -1; /* Dataspace id */
+ char filename[FILENAME_BUF_SIZE]; /* File name */
+ hid_t fid = -1; /* File id */
+ hid_t sid_fix = -1, sid_unlim = -1; /* Dataspace id */
hid_t dcpl_compact = -1, dcpl_contig = -1, dcpl_chunked = -1; /* Dataset creation property list id */
- hid_t did_fixed = -1, did_unlim = -1; /* Dataset id */
- hsize_t cur_size[1] = {10}; /* Current size of dataspace */
- hsize_t max_unlim[1] = {H5S_UNLIMITED}; /* Maximum size of dataspace (unlimited) */
- hsize_t max_fix[1] = {100}; /* Maximum size of dataspace (fixed) */
- hsize_t chunk_dim[1] = {10}; /* Chunk size */
+ hid_t did_fixed = -1, did_unlim = -1; /* Dataset id */
+ hsize_t cur_size[1] = {10}; /* Current size of dataspace */
+ hsize_t max_unlim[1] = {H5S_UNLIMITED}; /* Maximum size of dataspace (unlimited) */
+ hsize_t max_fix[1] = {100}; /* Maximum size of dataspace (fixed) */
+ hsize_t chunk_dim[1] = {10}; /* Chunk size */
TESTING("extendible dataset with various layout");
@@ -1038,14 +1125,14 @@ test_layout_extend(hid_t fapl)
/* Create dataset with extendible dataspace (fixed max_dims) should fail */
H5E_BEGIN_TRY {
- if(H5Dcreate2(fid, "compact", H5T_NATIVE_INT, sid_fix, H5P_DEFAULT, dcpl_compact, H5P_DEFAULT) != FAIL)
- TEST_ERROR
+ if(H5Dcreate2(fid, "compact", H5T_NATIVE_INT, sid_fix, H5P_DEFAULT, dcpl_compact, H5P_DEFAULT) != FAIL)
+ TEST_ERROR
} H5E_END_TRY;
/* Create dataset with extendible dataspace (unlimited max_dims) should fail */
H5E_BEGIN_TRY {
- if(H5Dcreate2(fid, "compact", H5T_NATIVE_INT, sid_unlim, H5P_DEFAULT, dcpl_compact, H5P_DEFAULT) != FAIL)
- TEST_ERROR
+ if(H5Dcreate2(fid, "compact", H5T_NATIVE_INT, sid_unlim, H5P_DEFAULT, dcpl_compact, H5P_DEFAULT) != FAIL)
+ TEST_ERROR
} H5E_END_TRY;
/* Create property list for contiguous dataset creation */
@@ -1056,14 +1143,14 @@ test_layout_extend(hid_t fapl)
/* Create dataset with extendible dataspace (fixed max_dims) should fail */
H5E_BEGIN_TRY {
- if(H5Dcreate2(fid, "contig", H5T_NATIVE_INT, sid_fix, H5P_DEFAULT, dcpl_contig, H5P_DEFAULT) != FAIL)
- TEST_ERROR
+ if(H5Dcreate2(fid, "contig", H5T_NATIVE_INT, sid_fix, H5P_DEFAULT, dcpl_contig, H5P_DEFAULT) != FAIL)
+ TEST_ERROR
} H5E_END_TRY;
/* Create dataset with extendible dataspace (unlimited max_dims) should fail*/
H5E_BEGIN_TRY {
- if(H5Dcreate2(fid, "contig", H5T_NATIVE_INT, sid_unlim, H5P_DEFAULT, dcpl_contig, H5P_DEFAULT) != FAIL)
- TEST_ERROR
+ if(H5Dcreate2(fid, "contig", H5T_NATIVE_INT, sid_unlim, H5P_DEFAULT, dcpl_contig, H5P_DEFAULT) != FAIL)
+ TEST_ERROR
} H5E_END_TRY;
/* Create property list for chunked dataset creation */
@@ -1075,11 +1162,11 @@ test_layout_extend(hid_t fapl)
/* Create dataset with extendible dataspace (fixed max_dims) should succeed */
if((did_fixed = H5Dcreate2(fid, "chunked_fixed", H5T_NATIVE_INT, sid_fix, H5P_DEFAULT, dcpl_chunked, H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR
/* Create dataset with extendible dataspace (unlimited max_dims) should succeed */
if((did_unlim = H5Dcreate2(fid, "chunked_unlim", H5T_NATIVE_INT, sid_unlim, H5P_DEFAULT, dcpl_chunked, H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR
/* Closing */
if(H5Sclose(sid_fix) < 0) FAIL_STACK_ERROR
@@ -1112,19 +1199,14 @@ error:
return -1;
} /* end test_layout_extend() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_conv_buffer
- *
- * Purpose: Test size of data type conversion buffer.
- *
- * Return: Success: 0
- *
- * Failure: -1
+ * Function: test_conv_buffer
*
- * Programmer: Raymond Lu
- * Monday, May 12, 2003
+ * Purpose: Test size of data type conversion buffer.
*
+ * Return: Success: 0
+ * Failure: -1
*-------------------------------------------------------------------------
*/
static herr_t
@@ -1256,28 +1338,23 @@ error:
return -1;
}
-
+
/*-------------------------------------------------------------------------
- * Function: test_tconv
- *
- * Purpose: Test some simple data type conversion stuff.
- *
- * Return: Success: 0
+ * Function: test_tconv
*
- * Failure: -1
- *
- * Programmer: Robb Matzke
- * Wednesday, January 14, 1998
+ * Purpose: Test some simple data type conversion stuff.
*
+ * Return: Success: 0
+ * Failure: -1
*-------------------------------------------------------------------------
*/
static herr_t
test_tconv(hid_t file)
{
- char *out = NULL, *in = NULL;
- hsize_t dims[1];
- hid_t space = -1, dataset = -1;
- int i;
+ char *out = NULL, *in = NULL;
+ hsize_t dims[1];
+ hid_t space = -1, dataset = -1;
+ int i;
if ((out = (char *)HDmalloc((size_t)(4 * 1000 * 1000))) == NULL)
goto error;
@@ -1300,7 +1377,7 @@ test_tconv(hid_t file)
/* Create the data set */
if((dataset = H5Dcreate2(file, DSET_TCONV_NAME, H5T_STD_I32LE, space,
- H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
/* Write the data to the dataset */
@@ -1348,27 +1425,23 @@ error:
/* This message derives from H5Z */
const H5Z_class2_t H5Z_BOGUS[1] = {{
H5Z_CLASS_T_VERS, /* H5Z_class_t version */
- H5Z_FILTER_BOGUS, /* Filter id number */
+ H5Z_FILTER_BOGUS, /* Filter id number */
1, 1, /* Encoding and decoding enabled */
- "bogus", /* Filter name for debugging */
+ "bogus", /* Filter name for debugging */
NULL, /* The "can apply" callback */
NULL, /* The "set local" callback */
- filter_bogus, /* The actual filter function */
+ filter_bogus, /* The actual filter function */
}};
-
+
/*-------------------------------------------------------------------------
- * Function: can_apply_bogus
- *
- * Purpose: A bogus 'can apply' callback that returns 0 for H5T_NATIVE_DOUBLE
- * dataype, but returns 1 for all other datatypes
+ * Function: can_apply_bogus
*
- * Return: Success: Described above
- * Failure: 0
- *
- * Programmer: Quincey Koziol
- * Friday, April 5, 2003
+ * Purpose: A bogus 'can apply' callback that returns 0 for H5T_NATIVE_DOUBLE
+ * dataype, but returns 1 for all other datatypes
*
+ * Return: Success: Described above
+ * Failure: 0
*-------------------------------------------------------------------------
*/
static htri_t
@@ -1382,19 +1455,14 @@ can_apply_bogus(hid_t H5_ATTR_UNUSED dcpl_id, hid_t type_id, hid_t H5_ATTR_UNUSE
return -1;
}
-
+
/*-------------------------------------------------------------------------
- * Function: filter_bogus
- *
- * Purpose: A bogus compression method that doesn't do anything.
- *
- * Return: Success: Data chunk size
- *
- * Failure: 0
+ * Function: filter_bogus
*
- * Programmer: Robb Matzke
- * Tuesday, April 21, 1998
+ * Purpose: A bogus compression method that doesn't do anything.
*
+ * Return: Success: Data chunk size
+ * Failure: 0
*-------------------------------------------------------------------------
*/
static size_t
@@ -1405,20 +1473,16 @@ filter_bogus(unsigned int H5_ATTR_UNUSED flags, size_t H5_ATTR_UNUSED cd_nelmts,
return nbytes;
}
-
+
/*-------------------------------------------------------------------------
- * Function: set_local_bogus2
- *
- * Purpose: A 'set local' callback that stores the size of the datatype
- * and adds it to all the H5T_NATIVE_INT values during
- * filter operation.
- *
- * Return: Success: non-negative
- * Failure: negative
+ * Function: set_local_bogus2
*
- * Programmer: Quincey Koziol
- * Friday, April 5, 2003
+ * Purpose: A 'set local' callback that stores the size of the datatype
+ * and adds it to all the H5T_NATIVE_INT values during
+ * filter operation.
*
+ * Return: Success: non-negative
+ * Failure: negative
*-------------------------------------------------------------------------
*/
static herr_t
@@ -1455,21 +1519,17 @@ set_local_bogus2(hid_t dcpl_id, hid_t type_id, hid_t H5_ATTR_UNUSED space_id)
return(SUCCEED);
} /* end set_local_bogus2() */
-
+
/*-------------------------------------------------------------------------
- * Function: filter_bogus2
- *
- * Purpose: A filter method that adds a value to data values on writing
- * (if the parameter is set), but does not modify data values on
- * reading (so that correct operation of the filter can be
- * checked).
+ * Function: filter_bogus2
*
- * Return: Success: Data chunk size
- * Failure: 0
- *
- * Programmer: Quincey Koziol
- * Monday, April 7, 2003
+ * Purpose: A filter method that adds a value to data values on writing
+ * (if the parameter is set), but does not modify data values on
+ * reading (so that correct operation of the filter can be
+ * checked).
*
+ * Return: Success: Data chunk size
+ * Failure: 0
*-------------------------------------------------------------------------
*/
static size_t
@@ -1513,19 +1573,14 @@ filter_bogus2(unsigned int flags, size_t cd_nelmts,
return(nbytes);
}
-
+
/*-------------------------------------------------------------------------
- * Function: filter_bogus3
- *
- * Purpose: A bogus compression method that returns a failure.
- *
- * Return: Success: Data chunk size
- *
- * Failure: 0
+ * Function: filter_bogus3
*
- * Programmer: Raymond Lu
- * 4 August 2010
+ * Purpose: A bogus compression method that returns a failure.
*
+ * Return: Success: Data chunk size
+ * Failure: 0
*-------------------------------------------------------------------------
*/
static size_t
@@ -1539,29 +1594,24 @@ filter_bogus3(unsigned int H5_ATTR_UNUSED flags, size_t H5_ATTR_UNUSED cd_nelmts
/* This message derives from H5Z */
const H5Z_class2_t H5Z_CORRUPT[1] = {{
H5Z_CLASS_T_VERS, /* H5Z_class_t version */
- H5Z_FILTER_CORRUPT, /* Filter id number */
+ H5Z_FILTER_CORRUPT, /* Filter id number */
1, 1, /* Encoding and decoding enabled */
- "corrupt", /* Filter name for debugging */
+ "corrupt", /* Filter name for debugging */
NULL, /* The "can apply" callback */
NULL, /* The "set local" callback */
- filter_corrupt, /* The actual filter function */
+ filter_corrupt, /* The actual filter function */
}};
-
+
/*-------------------------------------------------------------------------
- * Function: filter_corrupt
- *
- * Purpose: For testing Fletcher32 checksum. modify data slightly during
- * writing so that when data is read back, the checksum should
- * fail.
+ * Function: filter_corrupt
*
- * Return: Success: Data chunk size
- *
- * Failure: 0
- *
- * Programmer: Raymond Lu
- * Jan 14, 2003
+ * Purpose: For testing Fletcher32 checksum. modify data slightly during
+ * writing so that when data is read back, the checksum should
+ * fail.
*
+ * Return: Success: Data chunk size
+ * Failure: 0
*-------------------------------------------------------------------------
*/
static size_t
@@ -1584,7 +1634,7 @@ filter_corrupt(unsigned int flags, size_t cd_nelmts,
if(offset > nbytes || (offset + length) > nbytes || length < sizeof(unsigned int))
TEST_ERROR
- if(NULL == (data = HDmalloc((size_t)length)))
+ if(NULL == (data = HDmalloc((size_t)length)))
TEST_ERROR
HDmemset(data, (int)value, (size_t)length);
@@ -1611,17 +1661,13 @@ error:
return ret_value;
} /* end filter_corrupt() */
-
+
/*-------------------------------------------------------------------------
* Function: filter_cb_cont
*
* Purpose: Callback function to handle checksum failure. Let it continue.
*
* Return: continue
- *
- * Programmer: Raymond Lu
- * Jan 14, 2003
- *
*-------------------------------------------------------------------------
*/
static H5Z_cb_return_t
@@ -1634,17 +1680,13 @@ filter_cb_cont(H5Z_filter_t filter, void H5_ATTR_UNUSED *buf, size_t H5_ATTR_UNU
return H5Z_CB_FAIL;
}
-
+
/*-------------------------------------------------------------------------
* Function: filter_cb_fail
*
* Purpose: Callback function to handle checksum failure. Let it fail.
*
* Return: fail
- *
- * Programmer: Raymond Lu
- * Jan 14, 2003
- *
*-------------------------------------------------------------------------
*/
static H5Z_cb_return_t
@@ -1657,37 +1699,33 @@ filter_cb_fail(H5Z_filter_t filter, void H5_ATTR_UNUSED *buf, size_t H5_ATTR_UNU
return H5Z_CB_CONT;
}
-
+
/*-------------------------------------------------------------------------
- * Function: test_filter_internal
+ * Function: test_filter_internal
*
- * Purpose: Tests dataset compression. If compression is requested when
- * it hasn't been compiled into the library (such as when
- * updating an existing compressed dataset) then data is sent to
- * the file uncompressed but no errors are returned.
- *
- * Return: Success: 0
- * Failure: -1
- *
- * Programmer: Robb Matzke
- * Wednesday, April 15, 1998
+ * Purpose: Tests dataset compression. If compression is requested when
+ * it hasn't been compiled into the library (such as when
+ * updating an existing compressed dataset) then data is sent to
+ * the file uncompressed but no errors are returned.
*
+ * Return: Success: 0
+ * Failure: -1
*-------------------------------------------------------------------------
*/
static herr_t
test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
int corrupted, hsize_t *dset_size)
{
- hid_t dataset; /* Dataset ID */
- hid_t dxpl; /* Dataset xfer property list ID */
- hid_t write_dxpl; /* Dataset xfer property list ID for writing */
- hid_t sid; /* Dataspace ID */
- const hsize_t size[2] = {DSET_DIM1, DSET_DIM2}; /* Dataspace dimensions */
- const hsize_t hs_offset[2] = {FILTER_HS_OFFSET1, FILTER_HS_OFFSET2}; /* Hyperslab offset */
- const hsize_t hs_size[2] = {FILTER_HS_SIZE1, FILTER_HS_SIZE2}; /* Hyperslab size */
- void *tconv_buf = NULL; /* Temporary conversion buffer */
- size_t i, j, n; /* Local index variables */
- herr_t status; /* Error status */
+ hid_t dataset; /* Dataset ID */
+ hid_t dxpl; /* Dataset xfer property list ID */
+ hid_t write_dxpl; /* Dataset xfer property list ID for writing */
+ hid_t sid; /* Dataspace ID */
+ const hsize_t size[2] = {DSET_DIM1, DSET_DIM2}; /* Dataspace dimensions */
+ const hsize_t hs_offset[2] = {FILTER_HS_OFFSET1, FILTER_HS_OFFSET2}; /* Hyperslab offset */
+ const hsize_t hs_size[2] = {FILTER_HS_SIZE1, FILTER_HS_SIZE2}; /* Hyperslab size */
+ void *tconv_buf = NULL; /* Temporary conversion buffer */
+ size_t i, j, n; /* Local index variables */
+ herr_t status; /* Error status */
/* Create the data space */
if((sid = H5Screate_simple(2, size, NULL)) < 0) goto error;
@@ -1719,7 +1757,7 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
/* Create the dataset */
if((dataset = H5Dcreate2(fid, name, H5T_NATIVE_INT, sid, H5P_DEFAULT,
- dcpl, H5P_DEFAULT)) < 0) goto error;
+ dcpl, H5P_DEFAULT)) < 0) goto error;
PASSED();
@@ -1730,18 +1768,18 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
TESTING(" filters (uninitialized read)");
if(H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, check) < 0)
- TEST_ERROR;
+ TEST_ERROR;
for(i=0; i<(size_t)size[0]; i++) {
- for(j=0; j<(size_t)size[1]; j++) {
- if(0!=check[i][j]) {
- H5_FAILED();
- printf(" Read a non-zero value.\n");
- printf(" At index %lu,%lu\n",
- (unsigned long)i, (unsigned long)j);
- goto error;
- }
- }
+ for(j=0; j<(size_t)size[1]; j++) {
+ if(0!=check[i][j]) {
+ H5_FAILED();
+ printf(" Read a non-zero value.\n");
+ printf(" At index %lu,%lu\n",
+ (unsigned long)i, (unsigned long)j);
+ goto error;
+ }
+ }
}
PASSED();
@@ -1753,13 +1791,13 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
TESTING(" filters (write)");
for(i=n=0; i<size[0]; i++) {
- for(j=0; j<size[1]; j++) {
- points[i][j] = (int)(n++);
- }
+ for(j=0; j<size[1]; j++) {
+ points[i][j] = (int)(n++);
+ }
}
if(H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, write_dxpl, points) < 0)
- TEST_ERROR;
+ TEST_ERROR;
if((*dset_size=H5Dget_storage_size(dataset))==0) TEST_ERROR;
@@ -1792,22 +1830,23 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
status=H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, write_dxpl, check);
} H5E_END_TRY;
if(status>=0) TEST_ERROR;
- } else {
+ }
+ else {
if(H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, check) < 0)
- TEST_ERROR;
+ TEST_ERROR;
/* Check that the values read are the same as the values written */
for(i=0; i<size[0]; i++) {
- for(j=0; j<size[1]; j++) {
- if(points[i][j] != check[i][j]) {
- H5_FAILED();
- fprintf(stderr," Read different values than written.\n");
- fprintf(stderr," At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
- fprintf(stderr," At original: %d\n", (int)points[i][j]);
- fprintf(stderr," At returned: %d\n", (int)check[i][j]);
- goto error;
- }
- }
+ for(j=0; j<size[1]; j++) {
+ if(points[i][j] != check[i][j]) {
+ H5_FAILED();
+ fprintf(stderr," Read different values than written.\n");
+ fprintf(stderr," At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
+ fprintf(stderr," At original: %d\n", (int)points[i][j]);
+ fprintf(stderr," At returned: %d\n", (int)check[i][j]);
+ goto error;
+ }
+ }
}
}
@@ -1823,12 +1862,12 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
TESTING(" filters (modify)");
for(i=0; i<size[0]; i++) {
- for(j=0; j<size[1]/2; j++) {
- points[i][j] = (int)HDrandom ();
- }
+ for(j=0; j<size[1]/2; j++) {
+ points[i][j] = (int)HDrandom ();
+ }
}
if(H5Dwrite (dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, write_dxpl, points) < 0)
- TEST_ERROR;
+ TEST_ERROR;
if(corrupted) {
/* Default behavior is failure when data is corrupted. */
@@ -1850,22 +1889,23 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
status=H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, write_dxpl, check);
} H5E_END_TRY;
if(status>=0) TEST_ERROR;
- } else {
+ }
+ else {
/* Read the dataset back and check it */
if(H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, check) < 0)
- TEST_ERROR;
+ TEST_ERROR;
/* Check that the values read are the same as the values written */
for(i=0; i<size[0]; i++) {
- for(j=0; j<size[1]; j++) {
- if(points[i][j] != check[i][j]) {
- H5_FAILED();
- printf(" Read different values than written.\n");
- printf(" At index %lu,%lu\n",
- (unsigned long)i, (unsigned long)j);
- goto error;
- }
- }
+ for(j=0; j<size[1]; j++) {
+ if(points[i][j] != check[i][j]) {
+ H5_FAILED();
+ printf(" Read different values than written.\n");
+ printf(" At index %lu,%lu\n",
+ (unsigned long)i, (unsigned long)j);
+ goto error;
+ }
+ }
}
}
@@ -1911,14 +1951,14 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
/* Check that the values read are the same as the values written */
for(i = 0; i < size[0]; i++)
- for(j = 0; j < size[1]; j++)
- if(points[i][j] != check[i][j]) {
- H5_FAILED();
- printf(" Read different values than written.\n");
- printf(" At index %lu,%lu\n",
- (unsigned long)i, (unsigned long)j);
- goto error;
- } /* end if */
+ for(j = 0; j < size[1]; j++)
+ if(points[i][j] != check[i][j]) {
+ H5_FAILED();
+ printf(" Read different values than written.\n");
+ printf(" At index %lu,%lu\n",
+ (unsigned long)i, (unsigned long)j);
+ goto error;
+ } /* end if */
} /* end else */
PASSED();
@@ -1933,15 +1973,15 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
TESTING(" filters (partial I/O)");
for(i=0; i<(size_t)hs_size[0]; i++) {
- for(j=0; j<(size_t)hs_size[1]; j++) {
- points[(size_t)hs_offset[0]+i][(size_t)hs_offset[1]+j] = (int)HDrandom();
- }
+ for(j=0; j<(size_t)hs_size[1]; j++) {
+ points[(size_t)hs_offset[0]+i][(size_t)hs_offset[1]+j] = (int)HDrandom();
+ }
}
if(H5Sselect_hyperslab(sid, H5S_SELECT_SET, hs_offset, NULL, hs_size,
- NULL) < 0) TEST_ERROR;
+ NULL) < 0) TEST_ERROR;
/* (Use the "read" DXPL because partial I/O on corrupted data test needs to ignore errors during writing) */
if(H5Dwrite (dataset, H5T_NATIVE_INT, sid, sid, dxpl, points) < 0)
- TEST_ERROR;
+ TEST_ERROR;
if(corrupted) {
/* Default behavior is failure when data is corrupted. */
@@ -1963,27 +2003,28 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
status=H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, write_dxpl, check);
} H5E_END_TRY;
if(status>=0) TEST_ERROR;
- } else {
+ }
+ else {
if(H5Dread (dataset, H5T_NATIVE_INT, sid, sid, dxpl, check) < 0)
- TEST_ERROR;
+ TEST_ERROR;
/* Check that the values read are the same as the values written */
for(i=0; i<(size_t)hs_size[0]; i++) {
- for(j=0; j<(size_t)hs_size[1]; j++) {
- if(points[(size_t)hs_offset[0]+i][(size_t)hs_offset[1]+j] !=
- check[(size_t)hs_offset[0]+i][(size_t)hs_offset[1]+j]) {
- H5_FAILED();
- fprintf(stderr," Read different values than written.\n");
- fprintf(stderr," At index %lu,%lu\n",
- (unsigned long)((size_t)hs_offset[0]+i),
- (unsigned long)((size_t)hs_offset[1]+j));
- fprintf(stderr," At original: %d\n",
- (int)points[(size_t)hs_offset[0]+i][(size_t)hs_offset[1]+j]);
- fprintf(stderr," At returned: %d\n",
- (int)check[(size_t)hs_offset[0]+i][(size_t)hs_offset[1]+j]);
- goto error;
- }
- }
+ for(j=0; j<(size_t)hs_size[1]; j++) {
+ if(points[(size_t)hs_offset[0]+i][(size_t)hs_offset[1]+j] !=
+ check[(size_t)hs_offset[0]+i][(size_t)hs_offset[1]+j]) {
+ H5_FAILED();
+ fprintf(stderr," Read different values than written.\n");
+ fprintf(stderr," At index %lu,%lu\n",
+ (unsigned long)((size_t)hs_offset[0]+i),
+ (unsigned long)((size_t)hs_offset[1]+j));
+ fprintf(stderr," At original: %d\n",
+ (int)points[(size_t)hs_offset[0]+i][(size_t)hs_offset[1]+j]);
+ fprintf(stderr," At returned: %d\n",
+ (int)check[(size_t)hs_offset[0]+i][(size_t)hs_offset[1]+j]);
+ goto error;
+ }
+ }
}
}
@@ -1996,6 +2037,7 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
if(H5Dclose (dataset) < 0) goto error;
if(H5Sclose (sid) < 0) goto error;
if(H5Pclose (dxpl) < 0) goto error;
+ if(H5Pclose (write_dxpl) < 0) goto error;
HDfree (tconv_buf);
return(0);
@@ -2007,18 +2049,14 @@ error:
}
/*-------------------------------------------------------------------------
- * Function: test_filter_noencoder
- *
- * Purpose: Tests filters with no encoder present. Ensures that data
- * can still be decoded correctly and that errors are thrown
- * when the application tries to write.
+ * Function: test_filter_noencoder
*
- * Return: Success: 0
- * Failure: -1
- *
- * Programmer: Nat Furrer and James Laird
- * Monday, June 7, 2004
+ * Purpose: Tests filters with no encoder present. Ensures that data
+ * can still be decoded correctly and that errors are thrown
+ * when the application tries to write.
*
+ * Return: Success: 0
+ * Failure: -1
*-------------------------------------------------------------------------
*/
#ifdef H5_HAVE_FILTER_SZIP
@@ -2089,7 +2127,7 @@ test_filter_noencoder(const char *dset_name)
*/
dims = 20; /* Dataset is originally of size 10 */
H5E_BEGIN_TRY{
- err = H5Dset_extent(dset_id, &dims);
+ err = H5Dset_extent(dset_id, &dims);
}H5E_END_TRY
if(err >= 0) goto error;
@@ -2098,7 +2136,7 @@ test_filter_noencoder(const char *dset_name)
* the filter does not have an encoder.
*/
H5E_BEGIN_TRY{
- err = H5Dwrite(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, test_ints);
+ err = H5Dwrite(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, test_ints);
}H5E_END_TRY
if(err >= 0) goto error;
@@ -2136,10 +2174,6 @@ error:
*
* Return: Success: 0
* Failure: -1
- *
- * Programmer: Nat Furrer and James Laird
- * Thursday, June 10, 2004
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -2176,7 +2210,7 @@ test_get_filter_info(void)
#ifdef H5_HAVE_FILTER_SZIP
if(H5Zget_filter_info(H5Z_FILTER_SZIP, &flags) < 0) TEST_ERROR
- if(SZ_encoder_enabled()) {
+ if(H5Z_SZIP->encoder_present) {
if(((flags & H5Z_FILTER_CONFIG_ENCODE_ENABLED) == 0) ||
((flags & H5Z_FILTER_CONFIG_DECODE_ENABLED) == 0))
TEST_ERROR
@@ -2203,16 +2237,12 @@ error:
}
/*-------------------------------------------------------------------------
- * Function: test_filters
+ * Function: test_filters
*
- * Purpose: Tests dataset filter.
- *
- * Return: Success: 0
- * Failure: -1
- *
- * Programmer: Robb Matzke
- * Wednesday, April 15, 1998
+ * Purpose: Tests dataset filter.
*
+ * Return: Success: 0
+ * Failure: -1
*-------------------------------------------------------------------------
*/
static herr_t
@@ -2222,27 +2252,27 @@ H5_ATTR_UNUSED
#endif /* H5_HAVE_FILTER_SZIP */
fapl)
{
- hid_t dc; /* Dataset creation property list ID */
+ hid_t dc; /* Dataset creation property list ID */
const hsize_t chunk_size[2] = {FILTER_CHUNK_DIM1, FILTER_CHUNK_DIM2}; /* Chunk dimensions */
- hsize_t null_size; /* Size of dataset with null filter */
+ hsize_t null_size; /* Size of dataset with null filter */
- hsize_t fletcher32_size; /* Size of dataset with Fletcher32 checksum */
+ hsize_t fletcher32_size; /* Size of dataset with Fletcher32 checksum */
unsigned data_corrupt[3]; /* position and length of data to be corrupted */
#ifdef H5_HAVE_FILTER_DEFLATE
- hsize_t deflate_size; /* Size of dataset with deflate filter */
+ hsize_t deflate_size; /* Size of dataset with deflate filter */
#endif /* H5_HAVE_FILTER_DEFLATE */
#ifdef H5_HAVE_FILTER_SZIP
- hsize_t szip_size; /* Size of dataset with szip filter */
- unsigned szip_options_mask=H5_SZIP_NN_OPTION_MASK;
- unsigned szip_pixels_per_block=4;
+ hsize_t szip_size; /* Size of dataset with szip filter */
+ unsigned szip_options_mask = H5_SZIP_NN_OPTION_MASK;
+ unsigned szip_pixels_per_block = 4;
#endif /* H5_HAVE_FILTER_SZIP */
hsize_t shuffle_size; /* Size of dataset with shuffle filter */
#if(defined H5_HAVE_FILTER_DEFLATE | defined H5_HAVE_FILTER_SZIP)
- hsize_t combo_size; /* Size of dataset with multiple filters */
+ hsize_t combo_size; /* Size of dataset with multiple filters */
#endif /* defined H5_HAVE_FILTER_DEFLATE | defined H5_HAVE_FILTER_SZIP */
/* test the H5Zget_filter_info function */
@@ -2337,21 +2367,23 @@ H5_ATTR_UNUSED
if((dc = H5Pcreate(H5P_DATASET_CREATE)) < 0) goto error;
if(H5Pset_chunk (dc, 2, chunk_size) < 0) goto error;
- puts("");
- if(H5Pset_szip(dc, szip_options_mask, szip_pixels_per_block) < 0) goto error;
- if(test_filter_internal(file,DSET_SZIP_NAME,dc,DISABLE_FLETCHER32,DATA_NOT_CORRUPTED,&szip_size) < 0) goto error;
+ puts("");
+ if(H5Pset_szip(dc, szip_options_mask, szip_pixels_per_block) < 0) goto error;
+ if(test_filter_internal(file,DSET_SZIP_NAME,dc,DISABLE_FLETCHER32,DATA_NOT_CORRUPTED,&szip_size) < 0) goto error;
if(H5Pclose (dc) < 0) goto error;
- } else {
- SKIPPED();
+ }
+ else {
+ SKIPPED();
}
TESTING("szip filter (without encoder)");
if( h5_szip_can_encode() != 1) {
- puts("");
- if(test_filter_noencoder(NOENCODER_SZIP_DATASET) < 0) goto error;
- } else {
- SKIPPED();
+ puts("");
+ if(test_filter_noencoder(NOENCODER_SZIP_DATASET) < 0) goto error;
+ }
+ else {
+ SKIPPED();
}
#else /* H5_HAVE_FILTER_SZIP */
@@ -2425,22 +2457,24 @@ H5_ATTR_UNUSED
if(H5Pset_fletcher32 (dc) < 0) goto error;
if(H5Pset_shuffle (dc) < 0) goto error;
- /* Make sure encoding is enabled */
+ /* Make sure encoding is enabled */
if( h5_szip_can_encode() == 1) {
- puts("");
- if(H5Pset_szip(dc, szip_options_mask, szip_pixels_per_block) < 0) goto error;
- if(test_filter_internal(file,DSET_SHUF_SZIP_FLET_NAME,dc,ENABLE_FLETCHER32,DATA_NOT_CORRUPTED,&combo_size) < 0) goto error;
- } else {
- SKIPPED();
+ puts("");
+ if(H5Pset_szip(dc, szip_options_mask, szip_pixels_per_block) < 0) goto error;
+ if(test_filter_internal(file,DSET_SHUF_SZIP_FLET_NAME,dc,ENABLE_FLETCHER32,DATA_NOT_CORRUPTED,&combo_size) < 0) goto error;
+ }
+ else {
+ SKIPPED();
}
TESTING("shuffle+szip+checksum filters(checksum first, without encoder)");
if( h5_szip_can_encode() != 1) {
- puts("");
- if(test_filter_noencoder(NOENCODER_SZIP_SHUFF_FLETCH_DATASET) < 0) goto error;
- } else {
- SKIPPED();
+ puts("");
+ if(test_filter_noencoder(NOENCODER_SZIP_SHUFF_FLETCH_DATASET) < 0) goto error;
+ }
+ else {
+ SKIPPED();
}
/* Clean up objects used for this test */
@@ -2450,20 +2484,20 @@ H5_ATTR_UNUSED
/* Make sure encoding is enabled */
if( h5_szip_can_encode() == 1) {
- puts("");
- if((dc = H5Pcreate(H5P_DATASET_CREATE)) < 0) goto error;
- if(H5Pset_chunk (dc, 2, chunk_size) < 0) goto error;
- if(H5Pset_shuffle (dc) < 0) goto error;
- if(H5Pset_szip(dc, szip_options_mask, szip_pixels_per_block) < 0) goto error;
- if(H5Pset_fletcher32 (dc) < 0) goto error;
-
- if(test_filter_internal(file,DSET_SHUF_SZIP_FLET_NAME_2,dc,ENABLE_FLETCHER32,DATA_NOT_CORRUPTED,&combo_size) < 0) goto error;
+ puts("");
+ if((dc = H5Pcreate(H5P_DATASET_CREATE)) < 0) goto error;
+ if(H5Pset_chunk (dc, 2, chunk_size) < 0) goto error;
+ if(H5Pset_shuffle (dc) < 0) goto error;
+ if(H5Pset_szip(dc, szip_options_mask, szip_pixels_per_block) < 0) goto error;
+ if(H5Pset_fletcher32 (dc) < 0) goto error;
- /* Clean up objects used for this test */
- if(H5Pclose (dc) < 0) goto error;
+ if(test_filter_internal(file,DSET_SHUF_SZIP_FLET_NAME_2,dc,ENABLE_FLETCHER32,DATA_NOT_CORRUPTED,&combo_size) < 0) goto error;
- } else {
- SKIPPED();
+ /* Clean up objects used for this test */
+ if(H5Pclose (dc) < 0) goto error;
+ }
+ else {
+ SKIPPED();
}
#else /* H5_HAVE_FILTER_SZIP */
@@ -2477,18 +2511,14 @@ error:
return -1;
}
-
+
/*-------------------------------------------------------------------------
- * Function: test_missing_filter
- *
- * Purpose: Tests library behavior when filter is missing
+ * Function: test_missing_filter
*
- * Return: Success: 0
- * Failure: -1
- *
- * Programmer: Quincey Koziol
- * Thursday, November 14, 2002
+ * Purpose: Tests library behavior when filter is missing
*
+ * Return: Success: 0
+ * Failure: -1
*-------------------------------------------------------------------------
*/
static herr_t
@@ -2504,6 +2534,7 @@ test_missing_filter(hid_t file)
size_t i,j; /* Local index variables */
herr_t ret; /* Generic return value */
const char *testfile = H5_get_srcdir_filename(FILE_DEFLATE_NAME); /* Corrected test file name */
+ hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
TESTING("dataset access with missing filter");
@@ -2516,8 +2547,13 @@ test_missing_filter(hid_t file)
goto error;
} /* end if */
- /* Unregister deflate filter (use internal function) */
- if(H5Z_unregister(H5Z_FILTER_DEFLATE) < 0) {
+ /* Push API context */
+ if(H5CX_push() < 0) FAIL_STACK_ERROR
+ api_ctx_pushed = TRUE;
+
+ /* Unregister deflate filter */
+ /* (Use private routine, to avoid range checking on filter ID) */
+ if(H5Z__unregister(H5Z_FILTER_DEFLATE) < 0) {
H5_FAILED();
printf(" Line %d: Can't unregister deflate filter\n",__LINE__);
goto error;
@@ -2613,16 +2649,16 @@ test_missing_filter(hid_t file)
/* Compare data */
/* Check that the values read are the same as the values written */
for(i=0; i<(size_t)dims[0]; i++) {
- for(j=0; j<(size_t)dims[1]; j++) {
- if(points[i][j] != check[i][j]) {
- H5_FAILED();
- printf(" Line %d: Read different values than written.\n",__LINE__);
- printf(" At index %lu,%lu\n", (unsigned long)(i), (unsigned long)(j));
- printf(" At original: %d\n",points[i][j]);
- printf(" At returned: %d\n",check[i][j]);
- goto error;
- } /* end if */
- } /* end for */
+ for(j=0; j<(size_t)dims[1]; j++) {
+ if(points[i][j] != check[i][j]) {
+ H5_FAILED();
+ printf(" Line %d: Read different values than written.\n",__LINE__);
+ printf(" At index %lu,%lu\n", (unsigned long)(i), (unsigned long)(j));
+ printf(" At original: %d\n",points[i][j]);
+ printf(" At returned: %d\n",check[i][j]);
+ goto error;
+ } /* end if */
+ } /* end for */
} /* end for */
/* Close dataset */
@@ -2710,39 +2746,40 @@ test_missing_filter(hid_t file)
} /* end if */
#endif /* H5_HAVE_FILTER_DEFLATE */
+ /* Pop API context */
+ if(api_ctx_pushed && H5CX_pop() < 0) FAIL_STACK_ERROR
+ api_ctx_pushed = FALSE;
+
PASSED();
return 0;
error:
+ if(api_ctx_pushed) H5CX_pop();
+
return -1;
}
/*-------------------------------------------------------------------------
- * Function: test_onebyte_shuffle
- *
- * Purpose: Tests the 8-bit array with shuffling algorithm.
- * The shuffled array should be the same result as
- * that before the shuffling.
+ * Function: test_onebyte_shuffle
*
- * Return: Success: 0
- *
- * Failure: -1
- *
- * Programmer: Kent Yang
- * Wednesday, Nov. 13th, 2002
+ * Purpose: Tests the 8-bit array with shuffling algorithm.
+ * The shuffled array should be the same result as
+ * that before the shuffling.
*
+ * Return: Success: 0
+ * Failure: -1
*-------------------------------------------------------------------------
*/
static herr_t
test_onebyte_shuffle(hid_t file)
{
- hid_t dataset, space,dc;
- const hsize_t size[2] = {10, 20};
- const hsize_t chunk_size[2] = {10, 20};
- unsigned char orig_data[10][20];
- unsigned char new_data[10][20];
- size_t i, j;
+ hid_t dataset, space,dc;
+ const hsize_t size[2] = {10, 20};
+ const hsize_t chunk_size[2] = {10, 20};
+ unsigned char orig_data[10][20];
+ unsigned char new_data[10][20];
+ size_t i, j;
TESTING("8-bit shuffling (setup)");
@@ -2756,11 +2793,11 @@ test_onebyte_shuffle(hid_t file)
/* Create the dataset */
if((dataset = H5Dcreate2(file, DSET_ONEBYTE_SHUF_NAME, H5T_NATIVE_UCHAR,
- space, H5P_DEFAULT, dc, H5P_DEFAULT)) < 0) goto error;
+ space, H5P_DEFAULT, dc, H5P_DEFAULT)) < 0) goto error;
for(i= 0;i< 10; i++)
- for(j = 0; j < 20; j++)
- orig_data[i][j] = (unsigned char)HDrandom();
+ for(j = 0; j < 20; j++)
+ orig_data[i][j] = (unsigned char)HDrandom();
PASSED();
@@ -2771,9 +2808,8 @@ test_onebyte_shuffle(hid_t file)
*/
TESTING("8-bit shuffling (write)");
- if(H5Dwrite(dataset, H5T_NATIVE_UCHAR, H5S_ALL, H5S_ALL, H5P_DEFAULT,
- orig_data) < 0)
- goto error;
+ if(H5Dwrite(dataset, H5T_NATIVE_UCHAR, H5S_ALL, H5S_ALL, H5P_DEFAULT, orig_data) < 0)
+ goto error;
PASSED();
@@ -2784,21 +2820,20 @@ test_onebyte_shuffle(hid_t file)
TESTING("8-bit shuffling (read)");
/* Read the dataset back */
- if(H5Dread(dataset, H5T_NATIVE_UCHAR, H5S_ALL, H5S_ALL, H5P_DEFAULT,
- new_data) < 0)
- goto error;
+ if(H5Dread(dataset, H5T_NATIVE_UCHAR, H5S_ALL, H5S_ALL, H5P_DEFAULT, new_data) < 0)
+ goto error;
/* Check that the values read are the same as the values written */
for(i=0; i<(size_t)size[0]; i++) {
- for(j=0; j<(size_t)size[1]; j++) {
- if(new_data[i][j] != orig_data[i][j]) {
- H5_FAILED();
- printf(" Read different values than written.\n");
- printf(" At index %lu,%lu\n",
- (unsigned long)i, (unsigned long)j);
- goto error;
- }
- }
+ for(j=0; j<(size_t)size[1]; j++) {
+ if(new_data[i][j] != orig_data[i][j]) {
+ H5_FAILED();
+ printf(" Read different values than written.\n");
+ printf(" At index %lu,%lu\n",
+ (unsigned long)i, (unsigned long)j);
+ goto error;
+ }
+ }
}
/*----------------------------------------------------------------------
@@ -2816,19 +2851,14 @@ error:
return -1;
}
-
+
/*-------------------------------------------------------------------------
* Function: test_nbit_int
*
* Purpose: Tests the integer datatype for nbit filter
*
* Return: Success: 0
- *
* Failure: -1
- *
- * Programmer: Xiaowen Wu
- * Wednesday, Dec. 23th, 2004
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -2874,14 +2904,14 @@ test_nbit_int(hid_t file)
/* Initialize data, assuming size of long long >= size of int */
for(i= 0;i< (size_t)size[0]; i++)
- for(j = 0; j < (size_t)size[1]; j++) {
- power = HDpow(2.0f, (double)(precision - 1));
- orig_data[i][j] = (int)(((long long)HDrandom() % (long long)power) << offset);
+ for(j = 0; j < (size_t)size[1]; j++) {
+ power = HDpow(2.0f, (double)(precision - 1));
+ orig_data[i][j] = (int)(((long long)HDrandom() % (long long)power) << offset);
- /* even-numbered values are negtive */
- if((i*size[1]+j+1)%2 == 0)
- orig_data[i][j] = -orig_data[i][j];
- }
+ /* even-numbered values are negtive */
+ if((i*size[1]+j+1)%2 == 0)
+ orig_data[i][j] = -orig_data[i][j];
+ }
PASSED();
@@ -2892,8 +2922,7 @@ test_nbit_int(hid_t file)
*/
TESTING(" nbit int (write)");
- if(H5Dwrite(dataset, mem_datatype, H5S_ALL, H5S_ALL, H5P_DEFAULT,
- orig_data) < 0)
+ if(H5Dwrite(dataset, mem_datatype, H5S_ALL, H5S_ALL, H5P_DEFAULT, orig_data) < 0)
goto error;
PASSED();
@@ -2904,8 +2933,7 @@ test_nbit_int(hid_t file)
TESTING(" nbit int (read)");
/* Read the dataset back */
- if(H5Dread(dataset, mem_datatype, H5S_ALL, H5S_ALL, H5P_DEFAULT,
- new_data) < 0)
+ if(H5Dread(dataset, mem_datatype, H5S_ALL, H5S_ALL, H5P_DEFAULT, new_data) < 0)
goto error;
/* Check that the values read are the same as the values written
@@ -2941,19 +2969,14 @@ error:
return -1;
}
-
+
/*-------------------------------------------------------------------------
* Function: test_nbit_float
*
* Purpose: Tests the float datatype of nbit filter
*
* Return: Success: 0
- *
* Failure: -1
- *
- * Programmer: Xiaowen Wu
- * Friday, Jan. 21th, 2005
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -2969,7 +2992,7 @@ test_nbit_float(hid_t file)
{-49140.0f, 2350.25f, -3.2110596e-1f, 6.4998865e-5f, -0.0f}};
float new_data[2][5];
size_t precision, offset;
- size_t i, j;
+ size_t i, j;
TESTING(" nbit float (setup)");
@@ -3064,19 +3087,14 @@ error:
return -1;
}
-
+
/*-------------------------------------------------------------------------
* Function: test_nbit_double
*
* Purpose: Tests the double datatype of nbit filter
*
* Return: Success: 0
- *
* Failure: -1
- *
- * Programmer: Xiaowen Wu
- * Wednesday, Jan. 26th, 2005
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -3096,12 +3114,12 @@ test_nbit_double(hid_t file)
H5_DOUBLE(1.2677579992621376e-61),
H5_DOUBLE(64568.289448797700),
H5_DOUBLE(-1.0619721778839084e-75)
- },
+ },
{
H5_DOUBLE(2.1499497833454840e+56),
- H5_DOUBLE(6.6562295504670740e-3),
- H5_DOUBLE(-1.5747263393432150),
- H5_DOUBLE(1.0711093225222612),
+ H5_DOUBLE(6.6562295504670740e-3),
+ H5_DOUBLE(-1.5747263393432150),
+ H5_DOUBLE(1.0711093225222612),
H5_DOUBLE(-9.8971679387636870e-1)
}};
double new_data[2][5];
@@ -3201,19 +3219,14 @@ error:
return -1;
}
-
+
/*-------------------------------------------------------------------------
* Function: test_nbit_array
*
* Purpose: Tests the simple version array datatype for nbit filter
*
* Return: Success: 0
- *
* Failure: -1
- *
- * Programmer: Xiaowen Wu
- * Tuesday, Jan. 18th, 2005
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -3333,7 +3346,7 @@ error:
return -1;
}
-
+
/*-------------------------------------------------------------------------
* Function: test_nbit_compound
*
@@ -3365,7 +3378,7 @@ test_nbit_compound(hid_t file)
hid_t dataset, space, dc;
const hsize_t size[2] = {2, 5};
const hsize_t chunk_size[2] = {2, 5};
- const float float_val[2][5] = {{188384.0F, 19.103516F, -1.0831790e9F, -84.242188F, 5.2045898F},
+ const float float_val[2][5] = {{188384.0F, 19.103516F, -1.0831790e9F, -84.242188F, 5.2045898F},
{-49140.0F, 2350.25F, -3.2110596e-1F, 6.4998865e-5F, -0.0F}};
atomic orig_data[2][5];
atomic new_data[2][5];
@@ -3550,7 +3563,7 @@ error:
return -1;
}
-
+
/*-------------------------------------------------------------------------
* Function: test_nbit_compound_2
*
@@ -3799,7 +3812,7 @@ test_nbit_compound_2(hid_t file)
/* Check that the values read are the same as the values written
* Use mask for checking the significant bits, ignoring the padding bits
*/
- /* The original code
+ /* The original code
* i_mask = ~((unsigned)~0 << (precision[0] + offset[0])) & ((unsigned)~0 << offset[0]);
* left shift a 32-bit integer for 32-bit. The result is undefined by C language. A user
* discovered it using clang compiler with -fcatch-undefined-behavior option (see Issue 7674
@@ -3895,7 +3908,7 @@ error:
return -1;
}
-
+
/*-------------------------------------------------------------------------
* Function: test_nbit_compound_3
*
@@ -4075,7 +4088,7 @@ error:
return -1;
}
-
+
/*-------------------------------------------------------------------------
* Function: test_nbit_int_size
*
@@ -4137,7 +4150,7 @@ test_nbit_int_size(hid_t file)
printf(" line %d: H5Pset_order failed\n",__LINE__);
goto error;
} /* end if */
-
+
if(H5Tset_size(datatype, 4)<0) {
H5_FAILED();
printf(" line %d: H5Pset_size failed\n",__LINE__);
@@ -4193,7 +4206,7 @@ test_nbit_int_size(hid_t file)
* Create a new dataset within the file.
*/
if((dataset = H5Dcreate2 (file, DSET_NBIT_INT_SIZE_NAME, datatype,
- dataspace, H5P_DEFAULT,
+ dataspace, H5P_DEFAULT,
dset_create_props, H5P_DEFAULT))<0) {
H5_FAILED();
printf(" line %d: H5dwrite failed\n",__LINE__);
@@ -4210,7 +4223,7 @@ test_nbit_int_size(hid_t file)
goto error;
} /* end if */
- /*
+ /*
* Get the precision of the data type
*/
if((precision = H5Tget_precision(datatype)) == 0) {
@@ -4219,10 +4232,10 @@ test_nbit_int_size(hid_t file)
goto error;
} /* end if */
- /*
+ /*
* The size of the dataset after compression should around 2 * DSET_DIM1 * DSET_DIM2
*/
- if((dset_size = H5Dget_storage_size(dataset)) < DSET_DIM1*DSET_DIM2*(precision/8) ||
+ if((dset_size = H5Dget_storage_size(dataset)) < DSET_DIM1*DSET_DIM2*(precision/8) ||
dset_size > DSET_DIM1*DSET_DIM2*(precision/8) + 1*KB) {
H5_FAILED();
HDfprintf(stdout, " Line %d: wrong dataset size: %Hu\n",__LINE__, dset_size);
@@ -4242,11 +4255,11 @@ error:
return -1;
}
-
+
/*-------------------------------------------------------------------------
* Function: test_nbit_flt_size
*
- * Purpose: Tests the correct size of the floating-number datatype for
+ * Purpose: Tests the correct size of the floating-number datatype for
* nbit filter
*
* Return: Success: 0
@@ -4337,15 +4350,15 @@ test_nbit_flt_size(hid_t file)
printf(" line %d: H5Pset_order failed\n",__LINE__);
goto error;
} /* end if */
-
+
if(H5Tset_ebias(datatype, 31)<0) {
H5_FAILED();
printf(" line %d: H5Pset_size failed\n",__LINE__);
goto error;
} /* end if */
- /*
- * Initiliaze data buffer with random data
+ /*
+ * Initiliaze data buffer with random data
*/
for (i=0; i < DSET_DIM1; i++)
for (j=0; j < DSET_DIM2; j++)
@@ -4391,7 +4404,7 @@ test_nbit_flt_size(hid_t file)
* Create a new dataset within the file.
*/
if((dataset = H5Dcreate2 (file, DSET_NBIT_FLT_SIZE_NAME, datatype,
- dataspace, H5P_DEFAULT,
+ dataspace, H5P_DEFAULT,
dset_create_props, H5P_DEFAULT))<0) {
H5_FAILED();
printf(" line %d: H5dwrite failed\n",__LINE__);
@@ -4408,7 +4421,7 @@ test_nbit_flt_size(hid_t file)
goto error;
} /* end if */
- /*
+ /*
* Get the precision of the data type
*/
if((precision = H5Tget_precision(datatype)) == 0) {
@@ -4417,10 +4430,10 @@ test_nbit_flt_size(hid_t file)
goto error;
} /* end if */
- /*
+ /*
* The size of the dataset after compression should around 2 * DSET_DIM1 * DSET_DIM2
*/
- if((dset_size = H5Dget_storage_size(dataset)) < DSET_DIM1*DSET_DIM2*(precision/8) ||
+ if((dset_size = H5Dget_storage_size(dataset)) < DSET_DIM1*DSET_DIM2*(precision/8) ||
dset_size > DSET_DIM1*DSET_DIM2*(precision/8) + 1*KB) {
H5_FAILED();
HDfprintf(stdout, " Line %d: wrong dataset size: %Hu\n",__LINE__, dset_size);
@@ -4438,7 +4451,7 @@ test_nbit_flt_size(hid_t file)
error:
return -1;
}
-
+
/*-------------------------------------------------------------------------
* Function: test_scaleoffset_int
*
@@ -4550,7 +4563,7 @@ error:
return -1;
}
-
+
/*-------------------------------------------------------------------------
* Function: test_scaleoffset_int_2
*
@@ -4678,7 +4691,7 @@ error:
return -1;
}
-
+
/*-------------------------------------------------------------------------
* Function: test_scaleoffset_float
*
@@ -4791,7 +4804,7 @@ error:
return -1;
}
-
+
/*-------------------------------------------------------------------------
* Function: test_scaleoffset_float_2
*
@@ -4920,7 +4933,7 @@ error:
return -1;
}
-
+
/*-------------------------------------------------------------------------
* Function: test_scaleoffset_double
*
@@ -5033,7 +5046,7 @@ error:
return -1;
}
-
+
/*-------------------------------------------------------------------------
* Function: test_scaleoffset_double_2
*
@@ -5163,20 +5176,20 @@ error:
return -1;
}
-
+
/*-------------------------------------------------------------------------
- * Function: test_multiopen
+ * Function: test_multiopen
*
- * Purpose: Tests that a bug no longer exists. If a dataset is opened
- * twice and one of the handles is used to extend the dataset,
- * then the other handle should return the new size when
- * queried.
+ * Purpose: Tests that a bug no longer exists. If a dataset is opened
+ * twice and one of the handles is used to extend the dataset,
+ * then the other handle should return the new size when
+ * queried.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Tuesday, June 9, 1998
*
*-------------------------------------------------------------------------
@@ -5184,10 +5197,10 @@ error:
static herr_t
test_multiopen (hid_t file)
{
- hid_t dcpl = -1, space = -1, dset1 = -1, dset2 = -1;
- hsize_t cur_size[1] = {10};
- static hsize_t max_size[1] = {H5S_UNLIMITED};
- hsize_t tmp_size[1];
+ hid_t dcpl = -1, space = -1, dset1 = -1, dset2 = -1;
+ hsize_t cur_size[1] = {10};
+ hsize_t tmp_size[1];
+ static hsize_t max_size[1] = {H5S_UNLIMITED};
TESTING("multi-open with extending");
@@ -5207,9 +5220,9 @@ test_multiopen (hid_t file)
if((space = H5Dget_space(dset2)) < 0) goto error;
if(H5Sget_simple_extent_dims(space, tmp_size, NULL) < 0) goto error;
if(cur_size[0] != tmp_size[0]) {
- H5_FAILED();
- printf(" Got %d instead of %d!\n", (int)tmp_size[0], (int)cur_size[0]);
- goto error;
+ H5_FAILED();
+ printf(" Got %d instead of %d!\n", (int)tmp_size[0], (int)cur_size[0]);
+ goto error;
} /* end if */
if(H5Dclose(dset1) < 0) goto error;
@@ -5222,25 +5235,25 @@ test_multiopen (hid_t file)
error:
H5E_BEGIN_TRY {
- H5Dclose(dset1);
- H5Dclose(dset2);
- H5Sclose(space);
- H5Pclose(dcpl);
+ H5Dclose(dset1);
+ H5Dclose(dset2);
+ H5Sclose(space);
+ H5Pclose(dcpl);
} H5E_END_TRY;
return -1;
}
-
+
/*-------------------------------------------------------------------------
- * Function: test_types
+ * Function: test_types
*
- * Purpose: Make some datasets with various types so we can test h5ls.
+ * Purpose: Make some datasets with various types so we can test h5ls.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Monday, June 7, 1999
*
*-------------------------------------------------------------------------
@@ -5248,10 +5261,10 @@ test_multiopen (hid_t file)
static herr_t
test_types(hid_t file)
{
- hid_t grp=-1, type=-1, space=-1, dset=-1;
- size_t i;
- hsize_t nelmts;
- unsigned char buf[32];
+ hid_t grp=-1, type=-1, space=-1, dset=-1;
+ size_t i;
+ hsize_t nelmts;
+ unsigned char buf[32];
TESTING("various datatypes");
if((grp = H5Gcreate2(file, "typetests", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto error;
@@ -5259,12 +5272,12 @@ test_types(hid_t file)
/* bitfield_1 */
nelmts = sizeof(buf);
if((type=H5Tcopy(H5T_STD_B8LE)) < 0 ||
- (space=H5Screate_simple(1, &nelmts, NULL)) < 0 ||
- (dset=H5Dcreate2(grp, "bitfield_1", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
- goto error;
+ (space=H5Screate_simple(1, &nelmts, NULL)) < 0 ||
+ (dset=H5Dcreate2(grp, "bitfield_1", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ goto error;
for(i=0; i<sizeof buf; i++) buf[i] = (unsigned char)0xff ^ (unsigned char)i;
if(H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
- goto error;
+ goto error;
if(H5Sclose(space) < 0) goto error;
if(H5Tclose(type) < 0) goto error;
@@ -5273,12 +5286,12 @@ test_types(hid_t file)
/* bitfield_2 */
nelmts = sizeof(buf)/2;
if((type=H5Tcopy(H5T_STD_B16LE)) < 0 ||
- (space=H5Screate_simple(1, &nelmts, NULL)) < 0 ||
- (dset=H5Dcreate2(grp, "bitfield_2", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
- goto error;
+ (space=H5Screate_simple(1, &nelmts, NULL)) < 0 ||
+ (dset=H5Dcreate2(grp, "bitfield_2", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ goto error;
for(i=0; i<sizeof buf; i++) buf[i] = (unsigned char)0xff ^ (unsigned char)i;
if(H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
- goto error;
+ goto error;
if(H5Sclose(space) < 0) goto error;
if(H5Tclose(type) < 0) goto error;
if(H5Dclose(dset) < 0) goto error;
@@ -5289,7 +5302,7 @@ test_types(hid_t file)
H5Tset_tag(type, "testing 1-byte opaque type") < 0 ||
(space = H5Screate_simple(1, &nelmts, NULL)) < 0 ||
(dset = H5Dcreate2(grp, "opaque_1", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
- goto error;
+ goto error;
for(i = 0; i < sizeof buf; i++)
buf[i] = (unsigned char)0xff ^ (unsigned char)i;
if(H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) goto error;
@@ -5303,7 +5316,7 @@ test_types(hid_t file)
H5Tset_tag(type, "testing 4-byte opaque type") < 0 ||
(space = H5Screate_simple(1, &nelmts, NULL)) < 0 ||
(dset = H5Dcreate2(grp, "opaque_2", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
- goto error;
+ goto error;
for(i = 0; i < sizeof buf; i++)
buf[i] = (unsigned char)0xff ^ (unsigned char)i;
if(H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) goto error;
@@ -5318,10 +5331,10 @@ test_types(hid_t file)
error:
H5E_BEGIN_TRY {
- H5Gclose(grp);
- H5Tclose(type);
- H5Sclose(space);
- H5Dclose(dset);
+ H5Gclose(grp);
+ H5Tclose(type);
+ H5Sclose(space);
+ H5Dclose(dset);
} H5E_END_TRY;
return -1;
}
@@ -5329,27 +5342,27 @@ test_types(hid_t file)
/* This message derives from H5Z */
const H5Z_class2_t H5Z_CAN_APPLY_TEST[1] = {{
H5Z_CLASS_T_VERS,
- H5Z_FILTER_CAN_APPLY_TEST, /* Filter id number */
+ H5Z_FILTER_CAN_APPLY_TEST, /* Filter id number */
1, 1,
- "can_apply_test", /* Filter name for debugging */
+ "can_apply_test", /* Filter name for debugging */
can_apply_bogus, /* The "can apply" callback */
NULL, /* The "set local" callback */
- filter_bogus, /* The actual filter function */
+ filter_bogus, /* The actual filter function */
}};
-
+
/*-------------------------------------------------------------------------
- * Function: test_can_apply
+ * Function: test_can_apply
*
- * Purpose: Tests library behavior when filter indicates it can't
+ * Purpose: Tests library behavior when filter indicates it can't
* apply to certain combinations of creation parameters.
* The filter is mandate. If the CAN_APPLY callback function
* indicates wrong datatype, the dataset creation should fail.
*
- * Return: Success: 0
- * Failure: -1
+ * Return: Success: 0
+ * Failure: -1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Friday, April 5, 2003
*
*-------------------------------------------------------------------------
@@ -5398,7 +5411,7 @@ test_can_apply(hid_t file)
} /* end if */
/* Create new dataset */
- /* (Should fail because the 'can apply' function should indicate inappropriate
+ /* (Should fail because the 'can apply' function should indicate inappropriate
* combination. And the filter is mandate.) */
H5E_BEGIN_TRY {
dsid = H5Dcreate2(file, DSET_CAN_APPLY_NAME, H5T_NATIVE_DOUBLE, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT);
@@ -5466,16 +5479,16 @@ test_can_apply(hid_t file)
/* Compare data */
/* Check that the values read are the same as the values written */
for(i=0; i<(size_t)dims[0]; i++) {
- for(j=0; j<(size_t)dims[1]; j++) {
- if(points[i][j] != check[i][j]) {
- H5_FAILED();
- printf(" Line %d: Read different values than written.\n",__LINE__);
- printf(" At index %lu,%lu\n", (unsigned long)(i), (unsigned long)(j));
- printf(" At original: %d\n",points[i][j]);
- printf(" At returned: %d\n",check[i][j]);
- goto error;
- } /* end if */
- } /* end for */
+ for(j=0; j<(size_t)dims[1]; j++) {
+ if(points[i][j] != check[i][j]) {
+ H5_FAILED();
+ printf(" Line %d: Read different values than written.\n",__LINE__);
+ printf(" At index %lu,%lu\n", (unsigned long)(i), (unsigned long)(j));
+ printf(" At original: %d\n",points[i][j]);
+ printf(" At returned: %d\n",check[i][j]);
+ goto error;
+ } /* end if */
+ } /* end for */
} /* end for */
/* Close dataset */
@@ -5510,29 +5523,29 @@ error:
/* This message derives from H5Z */
const H5Z_class2_t H5Z_CAN_APPLY_TEST2[1] = {{
H5Z_CLASS_T_VERS,
- H5Z_FILTER_CAN_APPLY_TEST2, /* Filter id number */
+ H5Z_FILTER_CAN_APPLY_TEST2, /* Filter id number */
1, 1,
- "can_apply_test", /* Filter name for debugging */
+ "can_apply_test", /* Filter name for debugging */
can_apply_bogus, /* The "can apply" callback */
NULL, /* The "set local" callback */
- filter_bogus3, /* The actual filter function */
+ filter_bogus3, /* The actual filter function */
}};
-
+
/*-------------------------------------------------------------------------
- * Function: test_can_apply2
+ * Function: test_can_apply2
*
- * Purpose: Tests library behavior when an optional filter indicates
- * it can't apply to certain combinations of creation
+ * Purpose: Tests library behavior when an optional filter indicates
+ * it can't apply to certain combinations of creation
* parameters. The filter function FILTER_BOGUS3 does nothing
- * than returning a failure. Because the filter is optional,
+ * than returning a failure. Because the filter is optional,
* the library skips the filter even though the CAN_APPLY_BOGUS
- * indicates the datatype DOUBLE can't apply to the dataset.
+ * indicates the datatype DOUBLE can't apply to the dataset.
*
- * Return: Success: 0
- * Failure: -1
+ * Return: Success: 0
+ * Failure: -1
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* 4 August 2010
*
*-------------------------------------------------------------------------
@@ -5625,16 +5638,16 @@ test_can_apply2(hid_t file)
/* Compare data */
/* Check that the values read are the same as the values written */
for(i=0; i<(size_t)dims[0]; i++) {
- for(j=0; j<(size_t)dims[1]; j++) {
- if(points[i][j] != check[i][j]) {
- H5_FAILED();
- printf(" Line %d: Read different values than written.\n",__LINE__);
- printf(" At index %lu,%lu\n", (unsigned long)(i), (unsigned long)(j));
- printf(" At original: %d\n",points[i][j]);
- printf(" At returned: %d\n",check[i][j]);
- goto error;
- } /* end if */
- } /* end for */
+ for(j=0; j<(size_t)dims[1]; j++) {
+ if(points[i][j] != check[i][j]) {
+ H5_FAILED();
+ printf(" Line %d: Read different values than written.\n",__LINE__);
+ printf(" At index %lu,%lu\n", (unsigned long)(i), (unsigned long)(j));
+ printf(" At original: %d\n",points[i][j]);
+ printf(" At returned: %d\n",check[i][j]);
+ goto error;
+ } /* end if */
+ } /* end for */
} /* end for */
/* Close dataset */
@@ -5667,17 +5680,17 @@ error:
} /* end test_can_apply2() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_can_apply_szip
+ * Function: test_can_apply_szip
*
- * Purpose: Tests library behavior when szip filter indicates it can't
+ * Purpose: Tests library behavior when szip filter indicates it can't
* apply to certain combinations of creation parameters
*
- * Return: Success: 0
- * Failure: -1
+ * Return: Success: 0
+ * Failure: -1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, April 7, 2003
*
*-------------------------------------------------------------------------
@@ -5864,24 +5877,24 @@ error:
/* This message derives from H5Z */
const H5Z_class2_t H5Z_SET_LOCAL_TEST[1] = {{
H5Z_CLASS_T_VERS,
- H5Z_FILTER_SET_LOCAL_TEST, /* Filter id number */
+ H5Z_FILTER_SET_LOCAL_TEST, /* Filter id number */
1, 1,
- "set_local_test", /* Filter name for debugging */
+ "set_local_test", /* Filter name for debugging */
NULL, /* The "can apply" callback */
set_local_bogus2, /* The "set local" callback */
- filter_bogus2, /* The actual filter function */
+ filter_bogus2, /* The actual filter function */
}};
-
+
/*-------------------------------------------------------------------------
- * Function: test_set_local
+ * Function: test_set_local
*
- * Purpose: Tests library behavior for "set local" filter callback
+ * Purpose: Tests library behavior for "set local" filter callback
*
- * Return: Success: 0
- * Failure: -1
+ * Return: Success: 0
+ * Failure: -1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, April 7, 2003
*
*-------------------------------------------------------------------------
@@ -5908,16 +5921,16 @@ test_set_local(hid_t fapl)
/* Initialize the integer & floating-point dataset */
n=1.0F;
for(i = 0; i < DSET_DIM1; i++)
- for(j = 0; j < DSET_DIM2; j++) {
- points[i][j] = (int)n++;
- points_dbl[i][j] = (double)1.5F*n++;
- }
+ for(j = 0; j < DSET_DIM2; j++) {
+ points[i][j] = (int)n++;
+ points_dbl[i][j] = (double)1.5F*n++;
+ }
/* Open file */
if((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) {
H5_FAILED();
printf(" Line %d: Can't open file\n",__LINE__);
- goto error;
+ goto error;
}
/* Create dcpl with special filter */
@@ -6051,16 +6064,16 @@ test_set_local(hid_t fapl)
/* Compare data */
/* Check that the values read are the modified version of what was written */
for(i=0; i<dims[0]; i++) {
- for(j=0; j<dims[1]; j++) {
- if((points[i][j]+(int)sizeof(int)) != check[i][j]) {
- H5_FAILED();
- printf(" Line %d: Read different values than written.\n",__LINE__);
- printf(" At index %lu,%lu\n", (unsigned long)(i), (unsigned long)(j));
- printf(" At original: %d\n",points[i][j]);
- printf(" At returned: %d\n",check[i][j]);
- goto error;
- } /* end if */
- } /* end for */
+ for(j=0; j<dims[1]; j++) {
+ if((points[i][j]+(int)sizeof(int)) != check[i][j]) {
+ H5_FAILED();
+ printf(" Line %d: Read different values than written.\n",__LINE__);
+ printf(" At index %lu,%lu\n", (unsigned long)(i), (unsigned long)(j));
+ printf(" At original: %d\n",points[i][j]);
+ printf(" At returned: %d\n",check[i][j]);
+ goto error;
+ } /* end if */
+ } /* end for */
} /* end for */
/* Close dataset */
@@ -6101,18 +6114,18 @@ test_set_local(hid_t fapl)
/* Compare data */
/* Check that the values read are the modified version of what was written */
for(i=0; i<dims[0]; i++) {
- for(j=0; j<dims[1]; j++) {
- /* If the difference between two values is greater than 0.001%, they're
+ for(j=0; j<dims[1]; j++) {
+ /* If the difference between two values is greater than 0.001%, they're
* considered not equal. */
if(!H5_DBL_REL_EQUAL(points_dbl[i][j], check_dbl[i][j], (double)0.00001F)) {
- H5_FAILED();
- printf(" Line %d: Read different values than written.\n",__LINE__);
- printf(" At index %lu,%lu\n", (unsigned long)(i), (unsigned long)(j));
- printf(" At original: %f\n",points_dbl[i][j]);
- printf(" At returned: %f\n",check_dbl[i][j]);
- goto error;
- } /* end if */
- } /* end for */
+ H5_FAILED();
+ printf(" Line %d: Read different values than written.\n",__LINE__);
+ printf(" At index %lu,%lu\n", (unsigned long)(i), (unsigned long)(j));
+ printf(" At original: %f\n",points_dbl[i][j]);
+ printf(" At returned: %f\n",check_dbl[i][j]);
+ goto error;
+ } /* end if */
+ } /* end for */
} /* end for */
/* Close dataset */
@@ -6137,18 +6150,18 @@ error:
return -1;
} /* end test_set_local() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_compare_dcpl
+ * Function: test_compare_dcpl
*
- * Purpose: Verifies that if the same DCPL was used to create two
+ * Purpose: Verifies that if the same DCPL was used to create two
* datasets, the DCPLs retrieved from each dataset should
* compare equal.
*
- * Return: Success: 0
- * Failure: -1
+ * Return: Success: 0
+ * Failure: -1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Wednesday, January 7, 2004
*
*-------------------------------------------------------------------------
@@ -6222,19 +6235,19 @@ error:
return -1;
} /* end test_compare_dcpl() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_copy_dcpl
+ * Function: test_copy_dcpl
*
- * Purpose: Verifies whether the copy of dataset creation property
+ * Purpose: Verifies whether the copy of dataset creation property
* list works. It tests the DCPL for chunked layout with
* filter and for contiguous layout with external storage.
* (Please see #1608 in Bugzilla)
*
- * Return: Success: 0
- * Failure: -1
+ * Return: Success: 0
+ * Failure: -1
*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* 28 January 2010
*
*-------------------------------------------------------------------------
@@ -6250,7 +6263,7 @@ test_copy_dcpl(hid_t file, hid_t fapl)
hid_t dcpl1_copy=(-1),dcpl2_copy=(-1);/* Copies of creation property list IDs */
const hsize_t dims[2] = {500, 4096}; /* Dataspace dimensions */
const hsize_t chunk_dims[2] = {250, 2048}; /* Chunk dimensions */
- char filename[FILENAME_BUF_SIZE];
+ char filename[FILENAME_BUF_SIZE];
hid_t new_file=(-1);
TESTING("copying dataset creation property lists");
@@ -6312,10 +6325,10 @@ test_copy_dcpl(hid_t file, hid_t fapl)
TEST_ERROR
if((new_dsid1 = H5Dcreate2(new_file, DSET_COPY_DCPL_NAME_1, H5T_NATIVE_INT, sid,
- H5P_DEFAULT, dcpl1_copy, H5P_DEFAULT)) < 0) TEST_ERROR
+ H5P_DEFAULT, dcpl1_copy, H5P_DEFAULT)) < 0) TEST_ERROR
if((new_dsid2 = H5Dcreate2(new_file, DSET_COPY_DCPL_NAME_2, H5T_NATIVE_INT, sid,
- H5P_DEFAULT, dcpl2_copy, H5P_DEFAULT)) < 0) TEST_ERROR
+ H5P_DEFAULT, dcpl2_copy, H5P_DEFAULT)) < 0) TEST_ERROR
/* Close dataspace */
if(H5Sclose(sid) < 0) TEST_ERROR
@@ -6354,7 +6367,7 @@ error:
return -1;
} /* end test_copy_dcpl() */
-
+
/*-------------------------------------------------------------------------
* Function: test_filter_delete
*
@@ -6481,7 +6494,7 @@ error:
} /* end test_filter_delete() */
-
+
/*-------------------------------------------------------------------------
* Function: auxread_fdata
*
@@ -6565,7 +6578,7 @@ error:
return -1;
}
-
+
/*-------------------------------------------------------------------------
* Function: test_filters_endianess
*
@@ -6635,7 +6648,7 @@ error:
return -1;
} /* end test_filters_endianess() */
-
+
/*-------------------------------------------------------------------------
* Function: test_zero_dims
*
@@ -6656,9 +6669,9 @@ test_zero_dims(hid_t file)
hid_t s2 = -1, d2 = -1, dcpl2 = -1;
hsize_t dzero = 0, dmax = H5S_UNLIMITED, csize = 5;
hsize_t dzero2[2] = {0, 0};
- hsize_t dmax2[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
- hsize_t csize2[2] = {5, 5};
- hid_t fapl; /* File access property list */
+ hsize_t dmax2[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
+ hsize_t csize2[2] = {5, 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;
@@ -6674,8 +6687,8 @@ test_zero_dims(hid_t file)
/* Close FAPL */
if(H5Pclose(fapl) < 0) TEST_ERROR
- /*
- * One-dimensional dataset
+ /*
+ * One-dimensional dataset
*/
if((s = H5Screate_simple(1, &dzero, &dmax)) < 0) FAIL_STACK_ERROR
@@ -6710,10 +6723,10 @@ test_zero_dims(hid_t file)
/* 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");
+ 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");
+ 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
@@ -6731,8 +6744,8 @@ test_zero_dims(hid_t file)
if(H5Pclose(dcpl) < 0) FAIL_STACK_ERROR
if(H5Sclose(s) < 0) FAIL_STACK_ERROR
- /*
- * Two-dimensional dataset
+ /*
+ * Two-dimensional dataset
*/
if((s2 = H5Screate_simple(2, dzero2, dmax2)) < 0) FAIL_STACK_ERROR
@@ -6769,10 +6782,10 @@ test_zero_dims(hid_t file)
/* Verify index type */
if(low == H5F_LIBVER_LATEST) {
- if(idx_type != H5D_CHUNK_IDX_BT2)
- FAIL_PUTS_ERROR("should be using v2 B-tree as index");
+ if(idx_type != H5D_CHUNK_IDX_BT2)
+ FAIL_PUTS_ERROR("should be using v2 B-tree as index");
} else if(idx_type != H5D_CHUNK_IDX_BTREE)
- FAIL_PUTS_ERROR("should be using v1 B-tree as index");
+ FAIL_PUTS_ERROR("should be using v1 B-tree as index");
/* Just a no-op */
if(H5Dwrite(d2, H5T_NATIVE_INT, s2, s2, H5P_DEFAULT, (void*)911) < 0) FAIL_STACK_ERROR
@@ -6799,7 +6812,7 @@ error:
return -1;
} /* end test_zero_dims() */
-
+
/*-------------------------------------------------------------------------
* Function: test_missing_chunk
*
@@ -6818,11 +6831,11 @@ error:
static herr_t
test_missing_chunk(hid_t file)
{
- hid_t d = -1, did2 = -1; /* Dataset IDs */
- hid_t dcpl = -1, dcpl2 = -1; /* Dataset creation property IDs */
- hid_t s = -1, sid2 = -1; /* Dataspace ID */
- hsize_t hs_start[1], hs_stride[1], hs_count[1], hs_block[1]; /* Hyperslab setting */
- hsize_t hs_start2[2], hs_stride2[2], hs_count2[2], hs_block2[2];/* Hyperslab setting */
+ hid_t d = -1, did2 = -1; /* Dataset IDs */
+ hid_t dcpl = -1, dcpl2 = -1; /* Dataset creation property IDs */
+ hid_t s = -1, sid2 = -1; /* Dataspace ID */
+ hsize_t hs_start[1], hs_stride[1], hs_count[1], hs_block[1]; /* Hyperslab setting */
+ hsize_t hs_start2[2], hs_stride2[2], hs_count2[2], hs_block2[2];/* Hyperslab setting */
/* Buffers for reading/writing dataset */
int wdata[MISSING_CHUNK_DIM],
@@ -6832,16 +6845,16 @@ test_missing_chunk(hid_t file)
/* Setting for 1-D dataset */
hsize_t dsize=100, dmax=H5S_UNLIMITED;
- hsize_t csize=5;
+ hsize_t csize=5;
/* Setting for 2-D dataset */
hsize_t dsize2[2] = {100, 100}, dmax2[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
- hsize_t csize2[2] = {5, 5};
- size_t u, i, j; /* Local Index variable */
+ hsize_t csize2[2] = {5, 5};
+ size_t u, i, j; /* Local Index variable */
- hid_t fapl; /* File access property list */
- H5F_libver_t low; /* File format low bound */
- H5D_chunk_index_t idx_type, idx_type2; /* Dataset chunk index types */
+ hid_t fapl; /* File access property list */
+ H5F_libver_t low; /* File format low bound */
+ H5D_chunk_index_t idx_type, idx_type2; /* Dataset chunk index types */
TESTING("Read dataset with unwritten chunk & undefined fill value");
@@ -6862,10 +6875,10 @@ test_missing_chunk(hid_t file)
/* Initialize data for 2-D dataset */
for(i = 0; i < MISSING_CHUNK_DIM; i++) {
- for(j = 0; j < MISSING_CHUNK_DIM; j++) {
- wdata2[i][j] = (int)(j + (i * MISSING_CHUNK_DIM));
- rdata2[i][j] = 911;
- }
+ for(j = 0; j < MISSING_CHUNK_DIM; j++) {
+ wdata2[i][j] = (int)(j + (i * MISSING_CHUNK_DIM));
+ rdata2[i][j] = 911;
+ }
} /* end for */
/* Create dataspace */
@@ -6898,11 +6911,11 @@ test_missing_chunk(hid_t file)
FAIL_PUTS_ERROR("should be using Extensible Array as index");
if(idx_type2 != H5D_CHUNK_IDX_BT2)
FAIL_PUTS_ERROR("should be using v2 B-tree as index");
- } else {
- if(idx_type != H5D_CHUNK_IDX_BTREE)
- FAIL_PUTS_ERROR("should be using v1 B-tree as index");
- if(idx_type2 != H5D_CHUNK_IDX_BTREE)
- FAIL_PUTS_ERROR("should be using v1 B-tree as index");
+ } else {
+ if(idx_type != H5D_CHUNK_IDX_BTREE)
+ FAIL_PUTS_ERROR("should be using v1 B-tree as index");
+ if(idx_type2 != H5D_CHUNK_IDX_BTREE)
+ FAIL_PUTS_ERROR("should be using v1 B-tree as index");
}
/* Select elements in every other chunk for 1-D dataset */
@@ -6911,7 +6924,7 @@ test_missing_chunk(hid_t file)
hs_count[0]=10;
hs_block[0]=5;
if(H5Sselect_hyperslab(s, H5S_SELECT_SET, hs_start, hs_stride, hs_count,
- hs_block) < 0) TEST_ERROR;
+ hs_block) < 0) TEST_ERROR;
/* Select elements in every other chunk for 2-D dataset */
hs_start2[0] = hs_start2[1] = 0;
@@ -6919,7 +6932,7 @@ test_missing_chunk(hid_t file)
hs_count2[0] = hs_count2[1] = 10;
hs_block2[0] = hs_block2[1] = 5;
if(H5Sselect_hyperslab(sid2, H5S_SELECT_SET, hs_start2, hs_stride2, hs_count2,
- hs_block2) < 0) TEST_ERROR;
+ hs_block2) < 0) TEST_ERROR;
/* Write selected data to the datasets */
if(H5Dwrite(d, H5T_NATIVE_INT, s, s, H5P_DEFAULT, wdata) < 0) TEST_ERROR;
@@ -6947,23 +6960,23 @@ test_missing_chunk(hid_t file)
/* Validata values read for the 2-D dataset */
for(i = 0; i < MISSING_CHUNK_DIM; i++) {
- for(j = 0; j < MISSING_CHUNK_DIM; j++) {
-
- if((i % 10) >= 5 || (j % 10) >= 5) {
- if(rdata2[i][j] != 911) {
- printf(" Line %d: Incorrect value, rdata2[%u][%u] = %d\n",
- __LINE__,(unsigned)i, (unsigned)j, rdata2[i][j]);
- TEST_ERROR;
- } /* end if */
- } /* end if */
- else {
- if(rdata2[i][j] != wdata2[i][j]) {
- printf(" Line %d: Incorrect value, wdata2[%u][%u] = %d, rdata2[%u][%u] = %d\n",
- __LINE__,(unsigned)i, (unsigned)j, wdata2[i][j],(unsigned)i, (unsigned)j, rdata2[i][j]);
- TEST_ERROR;
- } /* end if */
- } /* end else */
- } /* end for */
+ for(j = 0; j < MISSING_CHUNK_DIM; j++) {
+
+ if((i % 10) >= 5 || (j % 10) >= 5) {
+ if(rdata2[i][j] != 911) {
+ printf(" Line %d: Incorrect value, rdata2[%u][%u] = %d\n",
+ __LINE__,(unsigned)i, (unsigned)j, rdata2[i][j]);
+ TEST_ERROR;
+ } /* end if */
+ } /* end if */
+ else {
+ if(rdata2[i][j] != wdata2[i][j]) {
+ printf(" Line %d: Incorrect value, wdata2[%u][%u] = %d, rdata2[%u][%u] = %d\n",
+ __LINE__,(unsigned)i, (unsigned)j, wdata2[i][j],(unsigned)i, (unsigned)j, rdata2[i][j]);
+ TEST_ERROR;
+ } /* end if */
+ } /* end else */
+ } /* end for */
} /* end for */
/* Close everything */
@@ -6991,11 +7004,11 @@ error:
return -1;
} /* end test_missing_chunk() */
-
+
/*-------------------------------------------------------------------------
* Function: test_random_chunks_real
*
- * Purpose: Tests that write/read on randomly selected chunks
+ * Purpose: Tests that write/read on randomly selected chunks
*
*
* Return: Success: 0
@@ -7016,7 +7029,7 @@ test_random_chunks_real(const char *testname, hbool_t early_alloc, hid_t fapl)
check2[20][20];
hsize_t coord[NPOINTS][2];
hsize_t dsize[2]={100,100}, dmax[2]={H5S_UNLIMITED, H5S_UNLIMITED}, csize[2]={10,10}, nsize[2]={200,200};
- hsize_t fixed_dmax[2] = {1000, 1000};
+ hsize_t fixed_dmax[2] = {1000, 1000};
hsize_t msize[1]={NPOINTS};
const char dname[]="dataset";
int chunk_row, chunk_col;
@@ -7104,8 +7117,8 @@ test_random_chunks_real(const char *testname, hbool_t early_alloc, hid_t fapl)
if(idx_type != H5D_CHUNK_IDX_FARRAY)
FAIL_PUTS_ERROR("should be using Fixed Array as index");
} /* end else */
- } else if(idx_type != H5D_CHUNK_IDX_BTREE)
- FAIL_PUTS_ERROR("should be using v1 B-tree as index");
+ } else if(idx_type != H5D_CHUNK_IDX_BTREE)
+ FAIL_PUTS_ERROR("should be using v1 B-tree as index");
/* Get dataset dataspace */
if((s = H5Dget_space(d)) < 0) TEST_ERROR;
@@ -7139,9 +7152,9 @@ test_random_chunks_real(const char *testname, hbool_t early_alloc, hid_t fapl)
/* Create dataspace with unlimited maximum dimensions */
if(early_alloc) {
- if((s = H5Screate_simple(2, dsize, fixed_dmax)) < 0) TEST_ERROR;
+ if((s = H5Screate_simple(2, dsize, fixed_dmax)) < 0) TEST_ERROR;
} else
- if((s = H5Screate_simple(2, dsize, dmax)) < 0) TEST_ERROR;
+ if((s = H5Screate_simple(2, dsize, dmax)) < 0) TEST_ERROR;
/* Create dataset creation property list */
if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) TEST_ERROR;
@@ -7161,13 +7174,13 @@ test_random_chunks_real(const char *testname, hbool_t early_alloc, hid_t fapl)
/* Verify index type */
if(low == H5F_LIBVER_LATEST) {
- if(early_alloc) {
- if(idx_type != H5D_CHUNK_IDX_NONE)
- FAIL_PUTS_ERROR("should be using implicit indexing");
- } else if(idx_type != H5D_CHUNK_IDX_BT2)
- FAIL_PUTS_ERROR("should be using v2 B-tree as index");
- } else if(idx_type != H5D_CHUNK_IDX_BTREE)
- FAIL_PUTS_ERROR("should be using v1 B-tree as index");
+ if(early_alloc) {
+ if(idx_type != H5D_CHUNK_IDX_NONE)
+ FAIL_PUTS_ERROR("should be using implicit indexing");
+ } else if(idx_type != H5D_CHUNK_IDX_BT2)
+ FAIL_PUTS_ERROR("should be using v2 B-tree as index");
+ } else if(idx_type != H5D_CHUNK_IDX_BTREE)
+ FAIL_PUTS_ERROR("should be using v1 B-tree as index");
/* Extend both dimensions of the dataset */
if(H5Dset_extent(d, nsize) < 0) TEST_ERROR;
@@ -7272,8 +7285,8 @@ test_random_chunks_real(const char *testname, hbool_t early_alloc, hid_t fapl)
if(idx_type != H5D_CHUNK_IDX_FARRAY)
FAIL_PUTS_ERROR("should be using Fixed Array as index");
} /* end else */
- } else if(idx_type != H5D_CHUNK_IDX_BTREE)
- FAIL_PUTS_ERROR("should be using v1 B-tree as index");
+ } else if(idx_type != H5D_CHUNK_IDX_BTREE)
+ FAIL_PUTS_ERROR("should be using v1 B-tree as index");
/* Extend both dimensions of the dataset */
if(H5Dset_extent(d, nsize) < 0) TEST_ERROR;
@@ -7359,20 +7372,20 @@ error:
return -1;
} /* end test_random_chunks_real() */
-
+
/*-------------------------------------------------------------------------
* Function: test_random_chunks
*
- * Purpose: Tests that write/read on randomly selected chunks
+ * Purpose: Tests that write/read on randomly selected chunks
* First file:
* One dataset has fixed dimensions without max. dims & H5D_ALLOC_TIME_EARLY
* One dataset has fixed dimensions without max. dims & default alloc time
- * Second file:
- * One extendible dataset with unlimited max. dims & H5D_ALLOC_TIME_EARLY
- * One extendible dataset with unlimited max. dims & default alloc time
- * third file:
- * one extendible dataset with fixed max. dims & H5D_ALLOC_TIME_EARLY
- * one extendible dataset with fixed max. dims & default alloc time
+ * Second file:
+ * One extendible dataset with unlimited max. dims & H5D_ALLOC_TIME_EARLY
+ * One extendible dataset with unlimited max. dims & default alloc time
+ * third file:
+ * one extendible dataset with fixed max. dims & H5D_ALLOC_TIME_EARLY
+ * one extendible dataset with fixed max. dims & default alloc time
*
* All the datasets in second & third files are extended before write/read operations
*
@@ -7412,14 +7425,14 @@ set_local_deprec(hid_t H5_ATTR_UNUSED dcpl_id, hid_t H5_ATTR_UNUSED type_id, hid
/* Old style H5Z_class_t, essentially a copy of the "bogus" filter */
const H5Z_class1_t H5Z_DEPREC[1] = {{
- H5Z_FILTER_DEPREC, /* Filter id number */
- "deprec", /* Filter name for debugging */
+ H5Z_FILTER_DEPREC, /* Filter id number */
+ "deprec", /* Filter name for debugging */
can_apply_deprec, /* The "can apply" callback */
set_local_deprec, /* The "set local" callback */
- filter_bogus, /* The actual filter function */
+ filter_bogus, /* The actual filter function */
}};
-
+
/*-------------------------------------------------------------------------
* Function: test_deprec
*
@@ -7436,11 +7449,11 @@ const H5Z_class1_t H5Z_DEPREC[1] = {{
static herr_t
test_deprec(hid_t file)
{
- hid_t dataset, space, small_space, create_parms, dcpl;
- hsize_t dims[2], small_dims[2];
+ hid_t dataset, space, small_space, create_parms, dcpl;
+ hsize_t dims[2], small_dims[2];
hsize_t deprec_size;
- herr_t status;
- hsize_t csize[2];
+ herr_t status;
+ hsize_t csize[2];
TESTING("deprecated API routines");
@@ -7457,7 +7470,7 @@ test_deprec(hid_t file)
assert(space>=0);
/*
- * Create a dataset using the default dataset creation properties. We're
+ * Create a dataset using the default dataset creation properties. We're
* not sure what they are, so we won't check.
*/
if((dataset = H5Dcreate1(file, DSET_DEPREC_NAME, H5T_NATIVE_DOUBLE, space, H5P_DEFAULT)) < 0) goto error;
@@ -7471,13 +7484,13 @@ test_deprec(hid_t file)
* reporting.
*/
H5E_BEGIN_TRY {
- dataset = H5Dcreate1(file, DSET_DEFAULT_NAME, H5T_NATIVE_DOUBLE, space,
- H5P_DEFAULT);
+ dataset = H5Dcreate1(file, DSET_DEFAULT_NAME, H5T_NATIVE_DOUBLE, space,
+ H5P_DEFAULT);
} H5E_END_TRY;
if(dataset >= 0) {
- H5_FAILED();
- puts(" Library allowed overwrite of existing dataset.");
- goto error;
+ H5_FAILED();
+ puts(" Library allowed overwrite of existing dataset.");
+ goto error;
}
/*
@@ -7493,12 +7506,12 @@ test_deprec(hid_t file)
* reporting.
*/
H5E_BEGIN_TRY {
- dataset = H5Dopen1(file, "does_not_exist");
+ dataset = H5Dopen1(file, "does_not_exist");
} H5E_END_TRY;
if(dataset >= 0) {
- H5_FAILED();
- puts(" Opened a non-existent dataset.");
- goto error;
+ H5_FAILED();
+ puts(" Opened a non-existent dataset.");
+ goto error;
}
/*
@@ -7542,12 +7555,12 @@ test_deprec(hid_t file)
assert(status >= 0);
H5E_BEGIN_TRY {
dataset = H5Dcreate1(file, DSET_DEPREC_NAME_CHUNKED, H5T_NATIVE_DOUBLE, space,
- create_parms);
+ create_parms);
} H5E_END_TRY;
if(dataset >= 0) {
- H5_FAILED();
- puts(" Opened a dataset with incorrect chunking parameters.");
- goto error;
+ H5_FAILED();
+ puts(" Opened a dataset with incorrect chunking parameters.");
+ goto error;
}
csize[0] = 5;
@@ -7610,7 +7623,7 @@ test_deprec(hid_t file)
} /* end test_deprec() */
#endif /* H5_NO_DEPRECATED_SYMBOLS */
-
+
/*-------------------------------------------------------------------------
* Function: test_huge_chunks
*
@@ -7652,7 +7665,7 @@ test_huge_chunks(hid_t fapl)
ret = H5Pset_chunk(dcpl, 1, &chunk_dim);
} H5E_END_TRY;
if(ret >= 0)
- FAIL_PUTS_ERROR(" Set chunk size with too large of chunk dimensions.")
+ FAIL_PUTS_ERROR(" Set chunk size with too large of chunk dimensions.")
/* Try to set too large of a chunk for n-D dataset (# of elements) */
chunk_dim2[0] = TOO_HUGE_CHUNK_DIM2_0;
@@ -7662,7 +7675,7 @@ test_huge_chunks(hid_t fapl)
ret = H5Pset_chunk(dcpl, 3, chunk_dim2);
} H5E_END_TRY;
if(ret >= 0)
- FAIL_PUTS_ERROR(" Set chunk size with too large of chunk dimensions.")
+ FAIL_PUTS_ERROR(" Set chunk size with too large of chunk dimensions.")
/* Set 1-D chunk size */
chunk_dim = HUGE_CHUNK_DIM;
@@ -7677,7 +7690,7 @@ test_huge_chunks(hid_t fapl)
dsid = H5Dcreate2(fid, HUGE_DATASET, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT);
} H5E_END_TRY;
if(dsid >= 0)
- FAIL_PUTS_ERROR(" 1-D Dataset with too large of chunk dimensions created.")
+ FAIL_PUTS_ERROR(" 1-D Dataset with too large of chunk dimensions created.")
/* Close 1-D dataspace */
if(H5Sclose(sid) < 0) FAIL_STACK_ERROR
@@ -7700,7 +7713,7 @@ test_huge_chunks(hid_t fapl)
dsid = H5Dcreate2(fid, HUGE_DATASET2, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT);
} H5E_END_TRY;
if(dsid >= 0)
- FAIL_PUTS_ERROR(" n-D Dataset with too large of chunk dimensions created.")
+ FAIL_PUTS_ERROR(" n-D Dataset with too large of chunk dimensions created.")
/* Close n-D dataspace */
if(H5Sclose(sid) < 0) FAIL_STACK_ERROR
@@ -7722,7 +7735,7 @@ error:
return -1;
} /* end test_huge_chunks() */
-
+
/*-------------------------------------------------------------------------
* Function: test_chunk_cache
*
@@ -7930,7 +7943,7 @@ error:
return -1;
} /* end test_chunk_cache() */
-
+
/*-------------------------------------------------------------------------
* Function: test_big_chunks_bypass_cache
*
@@ -7953,24 +7966,24 @@ static herr_t
test_big_chunks_bypass_cache(hid_t fapl)
{
char filename[FILENAME_BUF_SIZE];
- hid_t fid = -1; /* File ID */
- hid_t fapl_local = -1; /* File access property list ID */
- hid_t dcpl = -1, t_dcpl = -1; /* Dataset creation property list ID */
- hid_t sid = -1, t_sid = -1; /* Dataspace ID */
- hid_t mid; /* Memory space ID */
- hid_t dsid = -1, t_dsid = -1; /* Dataset ID */
- hsize_t dim, chunk_dim; /* Dataset and chunk dimensions */
+ hid_t fid = -1; /* File ID */
+ hid_t fapl_local = -1; /* File access property list ID */
+ hid_t dcpl = -1, t_dcpl = -1; /* Dataset creation property list ID */
+ hid_t sid = -1, t_sid = -1; /* Dataspace ID */
+ hid_t mid; /* Memory space ID */
+ hid_t dsid = -1, t_dsid = -1; /* Dataset ID */
+ hsize_t dim, chunk_dim; /* Dataset and chunk dimensions */
hsize_t t_dim[2], t_max[2], t_chunk_dim[2]; /* Dataset and chunk dimensions */
- size_t rdcc_nelmts, rdcc_nbytes; /* Chunk cache parameters */
- int fvalue = BYPASS_FILL_VALUE; /* Fill value */
- hsize_t count, stride, offset, block; /* Setting for hyperslab (1-D) */
+ size_t rdcc_nelmts, rdcc_nbytes; /* Chunk cache parameters */
+ int fvalue = BYPASS_FILL_VALUE; /* Fill value */
+ hsize_t count, stride, offset, block; /* Setting for hyperslab (1-D) */
hsize_t t_count[2], t_stride[2], t_offset[2], t_block[2]; /* Setting for hyperslab (2-D) */
- /* Buffers for reading and writing data (1-D) */
- int *wdata = NULL, *rdata1 = NULL, *rdata2 = NULL;
- /* Buffer for reading and writing data (2-D) */
+ /* Buffers for reading and writing data (1-D) */
+ int *wdata = NULL, *rdata1 = NULL, *rdata2 = NULL;
+ /* Buffer for reading and writing data (2-D) */
static int t_wdata[BYPASS_CHUNK_DIM/2][BYPASS_CHUNK_DIM/2], t_rdata1[BYPASS_DIM][BYPASS_DIM],
t_rdata2[BYPASS_CHUNK_DIM/2][BYPASS_CHUNK_DIM/2];
- int i, j; /* Local index variables */
+ int i, j; /* Local index variables */
H5F_libver_t low; /* File format low bound */
H5D_chunk_index_t idx_type, t_idx_type; /* Dataset chunk index types */
@@ -8033,13 +8046,13 @@ test_big_chunks_bypass_cache(hid_t fapl)
/* Chunk index type expected depends on whether we are using the latest version of the format */
if(low == H5F_LIBVER_LATEST) {
- /* Verify index type */
- if(idx_type != H5D_CHUNK_IDX_FARRAY) FAIL_PUTS_ERROR("should be using Fixed Array as index");
- if(t_idx_type != H5D_CHUNK_IDX_BT2) FAIL_PUTS_ERROR("should be using v2 B-tree as index");
+ /* Verify index type */
+ if(idx_type != H5D_CHUNK_IDX_FARRAY) FAIL_PUTS_ERROR("should be using Fixed Array as index");
+ if(t_idx_type != H5D_CHUNK_IDX_BT2) FAIL_PUTS_ERROR("should be using v2 B-tree as index");
} else {
- /* Verify index type */
- if(idx_type != H5D_CHUNK_IDX_BTREE) FAIL_PUTS_ERROR("should be using v1 B-tree as index");
- if(t_idx_type != H5D_CHUNK_IDX_BTREE) FAIL_PUTS_ERROR("should be using v1 B-tree as index");
+ /* Verify index type */
+ if(idx_type != H5D_CHUNK_IDX_BTREE) FAIL_PUTS_ERROR("should be using v1 B-tree as index");
+ if(t_idx_type != H5D_CHUNK_IDX_BTREE) FAIL_PUTS_ERROR("should be using v1 B-tree as index");
} /* end else */
/* Select first chunk to write the data */
@@ -8067,8 +8080,8 @@ test_big_chunks_bypass_cache(hid_t fapl)
/* Initialize data to write for 2-D dataset */
for(i = 0; i < BYPASS_CHUNK_DIM / 2; i++)
- for(j = 0; j < BYPASS_CHUNK_DIM / 2; j++)
- t_wdata[i][j] = j;
+ for(j = 0; j < BYPASS_CHUNK_DIM / 2; j++)
+ t_wdata[i][j] = j;
/* Set up memory space for the 2-D dataset */
mid = H5Screate_simple(2, t_block, NULL);
@@ -8112,22 +8125,22 @@ test_big_chunks_bypass_cache(hid_t fapl)
/* Verify data for the first 2-D dataset */
for(i = 0; i < BYPASS_CHUNK_DIM / 2; i++)
- for(j = 0; j < BYPASS_CHUNK_DIM / 2; j++)
- if(t_rdata1[i][j] != j) {
- printf(" Read different values than written in the 1st chunk.\n");
- printf(" At line %d and index (%d, %d), t_rdata1 = %d. It should be %d.\n",
- __LINE__, i, j, t_rdata1[i][j], j);
- TEST_ERROR
- } /* end if */
+ for(j = 0; j < BYPASS_CHUNK_DIM / 2; j++)
+ if(t_rdata1[i][j] != j) {
+ printf(" Read different values than written in the 1st chunk.\n");
+ printf(" At line %d and index (%d, %d), t_rdata1 = %d. It should be %d.\n",
+ __LINE__, i, j, t_rdata1[i][j], j);
+ TEST_ERROR
+ } /* end if */
for(i = BYPASS_CHUNK_DIM / 2; i < BYPASS_DIM; i++)
- for(j = BYPASS_CHUNK_DIM / 2; j < BYPASS_DIM; j++)
- if(t_rdata1[i][j] != fvalue) {
- printf(" Read different values than written in the 2nd chunk.\n");
- printf(" At line %d and index (%d, %d), t_rdata1 = %d. It should be %d.\n",
- __LINE__, i, j, t_rdata1[i][j], fvalue);
+ for(j = BYPASS_CHUNK_DIM / 2; j < BYPASS_DIM; j++)
+ if(t_rdata1[i][j] != fvalue) {
+ printf(" Read different values than written in the 2nd chunk.\n");
+ printf(" At line %d and index (%d, %d), t_rdata1 = %d. It should be %d.\n",
+ __LINE__, i, j, t_rdata1[i][j], fvalue);
TEST_ERROR
- } /* end if */
+ } /* end if */
/* Close the first 1-D & 2-D datasets */
if(H5Dclose(dsid) < 0) FAIL_STACK_ERROR
@@ -8163,13 +8176,13 @@ test_big_chunks_bypass_cache(hid_t fapl)
* half chunk should bypass the cache because the chunk is bigger than
* the cache size. */
if(H5Dread(dsid, H5T_NATIVE_INT, H5S_ALL, sid, H5P_DEFAULT, rdata2) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR
if(H5Dread(t_dsid, H5T_NATIVE_INT, mid, t_sid, H5P_DEFAULT, t_rdata2) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR
/* Verify data for the second 1-D dataset */
for(i = 0; i < BYPASS_CHUNK_DIM / 2; i++)
- if(rdata2[i] != i) {
+ if(rdata2[i] != i) {
printf(" Read different values than written in the chunk.\n");
printf(" At line %d and index %d, rdata2 = %d. It should be %d.\n", __LINE__, i, rdata2[i], i);
TEST_ERROR
@@ -8177,13 +8190,13 @@ test_big_chunks_bypass_cache(hid_t fapl)
/* Verify data for the second 2-D dataset */
for(i = 0; i < BYPASS_CHUNK_DIM / 2; i++)
- for(j = 0; j < BYPASS_CHUNK_DIM / 2; j++)
- if(t_rdata2[i][j] != j) {
- printf(" Read different values than written in the chunk.\n");
- printf(" At line %d and index (%d, %d), t_rdata2 = %d. It should be %d.\n",
- __LINE__, i, j, t_rdata2[i][j], j);
- TEST_ERROR
- } /* end if */
+ for(j = 0; j < BYPASS_CHUNK_DIM / 2; j++)
+ if(t_rdata2[i][j] != j) {
+ printf(" Read different values than written in the chunk.\n");
+ printf(" At line %d and index (%d, %d), t_rdata2 = %d. It should be %d.\n",
+ __LINE__, i, j, t_rdata2[i][j], j);
+ TEST_ERROR
+ } /* end if */
/* Close IDs */
if(H5Sclose(sid) < 0) FAIL_STACK_ERROR
@@ -8223,7 +8236,7 @@ error:
return -1;
} /* end test_big_chunks_bypass_cache() */
-
+
/*-------------------------------------------------------------------------
* Function: test_chunk_fast
*
@@ -8288,10 +8301,10 @@ test_chunk_fast(const char *env_h5_driver, hid_t fapl)
/* Loop over using SWMR access to write */
for(swmr = 0; swmr <= 1; swmr++) {
- int compress; /* Whether chunks should be compressed */
+ int compress; /* Whether chunks should be compressed */
/* SWMR is now supported with/without latest format: */
- /* (1) write+latest-format (2) SWMR-write+non-latest-format */
+ /* (1) write+latest-format (2) SWMR-write+non-latest-format */
/* Skip this iteration if SWMR I/O is not supported for the VFD specified
* by the environment variable.
@@ -8303,10 +8316,10 @@ test_chunk_fast(const char *env_h5_driver, hid_t fapl)
/* Loop over compressing chunks */
for(compress = 0; compress <= 1; compress++)
#else
- /* Loop over without compression */
+ /* Loop over without compression */
for(compress = 0; compress <= 0; compress++)
#endif /* H5_HAVE_FILTER_DEFLATE */
- {
+ {
H5D_alloc_time_t alloc_time; /* Storage allocation time */
/* Loop over storage allocation time */
@@ -8570,16 +8583,16 @@ error:
return -1;
} /* end test_chunk_fast() */
-
+
/*-------------------------------------------------------------------------
* Function: test_reopen_chunk_fast
*
* Purpose: To verify a bug in extensible arrays as chunk index.
- * When the dataset is closed in H5D_close(), the pointer
- * to the extensible array struct in the layout message
- * is copied via H5D_flush_real() before H5D_chunk_dest().
- * This causes an abort from "Assertion `ea->hdr' failed."
- * later when the dataset is re-opened and read.
+ * When the dataset is closed in H5D_close(), the pointer
+ * to the extensible array struct in the layout message
+ * is copied via H5D_flush_real() before H5D_chunk_dest().
+ * This causes an abort from "Assertion `ea->hdr' failed."
+ * later when the dataset is re-opened and read.
*
* Return: Success: 0
* Failure: -1
@@ -8599,8 +8612,8 @@ test_reopen_chunk_fast(hid_t fapl)
hid_t scalar_sid = -1;/* Scalar dataspace ID */
hid_t dsid = -1; /* Dataset ID */
hsize_t dim, max_dim, chunk_dim; /* Dataset and chunk dimensions */
- hsize_t hs_offset; /* Hyperslab offset */
- hsize_t hs_size; /* Hyperslab size */
+ hsize_t hs_offset; /* Hyperslab offset */
+ hsize_t hs_size; /* Hyperslab size */
H5D_alloc_time_t alloc_time; /* Storage allocation time */
unsigned write_elem, read_elem; /* Element written/read */
unsigned u; /* Local index variable */
@@ -8611,71 +8624,71 @@ test_reopen_chunk_fast(hid_t fapl)
/* Loop over storage allocation time */
for(alloc_time = H5D_ALLOC_TIME_EARLY; alloc_time <= H5D_ALLOC_TIME_INCR; H5_INC_ENUM(H5D_alloc_time_t, 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 */
- chunk_dim = 10;
- if(H5Pset_chunk(dcpl, 1, &chunk_dim) < 0) FAIL_STACK_ERROR
-
- /* 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
-
- /* Create scalar dataspace */
- if((scalar_sid = H5Screate(H5S_SCALAR)) < 0) FAIL_STACK_ERROR
-
- /* Create 1-D dataspace */
- dim = 100;
- max_dim = H5S_UNLIMITED;
- if((sid = H5Screate_simple(1, &dim, &max_dim)) < 0) FAIL_STACK_ERROR
-
- /* Create chunked dataset */
- if((dsid = H5Dcreate2(fid, "dset", H5T_NATIVE_UINT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
-
- /* Fill existing elements */
- hs_size = 1;
- for(u = 0; u < 100; u++) {
- /* Select a single element in the dataset */
- hs_offset = u;
- if(H5Sselect_hyperslab(sid, H5S_SELECT_SET, &hs_offset, NULL, &hs_size, NULL) < 0)
- FAIL_STACK_ERROR
- /* Write element to dataset */
- write_elem = u;
- if(H5Dwrite(dsid, H5T_NATIVE_UINT, scalar_sid, sid, H5P_DEFAULT, &write_elem) < 0)
- FAIL_STACK_ERROR
- } /* end for */
-
- /* Close everything */
- if(H5Dclose(dsid) < 0) FAIL_STACK_ERROR
-
- /* Reopen the dataset */
- if((dsid = H5Dopen2(fid, "dset", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
- hs_size = 1;
-
- /* Read from dataset */
- for(u = 0; u < 100; u++) {
- /* Select a single element in the dataset */
- hs_offset = u;
- if(H5Sselect_hyperslab(sid, H5S_SELECT_SET, &hs_offset, NULL, &hs_size, NULL) < 0)
- FAIL_STACK_ERROR
-
- /* Read element from dataset */
- if(H5Dread(dsid, H5T_NATIVE_UINT, scalar_sid, sid, H5P_DEFAULT, &read_elem) < 0)
- FAIL_STACK_ERROR
- } /* end for */
-
- if(H5Dclose(dsid) < 0) FAIL_STACK_ERROR
- if(H5Sclose(sid) < 0) FAIL_STACK_ERROR
- if(H5Sclose(scalar_sid) < 0) FAIL_STACK_ERROR
- if(H5Pclose(dcpl) < 0) FAIL_STACK_ERROR
- if(H5Fclose(fid) < 0) FAIL_STACK_ERROR
+ /* 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 */
+ chunk_dim = 10;
+ if(H5Pset_chunk(dcpl, 1, &chunk_dim) < 0) FAIL_STACK_ERROR
+
+ /* 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
+
+ /* Create scalar dataspace */
+ if((scalar_sid = H5Screate(H5S_SCALAR)) < 0) FAIL_STACK_ERROR
+
+ /* Create 1-D dataspace */
+ dim = 100;
+ max_dim = H5S_UNLIMITED;
+ if((sid = H5Screate_simple(1, &dim, &max_dim)) < 0) FAIL_STACK_ERROR
+
+ /* Create chunked dataset */
+ if((dsid = H5Dcreate2(fid, "dset", H5T_NATIVE_UINT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
+ FAIL_STACK_ERROR
+
+ /* Fill existing elements */
+ hs_size = 1;
+ for(u = 0; u < 100; u++) {
+ /* Select a single element in the dataset */
+ hs_offset = u;
+ if(H5Sselect_hyperslab(sid, H5S_SELECT_SET, &hs_offset, NULL, &hs_size, NULL) < 0)
+ FAIL_STACK_ERROR
+ /* Write element to dataset */
+ write_elem = u;
+ if(H5Dwrite(dsid, H5T_NATIVE_UINT, scalar_sid, sid, H5P_DEFAULT, &write_elem) < 0)
+ FAIL_STACK_ERROR
+ } /* end for */
+
+ /* Close everything */
+ if(H5Dclose(dsid) < 0) FAIL_STACK_ERROR
+
+ /* Reopen the dataset */
+ if((dsid = H5Dopen2(fid, "dset", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ hs_size = 1;
+
+ /* Read from dataset */
+ for(u = 0; u < 100; u++) {
+ /* Select a single element in the dataset */
+ hs_offset = u;
+ if(H5Sselect_hyperslab(sid, H5S_SELECT_SET, &hs_offset, NULL, &hs_size, NULL) < 0)
+ FAIL_STACK_ERROR
+
+ /* Read element from dataset */
+ if(H5Dread(dsid, H5T_NATIVE_UINT, scalar_sid, sid, H5P_DEFAULT, &read_elem) < 0)
+ FAIL_STACK_ERROR
+ } /* end for */
+
+ if(H5Dclose(dsid) < 0) FAIL_STACK_ERROR
+ if(H5Sclose(sid) < 0) FAIL_STACK_ERROR
+ if(H5Sclose(scalar_sid) < 0) FAIL_STACK_ERROR
+ if(H5Pclose(dcpl) < 0) FAIL_STACK_ERROR
+ if(H5Fclose(fid) < 0) FAIL_STACK_ERROR
} /* end for */
@@ -8693,7 +8706,7 @@ error:
return -1;
} /* end test_reopen_chunk_fast() */
-
+
/*-------------------------------------------------------------------------
* Function: test_chunk_fast_bug1
*
@@ -8804,33 +8817,33 @@ error:
/* This message derives from H5Z */
const H5Z_class2_t H5Z_EXPAND[1] = {{
H5Z_CLASS_T_VERS, /* H5Z_class_t version */
- H5Z_FILTER_EXPAND, /* Filter id number */
+ H5Z_FILTER_EXPAND, /* Filter id number */
1, 1, /* Encoding and decoding enabled */
- "expand", /* Filter name for debugging */
+ "expand", /* Filter name for debugging */
NULL, /* The "can apply" callback */
NULL, /* The "set local" callback */
- filter_expand, /* The actual filter function */
+ filter_expand, /* The actual filter function */
}};
/* Global "expansion factor" for filter_expand() routine */
static size_t filter_expand_factor_g = 0;
-
+
/*-------------------------------------------------------------------------
* Function: filter_expand
*
* Purpose: For testing library's behavior when a filter expands a chunk
* too much.
*
- * Note: This filter doesn't actually re-allocate the buffer to be
- * larger, it just changes the buffer size to a value that's too
- * large. The library should throw an error before using the
- * incorrect buffer information.
+ * Note: This filter doesn't actually re-allocate the buffer to be
+ * larger, it just changes the buffer size to a value that's too
+ * large. The library should throw an error before using the
+ * incorrect buffer information.
*
- * Return: Success: Data chunk size
- * Failure: 0
+ * Return: Success: Data chunk size
+ * Failure: 0
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Mar 31, 2009
*
*-------------------------------------------------------------------------
@@ -8864,7 +8877,7 @@ filter_expand(unsigned int flags, size_t H5_ATTR_UNUSED cd_nelmts,
return ret_value;
} /* end filter_expand() */
-
+
/*-------------------------------------------------------------------------
* Function: test_chunk_expand
*
@@ -8883,22 +8896,22 @@ static herr_t
test_chunk_expand(hid_t fapl)
{
char filename[FILENAME_BUF_SIZE];
- hid_t fid = -1; /* File ID */
- hid_t dcpl = -1, dcpl2 = -1; /* Dataset creation property list ID */
- hid_t sid = -1, sid2 = -1; /* Dataspace ID */
- hid_t scalar_sid = -1; /* Scalar dataspace ID */
- hid_t dsid = -1, dsid2 = -1; /* Dataset ID */
- hsize_t dim, max_dim, chunk_dim; /* Dataset and chunk dimensions */
- hsize_t dim2[2], max_dim2[2], chunk_dim2[2]; /* Dataset and chunk dimensions */
- H5D_chunk_index_t idx_type, idx_type2; /* Dataset chunk index type */
- H5F_libver_t low, high; /* File format bounds */
- hsize_t hs_offset, hs_offset2[2]; /* Hyperslab offset */
- hsize_t hs_size, hs_size2[2]; /* Hyperslab size */
- H5D_alloc_time_t alloc_time; /* Storage allocation time */
- unsigned write_elem, read_elem; /* Element written/read */
- unsigned write_elem2, read_elem2; /* Element written/read */
- unsigned u; /* Local index variable */
- herr_t status; /* Generic return value */
+ hid_t fid = -1; /* File ID */
+ hid_t dcpl = -1, dcpl2 = -1; /* Dataset creation property list ID */
+ hid_t sid = -1, sid2 = -1; /* Dataspace ID */
+ hid_t scalar_sid = -1; /* Scalar dataspace ID */
+ hid_t dsid = -1, dsid2 = -1; /* Dataset ID */
+ hsize_t dim, max_dim, chunk_dim; /* Dataset and chunk dimensions */
+ hsize_t dim2[2], max_dim2[2], chunk_dim2[2]; /* Dataset and chunk dimensions */
+ H5D_chunk_index_t idx_type, idx_type2; /* Dataset chunk index type */
+ H5F_libver_t low, high; /* File format bounds */
+ hsize_t hs_offset, hs_offset2[2]; /* Hyperslab offset */
+ hsize_t hs_size, hs_size2[2]; /* Hyperslab size */
+ H5D_alloc_time_t alloc_time; /* Storage allocation time */
+ unsigned write_elem, read_elem; /* Element written/read */
+ unsigned write_elem2, read_elem2; /* Element written/read */
+ unsigned u; /* Local index variable */
+ herr_t status; /* Generic return value */
TESTING("filter expanding chunks too much");
@@ -8908,8 +8921,8 @@ test_chunk_expand(hid_t fapl)
if(H5Pget_libver_bounds(fapl, &low, &high) < 0) FAIL_STACK_ERROR
if(sizeof(size_t) <= 4 && low != H5F_LIBVER_LATEST) {
- SKIPPED();
- puts(" Current machine can't test for error w/old file format");
+ SKIPPED();
+ puts(" Current machine can't test for error w/old file format");
} /* end if */
else {
/* Register "expansion" filter */
@@ -9260,29 +9273,29 @@ error:
return -1;
} /* end test_chunk_expand() */
-
+
/*-------------------------------------------------------------------------
* Function: test_fixed_array
*
- * Purpose: Tests support for Fixed Array and Implicit Indexing
+ * 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)
+ * 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 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
+ * 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
@@ -9294,7 +9307,7 @@ error:
static herr_t
test_fixed_array(hid_t fapl)
{
- char filename[FILENAME_BUF_SIZE]; /* File name */
+ char filename[FILENAME_BUF_SIZE]; /* File name */
hid_t fid = -1; /* File ID */
hid_t dcpl = -1; /* Dataset creation property list ID */
@@ -9303,23 +9316,23 @@ test_fixed_array(hid_t fapl)
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 */
+ 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 */
+ 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 */
+ 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[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 = NULL; /* write buffer for big dataset */
- int rbuf[POINTS]; /* read buffer */
- int *rbuf_big = NULL; /* read buffer for big dataset */
+ int *wbuf_big = NULL; /* write buffer for big dataset */
+ int rbuf[POINTS]; /* read buffer */
+ int *rbuf_big = NULL; /* read buffer for big dataset */
hsize_t chunk_dim2[2] = {4, 3}; /* Chunk dimensions */
int chunks[12][6]; /* # of chunks for dataset dimensions */
@@ -9327,22 +9340,22 @@ test_fixed_array(hid_t fapl)
int chunk_row; /* chunk row index */
int chunk_col; /* chunk column index */
- hsize_t coord[POINTS][2]; /* datdaset coordinates */
+ 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_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 */
+ 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 */
+ 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 */
+ size_t i, j; /* local index variables */
+ herr_t ret; /* Generic return value */
TESTING("datasets w/fixed array as chunk index");
@@ -9381,8 +9394,8 @@ test_fixed_array(hid_t fapl)
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.")
+ 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 */
@@ -9396,243 +9409,243 @@ test_fixed_array(hid_t fapl)
/* 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
+ /* 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
+ && !compress
#endif /* H5_HAVE_FILTER_DEFLATE */
- ) {
- if(idx_type != H5D_CHUNK_IDX_NONE)
- FAIL_PUTS_ERROR("should be using Non Index as index");
- } 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
+ ) {
+ if(idx_type != H5D_CHUNK_IDX_NONE)
+ FAIL_PUTS_ERROR("should be using Non Index as index");
+ } 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
+ && !compress
#endif /* H5_HAVE_FILTER_DEFLATE */
- ) {
- if(idx_type != H5D_CHUNK_IDX_NONE)
- FAIL_PUTS_ERROR("should be using Non Index as index");
- } 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
+ ) {
+ if(idx_type != H5D_CHUNK_IDX_NONE)
+ FAIL_PUTS_ERROR("should be using Non Index as index");
+ } 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
+ && !compress
#endif /* H5_HAVE_FILTER_DEFLATE */
- ) {
- if(idx_type != H5D_CHUNK_IDX_NONE)
- FAIL_PUTS_ERROR("should be using Non Index as index");
- } 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(idx_type != H5D_CHUNK_IDX_NONE)
+ FAIL_PUTS_ERROR("should be using Non Index as index");
+ } 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;
+ /* 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;
+ /* 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;
+ /* 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;
+ /* 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;
+ /* 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 */
+ /* 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
+ /* 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
+ /* 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
@@ -9644,13 +9657,13 @@ test_fixed_array(hid_t fapl)
/* 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
+ /* 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
+ /* Verify the file is correct size */
+ if(file_size != empty_size)
+ TEST_ERROR
} /* end for */
#ifdef H5_HAVE_FILTER_DEFLATE
@@ -9679,24 +9692,24 @@ error:
return -1;
} /* end test_fixed_array() */
-
+
/*-------------------------------------------------------------------------
* Function: test_single_chunk
*
* Purpose: Tests support for Single Chunk indexing type
*
- * Create the following 2 datasets:
- * 1) chunked dataset with NULL max dims and cur_dims = chunk_dims
- * 2) chunked dataset with cur_dims = max_dims = chunk_dims
+ * Create the following 2 datasets:
+ * 1) chunked dataset with NULL max dims and cur_dims = chunk_dims
+ * 2) chunked dataset with cur_dims = max_dims = chunk_dims
*
* 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 datasets with all settings
+ * For the old format,
+ * verify that v1 btree indexing type is used for
+ * all datasets with all settings
* For the new format:
- * Verify that Single Chunk indexing type is used for
- * all datasets with all settings
+ * Verify that Single Chunk indexing type is used for
+ * all datasets with all settings
*
* Return: Success: 0
* Failure: -1
@@ -9708,30 +9721,30 @@ error:
static herr_t
test_single_chunk(hid_t fapl)
{
- char filename[FILENAME_BUF_SIZE]; /* File name */
+ char filename[FILENAME_BUF_SIZE]; /* File name */
hid_t fid = -1; /* File ID */
hid_t dcpl = -1; /* Dataset creation property list ID */
hid_t t_dcpl = -1; /* Dataset creation property list ID */
- hid_t sid = -1, sid_max = -1; /* Dataspace ID for dataset with fixed dimensions */
- hid_t did = -1, did_max = -1; /* Dataset ID for dataset with fixed dimensions */
- hsize_t dim2[2] = {DSET_DIM1, DSET_DIM2}; /* Dataset dimensions */
+ hid_t sid = -1, sid_max = -1; /* Dataspace ID for dataset with fixed dimensions */
+ hid_t did = -1, did_max = -1; /* Dataset ID for dataset with fixed dimensions */
+ hsize_t dim2[2] = {DSET_DIM1, DSET_DIM2}; /* Dataset dimensions */
hsize_t t_dim2[2] = {DSET_TMP_DIM1, DSET_TMP_DIM2}; /* Dataset dimensions */
int *wbuf = NULL; /* write buffer */
int *t_wbuf = NULL; /* write buffer */
- int *rbuf = NULL; /* read buffer */
+ int *rbuf = NULL; /* read buffer */
int *t_rbuf = NULL; /* read buffer */
- H5D_chunk_index_t idx_type; /* Dataset chunk index type */
- H5F_libver_t low, high; /* File format bounds */
+ 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 */
+ unsigned compress; /* Whether chunks should be compressed */
#endif /* H5_HAVE_FILTER_DEFLATE */
- size_t n, i; /* local index variables */
- herr_t ret; /* Generic return value */
+ size_t n, i; /* local index variables */
+ herr_t ret; /* Generic return value */
h5_stat_size_t empty_size; /* Size of an empty file */
h5_stat_size_t file_size; /* Size of each file created */
@@ -9763,10 +9776,10 @@ test_single_chunk(hid_t fapl)
TEST_ERROR
for(i = n = 0; i < (DSET_DIM1 * DSET_DIM2); i++)
- wbuf[i] = (int)n++;
+ wbuf[i] = (int)n++;
for(i = n = 0; i < (DSET_TMP_DIM1* DSET_TMP_DIM2); i++)
- t_wbuf[i] = (int)n++;
+ t_wbuf[i] = (int)n++;
#ifdef H5_HAVE_FILTER_DEFLATE
/* Loop over compressing chunks */
@@ -9783,18 +9796,18 @@ test_single_chunk(hid_t fapl)
if((t_dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) FAIL_STACK_ERROR
/* Set chunking */
- if((ret = H5Pset_chunk(dcpl, 2, dim2)) < 0)
- FAIL_PUTS_ERROR(" Problem with setting chunk.")
+ if((ret = H5Pset_chunk(dcpl, 2, dim2)) < 0)
+ FAIL_PUTS_ERROR(" Problem with setting chunk.")
- if((ret = H5Pset_chunk(t_dcpl, 2, t_dim2)) < 0)
- FAIL_PUTS_ERROR(" Problem with setting chunk.")
+ if((ret = H5Pset_chunk(t_dcpl, 2, t_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
if(H5Pset_deflate(t_dcpl, 9) < 0) FAIL_STACK_ERROR
- }
+ }
#endif /* H5_HAVE_FILTER_DEFLATE */
/* Set fill time */
@@ -9805,94 +9818,94 @@ test_single_chunk(hid_t fapl)
if(H5Pset_alloc_time(dcpl, alloc_time) < 0) FAIL_STACK_ERROR
if(H5Pset_alloc_time(t_dcpl, alloc_time) < 0) FAIL_STACK_ERROR
- /* Create first dataset with cur and max dimensions */
- if((sid_max = H5Screate_simple(2, dim2, dim2)) < 0) FAIL_STACK_ERROR
- did_max = H5Dcreate2(fid, DSET_SINGLE_MAX, H5T_NATIVE_INT, sid_max, H5P_DEFAULT, dcpl, H5P_DEFAULT);
- if(did_max < 0)
- FAIL_PUTS_ERROR(" Creating Chunked Dataset with maximum dimensions.")
-
- /* Get the chunk index type */
- if(H5D__layout_idx_type_test(did_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(idx_type != H5D_CHUNK_IDX_SINGLE)
- FAIL_PUTS_ERROR("should be using Single Chunk indexing");
- } /* end if */
- else {
- if(idx_type != H5D_CHUNK_IDX_BTREE)
- FAIL_PUTS_ERROR("should be using v1 B-tree as index");
- } /* end else */
-
- /* Write into dataset */
- if(H5Dwrite(did_max, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, wbuf) < 0) TEST_ERROR;
-
- /* Closing */
- if(H5Dclose(did_max) < 0) FAIL_STACK_ERROR
- if(H5Sclose(sid_max) < 0) FAIL_STACK_ERROR
-
- /* Create second dataset with curr dim but NULL max dim */
- if((sid = H5Screate_simple(2, t_dim2, NULL)) < 0) FAIL_STACK_ERROR
- did = H5Dcreate2(fid, DSET_SINGLE_NOMAX, H5T_NATIVE_INT, sid, H5P_DEFAULT, t_dcpl, H5P_DEFAULT);
- if(did < 0)
- FAIL_PUTS_ERROR(" Creating Chunked Dataset.")
-
- /* Get the chunk index type */
- if(H5D__layout_idx_type_test(did, &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(idx_type != H5D_CHUNK_IDX_SINGLE)
- FAIL_PUTS_ERROR("should be using Single Chunk indexing");
- } else {
- if(idx_type != H5D_CHUNK_IDX_BTREE)
- FAIL_PUTS_ERROR("should be using v1 B-tree as index");
- } /* end else */
-
- /* Write into dataset */
- if(H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, sid, H5P_DEFAULT, t_wbuf) < 0) TEST_ERROR;
-
- /* Closing */
- if(H5Dclose(did) < 0) FAIL_STACK_ERROR
- if(H5Sclose(sid) < 0) FAIL_STACK_ERROR
-
- /* Open the first dataset */
- if((did_max = H5Dopen2(fid, DSET_SINGLE_MAX, H5P_DEFAULT)) < 0) TEST_ERROR;
-
- /* Read from dataset */
- if(H5Dread(did_max, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf) < 0) TEST_ERROR;
-
- /* Verify that written and read data are the same */
- for(i = 0; i < (DSET_DIM1 * DSET_DIM2); 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(did_max) < 0) FAIL_STACK_ERROR
-
- /* Open the second dataset */
- if((did = H5Dopen2(fid, DSET_SINGLE_NOMAX, H5P_DEFAULT)) < 0) TEST_ERROR;
-
- HDmemset(rbuf, 0, sizeof(int) * (DSET_DIM1 * DSET_DIM2));
-
- /* Read from dataset */
- if(H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, t_rbuf) < 0) TEST_ERROR;
-
- /* Verify that written and read data are the same */
- for(i = 0; i < (DSET_TMP_DIM1* DSET_TMP_DIM2); i++)
- if(t_rbuf[i] != t_wbuf[i]) {
- printf(" Line %d: Incorrect value, t_wbuf[%u]=%d, t_rbuf[%u]=%d\n",
- __LINE__,(unsigned)i,t_wbuf[i],(unsigned)i,t_rbuf[i]);
- TEST_ERROR;
- } /* end if */
-
- /* Closing */
- if(H5Dclose(did) < 0) FAIL_STACK_ERROR
-
- /* Delete datasets */
+ /* Create first dataset with cur and max dimensions */
+ if((sid_max = H5Screate_simple(2, dim2, dim2)) < 0) FAIL_STACK_ERROR
+ did_max = H5Dcreate2(fid, DSET_SINGLE_MAX, H5T_NATIVE_INT, sid_max, H5P_DEFAULT, dcpl, H5P_DEFAULT);
+ if(did_max < 0)
+ FAIL_PUTS_ERROR(" Creating Chunked Dataset with maximum dimensions.")
+
+ /* Get the chunk index type */
+ if(H5D__layout_idx_type_test(did_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(idx_type != H5D_CHUNK_IDX_SINGLE)
+ FAIL_PUTS_ERROR("should be using Single Chunk indexing");
+ } /* end if */
+ else {
+ if(idx_type != H5D_CHUNK_IDX_BTREE)
+ FAIL_PUTS_ERROR("should be using v1 B-tree as index");
+ } /* end else */
+
+ /* Write into dataset */
+ if(H5Dwrite(did_max, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, wbuf) < 0) TEST_ERROR;
+
+ /* Closing */
+ if(H5Dclose(did_max) < 0) FAIL_STACK_ERROR
+ if(H5Sclose(sid_max) < 0) FAIL_STACK_ERROR
+
+ /* Create second dataset with curr dim but NULL max dim */
+ if((sid = H5Screate_simple(2, t_dim2, NULL)) < 0) FAIL_STACK_ERROR
+ did = H5Dcreate2(fid, DSET_SINGLE_NOMAX, H5T_NATIVE_INT, sid, H5P_DEFAULT, t_dcpl, H5P_DEFAULT);
+ if(did < 0)
+ FAIL_PUTS_ERROR(" Creating Chunked Dataset.")
+
+ /* Get the chunk index type */
+ if(H5D__layout_idx_type_test(did, &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(idx_type != H5D_CHUNK_IDX_SINGLE)
+ FAIL_PUTS_ERROR("should be using Single Chunk indexing");
+ } else {
+ if(idx_type != H5D_CHUNK_IDX_BTREE)
+ FAIL_PUTS_ERROR("should be using v1 B-tree as index");
+ } /* end else */
+
+ /* Write into dataset */
+ if(H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, sid, H5P_DEFAULT, t_wbuf) < 0) TEST_ERROR;
+
+ /* Closing */
+ if(H5Dclose(did) < 0) FAIL_STACK_ERROR
+ if(H5Sclose(sid) < 0) FAIL_STACK_ERROR
+
+ /* Open the first dataset */
+ if((did_max = H5Dopen2(fid, DSET_SINGLE_MAX, H5P_DEFAULT)) < 0) TEST_ERROR;
+
+ /* Read from dataset */
+ if(H5Dread(did_max, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf) < 0) TEST_ERROR;
+
+ /* Verify that written and read data are the same */
+ for(i = 0; i < (DSET_DIM1 * DSET_DIM2); 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(did_max) < 0) FAIL_STACK_ERROR
+
+ /* Open the second dataset */
+ if((did = H5Dopen2(fid, DSET_SINGLE_NOMAX, H5P_DEFAULT)) < 0) TEST_ERROR;
+
+ HDmemset(rbuf, 0, sizeof(int) * (DSET_DIM1 * DSET_DIM2));
+
+ /* Read from dataset */
+ if(H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, t_rbuf) < 0) TEST_ERROR;
+
+ /* Verify that written and read data are the same */
+ for(i = 0; i < (DSET_TMP_DIM1* DSET_TMP_DIM2); i++)
+ if(t_rbuf[i] != t_wbuf[i]) {
+ printf(" Line %d: Incorrect value, t_wbuf[%u]=%d, t_rbuf[%u]=%d\n",
+ __LINE__,(unsigned)i,t_wbuf[i],(unsigned)i,t_rbuf[i]);
+ TEST_ERROR;
+ } /* end if */
+
+ /* Closing */
+ if(H5Dclose(did) < 0) FAIL_STACK_ERROR
+
+ /* Delete datasets */
if(H5Ldelete(fid, DSET_SINGLE_NOMAX, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
if(H5Ldelete(fid, DSET_SINGLE_MAX, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
@@ -9912,6 +9925,7 @@ test_single_chunk(hid_t fapl)
} /* end for */
#endif /* H5_HAVE_FILTER_DEFLATE */
+
/* Release buffers */
HDfree(wbuf);
HDfree(rbuf);
@@ -9942,22 +9956,22 @@ error:
return -1;
} /* end test_single_chunk() */
-
+
/*-------------------------------------------------------------------------
*
- * test_idx_compatible():
- * Verify that the library can read datasets created with
- * 1.6/1.8 library that use the B-tree indexing method.
+ * test_idx_compatible():
+ * Verify that the library can read datasets created with
+ * 1.6/1.8 library that use the B-tree indexing method.
*
* Programmer: Vailin Choi; 26th August, 2009
*
*-------------------------------------------------------------------------
*/
-static herr_t
+static herr_t
test_idx_compatible(void)
{
- hid_t fid = -1; /* File id */
- hid_t did = -1; /* Dataset id */
+ hid_t fid = -1; /* File id */
+ hid_t did = -1; /* Dataset id */
const char *filename = NULL; /* old test file name */
unsigned j; /* Local index variable */
H5D_chunk_index_t idx_type; /* Chunked dataset index type */
@@ -9967,41 +9981,41 @@ test_idx_compatible(void)
for(j = 0; j < NELMTS(OLD_FILENAME); j++) {
- /* Generate correct name for test file by prepending the source path */
- filename = H5_get_srcdir_filename(OLD_FILENAME[j]);
+ /* Generate correct name for test file by prepending the source path */
+ filename = H5_get_srcdir_filename(OLD_FILENAME[j]);
- /* Open the file */
- if((fid = H5Fopen(filename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ /* Open the file */
+ if((fid = H5Fopen(filename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
+ TEST_ERROR
- /* Should be able to read the dataset w/o filter created under 1.8/1.6 */
- if((did = H5Dopen2(fid, DSET, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ /* Should be able to read the dataset w/o filter created under 1.8/1.6 */
+ if((did = H5Dopen2(fid, DSET, H5P_DEFAULT)) < 0)
+ TEST_ERROR
- /* Get the chunk index type */
- if(H5D__layout_idx_type_test(did, &idx_type) < 0) FAIL_STACK_ERROR
+ /* Get the chunk index type */
+ if(H5D__layout_idx_type_test(did, &idx_type) < 0) FAIL_STACK_ERROR
- /* Verify index type */
- if(idx_type != H5D_CHUNK_IDX_BTREE)
- FAIL_PUTS_ERROR("should be using v1 B-tree as index")
+ /* Verify index type */
+ if(idx_type != H5D_CHUNK_IDX_BTREE)
+ FAIL_PUTS_ERROR("should be using v1 B-tree as index")
- if(H5Dclose(did) < 0) FAIL_STACK_ERROR
+ if(H5Dclose(did) < 0) FAIL_STACK_ERROR
- /* Should be able to read the dataset w/ filter created under 1.8/1.6 */
- if((did = H5Dopen2(fid, DSET_FILTER, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ /* Should be able to read the dataset w/ filter created under 1.8/1.6 */
+ if((did = H5Dopen2(fid, DSET_FILTER, H5P_DEFAULT)) < 0)
+ TEST_ERROR
- /* Get the chunk index type */
- if(H5D__layout_idx_type_test(did, &idx_type) < 0) FAIL_STACK_ERROR
+ /* Get the chunk index type */
+ if(H5D__layout_idx_type_test(did, &idx_type) < 0) FAIL_STACK_ERROR
- /* Verify index type */
- if(idx_type != H5D_CHUNK_IDX_BTREE)
- FAIL_PUTS_ERROR("should be using v1 B-tree as index")
+ /* Verify index type */
+ if(idx_type != H5D_CHUNK_IDX_BTREE)
+ FAIL_PUTS_ERROR("should be using v1 B-tree as index")
- if(H5Dclose(did) < 0) FAIL_STACK_ERROR
+ if(H5Dclose(did) < 0) FAIL_STACK_ERROR
- /* Close the file */
- if(H5Fclose(fid) < 0) FAIL_STACK_ERROR
+ /* Close the file */
+ if(H5Fclose(fid) < 0) FAIL_STACK_ERROR
}
PASSED();
@@ -10010,7 +10024,7 @@ test_idx_compatible(void)
error:
H5E_BEGIN_TRY {
H5Dclose(did);
- H5Fclose(fid);
+ H5Fclose(fid);
} H5E_END_TRY;
return -1;
} /* test_idx_compatible */
@@ -10155,7 +10169,7 @@ error:
return -1;
} /* test_unfiltered_edge_chunks */
-
+
/*-------------------------------------------------------------------------
* Function: test_large_chunk_shrink
*
@@ -10270,11 +10284,11 @@ error:
return -1;
} /* end test_large_chunk_shrink() */
-
+
/*-------------------------------------------------------------------------
* Function: test_zero_dim_dset
*
- * Purpose: Tests support for reading a 1D chunled dataset with
+ * Purpose: Tests support for reading a 1D chunked dataset with
* dimension size = 0.
*
* Return: Success: 0
@@ -10295,40 +10309,59 @@ test_zero_dim_dset(hid_t fapl)
hid_t dsid = -1; /* Dataset ID */
hsize_t dim, chunk_dim; /* Dataset and chunk dimensions */
int data[1];
+ H5F_libver_t low, high; /* File format bounds */
+ herr_t ret; /* Generic return value */
- TESTING("shrinking large chunk");
+ TESTING("chunked dataset with zero dimension");
- h5_fixname(FILENAME[16], fapl, filename, sizeof filename);
+ /* Loop through all the combinations of low/high library format bounds,
+ skipping invalid combination, and verify support for reading a 1D
+ chunked dataset with dimension size = 0 */
+ for(low = H5F_LIBVER_EARLIEST; low < H5F_LIBVER_NBOUNDS; low++) {
+ for(high = H5F_LIBVER_EARLIEST; high < H5F_LIBVER_NBOUNDS; high++) {
- /* Create file */
- if((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) FAIL_STACK_ERROR
+ /* Set version bounds before opening the file */
+ H5E_BEGIN_TRY {
+ ret = H5Pset_libver_bounds(fapl, low, high);
+ } H5E_END_TRY;
- /* Create dataset creation property list */
- if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) FAIL_STACK_ERROR
+ if (ret < 0) /* Invalid low/high combinations */
+ continue;
- /* Set 1 chunk size */
- chunk_dim = 1;
- if(H5Pset_chunk(dcpl, 1, &chunk_dim) < 0) FAIL_STACK_ERROR
+ h5_fixname(FILENAME[16], fapl, filename, sizeof filename);
- /* Create 1D dataspace with 0 dim size */
- dim = 0;
- if((sid = H5Screate_simple(1, &dim, NULL)) < 0) FAIL_STACK_ERROR
+ /* Create file */
+ if((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) FAIL_STACK_ERROR
- /* Create chunked dataset */
- if((dsid = H5Dcreate2(fid, "dset", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
+ /* Create dataset creation property list */
+ if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) FAIL_STACK_ERROR
- /* write 0 elements from dataset */
- if(H5Dwrite(dsid, H5T_NATIVE_INT, sid, sid, H5P_DEFAULT, data) < 0) FAIL_STACK_ERROR
+ /* Set 1 chunk size */
+ chunk_dim = 1;
+ if(H5Pset_chunk(dcpl, 1, &chunk_dim) < 0) FAIL_STACK_ERROR
- /* Read 0 elements from dataset */
- if(H5Dread(dsid, H5T_NATIVE_INT, sid, sid, H5P_DEFAULT, data) < 0) FAIL_STACK_ERROR
+ /* Create 1D dataspace with 0 dim size */
+ dim = 0;
+ if((sid = H5Screate_simple(1, &dim, NULL)) < 0) FAIL_STACK_ERROR
- /* Close everything */
- if(H5Sclose(sid) < 0) FAIL_STACK_ERROR
- if(H5Dclose(dsid) < 0) FAIL_STACK_ERROR
- if(H5Pclose(dcpl) < 0) FAIL_STACK_ERROR
- if(H5Fclose(fid) < 0) FAIL_STACK_ERROR
+ /* Create chunked dataset */
+ if((dsid = H5Dcreate2(fid, "dset", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
+ FAIL_STACK_ERROR
+
+ /* write 0 elements from dataset */
+ if(H5Dwrite(dsid, H5T_NATIVE_INT, sid, sid, H5P_DEFAULT, data) < 0) FAIL_STACK_ERROR
+
+ /* Read 0 elements from dataset */
+ if(H5Dread(dsid, H5T_NATIVE_INT, sid, sid, H5P_DEFAULT, data) < 0) FAIL_STACK_ERROR
+
+ /* Close everything */
+ if(H5Sclose(sid) < 0) FAIL_STACK_ERROR
+ if(H5Dclose(dsid) < 0) FAIL_STACK_ERROR
+ if(H5Pclose(dcpl) < 0) FAIL_STACK_ERROR
+ if(H5Fclose(fid) < 0) FAIL_STACK_ERROR
+
+ } /* end for high */
+ } /* end for low */
PASSED();
@@ -10344,14 +10377,14 @@ error:
return -1;
} /* end test_zero_dim_dset() */
-
+
/*-------------------------------------------------------------------------
* Function: test_swmr_non_latest
*
* Purpose: Checks that a file created with either:
- * (a) SWMR-write + non-latest-format
- * (b) write + latest format
- * will generate datset with latest chunk indexing type.
+ * (a) SWMR-write + non-latest-format
+ * (b) write + latest format
+ * will generate datset with latest chunk indexing type.
*
* Return: Success: 0
* Failure: -1
@@ -10362,17 +10395,17 @@ static herr_t
test_swmr_non_latest(const char *env_h5_driver, hid_t fapl)
{
char filename[FILENAME_BUF_SIZE];
- hid_t fid = -1; /* File ID */
- hid_t gid = -1; /* Group ID */
- hid_t dcpl = -1; /* Dataset creation property list ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t did = -1; /* Dataset ID */
- hsize_t dim[1], dims2[2]; /* Size of dataset */
- hsize_t max_dim[1], max_dims2[2]; /* Maximum size of dataset */
- hsize_t chunk_dim[1], chunk_dims2[2]; /* Chunk dimensions */
- H5D_chunk_index_t idx_type; /* Chunk index type */
- int data; /* Data to be written to the dataset */
- H5F_libver_t low; /* File format low bound */
+ hid_t fid = -1; /* File ID */
+ hid_t gid = -1; /* Group ID */
+ hid_t dcpl = -1; /* Dataset creation property list ID */
+ hid_t sid = -1; /* Dataspace ID */
+ hid_t did = -1; /* Dataset ID */
+ hsize_t dim[1], dims2[2]; /* Size of dataset */
+ hsize_t max_dim[1], max_dims2[2]; /* Maximum size of dataset */
+ hsize_t chunk_dim[1], chunk_dims2[2]; /* Chunk dimensions */
+ H5D_chunk_index_t idx_type; /* Chunk index type */
+ int data; /* Data to be written to the dataset */
+ H5F_libver_t low; /* File format low bound */
TESTING("File created with write+latest-format/SWMR-write+non-latest-format: dataset with latest chunk index");
@@ -10386,35 +10419,35 @@ test_swmr_non_latest(const char *env_h5_driver, hid_t fapl)
} /* end if */
/* Check if we are using the latest version of the format */
- if(H5Pget_libver_bounds(fapl, &low, NULL) < 0)
+ if(H5Pget_libver_bounds(fapl, &low, NULL) < 0)
FAIL_STACK_ERROR
h5_fixname(FILENAME[18], fapl, filename, sizeof filename);
if(low == H5F_LIBVER_LATEST) {
/* Create file with write+latest-format */
- if((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
+ if((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
FAIL_STACK_ERROR
} else {
/* Create file with SWMR-write+non-latest-format */
- if((fid = H5Fcreate(filename, H5F_ACC_TRUNC|H5F_ACC_SWMR_WRITE, H5P_DEFAULT, fapl)) < 0)
+ if((fid = H5Fcreate(filename, H5F_ACC_TRUNC|H5F_ACC_SWMR_WRITE, H5P_DEFAULT, fapl)) < 0)
FAIL_STACK_ERROR
} /* end else */
/* Create a chunked dataset: this will use extensible array chunk indexing */
- if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
FAIL_STACK_ERROR
chunk_dim[0] = 6;
- if(H5Pset_chunk(dcpl, 1, chunk_dim) < 0)
+ if(H5Pset_chunk(dcpl, 1, chunk_dim) < 0)
FAIL_STACK_ERROR
dim[0] = 1;
max_dim[0] = H5S_UNLIMITED;
- if((sid = H5Screate_simple(1, dim, max_dim)) < 0)
+ if((sid = H5Screate_simple(1, dim, max_dim)) < 0)
FAIL_STACK_ERROR
- if((did = H5Dcreate2(fid, DSET_CHUNKED_NAME, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
+ if((did = H5Dcreate2(fid, DSET_CHUNKED_NAME, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR
/* Write to the dataset */
@@ -10423,9 +10456,9 @@ test_swmr_non_latest(const char *env_h5_driver, hid_t fapl)
FAIL_STACK_ERROR
/* Verify the dataset's indexing type */
- if(H5D__layout_idx_type_test(did, &idx_type) < 0)
+ if(H5D__layout_idx_type_test(did, &idx_type) < 0)
FAIL_STACK_ERROR
- if(idx_type != H5D_CHUNK_IDX_EARRAY)
+ if(idx_type != H5D_CHUNK_IDX_EARRAY)
FAIL_PUTS_ERROR("created dataset not indexed by extensible array")
/* Closing */
@@ -10435,7 +10468,7 @@ test_swmr_non_latest(const char *env_h5_driver, hid_t fapl)
if(H5Fclose(fid) < 0) FAIL_STACK_ERROR
/* Open the file again */
- if((fid = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0)
+ if((fid = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0)
FAIL_STACK_ERROR
/* Open the dataset in the file */
@@ -10443,9 +10476,9 @@ test_swmr_non_latest(const char *env_h5_driver, hid_t fapl)
FAIL_STACK_ERROR
/* Verify the dataset's indexing type */
- if(H5D__layout_idx_type_test(did, &idx_type) < 0)
+ if(H5D__layout_idx_type_test(did, &idx_type) < 0)
FAIL_STACK_ERROR
- if(idx_type != H5D_CHUNK_IDX_EARRAY)
+ if(idx_type != H5D_CHUNK_IDX_EARRAY)
FAIL_PUTS_ERROR("created dataset not indexed by extensible array")
/* Read from the dataset and verify data read is correct */
@@ -10462,25 +10495,25 @@ test_swmr_non_latest(const char *env_h5_driver, hid_t fapl)
FAIL_STACK_ERROR
/* Create a chunked dataset in the group: this will use v2 B-tree chunk indexing */
- if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
FAIL_STACK_ERROR
chunk_dims2[0] = chunk_dims2[1] = 10;
- if(H5Pset_chunk(dcpl, 2, chunk_dims2) < 0)
+ if(H5Pset_chunk(dcpl, 2, chunk_dims2) < 0)
FAIL_STACK_ERROR
dims2[0] = dims2[1] = 1;
max_dims2[0] = max_dims2[1] = H5S_UNLIMITED;
- if((sid = H5Screate_simple(2, dims2, max_dims2)) < 0)
+ if((sid = H5Screate_simple(2, dims2, max_dims2)) < 0)
FAIL_STACK_ERROR
- if((did = H5Dcreate2(gid, DSET_CHUNKED_NAME, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
+ if((did = H5Dcreate2(gid, DSET_CHUNKED_NAME, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR
/* Verify the dataset's indexing type */
- if(H5D__layout_idx_type_test(did, &idx_type) < 0)
+ if(H5D__layout_idx_type_test(did, &idx_type) < 0)
FAIL_STACK_ERROR
- if(idx_type != H5D_CHUNK_IDX_BT2)
+ if(idx_type != H5D_CHUNK_IDX_BT2)
FAIL_PUTS_ERROR("created dataset not indexed by v2 B-tree")
/* Closing */
@@ -10503,9 +10536,9 @@ test_swmr_non_latest(const char *env_h5_driver, hid_t fapl)
FAIL_STACK_ERROR
/* Verify the dataset's indexing type */
- if(H5D__layout_idx_type_test(did, &idx_type) < 0)
+ if(H5D__layout_idx_type_test(did, &idx_type) < 0)
FAIL_STACK_ERROR
- if(idx_type != H5D_CHUNK_IDX_BT2)
+ if(idx_type != H5D_CHUNK_IDX_BT2)
FAIL_PUTS_ERROR("created dataset not indexed by v2 B-tree")
/* Closing */
@@ -10523,9 +10556,9 @@ test_swmr_non_latest(const char *env_h5_driver, hid_t fapl)
FAIL_STACK_ERROR
/* Verify the dataset's indexing type */
- if(H5D__layout_idx_type_test(did, &idx_type) < 0)
+ if(H5D__layout_idx_type_test(did, &idx_type) < 0)
FAIL_STACK_ERROR
- if(idx_type != H5D_CHUNK_IDX_EARRAY)
+ if(idx_type != H5D_CHUNK_IDX_EARRAY)
FAIL_PUTS_ERROR("created dataset not indexed by extensible array")
/* Close the dataset */
@@ -10540,9 +10573,9 @@ test_swmr_non_latest(const char *env_h5_driver, hid_t fapl)
FAIL_STACK_ERROR
/* Verify the dataset's indexing type */
- if(H5D__layout_idx_type_test(did, &idx_type) < 0)
+ if(H5D__layout_idx_type_test(did, &idx_type) < 0)
FAIL_STACK_ERROR
- if(idx_type != H5D_CHUNK_IDX_BT2)
+ if(idx_type != H5D_CHUNK_IDX_BT2)
FAIL_PUTS_ERROR("created dataset not indexed by v2 B-tree")
/* Write to the dataset in the group */
@@ -10556,7 +10589,7 @@ test_swmr_non_latest(const char *env_h5_driver, hid_t fapl)
if(H5Fclose(fid) < 0) FAIL_STACK_ERROR
/* Open the file again with SWMR read access */
- if((fid = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, fapl)) < 0)
+ if((fid = H5Fopen(filename, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, fapl)) < 0)
FAIL_STACK_ERROR
if((gid = H5Gopen2(fid, "group", H5P_DEFAULT)) < 0)
@@ -10593,7 +10626,7 @@ error:
return -1;
} /* test_swmr_non_latest() */
-
+
/*-------------------------------------------------------------------------
* Function: test_earray_hdr_fd
*
@@ -10656,7 +10689,7 @@ test_earray_hdr_fd(const char *env_h5_driver, hid_t fapl)
FAIL_STACK_ERROR;
/* Verify the chunk index type */
- if(H5D__layout_idx_type_test(did, &idx_type) < 0)
+ if(H5D__layout_idx_type_test(did, &idx_type) < 0)
FAIL_STACK_ERROR;
if(idx_type != H5D_CHUNK_IDX_EARRAY)
FAIL_PUTS_ERROR("should be using extensible array as index");
@@ -10713,7 +10746,7 @@ error:
return -1;
} /* test_earray_hdr_fd() */
-
+
/*-------------------------------------------------------------------------
* Function: test_farray_hdr_fd
*
@@ -10776,7 +10809,7 @@ test_farray_hdr_fd(const char *env_h5_driver, hid_t fapl)
FAIL_STACK_ERROR;
/* Verify the chunk index type */
- if(H5D__layout_idx_type_test(did, &idx_type) < 0)
+ if(H5D__layout_idx_type_test(did, &idx_type) < 0)
FAIL_STACK_ERROR;
if(idx_type != H5D_CHUNK_IDX_FARRAY)
FAIL_PUTS_ERROR("should be using fixed array as index");
@@ -10833,7 +10866,7 @@ error:
return -1;
} /* test_farray_hdr_fd() */
-
+
/*-------------------------------------------------------------------------
* Function: test_bt2_hdr_fd
*
@@ -10896,7 +10929,7 @@ test_bt2_hdr_fd(const char *env_h5_driver, hid_t fapl)
FAIL_STACK_ERROR;
/* Verify the chunk index type */
- if(H5D__layout_idx_type_test(did, &idx_type) < 0)
+ if(H5D__layout_idx_type_test(did, &idx_type) < 0)
FAIL_STACK_ERROR;
if(idx_type != H5D_CHUNK_IDX_BT2)
FAIL_PUTS_ERROR("should be using fixed array as index");
@@ -10953,7 +10986,7 @@ error:
return -1;
} /* test_bt2_hdr_fd() */
-
+
/*-------------------------------------------------------------------------
* Function: test_storage_size
*
@@ -11347,7 +11380,98 @@ error:
return -1;
} /* end test_storage_size() */
-
+
+/*-------------------------------------------------------------------------
+ * Function: test_power2up
+ *
+ * Purpose: Tests that the H5VM_power2up(n) function does not result in an
+ * infinite loop when input n exceeds 2^63. (HDFFV-10217)
+ * H5VM_power2up() is used to calculate the next power of 2 for
+ * a dataset's scaled dimension sizes.
+ *
+ * Return: Success: 0
+ * Failure: -1
+ *
+ * Programmer: Vailin Choi; June 2017
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+test_power2up(hid_t fapl)
+{
+ char filename[FILENAME_BUF_SIZE];
+ hid_t fid = -1; /* File ID */
+ hid_t dcpl = -1; /* Dataset creation property list */
+ hid_t sid = -1; /* Dataspace ID */
+ hid_t did = -1; /* Dataset ID */
+ hsize_t dims[2]; /* Dataset dimension sizes */
+ hsize_t max_dims[2]; /* Maximum dimension sizes */
+ hsize_t chunk_dims[2]; /* Chunk dimensions */
+ hsize_t ext_dims[2]; /* Extended dimension sizes */
+ herr_t status; /* Error status */
+
+ TESTING("the next power of 2");
+
+ h5_fixname(FILENAME[24], fapl, filename, sizeof filename);
+
+ /* Create file */
+ if((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) FAIL_STACK_ERROR
+
+ /* Set dims[1] to ((2^63) -1) */
+ dims[0] = 0;
+ dims[1] = ((hsize_t)1 << ((sizeof(hsize_t) * CHAR_BIT) -1)) - 1;
+ max_dims[0] = max_dims[1] = H5S_UNLIMITED;
+ sid = H5Screate_simple(2, dims, max_dims);
+
+ /* Create dataset creation property list */
+ if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ TEST_ERROR
+
+ /* Set chunk size */
+ chunk_dims[0] = chunk_dims[1] = 1;
+ if(H5Pset_chunk(dcpl, 2, chunk_dims) < 0)
+ TEST_ERROR
+
+ /* Create chunked dataset */
+ if((did = H5Dcreate2(fid, "dset", H5T_NATIVE_INT64, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
+ TEST_ERROR
+
+ ext_dims[0] = 1;
+ ext_dims[1] = dims[1] + 5;
+
+ /* Extend to (2^63)+ */
+ H5E_BEGIN_TRY {
+ status = H5Dset_extent(did, ext_dims);
+ } H5E_END_TRY;
+ if(status >= 0)
+ TEST_ERROR
+
+ /* Closing */
+ if(H5Dclose(did) < 0)
+ TEST_ERROR
+ if(H5Sclose(sid) < 0)
+ TEST_ERROR
+ if(H5Pclose(dcpl) < 0)
+ TEST_ERROR
+ if(H5Fclose(fid) < 0)
+ TEST_ERROR
+
+ PASSED();
+
+ return 0;
+
+error:
+ H5E_BEGIN_TRY {
+ H5Pclose(dcpl);
+ H5Dclose(did);
+ H5Sclose(sid);
+ H5Pclose(dcpl);
+ H5Fclose(fid);
+ } H5E_END_TRY;
+ return -1;
+} /* end test_power2up() */
+
+
/*-------------------------------------------------------------------------
* Function: test_scatter
*
@@ -11665,7 +11789,7 @@ error:
return -1;
} /* end test_scatter() */
-
+
/*-------------------------------------------------------------------------
* Function: test_gather
*
@@ -12027,7 +12151,7 @@ error:
return -1;
} /* end test_gather() */
-
+
/*-------------------------------------------------------------------------
* Function: test_scatter_error
*
@@ -12230,7 +12354,7 @@ error:
return -1;
} /* end test_scatter_error() */
-
+
/*-------------------------------------------------------------------------
* Function: test_gather_error
*
@@ -12372,33 +12496,33 @@ error:
/*-------------------------------------------------------------------------
* DLS bug -- HDFFV-9672
*
- * The following functions replicate the test code provided by DLS to
+ * The following functions replicate the test code provided by DLS to
* expose bug hdffv-9672. All functions associated with this test
* have the prefix DLS_01_
*
* The note documenting the bug is reproduced below:
*
* ------------------------------------------------------
- *
+ *
* Hi,
* We've found an issue regarding fixed length strings.
*
- * If we create a chunked dataset of large fixed length strings
- * (up to 1kb per string) with small chunk sizes (~8 elements per
+ * If we create a chunked dataset of large fixed length strings
+ * (up to 1kb per string) with small chunk sizes (~8 elements per
* chunk) then the resulting dataset may not be read later.
- * This only happens if the file is created with LIBVER_LATEST
+ * This only happens if the file is created with LIBVER_LATEST
* for the version bounds.
*
* Calling H5Oget_info(...) on the dataset results in the following:
- *
- * H5Dearray.c:250: H5D__earray_crt_context: Assertion
+ *
+ * H5Dearray.c:250: H5D__earray_crt_context: Assertion
* `udata->chunk_size > 0' failed.
- *
+ *
* Example:
- * void create_data(...)
+ * void create_data(...)
* {
* ...
- *
+ *
* hsize_t chunks[1] = {8} ;
*
* err = H5Tset_size( tid, 256 );
@@ -12406,45 +12530,45 @@ error:
* err = H5Pset_chunk( dcpl, 1, chunks );
*
* H5Dcreate2( fid, "data", tid, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT );
- *
+ *
* // write data
- * }
- *
- * void read_data(...)
- * {
- * ...
- *
+ * }
+ *
+ * void read_data(...)
+ * {
+ * ...
+ *
* H5O_into_t info; status = H5Oget_info( did, &info ) // crash
- * ...
- * }
- *
- * If the size of the chunk is increased (usually matching the
- * string length) then this problem disappears.
- *
- * A full program that produces such a file (and crashes trying to
+ * ...
+ * }
+ *
+ * If the size of the chunk is increased (usually matching the
+ * string length) then this problem disappears.
+ *
+ * A full program that produces such a file (and crashes trying to
* read it) is attached.
- *
+ *
* Tested with 1.10.0-alpha1.
- *
+ *
* Regards,
- *
+ *
* Charles Mita
* Software Engineer
* Diamond Light Source Ltd.
* +44 1235 778029
*
* ------------------------------------------------------
- *
+ *
* The bug in question turned out to be caused by a failure to update
- * the enc_bytes_per_dim field in the layout if the size of the
- * underlying type required more bytes to encode than any of the
+ * the enc_bytes_per_dim field in the layout if the size of the
+ * underlying type required more bytes to encode than any of the
* chunk dimensions.
*
- * At least in debug builds, the following test code exposes the
+ * At least in debug builds, the following test code exposes the
* failure via an assertion failure.
*
- * Note that the test code make no attempt to run with different
- * file drivers, as the bug is in the actual on disk encoding of
+ * Note that the test code make no attempt to run with different
+ * file drivers, as the bug is in the actual on disk encoding of
* the chunk layout.
*
* JRM -- 2/5/16
@@ -12452,10 +12576,10 @@ error:
*-------------------------------------------------------------------------
*/
-#define DLS_01_DATASET "data"
-#define DLS_01_STR_SIZE 256
-#define DLS_01_CHUNK_SIZE 8
-#define DLS_01_DIMS 4
+#define DLS_01_DATASET "data"
+#define DLS_01_STR_SIZE 256
+#define DLS_01_CHUNK_SIZE 8
+#define DLS_01_DIMS 4
static herr_t dls_01_setup_file( hid_t fid );
static herr_t dls_01_write_data( hid_t fid, char* buffer );
@@ -12576,18 +12700,18 @@ dls_01_main( void ) {
char filename[512];
int status = 0;
hid_t fapl = 0, fid = 0;
- const char* strings[DLS_01_DIMS] =
- { "String 1", "Test string 2", "Another string", "Final String" };
+ const char* strings[DLS_01_DIMS] =
+ { "String 1", "Test string 2", "Another string", "Final String" };
char* buffer = NULL;
TESTING("Testing DLS bugfix 1");
- if ( NULL == h5_fixname(FILENAME[23], H5P_DEFAULT, filename,
+ if ( NULL == h5_fixname(FILENAME[23], H5P_DEFAULT, filename,
sizeof(filename)) )
- TEST_ERROR
+ TEST_ERROR
buffer = (char *)HDcalloc( DLS_01_DIMS, DLS_01_STR_SIZE );
- if ( NULL == buffer )
+ if ( NULL == buffer )
TEST_ERROR
HDstrcpy( buffer, strings[0] );
@@ -12605,10 +12729,10 @@ dls_01_main( void ) {
if ( fid <= 0 ) TEST_ERROR
if ( 0 != dls_01_setup_file( fid ) )
- goto error;
+ goto error;
if ( 0 != dls_01_write_data( fid, buffer ) )
- goto error;
+ goto error;
status = H5Fclose( fid );
if ( status != 0 ) TEST_ERROR
@@ -12617,7 +12741,7 @@ dls_01_main( void ) {
if ( fid <= 0 ) TEST_ERROR
if ( 0 != dls_01_read_stuff( fid ) )
- goto error;
+ goto error;
status = H5Fclose( fid );
if ( status != 0 ) TEST_ERROR
@@ -12639,38 +12763,306 @@ error:
} /* dls_01_main() */
+/*-------------------------------------------------------------------------
+ * Function: test_compact_open_close_dirty
+ *
+ * Purpose: Verify that the two issues reported in HDFFV-10051 are fixed:
+ * (1) Repeated open/close of a compact dataset fails due to the
+ * increment of ndims in the dataset structure for every open.
+ * (2) layout "dirty" flag for a compact dataset is not reset
+ * properly after flushing the data at dataset close.
+ * The test for issue #1 is based on compactoc.c attached
+ * to the jira issue HDFFV-10051
+ *
+ * Return: Success: 0
+ * Failure: -1
+ *
+ * Programmer: Vailin Choi; April 2017
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+test_compact_open_close_dirty(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; /* Dataset creation property list */
+ hsize_t dims[1] = {10}; /* Dimension */
+ int wbuf[10]; /* Data buffer */
+ char filename[FILENAME_BUF_SIZE]; /* Filename */
+ int i; /* Local index variable */
+ hbool_t dirty; /* The dirty flag */
+
+ TESTING("compact dataset repeated open/close and dirty flag");
+
+ /* Create a file */
+ h5_fixname(FILENAME[1], fapl, filename, sizeof filename);
+ if((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
+ TEST_ERROR
+
+ /* Initialize data */
+ for(i = 0; i < 10; i++)
+ wbuf[i] = i;
+
+ /* Create dataspace */
+ if((sid = H5Screate_simple(1, dims, NULL)) < 0)
+ TEST_ERROR
+
+ /* Set compact layout */
+ if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ TEST_ERROR
+ if(H5Pset_layout(dcpl, H5D_COMPACT) < 0)
+ TEST_ERROR
+ if(H5Pset_alloc_time(dcpl, H5D_ALLOC_TIME_EARLY) < 0)
+ TEST_ERROR
+
+ /* Create a compact dataset */
+ if((did = H5Dcreate2(fid, DSET_COMPACT_MAX_NAME, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
+ TEST_ERROR
+
+ /* Write to the dataset */
+ if(H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, wbuf) < 0)
+ TEST_ERROR
+
+ /* Close the dataset */
+ if(H5Dclose(did) < 0)
+ TEST_ERROR
+
+ /* Verify the repeated open/close of the dataset will not fail */
+ for(i = 0; i < 20;i++) {
+ H5E_BEGIN_TRY {
+ did = H5Dopen2 (fid, DSET_COMPACT_MAX_NAME, H5P_DEFAULT);
+ } H5E_END_TRY;
+ if(did < 0)
+ TEST_ERROR
+ if(H5Dclose(did) < 0)
+ TEST_ERROR
+ }
+
+ /* Open the dataset */
+ if((did = H5Dopen2(fid, DSET_COMPACT_MAX_NAME, H5P_DEFAULT)) < 0)
+ TEST_ERROR
+
+ /* Retrieve the "dirty" flag from the compact dataset layout */
+ if(H5D__layout_compact_dirty_test(did, &dirty) < 0)
+ TEST_ERROR
+
+ /* Verify that the "dirty" flag is false */
+ if(dirty)
+ TEST_ERROR
+
+ /* Close the dataset */
+ if(H5Dclose(did) < 0)
+ TEST_ERROR
+
+ /* Close the dataspace */
+ if(H5Sclose(sid) < 0)
+ TEST_ERROR
+
+ /* Close the dataset creation property list */
+ if(H5Pclose(dcpl) < 0)
+ TEST_ERROR
+
+ /* Close the file */
+ if(H5Fclose(fid) < 0)
+ TEST_ERROR
+
+ PASSED();
+ return 0;
+
+error:
+ H5E_BEGIN_TRY {
+ H5Sclose(sid);
+ H5Pclose(dcpl);
+ H5Dclose(did);
+ H5Fclose(fid);
+ } H5E_END_TRY;
+ return -1;
+} /* test_compact_open_close_dirty() */
-
/*-------------------------------------------------------------------------
- * Function: main
+ * Function: test_versionbounds
*
- * Purpose: Tests the dataset interface (H5D)
+ * Purpose: Tests various format versions.
+ * (Currently, only virtual dataset feature)
*
- * Return: Success: exit(EXIT_SUCCESS)
+ * Return: Success: 0
+ * Failure: -1
+ * Description:
+ * This function attempts to create a virtual dataset in all
+ * valid combinations of low/high library format bounds. Creation
+ * of virtual dataset should only succeed in H5F_LIBVER_V110.
+ * -BMR, January 2018
*
- * Failure: exit(EXIT_FAILURE)
+ *-------------------------------------------------------------------------
+ */
+#define VDS_FNAME1 "virtual_file1"
+#define VDS_FNAME2 "virtual_file2"
+#define SRC_FNAME "source_file"
+#define SRC_DSET "src_dset"
+#define V_DSET "v_dset"
+static herr_t
+test_versionbounds()
+{
+ hid_t fapl = -1;
+ hid_t srcfile = -1; /* Files with source dsets */
+ hid_t vfile = -1; /* File with virtual dset */
+ hid_t dcpl = -1; /* Dataset creation property list */
+ hid_t srcspace = -1; /* Source dataspaces */
+ hid_t vspace = -1; /* Virtual dset dataspaces */
+ hid_t srcdset = -1; /* Source datset */
+ hid_t vdset = -1; /* Virtual dataset */
+ hid_t null_dspace = -1; /* Data space of H5S_NULL */
+ hsize_t dims[1] = {3}; /* Data space current size */
+ char srcfilename[FILENAME_BUF_SIZE];
+ char vfilename1[FILENAME_BUF_SIZE];
+ char vfilename2[FILENAME_BUF_SIZE];
+ H5F_libver_t low, high; /* File format bounds */
+ herr_t ret; /* Generic return value */
+
+ TESTING("version bounds of datasets");
+
+ /* Create a copy of file access property list */
+ if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) TEST_ERROR
+
+ h5_fixname(VDS_FNAME1, fapl, vfilename1, sizeof vfilename1);
+ h5_fixname(VDS_FNAME2, fapl, vfilename2, sizeof vfilename2);
+ h5_fixname(SRC_FNAME, fapl, srcfilename, sizeof srcfilename);
+
+ /* Create DCPL */
+ if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ TEST_ERROR
+
+ /* Clear virtual layout in DCPL */
+ if(H5Pset_layout(dcpl, H5D_VIRTUAL) < 0)
+ TEST_ERROR
+
+ /* Create source dataspace */
+ if((srcspace = H5Screate_simple(1, dims, NULL)) < 0)
+ TEST_ERROR
+
+ /* Create virtual dataspace */
+ if((vspace = H5Screate_simple(1, dims, NULL)) < 0)
+ TEST_ERROR
+
+ /* Add virtual layout mapping */
+ if(H5Pset_virtual(dcpl, vspace, srcfilename, SRC_DSET, srcspace) < 0)
+ TEST_ERROR
+
+ /* Loop through all the combinations of low/high library format bounds */
+ /* Create a source file and a dataset in it. Create a virtual file and
+ virtual dataset. Creation of virtual dataset should only succeed in
+ H5F_LIBVER_V110 */
+ for(low = H5F_LIBVER_EARLIEST; low < H5F_LIBVER_NBOUNDS; low++) {
+ for(high = H5F_LIBVER_EARLIEST; high < H5F_LIBVER_NBOUNDS; high++) {
+
+ /* Set version bounds, skip for invalid low/high combination */
+ H5E_BEGIN_TRY {
+ ret = H5Pset_libver_bounds(fapl, low, high);
+ } H5E_END_TRY;
+
+ if (ret < 0) /* Invalid low/high combinations */
+ continue;
+
+ /* Create a source file and dataset */
+ if((srcfile = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
+ TEST_ERROR
+ if((srcdset = H5Dcreate2(srcfile, SRC_DSET, H5T_NATIVE_INT, srcspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ TEST_ERROR
+
+ /* Create a virtual file */
+ if((vfile = H5Fcreate(vfilename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
+ TEST_ERROR
+
+ /* Create the virtual dataset */
+ H5E_BEGIN_TRY {
+ vdset = H5Dcreate2(vfile, V_DSET, H5T_NATIVE_INT, vspace, H5P_DEFAULT, dcpl, H5P_DEFAULT);
+ } H5E_END_TRY;
+
+ if (vdset > 0) /* dataset created successfully */
+ {
+ /* Virtual dataset is only available starting in V110 */
+ VERIFY(high, H5F_LIBVER_V110, "virtual dataset");
+
+ if(H5Dclose(vdset) < 0) TEST_ERROR
+ vdset = -1;
+ }
+
+ /* Close virtual file */
+ if(H5Fclose(vfile) < 0) TEST_ERROR
+ vfile = -1;
+
+ /* Close srcdset and srcfile */
+ if(H5Dclose(srcdset) < 0) TEST_ERROR
+ srcdset = -1;
+
+ if(H5Fclose(srcfile) < 0) TEST_ERROR
+ srcfile = -1;
+
+ } /* for high */
+ } /* for low */
+
+ /* Close dataspaces and properties */
+ if(H5Sclose(srcspace) < 0)
+ TEST_ERROR
+ srcspace = -1;
+ if(H5Sclose(vspace) < 0)
+ TEST_ERROR
+ vspace = -1;
+ if(H5Pclose(fapl) < 0)
+ TEST_ERROR
+ fapl = -1;
+ if(H5Pclose(dcpl) < 0)
+ TEST_ERROR
+ dcpl = -1;
+ PASSED();
+ return 0;
+
+ error:
+ H5E_BEGIN_TRY {
+ H5Sclose(srcspace);
+ H5Sclose(vspace);
+ H5Pclose(dcpl);
+ H5Pclose(fapl);
+ H5Dclose(srcdset);
+ H5Dclose(vdset);
+ H5Fclose(srcfile);
+ H5Fclose(vfile);
+ } H5E_END_TRY;
+ return -1;
+} /* test_versionbounds() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: main
*
- * Programmer: Robb Matzke
- * Tuesday, December 9, 1997
+ * Purpose: Tests the dataset interface (H5D)
+ *
+ * Return: Success: exit(EXIT_SUCCESS)
+ * Failure: exit(EXIT_FAILURE)
+ *
+ * Programmer: Robb Matzke
+ * Tuesday, December 9, 1997
*
*-------------------------------------------------------------------------
*/
int
main(void)
{
- char filename[FILENAME_BUF_SIZE];
- hid_t file, grp, fapl, fapl2;
- hid_t fcpl = -1, fcpl2 = -1;
+ char filename[FILENAME_BUF_SIZE];
+ hid_t file, grp, fapl, fapl2;
+ hid_t fcpl = -1, fcpl2 = -1;
unsigned new_format;
unsigned paged;
- int mdc_nelmts;
- size_t rdcc_nelmts;
- size_t rdcc_nbytes;
- double rdcc_w0;
- int nerrors = 0;
+ int mdc_nelmts;
+ size_t rdcc_nelmts;
+ size_t rdcc_nbytes;
+ double rdcc_w0;
+ int nerrors = 0;
const char *envval;
- hbool_t contig_addr_vfd; /* Whether VFD used has a contigous address space */
+ hbool_t contig_addr_vfd; /* Whether VFD used has a contigous address space */
/* Don't run this test using certain file drivers */
envval = HDgetenv("HDF5_DRIVER");
@@ -12757,64 +13149,66 @@ main(void)
if(H5Gclose(grp) < 0)
goto error;
- nerrors += (test_create(file) < 0 ? 1 : 0);
- nerrors += (test_simple_io(envval, my_fapl) < 0 ? 1 : 0);
- nerrors += (test_compact_io(my_fapl) < 0 ? 1 : 0);
- nerrors += (test_max_compact(my_fapl) < 0 ? 1 : 0);
- nerrors += (test_conv_buffer(file) < 0 ? 1 : 0);
- nerrors += (test_tconv(file) < 0 ? 1 : 0);
- nerrors += (test_filters(file, my_fapl) < 0 ? 1 : 0);
- nerrors += (test_onebyte_shuffle(file) < 0 ? 1 : 0);
- nerrors += (test_nbit_int(file) < 0 ? 1 : 0);
- nerrors += (test_nbit_float(file) < 0 ? 1 : 0);
- nerrors += (test_nbit_double(file) < 0 ? 1 : 0);
- nerrors += (test_nbit_array(file) < 0 ? 1 : 0);
- nerrors += (test_nbit_compound(file) < 0 ? 1 : 0);
- nerrors += (test_nbit_compound_2(file) < 0 ? 1 : 0);
- nerrors += (test_nbit_compound_3(file) < 0 ? 1 : 0);
- nerrors += (test_nbit_int_size(file) < 0 ? 1 : 0);
- nerrors += (test_nbit_flt_size(file) < 0 ? 1 : 0);
- nerrors += (test_scaleoffset_int(file) < 0 ? 1 : 0);
- nerrors += (test_scaleoffset_int_2(file) < 0 ? 1 : 0);
- nerrors += (test_scaleoffset_float(file) < 0 ? 1 : 0);
- nerrors += (test_scaleoffset_float_2(file) < 0 ? 1 : 0);
- nerrors += (test_scaleoffset_double(file) < 0 ? 1 : 0);
- nerrors += (test_scaleoffset_double_2(file) < 0 ? 1 : 0);
- nerrors += (test_multiopen (file) < 0 ? 1 : 0);
- nerrors += (test_types(file) < 0 ? 1 : 0);
+ nerrors += (test_create(file) < 0 ? 1 : 0);
+ nerrors += (test_simple_io(envval, my_fapl) < 0 ? 1 : 0);
+ nerrors += (test_compact_io(my_fapl) < 0 ? 1 : 0);
+ nerrors += (test_max_compact(my_fapl) < 0 ? 1 : 0);
+ nerrors += (test_compact_open_close_dirty(my_fapl) < 0 ? 1 : 0);
+ nerrors += (test_conv_buffer(file) < 0 ? 1 : 0);
+ nerrors += (test_tconv(file) < 0 ? 1 : 0);
+ nerrors += (test_filters(file, my_fapl) < 0 ? 1 : 0);
+ nerrors += (test_onebyte_shuffle(file) < 0 ? 1 : 0);
+ nerrors += (test_nbit_int(file) < 0 ? 1 : 0);
+ nerrors += (test_nbit_float(file) < 0 ? 1 : 0);
+ nerrors += (test_nbit_double(file) < 0 ? 1 : 0);
+ nerrors += (test_nbit_array(file) < 0 ? 1 : 0);
+ nerrors += (test_nbit_compound(file) < 0 ? 1 : 0);
+ nerrors += (test_nbit_compound_2(file) < 0 ? 1 : 0);
+ nerrors += (test_nbit_compound_3(file) < 0 ? 1 : 0);
+ nerrors += (test_nbit_int_size(file) < 0 ? 1 : 0);
+ nerrors += (test_nbit_flt_size(file) < 0 ? 1 : 0);
+ nerrors += (test_scaleoffset_int(file) < 0 ? 1 : 0);
+ nerrors += (test_scaleoffset_int_2(file) < 0 ? 1 : 0);
+ nerrors += (test_scaleoffset_float(file) < 0 ? 1 : 0);
+ nerrors += (test_scaleoffset_float_2(file) < 0 ? 1 : 0);
+ nerrors += (test_scaleoffset_double(file) < 0 ? 1 : 0);
+ nerrors += (test_scaleoffset_double_2(file) < 0 ? 1 : 0);
+ nerrors += (test_multiopen (file) < 0 ? 1 : 0);
+ nerrors += (test_types(file) < 0 ? 1 : 0);
nerrors += (test_userblock_offset(envval, my_fapl, new_format) < 0 ? 1 : 0);
- nerrors += (test_missing_filter(file) < 0 ? 1 : 0);
- nerrors += (test_can_apply(file) < 0 ? 1 : 0);
- nerrors += (test_can_apply2(file) < 0 ? 1 : 0);
- nerrors += (test_set_local(my_fapl) < 0 ? 1 : 0);
- nerrors += (test_can_apply_szip(file) < 0 ? 1 : 0);
- nerrors += (test_compare_dcpl(file) < 0 ? 1 : 0);
- nerrors += (test_copy_dcpl(file, my_fapl) < 0 ? 1 : 0);
- nerrors += (test_filter_delete(file) < 0 ? 1 : 0);
- nerrors += (test_filters_endianess() < 0 ? 1 : 0);
- nerrors += (test_zero_dims(file) < 0 ? 1 : 0);
- nerrors += (test_missing_chunk(file) < 0 ? 1 : 0);
- nerrors += (test_random_chunks(my_fapl) < 0 ? 1 : 0);
+ nerrors += (test_missing_filter(file) < 0 ? 1 : 0);
+ nerrors += (test_can_apply(file) < 0 ? 1 : 0);
+ nerrors += (test_can_apply2(file) < 0 ? 1 : 0);
+ nerrors += (test_set_local(my_fapl) < 0 ? 1 : 0);
+ nerrors += (test_can_apply_szip(file) < 0 ? 1 : 0);
+ nerrors += (test_compare_dcpl(file) < 0 ? 1 : 0);
+ nerrors += (test_copy_dcpl(file, my_fapl) < 0 ? 1 : 0);
+ nerrors += (test_filter_delete(file) < 0 ? 1 : 0);
+ nerrors += (test_filters_endianess() < 0 ? 1 : 0);
+ nerrors += (test_zero_dims(file) < 0 ? 1 : 0);
+ nerrors += (test_missing_chunk(file) < 0 ? 1 : 0);
+ nerrors += (test_random_chunks(my_fapl) < 0 ? 1 : 0);
#ifndef H5_NO_DEPRECATED_SYMBOLS
- nerrors += (test_deprec(file) < 0 ? 1 : 0);
+ nerrors += (test_deprec(file) < 0 ? 1 : 0);
#endif /* H5_NO_DEPRECATED_SYMBOLS */
- nerrors += (test_huge_chunks(my_fapl) < 0 ? 1 : 0);
- nerrors += (test_chunk_cache(my_fapl) < 0 ? 1 : 0);
+ nerrors += (test_huge_chunks(my_fapl) < 0 ? 1 : 0);
+ nerrors += (test_chunk_cache(my_fapl) < 0 ? 1 : 0);
nerrors += (test_big_chunks_bypass_cache(my_fapl) < 0 ? 1 : 0);
- nerrors += (test_chunk_fast(envval, my_fapl) < 0 ? 1 : 0);
- nerrors += (test_reopen_chunk_fast(my_fapl) < 0 ? 1 : 0);
+ nerrors += (test_chunk_fast(envval, my_fapl) < 0 ? 1 : 0);
+ nerrors += (test_reopen_chunk_fast(my_fapl) < 0 ? 1 : 0);
nerrors += (test_chunk_fast_bug1(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_idx_compatible() < 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_idx_compatible() < 0 ? 1 : 0);
nerrors += (test_unfiltered_edge_chunks(my_fapl) < 0 ? 1 : 0);
- nerrors += (test_single_chunk(my_fapl) < 0 ? 1 : 0);
+ nerrors += (test_single_chunk(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);
nerrors += (test_storage_size(my_fapl) < 0 ? 1 : 0);
+ nerrors += (test_power2up(my_fapl) < 0 ? 1 : 0);
nerrors += (test_swmr_non_latest(envval, my_fapl) < 0 ? 1 : 0);
nerrors += (test_earray_hdr_fd(envval, my_fapl) < 0 ? 1 : 0);
@@ -12837,6 +13231,9 @@ main(void)
nerrors += (test_scatter_error() < 0 ? 1 : 0);
nerrors += (test_gather_error() < 0 ? 1 : 0);
+ /* Tests version bounds using its own file */
+ nerrors += (test_versionbounds() < 0 ? 1 : 0);
+
/* Run misc tests */
nerrors += dls_01_main();
diff --git a/test/dt_arith.c b/test/dt_arith.c
index c5c14c87..c7f2986 100644
--- a/test/dt_arith.c
+++ b/test/dt_arith.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
diff --git a/test/dtransform.c b/test/dtransform.c
index 2769771..0381bb8 100644
--- a/test/dtransform.c
+++ b/test/dtransform.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include "h5test.h"
diff --git a/test/dtypes.c b/test/dtypes.c
index c3a8066..1a27634 100644
--- a/test/dtypes.c
+++ b/test/dtypes.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
@@ -20,7 +18,7 @@
* Purpose: Tests the datatype interface (H5T)
*/
-#include "h5test.h"
+#include "testhdf5.h"
#include "H5srcdir.h"
#include "H5Iprivate.h" /* For checking that datatype id's don't leak */
@@ -48,6 +46,16 @@
#define H5T_FRIEND /*suppress error about including H5Tpkg */
#include "H5Tpkg.h"
#endif
+
+/* Use in version bound test */
+#define H5F_FRIEND /*suppress error about including H5Fpkg */
+#define H5F_TESTING
+#include "H5Fpkg.h" /* File access */
+
+/* Use in version bound test */
+#define H5O_FRIEND /*suppress error about including H5Opkg */
+#include "H5Opkg.h" /* Object headers */
+
#define SET_ALIGNMENT(TYPE,VAL) \
H5T_NATIVE_##TYPE##_ALIGN_g=MAX(H5T_NATIVE_##TYPE##_ALIGN_g, VAL)
@@ -94,7 +102,15 @@ typedef enum dtype_t {
INT_SCHAR, INT_UCHAR, INT_SHORT, INT_USHORT, INT_INT, INT_UINT,
INT_LONG, INT_ULONG, INT_LLONG, INT_ULLONG, FLT_FLOAT, FLT_DOUBLE,
FLT_LDOUBLE, OTHER
-} dtype_t;
+} dtype_t; /* This doesn't seem to be used anywhere... -BMR */
+
+typedef enum {
+ E1_RED,
+ E1_GREEN,
+ E1_BLUE,
+ E1_ORANGE,
+ E1_YELLOW
+} color_t;
/* Constant for size of conversion buffer for int <-> float exception test */
#define CONVERT_SIZE 4
@@ -1680,7 +1696,7 @@ test_compound_9(void)
{
typedef struct cmpd_struct {
int i1;
- char* str;
+ const char* str;
int i2;
} cmpd_struct;
@@ -2528,7 +2544,7 @@ test_compound_14(void)
typedef struct cmpd_struct_1 {
char c1;
char c2;
- char* str;
+ const char* str;
} cmpd_struct_1;
typedef struct cmpd_struct_2 {
@@ -3301,7 +3317,7 @@ test_compound_18(void)
/* Create compound datatype, but don't insert fields */
tid = H5Tcreate(H5T_COMPOUND, (size_t)8);
- assert(tid > 0);
+ HDassert(tid > 0);
/* Attempt to create file with compound datatype that has no fields */
/* Create File */
@@ -3310,7 +3326,7 @@ test_compound_18(void)
/* Create a dataspace to use */
sid = H5Screate_simple(1, &dim, NULL);
- assert(sid > 0);
+ HDassert(sid > 0);
/* Create a dataset with the bad compound datatype */
H5E_BEGIN_TRY {
@@ -3323,7 +3339,7 @@ test_compound_18(void)
/* Create a group */
gid = H5Gcreate2(file, "group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- assert(gid > 0);
+ HDassert(gid > 0);
/* Create an attribute with the bad compound datatype */
H5E_BEGIN_TRY {
@@ -4674,7 +4690,7 @@ test_conv_enum_2(void)
/* Destination enum type */
dsttype = H5Tenum_create(H5T_NATIVE_INT);
- assert(H5Tget_size(dsttype) > H5Tget_size(srctype));
+ HDassert(H5Tget_size(dsttype) > H5Tget_size(srctype));
for (i=0; i<8; i++)
H5Tenum_insert(dsttype, mname[i], &i);
@@ -6684,7 +6700,7 @@ error:
} /* end test_named_indirect_reopen() */
static void create_del_obj_named_test_file(const char *filename, hid_t fapl,
- hbool_t new_format)
+ H5F_libver_t low, H5F_libver_t high)
{
hid_t file; /* File ID */
hid_t type; /* Datatype ID */
@@ -6694,93 +6710,97 @@ static void create_del_obj_named_test_file(const char *filename, hid_t fapl,
hid_t fcpl; /* File creation property list ID */
hid_t my_fapl; /* Copy of file access property list ID */
hid_t dcpl; /* Dataset creation property list ID */
+ unsigned use_at_least_v18;/* Whether to use old or new format */
herr_t status; /* Generic return value */
/* Make copy of FAPL */
my_fapl = H5Pcopy(fapl);
- assert(my_fapl > 0);
+ HDassert(my_fapl > 0);
- if(new_format) {
- /* Use latest version of file format */
- status = H5Pset_libver_bounds(my_fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST);
- assert(status >= 0);
- } /* end if */
+ /* Use low/high version of file format */
+ status = H5Pset_libver_bounds(my_fapl, low, high);
+ HDassert(status >= 0);
+
+ /* Set new format flag. Note: the case high < low should be caught in the caller */
+ use_at_least_v18 = 0;
+ if (low >= H5F_LIBVER_V18)
+ use_at_least_v18 = 1;
/* Create a file creation property list (used for the root group's creation property list) */
fcpl = H5Pcreate(H5P_FILE_CREATE);
- assert(fcpl > 0);
+ HDassert(fcpl > 0);
- if(new_format) {
+ if(use_at_least_v18) {
/* Use dense link storage for all links in root group */
status = H5Pset_link_phase_change(fcpl, 0, 0);
- assert(status >= 0);
+ HDassert(status >= 0);
} /* end if */
/* Create file with attribute that uses committed datatype */
file = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, my_fapl);
- assert(file > 0);
+ HDassert(file > 0);
/* Close FCPL */
status = H5Pclose(fcpl);
- assert(status >= 0);
+ HDassert(status >= 0);
/* Close FAPL */
status = H5Pclose(my_fapl);
- assert(status >= 0);
+ HDassert(status >= 0);
/* Create datatype to commit */
type = H5Tvlen_create(H5T_NATIVE_INT);
- assert(type > 0);
+ HDassert(type > 0);
/* Commit datatype */
status = H5Tcommit2(file, DEL_OBJ_NAMED_NAMED_DTYPE, type, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- assert(status >= 0);
+ HDassert(status >= 0);
/* Create scalar dataspace */
space = H5Screate(H5S_SCALAR);
- assert(space > 0);
+ HDassert(space > 0);
/* Create a dataset creation property list */
dcpl = H5Pcreate(H5P_DATASET_CREATE);
- assert(dcpl > 0);
+ HDassert(dcpl > 0);
- if(new_format) {
+ if(use_at_least_v18) {
/* Use dense attribute storage for all attributes on dataset */
status = H5Pset_attr_phase_change(dcpl, 0, 0);
- assert(status >= 0);
+ HDassert(status >= 0);
} /* end if */
/* Create dataset */
dset = H5Dcreate2(file, DEL_OBJ_NAMED_DATASET, type, space, H5P_DEFAULT, dcpl, H5P_DEFAULT);
- assert(dset > 0);
+ HDassert(dset > 0);
/* Close DCPL */
status = H5Pclose(dcpl);
- assert(status >= 0);
+ HDassert(status >= 0);
/* Close dataset */
status = H5Dclose(dset);
- assert(status >= 0);
+ HDassert(status >= 0);
/* Create attribute */
attr = H5Acreate_by_name(file, DEL_OBJ_NAMED_DATASET, DEL_OBJ_NAMED_ATTRIBUTE, type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- assert(attr > 0);
+ HDassert(attr > 0);
/* Close dataspace */
status = H5Sclose(space);
- assert(status >= 0);
+ HDassert(status >= 0);
/* Close datatype */
status = H5Tclose(type);
- assert(status >= 0);
+ HDassert(status >= 0);
/* Close attribute */
status = H5Aclose(attr);
- assert(status >= 0);
+ HDassert(status >= 0);
/* Close file */
status = H5Fclose(file);
- assert(status >= 0);
+ HDassert(status >= 0);
} /* end create_del_obj_named_test_file() */
@@ -6805,7 +6825,7 @@ test_delete_obj_named(hid_t fapl)
hid_t attr = -1; /* Attribute ID */
hid_t dset = -1; /* Dataset ID */
hid_t fapl2 = -1; /* File access property list ID */
- unsigned new_format; /* Whether to use old or new format */
+ H5F_libver_t low, high; /* File format bounds */
char filename[1024], filename2[1024];
TESTING("deleting objects that use named datatypes");
@@ -6815,47 +6835,54 @@ test_delete_obj_named(hid_t fapl)
h5_fixname(FILENAME[8], fapl, filename, sizeof filename);
h5_fixname(FILENAME[9], fapl2, filename2, sizeof filename2);
- /* Loop over old & new format files */
- for(new_format = FALSE; new_format <= TRUE; new_format++) {
- /* Create test file, with attribute that uses committed datatype */
- create_del_obj_named_test_file(filename, fapl, new_format);
+ /* Loop through all valid the combinations of low/high library format bounds,
+ to test delete objects that use named datatypes through different file IDs */
+ for(low = H5F_LIBVER_EARLIEST; low < H5F_LIBVER_NBOUNDS; low++) {
+ for(high = H5F_LIBVER_EARLIEST; high < H5F_LIBVER_NBOUNDS; high++) {
-/* Test deleting dataset opened through different file ID */
- if((filea1 = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0) FAIL_STACK_ERROR
- if((filea2 = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0) FAIL_STACK_ERROR
+ /* Skip invalid low/high combination */
+ if ((high == H5F_LIBVER_EARLIEST) || (low > high))
+ continue;
- if((dset = H5Dopen2(filea1, DEL_OBJ_NAMED_DATASET, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
- if(H5Dclose(dset) < 0) FAIL_STACK_ERROR
+ /* Create test file, with attribute that uses committed datatype */
+ create_del_obj_named_test_file(filename, fapl, low, high);
- if(H5Fclose(filea1) < 0) FAIL_STACK_ERROR
+ /* Test deleting dataset opened through different file ID */
+ if((filea1 = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0) FAIL_STACK_ERROR
+ if((filea2 = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0) FAIL_STACK_ERROR
- if((fileb = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl2)) < 0) FAIL_STACK_ERROR
+ if((dset = H5Dopen2(filea1, DEL_OBJ_NAMED_DATASET, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if(H5Dclose(dset) < 0) FAIL_STACK_ERROR
- if(H5Ldelete(filea2, DEL_OBJ_NAMED_DATASET, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if(H5Fclose(filea1) < 0) FAIL_STACK_ERROR
- if(H5Fclose(filea2) < 0) FAIL_STACK_ERROR
- if(H5Fclose(fileb) < 0) FAIL_STACK_ERROR
+ if((fileb = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl2)) < 0) FAIL_STACK_ERROR
+ if(H5Ldelete(filea2, DEL_OBJ_NAMED_DATASET, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
- /* Create test file, with attribute that uses committed datatype */
- create_del_obj_named_test_file(filename, fapl, new_format);
+ if(H5Fclose(filea2) < 0) FAIL_STACK_ERROR
+ if(H5Fclose(fileb) < 0) FAIL_STACK_ERROR
-/* Test deleting attribute opened through different file ID */
- if((filea1 = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0) FAIL_STACK_ERROR
- if((filea2 = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0) FAIL_STACK_ERROR
+ /* Create test file, with attribute that uses committed datatype */
+ create_del_obj_named_test_file(filename, fapl, low, high);
- if((attr = H5Aopen_by_name(filea1, DEL_OBJ_NAMED_DATASET, DEL_OBJ_NAMED_ATTRIBUTE, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
- if(H5Aclose(attr) < 0) FAIL_STACK_ERROR
+ /* Test deleting attribute opened through different file ID */
+ if((filea1 = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0) FAIL_STACK_ERROR
+ if((filea2 = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0) FAIL_STACK_ERROR
- if(H5Fclose(filea1) < 0) FAIL_STACK_ERROR
+ if((attr = H5Aopen_by_name(filea1, DEL_OBJ_NAMED_DATASET, DEL_OBJ_NAMED_ATTRIBUTE, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if(H5Aclose(attr) < 0) FAIL_STACK_ERROR
- if((fileb = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl2)) < 0) FAIL_STACK_ERROR
+ if(H5Fclose(filea1) < 0) FAIL_STACK_ERROR
- if(H5Adelete_by_name(filea2, DEL_OBJ_NAMED_DATASET, DEL_OBJ_NAMED_ATTRIBUTE, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+ if((fileb = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl2)) < 0) FAIL_STACK_ERROR
- if(H5Fclose(filea2) < 0) FAIL_STACK_ERROR
- if(H5Fclose(fileb) < 0) FAIL_STACK_ERROR
- } /* end for */
+ if(H5Adelete_by_name(filea2, DEL_OBJ_NAMED_DATASET, DEL_OBJ_NAMED_ATTRIBUTE, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
+
+ if(H5Fclose(filea2) < 0) FAIL_STACK_ERROR
+ if(H5Fclose(fileb) < 0) FAIL_STACK_ERROR
+ } /* end high */
+ } /* end low */
if(H5Pclose(fapl2) < 0) FAIL_STACK_ERROR
@@ -6900,7 +6927,7 @@ test_delete_obj_named_fileid(hid_t fapl)
hid_t attr = -1; /* Attribute ID */
hid_t dset = -1; /* Dataset ID */
hid_t fapl2 = -1; /* File access property list ID */
- unsigned new_format; /* Whether to use old or new format */
+ H5F_libver_t low, high; /* File format bounds */
char filename[1024], filename2[1024];
TESTING("deleting objects that use named datatypes");
@@ -6910,108 +6937,115 @@ test_delete_obj_named_fileid(hid_t fapl)
h5_fixname(FILENAME[8], fapl, filename, sizeof filename);
h5_fixname(FILENAME[9], fapl2, filename2, sizeof filename2);
- /* Loop over old & new format files */
- for(new_format = FALSE; new_format <= TRUE; new_format++) {
- /* Create test file, with attribute that uses committed datatype */
- create_del_obj_named_test_file(filename, fapl, new_format);
+ /* Loop through all the combinations of low/high library format bounds */
+ for(low = H5F_LIBVER_EARLIEST; low < H5F_LIBVER_NBOUNDS; low++) {
+ for(high = H5F_LIBVER_EARLIEST; high < H5F_LIBVER_NBOUNDS; high++) {
-/* Test getting file ID for dataset opened through different file ID */
- if((filea1 = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0) FAIL_STACK_ERROR
+ /* Skip invalid low/high combination */
+ if ((high == H5F_LIBVER_EARLIEST) || (low > high))
+ continue;
- if((filea2 = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0) FAIL_STACK_ERROR
+ /* Create test file, with attribute that uses committed datatype */
+ create_del_obj_named_test_file(filename, fapl, low, high);
- if((dset = H5Dopen2(filea1, DEL_OBJ_NAMED_DATASET, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ /* Test getting file ID for dataset opened through different file ID */
+ if((filea1 = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0) FAIL_STACK_ERROR
- /* Verify file ID from dataset matches correct file */
- dset_fid = H5Iget_file_id(dset);
- if(dset_fid != filea1) TEST_ERROR
- H5Fclose(dset_fid);
+ if((filea2 = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0) FAIL_STACK_ERROR
- /* Verify file ID from datatype (from dataset) matches correct file */
- type = H5Dget_type(dset);
- type_fid = H5Iget_file_id(type);
- if(type_fid != filea1) TEST_ERROR
- H5Fclose(type_fid);
- H5Tclose(type);
+ if((dset = H5Dopen2(filea1, DEL_OBJ_NAMED_DATASET, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
- if(H5Dclose(dset) < 0) FAIL_STACK_ERROR
+ /* Verify file ID from dataset matches correct file */
+ dset_fid = H5Iget_file_id(dset);
+ if(dset_fid != filea1) TEST_ERROR
+ H5Fclose(dset_fid);
- if(H5Fclose(filea1) < 0) FAIL_STACK_ERROR
+ /* Verify file ID from datatype (from dataset) matches correct file */
+ type = H5Dget_type(dset);
+ type_fid = H5Iget_file_id(type);
+ if(type_fid != filea1) TEST_ERROR
+ H5Fclose(type_fid);
+ H5Tclose(type);
- if((fileb = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl2)) < 0) FAIL_STACK_ERROR
+ if(H5Dclose(dset) < 0) FAIL_STACK_ERROR
- if((filea1 = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0) FAIL_STACK_ERROR
+ if(H5Fclose(filea1) < 0) FAIL_STACK_ERROR
- if((dset = H5Dopen2(filea1, DEL_OBJ_NAMED_DATASET, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((fileb = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl2)) < 0) FAIL_STACK_ERROR
- /* Verify file ID from dataset matches correct file */
- dset_fid = H5Iget_file_id(dset);
- if(dset_fid != filea1) TEST_ERROR
- H5Fclose(dset_fid);
+ if((filea1 = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0) FAIL_STACK_ERROR
- /* Verify file ID from datatype (from dataset) matches correct file */
- type = H5Dget_type(dset);
- type_fid = H5Iget_file_id(type);
- if(type_fid != filea1) TEST_ERROR
- H5Fclose(type_fid);
- H5Tclose(type);
+ if((dset = H5Dopen2(filea1, DEL_OBJ_NAMED_DATASET, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
- if(H5Dclose(dset) < 0) FAIL_STACK_ERROR
+ /* Verify file ID from dataset matches correct file */
+ dset_fid = H5Iget_file_id(dset);
+ if(dset_fid != filea1) TEST_ERROR
+ H5Fclose(dset_fid);
- if(H5Fclose(filea1) < 0) FAIL_STACK_ERROR
- if(H5Fclose(filea2) < 0) FAIL_STACK_ERROR
- if(H5Fclose(fileb) < 0) FAIL_STACK_ERROR
+ /* Verify file ID from datatype (from dataset) matches correct file */
+ type = H5Dget_type(dset);
+ type_fid = H5Iget_file_id(type);
+ if(type_fid != filea1) TEST_ERROR
+ H5Fclose(type_fid);
+ H5Tclose(type);
+ if(H5Dclose(dset) < 0) FAIL_STACK_ERROR
- /* Create test file, with attribute that uses committed datatype */
- create_del_obj_named_test_file(filename, fapl, new_format);
+ if(H5Fclose(filea1) < 0) FAIL_STACK_ERROR
+ if(H5Fclose(filea2) < 0) FAIL_STACK_ERROR
+ if(H5Fclose(fileb) < 0) FAIL_STACK_ERROR
-/* Test getting file ID for attribute opened through different file ID */
- if((filea1 = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0) FAIL_STACK_ERROR
- if((filea2 = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0) FAIL_STACK_ERROR
- if((attr = H5Aopen_by_name(filea1, DEL_OBJ_NAMED_DATASET, DEL_OBJ_NAMED_ATTRIBUTE, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ /* Create test file, with attribute that uses committed datatype */
+ create_del_obj_named_test_file(filename, fapl, low, high);
- /* Verify file ID from dataset matches correct file */
- attr_fid = H5Iget_file_id(attr);
- if(attr_fid != filea1) TEST_ERROR
- H5Fclose(attr_fid);
+ /* Test getting file ID for attribute opened through different file ID */
+ if((filea1 = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0) FAIL_STACK_ERROR
+ if((filea2 = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0) FAIL_STACK_ERROR
- /* Verify file ID from datatype (from dataset) matches correct file */
- type = H5Aget_type(attr);
- type_fid = H5Iget_file_id(type);
- if(type_fid != filea1) TEST_ERROR
- H5Fclose(type_fid);
- H5Tclose(type);
+ if((attr = H5Aopen_by_name(filea1, DEL_OBJ_NAMED_DATASET, DEL_OBJ_NAMED_ATTRIBUTE, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
- if(H5Aclose(attr) < 0) FAIL_STACK_ERROR
+ /* Verify file ID from dataset matches correct file */
+ attr_fid = H5Iget_file_id(attr);
+ if(attr_fid != filea1) TEST_ERROR
+ H5Fclose(attr_fid);
- if(H5Fclose(filea1) < 0) FAIL_STACK_ERROR
+ /* Verify file ID from datatype (from dataset) matches correct file */
+ type = H5Aget_type(attr);
+ type_fid = H5Iget_file_id(type);
+ if(type_fid != filea1) TEST_ERROR
+ H5Fclose(type_fid);
+ H5Tclose(type);
- if((fileb = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl2)) < 0) FAIL_STACK_ERROR
+ if(H5Aclose(attr) < 0) FAIL_STACK_ERROR
- if((filea1 = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0) FAIL_STACK_ERROR
+ if(H5Fclose(filea1) < 0) FAIL_STACK_ERROR
- if((attr = H5Aopen_by_name(filea1, DEL_OBJ_NAMED_DATASET, DEL_OBJ_NAMED_ATTRIBUTE, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if((fileb = H5Fcreate(filename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl2)) < 0) FAIL_STACK_ERROR
- /* Verify file ID from dataset matches correct file */
- attr_fid = H5Iget_file_id(attr);
- if(attr_fid != filea1) TEST_ERROR
- H5Fclose(attr_fid);
+ if((filea1 = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0) FAIL_STACK_ERROR
- /* Verify file ID from datatype (from dataset) matches correct file */
- type = H5Aget_type(attr);
- type_fid = H5Iget_file_id(type);
- if(type_fid != filea1) TEST_ERROR
- H5Fclose(type_fid);
- H5Tclose(type);
+ if((attr = H5Aopen_by_name(filea1, DEL_OBJ_NAMED_DATASET, DEL_OBJ_NAMED_ATTRIBUTE, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
- if(H5Aclose(attr) < 0) FAIL_STACK_ERROR
+ /* Verify file ID from dataset matches correct file */
+ attr_fid = H5Iget_file_id(attr);
+ if(attr_fid != filea1) TEST_ERROR
+ H5Fclose(attr_fid);
- if(H5Fclose(filea1) < 0) FAIL_STACK_ERROR
- if(H5Fclose(filea2) < 0) FAIL_STACK_ERROR
- if(H5Fclose(fileb) < 0) FAIL_STACK_ERROR
- } /* end for */
+ /* Verify file ID from datatype (from dataset) matches correct file */
+ type = H5Aget_type(attr);
+ type_fid = H5Iget_file_id(type);
+ if(type_fid != filea1) TEST_ERROR
+ H5Fclose(type_fid);
+ H5Tclose(type);
+
+ if(H5Aclose(attr) < 0) FAIL_STACK_ERROR
+
+ if(H5Fclose(filea1) < 0) FAIL_STACK_ERROR
+ if(H5Fclose(filea2) < 0) FAIL_STACK_ERROR
+ if(H5Fclose(fileb) < 0) FAIL_STACK_ERROR
+ } /* end high */
+ } /* end low */
if(H5Pclose(fapl2) < 0) FAIL_STACK_ERROR
@@ -7020,12 +7054,15 @@ test_delete_obj_named_fileid(hid_t fapl)
error:
H5E_BEGIN_TRY {
- H5Tclose(attr);
+ H5Aclose(attr);
+ H5Tclose(type);
H5Dclose(dset);
H5Pclose(fapl2);
H5Fclose(filea1);
H5Fclose(filea2);
H5Fclose(fileb);
+ H5Fclose(attr_fid);
+ H5Fclose(type_fid);
} H5E_END_TRY;
return 1;
} /* end test_delete_obj_named_fileid() */
@@ -7390,7 +7427,369 @@ error:
return 1;
}
+/*-------------------------------------------------------------------------
+ * Function: verify_version
+ *
+ * Purpose: Utility function to verify the datatype versions of nested
+ * datatype.
+ *
+ * Description:
+ * Verify the datatype message version
+ * --H5T_COMPOUND, H5T_ENUM, H5T_ARRAY:
+ * the library will set version according to low_bound
+ * --H5T_ARRAY:
+ * the earliest version the library will set is 2
+ * --H5T_INTEGER, H5T_FLOAT, H5T_TIME, H5T_STRING, H5T_BITFIELD,
+ * H5T_OPAQUE, H5T_REFERENCE:
+ * the library will only use basic version
+ *
+ *************************************************************************/
+static herr_t verify_version(hid_t dtype, H5F_libver_t low, unsigned *highest_version)
+{
+ hid_t base_dtype = -1;
+ hid_t mem_dtype = -1;
+ H5T_t *dtypep = NULL; /* Internal structure of a datatype */
+ H5T_class_t type_cls = H5T_NO_CLASS; /* Temporary var for datatype class */
+ int nmembers = 0;
+ unsigned i;
+ herr_t ret = SUCCEED; /* Generic return value */
+
+ dtypep = (H5T_t *)H5I_object(dtype);
+ if (dtypep == NULL) TEST_ERROR
+
+ /* Carry out the verification according to the class of the datatype.
+ For compound datatype, its members will be verified, recursively.
+ For array datatype, its element datatype will be verified, recursively.*/
+ type_cls = dtypep->shared->type;
+ switch (type_cls)
+ {
+ case H5T_ARRAY:
+ {
+ H5T_t *base_dtypep = NULL; /* Internal structure of a datatype */
+
+ if (low == H5F_LIBVER_EARLIEST)
+ VERIFY(dtypep->shared->version, H5O_DTYPE_VERSION_2, "H5O_dtype_ver_bounds");
+ else
+ VERIFY(dtypep->shared->version, H5O_dtype_ver_bounds[low], "H5O_dtype_ver_bounds");
+
+ /* Get the base datatype of this array type */
+ base_dtype = H5Tget_super(dtype);
+ CHECK(base_dtype, FAIL, "H5Tget_super");
+
+ /* Get the base type's internal structure for version */
+ base_dtypep = (H5T_t *)H5I_object(base_dtype);
+ if (base_dtypep == NULL) TEST_ERROR
+
+ /* Reset highest version if this datatype has higher version than
+ its outer type */
+ if (*highest_version < base_dtypep->shared->version)
+ *highest_version = base_dtypep->shared->version;
+
+ /* Verify the base datatype recursively */
+ ret = verify_version(base_dtype, low, highest_version);
+
+ /* Close the member datatype before checking for failure */
+ if ((H5Tclose(base_dtype)) < 0) TEST_ERROR
+
+ /* Check if verify_version fails */
+ if (ret < 0) TEST_ERROR
+
+ break;
+ }
+ case H5T_COMPOUND:
+ {
+ H5T_t *mem_dtypep = NULL; /* Internal structure of a datatype */
+ /* Get the number of members of this compound type */
+ if ((nmembers = H5Tget_nmembers(dtype)) < 0) TEST_ERROR
+
+ /* Go through all its member datatypes */
+ for (i = 0; i < (unsigned)nmembers; i++)
+ {
+ /* Get the member datatype to verify it recursively */
+ mem_dtype = H5Tget_member_type(dtype, i);
+ if (mem_dtype < 0) TEST_ERROR
+
+ /* Get the member type's internal structure for version */
+ mem_dtypep = (H5T_t *)H5I_object(mem_dtype);
+ if (mem_dtypep == NULL) TEST_ERROR
+
+ /* Reset highest version if this datatype has higher version than
+ its outer type */
+ if (*highest_version < mem_dtypep->shared->version)
+ *highest_version = mem_dtypep->shared->version;
+
+ /* Verify the datatype recursively */
+ ret = verify_version(mem_dtype, low, highest_version);
+
+ /* Close the member datatype before checking for failure */
+ if ((H5Tclose(mem_dtype)) < 0) TEST_ERROR
+
+ /* Check if verify_version fails */
+ if (ret < 0) TEST_ERROR
+ }
+ /* If this compound datatype contains a datatype of higher version, it
+ will be promoted to that version, thus, verify with highest version */
+ if (*highest_version > H5O_dtype_ver_bounds[low])
+ VERIFY(dtypep->shared->version, *highest_version, "verify_version");
+ else
+ VERIFY(dtypep->shared->version, H5O_dtype_ver_bounds[low], "verify_version");
+ break;
+ }
+ case H5T_ENUM:
+ VERIFY(dtypep->shared->version, H5O_dtype_ver_bounds[low], "verify_version");
+ break;
+ case H5T_VLEN:
+ case H5T_FLOAT:
+ case H5T_INTEGER:
+ VERIFY(dtypep->shared->version, H5O_dtype_ver_bounds[H5F_LIBVER_EARLIEST], "verify_version");
+ break;
+ case H5T_NCLASSES:
+ case H5T_NO_CLASS:
+ case H5T_TIME:
+ case H5T_STRING:
+ case H5T_BITFIELD:
+ case H5T_OPAQUE:
+ case H5T_REFERENCE:
+ default:
+ TEST_ERROR
+ } /* end switch */
+
+error:
+ H5E_BEGIN_TRY {
+ H5Tclose(base_dtype);
+ H5Tclose(mem_dtype);
+ } H5E_END_TRY;
+ return ret;
+} /* end of verify_version */
+
+
+/*-------------------------------------------------------------------------
+ * Function: test_versionbounds
+ *
+ * Purpose: Tests version bounds.
+ *
+ * Description:
+ * This function creates a datatype for a dataset as followed:
+ * outer_arr_type
+ * outer_cmp_type
+ * inner_cmp_type
+ * inner_arr_type
+ * simple_cmp_type
+ * H5T_NATIVE_INT
+ * H5T_ARRAY of H5T_NATIVE_CHAR
+ * vlen_floattype
+ * enum_type
+ * It then loops through all valid combination of the library version
+ * bounds to verify each datatype's version.
+ *
+ * Return: Success: 0
+ * Failure: number of errors
+ *
+ *-------------------------------------------------------------------------
+ */
+#define VERFNAME "tverbounds_dtype.h5"
+#define VERDSNAME "dataset 1"
+#define ARRAY_RANK 1
+#define ARRAY_LEN 10
+static int
+test_versionbounds(void)
+{
+ typedef struct { /* Struct for the simple compound type */
+ int single_int;
+ char char_arr[ARRAY_LEN];
+ } simple_cmp_t;
+
+ typedef struct { /* Struct for the inner compound type */
+ simple_cmp_t inner_arr[ARRAY_LEN];
+ hvl_t vlen_float;
+ } inner_cmp_t;
+
+ typedef struct { /* Struct for the outer compound type */
+ inner_cmp_t inner_cmp;
+ color_t enum_color;
+ } outer_cmp_t;
+
+ hid_t file = -1; /* File ID */
+ hid_t space = -1; /* Dataspace ID */
+ hid_t dset = -1; /* Dataset ID */
+ hid_t fcpl = -1; /* File creation property list ID */
+ hid_t fapl = -1; /* Copy of file access property list ID */
+ hid_t dcpl = -1; /* Dataset creation property list ID */
+ hid_t dset_dtype = -1; /* Dataset's datatype */
+ hid_t arr_chartype = -1; /* Array of characters datatype */
+ hid_t vlen_floattype = -1; /* Vlen of float datatype */
+ hid_t enum_type = -1; /* Enumeration datatype */
+ hid_t outer_cmp_type = -1; /* Outer compound datatype */
+ hid_t inner_cmp_type = -1; /* Inner compound datatype */
+ hid_t simple_cmp_type = -1;/* Simple cmpd dtype, contains no other cmpd */
+ hid_t outer_arr_type = -1; /* Outermost array datatype */
+ hid_t inner_arr_type = -1; /* Inner array datatype */
+ H5F_t *filep = NULL; /* Pointer to internal structure of a file */
+ H5T_t *dtypep = NULL; /* Pointer to internal structure of a datatype */
+ hsize_t arr_dim[] = {ARRAY_LEN}; /* Length of the array */
+ H5F_libver_t low, high; /* File format bounds */
+ unsigned highest_version; /* Highest version in nested datatypes */
+ color_t enum_val; /* Enum type index */
+ herr_t ret = 0; /* Generic return value */
+
+ TESTING("version bounds with nested datatypes");
+
+ /* Create a file access property list */
+ if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) TEST_ERROR
+
+ /* Create a file creation property list */
+ if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) TEST_ERROR
+
+ /* Create a scalar dataspace */
+ if ((space = H5Screate(H5S_SCALAR)) < 0) TEST_ERROR
+
+ /* Create a dataset creation property list */
+ if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) TEST_ERROR
+
+ /* Create an array datatype of chars */
+ arr_chartype = H5Tarray_create2(H5T_NATIVE_CHAR, ARRAY_RANK, arr_dim);
+ if (arr_chartype < 0) TEST_ERROR
+
+ /* Create the simple compound datatype that has an integer and an
+ array of chars */
+ simple_cmp_type = H5Tcreate(H5T_COMPOUND, sizeof(simple_cmp_t));
+ if (simple_cmp_type < 0) TEST_ERROR
+
+ /* Insert integer field */
+ ret = H5Tinsert(simple_cmp_type, "single_int", HOFFSET(simple_cmp_t, single_int), H5T_NATIVE_INT);
+ if (ret < 0) TEST_ERROR
+ /* Insert array field */
+ ret = H5Tinsert(simple_cmp_type, "char_arr", HOFFSET(simple_cmp_t, char_arr), arr_chartype);
+ if (ret < 0) TEST_ERROR
+
+ /* Create an array datatype containing simple compound datatype */
+ inner_arr_type = H5Tarray_create2(simple_cmp_type, ARRAY_RANK, arr_dim);
+ if (inner_arr_type < 0) TEST_ERROR
+
+ /* Create a VL datatype of floats */
+ vlen_floattype = H5Tvlen_create(H5T_NATIVE_FLOAT);
+ if (vlen_floattype < 0) TEST_ERROR
+
+ /* Create the innermost compound datatype that houses inner_arr_type and vlen_floattype */
+ inner_cmp_type = H5Tcreate(H5T_COMPOUND, sizeof(inner_cmp_t));
+ if (inner_cmp_type < 0) TEST_ERROR
+
+ /* Insert integer field */
+ ret = H5Tinsert(inner_cmp_type, "inner_arr", HOFFSET(inner_cmp_t, inner_arr), inner_arr_type);
+ if (ret < 0) TEST_ERROR
+
+ /* Insert integer field */
+ ret = H5Tinsert(inner_cmp_type, "vlen_float", HOFFSET(inner_cmp_t, vlen_float), vlen_floattype);
+ if (ret < 0) TEST_ERROR
+
+ /* Create a enumerate datatype */
+ enum_type = H5Tcreate(H5T_ENUM, sizeof(color_t));
+ if (enum_type < 0) TEST_ERROR
+
+ enum_val = E1_RED;
+ ret = H5Tenum_insert(enum_type, "RED", &enum_val);
+ if (ret < 0) TEST_ERROR
+
+ enum_val++;
+ ret = H5Tenum_insert(enum_type, "GREEN", &enum_val);
+ if (ret < 0) TEST_ERROR
+
+ enum_val++;
+ ret = H5Tenum_insert(enum_type, "BLUE", &enum_val);
+ if (ret < 0) TEST_ERROR
+
+ enum_val++;
+ ret = H5Tenum_insert(enum_type, "ORANGE", &enum_val);
+ if (ret < 0) TEST_ERROR
+
+ enum_val++;
+ ret = H5Tenum_insert(enum_type, "YELLOW", &enum_val);
+ if (ret < 0) TEST_ERROR
+
+ /* Create the outer compound datatype that contains the inner compound datatype and the enum datatype */
+ outer_cmp_type = H5Tcreate(H5T_COMPOUND, sizeof(outer_cmp_t));
+ if (ret < 0) TEST_ERROR
+
+ /* Insert integer field */
+ ret = H5Tinsert(outer_cmp_type, "inner_cmp", HOFFSET(outer_cmp_t, inner_cmp), inner_cmp_type);
+ if (ret < 0) TEST_ERROR
+
+ /* Insert enum field */
+ ret = H5Tinsert(outer_cmp_type, "enum_color", HOFFSET(outer_cmp_t, enum_color), enum_type);
+ if (ret < 0) TEST_ERROR
+
+ /* Create an array datatype containing the outer compound datatype */
+ if ((outer_arr_type = H5Tarray_create2(outer_cmp_type, ARRAY_RANK, arr_dim)) < 0)
+ TEST_ERROR
+
+ /* Loop through all the combinations of low/high library format bounds,
+ skipping invalid combinations */
+ /* Create the file, create and write to a dataset with compound datatype */
+ /* Verify the dataset's datatype and its members */
+ for(low = H5F_LIBVER_EARLIEST; low < H5F_LIBVER_NBOUNDS; low++) {
+ for(high = H5F_LIBVER_EARLIEST; high < H5F_LIBVER_NBOUNDS; high++) {
+
+ /* Set version bounds */
+ H5E_BEGIN_TRY {
+ ret = H5Pset_libver_bounds(fapl, low, high);
+ } H5E_END_TRY;
+
+ if (ret < 0) /* Invalid low/high combinations */
+ continue;
+
+ /* Create a file */
+ file = H5Fcreate(VERFNAME, H5F_ACC_TRUNC, fcpl, fapl);
+ if (file < 0) TEST_ERROR
+
+ /* Get the internal file pointer if the create succeeds */
+ if ((filep = (H5F_t *)H5I_object(file)) == NULL) TEST_ERROR
+
+ /* Create dataset using the array type */
+ dset = H5Dcreate2(file, VERDSNAME, outer_arr_type, space, H5P_DEFAULT, dcpl, H5P_DEFAULT);
+ if (dset < 0) TEST_ERROR
+
+ /* Get the dataset's datatype */
+ if ((dset_dtype = H5Dget_type(dset)) < 0) TEST_ERROR
+
+ /* Get the version of this datatype */
+ dtypep = (H5T_t *)H5I_object(dset_dtype);
+ if (dtypep == NULL) TEST_ERROR
+ highest_version = dtypep->shared->version;
+
+ /* Verify version of the datatype recursevily */
+ ret = verify_version(dset_dtype, low, &highest_version);
+
+ /* Close the dataset's datatype */
+ if (H5Tclose(dset_dtype) < 0) TEST_ERROR
+
+ /* Close dataset and file */
+ if (H5Dclose(dset) < 0) TEST_ERROR
+ if (H5Fclose(file) < 0) TEST_ERROR
+
+ } /* for high */
+ } /* for low */
+
+ /* Close dataspace and property lists */
+ if (H5Sclose(space) < 0) TEST_ERROR
+ if (H5Pclose(fcpl) < 0) TEST_ERROR
+ if (H5Pclose(fapl) < 0) TEST_ERROR
+
+ PASSED();
+ return 0;
+
+error:
+ H5E_BEGIN_TRY {
+ H5Dclose(dset);
+ H5Sclose(space);
+ H5Tclose(dset_dtype);
+ H5Pclose(dcpl);
+ H5Pclose(fcpl);
+ H5Pclose(fapl);
+ H5Fclose(file);
+ } H5E_END_TRY;
+ return 1;
+} /* end test_versionbounds() */
/*-------------------------------------------------------------------------
@@ -7413,7 +7812,7 @@ int
main(void)
{
long nerrors = 0;
- hid_t fapl = -1;
+ hid_t fapl = -1;
/* Set the random # seed */
HDsrandom((unsigned)HDtime(NULL));
@@ -7430,7 +7829,6 @@ main(void)
nerrors += test_detect();
nerrors += test_compound_1();
nerrors += test_query();
-
nerrors += test_transient(fapl);
nerrors += test_named(fapl);
nerrors += test_encode();
@@ -7475,6 +7873,7 @@ main(void)
nerrors += test_opaque();
nerrors += test_set_order();
nerrors += test_utf_ascii_conv();
+ nerrors += test_versionbounds();
if(nerrors) {
printf("***** %lu FAILURE%s! *****\n",
diff --git a/test/dynlib1.c b/test/dynlib1.c
deleted file mode 100644
index 1ccc33a..0000000
--- a/test/dynlib1.c
+++ /dev/null
@@ -1,97 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group. *
- * All rights reserved. *
- * *
- * This file is part of HDF5. The full HDF5 copyright notice, including *
- * terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic document set and is *
- * linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have access *
- * to either file, you may request a copy from help@hdfgroup.org. *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/*
- * Programmer: Raymond Lu
- * 13 February 2013
- *
- * Purpose: Tests the plugin module (H5PL)
- */
-
-#include <stdlib.h>
-#include <stdio.h>
-#include "H5PLextern.h"
-
-#define H5Z_FILTER_DYNLIB1 257
-
-static size_t H5Z_filter_dynlib1(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_DYNLIB1[1] = {{
- H5Z_CLASS_T_VERS, /* H5Z_class_t version */
- H5Z_FILTER_DYNLIB1, /* Filter id number */
- 1, 1, /* Encoding and decoding enabled */
- "dynlib1", /* Filter name for debugging */
- NULL, /* The "can apply" callback */
- NULL, /* The "set local" callback */
- (H5Z_func_t)H5Z_filter_dynlib1, /* The actual filter function */
-}};
-
-H5PL_type_t H5PLget_plugin_type(void) {return H5PL_TYPE_FILTER;}
-const void *H5PLget_plugin_info(void) {return H5Z_DYNLIB1;}
-
-/*-------------------------------------------------------------------------
- * Function: H5Z_filter_dynlib1
- *
- * Purpose: A dynlib1 filter method that adds on and subtract from
- * the original value with another value. It will be built
- * as a shared library. plugin.c test will load and use
- * this filter library.
- *
- * Return: Success: Data chunk size
- *
- * Failure: 0
- *
- * Programmer: Raymond Lu
- * 29 March 2013
- *
- *-------------------------------------------------------------------------
- */
-static size_t
-H5Z_filter_dynlib1(unsigned int flags, size_t cd_nelmts,
- const unsigned int *cd_values, size_t nbytes,
- size_t *buf_size, void **buf)
-{
- int *int_ptr = (int *)*buf; /* Pointer to the data values */
- size_t buf_left = *buf_size; /* Amount of data buffer left to process */
- int add_on = 0;
-
- /* Check for the correct number of parameters */
- if(cd_nelmts == 0)
- return(0);
-
- /* Check that permanent parameters are set correctly */
- if(cd_values[0] > 9)
- return(0);
-
- add_on = (int)cd_values[0];
-
- if(flags & H5Z_FLAG_REVERSE) { /*read*/
- /* Substract the "add on" value to all the data values */
- while(buf_left > 0) {
- *int_ptr++ -= add_on;
- buf_left -= sizeof(int);
- } /* end while */
- } /* end if */
- else { /*write*/
- /* Add the "add on" value to all the data values */
- while(buf_left > 0) {
- *int_ptr++ += add_on;
- buf_left -= sizeof(int);
- } /* end while */
- } /* end else */
-
- return nbytes;
-} /* end H5Z_filter_dynlib1() */
-
diff --git a/test/dynlib2.c b/test/dynlib2.c
deleted file mode 100644
index 0d8be2b..0000000
--- a/test/dynlib2.c
+++ /dev/null
@@ -1,94 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group. *
- * All rights reserved. *
- * *
- * This file is part of HDF5. The full HDF5 copyright notice, including *
- * terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic document set and is *
- * linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have access *
- * to either file, you may request a copy from help@hdfgroup.org. *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/*
- * Programmer: Raymond Lu
- * 13 February 2013
- *
- * Purpose: Tests the plugin module (H5PL)
- */
-
-#include <stdlib.h>
-#include <stdio.h>
-#include "H5PLextern.h"
-
-#define H5Z_FILTER_DYNLIB2 258
-#define MULTIPLIER 3
-
-static size_t H5Z_filter_dynlib2(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_DYNLIB2[1] = {{
- H5Z_CLASS_T_VERS, /* H5Z_class_t version */
- H5Z_FILTER_DYNLIB2, /* Filter id number */
- 1, 1, /* Encoding and decoding enabled */
- "dynlib2", /* Filter name for debugging */
- NULL, /* The "can apply" callback */
- NULL, /* The "set local" callback */
- (H5Z_func_t)H5Z_filter_dynlib2, /* The actual filter function */
-}};
-
-H5PL_type_t H5PLget_plugin_type(void) {return H5PL_TYPE_FILTER;}
-const void *H5PLget_plugin_info(void) {return H5Z_DYNLIB2;}
-
-/*-------------------------------------------------------------------------
- * Function: H5Z_filter_dynlib2
- *
- * Purpose: A dynlib2 filter method that multiplies the original value
- * during write and divide the original value during read. It
- * will be built as a shared library. plugin.c test will load
- * and use this filter library.
- *
- * Return: Success: Data chunk size
- *
- * Failure: 0
- *
- * Programmer: Raymond Lu
- * 29 March 2013
- *
- *-------------------------------------------------------------------------
- */
-static size_t
-H5Z_filter_dynlib2(unsigned int flags, size_t cd_nelmts,
- const unsigned int *cd_values, size_t nbytes,
- size_t *buf_size, void **buf)
-{
- int *int_ptr = (int *)*buf; /* Pointer to the data values */
- size_t buf_left = *buf_size; /* Amount of data buffer left to process */
-
- /* Check for the correct number of parameters */
- if(cd_nelmts > 0)
- return(0);
-
- /* Assignment to eliminate unused parameter warning. */
- cd_values = cd_values;
-
- if(flags & H5Z_FLAG_REVERSE) { /*read*/
- /* Divide the original value with MULTIPLIER */
- while(buf_left > 0) {
- *int_ptr++ /= MULTIPLIER;
- buf_left -= sizeof(int);
- } /* end while */
- } /* end if */
- else { /*write*/
- /* Multiply the original value with MULTIPLIER */
- while(buf_left > 0) {
- *int_ptr++ *= MULTIPLIER;
- buf_left -= sizeof(int);
- } /* end while */
- } /* end else */
-
- return nbytes;
-} /* end H5Z_filter_dynlib2() */
-
diff --git a/test/dynlib3.c b/test/dynlib3.c
deleted file mode 100644
index e509a52..0000000
--- a/test/dynlib3.c
+++ /dev/null
@@ -1,105 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group. *
- * All rights reserved. *
- * *
- * This file is part of HDF5. The full HDF5 copyright notice, including *
- * terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic document set and is *
- * linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have access *
- * to either file, you may request a copy from help@hdfgroup.org. *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/*
- * Programmer: Raymond Lu
- * 1 April 2013
- *
- * Purpose: Tests the plugin module (H5PL)
- */
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include "H5PLextern.h"
-
-#define H5Z_FILTER_DYNLIB3 259
-#define SUFFIX_LEN 8
-#define GROUP_SUFFIX ".h5group"
-
-static size_t H5Z_filter_dynlib3(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_DYNLIB3[1] = {{
- H5Z_CLASS_T_VERS, /* H5Z_class_t version */
- H5Z_FILTER_DYNLIB3, /* Filter id number */
- 1, 1, /* Encoding and decoding enabled */
- "dynlib3", /* Filter name for debugging */
- NULL, /* The "can apply" callback */
- NULL, /* The "set local" callback */
- (H5Z_func_t)H5Z_filter_dynlib3, /* The actual filter function */
-}};
-
-H5PL_type_t H5PLget_plugin_type(void) {return H5PL_TYPE_FILTER;}
-const void *H5PLget_plugin_info(void) {return H5Z_DYNLIB3;}
-
-/*-------------------------------------------------------------------------
- * Function: H5Z_filter_dynlib3
- *
- * Purpose: A dynlib3 filter method that is used to test groups. It
- * appends the suffix ".h5group" to each group name during
- * write and takes it out during read.
- *
- * Return: Success: Data chunk size
- *
- * Failure: 0
- *
- * Programmer: Raymond Lu
- * 1 April 2013
- *
- *-------------------------------------------------------------------------
- */
-static size_t
-H5Z_filter_dynlib3(unsigned int flags, size_t cd_nelmts,
- const unsigned int *cd_values, size_t nbytes,
- size_t *buf_size, void **buf)
-{
- size_t ret_value; /* Return value */
-
- /* Check for the correct number of parameters */
- if(cd_nelmts > 0)
- return(0);
-
- /* Assignment to eliminate unused parameter warning. */
- cd_values = cd_values;
-
- if(flags & H5Z_FLAG_REVERSE) { /*read*/
- ret_value = *buf_size = nbytes - SUFFIX_LEN;
- } /* end if */
- else { /*write*/
- void *outbuf = NULL; /* Pointer to new buffer */
- unsigned char *dst; /* Temporary pointer to destination buffer */
-
- dst = (unsigned char *)(outbuf = H5allocate_memory(nbytes + SUFFIX_LEN, 0));
-
- /* Copy raw data */
- memcpy((void*)dst, (void*)(*buf), nbytes);
-
- /* Append suffix to raw data for storage */
- dst += nbytes;
- memcpy(dst, (void*)GROUP_SUFFIX, SUFFIX_LEN);
-
- /* Free input buffer */
- H5free_memory(*buf);
-
- /* Set return values */
- *buf_size = nbytes + SUFFIX_LEN;
- *buf = outbuf;
- outbuf = NULL;
- ret_value = *buf_size;
- } /* end else */
-
- return ret_value;
-} /* H5Z_filter_dynlib3() */
-
diff --git a/test/dynlib4.c b/test/dynlib4.c
deleted file mode 100644
index 8da0270..0000000
--- a/test/dynlib4.c
+++ /dev/null
@@ -1,104 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group. *
- * All rights reserved. *
- * *
- * This file is part of HDF5. The full HDF5 copyright notice, including *
- * terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic document set and is *
- * linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have access *
- * to either file, you may request a copy from help@hdfgroup.org. *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/*
- * Purpose: Tests the plugin module (H5PL)
- */
-
-#include <stdlib.h>
-#include <stdio.h>
-#include "H5PLextern.h"
-
-#define H5Z_FILTER_DYNLIB4 260
-
-#define PUSH_ERR(func, minor, str) H5Epush2(H5E_DEFAULT, __FILE__, func, __LINE__, H5E_ERR_CLS, H5E_PLUGIN, minor, str)
-
-static size_t H5Z_filter_dynlib4(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_DYNLIB4[1] = {{
- H5Z_CLASS_T_VERS, /* H5Z_class_t version */
- H5Z_FILTER_DYNLIB4, /* Filter id number */
- 1, 1, /* Encoding and decoding enabled */
- "dynlib4", /* Filter name for debugging */
- NULL, /* The "can apply" callback */
- NULL, /* The "set local" callback */
- (H5Z_func_t)H5Z_filter_dynlib4, /* The actual filter function */
-}};
-
-H5PL_type_t H5PLget_plugin_type(void) {return H5PL_TYPE_FILTER;}
-const void *H5PLget_plugin_info(void) {return H5Z_DYNLIB4;}
-
-/*-------------------------------------------------------------------------
- * Function: H5Z_filter_dynlib4
- *
- * Purpose: A dynlib4 filter method that adds on and subtract from
- * the original value with another value. It will be built
- * as a shared library. plugin.c test will load and use
- * this filter library. Designed to call a HDF function.
- *
- * Return: Success: Data chunk size
- *
- * Failure: 0
- *
- *-------------------------------------------------------------------------
- */
-static size_t
-H5Z_filter_dynlib4(unsigned int flags, size_t cd_nelmts,
- const unsigned int *cd_values, size_t nbytes,
- size_t *buf_size, void **buf)
-{
- int *int_ptr = (int *)*buf; /* Pointer to the data values */
- size_t buf_left = *buf_size; /* Amount of data buffer left to process */
- int add_on = 0;
- unsigned ver_info[3];
-
- /* Check for the library version */
- if(H5get_libversion(&ver_info[0], &ver_info[1], &ver_info[2]) < 0) {
- PUSH_ERR("dynlib4", H5E_CALLBACK, "H5get_libversion");
- return(0);
- }
- /* Check for the correct number of parameters */
- if(cd_nelmts == 0)
- return(0);
-
- /* Check that permanent parameters are set correctly */
- if(cd_values[0] > 9)
- return(0);
-
- if(ver_info[0] != cd_values[1] || ver_info[1] != cd_values[2]) {
- PUSH_ERR("dynlib4", H5E_CALLBACK, "H5get_libversion does not match");
- return(0);
- }
-
- add_on = (int)cd_values[0];
-
- if(flags & H5Z_FLAG_REVERSE) { /*read*/
- /* Substract the "add on" value to all the data values */
- while(buf_left > 0) {
- *int_ptr++ -= add_on;
- buf_left -= sizeof(int);
- } /* end while */
- } /* end if */
- else { /*write*/
- /* Add the "add on" value to all the data values */
- while(buf_left > 0) {
- *int_ptr++ += add_on;
- buf_left -= sizeof(int);
- } /* end while */
- } /* end else */
-
- return nbytes;
-} /* end H5Z_filter_dynlib4() */
-
diff --git a/test/earray.c b/test/earray.c
index c6f5986..d72b3f5 100644
--- a/test/earray.c
+++ b/test/earray.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* Programmer: Quincey Koziol <koziol@hdfgroup.org>
@@ -27,6 +25,7 @@
#include "H5EApkg.h" /* Extensible Arrays */
/* Other private headers that this test requires */
+#include "H5CXprivate.h" /* API Contexts */
#include "H5Iprivate.h" /* IDs */
#include "H5VMprivate.h" /* Vectors and arrays */
@@ -408,7 +407,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-reopen_file(hid_t *file, H5F_t **f, hid_t fapl, hid_t dxpl,
+reopen_file(hid_t *file, H5F_t **f, hid_t fapl,
H5EA_t **ea, haddr_t ea_addr, const earray_test_param_t *tparam)
{
/* Check for closing & re-opening the array */
@@ -416,7 +415,7 @@ reopen_file(hid_t *file, H5F_t **f, hid_t fapl, hid_t dxpl,
if(tparam->reopen_array) {
/* Close array, if given */
if(ea && *ea) {
- if(H5EA_close(*ea, dxpl) < 0)
+ if(H5EA_close(*ea) < 0)
FAIL_STACK_ERROR
*ea = NULL;
} /* end if */
@@ -443,7 +442,7 @@ reopen_file(hid_t *file, H5F_t **f, hid_t fapl, hid_t dxpl,
/* Re-open array, if given */
if(ea)
- if(NULL == (*ea = H5EA_open(*f, dxpl, ea_addr, NULL)))
+ if(NULL == (*ea = H5EA_open(*f, ea_addr, NULL)))
FAIL_STACK_ERROR
} /* end if */
@@ -469,14 +468,14 @@ error:
*-------------------------------------------------------------------------
*/
static int
-create_array(H5F_t *f, hid_t dxpl, const H5EA_create_t *cparam,
+create_array(H5F_t *f, const H5EA_create_t *cparam,
H5EA_t **ea, haddr_t *ea_addr, H5EA__ctx_cb_t *cb)
{
hsize_t nelmts; /* Number of elements in array */
earray_state_t state; /* State of extensible array */
/* Create array */
- if(NULL == (*ea = H5EA_create(f, dxpl, cparam, cb)))
+ if(NULL == (*ea = H5EA_create(f, cparam, cb)))
FAIL_STACK_ERROR
/* Check status of array */
@@ -557,7 +556,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, H5AC_ind_read_dxpl_id) < 0)
+ if(H5EA_close(ea) < 0)
FAIL_STACK_ERROR
#ifdef QAK
@@ -567,7 +566,7 @@ HDsystem("cp earray.h5 earray.h5.save");
#endif /* QAK */
/* Delete array */
- if(H5EA_delete(f, H5AC_ind_read_dxpl_id, ea_addr, NULL) < 0)
+ if(H5EA_delete(f, ea_addr, NULL) < 0)
FAIL_STACK_ERROR
/* Close the file */
@@ -629,11 +628,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, H5AC_ind_read_dxpl_id, &test_cparam, NULL);
+ ea = H5EA_create(f, &test_cparam, NULL);
} H5E_END_TRY;
if(ea) {
/* Close opened extensible array */
- H5EA_close(ea, H5AC_ind_read_dxpl_id);
+ H5EA_close(ea);
ea = NULL;
/* Indicate error */
@@ -644,11 +643,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, H5AC_ind_read_dxpl_id, &test_cparam, NULL);
+ ea = H5EA_create(f, &test_cparam, NULL);
} H5E_END_TRY;
if(ea) {
/* Close opened extensible array */
- H5EA_close(ea, H5AC_ind_read_dxpl_id);
+ H5EA_close(ea);
ea = NULL;
/* Indicate error */
@@ -658,11 +657,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, H5AC_ind_read_dxpl_id, &test_cparam, NULL);
+ ea = H5EA_create(f, &test_cparam, NULL);
} H5E_END_TRY;
if(ea) {
/* Close opened extensible array */
- H5EA_close(ea, H5AC_ind_read_dxpl_id);
+ H5EA_close(ea);
ea = NULL;
/* Indicate error */
@@ -673,11 +672,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, H5AC_ind_read_dxpl_id, &test_cparam, NULL);
+ ea = H5EA_create(f, &test_cparam, NULL);
} H5E_END_TRY;
if(ea) {
/* Close opened extensible array */
- H5EA_close(ea, H5AC_ind_read_dxpl_id);
+ H5EA_close(ea);
ea = NULL;
/* Indicate error */
@@ -686,11 +685,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, H5AC_ind_read_dxpl_id, &test_cparam, NULL);
+ ea = H5EA_create(f, &test_cparam, NULL);
} H5E_END_TRY;
if(ea) {
/* Close opened extensible array */
- H5EA_close(ea, H5AC_ind_read_dxpl_id);
+ H5EA_close(ea);
ea = NULL;
/* Indicate error */
@@ -699,11 +698,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, H5AC_ind_read_dxpl_id, &test_cparam, NULL);
+ ea = H5EA_create(f, &test_cparam, NULL);
} H5E_END_TRY;
if(ea) {
/* Close opened extensible array */
- H5EA_close(ea, H5AC_ind_read_dxpl_id);
+ H5EA_close(ea);
ea = NULL;
/* Indicate error */
@@ -714,11 +713,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, H5AC_ind_read_dxpl_id, &test_cparam, NULL);
+ ea = H5EA_create(f, &test_cparam, NULL);
} H5E_END_TRY;
if(ea) {
/* Close opened extensible array */
- H5EA_close(ea, H5AC_ind_read_dxpl_id);
+ H5EA_close(ea);
ea = NULL;
/* Indicate error */
@@ -730,11 +729,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, H5AC_ind_read_dxpl_id, &test_cparam, NULL);
+ ea = H5EA_create(f, &test_cparam, NULL);
} H5E_END_TRY;
if(ea) {
/* Close opened extensible array */
- H5EA_close(ea, H5AC_ind_read_dxpl_id);
+ H5EA_close(ea);
ea = NULL;
/* Indicate error */
@@ -744,11 +743,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, H5AC_ind_read_dxpl_id, &test_cparam, NULL);
+ ea = H5EA_create(f, &test_cparam, NULL);
} H5E_END_TRY;
if(ea) {
/* Close opened extensible array */
- H5EA_close(ea, H5AC_ind_read_dxpl_id);
+ H5EA_close(ea);
ea = NULL;
/* Indicate error */
@@ -757,11 +756,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, H5AC_ind_read_dxpl_id, &test_cparam, NULL);
+ ea = H5EA_create(f, &test_cparam, NULL);
} H5E_END_TRY;
if(ea) {
/* Close opened extensible array */
- H5EA_close(ea, H5AC_ind_read_dxpl_id);
+ H5EA_close(ea);
ea = NULL;
/* Indicate error */
@@ -781,7 +780,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, H5AC_ind_read_dxpl_id, cparam, &ea, &ea_addr, NULL) < 0)
+ if(create_array(f, cparam, &ea, &ea_addr, NULL) < 0)
TEST_ERROR
PASSED()
@@ -805,7 +804,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, H5AC_ind_read_dxpl_id);
+ H5EA_close(ea);
H5Fclose(file);
} H5E_END_TRY;
@@ -844,19 +843,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, H5AC_ind_read_dxpl_id, cparam, &ea, &ea_addr, NULL) < 0)
+ if(create_array(f, cparam, &ea, &ea_addr, NULL) < 0)
TEST_ERROR
/* Close the extensible array */
- if(H5EA_close(ea, H5AC_ind_read_dxpl_id) < 0)
+ if(H5EA_close(ea) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the file */
- if(reopen_file(&file, &f, fapl, H5AC_ind_read_dxpl_id, NULL, HADDR_UNDEF, tparam) < 0)
+ if(reopen_file(&file, &f, fapl, NULL, HADDR_UNDEF, tparam) < 0)
TEST_ERROR
/* Re-open the array */
- if(NULL == (ea = H5EA_open(f, H5AC_ind_read_dxpl_id, ea_addr, NULL)))
+ if(NULL == (ea = H5EA_open(f, ea_addr, NULL)))
FAIL_STACK_ERROR
/* Verify the creation parameters */
@@ -875,7 +874,7 @@ test_reopen(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam)
error:
H5E_BEGIN_TRY {
if(ea)
- H5EA_close(ea, H5AC_ind_read_dxpl_id);
+ H5EA_close(ea);
H5Fclose(file);
} H5E_END_TRY;
@@ -917,11 +916,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, H5AC_ind_read_dxpl_id, cparam, &ea, &ea_addr, NULL) < 0)
+ if(create_array(f, cparam, &ea, &ea_addr, NULL) < 0)
TEST_ERROR
/* Open the array again, through the first file handle */
- if(NULL == (ea2 = H5EA_open(f, H5AC_ind_read_dxpl_id, ea_addr, NULL)))
+ if(NULL == (ea2 = H5EA_open(f, ea_addr, NULL)))
FAIL_STACK_ERROR
/* Verify the creation parameters */
@@ -931,12 +930,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, H5AC_ind_read_dxpl_id) < 0)
+ if(H5EA_close(ea2) < 0)
FAIL_STACK_ERROR
ea2 = NULL;
/* Check for closing & re-opening the file */
- if(reopen_file(&file, &f, fapl, H5AC_ind_read_dxpl_id, &ea, ea_addr, tparam) < 0)
+ if(reopen_file(&file, &f, fapl, &ea, ea_addr, tparam) < 0)
TEST_ERROR
/* Re-open the file */
@@ -948,7 +947,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, H5AC_ind_read_dxpl_id, ea_addr, NULL)))
+ if(NULL == (ea2 = H5EA_open(f2, ea_addr, NULL)))
FAIL_STACK_ERROR
/* Verify the creation parameters */
@@ -956,7 +955,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, H5AC_ind_read_dxpl_id) < 0)
+ if(H5EA_close(ea) < 0)
FAIL_STACK_ERROR
ea = NULL;
@@ -979,9 +978,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, H5AC_ind_read_dxpl_id);
+ H5EA_close(ea);
if(ea2)
- H5EA_close(ea2, H5AC_ind_read_dxpl_id);
+ H5EA_close(ea2);
H5Fclose(file);
H5Fclose(file2);
} H5E_END_TRY;
@@ -1029,11 +1028,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, H5AC_ind_read_dxpl_id, cparam, &ea, &ea_addr, NULL) < 0)
+ if(create_array(f, cparam, &ea, &ea_addr, NULL) < 0)
TEST_ERROR
/* Open the array again, through the first file handle */
- if(NULL == (ea2 = H5EA_open(f, H5AC_ind_read_dxpl_id, ea_addr, NULL)))
+ if(NULL == (ea2 = H5EA_open(f, ea_addr, NULL)))
FAIL_STACK_ERROR
/* Verify the creation parameters */
@@ -1043,7 +1042,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, H5AC_ind_read_dxpl_id) < 0)
+ if(H5EA_close(ea2) < 0)
FAIL_STACK_ERROR
ea2 = NULL;
@@ -1055,7 +1054,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, H5AC_ind_read_dxpl_id, &ea, ea_addr, tparam) < 0)
+ if(reopen_file(&file, &f, fapl, &ea, ea_addr, tparam) < 0)
TEST_ERROR
/* Verify the creation parameters */
@@ -1063,7 +1062,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, H5AC_ind_read_dxpl_id) < 0)
+ if(H5EA_close(ea) < 0)
FAIL_STACK_ERROR
ea = NULL;
@@ -1094,7 +1093,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, H5AC_ind_read_dxpl_id, ea_addr, NULL)))
+ if(NULL == (ea2 = H5EA_open(f2, ea_addr, NULL)))
FAIL_STACK_ERROR
/* Verify the creation parameters */
@@ -1119,9 +1118,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, H5AC_ind_read_dxpl_id);
+ H5EA_close(ea);
if(ea2)
- H5EA_close(ea2, H5AC_ind_read_dxpl_id);
+ H5EA_close(ea2);
H5Fclose(file);
H5Fclose(file2);
H5Fclose(file0);
@@ -1165,15 +1164,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, H5AC_ind_read_dxpl_id, cparam, &ea, &ea_addr, NULL) < 0)
+ if(create_array(f, cparam, &ea, &ea_addr, NULL) < 0)
TEST_ERROR
/* Open the array again */
- if(NULL == (ea2 = H5EA_open(f, H5AC_ind_read_dxpl_id, ea_addr, NULL)))
+ if(NULL == (ea2 = H5EA_open(f, ea_addr, NULL)))
FAIL_STACK_ERROR
/* Request that the array be deleted */
- if(H5EA_delete(f, H5AC_ind_read_dxpl_id, ea_addr, NULL) < 0)
+ if(H5EA_delete(f, ea_addr, NULL) < 0)
FAIL_STACK_ERROR
/* Verify the creation parameters */
@@ -1183,38 +1182,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, H5AC_ind_read_dxpl_id) < 0)
+ if(H5EA_close(ea2) < 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, H5AC_ind_read_dxpl_id, ea_addr, NULL);
+ ea2 = H5EA_open(f, ea_addr, NULL);
} H5E_END_TRY;
if(ea2) {
/* Close opened array */
- H5EA_close(ea2, H5AC_ind_read_dxpl_id);
+ H5EA_close(ea2);
/* Indicate error */
TEST_ERROR
} /* end if */
/* Close the first extensible array wrapper */
- if(H5EA_close(ea, H5AC_ind_read_dxpl_id) < 0)
+ if(H5EA_close(ea) < 0)
FAIL_STACK_ERROR
ea = NULL;
/* Check for closing & re-opening the file */
- if(reopen_file(&file, &f, fapl, H5AC_ind_read_dxpl_id, NULL, HADDR_UNDEF, tparam) < 0)
+ if(reopen_file(&file, &f, fapl, 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, H5AC_ind_read_dxpl_id, ea_addr, NULL);
+ ea = H5EA_open(f, ea_addr, NULL);
} H5E_END_TRY;
if(ea) {
/* Close opened array */
- H5EA_close(ea, H5AC_ind_read_dxpl_id);
+ H5EA_close(ea);
/* Indicate error */
TEST_ERROR
@@ -1240,9 +1239,9 @@ test_delete_open(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam)
error:
H5E_BEGIN_TRY {
if(ea)
- H5EA_close(ea, H5AC_ind_read_dxpl_id);
+ H5EA_close(ea);
if(ea2)
- H5EA_close(ea2, H5AC_ind_read_dxpl_id);
+ H5EA_close(ea2);
H5Fclose(file);
} H5E_END_TRY;
@@ -2113,7 +2112,7 @@ test_set_elmts(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam,
TEST_ERROR
/* Create array */
- if(create_array(f, H5AC_ind_read_dxpl_id, cparam, &ea, &ea_addr, NULL) < 0)
+ if(create_array(f, cparam, &ea, &ea_addr, NULL) < 0)
TEST_ERROR
/* Verify the creation parameters */
@@ -2121,7 +2120,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, H5AC_ind_read_dxpl_id, &ea, ea_addr, tparam) < 0)
+ if(reopen_file(&file, &f, fapl, &ea, ea_addr, tparam) < 0)
TEST_ERROR
/* Verify high-water # of elements written */
@@ -2152,7 +2151,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, H5AC_ind_read_dxpl_id, idx, &relmt) < 0)
+ if(H5EA_get(ea, idx, &relmt) < 0)
FAIL_STACK_ERROR
/* Verify element is fill value for array */
@@ -2180,7 +2179,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, H5AC_ind_read_dxpl_id, idx, &relmt) < 0)
+ if(H5EA_get(ea, idx, &relmt) < 0)
FAIL_STACK_ERROR
/* Verify element is fill value for array */
@@ -2189,7 +2188,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, H5AC_ind_read_dxpl_id, idx, &welmt) < 0)
+ if(H5EA_set(ea, idx, &welmt) < 0)
FAIL_STACK_ERROR
/* Get the max. array index */
@@ -2217,7 +2216,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, H5AC_ind_read_dxpl_id, idx, &relmt) < 0)
+ if(H5EA_get(ea, idx, &relmt) < 0)
FAIL_STACK_ERROR
/* Verify element is value written */
@@ -2241,7 +2240,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, H5AC_ind_read_dxpl_id);
+ H5EA_close(ea);
H5Fclose(file);
} H5E_END_TRY;
@@ -2287,7 +2286,7 @@ test_skip_elmts(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam,
TEST_ERROR
/* Create array */
- if(create_array(f, H5AC_ind_read_dxpl_id, cparam, &ea, &ea_addr, NULL) < 0)
+ if(create_array(f, cparam, &ea, &ea_addr, NULL) < 0)
TEST_ERROR
/* Verify the creation parameters */
@@ -2295,7 +2294,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, H5AC_ind_read_dxpl_id, &ea, ea_addr, tparam) < 0)
+ if(reopen_file(&file, &f, fapl, &ea, ea_addr, tparam) < 0)
TEST_ERROR
/* Verify high-water # of elements written */
@@ -2316,7 +2315,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, H5AC_ind_read_dxpl_id, idx, &relmt) < 0)
+ if(H5EA_get(ea, idx, &relmt) < 0)
FAIL_STACK_ERROR
/* Verify element is fill value for array */
@@ -2325,7 +2324,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, H5AC_ind_read_dxpl_id, idx, &welmt) < 0)
+ if(H5EA_set(ea, idx, &welmt) < 0)
FAIL_STACK_ERROR
/* Verify high-water # of elements written */
@@ -2367,7 +2366,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, H5AC_ind_read_dxpl_id, idx, &relmt) < 0)
+ if(H5EA_get(ea, idx, &relmt) < 0)
FAIL_STACK_ERROR
/* Verify element is value written */
@@ -2378,7 +2377,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, H5AC_ind_read_dxpl_id, cnt, &relmt) < 0)
+ if(H5EA_get(ea, cnt, &relmt) < 0)
FAIL_STACK_ERROR
/* Verify element is fill value for array */
@@ -2398,7 +2397,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, H5AC_ind_read_dxpl_id);
+ H5EA_close(ea);
H5Fclose(file);
} H5E_END_TRY;
@@ -2430,6 +2429,7 @@ main(void)
unsigned nerrors = 0; /* Cumulative error count */
time_t curr_time; /* Current time, for seeding random number generator */
int ExpressMode; /* Test express value */
+ hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
/* Reset library */
h5_reset();
@@ -2441,6 +2441,10 @@ main(void)
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename_g, sizeof(filename_g));
+ /* Push API context */
+ if(H5CX_push() < 0) FAIL_STACK_ERROR
+ api_ctx_pushed = TRUE;
+
/* Seed random #'s */
curr_time = HDtime(NULL);
HDsrandom((unsigned)curr_time);
@@ -2587,6 +2591,10 @@ main(void)
/* Verify symbol table messages are cached */
nerrors += (h5_verify_cached_stabs(FILENAME, fapl) < 0 ? 1 : 0);
+ /* Pop API context */
+ if(api_ctx_pushed && H5CX_pop() < 0) FAIL_STACK_ERROR
+ api_ctx_pushed = FALSE;
+
if(nerrors)
goto error;
HDputs("All extensible array tests passed.");
@@ -2603,6 +2611,8 @@ error:
H5Pclose(fapl);
} H5E_END_TRY;
+ if(api_ctx_pushed) H5CX_pop();
+
return 1;
} /* end main() */
diff --git a/test/efc.c b/test/efc.c
index 57a600d..d40d4a2 100644
--- a/test/efc.c
+++ b/test/efc.c
@@ -4,12 +4,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* Programmer: Neil Fortner
@@ -20,6 +18,7 @@
#define H5F_FRIEND /*suppress error about including H5Fpkg */
#include "H5Fpkg.h"
+#include "H5CXprivate.h" /* API Contexts */
#include "H5Iprivate.h"
const char *FILENAME[] = {
@@ -39,7 +38,6 @@ static char filename[6][1024];
* internal functions */
hid_t fcpl_id = -1;
hid_t fapl_id = -1;
-hid_t dxpl_id = -1;
/*-------------------------------------------------------------------------
@@ -71,14 +69,13 @@ test_single(void)
TESTING("single EFC");
/* Set EFC size to 3. Do this instead of H5F_efc_create() so we can pass
- * a file pointer to H5F_efc_open containing the EFC. */
+ * a file pointer to H5F__efc_open containing the EFC. */
if(H5Pset_elink_file_cache_size(fapl_id, 3) < 0)
TEST_ERROR
/* Open parent file */
if(NULL == (f0 = H5F_open(filename[0],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
/* Disable EFC for child files */
@@ -89,18 +86,16 @@ test_single(void)
/* Test 1: Open file 1 through EFC, close, then open normally, verify ref
* count = 2, release EFC, verify ref count = 1. Verifies a file can be
* held open by the EFC. */
- if(NULL == (f1 = H5F_efc_open(f0, filename[1],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f1 = H5F__efc_open(f0, filename[1],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f0, f1) < 0)
FAIL_STACK_ERROR
- if(NULL == (ftmp1 = H5F_open(filename[1], H5F_ACC_RDWR, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (ftmp1 = H5F_open(filename[1], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(ftmp1->shared->nrefs != 2)
TEST_ERROR
- if(H5F_efc_release(f0->shared->efc) < 0)
+ if(H5F__efc_release(f0->shared->efc) < 0)
FAIL_STACK_ERROR
if(ftmp1->shared->nrefs != 1)
TEST_ERROR
@@ -111,15 +106,13 @@ test_single(void)
/* Test 2: Verify that subsequent efc_open requests return the cached top
* level file pointer. Open file 1 through EFC, close, open again, verify
* file pointers are the same. */
- if(NULL == (f1 = H5F_efc_open(f0, filename[1],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f1 = H5F__efc_open(f0, filename[1],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
ftmp1 = f1;
if(H5F_efc_close(f0, f1) < 0)
FAIL_STACK_ERROR
- if(NULL == (f1 = H5F_efc_open(f0, filename[1], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f1 != ftmp1)
TEST_ERROR
@@ -127,7 +120,7 @@ test_single(void)
TEST_ERROR
if(H5F_efc_close(f0, f1) < 0)
FAIL_STACK_ERROR
- if(H5F_efc_release(f0->shared->efc) < 0)
+ if(H5F__efc_release(f0->shared->efc) < 0)
FAIL_STACK_ERROR
@@ -135,40 +128,34 @@ test_single(void)
* that the one added first is evicted. Then reopen files in a different
* order. Open each file normally after closing through EFC the first time
* to track ref counts. */
- if(NULL == (f1 = H5F_efc_open(f0, filename[1],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f1 = H5F__efc_open(f0, filename[1],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f0, f1) < 0)
FAIL_STACK_ERROR
- if(NULL == (f1 = H5F_open(filename[1], H5F_ACC_RDWR, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f1 = H5F_open(filename[1], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f1->shared->nrefs != 2)
TEST_ERROR
- if(NULL == (f2 = H5F_efc_open(f0, filename[2],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f2 = H5F__efc_open(f0, filename[2],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f0, f2) < 0)
FAIL_STACK_ERROR
- if(NULL == (f2 = H5F_open(filename[2], H5F_ACC_RDWR, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f2 = H5F_open(filename[2], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f1->shared->nrefs != 2)
TEST_ERROR
if(f2->shared->nrefs != 2)
TEST_ERROR
- if(NULL == (f3 = H5F_efc_open(f0, filename[3],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f3 = H5F__efc_open(f0, filename[3],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f0, f3) < 0)
FAIL_STACK_ERROR
- if(NULL == (f3 = H5F_open(filename[3], H5F_ACC_RDWR, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f3 = H5F_open(filename[3], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f1->shared->nrefs != 2)
TEST_ERROR
@@ -177,14 +164,12 @@ test_single(void)
if(f3->shared->nrefs != 2)
TEST_ERROR
- if(NULL == (f4 = H5F_efc_open(f0, filename[4],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f4 = H5F__efc_open(f0, filename[4],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f0, f4) < 0)
FAIL_STACK_ERROR
- if(NULL == (f4 = H5F_open(filename[4], H5F_ACC_RDWR, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f4 = H5F_open(filename[4], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f1->shared->nrefs != 1)
TEST_ERROR
@@ -195,8 +180,7 @@ test_single(void)
if(f4->shared->nrefs != 2)
TEST_ERROR
- if(NULL == (ftmp3 = H5F_efc_open(f0, filename[3], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp3 = H5F__efc_open(f0, filename[3], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f0, ftmp3) < 0)
FAIL_STACK_ERROR
@@ -209,8 +193,7 @@ test_single(void)
if(f4->shared->nrefs != 2)
TEST_ERROR
- if(NULL == (ftmp2 = H5F_efc_open(f0, filename[2], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp2 = H5F__efc_open(f0, filename[2], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f0, ftmp2) < 0)
FAIL_STACK_ERROR
@@ -223,8 +206,7 @@ test_single(void)
if(f4->shared->nrefs != 2)
TEST_ERROR
- if(NULL == (ftmp1 = H5F_efc_open(f0, filename[1], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f0, ftmp1) < 0)
FAIL_STACK_ERROR
@@ -237,8 +219,7 @@ test_single(void)
if(f4->shared->nrefs != 1)
TEST_ERROR
- if(NULL == (ftmp4 = H5F_efc_open(f0, filename[4], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp4 = H5F__efc_open(f0, filename[4], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f0, ftmp4) < 0)
FAIL_STACK_ERROR
@@ -251,7 +232,7 @@ test_single(void)
if(f4->shared->nrefs != 2)
TEST_ERROR
- if(H5F_efc_release(f0->shared->efc) < 0)
+ if(H5F__efc_release(f0->shared->efc) < 0)
FAIL_STACK_ERROR
if(f1->shared->nrefs != 1)
TEST_ERROR
@@ -272,17 +253,15 @@ test_single(void)
/* Test 4: Verify that files kept open through the EFC are not evicted by
- * H5F_efc_release(). */
- if(NULL == (f1 = H5F_efc_open(f0, filename[1],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ * H5F__efc_release(). */
+ if(NULL == (f1 = H5F__efc_open(f0, filename[1],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp1 = H5F_open(filename[1], H5F_ACC_RDWR, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (ftmp1 = H5F_open(filename[1], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(ftmp1->shared->nrefs != 2)
TEST_ERROR
- if(H5F_efc_release(f0->shared->efc) < 0)
+ if(H5F__efc_release(f0->shared->efc) < 0)
FAIL_STACK_ERROR
if(ftmp1->shared->nrefs != 2)
TEST_ERROR
@@ -290,7 +269,7 @@ test_single(void)
FAIL_STACK_ERROR
if(ftmp1->shared->nrefs != 2)
TEST_ERROR
- if(H5F_efc_release(f0->shared->efc) < 0)
+ if(H5F__efc_release(f0->shared->efc) < 0)
FAIL_STACK_ERROR
if(ftmp1->shared->nrefs != 1)
TEST_ERROR
@@ -302,42 +281,36 @@ test_single(void)
* filling up the cache. Open 4 files while holding the first open. Verify
* that the second file is evicted. Close the first file, reopen the
* second, and verify that the first file is evicted. */
- if(NULL == (f1 = H5F_efc_open(f0, filename[1],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f1 = H5F__efc_open(f0, filename[1],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp1 = H5F_open(filename[1], H5F_ACC_RDWR, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (ftmp1 = H5F_open(filename[1], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(ftmp1->shared != f1->shared)
TEST_ERROR
if(ftmp1->shared->nrefs != 2)
TEST_ERROR
- if(NULL == (f2 = H5F_efc_open(f0, filename[2],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f2 = H5F__efc_open(f0, filename[2],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f0, f2) < 0)
FAIL_STACK_ERROR
- if(NULL == (ftmp2 = H5F_open(filename[2], H5F_ACC_RDWR, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (ftmp2 = H5F_open(filename[2], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(ftmp2->shared->nrefs != 2)
TEST_ERROR
- if(NULL == (f3 = H5F_efc_open(f0, filename[3],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f3 = H5F__efc_open(f0, filename[3],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f0, f3) < 0)
FAIL_STACK_ERROR
if(ftmp2->shared->nrefs != 2)
TEST_ERROR
- if(NULL == (f4 = H5F_efc_open(f0, filename[4],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f4 = H5F__efc_open(f0, filename[4],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f0, f4) < 0)
FAIL_STACK_ERROR
@@ -350,8 +323,8 @@ test_single(void)
FAIL_STACK_ERROR
if(ftmp1->shared->nrefs != 2)
TEST_ERROR
- if(NULL == (f2 = H5F_efc_open(f0, filename[2], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (f2 = H5F__efc_open(f0, filename[2], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f0, f2) < 0)
FAIL_STACK_ERROR
@@ -359,8 +332,8 @@ test_single(void)
TEST_ERROR
if(ftmp2->shared->nrefs != 2)
TEST_ERROR
- if(NULL == (f1 = H5F_efc_open(f0, filename[1], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f0, f1) < 0)
FAIL_STACK_ERROR
@@ -369,7 +342,7 @@ test_single(void)
if(ftmp2->shared->nrefs != 2)
TEST_ERROR
- if(H5F_efc_release(f0->shared->efc) < 0)
+ if(H5F__efc_release(f0->shared->efc) < 0)
FAIL_STACK_ERROR
if(ftmp1->shared->nrefs != 1)
TEST_ERROR
@@ -385,50 +358,42 @@ test_single(void)
* prevents further files from being cached. Open and hold open 3 files
* through the EFC, then open the fourth and verify that it was not added to
* the EFC. */
- if(NULL == (f1 = H5F_efc_open(f0, filename[1],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f1 = H5F__efc_open(f0, filename[1],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp1 = H5F_open(filename[1], H5F_ACC_RDWR, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (ftmp1 = H5F_open(filename[1], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(ftmp1->shared != f1->shared)
TEST_ERROR
if(ftmp1->shared->nrefs != 2)
TEST_ERROR
- if(NULL == (f2 = H5F_efc_open(f0, filename[2],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f2 = H5F__efc_open(f0, filename[2],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp2 = H5F_open(filename[2], H5F_ACC_RDWR, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (ftmp2 = H5F_open(filename[2], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(ftmp2->shared != f2->shared)
TEST_ERROR
if(ftmp2->shared->nrefs != 2)
TEST_ERROR
- if(NULL == (f3 = H5F_efc_open(f0, filename[3],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f3 = H5F__efc_open(f0, filename[3],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp3 = H5F_open(filename[3], H5F_ACC_RDWR, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (ftmp3 = H5F_open(filename[3], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(ftmp3->shared != f3->shared)
TEST_ERROR
if(ftmp3->shared->nrefs != 2)
TEST_ERROR
- if(NULL == (f4 = H5F_efc_open(f0, filename[4],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f4 = H5F__efc_open(f0, filename[4],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f0, f4) < 0)
FAIL_STACK_ERROR
- if(NULL == (ftmp4 = H5F_open(filename[4], H5F_ACC_RDWR, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (ftmp4 = H5F_open(filename[4], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(ftmp4->shared->nrefs != 1)
TEST_ERROR
@@ -445,7 +410,7 @@ test_single(void)
TEST_ERROR
if(ftmp3->shared->nrefs != 2)
TEST_ERROR
- if(H5F_efc_release(f0->shared->efc) < 0)
+ if(H5F__efc_release(f0->shared->efc) < 0)
FAIL_STACK_ERROR
if(ftmp1->shared->nrefs != 1)
TEST_ERROR
@@ -466,23 +431,20 @@ test_single(void)
/* Test 7: Test multiple file opens. Open a file twice, close it once, then
- * verify that it is not evicted by H5F_efc_release(). */
- if(NULL == (f1 = H5F_efc_open(f0, filename[1],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ * verify that it is not evicted by H5F__efc_release(). */
+ if(NULL == (f1 = H5F__efc_open(f0, filename[1],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f2 = H5F_efc_open(f0, filename[1],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f2 = H5F__efc_open(f0, filename[1],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp1 = H5F_open(filename[1], H5F_ACC_RDWR, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (ftmp1 = H5F_open(filename[1], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(ftmp1->shared->nrefs != 2)
TEST_ERROR
if(H5F_efc_close(f0, f2) < 0)
FAIL_STACK_ERROR
- if(H5F_efc_release(f0->shared->efc) < 0)
+ if(H5F__efc_release(f0->shared->efc) < 0)
FAIL_STACK_ERROR
if(ftmp1->shared->nrefs != 2)
TEST_ERROR
@@ -490,7 +452,7 @@ test_single(void)
FAIL_STACK_ERROR
if(ftmp1->shared->nrefs != 2)
TEST_ERROR
- if(H5F_efc_release(f0->shared->efc) < 0)
+ if(H5F__efc_release(f0->shared->efc) < 0)
FAIL_STACK_ERROR
if(ftmp1->shared->nrefs != 1)
TEST_ERROR
@@ -541,7 +503,7 @@ test_graph_nocycle(void)
TESTING("graph of EFCs without cycles");
/* Set EFC size to 8. Do this instead of H5F_efc_create() so we can pass
- * a file pointer to H5F_efc_open containing the EFC. Set to a high number
+ * a file pointer to H5F__efc_open containing the EFC. Set to a high number
* because we don't test the EFC becoming too large in this test. */
if(H5Pset_elink_file_cache_size(fapl_id, 8) < 0)
TEST_ERROR
@@ -552,27 +514,23 @@ test_graph_nocycle(void)
* ref count reduced (implying file 1 was closed). Do the same with the
* opening order reversed. */
if(NULL == (f0 = H5F_open(filename[0],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f1 = H5F_efc_open(f0, filename[1],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f1 = H5F__efc_open(f0, filename[1],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f2 = H5F_efc_open(f1, filename[2],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f2 = H5F__efc_open(f1, filename[2],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f1, f2) < 0)
FAIL_STACK_ERROR
if(H5F_efc_close(f0, f1) < 0)
FAIL_STACK_ERROR
- if(NULL == (ftmp2 = H5F_open(filename[2], H5F_ACC_RDWR, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (ftmp2 = H5F_open(filename[2], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(ftmp2->shared->nrefs != 2)
TEST_ERROR
- if(H5F_efc_release(f0->shared->efc) < 0)
+ if(H5F__efc_release(f0->shared->efc) < 0)
FAIL_STACK_ERROR
if(ftmp2->shared->nrefs != 1)
TEST_ERROR
@@ -582,19 +540,16 @@ test_graph_nocycle(void)
FAIL_STACK_ERROR
if(NULL == (f0 = H5F_open(filename[0],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(NULL == (ftmp1 = H5F_open(filename[1],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f2 = H5F_efc_open(ftmp1, filename[2],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f2 = H5F__efc_open(ftmp1, filename[2],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f1 = H5F_efc_open(f0, filename[1], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (f1 = H5F__efc_open(f0, filename[1], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_try_close(ftmp1, NULL) < 0)
FAIL_STACK_ERROR
@@ -602,12 +557,11 @@ test_graph_nocycle(void)
FAIL_STACK_ERROR
if(H5F_efc_close(f0, f1) < 0)
FAIL_STACK_ERROR
- if(NULL == (ftmp2 = H5F_open(filename[2], H5F_ACC_RDWR, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (ftmp2 = H5F_open(filename[2], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(ftmp2->shared->nrefs != 2)
TEST_ERROR
- if(H5F_efc_release(f0->shared->efc) < 0)
+ if(H5F__efc_release(f0->shared->efc) < 0)
FAIL_STACK_ERROR
if(ftmp2->shared->nrefs != 1)
TEST_ERROR
@@ -621,47 +575,40 @@ test_graph_nocycle(void)
* has their own child file. Verifies that releasing the parent's EFC
* closes all 4 children. */
if(NULL == (f0 = H5F_open(filename[0],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f1 = H5F_efc_open(f0, filename[1],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f1 = H5F__efc_open(f0, filename[1],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f2 = H5F_efc_open(f1, filename[2],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f2 = H5F__efc_open(f1, filename[2],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f1, f2) < 0)
FAIL_STACK_ERROR
if(H5F_efc_close(f0, f1) < 0)
FAIL_STACK_ERROR
- if(NULL == (ftmp2 = H5F_open(filename[2], H5F_ACC_RDWR, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (ftmp2 = H5F_open(filename[2], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(ftmp2->shared->nrefs != 2)
TEST_ERROR
- if(NULL == (f3 = H5F_efc_open(f0, filename[3],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f3 = H5F__efc_open(f0, filename[3],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f4 = H5F_efc_open(f3, filename[4],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f4 = H5F__efc_open(f3, filename[4],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f3, f4) < 0)
FAIL_STACK_ERROR
if(H5F_efc_close(f0, f3) < 0)
FAIL_STACK_ERROR
- if(NULL == (ftmp4 = H5F_open(filename[4], H5F_ACC_RDWR, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (ftmp4 = H5F_open(filename[4], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(ftmp4->shared->nrefs != 2)
TEST_ERROR
- if(H5F_efc_release(f0->shared->efc) < 0)
+ if(H5F__efc_release(f0->shared->efc) < 0)
FAIL_STACK_ERROR
if(ftmp2->shared->nrefs != 1)
TEST_ERROR
@@ -681,23 +628,19 @@ test_graph_nocycle(void)
* parent, then reopen through that parent and release the other, then
* re-release the first parent. */
if(NULL == (f0 = H5F_open(filename[0],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(NULL == (f1 = H5F_open(filename[1],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f2 = H5F_efc_open(f0, filename[2],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f2 = H5F__efc_open(f0, filename[2],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp2 = H5F_efc_open(f1, filename[2], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp2 = H5F__efc_open(f1, filename[2], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f3 = H5F_efc_open(f2, filename[3],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f3 = H5F__efc_open(f2, filename[3],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f2, f3) < 0)
FAIL_STACK_ERROR
@@ -705,28 +648,27 @@ test_graph_nocycle(void)
FAIL_STACK_ERROR
if(H5F_efc_close(f1, ftmp2) < 0)
FAIL_STACK_ERROR
- if(NULL == (ftmp3 = H5F_open(filename[3], H5F_ACC_RDWR, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (ftmp3 = H5F_open(filename[3], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(ftmp3->shared->nrefs != 2)
TEST_ERROR
- if(H5F_efc_release(f0->shared->efc) < 0)
+ if(H5F__efc_release(f0->shared->efc) < 0)
FAIL_STACK_ERROR
if(ftmp3->shared->nrefs != 2)
TEST_ERROR
- if(NULL == (f2 = H5F_efc_open(f0, filename[2], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (f2 = H5F__efc_open(f0, filename[2], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f0, f2) < 0)
FAIL_STACK_ERROR
- if(H5F_efc_release(f1->shared->efc) < 0)
+ if(H5F__efc_release(f1->shared->efc) < 0)
FAIL_STACK_ERROR
if(ftmp3->shared->nrefs != 2)
TEST_ERROR
- if(H5F_efc_release(f0->shared->efc) < 0)
+ if(H5F__efc_release(f0->shared->efc) < 0)
FAIL_STACK_ERROR
if(ftmp3->shared->nrefs != 1)
TEST_ERROR
@@ -743,25 +685,21 @@ test_graph_nocycle(void)
* shared the same child. Verify that releasing the parent file closes all
* files. */
if(NULL == (f0 = H5F_open(filename[0],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f1 = H5F_efc_open(f0, filename[1],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f1 = H5F__efc_open(f0, filename[1],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f2 = H5F_efc_open(f0, filename[2],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f2 = H5F__efc_open(f0, filename[2],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f3 = H5F_efc_open(f2, filename[3],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f3 = H5F__efc_open(f2, filename[3],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f2, f3) < 0)
FAIL_STACK_ERROR
- if(NULL == (f3 = H5F_efc_open(f1, filename[3], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (f3 = H5F__efc_open(f1, filename[3], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f1, f3) < 0)
FAIL_STACK_ERROR
@@ -769,13 +707,12 @@ test_graph_nocycle(void)
FAIL_STACK_ERROR
if(H5F_efc_close(f0, f1) < 0)
FAIL_STACK_ERROR
- if(NULL == (ftmp3 = H5F_open(filename[3], H5F_ACC_RDWR, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (ftmp3 = H5F_open(filename[3], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(ftmp3->shared->nrefs != 3)
TEST_ERROR
- if(H5F_efc_release(f0->shared->efc) < 0)
+ if(H5F__efc_release(f0->shared->efc) < 0)
FAIL_STACK_ERROR
if(ftmp3->shared->nrefs != 1)
TEST_ERROR
@@ -790,34 +727,29 @@ test_graph_nocycle(void)
* each cache f3 and f4. f3 caches f4. Verify that releasing f0 closes all
* files. */
if(NULL == (f0 = H5F_open(filename[0],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f1 = H5F_efc_open(f0, filename[1],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f1 = H5F__efc_open(f0, filename[1],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f2 = H5F_efc_open(f0, filename[2],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f2 = H5F__efc_open(f0, filename[2],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f3 = H5F_efc_open(f0, filename[3],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f3 = H5F__efc_open(f0, filename[3],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f4 = H5F_efc_open(f0, filename[4],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f4 = H5F__efc_open(f0, filename[4],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f0, f4) < 0)
FAIL_STACK_ERROR
if(H5F_efc_close(f0, f3) < 0)
FAIL_STACK_ERROR
- if(NULL == (f3 = H5F_efc_open(f1, filename[3], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (f3 = H5F__efc_open(f1, filename[3], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f4 = H5F_efc_open(f1, filename[4], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (f4 = H5F__efc_open(f1, filename[4], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f1, f4) < 0)
FAIL_STACK_ERROR
@@ -825,45 +757,41 @@ test_graph_nocycle(void)
FAIL_STACK_ERROR
if(H5F_efc_close(f0, f1) < 0)
FAIL_STACK_ERROR
- if(NULL == (f3 = H5F_efc_open(f2, filename[3], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (f3 = H5F__efc_open(f2, filename[3], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f4 = H5F_efc_open(f2, filename[4], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (f4 = H5F__efc_open(f2, filename[4], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f2, f4) < 0)
FAIL_STACK_ERROR
if(H5F_efc_close(f0, f2) < 0)
FAIL_STACK_ERROR
- if(NULL == (f4 = H5F_efc_open(f3, filename[4], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (f4 = H5F__efc_open(f3, filename[4], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f3, f4) < 0)
FAIL_STACK_ERROR
if(H5F_efc_close(f2, f3) < 0)
FAIL_STACK_ERROR
- if(NULL == (ftmp4 = H5F_open(filename[4], H5F_ACC_RDWR, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (ftmp4 = H5F_open(filename[4], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(ftmp4->shared->nrefs != 5)
TEST_ERROR
- if(H5F_efc_release(f0->shared->efc) < 0)
+ if(H5F__efc_release(f0->shared->efc) < 0)
FAIL_STACK_ERROR
if(ftmp4->shared->nrefs != 1)
TEST_ERROR
- if(NULL == (ftmp1 = H5F_open(filename[1], H5F_ACC_RDWR, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (ftmp1 = H5F_open(filename[1], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(ftmp1->shared->nrefs != 1)
TEST_ERROR
- if(NULL == (ftmp2 = H5F_open(filename[2], H5F_ACC_RDWR, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (ftmp2 = H5F_open(filename[2], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(ftmp2->shared->nrefs != 1)
TEST_ERROR
- if(NULL == (ftmp3 = H5F_open(filename[3], H5F_ACC_RDWR, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (ftmp3 = H5F_open(filename[3], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(ftmp3->shared->nrefs != 1)
TEST_ERROR
@@ -920,7 +848,7 @@ test_graph_cycle(void)
TESTING("graph of EFCs with cycles");
/* Set EFC size to 8. Do this instead of H5F_efc_create() so we can pass
- * a file pointer to H5F_efc_open containing the EFC. Set to a high number
+ * a file pointer to H5F__efc_open containing the EFC. Set to a high number
* because we don't test the EFC becoming too large in this test. */
if(H5Pset_elink_file_cache_size(fapl_id, 8) < 0)
TEST_ERROR
@@ -929,23 +857,21 @@ test_graph_cycle(void)
/* Test 1: File caches itself. Verify that closing the file causes it to be
* actually closed, and there is no other unexpected behavior. */
if(NULL == (f0 = H5F_open(filename[0],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp0 = H5F_efc_open(f0, filename[0], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp0 = H5F__efc_open(f0, filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f0, ftmp0) < 0)
FAIL_STACK_ERROR
if(f0->shared->nrefs != 2)
TEST_ERROR
- if(H5F_efc_release(f0->shared->efc) < 0)
+ if(H5F__efc_release(f0->shared->efc) < 0)
FAIL_STACK_ERROR
if(f0->shared->nrefs != 1)
TEST_ERROR
- if(NULL == (ftmp0 = H5F_efc_open(f0, filename[0], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp0 = H5F__efc_open(f0, filename[0], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f0, ftmp0) < 0)
FAIL_STACK_ERROR
@@ -954,8 +880,7 @@ test_graph_cycle(void)
if(H5F_try_close(f0, NULL) < 0)
FAIL_STACK_ERROR
if(NULL == (f0 = H5F_open(filename[0],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f0->shared->nrefs != 1)
TEST_ERROR
@@ -967,15 +892,13 @@ test_graph_cycle(void)
/* Test 2: Indirectly referenced file caches itself. Same as above except
* the file is part of another file's EFC. */
if(NULL == (f0 = H5F_open(filename[0],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f1 = H5F_efc_open(f0, filename[1],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f1 = H5F__efc_open(f0, filename[1],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp1 = H5F_efc_open(f1, filename[1], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp1 = H5F__efc_open(f1, filename[1], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f1, ftmp1) < 0)
FAIL_STACK_ERROR
@@ -983,23 +906,21 @@ test_graph_cycle(void)
TEST_ERROR
if(H5F_efc_close(f0, f1) < 0)
FAIL_STACK_ERROR
- if(H5F_efc_release(f0->shared->efc) < 0)
+ if(H5F__efc_release(f0->shared->efc) < 0)
FAIL_STACK_ERROR
if(NULL == (f1 = H5F_open(filename[1],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f1->shared->nrefs != 1)
TEST_ERROR
if(H5F_try_close(f1, NULL) < 0)
FAIL_STACK_ERROR
- if(NULL == (f1 = H5F_efc_open(f0, filename[1],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f1 = H5F__efc_open(f0, filename[1],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp1 = H5F_efc_open(f1, filename[1], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp1 = H5F__efc_open(f1, filename[1], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f1, ftmp1) < 0)
FAIL_STACK_ERROR
@@ -1010,8 +931,7 @@ test_graph_cycle(void)
if(H5F_try_close(f0, NULL) < 0)
FAIL_STACK_ERROR
if(NULL == (f1 = H5F_open(filename[1],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f1->shared->nrefs != 1)
TEST_ERROR
@@ -1021,15 +941,13 @@ test_graph_cycle(void)
/* Test 3: Simple 2 file cycle */
if(NULL == (f0 = H5F_open(filename[0],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f1 = H5F_efc_open(f0, filename[1],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f1 = H5F__efc_open(f0, filename[1],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp0 = H5F_efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f1, ftmp0) < 0)
FAIL_STACK_ERROR
@@ -1037,17 +955,16 @@ test_graph_cycle(void)
FAIL_STACK_ERROR
if(f0->shared->nrefs != 2)
TEST_ERROR
- if(H5F_efc_release(f0->shared->efc) < 0)
+ if(H5F__efc_release(f0->shared->efc) < 0)
FAIL_STACK_ERROR
if(f0->shared->nrefs != 1)
TEST_ERROR
- if(NULL == (f1 = H5F_efc_open(f0, filename[1],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f1 = H5F__efc_open(f0, filename[1],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp0 = H5F_efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f1, ftmp0) < 0)
FAIL_STACK_ERROR
@@ -1058,8 +975,7 @@ test_graph_cycle(void)
if(H5F_try_close(f0, NULL) < 0)
FAIL_STACK_ERROR
if(NULL == (f0 = H5F_open(filename[0],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f0->shared->nrefs != 1)
TEST_ERROR
@@ -1069,19 +985,16 @@ test_graph_cycle(void)
/* Test 4: Simple 2 file cycle (indirectly referenced) */
if(NULL == (f0 = H5F_open(filename[0],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f1 = H5F_efc_open(f0, filename[1],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f1 = H5F__efc_open(f0, filename[1],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f2 = H5F_efc_open(f1, filename[2],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f2 = H5F__efc_open(f1, filename[2],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp1 = H5F_efc_open(f2, filename[1], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp1 = H5F__efc_open(f2, filename[1], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f2, ftmp1) < 0)
FAIL_STACK_ERROR
@@ -1094,8 +1007,7 @@ test_graph_cycle(void)
if(H5F_try_close(f0, NULL) < 0)
FAIL_STACK_ERROR
if(NULL == (f1 = H5F_open(filename[1],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f1->shared->nrefs != 1)
TEST_ERROR
@@ -1105,26 +1017,23 @@ test_graph_cycle(void)
/* Test 5: Parallel double cycle */
if(NULL == (f0 = H5F_open(filename[0],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f1 = H5F_efc_open(f0, filename[1],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f1 = H5F__efc_open(f0, filename[1],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp0 = H5F_efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f1, ftmp0) < 0)
FAIL_STACK_ERROR
if(H5F_efc_close(f0, f1) < 0)
FAIL_STACK_ERROR
- if(NULL == (f2 = H5F_efc_open(f0, filename[2],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f2 = H5F__efc_open(f0, filename[2],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp0 = H5F_efc_open(f2, filename[0], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp0 = H5F__efc_open(f2, filename[0], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f2, ftmp0) < 0)
FAIL_STACK_ERROR
@@ -1135,8 +1044,7 @@ test_graph_cycle(void)
if(H5F_try_close(f0, NULL) < 0)
FAIL_STACK_ERROR
if(NULL == (f0 = H5F_open(filename[0],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f0->shared->nrefs != 1)
TEST_ERROR
@@ -1146,26 +1054,23 @@ test_graph_cycle(void)
/* Test 6: Parallel double cycle with release */
if(NULL == (f0 = H5F_open(filename[0],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f1 = H5F_efc_open(f0, filename[1],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f1 = H5F__efc_open(f0, filename[1],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp0 = H5F_efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f1, ftmp0) < 0)
FAIL_STACK_ERROR
if(H5F_efc_close(f0, f1) < 0)
FAIL_STACK_ERROR
- if(NULL == (f2 = H5F_efc_open(f0, filename[2],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f2 = H5F__efc_open(f0, filename[2],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp0 = H5F_efc_open(f2, filename[0], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp0 = H5F__efc_open(f2, filename[0], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f2, ftmp0) < 0)
FAIL_STACK_ERROR
@@ -1173,7 +1078,7 @@ test_graph_cycle(void)
FAIL_STACK_ERROR
if(f0->shared->nrefs != 3)
TEST_ERROR
- if(H5F_efc_release(f0->shared->efc) < 0)
+ if(H5F__efc_release(f0->shared->efc) < 0)
FAIL_STACK_ERROR
if(f0->shared->nrefs != 1)
TEST_ERROR
@@ -1183,33 +1088,29 @@ test_graph_cycle(void)
/* Test 7: Chained parallel double cycle */
if(NULL == (f0 = H5F_open(filename[0],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f1 = H5F_efc_open(f0, filename[1],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f1 = H5F__efc_open(f0, filename[1],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp0 = H5F_efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f2 = H5F_efc_open(f1, filename[2],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f2 = H5F__efc_open(f1, filename[2],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp1 = H5F_efc_open(f2, filename[1], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp1 = H5F__efc_open(f2, filename[1], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f2, ftmp1) < 0)
FAIL_STACK_ERROR
if(H5F_efc_close(f1, f2) < 0)
FAIL_STACK_ERROR
- if(NULL == (f3 = H5F_efc_open(f1, filename[3],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f3 = H5F__efc_open(f1, filename[3],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp1 = H5F_efc_open(f3, filename[1], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp1 = H5F__efc_open(f3, filename[1], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f3, ftmp1) < 0)
FAIL_STACK_ERROR
@@ -1224,8 +1125,7 @@ test_graph_cycle(void)
if(H5F_try_close(f0, NULL) < 0)
FAIL_STACK_ERROR
if(NULL == (f0 = H5F_open(filename[0],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f0->shared->nrefs != 1)
TEST_ERROR
@@ -1235,33 +1135,29 @@ test_graph_cycle(void)
/* Test 8: Chained parallel double cycle with release */
if(NULL == (f0 = H5F_open(filename[0],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f1 = H5F_efc_open(f0, filename[1],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f1 = H5F__efc_open(f0, filename[1],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp0 = H5F_efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f2 = H5F_efc_open(f1, filename[2],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f2 = H5F__efc_open(f1, filename[2],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp1 = H5F_efc_open(f2, filename[1], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp1 = H5F__efc_open(f2, filename[1], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f2, ftmp1) < 0)
FAIL_STACK_ERROR
if(H5F_efc_close(f1, f2) < 0)
FAIL_STACK_ERROR
- if(NULL == (f3 = H5F_efc_open(f1, filename[3],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f3 = H5F__efc_open(f1, filename[3],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp1 = H5F_efc_open(f3, filename[1], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp1 = H5F__efc_open(f3, filename[1], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f3, ftmp1) < 0)
FAIL_STACK_ERROR
@@ -1273,7 +1169,7 @@ test_graph_cycle(void)
FAIL_STACK_ERROR
if(f0->shared->nrefs != 2)
TEST_ERROR
- if(H5F_efc_release(f0->shared->efc) < 0)
+ if(H5F__efc_release(f0->shared->efc) < 0)
FAIL_STACK_ERROR
if(f0->shared->nrefs != 1)
TEST_ERROR
@@ -1283,18 +1179,15 @@ test_graph_cycle(void)
/* Test 9: Simple 2 file cycle, extra ID on root */
if(NULL == (f0 = H5F_open(filename[0],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp0 = H5F_open(filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (ftmp0 = H5F_open(filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f1 = H5F_efc_open(f0, filename[1],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f1 = H5F__efc_open(f0, filename[1],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp1 = H5F_efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp1 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f1, ftmp1) < 0)
FAIL_STACK_ERROR
@@ -1311,8 +1204,7 @@ test_graph_cycle(void)
if(H5F_try_close(f0, NULL) < 0)
FAIL_STACK_ERROR
if(NULL == (f0 = H5F_open(filename[0],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f0->shared->nrefs != 1)
TEST_ERROR
@@ -1322,18 +1214,15 @@ test_graph_cycle(void)
/* Test 10: Simple 2 file cycle, extra ID on second file */
if(NULL == (f0 = H5F_open(filename[0],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f1 = H5F_efc_open(f0, filename[1],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f1 = H5F__efc_open(f0, filename[1],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp1 = H5F_open(filename[1], H5F_ACC_RDWR, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (ftmp1 = H5F_open(filename[1], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp0 = H5F_efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f1, ftmp0) < 0)
FAIL_STACK_ERROR
@@ -1348,8 +1237,7 @@ test_graph_cycle(void)
FAIL_STACK_ERROR
if(ftmp1->shared->nrefs != 2)
TEST_ERROR
- if(NULL == (f0 = H5F_open(filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f0 = H5F_open(filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f0->shared->nrefs != 2)
TEST_ERROR
@@ -1359,16 +1247,14 @@ test_graph_cycle(void)
if(H5F_try_close(ftmp1, NULL) < 0)
FAIL_STACK_ERROR
if(NULL == (f0 = H5F_open(filename[0],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f0->shared->nrefs != 1)
TEST_ERROR
if(H5F_try_close(f0, NULL) < 0)
FAIL_STACK_ERROR
if(NULL == (f1 = H5F_open(filename[1],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f1->shared->nrefs != 1)
TEST_ERROR
@@ -1378,29 +1264,25 @@ test_graph_cycle(void)
/* Test 11: Parallel double cycle, extra ID on a child file */
if(NULL == (f0 = H5F_open(filename[0],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f1 = H5F_efc_open(f0, filename[1],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f1 = H5F__efc_open(f0, filename[1],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp0 = H5F_efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f1, ftmp0) < 0)
FAIL_STACK_ERROR
if(H5F_efc_close(f0, f1) < 0)
FAIL_STACK_ERROR
- if(NULL == (f2 = H5F_efc_open(f0, filename[2],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f2 = H5F__efc_open(f0, filename[2],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp2 = H5F_open(filename[2], H5F_ACC_RDWR, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (ftmp2 = H5F_open(filename[2], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp0 = H5F_efc_open(f2, filename[0], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp0 = H5F__efc_open(f2, filename[0], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f2, ftmp0) < 0)
FAIL_STACK_ERROR
@@ -1415,8 +1297,7 @@ test_graph_cycle(void)
FAIL_STACK_ERROR
if(ftmp2->shared->nrefs != 2)
TEST_ERROR
- if(NULL == (f0 = H5F_open(filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f0 = H5F_open(filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f0->shared->nrefs != 3)
TEST_ERROR
@@ -1426,24 +1307,21 @@ test_graph_cycle(void)
if(H5F_try_close(ftmp2, NULL) < 0)
FAIL_STACK_ERROR
if(NULL == (f0 = H5F_open(filename[0],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f0->shared->nrefs != 1)
TEST_ERROR
if(H5F_try_close(f0, NULL) < 0)
FAIL_STACK_ERROR
if(NULL == (f1 = H5F_open(filename[1],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f1->shared->nrefs != 1)
TEST_ERROR
if(H5F_try_close(f1, NULL) < 0)
FAIL_STACK_ERROR
if(NULL == (f2 = H5F_open(filename[2],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f2->shared->nrefs != 1)
TEST_ERROR
@@ -1453,29 +1331,25 @@ test_graph_cycle(void)
/* Test 12: Parallel double cycle, extra ID on a child file, with release */
if(NULL == (f0 = H5F_open(filename[0],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f1 = H5F_efc_open(f0, filename[1],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f1 = H5F__efc_open(f0, filename[1],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp0 = H5F_efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f1, ftmp0) < 0)
FAIL_STACK_ERROR
if(H5F_efc_close(f0, f1) < 0)
FAIL_STACK_ERROR
- if(NULL == (f2 = H5F_efc_open(f0, filename[2],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f2 = H5F__efc_open(f0, filename[2],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp2 = H5F_open(filename[2], H5F_ACC_RDWR, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (ftmp2 = H5F_open(filename[2], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp0 = H5F_efc_open(f2, filename[0], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp0 = H5F__efc_open(f2, filename[0], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f2, ftmp0) < 0)
FAIL_STACK_ERROR
@@ -1486,14 +1360,14 @@ test_graph_cycle(void)
if(ftmp2->shared->nrefs != 2)
TEST_ERROR
- if(H5F_efc_release(f0->shared->efc) < 0)
+ if(H5F__efc_release(f0->shared->efc) < 0)
FAIL_STACK_ERROR
if(f0->shared->nrefs != 2)
TEST_ERROR
if(ftmp2->shared->nrefs != 1)
TEST_ERROR
- if(H5F_efc_release(ftmp2->shared->efc) < 0)
+ if(H5F__efc_release(ftmp2->shared->efc) < 0)
FAIL_STACK_ERROR
if(f0->shared->nrefs != 1)
TEST_ERROR
@@ -1507,36 +1381,31 @@ test_graph_cycle(void)
/* Test 13: Chained parallel double cycle, extra ID on a child file */
if(NULL == (f0 = H5F_open(filename[0],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f1 = H5F_efc_open(f0, filename[1],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f1 = H5F__efc_open(f0, filename[1],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp0 = H5F_efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f2 = H5F_efc_open(f1, filename[2],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f2 = H5F__efc_open(f1, filename[2],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp1 = H5F_efc_open(f2, filename[1], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp1 = H5F__efc_open(f2, filename[1], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f2, ftmp1) < 0)
FAIL_STACK_ERROR
if(H5F_efc_close(f1, f2) < 0)
FAIL_STACK_ERROR
- if(NULL == (f3 = H5F_efc_open(f1, filename[3],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f3 = H5F__efc_open(f1, filename[3],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp3 = H5F_open(filename[3], H5F_ACC_RDWR, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (ftmp3 = H5F_open(filename[3], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp1 = H5F_efc_open(f3, filename[1], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp1 = H5F__efc_open(f3, filename[1], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f3, ftmp1) < 0)
FAIL_STACK_ERROR
@@ -1555,8 +1424,7 @@ test_graph_cycle(void)
FAIL_STACK_ERROR
if(ftmp3->shared->nrefs != 2)
TEST_ERROR
- if(NULL == (f0 = H5F_open(filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f0 = H5F_open(filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f0->shared->nrefs != 2)
TEST_ERROR
@@ -1566,32 +1434,28 @@ test_graph_cycle(void)
if(H5F_try_close(ftmp3, NULL) < 0)
FAIL_STACK_ERROR
if(NULL == (f0 = H5F_open(filename[0],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f0->shared->nrefs != 1)
TEST_ERROR
if(H5F_try_close(f0, NULL) < 0)
FAIL_STACK_ERROR
if(NULL == (f1 = H5F_open(filename[1],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f1->shared->nrefs != 1)
TEST_ERROR
if(H5F_try_close(f1, NULL) < 0)
FAIL_STACK_ERROR
if(NULL == (f2 = H5F_open(filename[2],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f2->shared->nrefs != 1)
TEST_ERROR
if(H5F_try_close(f2, NULL) < 0)
FAIL_STACK_ERROR
if(NULL == (f3 = H5F_open(filename[3],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f3->shared->nrefs != 1)
TEST_ERROR
@@ -1602,36 +1466,31 @@ test_graph_cycle(void)
/* Test 14: Chained parallel double cycle, extra ID on a child file, with
* release */
if(NULL == (f0 = H5F_open(filename[0],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f1 = H5F_efc_open(f0, filename[1],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f1 = H5F__efc_open(f0, filename[1],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp0 = H5F_efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f2 = H5F_efc_open(f1, filename[2],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f2 = H5F__efc_open(f1, filename[2],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp1 = H5F_efc_open(f2, filename[1], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp1 = H5F__efc_open(f2, filename[1], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f2, ftmp1) < 0)
FAIL_STACK_ERROR
if(H5F_efc_close(f1, f2) < 0)
FAIL_STACK_ERROR
- if(NULL == (f3 = H5F_efc_open(f1, filename[3],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f3 = H5F__efc_open(f1, filename[3],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp3 = H5F_open(filename[3], H5F_ACC_RDWR, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (ftmp3 = H5F_open(filename[3], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp1 = H5F_efc_open(f3, filename[1], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp1 = H5F__efc_open(f3, filename[1], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f3, ftmp1) < 0)
FAIL_STACK_ERROR
@@ -1646,14 +1505,14 @@ test_graph_cycle(void)
if(ftmp3->shared->nrefs != 2)
TEST_ERROR
- if(H5F_efc_release(f0->shared->efc) < 0)
+ if(H5F__efc_release(f0->shared->efc) < 0)
FAIL_STACK_ERROR
if(f0->shared->nrefs != 2)
TEST_ERROR
if(ftmp3->shared->nrefs != 2)
TEST_ERROR
- if(H5F_efc_release(ftmp3->shared->efc) < 0)
+ if(H5F__efc_release(ftmp3->shared->efc) < 0)
FAIL_STACK_ERROR
if(f0->shared->nrefs != 1)
TEST_ERROR
@@ -1667,30 +1526,26 @@ test_graph_cycle(void)
/* Test 15: One local and one remote cycle */
if(NULL == (f0 = H5F_open(filename[0],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f1 = H5F_efc_open(f0, filename[1],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f1 = H5F__efc_open(f0, filename[1],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp0 = H5F_efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f1, ftmp0) < 0)
FAIL_STACK_ERROR
if(H5F_efc_close(f0, f1) < 0)
FAIL_STACK_ERROR
- if(NULL == (f2 = H5F_efc_open(f0, filename[2],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f2 = H5F__efc_open(f0, filename[2],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f3 = H5F_efc_open(f2, filename[3],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f3 = H5F__efc_open(f2, filename[3],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp2 = H5F_efc_open(f3, filename[2], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp2 = H5F__efc_open(f3, filename[2], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f3, ftmp2) < 0)
FAIL_STACK_ERROR
@@ -1704,32 +1559,28 @@ test_graph_cycle(void)
if(H5F_try_close(f0, NULL) < 0)
FAIL_STACK_ERROR
if(NULL == (f0 = H5F_open(filename[0],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f0->shared->nrefs != 1)
TEST_ERROR
if(H5F_try_close(f0, NULL) < 0)
FAIL_STACK_ERROR
if(NULL == (f1 = H5F_open(filename[1],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f1->shared->nrefs != 1)
TEST_ERROR
if(H5F_try_close(f1, NULL) < 0)
FAIL_STACK_ERROR
if(NULL == (f2 = H5F_open(filename[2],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f2->shared->nrefs != 1)
TEST_ERROR
if(H5F_try_close(f2, NULL) < 0)
FAIL_STACK_ERROR
if(NULL == (f3 = H5F_open(filename[3],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f3->shared->nrefs != 1)
TEST_ERROR
@@ -1739,30 +1590,26 @@ test_graph_cycle(void)
/* Test 16: One local and one remote cycle, with release */
if(NULL == (f0 = H5F_open(filename[0],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f1 = H5F_efc_open(f0, filename[1],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f1 = H5F__efc_open(f0, filename[1],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp0 = H5F_efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f1, ftmp0) < 0)
FAIL_STACK_ERROR
if(H5F_efc_close(f0, f1) < 0)
FAIL_STACK_ERROR
- if(NULL == (f2 = H5F_efc_open(f0, filename[2],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f2 = H5F__efc_open(f0, filename[2],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f3 = H5F_efc_open(f2, filename[3],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f3 = H5F__efc_open(f2, filename[3],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp2 = H5F_efc_open(f3, filename[2], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp2 = H5F__efc_open(f3, filename[2], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f3, ftmp2) < 0)
FAIL_STACK_ERROR
@@ -1773,31 +1620,28 @@ test_graph_cycle(void)
if(f0->shared->nrefs != 2)
TEST_ERROR
- if(H5F_efc_release(f0->shared->efc) < 0)
+ if(H5F__efc_release(f0->shared->efc) < 0)
FAIL_STACK_ERROR
if(f0->shared->nrefs != 1)
TEST_ERROR
if(H5F_try_close(f0, NULL) < 0)
FAIL_STACK_ERROR
if(NULL == (f1 = H5F_open(filename[1],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f1->shared->nrefs != 1)
TEST_ERROR
if(H5F_try_close(f1, NULL) < 0)
FAIL_STACK_ERROR
if(NULL == (f2 = H5F_open(filename[2],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f2->shared->nrefs != 1)
TEST_ERROR
if(H5F_try_close(f2, NULL) < 0)
FAIL_STACK_ERROR
if(NULL == (f3 = H5F_open(filename[3],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f3->shared->nrefs != 1)
TEST_ERROR
@@ -1807,33 +1651,28 @@ test_graph_cycle(void)
/* Test 17: One local and one remote cycle, remote cycle held open */
if(NULL == (f0 = H5F_open(filename[0],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f1 = H5F_efc_open(f0, filename[1],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f1 = H5F__efc_open(f0, filename[1],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp0 = H5F_efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f1, ftmp0) < 0)
FAIL_STACK_ERROR
if(H5F_efc_close(f0, f1) < 0)
FAIL_STACK_ERROR
- if(NULL == (f2 = H5F_efc_open(f0, filename[2],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f2 = H5F__efc_open(f0, filename[2],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f3 = H5F_efc_open(f2, filename[3],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f3 = H5F__efc_open(f2, filename[3],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp3 = H5F_open(filename[3], H5F_ACC_RDWR, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (ftmp3 = H5F_open(filename[3], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp2 = H5F_efc_open(f3, filename[2], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp2 = H5F__efc_open(f3, filename[2], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f3, ftmp2) < 0)
FAIL_STACK_ERROR
@@ -1847,8 +1686,7 @@ test_graph_cycle(void)
if(H5F_try_close(f0, NULL) < 0)
FAIL_STACK_ERROR
if(NULL == (f0 = H5F_open(filename[0],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f0->shared->nrefs != 1)
TEST_ERROR
@@ -1860,24 +1698,21 @@ test_graph_cycle(void)
if(H5F_try_close(ftmp3, NULL) < 0)
FAIL_STACK_ERROR
if(NULL == (f1 = H5F_open(filename[1],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f1->shared->nrefs != 1)
TEST_ERROR
if(H5F_try_close(f1, NULL) < 0)
FAIL_STACK_ERROR
if(NULL == (f2 = H5F_open(filename[2],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f2->shared->nrefs != 1)
TEST_ERROR
if(H5F_try_close(f2, NULL) < 0)
FAIL_STACK_ERROR
if(NULL == (f3 = H5F_open(filename[3],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f3->shared->nrefs != 1)
TEST_ERROR
@@ -1888,33 +1723,28 @@ test_graph_cycle(void)
/* Test 18: One local and one remote cycle, remote cycle held open, with
* release */
if(NULL == (f0 = H5F_open(filename[0],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f1 = H5F_efc_open(f0, filename[1],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f1 = H5F__efc_open(f0, filename[1],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp0 = H5F_efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f1, ftmp0) < 0)
FAIL_STACK_ERROR
if(H5F_efc_close(f0, f1) < 0)
FAIL_STACK_ERROR
- if(NULL == (f2 = H5F_efc_open(f0, filename[2],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f2 = H5F__efc_open(f0, filename[2],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f3 = H5F_efc_open(f2, filename[3],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f3 = H5F__efc_open(f2, filename[3],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp3 = H5F_open(filename[3], H5F_ACC_RDWR, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (ftmp3 = H5F_open(filename[3], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp2 = H5F_efc_open(f3, filename[2], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp2 = H5F__efc_open(f3, filename[2], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f3, ftmp2) < 0)
FAIL_STACK_ERROR
@@ -1925,34 +1755,31 @@ test_graph_cycle(void)
if(f0->shared->nrefs != 2)
TEST_ERROR
- if(H5F_efc_release(f0->shared->efc) < 0)
+ if(H5F__efc_release(f0->shared->efc) < 0)
FAIL_STACK_ERROR
if(f0->shared->nrefs != 1)
TEST_ERROR
if(ftmp3->shared->nrefs != 2)
TEST_ERROR
if(NULL == (f1 = H5F_open(filename[1],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f1->shared->nrefs != 1)
TEST_ERROR
if(H5F_try_close(f1, NULL) < 0)
FAIL_STACK_ERROR
- if(NULL == (f2 = H5F_open(filename[2], H5F_ACC_RDWR, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f2 = H5F_open(filename[2], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f2->shared->nrefs != 2)
TEST_ERROR
if(H5F_try_close(f2, NULL) < 0)
FAIL_STACK_ERROR
- if(H5F_efc_release(ftmp3->shared->efc) < 0)
+ if(H5F__efc_release(ftmp3->shared->efc) < 0)
FAIL_STACK_ERROR
if(ftmp3->shared->nrefs != 1)
TEST_ERROR
- if(NULL == (f2 = H5F_open(filename[2], H5F_ACC_RDWR, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f2 = H5F_open(filename[2], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f2->shared->nrefs != 1)
TEST_ERROR
@@ -1968,55 +1795,49 @@ test_graph_cycle(void)
/* Test 19: "Diamond" shape with links moving from bottom (root) to top.
* Also cycle between bottom (root) and top and cycles on the sides. */
if(NULL == (f0 = H5F_open(filename[0],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f1 = H5F_efc_open(f0, filename[1],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f1 = H5F__efc_open(f0, filename[1],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f2 = H5F_efc_open(f0, filename[2],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f2 = H5F__efc_open(f0, filename[2],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f3 = H5F_efc_open(f1, filename[3],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f3 = H5F__efc_open(f1, filename[3],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f1, f3) < 0)
FAIL_STACK_ERROR
- if(NULL == (f3 = H5F_efc_open(f2, filename[3], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (f3 = H5F__efc_open(f2, filename[3], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f2, f3) < 0)
FAIL_STACK_ERROR
- if(NULL == (f3 = H5F_efc_open(f0, filename[3], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (f3 = H5F__efc_open(f0, filename[3], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp0 = H5F_efc_open(f3, filename[0], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp0 = H5F__efc_open(f3, filename[0], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f3, ftmp0) < 0)
FAIL_STACK_ERROR
if(H5F_efc_close(f0, f3) < 0)
FAIL_STACK_ERROR
- if(NULL == (f4 = H5F_efc_open(f1, filename[4],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f4 = H5F__efc_open(f1, filename[4],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp1 = H5F_efc_open(f4, filename[1], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp1 = H5F__efc_open(f4, filename[1], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f4, ftmp1) < 0)
FAIL_STACK_ERROR
if(H5F_efc_close(f1, f4) < 0)
FAIL_STACK_ERROR
- if(NULL == (f5 = H5F_efc_open(f2, filename[5],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f5 = H5F__efc_open(f2, filename[5],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp2 = H5F_efc_open(f5, filename[2], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp2 = H5F__efc_open(f5, filename[2], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f5, ftmp2) < 0)
FAIL_STACK_ERROR
@@ -2032,48 +1853,42 @@ test_graph_cycle(void)
if(H5F_try_close(f0, NULL) < 0)
FAIL_STACK_ERROR
if(NULL == (f0 = H5F_open(filename[0],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f0->shared->nrefs != 1)
TEST_ERROR
if(H5F_try_close(f0, NULL) < 0)
FAIL_STACK_ERROR
if(NULL == (f1 = H5F_open(filename[1],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f1->shared->nrefs != 1)
TEST_ERROR
if(H5F_try_close(f1, NULL) < 0)
FAIL_STACK_ERROR
if(NULL == (f2 = H5F_open(filename[2],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f2->shared->nrefs != 1)
TEST_ERROR
if(H5F_try_close(f2, NULL) < 0)
FAIL_STACK_ERROR
if(NULL == (f3 = H5F_open(filename[3],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f3->shared->nrefs != 1)
TEST_ERROR
if(H5F_try_close(f3, NULL) < 0)
FAIL_STACK_ERROR
if(NULL == (f4 = H5F_open(filename[4],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f4->shared->nrefs != 1)
TEST_ERROR
if(H5F_try_close(f4, NULL) < 0)
FAIL_STACK_ERROR
if(NULL == (f5 = H5F_open(filename[5],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f5->shared->nrefs != 1)
TEST_ERROR
@@ -2085,55 +1900,49 @@ test_graph_cycle(void)
* Also cycle between bottom (root) and top, cycles on the sides, and
* release the files instead of closing. */
if(NULL == (f0 = H5F_open(filename[0],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f1 = H5F_efc_open(f0, filename[1],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f1 = H5F__efc_open(f0, filename[1],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f2 = H5F_efc_open(f0, filename[2],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f2 = H5F__efc_open(f0, filename[2],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f3 = H5F_efc_open(f1, filename[3],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f3 = H5F__efc_open(f1, filename[3],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f1, f3) < 0)
FAIL_STACK_ERROR
- if(NULL == (f3 = H5F_efc_open(f2, filename[3], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (f3 = H5F__efc_open(f2, filename[3], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f2, f3) < 0)
FAIL_STACK_ERROR
- if(NULL == (f3 = H5F_efc_open(f0, filename[3], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (f3 = H5F__efc_open(f0, filename[3], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp0 = H5F_efc_open(f3, filename[0], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp0 = H5F__efc_open(f3, filename[0], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f3, ftmp0) < 0)
FAIL_STACK_ERROR
if(H5F_efc_close(f0, f3) < 0)
FAIL_STACK_ERROR
- if(NULL == (f4 = H5F_efc_open(f1, filename[4],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f4 = H5F__efc_open(f1, filename[4],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp1 = H5F_efc_open(f4, filename[1], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp1 = H5F__efc_open(f4, filename[1], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f4, ftmp1) < 0)
FAIL_STACK_ERROR
if(H5F_efc_close(f1, f4) < 0)
FAIL_STACK_ERROR
- if(NULL == (f5 = H5F_efc_open(f2, filename[5],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f5 = H5F__efc_open(f2, filename[5],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp2 = H5F_efc_open(f5, filename[2], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp2 = H5F__efc_open(f5, filename[2], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f5, ftmp2) < 0)
FAIL_STACK_ERROR
@@ -2146,47 +1955,42 @@ test_graph_cycle(void)
if(f0->shared->nrefs != 2)
TEST_ERROR
- if(H5F_efc_release(f0->shared->efc) < 0)
+ if(H5F__efc_release(f0->shared->efc) < 0)
FAIL_STACK_ERROR
if(f0->shared->nrefs != 1)
TEST_ERROR
if(H5F_try_close(f0, NULL) < 0)
FAIL_STACK_ERROR
if(NULL == (f1 = H5F_open(filename[1],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f1->shared->nrefs != 1)
TEST_ERROR
if(H5F_try_close(f1, NULL) < 0)
FAIL_STACK_ERROR
if(NULL == (f2 = H5F_open(filename[2],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f2->shared->nrefs != 1)
TEST_ERROR
if(H5F_try_close(f2, NULL) < 0)
FAIL_STACK_ERROR
if(NULL == (f3 = H5F_open(filename[3],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f3->shared->nrefs != 1)
TEST_ERROR
if(H5F_try_close(f3, NULL) < 0)
FAIL_STACK_ERROR
if(NULL == (f4 = H5F_open(filename[4],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f4->shared->nrefs != 1)
TEST_ERROR
if(H5F_try_close(f4, NULL) < 0)
FAIL_STACK_ERROR
if(NULL == (f5 = H5F_open(filename[5],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f5->shared->nrefs != 1)
TEST_ERROR
@@ -2197,65 +2001,57 @@ test_graph_cycle(void)
/* Test 21: "Diamond" shape with links moving from bottom (root) to top.
* Also cycle between bottom (root) and top, cycles on sides held open. */
if(NULL == (f0 = H5F_open(filename[0],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f1 = H5F_efc_open(f0, filename[1],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f1 = H5F__efc_open(f0, filename[1],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f2 = H5F_efc_open(f0, filename[2],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f2 = H5F__efc_open(f0, filename[2],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f3 = H5F_efc_open(f1, filename[3],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f3 = H5F__efc_open(f1, filename[3],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f1, f3) < 0)
FAIL_STACK_ERROR
- if(NULL == (f3 = H5F_efc_open(f2, filename[3], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (f3 = H5F__efc_open(f2, filename[3], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f2, f3) < 0)
FAIL_STACK_ERROR
- if(NULL == (f3 = H5F_efc_open(f0, filename[3], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (f3 = H5F__efc_open(f0, filename[3], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp0 = H5F_efc_open(f3, filename[0], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp0 = H5F__efc_open(f3, filename[0], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f3, ftmp0) < 0)
FAIL_STACK_ERROR
if(H5F_efc_close(f0, f3) < 0)
FAIL_STACK_ERROR
- if(NULL == (f4 = H5F_efc_open(f1, filename[4],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f4 = H5F__efc_open(f1, filename[4],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp1 = H5F_efc_open(f4, filename[1], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp1 = H5F__efc_open(f4, filename[1], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f4, ftmp1) < 0)
FAIL_STACK_ERROR
if(H5F_efc_close(f1, f4) < 0)
FAIL_STACK_ERROR
- if(NULL == (f4 = H5F_open(filename[4], H5F_ACC_RDWR, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f4 = H5F_open(filename[4], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f5 = H5F_efc_open(f2, filename[5],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f5 = H5F__efc_open(f2, filename[5],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp2 = H5F_efc_open(f5, filename[2], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp2 = H5F__efc_open(f5, filename[2], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f5, ftmp2) < 0)
FAIL_STACK_ERROR
if(H5F_efc_close(f2, f5) < 0)
FAIL_STACK_ERROR
- if(NULL == (f5 = H5F_open(filename[5], H5F_ACC_RDWR, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f5 = H5F_open(filename[5], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f0, f1) < 0)
FAIL_STACK_ERROR
@@ -2274,8 +2070,7 @@ test_graph_cycle(void)
TEST_ERROR
if(f5->shared->nrefs != 2)
TEST_ERROR
- if(NULL == (f0 = H5F_open(filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f0 = H5F_open(filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f0->shared->nrefs != 2)
TEST_ERROR
@@ -2291,8 +2086,7 @@ test_graph_cycle(void)
FAIL_STACK_ERROR
if(f5->shared->nrefs != 2)
TEST_ERROR
- if(NULL == (f0 = H5F_open(filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f0 = H5F_open(filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f0->shared->nrefs != 2)
TEST_ERROR
@@ -2303,48 +2097,42 @@ test_graph_cycle(void)
FAIL_STACK_ERROR
if(NULL == (f0 = H5F_open(filename[0],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f0->shared->nrefs != 1)
TEST_ERROR
if(H5F_try_close(f0, NULL) < 0)
FAIL_STACK_ERROR
if(NULL == (f1 = H5F_open(filename[1],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f1->shared->nrefs != 1)
TEST_ERROR
if(H5F_try_close(f1, NULL) < 0)
FAIL_STACK_ERROR
if(NULL == (f2 = H5F_open(filename[2],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f2->shared->nrefs != 1)
TEST_ERROR
if(H5F_try_close(f2, NULL) < 0)
FAIL_STACK_ERROR
if(NULL == (f3 = H5F_open(filename[3],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f3->shared->nrefs != 1)
TEST_ERROR
if(H5F_try_close(f3, NULL) < 0)
FAIL_STACK_ERROR
if(NULL == (f4 = H5F_open(filename[4],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f4->shared->nrefs != 1)
TEST_ERROR
if(H5F_try_close(f4, NULL) < 0)
FAIL_STACK_ERROR
if(NULL == (f5 = H5F_open(filename[5],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f5->shared->nrefs != 1)
TEST_ERROR
@@ -2356,65 +2144,57 @@ test_graph_cycle(void)
* Also cycle between bottom (root) and top, cycles on sides held open.
* Also release the files instead of closing. */
if(NULL == (f0 = H5F_open(filename[0],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f1 = H5F_efc_open(f0, filename[1],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f1 = H5F__efc_open(f0, filename[1],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f2 = H5F_efc_open(f0, filename[2],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f2 = H5F__efc_open(f0, filename[2],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f3 = H5F_efc_open(f1, filename[3],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f3 = H5F__efc_open(f1, filename[3],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f1, f3) < 0)
FAIL_STACK_ERROR
- if(NULL == (f3 = H5F_efc_open(f2, filename[3], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (f3 = H5F__efc_open(f2, filename[3], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f2, f3) < 0)
FAIL_STACK_ERROR
- if(NULL == (f3 = H5F_efc_open(f0, filename[3], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (f3 = H5F__efc_open(f0, filename[3], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp0 = H5F_efc_open(f3, filename[0], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp0 = H5F__efc_open(f3, filename[0], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f3, ftmp0) < 0)
FAIL_STACK_ERROR
if(H5F_efc_close(f0, f3) < 0)
FAIL_STACK_ERROR
- if(NULL == (f4 = H5F_efc_open(f1, filename[4],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f4 = H5F__efc_open(f1, filename[4],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp1 = H5F_efc_open(f4, filename[1], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp1 = H5F__efc_open(f4, filename[1], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f4, ftmp1) < 0)
FAIL_STACK_ERROR
if(H5F_efc_close(f1, f4) < 0)
FAIL_STACK_ERROR
- if(NULL == (f4 = H5F_open(filename[4], H5F_ACC_RDWR, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f4 = H5F_open(filename[4], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f5 = H5F_efc_open(f2, filename[5],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f5 = H5F__efc_open(f2, filename[5],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp2 = H5F_efc_open(f5, filename[2], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp2 = H5F__efc_open(f5, filename[2], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f5, ftmp2) < 0)
FAIL_STACK_ERROR
if(H5F_efc_close(f2, f5) < 0)
FAIL_STACK_ERROR
- if(NULL == (f5 = H5F_open(filename[5], H5F_ACC_RDWR, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f5 = H5F_open(filename[5], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f0, f1) < 0)
FAIL_STACK_ERROR
@@ -2427,7 +2207,7 @@ test_graph_cycle(void)
if(f5->shared->nrefs != 2)
TEST_ERROR
- if(H5F_efc_release(f0->shared->efc) < 0)
+ if(H5F__efc_release(f0->shared->efc) < 0)
FAIL_STACK_ERROR
if(f0->shared->nrefs != 2)
TEST_ERROR
@@ -2435,15 +2215,14 @@ test_graph_cycle(void)
TEST_ERROR
if(f5->shared->nrefs != 2)
TEST_ERROR
- if(NULL == (f3 = H5F_open(filename[3], H5F_ACC_RDWR, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f3 = H5F_open(filename[3], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f3->shared->nrefs != 3)
TEST_ERROR
if(H5F_try_close(f3, NULL) < 0)
FAIL_STACK_ERROR
- if(H5F_efc_release(f4->shared->efc) < 0)
+ if(H5F__efc_release(f4->shared->efc) < 0)
FAIL_STACK_ERROR
if(f0->shared->nrefs != 2)
TEST_ERROR
@@ -2451,15 +2230,14 @@ test_graph_cycle(void)
TEST_ERROR
if(f5->shared->nrefs != 2)
TEST_ERROR
- if(NULL == (f3 = H5F_open(filename[3], H5F_ACC_RDWR, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f3 = H5F_open(filename[3], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f3->shared->nrefs != 2)
TEST_ERROR
if(H5F_try_close(f3, NULL) < 0)
FAIL_STACK_ERROR
- if(H5F_efc_release(f5->shared->efc) < 0)
+ if(H5F__efc_release(f5->shared->efc) < 0)
FAIL_STACK_ERROR
if(f0->shared->nrefs != 1)
TEST_ERROR
@@ -2467,8 +2245,7 @@ test_graph_cycle(void)
TEST_ERROR
if(f5->shared->nrefs != 1)
TEST_ERROR
- if(NULL == (f3 = H5F_open(filename[3], H5F_ACC_RDWR, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f3 = H5F_open(filename[3], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f3->shared->nrefs != 1)
TEST_ERROR
@@ -2486,86 +2263,82 @@ test_graph_cycle(void)
/* Test 23: Dense "ball" of files. 4 files each cache all files (including
* itself). */
if(NULL == (f0 = H5F_open(filename[0],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp0 = H5F_efc_open(f0, filename[0], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp0 = H5F__efc_open(f0, filename[0], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f0, ftmp0) < 0)
FAIL_STACK_ERROR
- if(NULL == (f1 = H5F_efc_open(f0, filename[1],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f1 = H5F__efc_open(f0, filename[1],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f2 = H5F_efc_open(f0, filename[2],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f2 = H5F__efc_open(f0, filename[2],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f3 = H5F_efc_open(f0, filename[3],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f3 = H5F__efc_open(f0, filename[3],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp0 = H5F_efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f1, ftmp0) < 0)
FAIL_STACK_ERROR
- if(NULL == (ftmp1 = H5F_efc_open(f1, filename[1], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp1 = H5F__efc_open(f1, filename[1], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f1, ftmp1) < 0)
FAIL_STACK_ERROR
- if(NULL == (ftmp2 = H5F_efc_open(f1, filename[2], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp2 = H5F__efc_open(f1, filename[2], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f1, ftmp2) < 0)
FAIL_STACK_ERROR
- if(NULL == (ftmp3 = H5F_efc_open(f1, filename[3], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp3 = H5F__efc_open(f1, filename[3], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f1, ftmp3) < 0)
FAIL_STACK_ERROR
- if(NULL == (ftmp0 = H5F_efc_open(f2, filename[0], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp0 = H5F__efc_open(f2, filename[0], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f2, ftmp0) < 0)
FAIL_STACK_ERROR
- if(NULL == (ftmp1 = H5F_efc_open(f2, filename[1], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp1 = H5F__efc_open(f2, filename[1], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f2, ftmp1) < 0)
FAIL_STACK_ERROR
- if(NULL == (ftmp2 = H5F_efc_open(f2, filename[2], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp2 = H5F__efc_open(f2, filename[2], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f2, ftmp2) < 0)
FAIL_STACK_ERROR
- if(NULL == (ftmp3 = H5F_efc_open(f2, filename[3], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp3 = H5F__efc_open(f2, filename[3], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f2, ftmp3) < 0)
FAIL_STACK_ERROR
- if(NULL == (ftmp0 = H5F_efc_open(f3, filename[0], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp0 = H5F__efc_open(f3, filename[0], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f3, ftmp0) < 0)
FAIL_STACK_ERROR
- if(NULL == (ftmp1 = H5F_efc_open(f3, filename[1], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp1 = H5F__efc_open(f3, filename[1], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f3, ftmp1) < 0)
FAIL_STACK_ERROR
- if(NULL == (ftmp2 = H5F_efc_open(f3, filename[2], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp2 = H5F__efc_open(f3, filename[2], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f3, ftmp2) < 0)
FAIL_STACK_ERROR
- if(NULL == (ftmp3 = H5F_efc_open(f3, filename[3], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp3 = H5F__efc_open(f3, filename[3], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f3, ftmp3) < 0)
FAIL_STACK_ERROR
@@ -2580,32 +2353,28 @@ test_graph_cycle(void)
if(H5F_try_close(f0, NULL) < 0)
FAIL_STACK_ERROR
if(NULL == (f0 = H5F_open(filename[0],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f0->shared->nrefs != 1)
TEST_ERROR
if(H5F_try_close(f0, NULL) < 0)
FAIL_STACK_ERROR
if(NULL == (f1 = H5F_open(filename[1],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f1->shared->nrefs != 1)
TEST_ERROR
if(H5F_try_close(f1, NULL) < 0)
FAIL_STACK_ERROR
if(NULL == (f2 = H5F_open(filename[2],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f2->shared->nrefs != 1)
TEST_ERROR
if(H5F_try_close(f2, NULL) < 0)
FAIL_STACK_ERROR
if(NULL == (f3 = H5F_open(filename[3],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f3->shared->nrefs != 1)
TEST_ERROR
@@ -2616,86 +2385,82 @@ test_graph_cycle(void)
/* Test 24: Dense "ball" of files. 4 files each cache all files (including
* itself). Release the files instead of closing. */
if(NULL == (f0 = H5F_open(filename[0],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp0 = H5F_efc_open(f0, filename[0], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp0 = H5F__efc_open(f0, filename[0], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f0, ftmp0) < 0)
FAIL_STACK_ERROR
- if(NULL == (f1 = H5F_efc_open(f0, filename[1],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f1 = H5F__efc_open(f0, filename[1],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f2 = H5F_efc_open(f0, filename[2],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f2 = H5F__efc_open(f0, filename[2],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f3 = H5F_efc_open(f0, filename[3],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f3 = H5F__efc_open(f0, filename[3],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp0 = H5F_efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f1, ftmp0) < 0)
FAIL_STACK_ERROR
- if(NULL == (ftmp1 = H5F_efc_open(f1, filename[1], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp1 = H5F__efc_open(f1, filename[1], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f1, ftmp1) < 0)
FAIL_STACK_ERROR
- if(NULL == (ftmp2 = H5F_efc_open(f1, filename[2], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp2 = H5F__efc_open(f1, filename[2], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f1, ftmp2) < 0)
FAIL_STACK_ERROR
- if(NULL == (ftmp3 = H5F_efc_open(f1, filename[3], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp3 = H5F__efc_open(f1, filename[3], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f1, ftmp3) < 0)
FAIL_STACK_ERROR
- if(NULL == (ftmp0 = H5F_efc_open(f2, filename[0], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp0 = H5F__efc_open(f2, filename[0], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f2, ftmp0) < 0)
FAIL_STACK_ERROR
- if(NULL == (ftmp1 = H5F_efc_open(f2, filename[1], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp1 = H5F__efc_open(f2, filename[1], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f2, ftmp1) < 0)
FAIL_STACK_ERROR
- if(NULL == (ftmp2 = H5F_efc_open(f2, filename[2], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp2 = H5F__efc_open(f2, filename[2], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f2, ftmp2) < 0)
FAIL_STACK_ERROR
- if(NULL == (ftmp3 = H5F_efc_open(f2, filename[3], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp3 = H5F__efc_open(f2, filename[3], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f2, ftmp3) < 0)
FAIL_STACK_ERROR
- if(NULL == (ftmp0 = H5F_efc_open(f3, filename[0], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp0 = H5F__efc_open(f3, filename[0], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f3, ftmp0) < 0)
FAIL_STACK_ERROR
- if(NULL == (ftmp1 = H5F_efc_open(f3, filename[1], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp1 = H5F__efc_open(f3, filename[1], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f3, ftmp1) < 0)
FAIL_STACK_ERROR
- if(NULL == (ftmp2 = H5F_efc_open(f3, filename[2], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp2 = H5F__efc_open(f3, filename[2], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f3, ftmp2) < 0)
FAIL_STACK_ERROR
- if(NULL == (ftmp3 = H5F_efc_open(f3, filename[3], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp3 = H5F__efc_open(f3, filename[3], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f3, ftmp3) < 0)
FAIL_STACK_ERROR
@@ -2707,31 +2472,28 @@ test_graph_cycle(void)
if(H5F_efc_close(f0, f3) < 0)
FAIL_STACK_ERROR
- if(H5F_efc_release(f0->shared->efc) < 0)
+ if(H5F__efc_release(f0->shared->efc) < 0)
FAIL_STACK_ERROR
if(f0->shared->nrefs != 1)
TEST_ERROR
if(H5F_try_close(f0, NULL) < 0)
FAIL_STACK_ERROR
if(NULL == (f1 = H5F_open(filename[1],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f1->shared->nrefs != 1)
TEST_ERROR
if(H5F_try_close(f1, NULL) < 0)
FAIL_STACK_ERROR
if(NULL == (f2 = H5F_open(filename[2],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f2->shared->nrefs != 1)
TEST_ERROR
if(H5F_try_close(f2, NULL) < 0)
FAIL_STACK_ERROR
if(NULL == (f3 = H5F_open(filename[3],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f3->shared->nrefs != 1)
TEST_ERROR
@@ -2741,15 +2503,13 @@ test_graph_cycle(void)
/* Test 25: File held open by EFC client interrupts cycle, with release */
if(NULL == (f0 = H5F_open(filename[0],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f1 = H5F_efc_open(f0, filename[1],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f1 = H5F__efc_open(f0, filename[1],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp0 = H5F_efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f1, ftmp0) < 0)
FAIL_STACK_ERROR
@@ -2758,7 +2518,7 @@ test_graph_cycle(void)
if(f1->shared->nrefs != 1)
TEST_ERROR
- if(H5F_efc_release(f0->shared->efc) < 0)
+ if(H5F__efc_release(f0->shared->efc) < 0)
FAIL_STACK_ERROR
if(f0->shared->nrefs != 2)
TEST_ERROR
@@ -2769,7 +2529,7 @@ test_graph_cycle(void)
if(f0->shared->nrefs != 2)
TEST_ERROR
- if(H5F_efc_release(f0->shared->efc) < 0)
+ if(H5F__efc_release(f0->shared->efc) < 0)
FAIL_STACK_ERROR
if(f0->shared->nrefs != 1)
TEST_ERROR
@@ -2779,30 +2539,27 @@ test_graph_cycle(void)
/* Test 26: File held open by EFC does not interrupt cycle, with release */
if(NULL == (f0 = H5F_open(filename[0],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f1 = H5F_efc_open(f0, filename[1],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f1 = H5F__efc_open(f0, filename[1],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp0 = H5F_efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f1, ftmp0) < 0)
FAIL_STACK_ERROR
if(H5F_efc_close(f0, f1) < 0)
FAIL_STACK_ERROR
- if(NULL == (f2 = H5F_efc_open(f0, filename[2],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f2 = H5F__efc_open(f0, filename[2],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f0->shared->nrefs != 2)
TEST_ERROR
if(f2->shared->nrefs != 1)
TEST_ERROR
- if(H5F_efc_release(f0->shared->efc) < 0)
+ if(H5F__efc_release(f0->shared->efc) < 0)
FAIL_STACK_ERROR
if(f0->shared->nrefs != 1)
TEST_ERROR
@@ -2819,30 +2576,26 @@ test_graph_cycle(void)
/* Test 27: File held open by EFC client through non-parent file does not
* interrupt cycle, but parent file does (no valid way around it) */
if(NULL == (f0 = H5F_open(filename[0],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f1 = H5F_efc_open(f0, filename[1],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f1 = H5F__efc_open(f0, filename[1],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp0 = H5F_efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f1, ftmp0) < 0)
FAIL_STACK_ERROR
if(H5F_efc_close(f0, f1) < 0)
FAIL_STACK_ERROR
if(NULL == (f2 = H5F_open(filename[2],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f1 = H5F_efc_open(f2, filename[1], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (f1 = H5F__efc_open(f2, filename[1], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f3 = H5F_efc_open(f1, filename[3],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f3 = H5F__efc_open(f1, filename[3],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f0->shared->nrefs != 2)
TEST_ERROR
@@ -2861,8 +2614,7 @@ test_graph_cycle(void)
TEST_ERROR
if(f3->shared->nrefs != 1)
TEST_ERROR
- if(NULL == (f0 = H5F_open(filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f0 = H5F_open(filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f0->shared->nrefs != 2)
TEST_ERROR
@@ -2875,15 +2627,13 @@ test_graph_cycle(void)
TEST_ERROR
if(f2->shared->nrefs != 1)
TEST_ERROR
- if(NULL == (f0 = H5F_open(filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f0 = H5F_open(filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f0->shared->nrefs != 2)
TEST_ERROR
if(H5F_try_close(f0, NULL) < 0)
FAIL_STACK_ERROR
- if(NULL == (f3 = H5F_open(filename[3], H5F_ACC_RDWR, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f3 = H5F_open(filename[3], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f3->shared->nrefs != 2)
TEST_ERROR
@@ -2894,22 +2644,19 @@ test_graph_cycle(void)
FAIL_STACK_ERROR
if(f2->shared->nrefs != 1)
TEST_ERROR
- if(NULL == (f0 = H5F_open(filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f0 = H5F_open(filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f0->shared->nrefs != 2)
TEST_ERROR
if(H5F_try_close(f0, NULL) < 0)
FAIL_STACK_ERROR
- if(NULL == (f1 = H5F_open(filename[1], H5F_ACC_RDWR, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f1 = H5F_open(filename[1], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f1->shared->nrefs != 3)
TEST_ERROR
if(H5F_try_close(f1, NULL) < 0)
FAIL_STACK_ERROR
- if(NULL == (f3 = H5F_open(filename[3], H5F_ACC_RDWR, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f3 = H5F_open(filename[3], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f3->shared->nrefs != 2)
TEST_ERROR
@@ -2918,29 +2665,25 @@ test_graph_cycle(void)
if(H5F_try_close(f2, NULL) < 0)
FAIL_STACK_ERROR
- if(NULL == (f0 = H5F_open(filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f0 = H5F_open(filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f0->shared->nrefs != 1)
TEST_ERROR
if(H5F_try_close(f0, NULL) < 0)
FAIL_STACK_ERROR
- if(NULL == (f1 = H5F_open(filename[1], H5F_ACC_RDWR, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f1 = H5F_open(filename[1], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f1->shared->nrefs != 1)
TEST_ERROR
if(H5F_try_close(f1, NULL) < 0)
FAIL_STACK_ERROR
- if(NULL == (f2 = H5F_open(filename[2], H5F_ACC_RDWR, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f2 = H5F_open(filename[2], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f2->shared->nrefs != 1)
TEST_ERROR
if(H5F_try_close(f2, NULL) < 0)
FAIL_STACK_ERROR
- if(NULL == (f3 = H5F_open(filename[3], H5F_ACC_RDWR, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f3 = H5F_open(filename[3], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f3->shared->nrefs != 1)
TEST_ERROR
@@ -2952,30 +2695,26 @@ test_graph_cycle(void)
* interrupt cycle, but parent file does (no valid way around it), with
* release */
if(NULL == (f0 = H5F_open(filename[0],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f1 = H5F_efc_open(f0, filename[1],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f1 = H5F__efc_open(f0, filename[1],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp0 = H5F_efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f1, ftmp0) < 0)
FAIL_STACK_ERROR
if(H5F_efc_close(f0, f1) < 0)
FAIL_STACK_ERROR
if(NULL == (f2 = H5F_open(filename[2],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f1 = H5F_efc_open(f2, filename[1], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (f1 = H5F__efc_open(f2, filename[1], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f3 = H5F_efc_open(f1, filename[3],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f3 = H5F__efc_open(f1, filename[3],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f0->shared->nrefs != 2)
TEST_ERROR
@@ -2986,7 +2725,7 @@ test_graph_cycle(void)
if(f3->shared->nrefs != 1)
TEST_ERROR
- if(H5F_efc_release(f0->shared->efc) < 0)
+ if(H5F__efc_release(f0->shared->efc) < 0)
FAIL_STACK_ERROR
if(f0->shared->nrefs != 2)
TEST_ERROR
@@ -2997,7 +2736,7 @@ test_graph_cycle(void)
if(f3->shared->nrefs != 1)
TEST_ERROR
- if(H5F_efc_release(f2->shared->efc) < 0)
+ if(H5F__efc_release(f2->shared->efc) < 0)
FAIL_STACK_ERROR
if(f0->shared->nrefs != 2)
TEST_ERROR
@@ -3012,21 +2751,19 @@ test_graph_cycle(void)
FAIL_STACK_ERROR
if(H5F_efc_close(f2, f1) < 0)
FAIL_STACK_ERROR
- if(H5F_efc_release(f2->shared->efc) < 0)
+ if(H5F__efc_release(f2->shared->efc) < 0)
FAIL_STACK_ERROR
if(f0->shared->nrefs != 1)
TEST_ERROR
if(f2->shared->nrefs != 1)
TEST_ERROR
- if(NULL == (f1 = H5F_open(filename[1], H5F_ACC_RDWR, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f1 = H5F_open(filename[1], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f1->shared->nrefs != 1)
TEST_ERROR
if(H5F_try_close(f1, NULL) < 0)
FAIL_STACK_ERROR
- if(NULL == (f3 = H5F_open(filename[3], H5F_ACC_RDWR, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f3 = H5F_open(filename[3], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f3->shared->nrefs != 1)
TEST_ERROR
@@ -3041,19 +2778,17 @@ test_graph_cycle(void)
/* Test 29: File without EFC interrupts cycle */
if(NULL == (f0 = H5F_open(filename[0],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(H5Pset_elink_file_cache_size(fapl_id, 0) < 0)
TEST_ERROR
- if(NULL == (f1 = H5F_efc_open(f0, filename[1],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f1 = H5F__efc_open(f0, filename[1],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(H5Pset_elink_file_cache_size(fapl_id, 8) < 0)
TEST_ERROR
- if(NULL == (ftmp0 = H5F_efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(f0->shared->nrefs != 2)
TEST_ERROR
@@ -3068,15 +2803,13 @@ test_graph_cycle(void)
if(H5F_try_close(f0, NULL) < 0)
FAIL_STACK_ERROR
- if(NULL == (f0 = H5F_open(filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f0 = H5F_open(filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f0->shared->nrefs != 1)
TEST_ERROR
if(H5F_try_close(f0, NULL) < 0)
FAIL_STACK_ERROR
- if(NULL == (f1 = H5F_open(filename[1], H5F_ACC_RDWR, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f1 = H5F_open(filename[1], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f1->shared->nrefs != 1)
TEST_ERROR
@@ -3086,15 +2819,13 @@ test_graph_cycle(void)
/* Test 30: File without EFC does not interrupt cycle */
if(NULL == (f0 = H5F_open(filename[0],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (f1 = H5F_efc_open(f0, filename[1],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f1 = H5F__efc_open(f0, filename[1],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
- if(NULL == (ftmp0 = H5F_efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id,
- fapl_id, dxpl_id)))
+ if(NULL == (ftmp0 = H5F__efc_open(f1, filename[0], H5F_ACC_RDWR, fcpl_id,
+ fapl_id)))
FAIL_STACK_ERROR
if(H5F_efc_close(f1, ftmp0) < 0)
FAIL_STACK_ERROR
@@ -3102,9 +2833,8 @@ test_graph_cycle(void)
FAIL_STACK_ERROR
if(H5Pset_elink_file_cache_size(fapl_id, 0) < 0)
TEST_ERROR
- if(NULL == (f2 = H5F_efc_open(f1, filename[2],
- H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f2 = H5F__efc_open(f1, filename[2],
+ H5F_ACC_RDWR | H5F_ACC_CREAT | H5F_ACC_TRUNC, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(H5Pset_elink_file_cache_size(fapl_id, 8) < 0)
TEST_ERROR
@@ -3115,22 +2845,19 @@ test_graph_cycle(void)
if(H5F_try_close(f0, NULL) < 0)
FAIL_STACK_ERROR
- if(NULL == (f0 = H5F_open(filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f0 = H5F_open(filename[0], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f0->shared->nrefs != 1)
TEST_ERROR
if(H5F_try_close(f0, NULL) < 0)
FAIL_STACK_ERROR
- if(NULL == (f1 = H5F_open(filename[1], H5F_ACC_RDWR, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f1 = H5F_open(filename[1], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f1->shared->nrefs != 1)
TEST_ERROR
if(H5F_try_close(f1, NULL) < 0)
FAIL_STACK_ERROR
- if(NULL == (f2 = H5F_open(filename[2], H5F_ACC_RDWR, fcpl_id, fapl_id,
- dxpl_id)))
+ if(NULL == (f2 = H5F_open(filename[2], H5F_ACC_RDWR, fcpl_id, fapl_id)))
FAIL_STACK_ERROR
if(f2->shared->nrefs != 1)
TEST_ERROR
@@ -3164,6 +2891,7 @@ int
main(void)
{
unsigned nerrors = 0; /* track errors */
+ hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
/* Test Setup */
puts("Testing the external file cache");
@@ -3171,7 +2899,6 @@ main(void)
/* Create property lists */
fcpl_id = H5Pcreate(H5P_FILE_CREATE);
fapl_id = h5_fileaccess();
- dxpl_id = H5AC_ind_read_dxpl_id;
/* Patch filenames */
h5_fixname(FILENAME[0], fapl_id, filename[0], sizeof(filename[0]));
@@ -3181,6 +2908,10 @@ main(void)
h5_fixname(FILENAME[4], fapl_id, filename[4], sizeof(filename[4]));
h5_fixname(FILENAME[5], fapl_id, filename[5], sizeof(filename[5]));
+ /* Push API context */
+ if(H5CX_push() < 0) FAIL_STACK_ERROR
+ api_ctx_pushed = TRUE;
+
/* Test Functions */
nerrors += test_single();
nerrors += test_graph_nocycle();
@@ -3193,6 +2924,10 @@ main(void)
/* Verify symbol table messages are cached */
nerrors += (h5_verify_cached_stabs(FILENAME, fapl_id) < 0 ? 1 : 0);
+ /* Pop API context */
+ if(api_ctx_pushed && H5CX_pop() < 0) FAIL_STACK_ERROR
+ api_ctx_pushed = FALSE;
+
if(nerrors)
goto error;
@@ -3209,6 +2944,8 @@ error:
H5Pclose(fapl_id);
} H5E_END_TRY
+ if(api_ctx_pushed) H5CX_pop();
+
return 1;
} /* end main() */
diff --git a/test/enc_dec_plist.c b/test/enc_dec_plist.c
index 5179e8e..36db2d0 100644
--- a/test/enc_dec_plist.c
+++ b/test/enc_dec_plist.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
diff --git a/test/enc_dec_plist_cross_platform.c b/test/enc_dec_plist_cross_platform.c
index a5d5552..1fbb41b 100644
--- a/test/enc_dec_plist_cross_platform.c
+++ b/test/enc_dec_plist_cross_platform.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
@@ -180,7 +178,7 @@ test_plists(const char *filename_prefix)
/* Read file 1 */
testfile = H5_get_srcdir_filename(filename);
- if((fd_1 = HDopen(testfile, O_RDONLY, 0666)) < 0)
+ if((fd_1 = HDopen(testfile, O_RDONLY)) < 0)
TEST_ERROR
size_1 = (size_t)HDlseek(fd_1, (HDoff_t)0, SEEK_END);
HDlseek(fd_1, (HDoff_t)0, SEEK_SET);
@@ -197,7 +195,7 @@ test_plists(const char *filename_prefix)
/* Read file 1 */
testfile = H5_get_srcdir_filename(filename);
- if((fd_2 = HDopen(testfile, O_RDONLY, 0666)) < 0)
+ if((fd_2 = HDopen(testfile, O_RDONLY)) < 0)
TEST_ERROR
size_2 = (size_t)HDlseek(fd_2, (HDoff_t)0, SEEK_END);
HDlseek(fd_2, (HDoff_t)0, SEEK_SET);
diff --git a/test/enum.c b/test/enum.c
index 29b702d..4e20713 100644
--- a/test/enum.c
+++ b/test/enum.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
diff --git a/test/err_compat.c b/test/err_compat.c
index 7779ddc..eee150b 100644
--- a/test/err_compat.c
+++ b/test/err_compat.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
diff --git a/test/error_test.c b/test/error_test.c
index b150656..5356fa7 100644
--- a/test/error_test.c
+++ b/test/error_test.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
@@ -84,35 +82,33 @@ static herr_t custom_print_cb(unsigned n, const H5E_error2_t *err_desc,
/*-------------------------------------------------------------------------
- * Function: test_error
+ * Function: test_error
*
- * Purpose: Test error API functions
+ * Purpose: Test error API functions
*
- * Return: Success: 0
- *
- * Failure: -1
- *
- * Programmer: Raymond Lu
- * July 10, 2003
+ * Return: Success: 0
+ * Failure: -1
*
*-------------------------------------------------------------------------
*/
static herr_t
test_error(hid_t file)
{
- hid_t dataset, space;
- hid_t estack_id;
+ hid_t dataset = -1;
+ hid_t space = -1;
+ hid_t estack_id = -1;
hsize_t dims[2];
const char *FUNC_test_error = "test_error";
H5E_auto2_t old_func;
- void *old_data;
+ void *old_data = NULL;
HDfprintf(stderr, "\nTesting error API based on data I/O\n");
/* Create the data space */
dims[0] = DIM0;
dims[1] = DIM1;
- if ((space = H5Screate_simple(2, dims, NULL))<0) TEST_ERROR;
+ if ((space = H5Screate_simple(2, dims, NULL)) < 0)
+ TEST_ERROR;
/* Test H5E_BEGIN_TRY */
H5E_BEGIN_TRY {
@@ -120,40 +116,40 @@ test_error(hid_t file)
} H5E_END_TRY;
/* Create the dataset */
- if((dataset = H5Dcreate2(file, DSET_NAME, H5T_STD_I32BE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
+ if ((dataset = H5Dcreate2(file, DSET_NAME, H5T_STD_I32BE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
H5Epush(H5E_DEFAULT, __FILE__, FUNC_test_error, __LINE__, ERR_CLS, ERR_MAJ_IO, ERR_MIN_CREATE,
"H5Dcreate2 failed");
goto error;
- } /* end if */
+ }
/* Test enabling and disabling default printing */
- if(H5Eget_auto2(H5E_DEFAULT, &old_func, &old_data) < 0)
- TEST_ERROR;
- if(old_data != NULL)
- TEST_ERROR;
+ if (H5Eget_auto2(H5E_DEFAULT, &old_func, &old_data) < 0)
+ TEST_ERROR;
+ if (old_data != NULL)
+ TEST_ERROR;
#ifdef H5_USE_16_API
if (old_func != (H5E_auto_t)H5Eprint)
- TEST_ERROR;
+ TEST_ERROR;
#else /* H5_USE_16_API */
if (old_func != (H5E_auto2_t)H5Eprint2)
- TEST_ERROR;
+ TEST_ERROR;
#endif /* H5_USE_16_API */
- if(H5Eset_auto2(H5E_DEFAULT, NULL, NULL) < 0)
+ if (H5Eset_auto2(H5E_DEFAULT, NULL, NULL) < 0)
TEST_ERROR;
/* Make H5Dwrite fail, verify default print is disabled */
- if(H5Dwrite(FAKE_ID, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, ipoints2) >= 0) {
+ if (H5Dwrite(FAKE_ID, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, ipoints2) >= 0) {
H5Epush(H5E_DEFAULT, __FILE__, FUNC_test_error, __LINE__, ERR_CLS, ERR_MAJ_IO, ERR_MIN_WRITE,
"H5Dwrite shouldn't succeed");
goto error;
- } /* end if */
+ }
- if(H5Eset_auto2(H5E_DEFAULT, old_func, old_data) < 0)
+ if (H5Eset_auto2(H5E_DEFAULT, old_func, old_data) < 0)
TEST_ERROR;
/* Test saving and restoring the current error stack */
- if(H5Dwrite(FAKE_ID, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, ipoints2) < 0) {
+ if (H5Dwrite(FAKE_ID, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, ipoints2) < 0) {
H5Epush(H5E_DEFAULT, __FILE__, FUNC_test_error, __LINE__, ERR_CLS, ERR_MAJ_IO, ERR_MIN_WRITE,
"H5Dwrite failed as supposed to");
estack_id = H5Eget_current_stack();
@@ -161,10 +157,11 @@ test_error(hid_t file)
H5Sclose(space);
H5Eset_current_stack(estack_id);
goto error;
- } /* end if */
+ }
/* In case program comes to this point, close dataset */
- if(H5Dclose(dataset) < 0) TEST_ERROR;
+ if(H5Dclose(dataset) < 0)
+ TEST_ERROR;
TEST_ERROR;
@@ -174,16 +171,12 @@ test_error(hid_t file)
/*-------------------------------------------------------------------------
- * Function: init_error
+ * Function: init_error
*
- * Purpose: Initialize error information.
+ * Purpose: Initialize error information.
*
- * Return: Success: 0
- *
- * Failure: -1
- *
- * Programmer: Raymond Lu
- * July 10, 2003
+ * Return: Success: 0
+ * Failure: -1
*
*-------------------------------------------------------------------------
*/
@@ -196,46 +189,46 @@ init_error(void)
char *msg = NULL;
H5E_type_t msg_type;
- if(NULL == (cls_name = (char *)HDmalloc(HDstrlen(ERR_CLS_NAME) + 1)))
+ if (NULL == (cls_name = (char *)HDmalloc(HDstrlen(ERR_CLS_NAME) + 1)))
TEST_ERROR
- if(NULL == (msg = (char *)HDmalloc(HDstrlen(ERR_MIN_SUBROUTINE_MSG) + 1)))
+ if (NULL == (msg = (char *)HDmalloc(HDstrlen(ERR_MIN_SUBROUTINE_MSG) + 1)))
TEST_ERROR
- if((ERR_CLS = H5Eregister_class(ERR_CLS_NAME, PROG_NAME, PROG_VERS)) < 0)
+ if ((ERR_CLS = H5Eregister_class(ERR_CLS_NAME, PROG_NAME, PROG_VERS)) < 0)
TEST_ERROR;
- if(cls_size != H5Eget_class_name(ERR_CLS, cls_name, (size_t)cls_size) + 1)
+ if (cls_size != H5Eget_class_name(ERR_CLS, cls_name, (size_t)cls_size) + 1)
TEST_ERROR;
- if(HDstrcmp(ERR_CLS_NAME, cls_name))
+ if (HDstrcmp(ERR_CLS_NAME, cls_name))
TEST_ERROR;
- if((ERR_MAJ_TEST = H5Ecreate_msg(ERR_CLS, H5E_MAJOR, ERR_MAJ_TEST_MSG)) < 0)
+ if ((ERR_MAJ_TEST = H5Ecreate_msg(ERR_CLS, H5E_MAJOR, ERR_MAJ_TEST_MSG)) < 0)
TEST_ERROR;
- if((ERR_MAJ_IO = H5Ecreate_msg(ERR_CLS, H5E_MAJOR, ERR_MAJ_IO_MSG)) < 0)
+ if ((ERR_MAJ_IO = H5Ecreate_msg(ERR_CLS, H5E_MAJOR, ERR_MAJ_IO_MSG)) < 0)
TEST_ERROR;
- if((ERR_MAJ_API = H5Ecreate_msg(ERR_CLS, H5E_MAJOR, ERR_MAJ_API_MSG)) < 0)
+ if ((ERR_MAJ_API = H5Ecreate_msg(ERR_CLS, H5E_MAJOR, ERR_MAJ_API_MSG)) < 0)
TEST_ERROR;
- if((ERR_MIN_SUBROUTINE = H5Ecreate_msg(ERR_CLS, H5E_MINOR, ERR_MIN_SUBROUTINE_MSG)) < 0)
+ if ((ERR_MIN_SUBROUTINE = H5Ecreate_msg(ERR_CLS, H5E_MINOR, ERR_MIN_SUBROUTINE_MSG)) < 0)
TEST_ERROR;
- if((ERR_MIN_ERRSTACK = H5Ecreate_msg(ERR_CLS, H5E_MINOR, ERR_MIN_ERRSTACK_MSG)) < 0)
+ if ((ERR_MIN_ERRSTACK = H5Ecreate_msg(ERR_CLS, H5E_MINOR, ERR_MIN_ERRSTACK_MSG)) < 0)
TEST_ERROR;
- if((ERR_MIN_CREATE = H5Ecreate_msg(ERR_CLS, H5E_MINOR, ERR_MIN_CREATE_MSG)) < 0)
+ if ((ERR_MIN_CREATE = H5Ecreate_msg(ERR_CLS, H5E_MINOR, ERR_MIN_CREATE_MSG)) < 0)
TEST_ERROR;
- if((ERR_MIN_WRITE = H5Ecreate_msg(ERR_CLS, H5E_MINOR, ERR_MIN_WRITE_MSG)) < 0)
+ if ((ERR_MIN_WRITE = H5Ecreate_msg(ERR_CLS, H5E_MINOR, ERR_MIN_WRITE_MSG)) < 0)
TEST_ERROR;
- if((ERR_MIN_GETNUM = H5Ecreate_msg(ERR_CLS, H5E_MINOR, ERR_MIN_GETNUM_MSG)) < 0)
+ if ((ERR_MIN_GETNUM = H5Ecreate_msg(ERR_CLS, H5E_MINOR, ERR_MIN_GETNUM_MSG)) < 0)
TEST_ERROR;
- if(msg_size != H5Eget_msg(ERR_MIN_SUBROUTINE, &msg_type, msg, (size_t)msg_size) + 1)
+ if (msg_size != H5Eget_msg(ERR_MIN_SUBROUTINE, &msg_type, msg, (size_t)msg_size) + 1)
TEST_ERROR;
- if(msg_type != H5E_MINOR)
+ if (msg_type != H5E_MINOR)
TEST_ERROR;
- if(HDstrcmp(msg, ERR_MIN_SUBROUTINE_MSG))
+ if (HDstrcmp(msg, ERR_MIN_SUBROUTINE_MSG))
TEST_ERROR;
/* Register another class for later testing. */
- if((ERR_CLS2 = H5Eregister_class(ERR_CLS2_NAME, PROG2_NAME, PROG_VERS)) < 0)
+ if ((ERR_CLS2 = H5Eregister_class(ERR_CLS2_NAME, PROG2_NAME, PROG_VERS)) < 0)
TEST_ERROR;
HDfree(cls_name);
@@ -244,9 +237,9 @@ init_error(void)
return 0;
error:
- if(cls_name)
+ if (cls_name)
HDfree(cls_name);
- if(msg)
+ if (msg)
HDfree(msg);
return -1;
@@ -254,16 +247,12 @@ error:
/*-------------------------------------------------------------------------
- * Function: error_stack
- *
- * Purpose: Manipulates current error stack.
+ * Function: error_stack
*
- * Return: Success: 0
+ * Purpose: Manipulates current error stack.
*
- * Failure: -1
- *
- * Programmer: Raymond Lu
- * July 14, 2003
+ * Return: Success: 0
+ * Failure: -1
*
*-------------------------------------------------------------------------
*/
@@ -273,23 +262,23 @@ error_stack(void)
ssize_t err_num;
const char *FUNC_error_stack = "error_stack";
- if((err_num = H5Eget_num(H5E_DEFAULT)) < 0)
+ if ((err_num = H5Eget_num(H5E_DEFAULT)) < 0)
TEST_ERROR;
- if(err_num)
+ if (err_num)
TEST_ERROR;
- if((ERR_STACK = H5Eget_current_stack()) < 0)
+ if ((ERR_STACK = H5Eget_current_stack()) < 0)
TEST_ERROR;
/* Make it push error, force this function to fail */
- if((err_num = H5Eget_num(ERR_STACK)) == 0) {
+ if ((err_num = H5Eget_num(ERR_STACK)) == 0) {
H5Epush(ERR_STACK, __FILE__, FUNC_error_stack, __LINE__, ERR_CLS, ERR_MAJ_API, ERR_MIN_GETNUM,
"Get number test failed, returned %d", (int)err_num);
goto error;
- } /* end if */
+ }
/* In case program falls through here, close the stack and let it fail. */
- if(H5Eclose_stack(ERR_STACK) < 0)
+ if (H5Eclose_stack(ERR_STACK) < 0)
TEST_ERROR;
return -1;
@@ -302,14 +291,10 @@ error:
/*-------------------------------------------------------------------------
* Function: long_desc_cb
*
- * Purpose: Callback function to help test long description handling
- *
- * Return: Success: 0
+ * Purpose: Callback function to help test long description handling
*
- * Failure: -1
- *
- * Programmer: Quincey Koziol
- * January 19, 2005
+ * Return: Success: 0
+ * Failure: -1
*
*-------------------------------------------------------------------------
*/
@@ -318,24 +303,20 @@ long_desc_cb(unsigned H5_ATTR_UNUSED n, const H5E_error2_t *err_desc, void *clie
{
char *real_desc = (char *)client_data;
- if(err_desc->desc != NULL && HDstrcmp(err_desc->desc, real_desc) == 0)
- return(0);
+ if (err_desc->desc != NULL && HDstrcmp(err_desc->desc, real_desc) == 0)
+ return 0;
else
- return(-1);
+ return -1;
} /* end long_desc_cb() */
/*-------------------------------------------------------------------------
- * Function: test_long_desc
+ * Function: test_long_desc
*
- * Purpose: Test long error description handling
+ * Purpose: Test long error description handling
*
- * Return: Success: 0
- *
- * Failure: -1
- *
- * Programmer: Quincey Koziol
- * January 19, 2005
+ * Return: Success: 0
+ * Failure: -1
*
*-------------------------------------------------------------------------
*/
@@ -349,56 +330,59 @@ test_long_desc(void)
const char *test_FUNC = "test_long_desc";
/* Allocate space for the error description info */
- if(NULL == (long_desc = (char*)HDmalloc(LONG_DESC_SIZE))) TEST_ERROR;
- if(NULL == (full_desc = (char*)HDmalloc(LONG_DESC_SIZE + 128))) TEST_ERROR;
+ if (NULL == (long_desc = (char *)HDmalloc(LONG_DESC_SIZE)))
+ TEST_ERROR;
+ if (NULL == (full_desc = (char *)HDmalloc(LONG_DESC_SIZE + 128)))
+ TEST_ERROR;
/* Create the long part of the error description */
- for(u = 0; u < LONG_DESC_SIZE; u++)
+ for (u = 0; u < LONG_DESC_SIZE; u++)
long_desc[u] = (char)('A' + (u % 26));
long_desc[LONG_DESC_SIZE - 1] = '\0';
/* Clear the default error stack */
- if(H5Eclear2(H5E_DEFAULT) < 0) TEST_ERROR;
+ if (H5Eclear2(H5E_DEFAULT) < 0)
+ TEST_ERROR;
/* Push an error with a long description */
- if(H5Epush(H5E_DEFAULT, __FILE__, test_FUNC, __LINE__, ERR_CLS, ERR_MAJ_TEST, ERR_MIN_SUBROUTINE, format, long_desc) < 0) TEST_ERROR;
+ if (H5Epush(H5E_DEFAULT, __FILE__, test_FUNC, __LINE__, ERR_CLS, ERR_MAJ_TEST, ERR_MIN_SUBROUTINE, format, long_desc) < 0)
+ TEST_ERROR;
/* Create the string that should be in the description. Must use HDsnprintf here
- * because snprintf is _snprintf on Windows */
+ * because snprintf is _snprintf on Windows
+ */
HDsnprintf(full_desc, (size_t)(LONG_DESC_SIZE + 128), format, long_desc);
/* Make certain that the description is correct */
- if(H5Ewalk2(H5E_DEFAULT, H5E_WALK_UPWARD, long_desc_cb, full_desc) < 0) TEST_ERROR;
+ if (H5Ewalk2(H5E_DEFAULT, H5E_WALK_UPWARD, long_desc_cb, full_desc) < 0)
+ TEST_ERROR;
/* Clear the default error stack again */
- if(H5Eclear2(H5E_DEFAULT) < 0) TEST_ERROR;
+ if (H5Eclear2(H5E_DEFAULT) < 0)
+ TEST_ERROR;
HDfree(long_desc);
HDfree(full_desc);
- return(0);
+ return 0;
error:
- if(long_desc)
+ if (long_desc)
HDfree(long_desc);
- if(full_desc)
+ if (full_desc)
HDfree(full_desc);
- return(-1);
+ return -1;
} /* end test_long_desc() */
/*-------------------------------------------------------------------------
* Function: dump_error
*
- * Purpose: Prints error stack in default and customized ways.
+ * Purpose: Prints error stack in default and customized ways.
*
- * Return: Success: 0
- *
- * Failure: -1
- *
- * Programmer: Raymond Lu
- * July 17, 2003
+ * Return: Success: 0
+ * Failure: -1
*
*-------------------------------------------------------------------------
*/
@@ -407,12 +391,12 @@ dump_error(hid_t estack)
{
/* Print errors in library default way */
HDfprintf(stderr, "********* Print error stack in HDF5 default way *********\n");
- if(H5Eprint2(estack, stderr) < 0)
+ if (H5Eprint2(estack, stderr) < 0)
TEST_ERROR;
/* Customized way to print errors */
HDfprintf(stderr, "\n********* Print error stack in customized way *********\n");
- if(H5Ewalk2(estack, H5E_WALK_UPWARD, custom_print_cb, stderr) < 0)
+ if (H5Ewalk2(estack, H5E_WALK_UPWARD, custom_print_cb, stderr) < 0)
TEST_ERROR;
return 0;
@@ -425,34 +409,30 @@ error:
/*-------------------------------------------------------------------------
* Function: custom_print_cb
*
- * Purpose: Callback function to print error stack in customized way.
- *
- * Return: Success: 0
+ * Purpose: Callback function to print error stack in customized way.
*
- * Failure: -1
- *
- * Programmer: Raymond Lu
- * July 17, 2003
+ * Return: Success: 0
+ * Failure: -1
*
*-------------------------------------------------------------------------
*/
static herr_t
custom_print_cb(unsigned n, const H5E_error2_t *err_desc, void* client_data)
{
- FILE *stream = (FILE *)client_data;
+ FILE *stream = (FILE *)client_data;
char maj[MSG_SIZE];
char min[MSG_SIZE];
char cls[MSG_SIZE];
- const int indent = 4;
+ const int indent = 4;
/* Get descriptions for the major and minor error numbers */
- if(H5Eget_class_name(err_desc->cls_id, cls, MSG_SIZE) < 0)
+ if (H5Eget_class_name(err_desc->cls_id, cls, MSG_SIZE) < 0)
TEST_ERROR;
- if(H5Eget_msg(err_desc->maj_num, NULL, maj, MSG_SIZE) < 0)
+ if (H5Eget_msg(err_desc->maj_num, NULL, maj, MSG_SIZE) < 0)
TEST_ERROR;
- if(H5Eget_msg(err_desc->min_num, NULL, min, MSG_SIZE) < 0)
+ if (H5Eget_msg(err_desc->min_num, NULL, min, MSG_SIZE) < 0)
TEST_ERROR;
HDfprintf(stream, "%*serror #%03d: %s in %s(): line %u\n",
@@ -470,54 +450,58 @@ error:
/*-------------------------------------------------------------------------
- * Function: test_create
- *
- * Purpose: Test creating an empty error stack
+ * Function: test_create
*
- * Return: Success: 0
- * Failure: -1
+ * Purpose: Test creating an empty error stack
*
- * Programmer: Quincey Koziol
- * November 1, 2007
+ * Return: Success: 0
+ * Failure: -1
*
*-------------------------------------------------------------------------
*/
static herr_t
test_create(void)
{
- const char *err_func = "test_create"; /* Function name for pushing error */
- const char *err_msg = "Error message"; /* Error message for pushing error */
- ssize_t err_num; /* Number of errors on stack */
- hid_t estack_id; /* Error stack ID */
+ const char *err_func = "test_create"; /* Function name for pushing error */
+ const char *err_msg = "Error message"; /* Error message for pushing error */
+ ssize_t err_num; /* Number of errors on stack */
+ hid_t estack_id = -1; /* Error stack ID */
/* Create an empty error stack */
- if((estack_id = H5Ecreate_stack()) < 0) TEST_ERROR
+ if ((estack_id = H5Ecreate_stack()) < 0)
+ TEST_ERROR
/* Check the number of errors on stack */
err_num = H5Eget_num(estack_id);
- if(err_num != 0) TEST_ERROR
+ 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, "%s", 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);
- if(err_num != 1) TEST_ERROR
+ if (err_num != 1)
+ TEST_ERROR
/* Clear the error stack */
- if(H5Eclear2(estack_id) < 0) TEST_ERROR
+ if (H5Eclear2(estack_id) < 0)
+ TEST_ERROR
/* Check the number of errors on stack */
err_num = H5Eget_num(estack_id);
- if(err_num != 0) TEST_ERROR
+ if (err_num != 0)
+ TEST_ERROR
/* Close error stack */
- if(H5Eclose_stack(estack_id) < 0) TEST_ERROR
+ if(H5Eclose_stack(estack_id) < 0)
+ TEST_ERROR
- return(0);
+ return 0;
error:
- return(-1);
+ return -1;
} /* end test_create() */
/*-------------------------------------------------------------------------
@@ -528,70 +512,72 @@ error:
* Return: Success: 0
* Failure: -1
*
- * Programmer: Allen Byrne
- * February 18, 2010
- *
*-------------------------------------------------------------------------
*/
static herr_t
test_copy(void)
{
- const char *err_func = "test_copy"; /* Function name for pushing error */
- const char *err_msg = "Error message"; /* Error message for pushing error */
- ssize_t err_num; /* Number of errors on stack */
- hid_t estack_id; /* Error stack ID */
- herr_t ret; /* Generic return value */
+ const char *err_func = "test_copy"; /* Function name for pushing error */
+ const char *err_msg = "Error message"; /* Error message for pushing error */
+ ssize_t err_num; /* Number of errors on stack */
+ hid_t estack_id = -1; /* Error stack ID */
+ 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, "%s", 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);
- if(err_num != 1) TEST_ERROR
+ if (err_num != 1)
+ TEST_ERROR
/* Copy error stack, which clears the original */
- if((estack_id = H5Eget_current_stack()) < 0) TEST_ERROR
+ if ((estack_id = H5Eget_current_stack()) < 0)
+ TEST_ERROR
/* Check the number of errors on stack copy */
err_num = H5Eget_num(estack_id);
- if(err_num != 1) TEST_ERROR
+ if (err_num != 1)
+ TEST_ERROR
/* Check the number of errors on original stack */
err_num = H5Eget_num(H5E_DEFAULT);
- if(err_num != 0) TEST_ERROR
+ if (err_num != 0)
+ TEST_ERROR
/* Put the stack copy as the default. It closes the stack copy, too. */
- if(H5Eset_current_stack(estack_id) < 0) TEST_ERROR
+ if (H5Eset_current_stack(estack_id) < 0)
+ TEST_ERROR
/* Check the number of errors on default stack */
err_num = H5Eget_num(H5E_DEFAULT);
- if(err_num != 1) TEST_ERROR
+ if (err_num != 1)
+ TEST_ERROR
/* Try to close error stack copy. Should fail because
- * the current H5Eset_current_stack closes the stack to be set.*/
+ * the current H5Eset_current_stack closes the stack to be set.
+ */
H5E_BEGIN_TRY {
ret = H5Eclose_stack(estack_id);
} H5E_END_TRY
- if(ret >= 0) TEST_ERROR
+ if (ret >= 0)
+ TEST_ERROR
- return(0);
+ return 0;
error:
- return(-1);
+ return -1;
} /* end test_copy() */
/*-------------------------------------------------------------------------
- * Function: close_error
+ * Function: close_error
*
- * Purpose: Closes error information.
+ * Purpose: Closes error information.
*
- * Return: Success: 0
- *
- * Failure: -1
- *
- * Programmer: Raymond Lu
- * July 10, 2003
+ * Return: Success: 0
+ * Failure: -1
*
*-------------------------------------------------------------------------
*/
@@ -599,19 +585,19 @@ static herr_t
close_error(void)
{
/* Close major errors, let H5Eunregister_class close minor errors */
- if(H5Eclose_msg(ERR_MAJ_TEST) < 0)
+ if (H5Eclose_msg(ERR_MAJ_TEST) < 0)
TEST_ERROR;
- if(H5Eclose_msg(ERR_MAJ_IO) < 0)
+ if (H5Eclose_msg(ERR_MAJ_IO) < 0)
TEST_ERROR;
- if(H5Eclose_msg(ERR_MAJ_API) < 0)
+ if (H5Eclose_msg(ERR_MAJ_API) < 0)
TEST_ERROR;
- if(H5Eunregister_class(ERR_CLS) < 0)
+ if (H5Eunregister_class(ERR_CLS) < 0)
TEST_ERROR;
- if(H5Eunregister_class(ERR_CLS2) < 0)
+ if (H5Eunregister_class(ERR_CLS2) < 0)
TEST_ERROR;
return 0;
@@ -622,19 +608,15 @@ error:
/*-------------------------------------------------------------------------
- * Function: test_filter_error
+ * Function: test_filter_error
*
- * Purpose: Make sure the error message prints out the filter name
+ * Purpose: Make sure the error message prints out the filter name
* when the existent file is opened but the filter isn't
* registered. The existent file was created with
* gen_filters.c.
*
- * Return: Success: 0
- *
- * Failure: -1
- *
- * Programmer: Raymond Lu
- * 2 June 2011
+ * Return: Success: 0
+ * Failure: -1
*
*-------------------------------------------------------------------------
*/
@@ -642,71 +624,72 @@ static herr_t
test_filter_error(const char *fname)
{
const char *pathname = H5_get_srcdir_filename(fname); /* Corrected test file name */
- hid_t file, dataset; /* handles */
+ hid_t file = -1;
+ hid_t dataset = -1;
int buf[20];
HDfprintf(stderr, "\nTesting error message during data reading when filter isn't registered\n");
/* Open the file */
- if((file = H5Fopen(pathname, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
+ if ((file = H5Fopen(pathname, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
TEST_ERROR;
/* Open the regular dataset */
- if((dataset = H5Dopen2(file, DSET_FILTER_NAME, H5P_DEFAULT)) < 0)
+ if ((dataset = H5Dopen2(file, DSET_FILTER_NAME, H5P_DEFAULT)) < 0)
TEST_ERROR;
- if(H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) >= 0)
- TEST_ERROR;
+ if (H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) >= 0)
+ TEST_ERROR;
/* Close/release resources */
- if(H5Dclose(dataset) < 0)
+ if (H5Dclose(dataset) < 0)
TEST_ERROR
- if(H5Fclose(file) < 0)
+ if (H5Fclose(file) < 0)
TEST_ERROR
return 0;
error:
return -1;
-}
+} /* end test_filter_error() */
/*-------------------------------------------------------------------------
- * Function: main
+ * Function: main
*
- * Purpose: Test error API.
- *
- * Programmer: Raymond Lu
- * July 10, 2003
+ * Purpose: Test error API.
*
*-------------------------------------------------------------------------
*/
int
main(void)
{
- hid_t file, fapl;
- hid_t estack_id;
- char filename[1024];
- const char *FUNC_main = "main";
+ hid_t file = -1;
+ hid_t fapl = -1;
+ hid_t estack_id = -1;
+ char filename[1024];
+ const char *FUNC_main = "main";
HDfprintf(stderr, " This program tests the Error API. There're supposed to be some error messages\n");
/* Initialize errors */
- if(init_error() < 0)
+ if (init_error() < 0)
TEST_ERROR;
- fapl = h5_fileaccess();
+ if ((fapl = h5_fileaccess()) < 0)
+ TEST_ERROR;
- h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
- if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
- TEST_ERROR;
+ h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
+ if ((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
+ TEST_ERROR;
/* Test error stack */
- if(error_stack() < 0) {
+ if (error_stack() < 0) {
/* Push an error onto error stack */
- if(H5Epush(ERR_STACK, __FILE__, FUNC_main, __LINE__, ERR_CLS, ERR_MAJ_TEST, ERR_MIN_ERRSTACK,
- "Error stack test failed") < 0) TEST_ERROR;
+ if (H5Epush(ERR_STACK, __FILE__, FUNC_main, __LINE__, ERR_CLS, ERR_MAJ_TEST, ERR_MIN_ERRSTACK,
+ "Error stack test failed") < 0)
+ TEST_ERROR;
/* Delete an error from the top of error stack */
H5Epop(ERR_STACK, 1);
@@ -726,34 +709,39 @@ main(void)
} /* end if */
/* Test error API */
- if(test_error(file) < 0) {
+ if (test_error(file) < 0) {
H5Epush(H5E_DEFAULT, __FILE__, FUNC_main, __LINE__, ERR_CLS, ERR_MAJ_TEST, ERR_MIN_SUBROUTINE,
"Error test failed, %s", "it's wrong");
estack_id = H5Eget_current_stack();
H5Eprint2(estack_id, stderr);
H5Eclose_stack(estack_id);
- } /* end if */
+ }
/* Test pushing a very long error description */
- if(test_long_desc() < 0) TEST_ERROR;
+ if (test_long_desc() < 0)
+ TEST_ERROR;
/* Test creating a new error stack */
- if(test_create() < 0) TEST_ERROR;
+ if (test_create() < 0)
+ TEST_ERROR;
/* Test copying a new error stack */
- if(test_copy() < 0) TEST_ERROR;
+ if (test_copy() < 0)
+ TEST_ERROR;
- if(H5Fclose(file) < 0) TEST_ERROR;
+ if (H5Fclose(file) < 0)
+ TEST_ERROR;
/* Close error information */
- if(close_error() < 0)
+ if (close_error() < 0)
TEST_ERROR;
/* Test error message during data reading when filter isn't registered
* Use default FAPL to avoid some VFD drivers by the check-vfd test because
- * the test file was pre-generated. */
+ * the test file was pre-generated.
+ */
h5_fixname(DATAFILE, H5P_DEFAULT, filename, sizeof filename);
- if(test_filter_error(filename) < 0)
+ if (test_filter_error(filename) < 0)
TEST_ERROR;
h5_clean_files(FILENAME, fapl);
diff --git a/test/evict_on_close.c b/test/evict_on_close.c
index b00c1e4..6536837 100644
--- a/test/evict_on_close.c
+++ b/test/evict_on_close.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
@@ -39,6 +37,12 @@
#include "H5Gpkg.h"
#include "H5Ipkg.h"
+/* Evict on close is not supported under parallel at this time.
+ * In the meantime, we just run a simple check that EoC can't be
+ * enabled in parallel HDF5.
+ */
+#ifndef H5_HAVE_PARALLEL
+
/* Uncomment to manually inspect cache states */
/* (Requires debug build of the library) */
/* #define EOC_MANUAL_INSPECTION */
@@ -992,3 +996,96 @@ error:
} /* end main() */
+#else
+
+
+/*-------------------------------------------------------------------------
+ * Function: check_evict_on_close_parallel_fail()
+ *
+ * Purpose: Verify that the H5Pset_evict_on_close() call fails in
+ * parallel HDF5.
+ *
+ * Return: SUCCEED/FAIL
+ *
+ * Programmer: Dana Robinson
+ * Spring 2017
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+check_evict_on_close_parallel_fail(void)
+{
+ hid_t fapl_id = -1;
+ hbool_t evict_on_close;
+ herr_t status;
+
+ TESTING("evict on close fails in parallel");
+
+ /* Create a fapl */
+ if((fapl_id = H5Pcreate(H5P_FILE_ACCESS)) < 0)
+ TEST_ERROR;
+
+ /* Set the evict on close property (should fail)*/
+ evict_on_close = TRUE;
+ H5E_BEGIN_TRY {
+ status = H5Pset_evict_on_close(fapl_id, evict_on_close);
+ } H5E_END_TRY;
+ if(status >= 0)
+ FAIL_PUTS_ERROR("H5Pset_evict_on_close() did not fail in parallel HDF5.");
+
+ /* close fapl */
+ if(H5Pclose(fapl_id) < 0)
+ TEST_ERROR;
+
+ PASSED();
+ return SUCCEED;
+
+error:
+ H5_FAILED();
+ return FAIL;
+
+} /* check_evict_on_close_parallel_fail() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: main (parallel version)
+ *
+ * Return: EXIT_FAILURE/EXIT_SUCCESS
+ *
+ * Programmer: Dana Robinson
+ * Spring 2016
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+main(void)
+{
+ unsigned nerrors = 0; /* number of test errors */
+
+ HDprintf("Testing evict-on-close cache behavior\n");
+
+ /* Initialize */
+ h5_reset();
+
+ /* Test that EoC fails in parallel HDF5 */
+ nerrors += check_evict_on_close_parallel_fail() < 0 ? 1 : 0;
+
+ if(nerrors)
+ goto error;
+
+ HDprintf("All evict-on-close tests passed.\n");
+ HDprintf("Note that EoC is not supported under parallel so most tests are skipped.\n");
+
+ return EXIT_SUCCESS;
+
+error:
+
+ HDprintf("***** %u evict-on-close test%s FAILED! *****\n",
+ nerrors, nerrors > 1 ? "S" : "");
+
+ return EXIT_FAILURE;
+
+} /* main() - parallel */
+
+#endif /* H5_HAVE_PARALLEL */
+
diff --git a/test/extend.c b/test/extend.c
index 68f0d7c..e5c3cb3 100644
--- a/test/extend.c
+++ b/test/extend.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
diff --git a/test/external.c b/test/external.c
index 35207bd..20a9ed8 100644
--- a/test/external.c
+++ b/test/external.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
@@ -61,9 +59,9 @@ files_have_same_contents(const char *name1, const char *name2)
char buf1[1024], buf2[1024];
hbool_t ret = FALSE; /* not equal until proven otherwise */
- if((fd1 = HDopen(name1, O_RDONLY, 0666)) < 0)
+ if((fd1 = HDopen(name1, O_RDONLY)) < 0)
goto out;
- if((fd2 = HDopen(name2, O_RDONLY, 0666)) < 0)
+ if((fd2 = HDopen(name2, O_RDONLY)) < 0)
goto out;
/* Loop until files are empty or we encounter a problem */
@@ -139,7 +137,7 @@ reset_raw_data_files(void)
/* Open file */
HDsprintf(filename, "extern_%lur.raw", (unsigned long)i + 1);
- if((fd = HDopen(filename, O_RDWR|O_CREAT|O_TRUNC, 0666)) < 0)
+ if((fd = HDopen(filename, O_RDWR|O_CREAT|O_TRUNC, H5_POSIX_CREATE_MODE_RW)) < 0)
goto error;
/* Write garbage data to the file. This allows us to test the
@@ -173,7 +171,7 @@ reset_raw_data_files(void)
/* Open file */
HDsprintf(filename, "extern_%luw.raw", (unsigned long)i + 1);
- if((fd = HDopen(filename, O_RDWR|O_CREAT|O_TRUNC, 0666)) < 0)
+ if((fd = HDopen(filename, O_RDWR|O_CREAT|O_TRUNC, H5_POSIX_CREATE_MODE_RW)) < 0)
goto error;
/* Write garbage data to the file. This allows us to test the
diff --git a/test/farray.c b/test/farray.c
index e84bfae..383cb32 100644
--- a/test/farray.c
+++ b/test/farray.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
@@ -27,8 +25,9 @@
#include "H5FApkg.h" /* Fixed Arrays */
/* Other private headers that this test requires */
+#include "H5CXprivate.h" /* API Contexts */
#include "H5Iprivate.h" /* IDs */
-#include "H5VMprivate.h" /* Vectors and arrays */
+#include "H5VMprivate.h" /* Vectors and arrays */
/* Local macros */
@@ -267,7 +266,7 @@ set_fa_state(const H5FA_create_t *cparam, farray_state_t *state)
*-------------------------------------------------------------------------
*/
static int
-reopen_file(hid_t *file, H5F_t **f, hid_t fapl, hid_t dxpl,
+reopen_file(hid_t *file, H5F_t **f, hid_t fapl,
H5FA_t **fa, haddr_t fa_addr, const farray_test_param_t *tparam)
{
/* Check for closing & re-opening the array */
@@ -275,7 +274,7 @@ reopen_file(hid_t *file, H5F_t **f, hid_t fapl, hid_t dxpl,
if(tparam->reopen_array) {
/* Close array, if given */
if(fa && *fa) {
- if(H5FA_close(*fa, dxpl) < 0)
+ if(H5FA_close(*fa) < 0)
FAIL_STACK_ERROR
*fa = NULL;
} /* end if */
@@ -302,7 +301,7 @@ reopen_file(hid_t *file, H5F_t **f, hid_t fapl, hid_t dxpl,
/* Re-open array, if given */
if(fa)
- if(NULL == (*fa = H5FA_open(*f, dxpl, fa_addr, NULL)))
+ if(NULL == (*fa = H5FA_open(*f, fa_addr, NULL)))
FAIL_STACK_ERROR
} /* end if */
@@ -325,13 +324,13 @@ error:
*-------------------------------------------------------------------------
*/
static int
-create_array(H5F_t *f, hid_t dxpl, const H5FA_create_t *cparam,
+create_array(H5F_t *f, const H5FA_create_t *cparam,
H5FA_t **fa, haddr_t *fa_addr)
{
farray_state_t state; /* State of extensible array */
/* Create array */
- if(NULL == (*fa = H5FA_create(f, dxpl, cparam, NULL)))
+ if(NULL == (*fa = H5FA_create(f, cparam, NULL)))
FAIL_STACK_ERROR
/* Check status of array */
@@ -402,11 +401,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, H5AC_ind_read_dxpl_id) < 0)
+ if(H5FA_close(fa) < 0)
FAIL_STACK_ERROR
/* Delete array */
- if(H5FA_delete(f, H5AC_ind_read_dxpl_id, fa_addr, NULL) < 0)
+ if(H5FA_delete(f, fa_addr, NULL) < 0)
FAIL_STACK_ERROR
/* Close the file */
@@ -464,11 +463,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, H5AC_ind_read_dxpl_id, &test_cparam, NULL);
+ fa = H5FA_create(f, &test_cparam, NULL);
} H5E_END_TRY;
if(fa) {
/* Close opened fixed array */
- H5FA_close(fa, H5AC_ind_read_dxpl_id);
+ H5FA_close(fa);
fa = NULL;
/* Indicate error */
@@ -479,11 +478,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, H5AC_ind_read_dxpl_id, &test_cparam, NULL);
+ fa = H5FA_create(f, &test_cparam, NULL);
} H5E_END_TRY;
if(fa) {
/* Close opened fixed array */
- H5FA_close(fa, H5AC_ind_read_dxpl_id);
+ H5FA_close(fa);
fa = NULL;
/* Indicate error */
@@ -494,11 +493,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, H5AC_ind_read_dxpl_id, &test_cparam, NULL);
+ fa = H5FA_create(f, &test_cparam, NULL);
} H5E_END_TRY;
if(fa) {
/* Close opened fixed array */
- H5FA_close(fa, H5AC_ind_read_dxpl_id);
+ H5FA_close(fa);
fa = NULL;
/* Indicate error */
@@ -518,7 +517,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, H5AC_ind_read_dxpl_id, cparam, &fa, &fa_addr) < 0)
+ if(create_array(f, cparam, &fa, &fa_addr) < 0)
TEST_ERROR
PASSED()
@@ -542,7 +541,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, H5AC_ind_read_dxpl_id);
+ H5FA_close(fa);
H5Fclose(file);
} H5E_END_TRY;
@@ -578,19 +577,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, H5AC_ind_read_dxpl_id, cparam, &fa, &fa_addr) < 0)
+ if(create_array(f, cparam, &fa, &fa_addr) < 0)
TEST_ERROR
/* Close the fixed array */
- if(H5FA_close(fa, H5AC_ind_read_dxpl_id) < 0)
+ if(H5FA_close(fa) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the file */
- if(reopen_file(&file, &f, fapl, H5AC_ind_read_dxpl_id, NULL, HADDR_UNDEF, tparam) < 0)
+ if(reopen_file(&file, &f, fapl, NULL, HADDR_UNDEF, tparam) < 0)
TEST_ERROR
/* Re-open the array */
- if(NULL == (fa = H5FA_open(f, H5AC_ind_read_dxpl_id, fa_addr, NULL)))
+ if(NULL == (fa = H5FA_open(f, fa_addr, NULL)))
FAIL_STACK_ERROR
/* Verify the creation parameters */
@@ -609,7 +608,7 @@ test_reopen(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam)
error:
H5E_BEGIN_TRY {
if(fa)
- H5FA_close(fa, H5AC_ind_read_dxpl_id);
+ H5FA_close(fa);
H5Fclose(file);
} H5E_END_TRY;
@@ -648,11 +647,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, H5AC_ind_read_dxpl_id, cparam, &fa, &fa_addr) < 0)
+ if(create_array(f, cparam, &fa, &fa_addr) < 0)
TEST_ERROR
/* Open the array again, through the first file handle */
- if(NULL == (fa2 = H5FA_open(f, H5AC_ind_read_dxpl_id, fa_addr, NULL)))
+ if(NULL == (fa2 = H5FA_open(f, fa_addr, NULL)))
FAIL_STACK_ERROR
/* Verify the creation parameters */
@@ -662,12 +661,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, H5AC_ind_read_dxpl_id) < 0)
+ if(H5FA_close(fa2) < 0)
FAIL_STACK_ERROR
fa2 = NULL;
/* Check for closing & re-opening the file */
- if(reopen_file(&file, &f, fapl, H5AC_ind_read_dxpl_id, &fa, fa_addr, tparam) < 0)
+ if(reopen_file(&file, &f, fapl, &fa, fa_addr, tparam) < 0)
TEST_ERROR
/* Re-open the file */
@@ -679,7 +678,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, H5AC_ind_read_dxpl_id, fa_addr, NULL)))
+ if(NULL == (fa2 = H5FA_open(f2, fa_addr, NULL)))
FAIL_STACK_ERROR
/* Verify the creation parameters */
@@ -687,7 +686,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, H5AC_ind_read_dxpl_id) < 0)
+ if(H5FA_close(fa) < 0)
FAIL_STACK_ERROR
fa = NULL;
@@ -710,9 +709,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, H5AC_ind_read_dxpl_id);
+ H5FA_close(fa);
if(fa2)
- H5FA_close(fa2, H5AC_ind_read_dxpl_id);
+ H5FA_close(fa2);
H5Fclose(file);
H5Fclose(file2);
} H5E_END_TRY;
@@ -760,11 +759,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, H5AC_ind_read_dxpl_id, cparam, &fa, &fa_addr) < 0)
+ if(create_array(f, cparam, &fa, &fa_addr) < 0)
TEST_ERROR
/* Open the array again, through the first file handle */
- if(NULL == (fa2 = H5FA_open(f, H5AC_ind_read_dxpl_id, fa_addr, NULL)))
+ if(NULL == (fa2 = H5FA_open(f, fa_addr, NULL)))
FAIL_STACK_ERROR
/* Verify the creation parameters */
@@ -774,7 +773,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, H5AC_ind_read_dxpl_id) < 0)
+ if(H5FA_close(fa2) < 0)
FAIL_STACK_ERROR
fa2 = NULL;
@@ -786,11 +785,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, H5AC_ind_read_dxpl_id, &fa, fa_addr, tparam) < 0)
+ if(reopen_file(&file, &f, fapl, &fa, fa_addr, tparam) < 0)
TEST_ERROR
/* Close the first fixed array wrapper */
- if(H5FA_close(fa, H5AC_ind_read_dxpl_id) < 0)
+ if(H5FA_close(fa) < 0)
FAIL_STACK_ERROR
fa = NULL;
@@ -821,7 +820,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, H5AC_ind_read_dxpl_id, fa_addr, NULL)))
+ if(NULL == (fa2 = H5FA_open(f2, fa_addr, NULL)))
FAIL_STACK_ERROR
/* Verify the creation parameters */
@@ -846,9 +845,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, H5AC_ind_read_dxpl_id);
+ H5FA_close(fa);
if(fa2)
- H5FA_close(fa2, H5AC_ind_read_dxpl_id);
+ H5FA_close(fa2);
H5Fclose(file);
H5Fclose(file2);
H5Fclose(file0);
@@ -889,15 +888,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, H5AC_ind_read_dxpl_id, cparam, &fa, &fa_addr) < 0)
+ if(create_array(f, cparam, &fa, &fa_addr) < 0)
TEST_ERROR
/* Open the array again */
- if(NULL == (fa2 = H5FA_open(f, H5AC_ind_read_dxpl_id, fa_addr, NULL)))
+ if(NULL == (fa2 = H5FA_open(f, fa_addr, NULL)))
FAIL_STACK_ERROR
/* Request that the array be deleted */
- if(H5FA_delete(f, H5AC_ind_read_dxpl_id, fa_addr, NULL) < 0)
+ if(H5FA_delete(f, fa_addr, NULL) < 0)
FAIL_STACK_ERROR
/* Verify the creation parameters */
@@ -907,38 +906,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, H5AC_ind_read_dxpl_id) < 0)
+ if(H5FA_close(fa2) < 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, H5AC_ind_read_dxpl_id, fa_addr, NULL);
+ fa2 = H5FA_open(f, fa_addr, NULL);
} H5E_END_TRY;
if(fa2) {
/* Close opened array */
- H5FA_close(fa2, H5AC_ind_read_dxpl_id);
+ H5FA_close(fa2);
/* Indicate error */
TEST_ERROR
} /* end if */
/* Close the first fixed array wrapper */
- if(H5FA_close(fa, H5AC_ind_read_dxpl_id) < 0)
+ if(H5FA_close(fa) < 0)
FAIL_STACK_ERROR
fa = NULL;
/* Check for closing & re-opening the file */
- if(reopen_file(&file, &f, fapl, H5AC_ind_read_dxpl_id, NULL, HADDR_UNDEF, tparam) < 0)
+ if(reopen_file(&file, &f, fapl, 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, H5AC_ind_read_dxpl_id, fa_addr, NULL);
+ fa = H5FA_open(f, fa_addr, NULL);
} H5E_END_TRY;
if(fa) {
/* Close opened array */
- H5FA_close(fa, H5AC_ind_read_dxpl_id);
+ H5FA_close(fa);
/* Indicate error */
TEST_ERROR
@@ -964,9 +963,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, H5AC_ind_read_dxpl_id);
+ H5FA_close(fa);
if(fa2)
- H5FA_close(fa2, H5AC_ind_read_dxpl_id);
+ H5FA_close(fa2);
H5Fclose(file);
} H5E_END_TRY;
@@ -1393,7 +1392,7 @@ test_set_elmts(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam,
TEST_ERROR
/* Create array */
- if(create_array(f, H5AC_ind_read_dxpl_id, cparam, &fa, &fa_addr) < 0)
+ if(create_array(f, cparam, &fa, &fa_addr) < 0)
TEST_ERROR
/* Verify the creation parameters */
@@ -1401,7 +1400,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, H5AC_ind_read_dxpl_id, &fa, fa_addr, tparam) < 0)
+ if(reopen_file(&file, &f, fapl, &fa, fa_addr, tparam) < 0)
TEST_ERROR
if(H5FA_get_nelmts(fa, &fa_nelmts) < 0)
@@ -1433,7 +1432,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, H5AC_ind_read_dxpl_id, idx, &relmt) < 0)
+ if(H5FA_get(fa, idx, &relmt) < 0)
FAIL_STACK_ERROR
/* Verify that the retrieved is correct */
@@ -1460,7 +1459,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, H5AC_ind_read_dxpl_id, idx, &relmt) < 0)
+ if(H5FA_get(fa, idx, &relmt) < 0)
FAIL_STACK_ERROR
/* Verify that the retrieved element is correct */
@@ -1469,12 +1468,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, H5AC_ind_read_dxpl_id, idx, &welmt) < 0)
+ if(H5FA_set(fa, idx, &welmt) < 0)
FAIL_STACK_ERROR
/* Retrieve element of array (set now) */
relmt = (uint64_t)0;
- if(H5FA_get(fa, H5AC_ind_read_dxpl_id, idx, &relmt) < 0)
+ if(H5FA_get(fa, idx, &relmt) < 0)
FAIL_STACK_ERROR
/* Verify that the retrieved element is correct */
@@ -1504,7 +1503,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, H5AC_ind_read_dxpl_id);
+ H5FA_close(fa);
H5Fclose(file);
} H5E_END_TRY;
@@ -1548,7 +1547,7 @@ test_skip_elmts(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam,
TEST_ERROR
/* Create array */
- if(create_array(f, H5AC_ind_read_dxpl_id, cparam, &fa, &fa_addr) < 0)
+ if(create_array(f, cparam, &fa, &fa_addr) < 0)
TEST_ERROR
/* Verify the creation parameters */
@@ -1556,7 +1555,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, H5AC_ind_read_dxpl_id, &fa, fa_addr, tparam) < 0)
+ if(reopen_file(&file, &f, fapl, &fa, fa_addr, tparam) < 0)
TEST_ERROR
if(H5FA_get_nelmts(fa, &fa_nelmts) < 0)
@@ -1578,7 +1577,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, H5AC_ind_read_dxpl_id, idx, &relmt) < 0)
+ if(H5FA_get(fa, idx, &relmt) < 0)
FAIL_STACK_ERROR
/* Verify that the retrieved is correct */
@@ -1587,7 +1586,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, H5AC_ind_read_dxpl_id, idx, &welmt) < 0)
+ if(H5FA_set(fa, idx, &welmt) < 0)
FAIL_STACK_ERROR
/* Verify array state */
@@ -1598,7 +1597,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, H5AC_ind_read_dxpl_id, idx, &relmt) < 0)
+ if(H5FA_get(fa, idx, &relmt) < 0)
FAIL_STACK_ERROR
/* Verify that the retrieved is correct */
@@ -1610,7 +1609,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, H5AC_ind_read_dxpl_id, cnt, &relmt) < 0)
+ if(H5FA_get(fa, cnt, &relmt) < 0)
FAIL_STACK_ERROR
/* Verify that the retrieved is correct */
@@ -1631,7 +1630,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, H5AC_ind_read_dxpl_id);
+ H5FA_close(fa);
H5Fclose(file);
} H5E_END_TRY;
@@ -1660,6 +1659,7 @@ main(void)
unsigned nerrors = 0; /* Cumulative error count */
time_t curr_time; /* Current time, for seeding random number generator */
int ExpressMode; /* Test express value */
+ hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
/* Reset library */
h5_reset();
@@ -1671,6 +1671,10 @@ main(void)
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename_g, sizeof(filename_g));
+ /* Push API context */
+ if(H5CX_push() < 0) FAIL_STACK_ERROR
+ api_ctx_pushed = TRUE;
+
/* Seed random #'s */
curr_time = HDtime(NULL);
HDsrandom((unsigned)curr_time);
@@ -1790,6 +1794,10 @@ main(void)
/* Verify symbol table messages are cached */
nerrors += (h5_verify_cached_stabs(FILENAME, fapl) < 0 ? 1 : 0);
+ /* Pop API context */
+ if(api_ctx_pushed && H5CX_pop() < 0) FAIL_STACK_ERROR
+ api_ctx_pushed = FALSE;
+
if(nerrors)
goto error;
puts("All fixed array tests passed.");
@@ -1806,6 +1814,8 @@ error:
H5Pclose(fapl);
} H5E_END_TRY;
+ if(api_ctx_pushed) H5CX_pop();
+
return 1;
} /* end main() */
diff --git a/test/fheap.c b/test/fheap.c
index 77de4a8..e38d263 100644
--- a/test/fheap.c
+++ b/test/fheap.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
@@ -31,9 +29,10 @@
#include "H5Fpkg.h"
/* Other private headers that this test requires */
+#include "H5CXprivate.h" /* API Contexts */
#include "H5Iprivate.h" /* IDs */
#include "H5MMprivate.h" /* Memory management */
-#include "H5VMprivate.h" /* Vectors and arrays */
+#include "H5VMprivate.h" /* Vectors and arrays */
/* Max. testfile name length */
#define FHEAP_FILENAME_LEN 1024
@@ -171,7 +170,7 @@ size_t shared_alloc_ids_g = 0; /* # of shared heap IDs allocated in array */
static int init_small_cparam(H5HF_create_t *cparam);
static int init_large_cparam(H5HF_create_t *cparam);
static int check_stats(const H5HF_t *fh, const fheap_heap_state_t *state);
-static int del_objs(H5F_t *f, hid_t dxpl, H5HF_t **fh, fheap_test_param_t *tparam,
+static int del_objs(H5F_t *f, H5HF_t **fh, fheap_test_param_t *tparam,
fheap_heap_state_t *state, fheap_heap_ids_t *keep_ids);
@@ -361,7 +360,7 @@ op_memcpy(const void *obj, size_t obj_len, void *op_data)
*-------------------------------------------------------------------------
*/
static int
-add_obj(H5HF_t *fh, hid_t dxpl, size_t obj_off,
+add_obj(H5HF_t *fh, size_t obj_off,
size_t obj_size, fheap_heap_state_t *state, fheap_heap_ids_t *keep_ids)
{
unsigned char heap_id[MAX_HEAP_ID_LEN]; /* Heap ID for object inserted */
@@ -383,7 +382,7 @@ add_obj(H5HF_t *fh, hid_t dxpl, size_t obj_off,
/* Insert object */
HDmemset(heap_id, 0, id_len);
- if(H5HF_insert(fh, dxpl, obj_size, obj, heap_id) < 0)
+ if(H5HF_insert(fh, obj_size, obj, heap_id) < 0)
FAIL_STACK_ERROR
/* Check for tracking the heap's state */
@@ -411,11 +410,11 @@ add_obj(H5HF_t *fh, hid_t dxpl, size_t obj_off,
} /* end if */
/* Read in object */
- if(H5HF_get_obj_len(fh, dxpl, heap_id, &robj_size) < 0)
+ if(H5HF_get_obj_len(fh, heap_id, &robj_size) < 0)
FAIL_STACK_ERROR
if(obj_size != robj_size)
TEST_ERROR
- if(H5HF_read(fh, dxpl, heap_id, shared_robj_g) < 0)
+ if(H5HF_read(fh, heap_id, shared_robj_g) < 0)
FAIL_STACK_ERROR
if(HDmemcmp(obj, shared_robj_g, obj_size))
TEST_ERROR
@@ -553,7 +552,7 @@ begin_test(fheap_test_param_t *tparam, const char *base_desc,
del_str = get_del_string(tparam);
HDassert(del_str);
test_desc = (char *)H5MM_malloc(HDstrlen(del_str) + HDstrlen(base_desc));
- sprintf(test_desc, base_desc, del_str);
+ HDsprintf(test_desc, base_desc, del_str);
TESTING(test_desc);
H5MM_xfree(del_str);
H5MM_xfree(test_desc);
@@ -584,14 +583,14 @@ begin_test(fheap_test_param_t *tparam, const char *base_desc,
*-------------------------------------------------------------------------
*/
static int
-reopen_file(hid_t *file, H5F_t **f, const char *filename, hid_t fapl, hid_t dxpl,
+reopen_file(hid_t *file, H5F_t **f, const char *filename, hid_t fapl,
H5HF_t **fh, haddr_t fh_addr, const fheap_test_param_t *tparam)
{
/* Check for closing & re-opening the heap */
/* (actually will close & re-open the file as well) */
if(tparam->reopen_heap) {
/* Close heap */
- if(H5HF_close(*fh, dxpl) < 0)
+ if(H5HF_close(*fh) < 0)
FAIL_STACK_ERROR
*fh = NULL;
@@ -614,7 +613,7 @@ reopen_file(hid_t *file, H5F_t **f, const char *filename, hid_t fapl, hid_t dxpl
FAIL_STACK_ERROR
/* Re-open heap */
- if(NULL == (*fh = H5HF_open(*f, dxpl, fh_addr)))
+ if(NULL == (*fh = H5HF_open(*f, fh_addr)))
FAIL_STACK_ERROR
} /* end if */
@@ -641,7 +640,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-open_heap(char *filename, hid_t fapl, hid_t dxpl, const H5HF_create_t *cparam,
+open_heap(char *filename, hid_t fapl, const H5HF_create_t *cparam,
const fheap_test_param_t *tparam, hid_t *file, H5F_t **f, H5HF_t **fh,
haddr_t *fh_addr, fheap_heap_state_t *state, h5_stat_size_t *empty_size)
{
@@ -665,7 +664,7 @@ open_heap(char *filename, hid_t fapl, hid_t dxpl, const H5HF_create_t *cparam,
FAIL_STACK_ERROR
/* Create absolute heap */
- if(NULL == (*fh = H5HF_create(*f, dxpl, cparam)))
+ if(NULL == (*fh = H5HF_create(*f, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(*fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -682,7 +681,7 @@ open_heap(char *filename, hid_t fapl, hid_t dxpl, const H5HF_create_t *cparam,
/* Prepare for querying the size of a file with an empty heap */
/* Close (empty) heap */
- if(H5HF_close(*fh, dxpl) < 0)
+ if(H5HF_close(*fh) < 0)
FAIL_STACK_ERROR
} /* end if */
@@ -709,7 +708,7 @@ open_heap(char *filename, hid_t fapl, hid_t dxpl, const H5HF_create_t *cparam,
/* Check for deleting the entire heap */
if(tparam->del_dir == FHEAP_DEL_HEAP) {
/* Create absolute heap */
- if(NULL == (*fh = H5HF_create(*f, dxpl, cparam)))
+ if(NULL == (*fh = H5HF_create(*f, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(*fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -725,7 +724,7 @@ open_heap(char *filename, hid_t fapl, hid_t dxpl, const H5HF_create_t *cparam,
} /* end if */
else {
/* Re-open heap */
- if(NULL == (*fh = H5HF_open(*f, dxpl, *fh_addr)))
+ if(NULL == (*fh = H5HF_open(*f, *fh_addr)))
FAIL_STACK_ERROR
} /* end else */
@@ -752,17 +751,17 @@ error:
*-------------------------------------------------------------------------
*/
static int
-reopen_heap(H5F_t *f, hid_t dxpl, H5HF_t **fh, haddr_t fh_addr,
+reopen_heap(H5F_t *f, H5HF_t **fh, haddr_t fh_addr,
const fheap_test_param_t *tparam)
{
/* Check for closing & re-opening the heap */
if(tparam->reopen_heap) {
/* Close (empty) heap */
- if(H5HF_close(*fh, dxpl) < 0)
+ if(H5HF_close(*fh) < 0)
FAIL_STACK_ERROR
/* Re-open heap */
- if(NULL == (*fh = H5HF_open(f, dxpl, fh_addr)))
+ if(NULL == (*fh = H5HF_open(f, fh_addr)))
FAIL_STACK_ERROR
} /* end if */
@@ -788,7 +787,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-close_heap(char *filename, hid_t fapl, hid_t dxpl, fheap_test_param_t *tparam,
+close_heap(char *filename, hid_t fapl, fheap_test_param_t *tparam,
hid_t file, H5F_t *f, H5HF_t **fh, haddr_t fh_addr,
fheap_heap_state_t *state, fheap_heap_ids_t *keep_ids,
h5_stat_size_t empty_size)
@@ -796,7 +795,7 @@ close_heap(char *filename, hid_t fapl, hid_t dxpl, fheap_test_param_t *tparam,
h5_stat_size_t file_size; /* Size of file currently */
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -806,19 +805,19 @@ close_heap(char *filename, hid_t fapl, hid_t dxpl, fheap_test_param_t *tparam,
/* Check for deleting the objects in the heap */
if(tparam->del_dir != FHEAP_DEL_HEAP) {
/* Delete objects inserted (either forward or reverse order) */
- if(del_objs(f, dxpl, fh, tparam, state, keep_ids))
+ if(del_objs(f, fh, tparam, state, keep_ids))
FAIL_STACK_ERROR
} /* end if */
/* Close the fractal heap */
- if(H5HF_close(*fh, dxpl) < 0)
+ if(H5HF_close(*fh) < 0)
FAIL_STACK_ERROR
*fh = NULL;
/* Check for deleting the entire heap */
if(tparam->del_dir == FHEAP_DEL_HEAP) {
/* Delete heap */
- if(H5HF_delete(f, dxpl, fh_addr) < 0)
+ if(H5HF_delete(f, fh_addr) < 0)
FAIL_STACK_ERROR
} /* end if */
@@ -857,7 +856,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-del_objs_half_refill(H5F_t *f, hid_t dxpl, H5HF_t **fh, fheap_test_param_t *tparam,
+del_objs_half_refill(H5F_t *f, H5HF_t **fh, fheap_test_param_t *tparam,
fheap_heap_ids_t *keep_ids)
{
unsigned char *wobj; /* Buffer for object to insert */
@@ -892,11 +891,11 @@ del_objs_half_refill(H5F_t *f, hid_t dxpl, H5HF_t **fh, fheap_test_param_t *tpar
half_nobjs = keep_ids->num_ids / 2;
for(u = 0; u < half_nobjs; u++) {
/* Remove object from heap */
- if(H5HF_remove(*fh, dxpl, &keep_ids->ids[id_len * obj_idx]) < 0)
+ if(H5HF_remove(*fh, &keep_ids->ids[id_len * obj_idx]) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Adjust index of object to delete next */
@@ -914,11 +913,11 @@ del_objs_half_refill(H5F_t *f, hid_t dxpl, H5HF_t **fh, fheap_test_param_t *tpar
for(u = 0; u < half_nobjs; u++) {
/* Re-insert object */
wobj = &shared_wobj_g[keep_ids->offs[obj_idx]];
- if(H5HF_insert(*fh, dxpl, keep_ids->lens[obj_idx], wobj, &keep_ids->ids[id_len * obj_idx]) < 0)
+ if(H5HF_insert(*fh, keep_ids->lens[obj_idx], wobj, &keep_ids->ids[id_len * obj_idx]) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Adjust index of object to delete next */
@@ -951,7 +950,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-del_objs(H5F_t *f, hid_t dxpl, H5HF_t **fh, fheap_test_param_t *tparam,
+del_objs(H5F_t *f, H5HF_t **fh, fheap_test_param_t *tparam,
fheap_heap_state_t *state, fheap_heap_ids_t *keep_ids)
{
haddr_t fh_addr = HADDR_UNDEF; /* Address of fractal heap */
@@ -967,7 +966,7 @@ del_objs(H5F_t *f, hid_t dxpl, H5HF_t **fh, fheap_test_param_t *tparam,
/* Check for first deleting half of objects & then re-inserting them */
if(tparam->drain_half == FHEAP_DEL_DRAIN_HALF)
- if(del_objs_half_refill(f, dxpl, fh, tparam, keep_ids))
+ if(del_objs_half_refill(f, fh, tparam, keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
@@ -989,11 +988,11 @@ del_objs(H5F_t *f, hid_t dxpl, H5HF_t **fh, fheap_test_param_t *tparam,
obj_idx = keep_ids->num_ids - 1;
for(u = 0; u < keep_ids->num_ids; u++) {
/* Remove object from heap */
- if(H5HF_remove(*fh, dxpl, &keep_ids->ids[id_len * obj_idx]) < 0)
+ if(H5HF_remove(*fh, &keep_ids->ids[id_len * obj_idx]) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Adjust index of object to delete next */
@@ -1043,7 +1042,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-fill_heap(H5HF_t *fh, hid_t dxpl, unsigned block_row, size_t obj_size,
+fill_heap(H5HF_t *fh, unsigned block_row, size_t obj_size,
fheap_heap_state_t *state, fheap_heap_ids_t *keep_ids)
{
unsigned char *wobj; /* Buffer for object to insert */
@@ -1100,7 +1099,7 @@ fill_heap(H5HF_t *fh, hid_t dxpl, unsigned block_row, size_t obj_size,
} /* end if */
/* Insert object */
- if(H5HF_insert(fh, dxpl, obj_size, wobj, curr_id_ptr) < 0)
+ if(H5HF_insert(fh, obj_size, wobj, curr_id_ptr) < 0)
FAIL_STACK_ERROR
*curr_len_ptr = obj_size;
*curr_off_ptr = obj_off;
@@ -1151,7 +1150,7 @@ fill_heap(H5HF_t *fh, hid_t dxpl, unsigned block_row, size_t obj_size,
} /* end if */
/* Insert last object into the heap, using the remaining free space */
- if(H5HF_insert(fh, dxpl, last_obj_len, wobj, curr_id_ptr) < 0)
+ if(H5HF_insert(fh, last_obj_len, wobj, curr_id_ptr) < 0)
FAIL_STACK_ERROR
*curr_len_ptr = last_obj_len;
*curr_off_ptr = obj_off;
@@ -1176,7 +1175,7 @@ fill_heap(H5HF_t *fh, hid_t dxpl, unsigned block_row, size_t obj_size,
curr_off_ptr = shared_offs_g;
for(u = 0; u < num_ids; u++) {
/* Read in object */
- if(H5HF_read(fh, dxpl, curr_id_ptr, shared_robj_g) < 0)
+ if(H5HF_read(fh, curr_id_ptr, shared_robj_g) < 0)
FAIL_STACK_ERROR
/* Check that object is correct */
@@ -1235,7 +1234,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-fill_root_row(H5HF_t *fh, hid_t dxpl, unsigned row, size_t obj_size,
+fill_root_row(H5HF_t *fh, unsigned row, size_t obj_size,
fheap_heap_state_t *state, fheap_heap_ids_t *keep_ids)
{
hsize_t first_free_space; /* Size of free space in heap after the first block */
@@ -1305,7 +1304,7 @@ fill_root_row(H5HF_t *fh, hid_t dxpl, unsigned row, size_t obj_size,
state->man_alloc_size += block_size;
/* Fill a direct heap block up */
- if(fill_heap(fh, dxpl, row, obj_size, state, keep_ids))
+ if(fill_heap(fh, row, obj_size, state, keep_ids))
TEST_ERROR
} /* end for */
@@ -1332,7 +1331,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-fill_partial_row(H5HF_t *fh, hid_t dxpl, unsigned row, unsigned width,
+fill_partial_row(H5HF_t *fh, unsigned row, unsigned width,
size_t obj_size, fheap_heap_state_t *state, fheap_heap_ids_t *keep_ids)
{
size_t block_size; /* Size of direct block in this row */
@@ -1351,7 +1350,7 @@ fill_partial_row(H5HF_t *fh, hid_t dxpl, unsigned row, unsigned width,
state->man_alloc_size += block_size;
/* Fill a direct heap block up */
- if(fill_heap(fh, dxpl, row, obj_size, state, keep_ids))
+ if(fill_heap(fh, row, obj_size, state, keep_ids))
TEST_ERROR
} /* end for */
@@ -1378,7 +1377,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-fill_row(H5HF_t *fh, hid_t dxpl, unsigned row, size_t obj_size,
+fill_row(H5HF_t *fh, unsigned row, size_t obj_size,
fheap_heap_state_t *state, fheap_heap_ids_t *keep_ids)
{
/* Sanity check */
@@ -1386,7 +1385,7 @@ fill_row(H5HF_t *fh, hid_t dxpl, unsigned row, size_t obj_size,
HDassert(state);
/* Fill the entire row (with the partial row fill routine) */
- if(fill_partial_row(fh, dxpl, row, DTABLE_WIDTH(fh), obj_size, state, keep_ids))
+ if(fill_partial_row(fh, row, DTABLE_WIDTH(fh), obj_size, state, keep_ids))
TEST_ERROR
/* Operations succeeded */
@@ -1415,7 +1414,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-fill_root_direct(H5HF_t *fh, hid_t dxpl, size_t obj_size,
+fill_root_direct(H5HF_t *fh, size_t obj_size,
fheap_heap_state_t *state, fheap_heap_ids_t *keep_ids)
{
unsigned max_dblock_rows; /* Max. # of direct block rows in indirect block */
@@ -1427,7 +1426,7 @@ fill_root_direct(H5HF_t *fh, hid_t dxpl, size_t obj_size,
/* Loop over rows */
for(row = 0; row < max_dblock_rows; row++)
- if(fill_root_row(fh, dxpl, row, obj_size, state, keep_ids))
+ if(fill_root_row(fh, row, obj_size, state, keep_ids))
TEST_ERROR
/* Operations succeeded */
@@ -1455,7 +1454,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-fill_2nd_indirect(H5HF_t *fh, hid_t dxpl, unsigned pos, size_t obj_size,
+fill_2nd_indirect(H5HF_t *fh, unsigned pos, size_t obj_size,
fheap_heap_state_t *state, fheap_heap_ids_t *keep_ids)
{
unsigned max_dblock_rows; /* Max. # of direct block rows in indirect block */
@@ -1467,7 +1466,7 @@ fill_2nd_indirect(H5HF_t *fh, hid_t dxpl, unsigned pos, size_t obj_size,
/* Loop over rows */
for(row = 0; row < max_dblock_rows; row++)
- if(fill_row(fh, dxpl, row, obj_size, state, keep_ids))
+ if(fill_row(fh, row, obj_size, state, keep_ids))
TEST_ERROR
/* Operations succeeded */
@@ -1494,7 +1493,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-fill_all_direct(H5HF_t *fh, hid_t dxpl, size_t obj_size,
+fill_all_direct(H5HF_t *fh, size_t obj_size,
fheap_heap_state_t *state, fheap_heap_ids_t *keep_ids)
{
unsigned max_dblock_rows; /* Max. # of direct block rows in indirect block */
@@ -1506,7 +1505,7 @@ fill_all_direct(H5HF_t *fh, hid_t dxpl, size_t obj_size,
/* Loop over rows */
for(row = 0; row < max_dblock_rows; row++)
- if(fill_row(fh, dxpl, row, obj_size, state, keep_ids))
+ if(fill_row(fh, row, obj_size, state, keep_ids))
TEST_ERROR
/* Operations succeeded */
@@ -1534,7 +1533,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-fill_2nd_indirect_row(H5HF_t *fh, hid_t dxpl, unsigned pos, size_t obj_size,
+fill_2nd_indirect_row(H5HF_t *fh, unsigned pos, size_t obj_size,
fheap_heap_state_t *state, fheap_heap_ids_t *keep_ids)
{
unsigned width; /* Width of heap's doubling table */
@@ -1545,7 +1544,7 @@ fill_2nd_indirect_row(H5HF_t *fh, hid_t dxpl, unsigned pos, size_t obj_size,
/* Loop over row of indirect blocks */
for(u = 0; u < width; u++)
- if(fill_2nd_indirect(fh, dxpl, pos, obj_size, state, keep_ids))
+ if(fill_2nd_indirect(fh, pos, obj_size, state, keep_ids))
TEST_ERROR
/* Operations succeeded */
@@ -1573,7 +1572,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-fill_all_2nd_indirect_rows(H5HF_t *fh, hid_t dxpl, size_t obj_size,
+fill_all_2nd_indirect_rows(H5HF_t *fh, size_t obj_size,
fheap_heap_state_t *state, fheap_heap_ids_t *keep_ids)
{
unsigned width; /* Width of heap's doubling table */
@@ -1584,7 +1583,7 @@ fill_all_2nd_indirect_rows(H5HF_t *fh, hid_t dxpl, size_t obj_size,
/* Loop over rows of 2nd level deep indirect blocks */
for(u = 0; u < (H5VM_log2_of2(width) + 1); u++)
- if(fill_2nd_indirect_row(fh, dxpl, (u + 1), obj_size, state, keep_ids))
+ if(fill_2nd_indirect_row(fh, (u + 1), obj_size, state, keep_ids))
TEST_ERROR
/* Operations succeeded */
@@ -1612,18 +1611,18 @@ error:
*-------------------------------------------------------------------------
*/
static int
-fill_3rd_indirect(H5HF_t *fh, hid_t dxpl, unsigned pos, size_t obj_size,
+fill_3rd_indirect(H5HF_t *fh, unsigned pos, size_t obj_size,
fheap_heap_state_t *state, fheap_heap_ids_t *keep_ids)
{
unsigned u; /* Local index variable */
/* Fill all direct block rows in third level indirect block */
- if(fill_all_direct(fh, dxpl, obj_size, state, keep_ids))
+ if(fill_all_direct(fh, obj_size, state, keep_ids))
TEST_ERROR
/* Fill rows of recursive indirect blocks in third level indirect block */
for(u = 0; u < pos; u++)
- if(fill_2nd_indirect_row(fh, dxpl, (u + 1), obj_size, state, keep_ids))
+ if(fill_2nd_indirect_row(fh, (u + 1), obj_size, state, keep_ids))
TEST_ERROR
/* Operations succeeded */
@@ -1651,7 +1650,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-fill_3rd_indirect_row(H5HF_t *fh, hid_t dxpl, unsigned pos, size_t obj_size,
+fill_3rd_indirect_row(H5HF_t *fh, unsigned pos, size_t obj_size,
fheap_heap_state_t *state, fheap_heap_ids_t *keep_ids)
{
unsigned width; /* Width of heap's doubling table */
@@ -1663,7 +1662,7 @@ fill_3rd_indirect_row(H5HF_t *fh, hid_t dxpl, unsigned pos, size_t obj_size,
/* Loop over row of 3rd level indirect blocks */
for(u = 0; u < width; u++)
/* Fill third level indirect block */
- if(fill_3rd_indirect(fh, dxpl, pos, obj_size, state, keep_ids))
+ if(fill_3rd_indirect(fh, pos, obj_size, state, keep_ids))
TEST_ERROR
/* Operations succeeded */
@@ -1691,7 +1690,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-fill_all_3rd_indirect_rows(H5HF_t *fh, hid_t dxpl, size_t obj_size,
+fill_all_3rd_indirect_rows(H5HF_t *fh, size_t obj_size,
fheap_heap_state_t *state, fheap_heap_ids_t *keep_ids)
{
unsigned width; /* Width of heap's doubling table */
@@ -1703,7 +1702,7 @@ fill_all_3rd_indirect_rows(H5HF_t *fh, hid_t dxpl, size_t obj_size,
/* Loop over rows of 3rd level deep indirect blocks */
for(u = 0; u < (H5VM_log2_of2(width) + 1); u++)
/* Fill row of 3rd level indirect blocks */
- if(fill_3rd_indirect_row(fh, dxpl, (u + 1), obj_size, state, keep_ids))
+ if(fill_3rd_indirect_row(fh, (u + 1), obj_size, state, keep_ids))
TEST_ERROR
/* Operations succeeded */
@@ -1731,7 +1730,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-fill_4th_indirect_row(H5HF_t *fh, hid_t dxpl, unsigned pos, size_t obj_size,
+fill_4th_indirect_row(H5HF_t *fh, unsigned pos, size_t obj_size,
fheap_heap_state_t *state, fheap_heap_ids_t *keep_ids)
{
unsigned width; /* Width of heap's doubling table */
@@ -1743,16 +1742,16 @@ fill_4th_indirect_row(H5HF_t *fh, hid_t dxpl, unsigned pos, size_t obj_size,
/* Loop over row of 4th level indirect blocks */
for(u = 0; u < width; u++) {
/* Fill all direct block rows in fourth level indirect block */
- if(fill_all_direct(fh, dxpl, obj_size, state, keep_ids))
+ if(fill_all_direct(fh, obj_size, state, keep_ids))
TEST_ERROR
/* Fill all rows of 2nd level deep indirect blocks in fourth level indirect block */
- if(fill_all_2nd_indirect_rows(fh, dxpl, obj_size, state, keep_ids))
+ if(fill_all_2nd_indirect_rows(fh, obj_size, state, keep_ids))
TEST_ERROR
/* Fill rows of third level indirect blocks in fourth level indirect block */
for(v = 0; v < pos; v++)
- if(fill_3rd_indirect_row(fh, dxpl, (v + 1), obj_size, state, keep_ids))
+ if(fill_3rd_indirect_row(fh, (v + 1), obj_size, state, keep_ids))
TEST_ERROR
} /* end for */
@@ -1781,7 +1780,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-fill_all_4th_indirect_rows(H5HF_t *fh, hid_t dxpl, size_t obj_size,
+fill_all_4th_indirect_rows(H5HF_t *fh, size_t obj_size,
fheap_heap_state_t *state, fheap_heap_ids_t *keep_ids)
{
unsigned width; /* Width of heap's doubling table */
@@ -1793,7 +1792,7 @@ fill_all_4th_indirect_rows(H5HF_t *fh, hid_t dxpl, size_t obj_size,
/* Loop over rows of 4th level deep indirect blocks */
for(u = 0; u < (H5VM_log2_of2(width) + 1); u++) {
/* Fill row of 4th level indirect blocks */
- if(fill_4th_indirect_row(fh, dxpl, (u + 1), obj_size, state, keep_ids))
+ if(fill_4th_indirect_row(fh, (u + 1), obj_size, state, keep_ids))
TEST_ERROR
/* Account for root indirect block doubling # of rows again */
@@ -1881,7 +1880,7 @@ test_create(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
*/
TESTING("fractal heap creation");
- if(NULL == (fh = H5HF_create(f, H5AC_ind_read_dxpl_id, cparam)))
+ if(NULL == (fh = H5HF_create(f, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -1905,11 +1904,11 @@ test_create(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
TEST_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, H5AC_ind_read_dxpl_id) < 0)
+ if(H5HF_close(fh) < 0)
FAIL_STACK_ERROR
/* Delete heap */
- if(H5HF_delete(f, H5AC_ind_read_dxpl_id, fh_addr) < 0)
+ if(H5HF_delete(f, fh_addr) < 0)
FAIL_STACK_ERROR
/* Close the file */
@@ -1932,7 +1931,7 @@ test_create(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
error:
H5E_BEGIN_TRY {
if(fh)
- H5HF_close(fh, H5AC_ind_read_dxpl_id);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -2004,7 +2003,7 @@ test_reopen(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
TESTING("create, close & reopen fractal heap");
/* Create heap */
- if(NULL == (fh = H5HF_create(f, H5AC_ind_read_dxpl_id, cparam)))
+ if(NULL == (fh = H5HF_create(f, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -2019,7 +2018,7 @@ test_reopen(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
TEST_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, H5AC_ind_read_dxpl_id) < 0)
+ if(H5HF_close(fh) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the file */
@@ -2043,7 +2042,7 @@ test_reopen(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
} /* end if */
/* Re-open the heap */
- if(NULL == (fh = H5HF_open(f, H5AC_ind_read_dxpl_id, fh_addr)))
+ if(NULL == (fh = H5HF_open(f, fh_addr)))
FAIL_STACK_ERROR
/* Query the creation parameters */
@@ -2054,12 +2053,12 @@ test_reopen(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
TEST_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, H5AC_ind_read_dxpl_id) < 0)
+ if(H5HF_close(fh) < 0)
FAIL_STACK_ERROR
fh = NULL;
/* Delete heap */
- if(H5HF_delete(f, H5AC_ind_read_dxpl_id, fh_addr) < 0)
+ if(H5HF_delete(f, fh_addr) < 0)
FAIL_STACK_ERROR
/* Close the file */
@@ -2083,7 +2082,7 @@ test_reopen(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
error:
H5E_BEGIN_TRY {
if(fh)
- H5HF_close(fh, H5AC_ind_read_dxpl_id);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -2157,7 +2156,7 @@ test_open_twice(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
TESTING("open fractal heap twice");
/* Create heap */
- if(NULL == (fh = H5HF_create(f, H5AC_ind_read_dxpl_id, cparam)))
+ if(NULL == (fh = H5HF_create(f, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -2172,7 +2171,7 @@ test_open_twice(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
TEST_ERROR
/* Open the heap again, through the first file handle */
- if(NULL == (fh2 = H5HF_open(f, H5AC_ind_read_dxpl_id, fh_addr)))
+ if(NULL == (fh2 = H5HF_open(f, fh_addr)))
FAIL_STACK_ERROR
/* Verify the creation parameters */
@@ -2183,12 +2182,12 @@ test_open_twice(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
TEST_ERROR
/* Close the second fractal heap wrapper */
- if(H5HF_close(fh2, H5AC_ind_read_dxpl_id) < 0)
+ if(H5HF_close(fh2) < 0)
FAIL_STACK_ERROR
fh2 = NULL;
/* Check for closing & re-opening the heap & file */
- if(reopen_file(&file, &f, filename, fapl, H5AC_ind_read_dxpl_id, &fh, fh_addr, tparam) < 0)
+ if(reopen_file(&file, &f, filename, fapl, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Re-open the file */
@@ -2204,7 +2203,7 @@ test_open_twice(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
FAIL_STACK_ERROR
/* Open the fractal heap through the second file handle */
- if(NULL == (fh2 = H5HF_open(f2, H5AC_ind_read_dxpl_id, fh_addr)))
+ if(NULL == (fh2 = H5HF_open(f2, fh_addr)))
FAIL_STACK_ERROR
/* Verify the creation parameters */
@@ -2215,7 +2214,7 @@ test_open_twice(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
TEST_ERROR
/* Close the first fractal heap wrapper */
- if(H5HF_close(fh, H5AC_ind_read_dxpl_id) < 0)
+ if(H5HF_close(fh) < 0)
FAIL_STACK_ERROR
fh = NULL;
@@ -2227,12 +2226,12 @@ test_open_twice(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
FAIL_STACK_ERROR
/* Close the second fractal heap wrapper */
- if(H5HF_close(fh2, H5AC_ind_read_dxpl_id) < 0)
+ if(H5HF_close(fh2) < 0)
FAIL_STACK_ERROR
fh2 = NULL;
/* Delete heap */
- if(H5HF_delete(f2, H5AC_ind_read_dxpl_id, fh_addr) < 0)
+ if(H5HF_delete(f2, fh_addr) < 0)
FAIL_STACK_ERROR
/* Close the second file */
@@ -2256,9 +2255,9 @@ test_open_twice(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
error:
H5E_BEGIN_TRY {
if(fh)
- H5HF_close(fh, H5AC_ind_read_dxpl_id);
+ H5HF_close(fh);
if(fh2)
- H5HF_close(fh2, H5AC_ind_read_dxpl_id);
+ H5HF_close(fh2);
H5Fclose(file);
H5Fclose(file2);
} H5E_END_TRY;
@@ -2326,7 +2325,7 @@ test_delete_open(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
TESTING("deleting open fractal heap");
/* Create heap */
- if(NULL == (fh = H5HF_create(f, H5AC_ind_read_dxpl_id, cparam)))
+ if(NULL == (fh = H5HF_create(f, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -2341,11 +2340,11 @@ test_delete_open(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
TEST_ERROR
/* Open the heap again */
- if(NULL == (fh2 = H5HF_open(f, H5AC_ind_read_dxpl_id, fh_addr)))
+ if(NULL == (fh2 = H5HF_open(f, fh_addr)))
FAIL_STACK_ERROR
/* Request that the heap be deleted */
- if(H5HF_delete(f, H5AC_ind_read_dxpl_id, fh_addr) < 0)
+ if(H5HF_delete(f, fh_addr) < 0)
FAIL_STACK_ERROR
/* Verify the creation parameters */
@@ -2356,24 +2355,24 @@ test_delete_open(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
TEST_ERROR
/* Close the second fractal heap wrapper */
- if(H5HF_close(fh2, H5AC_ind_read_dxpl_id) < 0)
+ if(H5HF_close(fh2) < 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, H5AC_ind_read_dxpl_id, fh_addr);
+ fh2 = H5HF_open(f, fh_addr);
} H5E_END_TRY;
if(fh2) {
/* Close opened heap */
- H5HF_close(fh2, H5AC_ind_read_dxpl_id);
+ H5HF_close(fh2);
/* Indicate error */
TEST_ERROR
} /* end if */
/* Close the first fractal heap wrapper */
- if(H5HF_close(fh, H5AC_ind_read_dxpl_id) < 0)
+ if(H5HF_close(fh) < 0)
FAIL_STACK_ERROR
fh = NULL;
@@ -2399,11 +2398,11 @@ test_delete_open(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
/* Try re-opening the heap again (should fail, as heap is now deleted) */
H5E_BEGIN_TRY {
- fh = H5HF_open(f, H5AC_ind_read_dxpl_id, fh_addr);
+ fh = H5HF_open(f, fh_addr);
} H5E_END_TRY;
if(fh) {
/* Close opened heap */
- H5HF_close(fh, H5AC_ind_read_dxpl_id);
+ H5HF_close(fh);
/* Indicate error */
TEST_ERROR
@@ -2429,9 +2428,9 @@ test_delete_open(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
error:
H5E_BEGIN_TRY {
if(fh)
- H5HF_close(fh, H5AC_ind_read_dxpl_id);
+ H5HF_close(fh);
if(fh2)
- H5HF_close(fh2, H5AC_ind_read_dxpl_id);
+ H5HF_close(fh2);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -2455,7 +2454,6 @@ static unsigned
test_id_limits(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
{
hid_t file = -1; /* File ID */
- 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 */
@@ -2492,7 +2490,7 @@ test_id_limits(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
tmp_cparam.id_len = 0;
/* Create absolute heap */
- if(NULL == (fh = H5HF_create(f, dxpl, &tmp_cparam)))
+ if(NULL == (fh = H5HF_create(f, &tmp_cparam)))
FAIL_STACK_ERROR
/* Test ID length information for heap */
@@ -2512,7 +2510,7 @@ test_id_limits(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
TEST_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
FAIL_STACK_ERROR
fh = NULL;
@@ -2522,7 +2520,7 @@ test_id_limits(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
tmp_cparam.id_len = 1;
/* Create absolute heap */
- if(NULL == (fh = H5HF_create(f, dxpl, &tmp_cparam)))
+ if(NULL == (fh = H5HF_create(f, &tmp_cparam)))
FAIL_STACK_ERROR
/* Test ID length information for heap */
@@ -2542,7 +2540,7 @@ test_id_limits(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
TEST_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
FAIL_STACK_ERROR
fh = NULL;
@@ -2557,7 +2555,7 @@ test_id_limits(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
FAIL_STACK_ERROR
/* Create absolute heap */
- if(NULL == (fh = H5HF_create(f, dxpl, &tmp_cparam)))
+ if(NULL == (fh = H5HF_create(f, &tmp_cparam)))
FAIL_STACK_ERROR
/* Test ID length information for heap */
@@ -2577,7 +2575,7 @@ test_id_limits(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
TEST_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
FAIL_STACK_ERROR
fh = NULL;
@@ -2590,7 +2588,7 @@ test_id_limits(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
/* Create absolute heap */
H5E_BEGIN_TRY {
- fh = H5HF_create(f, dxpl, &tmp_cparam);
+ fh = H5HF_create(f, &tmp_cparam);
} H5E_END_TRY;
if(NULL != fh)
FAIL_STACK_ERROR
@@ -2602,7 +2600,7 @@ test_id_limits(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
tmp_cparam.id_len = 8;
/* Create absolute heap */
- if(NULL == (fh = H5HF_create(f, dxpl, &tmp_cparam)))
+ if(NULL == (fh = H5HF_create(f, &tmp_cparam)))
FAIL_STACK_ERROR
/* Test ID length information for heap */
@@ -2622,7 +2620,7 @@ test_id_limits(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
TEST_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
FAIL_STACK_ERROR
fh = NULL;
@@ -2633,7 +2631,7 @@ test_id_limits(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
tmp_cparam.id_len = 17;
/* Create absolute heap */
- if(NULL == (fh = H5HF_create(f, dxpl, &tmp_cparam)))
+ if(NULL == (fh = H5HF_create(f, &tmp_cparam)))
FAIL_STACK_ERROR
/* Test ID length information for heap */
@@ -2653,7 +2651,7 @@ test_id_limits(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
TEST_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
FAIL_STACK_ERROR
fh = NULL;
@@ -2664,7 +2662,7 @@ test_id_limits(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
tmp_cparam.id_len = 18;
/* Create absolute heap */
- if(NULL == (fh = H5HF_create(f, dxpl, &tmp_cparam)))
+ if(NULL == (fh = H5HF_create(f, &tmp_cparam)))
FAIL_STACK_ERROR
/* Test ID length information for heap */
@@ -2684,7 +2682,7 @@ test_id_limits(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
TEST_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
FAIL_STACK_ERROR
fh = NULL;
@@ -2695,7 +2693,7 @@ test_id_limits(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
tmp_cparam.id_len = 19;
/* Create absolute heap */
- if(NULL == (fh = H5HF_create(f, dxpl, &tmp_cparam)))
+ if(NULL == (fh = H5HF_create(f, &tmp_cparam)))
FAIL_STACK_ERROR
/* Test ID length information for heap */
@@ -2715,7 +2713,7 @@ test_id_limits(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
TEST_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
FAIL_STACK_ERROR
fh = NULL;
@@ -2726,7 +2724,7 @@ test_id_limits(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
tmp_cparam.id_len = 45;
/* Create absolute heap */
- if(NULL == (fh = H5HF_create(f, dxpl, &tmp_cparam)))
+ if(NULL == (fh = H5HF_create(f, &tmp_cparam)))
FAIL_STACK_ERROR
/* Test ID length information for heap */
@@ -2746,7 +2744,7 @@ test_id_limits(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
TEST_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
FAIL_STACK_ERROR
fh = NULL;
@@ -2758,7 +2756,7 @@ test_id_limits(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
/* Create absolute heap */
H5E_BEGIN_TRY {
- fh = H5HF_create(f, dxpl, &tmp_cparam);
+ fh = H5HF_create(f, &tmp_cparam);
} H5E_END_TRY;
if(NULL != fh)
FAIL_STACK_ERROR
@@ -2776,7 +2774,7 @@ test_id_limits(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
error:
H5E_BEGIN_TRY {
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -2800,7 +2798,6 @@ static unsigned
test_filtered_create(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
{
hid_t file = -1; /* File ID */
- 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 */
@@ -2837,7 +2834,7 @@ test_filtered_create(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
FAIL_STACK_ERROR
/* Create absolute heap */
- if(NULL == (fh = H5HF_create(f, dxpl, &tmp_cparam)))
+ if(NULL == (fh = H5HF_create(f, &tmp_cparam)))
FAIL_STACK_ERROR
/* Get heap's address */
@@ -2847,7 +2844,7 @@ test_filtered_create(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
TEST_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
FAIL_STACK_ERROR
fh = NULL;
@@ -2868,7 +2865,7 @@ test_filtered_create(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
FAIL_STACK_ERROR
/* Re-open the heap */
- if(NULL == (fh = H5HF_open(f, H5AC_ind_read_dxpl_id, fh_addr)))
+ if(NULL == (fh = H5HF_open(f, fh_addr)))
FAIL_STACK_ERROR
/* Query the heap creation parameters */
@@ -2879,7 +2876,7 @@ test_filtered_create(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
FAIL_STACK_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, H5AC_ind_read_dxpl_id) < 0)
+ if(H5HF_close(fh) < 0)
FAIL_STACK_ERROR
@@ -2899,7 +2896,7 @@ test_filtered_create(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
error:
H5E_BEGIN_TRY {
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -2923,7 +2920,6 @@ static unsigned
test_size(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
{
hid_t file = -1; /* File ID */
- 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 */
@@ -2952,7 +2948,7 @@ test_size(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
/* Create absolute heap */
- if(NULL == (fh = H5HF_create(f, dxpl, cparam)))
+ if(NULL == (fh = H5HF_create(f, cparam)))
FAIL_STACK_ERROR
/* Get heap's address */
@@ -2963,24 +2959,24 @@ test_size(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
/* Get an empty heap's size */
empty_heap_size = 0;
- if(H5HF_size(fh, dxpl, &empty_heap_size) < 0)
+ if(H5HF_size(fh, &empty_heap_size) < 0)
FAIL_STACK_ERROR
if(empty_heap_size == 0)
TEST_ERROR
/* Insert an object */
- if(add_obj(fh, dxpl, (size_t)0, (size_t)10, NULL, NULL) < 0)
+ if(add_obj(fh, (size_t)0, (size_t)10, NULL, NULL) < 0)
TEST_ERROR
/* Get the heap's size after inserting one object */
one_heap_size = 0;
- if(H5HF_size(fh, dxpl, &one_heap_size) < 0)
+ if(H5HF_size(fh, &one_heap_size) < 0)
FAIL_STACK_ERROR
if(one_heap_size <= empty_heap_size)
TEST_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
FAIL_STACK_ERROR
fh = NULL;
@@ -3002,29 +2998,29 @@ test_size(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
FAIL_STACK_ERROR
/* Re-open the heap */
- if(NULL == (fh = H5HF_open(f, dxpl, fh_addr)))
+ if(NULL == (fh = H5HF_open(f, fh_addr)))
FAIL_STACK_ERROR
/* Check the heap's size */
heap_size = 0;
- if(H5HF_size(fh, dxpl, &heap_size) < 0)
+ if(H5HF_size(fh, &heap_size) < 0)
FAIL_STACK_ERROR
if(heap_size != one_heap_size)
TEST_ERROR
/* Insert another object */
- if(add_obj(fh, dxpl, (size_t)1, (size_t)10, NULL, NULL) < 0)
+ if(add_obj(fh, (size_t)1, (size_t)10, NULL, NULL) < 0)
TEST_ERROR
/* Check the heap's size */
heap_size = 0;
- if(H5HF_size(fh, dxpl, &heap_size) < 0)
+ if(H5HF_size(fh, &heap_size) < 0)
FAIL_STACK_ERROR
if(heap_size != one_heap_size)
TEST_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, H5AC_ind_read_dxpl_id) < 0)
+ if(H5HF_close(fh) < 0)
FAIL_STACK_ERROR
@@ -3040,7 +3036,7 @@ test_size(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
error:
H5E_BEGIN_TRY {
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -3068,7 +3064,6 @@ test_reopen_hdr(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
{
hid_t file1 = -1; /* File ID */
hid_t file2 = -2; /* File ID */
- 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 */
@@ -3095,7 +3090,7 @@ test_reopen_hdr(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
/* Create absolute heap */
- if(NULL == (fh = H5HF_create(f, dxpl, cparam)))
+ if(NULL == (fh = H5HF_create(f, cparam)))
FAIL_STACK_ERROR
/* Get heap's address */
@@ -3105,11 +3100,11 @@ test_reopen_hdr(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
TEST_ERROR
/* Insert an object */
- if(add_obj(fh, dxpl, (size_t)0, (size_t)10, NULL, NULL) < 0)
+ if(add_obj(fh, (size_t)0, (size_t)10, NULL, NULL) < 0)
TEST_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
FAIL_STACK_ERROR
fh = NULL;
@@ -3135,11 +3130,11 @@ test_reopen_hdr(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
FAIL_STACK_ERROR
/* Open the heap */
- if(NULL == (fh = H5HF_open(f, dxpl, fh_addr)))
+ if(NULL == (fh = H5HF_open(f, fh_addr)))
FAIL_STACK_ERROR
/* Close the heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
FAIL_STACK_ERROR
fh = NULL;
@@ -3153,16 +3148,16 @@ test_reopen_hdr(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
FAIL_STACK_ERROR
/* Reopen the heap */
- if(NULL == (fh = H5HF_open(f, dxpl, fh_addr)))
+ if(NULL == (fh = H5HF_open(f, fh_addr)))
FAIL_STACK_ERROR
/* Check the heap's size */
heap_size = 0;
- if(H5HF_size(fh, dxpl, &heap_size) < 0)
+ if(H5HF_size(fh, &heap_size) < 0)
FAIL_STACK_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, H5AC_ind_read_dxpl_id) < 0)
+ if(H5HF_close(fh) < 0)
FAIL_STACK_ERROR
@@ -3178,7 +3173,7 @@ test_reopen_hdr(hid_t fapl, H5HF_create_t *cparam, hid_t fcpl)
error:
H5E_BEGIN_TRY {
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file1);
H5Fclose(file2);
} H5E_END_TRY;
@@ -3204,7 +3199,6 @@ 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 = 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 */
@@ -3230,7 +3224,7 @@ test_man_insert_weird(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpa
FAIL_STACK_ERROR
/* Create absolute heap */
- if(NULL == (fh = H5HF_create(f, dxpl, cparam)))
+ if(NULL == (fh = H5HF_create(f, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -3245,7 +3239,7 @@ test_man_insert_weird(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpa
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/*
@@ -3255,18 +3249,18 @@ test_man_insert_weird(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpa
/* Attempt to insert 0-sized object into heap */
H5E_BEGIN_TRY {
- ret = H5HF_insert(fh, dxpl, (size_t)0, shared_wobj_g, heap_id);
+ ret = H5HF_insert(fh, (size_t)0, shared_wobj_g, heap_id);
} H5E_END_TRY;
if(ret >= 0)
TEST_ERROR
H5Eclear2(H5E_DEFAULT);
/* Insert a 1-sized object into heap (should be a 'tiny' object) */
- if(add_obj(fh, dxpl, (size_t)10, (size_t)1, &state, NULL))
+ if(add_obj(fh, (size_t)10, (size_t)1, &state, NULL))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check for correctly sized heap */
@@ -3274,7 +3268,7 @@ test_man_insert_weird(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpa
TEST_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
FAIL_STACK_ERROR
fh = NULL;
@@ -3290,7 +3284,7 @@ test_man_insert_weird(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpa
error:
H5E_BEGIN_TRY {
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -3316,7 +3310,6 @@ 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 = 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 */
@@ -3340,7 +3333,7 @@ test_man_insert_first(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpa
FAIL_STACK_ERROR
/* Create absolute heap */
- if(NULL == (fh = H5HF_create(f, dxpl, cparam)))
+ if(NULL == (fh = H5HF_create(f, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -3355,7 +3348,7 @@ test_man_insert_first(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpa
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/*
@@ -3365,11 +3358,11 @@ test_man_insert_first(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpa
state.man_size = DBLOCK_SIZE(fh, 0);
state.man_alloc_size = DBLOCK_SIZE(fh, 0);
state.man_free_space = DBLOCK_FREE(fh, 0);
- if(add_obj(fh, dxpl, (size_t)10, SMALL_OBJ_SIZE1, &state, NULL))
+ if(add_obj(fh, (size_t)10, SMALL_OBJ_SIZE1, &state, NULL))
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check for correctly sized heap */
@@ -3377,7 +3370,7 @@ test_man_insert_first(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpa
FAIL_STACK_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
TEST_ERROR
/* Close the file */
@@ -3392,7 +3385,7 @@ test_man_insert_first(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpa
error:
H5E_BEGIN_TRY {
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -3417,7 +3410,6 @@ 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 = 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 */
@@ -3441,7 +3433,7 @@ test_man_insert_second(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tp
STACK_ERROR
/* Create absolute heap */
- if(NULL == (fh = H5HF_create(f, dxpl, cparam)))
+ if(NULL == (fh = H5HF_create(f, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -3460,19 +3452,19 @@ test_man_insert_second(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tp
state.man_size = DBLOCK_SIZE(fh, 0);
state.man_alloc_size = DBLOCK_SIZE(fh, 0);
state.man_free_space = DBLOCK_FREE(fh, 0);
- if(add_obj(fh, dxpl, (size_t)10, SMALL_OBJ_SIZE1, &state, NULL))
+ if(add_obj(fh, (size_t)10, SMALL_OBJ_SIZE1, &state, NULL))
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert second object */
- if(add_obj(fh, dxpl, (size_t)20, SMALL_OBJ_SIZE2, &state, NULL))
+ if(add_obj(fh, (size_t)20, SMALL_OBJ_SIZE2, &state, NULL))
FAIL_STACK_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
TEST_ERROR
/* Close the file */
@@ -3487,7 +3479,7 @@ test_man_insert_second(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tp
error:
H5E_BEGIN_TRY {
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -3513,7 +3505,6 @@ 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 = 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 */
@@ -3538,7 +3529,7 @@ test_man_insert_root_mult(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
STACK_ERROR
/* Create absolute heap */
- if(NULL == (fh = H5HF_create(f, dxpl, cparam)))
+ if(NULL == (fh = H5HF_create(f, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -3562,15 +3553,15 @@ test_man_insert_root_mult(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
state.man_size = DBLOCK_SIZE(fh, 0);
state.man_alloc_size = DBLOCK_SIZE(fh, 0);
state.man_free_space = DBLOCK_FREE(fh, 0);
- if(fill_heap(fh, dxpl, 0, fill_size, &state, NULL))
+ if(fill_heap(fh, 0, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
TEST_ERROR
/* Close the file */
@@ -3585,7 +3576,7 @@ test_man_insert_root_mult(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
error:
H5E_BEGIN_TRY {
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -3612,7 +3603,6 @@ 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 = 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 */
@@ -3637,7 +3627,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, H5AC_ind_read_dxpl_id, cparam)))
+ if(NULL == (fh = H5HF_create(f, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -3661,22 +3651,22 @@ test_man_insert_force_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_par
state.man_size = DBLOCK_SIZE(fh, 0);
state.man_alloc_size = DBLOCK_SIZE(fh, 0);
state.man_free_space = DBLOCK_FREE(fh, 0);
- if(fill_heap(fh, dxpl, 0, fill_size, &state, NULL))
+ if(fill_heap(fh, 0, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert one more object, to force root indirect block creation */
state.man_size = cparam->managed.width * DBLOCK_SIZE(fh, 0);
state.man_alloc_size += DBLOCK_SIZE(fh, 0);
state.man_free_space = (cparam->managed.width - 1) * DBLOCK_FREE(fh, 0);
- if(add_obj(fh, dxpl, (size_t)10, SMALL_OBJ_SIZE1, &state, NULL))
+ if(add_obj(fh, (size_t)10, SMALL_OBJ_SIZE1, &state, NULL))
FAIL_STACK_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
TEST_ERROR
/* Close the file */
@@ -3691,7 +3681,7 @@ test_man_insert_force_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_par
error:
H5E_BEGIN_TRY {
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -3718,7 +3708,6 @@ 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 = 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 */
@@ -3743,7 +3732,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, H5AC_ind_read_dxpl_id, cparam)))
+ if(NULL == (fh = H5HF_create(f, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -3767,22 +3756,22 @@ test_man_insert_fill_second(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_
state.man_size = DBLOCK_SIZE(fh, 0);
state.man_alloc_size = DBLOCK_SIZE(fh, 0);
state.man_free_space = DBLOCK_FREE(fh, 0);
- if(fill_heap(fh, dxpl, 0, fill_size, &state, NULL))
+ if(fill_heap(fh, 0, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill the second direct block heap up (also creates initial root indirect block) */
state.man_size = cparam->managed.width * DBLOCK_SIZE(fh, 0);
state.man_alloc_size += DBLOCK_SIZE(fh, 0);
state.man_free_space = (cparam->managed.width - 1) * DBLOCK_FREE(fh, 0);
- if(fill_heap(fh, dxpl, 0, fill_size, &state, NULL))
+ if(fill_heap(fh, 0, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
TEST_ERROR
/* Close the file */
@@ -3797,7 +3786,7 @@ test_man_insert_fill_second(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_
error:
H5E_BEGIN_TRY {
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -3825,7 +3814,6 @@ 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 = 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 */
@@ -3850,7 +3838,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, H5AC_ind_read_dxpl_id, cparam)))
+ if(NULL == (fh = H5HF_create(f, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -3874,27 +3862,27 @@ test_man_insert_third_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param
state.man_size = DBLOCK_SIZE(fh, 0);
state.man_alloc_size = DBLOCK_SIZE(fh, 0);
state.man_free_space = DBLOCK_FREE(fh, 0);
- if(fill_heap(fh, dxpl, 0, fill_size, &state, NULL))
+ if(fill_heap(fh, 0, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Fill the second direct block heap up (also creates initial root indirect block) */
state.man_size = cparam->managed.width * DBLOCK_SIZE(fh, 0);
state.man_alloc_size += DBLOCK_SIZE(fh, 0);
state.man_free_space = (cparam->managed.width - 1) * DBLOCK_FREE(fh, 0);
- if(fill_heap(fh, dxpl, 0, fill_size, &state, NULL))
+ if(fill_heap(fh, 0, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert one more object, to force creation of third direct block */
state.man_alloc_size += DBLOCK_SIZE(fh, 0);
- if(add_obj(fh, dxpl, (size_t)10, SMALL_OBJ_SIZE1, &state, NULL))
+ if(add_obj(fh, (size_t)10, SMALL_OBJ_SIZE1, &state, NULL))
FAIL_STACK_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
TEST_ERROR
/* Close the file */
@@ -3909,7 +3897,7 @@ test_man_insert_third_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param
error:
H5E_BEGIN_TRY {
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -3936,7 +3924,6 @@ 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 = 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 */
@@ -3961,7 +3948,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, H5AC_ind_read_dxpl_id, cparam)))
+ if(NULL == (fh = H5HF_create(f, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -3982,15 +3969,15 @@ test_man_fill_first_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *t
fill_size = get_fill_size(tparam);
/* Fill first row of [root] indirect block */
- if(fill_root_row(fh, dxpl, 0, fill_size, &state, NULL))
+ if(fill_root_row(fh, 0, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
TEST_ERROR
/* Close the file */
@@ -4005,7 +3992,7 @@ test_man_fill_first_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *t
error:
H5E_BEGIN_TRY {
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -4032,7 +4019,6 @@ 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 = 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 */
@@ -4057,7 +4043,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, H5AC_ind_read_dxpl_id, cparam)))
+ if(NULL == (fh = H5HF_create(f, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -4078,22 +4064,22 @@ test_man_start_second_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
fill_size = get_fill_size(tparam);
/* Fill first root indirect row */
- if(fill_root_row(fh, dxpl, 0, fill_size, &state, NULL))
+ if(fill_root_row(fh, 0, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert one more object, to force expanding root indirect block to two rows */
state.man_size += cparam->managed.width * DBLOCK_SIZE(fh, 1);
state.man_alloc_size += DBLOCK_SIZE(fh, 1);
state.man_free_space = cparam->managed.width * DBLOCK_FREE(fh, 1);
- if(add_obj(fh, dxpl, (size_t)10, SMALL_OBJ_SIZE1, &state, NULL))
+ if(add_obj(fh, (size_t)10, SMALL_OBJ_SIZE1, &state, NULL))
FAIL_STACK_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
TEST_ERROR
/* Close the file */
@@ -4108,7 +4094,7 @@ test_man_start_second_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
error:
H5E_BEGIN_TRY {
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -4135,7 +4121,6 @@ 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 = 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 */
@@ -4160,7 +4145,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, H5AC_ind_read_dxpl_id, cparam)))
+ if(NULL == (fh = H5HF_create(f, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -4181,19 +4166,19 @@ test_man_fill_second_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *
fill_size = get_fill_size(tparam);
/* Fill first root indirect row */
- if(fill_root_row(fh, dxpl, 0, fill_size, &state, NULL))
+ if(fill_root_row(fh, 0, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill second root indirect row */
- if(fill_root_row(fh, dxpl, 1, fill_size, &state, NULL))
+ if(fill_root_row(fh, 1, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
TEST_ERROR
/* Close the file */
@@ -4208,7 +4193,7 @@ test_man_fill_second_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *
error:
H5E_BEGIN_TRY {
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -4236,7 +4221,6 @@ 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 = 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 */
@@ -4261,7 +4245,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, H5AC_ind_read_dxpl_id, cparam)))
+ if(NULL == (fh = H5HF_create(f, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -4282,15 +4266,15 @@ test_man_start_third_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *
fill_size = get_fill_size(tparam);
/* Fill first root indirect row */
- if(fill_root_row(fh, dxpl, 0, fill_size, &state, NULL))
+ if(fill_root_row(fh, 0, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Fill second root indirect row */
- if(fill_root_row(fh, dxpl, 1, fill_size, &state, NULL))
+ if(fill_root_row(fh, 1, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert one more object, to force expanding root indirect block to four rows */
@@ -4300,11 +4284,11 @@ test_man_start_third_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *
state.man_alloc_size += DBLOCK_SIZE(fh, 2);
state.man_free_space += cparam->managed.width * DBLOCK_FREE(fh, 2);
state.man_free_space += cparam->managed.width * DBLOCK_FREE(fh, 3);
- if(add_obj(fh, dxpl, (size_t)10, SMALL_OBJ_SIZE1, &state, NULL))
+ if(add_obj(fh, (size_t)10, SMALL_OBJ_SIZE1, &state, NULL))
FAIL_STACK_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
TEST_ERROR
/* Close the file */
@@ -4319,7 +4303,7 @@ test_man_start_third_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *
error:
H5E_BEGIN_TRY {
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -4346,7 +4330,6 @@ 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 = 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 */
@@ -4372,7 +4355,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, H5AC_ind_read_dxpl_id, cparam)))
+ if(NULL == (fh = H5HF_create(f, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -4394,15 +4377,15 @@ test_man_fill_fourth_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *
/* Loop over rows */
for(u = 0; u < 4; u++)
- if(fill_root_row(fh, dxpl, u, fill_size, &state, NULL))
+ if(fill_root_row(fh, u, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
TEST_ERROR
/* Close the file */
@@ -4417,7 +4400,7 @@ test_man_fill_fourth_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *
error:
H5E_BEGIN_TRY {
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -4444,7 +4427,6 @@ 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 = 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 */
@@ -4469,7 +4451,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, H5AC_ind_read_dxpl_id, cparam)))
+ if(NULL == (fh = H5HF_create(f, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -4490,15 +4472,15 @@ test_man_fill_all_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_para
fill_size = get_fill_size(tparam);
/* Fill all direct blocks in root indirect block */
- if(fill_root_direct(fh, dxpl, fill_size, &state, NULL))
+ if(fill_root_direct(fh, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
TEST_ERROR
/* Close the file */
@@ -4513,7 +4495,7 @@ test_man_fill_all_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_para
error:
H5E_BEGIN_TRY {
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -4540,7 +4522,6 @@ 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 = 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 */
@@ -4565,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, H5AC_ind_read_dxpl_id, cparam)))
+ if(NULL == (fh = H5HF_create(f, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -4586,20 +4567,20 @@ test_man_first_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_
fill_size = get_fill_size(tparam);
/* Fill direct blocks up */
- if(fill_root_direct(fh, dxpl, fill_size, &state, NULL))
+ if(fill_root_direct(fh, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert one more object, to force creation of first recursive indirect block */
state.man_alloc_size += DBLOCK_SIZE(fh, 0);
- if(add_obj(fh, dxpl, (size_t)10, SMALL_OBJ_SIZE1, &state, NULL))
+ if(add_obj(fh, (size_t)10, SMALL_OBJ_SIZE1, &state, NULL))
FAIL_STACK_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
TEST_ERROR
/* Close the file */
@@ -4614,7 +4595,7 @@ test_man_first_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_
error:
H5E_BEGIN_TRY {
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -4642,7 +4623,6 @@ 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 = 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 */
@@ -4667,7 +4647,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, H5AC_ind_read_dxpl_id, cparam)))
+ if(NULL == (fh = H5HF_create(f, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -4689,27 +4669,27 @@ test_man_second_direct_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fhe
fill_size = get_fill_size(tparam);
/* Fill direct blocks up */
- if(fill_root_direct(fh, dxpl, fill_size, &state, NULL))
+ if(fill_root_direct(fh, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Fill the first direct block in the recursive indirect block up */
state.man_alloc_size += DBLOCK_SIZE(fh, 0);
- if(fill_heap(fh, dxpl, 0, fill_size, &state, NULL))
+ if(fill_heap(fh, 0, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert one more object, to force creation of second direct block in
* first recursive indirect block
*/
state.man_alloc_size += DBLOCK_SIZE(fh, 0);
- if(add_obj(fh, dxpl, (size_t)10, SMALL_OBJ_SIZE1, &state, NULL))
+ if(add_obj(fh, (size_t)10, SMALL_OBJ_SIZE1, &state, NULL))
FAIL_STACK_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
TEST_ERROR
/* Close the file */
@@ -4724,7 +4704,7 @@ test_man_second_direct_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fhe
error:
H5E_BEGIN_TRY {
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -4752,7 +4732,6 @@ 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 = 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 */
@@ -4777,7 +4756,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, H5AC_ind_read_dxpl_id, cparam)))
+ if(NULL == (fh = H5HF_create(f, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -4799,19 +4778,19 @@ test_man_fill_first_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_
fill_size = get_fill_size(tparam);
/* Fill direct blocks up in root indirect block */
- if(fill_root_direct(fh, dxpl, fill_size, &state, NULL))
+ if(fill_root_direct(fh, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill first recursive indirect block */
- if(fill_2nd_indirect(fh, dxpl, 1, fill_size, &state, NULL))
+ if(fill_2nd_indirect(fh, 1, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
TEST_ERROR
/* Close the file */
@@ -4826,7 +4805,7 @@ test_man_fill_first_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_
error:
H5E_BEGIN_TRY {
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -4855,7 +4834,6 @@ 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 = 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 */
@@ -4880,7 +4858,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, H5AC_ind_read_dxpl_id, cparam)))
+ if(NULL == (fh = H5HF_create(f, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -4902,26 +4880,26 @@ test_man_second_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test
fill_size = get_fill_size(tparam);
/* Fill direct blocks up in root indirect block */
- if(fill_root_direct(fh, dxpl, fill_size, &state, NULL))
+ if(fill_root_direct(fh, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Fill first recursive indirect block */
- if(fill_2nd_indirect(fh, dxpl, 1, fill_size, &state, NULL))
+ if(fill_2nd_indirect(fh, 1, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert one more object, to force creation of second
* recursive indirect block
*/
state.man_alloc_size += DBLOCK_SIZE(fh, 0);
- if(add_obj(fh, dxpl, (size_t)10, SMALL_OBJ_SIZE1, &state, NULL))
+ if(add_obj(fh, (size_t)10, SMALL_OBJ_SIZE1, &state, NULL))
FAIL_STACK_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
TEST_ERROR
/* Close the file */
@@ -4936,7 +4914,7 @@ test_man_second_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test
error:
H5E_BEGIN_TRY {
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -4966,7 +4944,6 @@ 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 = 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 */
@@ -4991,7 +4968,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, H5AC_ind_read_dxpl_id, cparam)))
+ if(NULL == (fh = H5HF_create(f, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -5013,23 +4990,23 @@ test_man_fill_second_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap
fill_size = get_fill_size(tparam);
/* Fill direct blocks up in root indirect block */
- if(fill_root_direct(fh, dxpl, fill_size, &state, NULL))
+ if(fill_root_direct(fh, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Fill first recursive indirect block */
- if(fill_2nd_indirect(fh, dxpl, 1, fill_size, &state, NULL))
+ if(fill_2nd_indirect(fh, 1, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill 2nd recursive indirect block */
- if(fill_2nd_indirect(fh, dxpl, 1, fill_size, &state, NULL))
+ if(fill_2nd_indirect(fh, 1, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
TEST_ERROR
/* Close the file */
@@ -5044,7 +5021,7 @@ test_man_fill_second_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap
error:
H5E_BEGIN_TRY {
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -5074,7 +5051,6 @@ 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 = 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 */
@@ -5095,7 +5071,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, H5AC_ind_read_dxpl_id, cparam)))
+ if(NULL == (fh = H5HF_create(f, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -5117,19 +5093,19 @@ test_man_fill_recursive_indirect_row(hid_t fapl, H5HF_create_t *cparam, fheap_te
fill_size = get_fill_size(tparam);
/* Fill direct blocks in root indirect block up */
- if(fill_root_direct(fh, dxpl, fill_size, &state, NULL))
+ if(fill_root_direct(fh, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill row of recursive indirect blocks */
- if(fill_2nd_indirect_row(fh, dxpl, 1, fill_size, &state, NULL))
+ if(fill_2nd_indirect_row(fh, 1, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
TEST_ERROR
/* Close the file */
@@ -5144,7 +5120,7 @@ test_man_fill_recursive_indirect_row(hid_t fapl, H5HF_create_t *cparam, fheap_te
error:
H5E_BEGIN_TRY {
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -5172,7 +5148,6 @@ 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 = 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 */
@@ -5197,7 +5172,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, H5AC_ind_read_dxpl_id, cparam)))
+ if(NULL == (fh = H5HF_create(f, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -5219,26 +5194,26 @@ test_man_start_2nd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_t
fill_size = get_fill_size(tparam);
/* Fill direct blocks in root indirect block up */
- if(fill_root_direct(fh, dxpl, fill_size, &state, NULL))
+ if(fill_root_direct(fh, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Fill row of recursive indirect blocks */
- if(fill_2nd_indirect_row(fh, dxpl, 1, fill_size, &state, NULL))
+ if(fill_2nd_indirect_row(fh, 1, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert one more object, to force creation of second
* recursive indirect block
*/
state.man_alloc_size += DBLOCK_SIZE(fh, 0);
- if(add_obj(fh, dxpl, (size_t)10, SMALL_OBJ_SIZE1, &state, NULL))
+ if(add_obj(fh, (size_t)10, SMALL_OBJ_SIZE1, &state, NULL))
FAIL_STACK_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
TEST_ERROR
/* Close the file */
@@ -5253,7 +5228,7 @@ test_man_start_2nd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_t
error:
H5E_BEGIN_TRY {
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -5281,7 +5256,6 @@ 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 = 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 */
@@ -5306,7 +5280,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, H5AC_ind_read_dxpl_id, cparam)))
+ if(NULL == (fh = H5HF_create(f, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -5328,19 +5302,19 @@ test_man_recursive_indirect_two_deep(hid_t fapl, H5HF_create_t *cparam, fheap_te
fill_size = get_fill_size(tparam);
/* Fill direct blocks up in root indirect block */
- if(fill_root_direct(fh, dxpl, fill_size, &state, NULL))
+ if(fill_root_direct(fh, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill all rows of 2nd level indirect blocks */
- if(fill_all_2nd_indirect_rows(fh, dxpl, fill_size, &state, NULL))
+ if(fill_all_2nd_indirect_rows(fh, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
TEST_ERROR
/* Close the file */
@@ -5355,7 +5329,7 @@ test_man_recursive_indirect_two_deep(hid_t fapl, H5HF_create_t *cparam, fheap_te
error:
H5E_BEGIN_TRY {
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -5384,7 +5358,6 @@ 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 = 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 */
@@ -5409,7 +5382,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, H5AC_ind_read_dxpl_id, cparam)))
+ if(NULL == (fh = H5HF_create(f, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -5431,26 +5404,26 @@ test_man_start_3rd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_t
fill_size = get_fill_size(tparam);
/* Fill direct blocks up in root indirect block */
- if(fill_root_direct(fh, dxpl, fill_size, &state, NULL))
+ if(fill_root_direct(fh, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Fill all rows of 2nd level indirect blocks */
- if(fill_all_2nd_indirect_rows(fh, dxpl, fill_size, &state, NULL))
+ if(fill_all_2nd_indirect_rows(fh, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert one more object, to force creation of third level deep
* recursive indirect block
*/
state.man_alloc_size += DBLOCK_SIZE(fh, 0);
- if(add_obj(fh, dxpl, (size_t)10, SMALL_OBJ_SIZE1, &state, NULL))
+ if(add_obj(fh, (size_t)10, SMALL_OBJ_SIZE1, &state, NULL))
FAIL_STACK_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
TEST_ERROR
/* Close the file */
@@ -5465,7 +5438,7 @@ test_man_start_3rd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_t
error:
H5E_BEGIN_TRY {
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -5494,7 +5467,6 @@ 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 = 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 */
@@ -5519,7 +5491,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, H5AC_ind_read_dxpl_id, cparam)))
+ if(NULL == (fh = H5HF_create(f, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -5541,27 +5513,27 @@ test_man_fill_first_3rd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fh
fill_size = get_fill_size(tparam);
/* Fill direct blocks up in root indirect block */
- if(fill_root_direct(fh, dxpl, fill_size, &state, NULL))
+ if(fill_root_direct(fh, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Fill all rows of 2nd level indirect blocks */
- if(fill_all_2nd_indirect_rows(fh, dxpl, fill_size, &state, NULL))
+ if(fill_all_2nd_indirect_rows(fh, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Fill all direct block rows in third level indirect block */
- if(fill_all_direct(fh, dxpl, fill_size, &state, NULL))
+ if(fill_all_direct(fh, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill row of recursive indirect blocks in third level indirect block */
- if(fill_2nd_indirect_row(fh, dxpl, 1, fill_size, &state, NULL))
+ if(fill_2nd_indirect_row(fh, 1, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
TEST_ERROR
/* Close the file */
@@ -5576,7 +5548,7 @@ test_man_fill_first_3rd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fh
error:
H5E_BEGIN_TRY {
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -5605,7 +5577,6 @@ 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 = 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 */
@@ -5630,7 +5601,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, H5AC_ind_read_dxpl_id, cparam)))
+ if(NULL == (fh = H5HF_create(f, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -5652,23 +5623,23 @@ test_man_fill_3rd_recursive_indirect_row(hid_t fapl, H5HF_create_t *cparam, fhea
fill_size = get_fill_size(tparam);
/* Fill direct blocks up in root indirect block */
- if(fill_root_direct(fh, dxpl, fill_size, &state, NULL))
+ if(fill_root_direct(fh, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Fill all rows of 2nd level indirect blocks */
- if(fill_all_2nd_indirect_rows(fh, dxpl, fill_size, &state, NULL))
+ if(fill_all_2nd_indirect_rows(fh, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill 1st row of 3rd level indirect blocks */
- if(fill_3rd_indirect_row(fh, dxpl, 1, fill_size, &state, NULL))
+ if(fill_3rd_indirect_row(fh, 1, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
TEST_ERROR
/* Close the file */
@@ -5683,7 +5654,7 @@ test_man_fill_3rd_recursive_indirect_row(hid_t fapl, H5HF_create_t *cparam, fhea
error:
H5E_BEGIN_TRY {
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -5712,7 +5683,6 @@ 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 = 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 */
@@ -5737,7 +5707,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, H5AC_ind_read_dxpl_id, cparam)))
+ if(NULL == (fh = H5HF_create(f, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -5759,23 +5729,23 @@ test_man_fill_all_3rd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fhea
fill_size = get_fill_size(tparam);
/* Fill direct blocks up in root indirect block */
- if(fill_root_direct(fh, dxpl, fill_size, &state, NULL))
+ if(fill_root_direct(fh, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Fill all rows of 2nd level indirect blocks */
- if(fill_all_2nd_indirect_rows(fh, dxpl, fill_size, &state, NULL))
+ if(fill_all_2nd_indirect_rows(fh, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill all rows of 3rd level indirect blocks */
- if(fill_all_3rd_indirect_rows(fh, dxpl, fill_size, &state, NULL))
+ if(fill_all_3rd_indirect_rows(fh, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
TEST_ERROR
/* Close the file */
@@ -5790,7 +5760,7 @@ test_man_fill_all_3rd_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fhea
error:
H5E_BEGIN_TRY {
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -5820,7 +5790,6 @@ 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 = 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 */
@@ -5845,7 +5814,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, H5AC_ind_read_dxpl_id, cparam)))
+ if(NULL == (fh = H5HF_create(f, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -5867,30 +5836,30 @@ test_man_start_4th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_t
fill_size = get_fill_size(tparam);
/* Fill direct blocks up in root indirect block */
- if(fill_root_direct(fh, dxpl, fill_size, &state, NULL))
+ if(fill_root_direct(fh, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Fill all rows of 2nd level indirect blocks */
- if(fill_all_2nd_indirect_rows(fh, dxpl, fill_size, &state, NULL))
+ if(fill_all_2nd_indirect_rows(fh, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Fill all rows of 3rd level indirect blocks */
- if(fill_all_3rd_indirect_rows(fh, dxpl, fill_size, &state, NULL))
+ if(fill_all_3rd_indirect_rows(fh, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert one more object, to force creation of four level deep
* recursive indirect block
*/
state.man_alloc_size += DBLOCK_SIZE(fh, 0);
- if(add_obj(fh, dxpl, (size_t)10, SMALL_OBJ_SIZE1, &state, NULL))
+ if(add_obj(fh, (size_t)10, SMALL_OBJ_SIZE1, &state, NULL))
FAIL_STACK_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
TEST_ERROR
/* Close the file */
@@ -5905,7 +5874,7 @@ test_man_start_4th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_t
error:
H5E_BEGIN_TRY {
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -5935,7 +5904,6 @@ 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 = 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 */
@@ -5960,7 +5928,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, H5AC_ind_read_dxpl_id, cparam)))
+ if(NULL == (fh = H5HF_create(f, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -5982,35 +5950,35 @@ test_man_fill_first_4th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fh
fill_size = get_fill_size(tparam);
/* Fill direct blocks up in root indirect block */
- if(fill_root_direct(fh, dxpl, fill_size, &state, NULL))
+ if(fill_root_direct(fh, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Fill all rows of 2nd level indirect blocks */
- if(fill_all_2nd_indirect_rows(fh, dxpl, fill_size, &state, NULL))
+ if(fill_all_2nd_indirect_rows(fh, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Fill all rows of 3rd level indirect blocks */
- if(fill_all_3rd_indirect_rows(fh, dxpl, fill_size, &state, NULL))
+ if(fill_all_3rd_indirect_rows(fh, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Fill direct block rows in fourth level indirect block */
- if(fill_all_direct(fh, dxpl, fill_size, &state, NULL))
+ if(fill_all_direct(fh, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Fill all rows of 2nd level deep indirect blocks in fourth level indirect block */
- if(fill_all_2nd_indirect_rows(fh, dxpl, fill_size, &state, NULL))
+ if(fill_all_2nd_indirect_rows(fh, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill first row of 3rd level deep indirect blocks in fourth level indirect block */
- if(fill_3rd_indirect_row(fh, dxpl, 1, fill_size, &state, NULL))
+ if(fill_3rd_indirect_row(fh, 1, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
TEST_ERROR
/* Close the file */
@@ -6025,7 +5993,7 @@ test_man_fill_first_4th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fh
error:
H5E_BEGIN_TRY {
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -6055,7 +6023,6 @@ 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 = 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 */
@@ -6080,7 +6047,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, H5AC_ind_read_dxpl_id, cparam)))
+ if(NULL == (fh = H5HF_create(f, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -6102,27 +6069,27 @@ test_man_fill_4th_recursive_indirect_row(hid_t fapl, H5HF_create_t *cparam, fhea
fill_size = get_fill_size(tparam);
/* Fill direct blocks up in root indirect block */
- if(fill_root_direct(fh, dxpl, fill_size, &state, NULL))
+ if(fill_root_direct(fh, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Fill all rows of 2nd level indirect blocks */
- if(fill_all_2nd_indirect_rows(fh, dxpl, fill_size, &state, NULL))
+ if(fill_all_2nd_indirect_rows(fh, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Fill all rows of 3rd level indirect blocks */
- if(fill_all_3rd_indirect_rows(fh, dxpl, fill_size, &state, NULL))
+ if(fill_all_3rd_indirect_rows(fh, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill 1st row of 4th level indirect blocks */
- if(fill_4th_indirect_row(fh, dxpl, 1, fill_size, &state, NULL))
+ if(fill_4th_indirect_row(fh, 1, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
TEST_ERROR
/* Close the file */
@@ -6137,7 +6104,7 @@ test_man_fill_4th_recursive_indirect_row(hid_t fapl, H5HF_create_t *cparam, fhea
error:
H5E_BEGIN_TRY {
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -6167,7 +6134,6 @@ 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 = 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 */
@@ -6192,7 +6158,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, H5AC_ind_read_dxpl_id, cparam)))
+ if(NULL == (fh = H5HF_create(f, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -6214,27 +6180,27 @@ test_man_fill_all_4th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fhea
fill_size = get_fill_size(tparam);
/* Fill direct blocks up in root indirect block */
- if(fill_root_direct(fh, dxpl, fill_size, &state, NULL))
+ if(fill_root_direct(fh, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Fill all rows of 2nd level indirect blocks */
- if(fill_all_2nd_indirect_rows(fh, dxpl, fill_size, &state, NULL))
+ if(fill_all_2nd_indirect_rows(fh, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Fill all rows of 3rd level indirect blocks */
- if(fill_all_3rd_indirect_rows(fh, dxpl, fill_size, &state, NULL))
+ if(fill_all_3rd_indirect_rows(fh, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill all rows of 4th level indirect blocks */
- if(fill_all_4th_indirect_rows(fh, dxpl, fill_size, &state, NULL))
+ if(fill_all_4th_indirect_rows(fh, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
TEST_ERROR
/* Close the file */
@@ -6249,7 +6215,7 @@ test_man_fill_all_4th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fhea
error:
H5E_BEGIN_TRY {
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -6282,7 +6248,6 @@ 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 = 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 */
@@ -6307,7 +6272,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, H5AC_ind_read_dxpl_id, cparam)))
+ if(NULL == (fh = H5HF_create(f, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -6330,46 +6295,46 @@ test_man_start_5th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_t
fill_size = get_fill_size(tparam);
/* Fill direct blocks up in root indirect block */
- if(fill_root_direct(fh, dxpl, fill_size, &state, NULL))
+ if(fill_root_direct(fh, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap & file */
- if(reopen_file(&file, &f, filename, fapl, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_file(&file, &f, filename, fapl, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill all rows of 2nd level indirect blocks */
- if(fill_all_2nd_indirect_rows(fh, dxpl, fill_size, &state, NULL))
+ if(fill_all_2nd_indirect_rows(fh, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap & file */
- if(reopen_file(&file, &f, filename, fapl, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_file(&file, &f, filename, fapl, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill all rows of 3rd level indirect blocks */
- if(fill_all_3rd_indirect_rows(fh, dxpl, fill_size, &state, NULL))
+ if(fill_all_3rd_indirect_rows(fh, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap & file */
- if(reopen_file(&file, &f, filename, fapl, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_file(&file, &f, filename, fapl, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill all rows of 4th level indirect blocks */
- if(fill_all_4th_indirect_rows(fh, dxpl, fill_size, &state, NULL))
+ if(fill_all_4th_indirect_rows(fh, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap & file */
- if(reopen_file(&file, &f, filename, fapl, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_file(&file, &f, filename, fapl, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert one more object, to force creation of five level deep
* recursive indirect block
*/
state.man_alloc_size += DBLOCK_SIZE(fh, 0);
- if(add_obj(fh, dxpl, (size_t)10, (size_t)SMALL_OBJ_SIZE1, &state, NULL))
+ if(add_obj(fh, (size_t)10, (size_t)SMALL_OBJ_SIZE1, &state, NULL))
FAIL_STACK_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
TEST_ERROR
/* Close the file */
@@ -6384,7 +6349,7 @@ test_man_start_5th_recursive_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_t
error:
H5E_BEGIN_TRY {
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -6411,7 +6376,6 @@ 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 = 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 */
@@ -6441,7 +6405,7 @@ test_man_remove_bogus(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpa
STACK_ERROR
/* Create absolute heap */
- if(NULL == (fh = H5HF_create(f, dxpl, cparam)))
+ if(NULL == (fh = H5HF_create(f, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -6456,7 +6420,7 @@ test_man_remove_bogus(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpa
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/*
@@ -6482,13 +6446,13 @@ HDfprintf(stderr, "Random # seed was: %lu\n", seed);
/* Try removing bogus heap ID from empty heap */
H5E_BEGIN_TRY {
- ret = H5HF_remove(fh, dxpl, heap_id);
+ ret = H5HF_remove(fh, heap_id);
} H5E_END_TRY;
if(ret >= 0)
FAIL_STACK_ERROR
/* Fill root direct blocks */
- if(fill_root_direct(fh, dxpl, fill_size, &state, NULL))
+ if(fill_root_direct(fh, fill_size, &state, NULL))
FAIL_STACK_ERROR
/* Get offset of random heap ID */
@@ -6509,7 +6473,7 @@ HDfprintf(stderr, "Random # seed was: %lu\n", seed);
/* Try removing bogus heap ID from heap w/objects */
H5E_BEGIN_TRY {
- ret = H5HF_remove(fh, dxpl, heap_id);
+ ret = H5HF_remove(fh, heap_id);
} H5E_END_TRY;
if(ret >= 0)
TEST_ERROR
@@ -6517,14 +6481,14 @@ HDfprintf(stderr, "Random # seed was: %lu\n", seed);
/* Try reading bogus heap ID from heap w/objects */
H5E_BEGIN_TRY {
- ret = H5HF_read(fh, dxpl, heap_id, shared_robj_g);
+ ret = H5HF_read(fh, heap_id, shared_robj_g);
} H5E_END_TRY;
if(ret >= 0)
TEST_ERROR
H5Eclear2(H5E_DEFAULT);
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
TEST_ERROR
/* Close the file */
@@ -6540,7 +6504,7 @@ error:
HDfprintf(stderr, "Random # seed was: %lu\n", seed);
H5E_BEGIN_TRY {
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -6565,7 +6529,6 @@ 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 = 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 */
@@ -6594,7 +6557,7 @@ test_man_remove_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpara
STACK_ERROR
/* Create absolute heap */
- if(NULL == (fh = H5HF_create(f, dxpl, cparam)))
+ if(NULL == (fh = H5HF_create(f, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -6611,7 +6574,7 @@ test_man_remove_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpara
/* Prepare for querying the size of a file with an empty heap */
/* Close (empty) heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
FAIL_STACK_ERROR
/* Close file */
@@ -6635,7 +6598,7 @@ test_man_remove_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpara
STACK_ERROR
/* Re-open heap */
- if(NULL == (fh = H5HF_open(f, dxpl, fh_addr)))
+ if(NULL == (fh = H5HF_open(f, fh_addr)))
FAIL_STACK_ERROR
/*
@@ -6648,11 +6611,11 @@ test_man_remove_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpara
obj[u] = (unsigned char)u;
/* Insert object into heap */
- if(H5HF_insert(fh, dxpl, sizeof(obj), obj, &heap_id) < 0)
+ if(H5HF_insert(fh, sizeof(obj), obj, &heap_id) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -6664,11 +6627,11 @@ test_man_remove_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpara
FAIL_STACK_ERROR
/* Remove object from heap */
- if(H5HF_remove(fh, dxpl, heap_id) < 0)
+ if(H5HF_remove(fh, heap_id) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -6680,7 +6643,7 @@ test_man_remove_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpara
FAIL_STACK_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
TEST_ERROR
/* Close the file */
@@ -6703,7 +6666,7 @@ test_man_remove_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpara
error:
H5E_BEGIN_TRY {
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -6728,7 +6691,6 @@ 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 = 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 */
@@ -6758,7 +6720,7 @@ test_man_remove_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpara
STACK_ERROR
/* Create absolute heap */
- if(NULL == (fh = H5HF_create(f, dxpl, cparam)))
+ if(NULL == (fh = H5HF_create(f, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -6775,7 +6737,7 @@ test_man_remove_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpara
/* Prepare for querying the size of a file with an empty heap */
/* Close (empty) heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
FAIL_STACK_ERROR
/* Close file */
@@ -6799,7 +6761,7 @@ test_man_remove_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpara
STACK_ERROR
/* Re-open heap */
- if(NULL == (fh = H5HF_open(f, dxpl, fh_addr)))
+ if(NULL == (fh = H5HF_open(f, fh_addr)))
FAIL_STACK_ERROR
/*
@@ -6812,11 +6774,11 @@ test_man_remove_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpara
obj[u] = (unsigned char)u;
/* Insert first object into heap */
- if(H5HF_insert(fh, dxpl, sizeof(obj), obj, &heap_id1) < 0)
+ if(H5HF_insert(fh, sizeof(obj), obj, &heap_id1) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -6828,11 +6790,11 @@ test_man_remove_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpara
FAIL_STACK_ERROR
/* Insert second object into heap */
- if(H5HF_insert(fh, dxpl, sizeof(obj), obj, &heap_id2) < 0)
+ if(H5HF_insert(fh, sizeof(obj), obj, &heap_id2) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -6842,11 +6804,11 @@ test_man_remove_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpara
FAIL_STACK_ERROR
/* Remove first object from heap */
- if(H5HF_remove(fh, dxpl, heap_id1) < 0)
+ if(H5HF_remove(fh, heap_id1) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -6856,11 +6818,11 @@ test_man_remove_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpara
FAIL_STACK_ERROR
/* Remove second object from heap */
- if(H5HF_remove(fh, dxpl, heap_id2) < 0)
+ if(H5HF_remove(fh, heap_id2) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -6872,7 +6834,7 @@ test_man_remove_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpara
FAIL_STACK_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
TEST_ERROR
/* Close the file */
@@ -6895,7 +6857,7 @@ test_man_remove_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpara
error:
H5E_BEGIN_TRY {
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -6921,7 +6883,6 @@ 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 = 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 */
@@ -6951,7 +6912,7 @@ test_man_remove_one_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
STACK_ERROR
/* Create absolute heap */
- if(NULL == (fh = H5HF_create(f, dxpl, cparam)))
+ if(NULL == (fh = H5HF_create(f, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -6968,7 +6929,7 @@ test_man_remove_one_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
/* Prepare for querying the size of a file with an empty heap */
/* Close (empty) heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
FAIL_STACK_ERROR
/* Close file */
@@ -6992,7 +6953,7 @@ test_man_remove_one_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
STACK_ERROR
/* Re-open heap */
- if(NULL == (fh = H5HF_open(f, dxpl, fh_addr)))
+ if(NULL == (fh = H5HF_open(f, fh_addr)))
FAIL_STACK_ERROR
/*
@@ -7005,11 +6966,11 @@ test_man_remove_one_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
obj = shared_wobj_g;
/* Insert object into heap */
- if(H5HF_insert(fh, dxpl, obj_len, obj, &heap_id) < 0)
+ if(H5HF_insert(fh, obj_len, obj, &heap_id) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -7024,11 +6985,11 @@ test_man_remove_one_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
FAIL_STACK_ERROR
/* Remove object from heap */
- if(H5HF_remove(fh, dxpl, heap_id) < 0)
+ if(H5HF_remove(fh, heap_id) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -7040,7 +7001,7 @@ test_man_remove_one_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
FAIL_STACK_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
FAIL_STACK_ERROR
/* Close the file */
@@ -7063,7 +7024,7 @@ test_man_remove_one_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
error:
H5E_BEGIN_TRY {
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -7089,7 +7050,6 @@ 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 = 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 */
@@ -7120,7 +7080,7 @@ test_man_remove_two_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
STACK_ERROR
/* Create absolute heap */
- if(NULL == (fh = H5HF_create(f, dxpl, cparam)))
+ if(NULL == (fh = H5HF_create(f, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -7137,7 +7097,7 @@ test_man_remove_two_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
/* Prepare for querying the size of a file with an empty heap */
/* Close (empty) heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
FAIL_STACK_ERROR
/* Close file */
@@ -7161,7 +7121,7 @@ test_man_remove_two_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
STACK_ERROR
/* Re-open heap */
- if(NULL == (fh = H5HF_open(f, dxpl, fh_addr)))
+ if(NULL == (fh = H5HF_open(f, fh_addr)))
FAIL_STACK_ERROR
/*
@@ -7177,11 +7137,11 @@ test_man_remove_two_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
obj = shared_wobj_g;
/* Insert object into heap */
- if(H5HF_insert(fh, dxpl, obj_len, obj, &heap_id1) < 0)
+ if(H5HF_insert(fh, obj_len, obj, &heap_id1) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -7200,11 +7160,11 @@ test_man_remove_two_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
obj = shared_wobj_g;
/* Insert object into heap */
- if(H5HF_insert(fh, dxpl, obj_len, obj, &heap_id2) < 0)
+ if(H5HF_insert(fh, obj_len, obj, &heap_id2) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -7222,11 +7182,11 @@ test_man_remove_two_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
/* Remove objects in different orders */
if(tparam->del_dir == FHEAP_DEL_FORWARD) {
/* Remove first object from heap */
- if(H5HF_remove(fh, dxpl, heap_id1) < 0)
+ if(H5HF_remove(fh, heap_id1) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -7237,16 +7197,16 @@ test_man_remove_two_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
FAIL_STACK_ERROR
/* Remove second object from heap */
- if(H5HF_remove(fh, dxpl, heap_id2) < 0)
+ if(H5HF_remove(fh, heap_id2) < 0)
FAIL_STACK_ERROR
} /* end if */
else {
/* Remove second object from heap */
- if(H5HF_remove(fh, dxpl, heap_id2) < 0)
+ if(H5HF_remove(fh, heap_id2) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -7262,12 +7222,12 @@ test_man_remove_two_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
FAIL_STACK_ERROR
/* Remove first object from heap */
- if(H5HF_remove(fh, dxpl, heap_id1) < 0)
+ if(H5HF_remove(fh, heap_id1) < 0)
FAIL_STACK_ERROR
} /* end else */
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -7279,7 +7239,7 @@ test_man_remove_two_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
FAIL_STACK_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
TEST_ERROR
/* Close the file */
@@ -7306,7 +7266,7 @@ HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size);
error:
H5E_BEGIN_TRY {
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -7332,7 +7292,6 @@ 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 = 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 */
@@ -7364,7 +7323,7 @@ test_man_remove_three_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param
STACK_ERROR
/* Create absolute heap */
- if(NULL == (fh = H5HF_create(f, dxpl, cparam)))
+ if(NULL == (fh = H5HF_create(f, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -7381,7 +7340,7 @@ test_man_remove_three_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param
/* Prepare for querying the size of a file with an empty heap */
/* Close (empty) heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
FAIL_STACK_ERROR
/* Close file */
@@ -7405,7 +7364,7 @@ test_man_remove_three_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param
STACK_ERROR
/* Re-open heap */
- if(NULL == (fh = H5HF_open(f, dxpl, fh_addr)))
+ if(NULL == (fh = H5HF_open(f, fh_addr)))
FAIL_STACK_ERROR
/*
@@ -7421,11 +7380,11 @@ test_man_remove_three_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param
obj = shared_wobj_g;
/* Insert object into heap */
- if(H5HF_insert(fh, dxpl, obj_len, obj, &heap_id1) < 0)
+ if(H5HF_insert(fh, obj_len, obj, &heap_id1) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -7444,11 +7403,11 @@ test_man_remove_three_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param
obj = shared_wobj_g;
/* Insert object into heap */
- if(H5HF_insert(fh, dxpl, obj_len, obj, &heap_id2) < 0)
+ if(H5HF_insert(fh, obj_len, obj, &heap_id2) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -7468,11 +7427,11 @@ test_man_remove_three_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param
obj = shared_wobj_g;
/* Insert object into heap */
- if(H5HF_insert(fh, dxpl, obj_len, obj, &heap_id3) < 0)
+ if(H5HF_insert(fh, obj_len, obj, &heap_id3) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -7490,11 +7449,11 @@ test_man_remove_three_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param
/* Remove objects in different orders */
if(tparam->del_dir == FHEAP_DEL_FORWARD) {
/* Remove first object from heap */
- if(H5HF_remove(fh, dxpl, heap_id1) < 0)
+ if(H5HF_remove(fh, heap_id1) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -7505,11 +7464,11 @@ test_man_remove_three_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param
FAIL_STACK_ERROR
/* Remove second object from heap */
- if(H5HF_remove(fh, dxpl, heap_id2) < 0)
+ if(H5HF_remove(fh, heap_id2) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -7520,16 +7479,16 @@ test_man_remove_three_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param
FAIL_STACK_ERROR
/* Remove third object from heap */
- if(H5HF_remove(fh, dxpl, heap_id3) < 0)
+ if(H5HF_remove(fh, heap_id3) < 0)
FAIL_STACK_ERROR
} /* end if */
else {
/* Remove third object from heap */
- if(H5HF_remove(fh, dxpl, heap_id3) < 0)
+ if(H5HF_remove(fh, heap_id3) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -7545,11 +7504,11 @@ test_man_remove_three_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param
FAIL_STACK_ERROR
/* Remove second object from heap */
- if(H5HF_remove(fh, dxpl, heap_id2) < 0)
+ if(H5HF_remove(fh, heap_id2) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -7565,12 +7524,12 @@ test_man_remove_three_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param
FAIL_STACK_ERROR
/* Remove first object from heap */
- if(H5HF_remove(fh, dxpl, heap_id1) < 0)
+ if(H5HF_remove(fh, heap_id1) < 0)
FAIL_STACK_ERROR
} /* end else */
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -7582,7 +7541,7 @@ test_man_remove_three_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param
FAIL_STACK_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
TEST_ERROR
/* Close the file */
@@ -7609,7 +7568,7 @@ HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size);
error:
H5E_BEGIN_TRY {
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -7633,7 +7592,6 @@ 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 = 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 */
@@ -7663,7 +7621,7 @@ test_man_incr_insert_remove(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_
STACK_ERROR
/* Create absolute heap */
- if(NULL == (fh = H5HF_create(f, dxpl, cparam)))
+ if(NULL == (fh = H5HF_create(f, cparam)))
FAIL_STACK_ERROR
if(H5HF_get_id_len(fh, &id_len) < 0)
FAIL_STACK_ERROR
@@ -7683,29 +7641,29 @@ test_man_incr_insert_remove(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_
TESTING("incremental object insertion and removal")
for(i = 0; i < 100; i++) {
- sprintf(obj1.b, "%s%d", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", i);
+ HDsprintf(obj1.b, "%s%d", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", i);
for(j = 0; j < i; j++) {
- sprintf(obj2.b, "%s%d", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", j);
+ HDsprintf(obj2.b, "%s%d", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", j);
- if(H5HF_remove(fh, dxpl, heap_id[j]) < 0)
+ if(H5HF_remove(fh, heap_id[j]) < 0)
FAIL_STACK_ERROR
- if(H5HF_insert(fh, dxpl, (sizeof(obj2)), &obj2, heap_id[j]) < 0)
+ if(H5HF_insert(fh, (sizeof(obj2)), &obj2, heap_id[j]) < 0)
FAIL_STACK_ERROR
} /* end for */
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert object */
HDmemset(heap_id[i], 0, id_len);
- if(H5HF_insert(fh, dxpl, (sizeof(obj1)), &obj1, heap_id[i]) < 0)
+ if(H5HF_insert(fh, (sizeof(obj1)), &obj1, heap_id[i]) < 0)
FAIL_STACK_ERROR
} /* end for */
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
TEST_ERROR
/* Close the file */
@@ -7720,7 +7678,7 @@ test_man_incr_insert_remove(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_
error:
H5E_BEGIN_TRY {
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -7748,7 +7706,6 @@ 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 = 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 */
@@ -7764,7 +7721,7 @@ test_man_remove_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_
TEST_ERROR
/* Perform common file & heap open operations */
- if(open_heap(filename, fapl, dxpl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
+ if(open_heap(filename, fapl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
TEST_ERROR
@@ -7772,12 +7729,12 @@ test_man_remove_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_
state.man_size = DBLOCK_SIZE(fh, 0);
state.man_alloc_size = DBLOCK_SIZE(fh, 0);
state.man_free_space = DBLOCK_FREE(fh, 0);
- if(fill_heap(fh, dxpl, 0, fill_size, &state, &keep_ids))
+ if(fill_heap(fh, 0, fill_size, &state, &keep_ids))
TEST_ERROR
/* Perform common file & heap close operations */
- if(close_heap(filename, fapl, dxpl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
+ if(close_heap(filename, fapl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
TEST_ERROR
/* Free resources */
@@ -7796,7 +7753,7 @@ error:
H5MM_xfree(keep_ids.lens);
H5MM_xfree(keep_ids.offs);
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -7822,7 +7779,6 @@ 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 = 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 */
@@ -7838,7 +7794,7 @@ test_man_remove_two_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
TEST_ERROR
/* Perform common file & heap open operations */
- if(open_heap(filename, fapl, dxpl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
+ if(open_heap(filename, fapl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
TEST_ERROR
@@ -7846,11 +7802,11 @@ test_man_remove_two_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
state.man_size = DBLOCK_SIZE(fh, 0);
state.man_alloc_size = DBLOCK_SIZE(fh, 0);
state.man_free_space = DBLOCK_FREE(fh, 0);
- if(fill_heap(fh, dxpl, 0, fill_size, &state, &keep_ids))
+ if(fill_heap(fh, 0, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -7861,12 +7817,12 @@ test_man_remove_two_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
state.man_size = cparam->managed.width * DBLOCK_SIZE(fh, 0);
state.man_alloc_size += DBLOCK_SIZE(fh, 0);
state.man_free_space = (cparam->managed.width - 1) * DBLOCK_FREE(fh, 0);
- if(fill_heap(fh, dxpl, 0, fill_size, &state, &keep_ids))
+ if(fill_heap(fh, 0, fill_size, &state, &keep_ids))
TEST_ERROR
/* Perform common file & heap close operations */
- if(close_heap(filename, fapl, dxpl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
+ if(close_heap(filename, fapl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
TEST_ERROR
/* Free resources */
@@ -7885,7 +7841,7 @@ error:
H5MM_xfree(keep_ids.lens);
H5MM_xfree(keep_ids.offs);
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -7911,7 +7867,6 @@ 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 = 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 */
@@ -7927,17 +7882,17 @@ test_man_remove_first_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
TEST_ERROR
/* Perform common file & heap open operations */
- if(open_heap(filename, fapl, dxpl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
+ if(open_heap(filename, fapl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
TEST_ERROR
/* Fill first row of direct blocks */
- if(fill_root_row(fh, dxpl, 0, fill_size, &state, &keep_ids))
+ if(fill_root_row(fh, 0, fill_size, &state, &keep_ids))
TEST_ERROR
/* Perform common file & heap close operations */
- if(close_heap(filename, fapl, dxpl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
+ if(close_heap(filename, fapl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
TEST_ERROR
/* Free resources */
@@ -7956,7 +7911,7 @@ error:
H5MM_xfree(keep_ids.lens);
H5MM_xfree(keep_ids.offs);
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -7982,7 +7937,6 @@ 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 = 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 */
@@ -7998,19 +7952,19 @@ test_man_remove_first_two_rows(hid_t fapl, H5HF_create_t *cparam, fheap_test_par
TEST_ERROR
/* Perform common file & heap open operations */
- if(open_heap(filename, fapl, dxpl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
+ if(open_heap(filename, fapl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
TEST_ERROR
/* Fill first two rows of direct blocks */
- if(fill_root_row(fh, dxpl, 0, fill_size, &state, &keep_ids))
+ if(fill_root_row(fh, 0, fill_size, &state, &keep_ids))
TEST_ERROR
- if(fill_root_row(fh, dxpl, 1, fill_size, &state, &keep_ids))
+ if(fill_root_row(fh, 1, fill_size, &state, &keep_ids))
TEST_ERROR
/* Perform common file & heap close operations */
- if(close_heap(filename, fapl, dxpl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
+ if(close_heap(filename, fapl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
TEST_ERROR
/* Free resources */
@@ -8029,7 +7983,7 @@ error:
H5MM_xfree(keep_ids.lens);
H5MM_xfree(keep_ids.offs);
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -8055,7 +8009,6 @@ 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 = 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 */
@@ -8071,23 +8024,23 @@ test_man_remove_first_four_rows(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa
TEST_ERROR
/* Perform common file & heap open operations */
- if(open_heap(filename, fapl, dxpl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
+ if(open_heap(filename, fapl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
TEST_ERROR
/* Fill first two rows of direct blocks */
- if(fill_root_row(fh, dxpl, 0, fill_size, &state, &keep_ids))
+ if(fill_root_row(fh, 0, fill_size, &state, &keep_ids))
TEST_ERROR
- if(fill_root_row(fh, dxpl, 1, fill_size, &state, &keep_ids))
+ if(fill_root_row(fh, 1, fill_size, &state, &keep_ids))
TEST_ERROR
- if(fill_root_row(fh, dxpl, 2, fill_size, &state, &keep_ids))
+ if(fill_root_row(fh, 2, fill_size, &state, &keep_ids))
TEST_ERROR
- if(fill_root_row(fh, dxpl, 3, fill_size, &state, &keep_ids))
+ if(fill_root_row(fh, 3, fill_size, &state, &keep_ids))
TEST_ERROR
/* Perform common file & heap close operations */
- if(close_heap(filename, fapl, dxpl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
+ if(close_heap(filename, fapl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
TEST_ERROR
/* Free resources */
@@ -8106,7 +8059,7 @@ error:
H5MM_xfree(keep_ids.lens);
H5MM_xfree(keep_ids.offs);
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -8132,7 +8085,6 @@ 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 = 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 */
@@ -8148,17 +8100,17 @@ test_man_remove_all_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa
TEST_ERROR
/* Perform common file & heap open operations */
- if(open_heap(filename, fapl, dxpl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
+ if(open_heap(filename, fapl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
TEST_ERROR
/* Fill direct blocks in root indirect block */
- if(fill_root_direct(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_root_direct(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Perform common file & heap close operations */
- if(close_heap(filename, fapl, dxpl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
+ if(close_heap(filename, fapl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
TEST_ERROR
/* Free resources */
@@ -8177,7 +8129,7 @@ error:
H5MM_xfree(keep_ids.lens);
H5MM_xfree(keep_ids.offs);
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -8203,7 +8155,6 @@ 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 = 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 */
@@ -8219,21 +8170,21 @@ test_man_remove_2nd_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param
TEST_ERROR
/* Perform common file & heap open operations */
- if(open_heap(filename, fapl, dxpl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
+ if(open_heap(filename, fapl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
TEST_ERROR
/* Fill direct blocks in root indirect block */
- if(fill_root_direct(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_root_direct(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Fill all rows of 2nd level indirect blocks */
- if(fill_all_2nd_indirect_rows(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_all_2nd_indirect_rows(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Perform common file & heap close operations */
- if(close_heap(filename, fapl, dxpl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
+ if(close_heap(filename, fapl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
TEST_ERROR
/* Free resources */
@@ -8252,7 +8203,7 @@ error:
H5MM_xfree(keep_ids.lens);
H5MM_xfree(keep_ids.offs);
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -8278,7 +8229,6 @@ 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 = 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 */
@@ -8294,25 +8244,25 @@ test_man_remove_3rd_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param
TEST_ERROR
/* Perform common file & heap open operations */
- if(open_heap(filename, fapl, dxpl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
+ if(open_heap(filename, fapl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
TEST_ERROR
/* Fill direct blocks in root indirect block */
- if(fill_root_direct(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_root_direct(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Fill all rows of 2nd level indirect blocks */
- if(fill_all_2nd_indirect_rows(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_all_2nd_indirect_rows(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Fill all rows of 3rd level indirect blocks */
- if(fill_all_3rd_indirect_rows(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_all_3rd_indirect_rows(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Perform common file & heap close operations */
- if(close_heap(filename, fapl, dxpl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
+ if(close_heap(filename, fapl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
TEST_ERROR
/* Free resources */
@@ -8331,7 +8281,7 @@ error:
H5MM_xfree(keep_ids.lens);
H5MM_xfree(keep_ids.offs);
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -8362,7 +8312,6 @@ 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 = 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 */
@@ -8378,7 +8327,7 @@ test_man_skip_start_block(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
TEST_ERROR
/* Perform common file & heap open operations */
- if(open_heap(filename, fapl, dxpl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
+ if(open_heap(filename, fapl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
TEST_ERROR
obj_size = (size_t)DBLOCK_SIZE(fh, 0) + 1;
@@ -8389,12 +8338,12 @@ test_man_skip_start_block(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
state.man_free_space = cparam->managed.width * DBLOCK_FREE(fh, 0);
state.man_free_space += cparam->managed.width * DBLOCK_FREE(fh, 1);
state.man_free_space += cparam->managed.width * DBLOCK_FREE(fh, 2);
- if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
/* Perform common file & heap close operations */
- if(close_heap(filename, fapl, dxpl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
+ if(close_heap(filename, fapl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
TEST_ERROR
/* Free resources */
@@ -8413,7 +8362,7 @@ error:
H5MM_xfree(keep_ids.lens);
H5MM_xfree(keep_ids.offs);
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -8440,7 +8389,6 @@ 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 = 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 */
@@ -8456,7 +8404,7 @@ test_man_skip_start_block_add_back(hid_t fapl, H5HF_create_t *cparam, fheap_test
TEST_ERROR
/* Perform common file & heap open operations */
- if(open_heap(filename, fapl, dxpl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
+ if(open_heap(filename, fapl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
TEST_ERROR
@@ -8469,30 +8417,30 @@ test_man_skip_start_block_add_back(hid_t fapl, H5HF_create_t *cparam, fheap_test
state.man_free_space = cparam->managed.width * DBLOCK_FREE(fh, 0);
state.man_free_space += cparam->managed.width * DBLOCK_FREE(fh, 1);
state.man_free_space += cparam->managed.width * DBLOCK_FREE(fh, 2);
- if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert an object to fill up the heap block just created */
obj_size = (size_t)DBLOCK_FREE(fh, 2) - obj_size;
- if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert second "real" object, which should go in earlier direct block */
state.man_alloc_size += DBLOCK_SIZE(fh, 0);
- if(add_obj(fh, dxpl, (size_t)20, (size_t)SMALL_OBJ_SIZE2, &state, &keep_ids))
+ if(add_obj(fh, (size_t)20, (size_t)SMALL_OBJ_SIZE2, &state, &keep_ids))
TEST_ERROR
/* Perform common file & heap close operations */
- if(close_heap(filename, fapl, dxpl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
+ if(close_heap(filename, fapl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
TEST_ERROR
/* Free resources */
@@ -8511,7 +8459,7 @@ error:
H5MM_xfree(keep_ids.lens);
H5MM_xfree(keep_ids.offs);
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -8539,7 +8487,6 @@ 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 = 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 */
@@ -8556,7 +8503,7 @@ test_man_skip_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_t
TEST_ERROR
/* Perform common file & heap open operations */
- if(open_heap(filename, fapl, dxpl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
+ if(open_heap(filename, fapl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
TEST_ERROR
@@ -8569,40 +8516,40 @@ test_man_skip_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_t
state.man_free_space = cparam->managed.width * DBLOCK_FREE(fh, 0);
state.man_free_space += cparam->managed.width * DBLOCK_FREE(fh, 1);
state.man_free_space += cparam->managed.width * DBLOCK_FREE(fh, 2);
- if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert an object to fill up the heap block just created */
obj_size = (size_t)DBLOCK_FREE(fh, 2) - obj_size;
- if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Add rows of blocks to "backfill" direct blocks that were skipped */
- if(fill_row(fh, dxpl, 0, fill_size, &state, &keep_ids))
+ if(fill_row(fh, 0, fill_size, &state, &keep_ids))
TEST_ERROR
- if(fill_row(fh, dxpl, 1, fill_size, &state, &keep_ids))
+ if(fill_row(fh, 1, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert another object, which should extend direct blocks, instead of backfill */
state.man_alloc_size += DBLOCK_SIZE(fh, 2);
- if(add_obj(fh, dxpl, (size_t)20, (size_t)SMALL_OBJ_SIZE2, &state, &keep_ids))
+ if(add_obj(fh, (size_t)20, (size_t)SMALL_OBJ_SIZE2, &state, &keep_ids))
TEST_ERROR
/* Perform common file & heap close operations */
- if(close_heap(filename, fapl, dxpl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
+ if(close_heap(filename, fapl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
TEST_ERROR
/* Free resources */
@@ -8621,7 +8568,7 @@ error:
H5MM_xfree(keep_ids.lens);
H5MM_xfree(keep_ids.offs);
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -8649,7 +8596,6 @@ 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 = 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 */
@@ -8665,7 +8611,7 @@ test_man_skip_2nd_block(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *t
TEST_ERROR
/* Perform common file & heap open operations */
- if(open_heap(filename, fapl, dxpl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
+ if(open_heap(filename, fapl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
TEST_ERROR
@@ -8673,11 +8619,11 @@ test_man_skip_2nd_block(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *t
state.man_size = DBLOCK_SIZE(fh, 0);
state.man_alloc_size = DBLOCK_SIZE(fh, 0);
state.man_free_space = DBLOCK_FREE(fh, 0);
- if(add_obj(fh, dxpl, (size_t)10, (size_t)SMALL_OBJ_SIZE1, &state, &keep_ids))
+ if(add_obj(fh, (size_t)10, (size_t)SMALL_OBJ_SIZE1, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert large object, to force creation of indirect block and
@@ -8691,12 +8637,12 @@ test_man_skip_2nd_block(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *t
state.man_free_space += (cparam->managed.width - 1 )* DBLOCK_FREE(fh, 0);
state.man_free_space += cparam->managed.width * DBLOCK_FREE(fh, 1);
state.man_free_space += cparam->managed.width * DBLOCK_FREE(fh, 2);
- if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Perform common file & heap close operations */
- if(close_heap(filename, fapl, dxpl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
+ if(close_heap(filename, fapl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
TEST_ERROR
/* Free resources */
@@ -8715,7 +8661,7 @@ error:
H5MM_xfree(keep_ids.lens);
H5MM_xfree(keep_ids.offs);
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -8746,7 +8692,6 @@ 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 = 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 */
@@ -8764,7 +8709,7 @@ test_man_skip_2nd_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_tes
TEST_ERROR
/* Perform common file & heap open operations */
- if(open_heap(filename, fapl, dxpl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
+ if(open_heap(filename, fapl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
TEST_ERROR
@@ -8772,11 +8717,11 @@ test_man_skip_2nd_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_tes
state.man_size = DBLOCK_SIZE(fh, 0);
state.man_alloc_size = DBLOCK_SIZE(fh, 0);
state.man_free_space = DBLOCK_FREE(fh, 0);
- if(add_obj(fh, dxpl, (size_t)10, (size_t)SMALL_OBJ_SIZE1, &state, &keep_ids))
+ if(add_obj(fh, (size_t)10, (size_t)SMALL_OBJ_SIZE1, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert large object, to force creation of indirect block and
@@ -8790,29 +8735,29 @@ test_man_skip_2nd_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_tes
state.man_free_space += (cparam->managed.width - 1 )* DBLOCK_FREE(fh, 0);
state.man_free_space += cparam->managed.width * DBLOCK_FREE(fh, 1);
state.man_free_space += cparam->managed.width * DBLOCK_FREE(fh, 2);
- if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert an object to fill up the (smaller) heap block just created */
obj_size = (size_t)DBLOCK_FREE(fh, 0) - SMALL_OBJ_SIZE1;
- if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill remainder of 2 * start size block */
obj_size = (size_t)DBLOCK_FREE(fh, 2) - ((size_t)DBLOCK_SIZE(fh, 0) + 1);
- if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert objects to fill remaining rows of the starting block size */
@@ -8820,26 +8765,26 @@ test_man_skip_2nd_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_tes
/* Fill remainder of first row of direct heap blocks up */
for(v = 0; v < (cparam->managed.width - 1); v++) {
state.man_alloc_size += DBLOCK_SIZE(fh, 0);
- if(fill_heap(fh, dxpl, 0, fill_size, &state, &keep_ids))
+ if(fill_heap(fh, 0, fill_size, &state, &keep_ids))
TEST_ERROR
} /* end for */
/* Fill second row of direct blocks */
- if(fill_row(fh, dxpl, 1, fill_size, &state, &keep_ids))
+ if(fill_row(fh, 1, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert one more object, to create new 2 * start size direct block */
state.man_alloc_size += DBLOCK_SIZE(fh, 2);
- if(add_obj(fh, dxpl, (size_t)10, (size_t)SMALL_OBJ_SIZE1, &state, &keep_ids))
+ if(add_obj(fh, (size_t)10, (size_t)SMALL_OBJ_SIZE1, &state, &keep_ids))
TEST_ERROR
/* Perform common file & heap close operations */
- if(close_heap(filename, fapl, dxpl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
+ if(close_heap(filename, fapl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
TEST_ERROR
/* Free resources */
@@ -8858,7 +8803,7 @@ error:
H5MM_xfree(keep_ids.lens);
H5MM_xfree(keep_ids.offs);
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -8891,7 +8836,6 @@ 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 = 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 */
@@ -8909,7 +8853,7 @@ test_man_fill_one_partial_skip_2nd_block_add_skipped(hid_t fapl, H5HF_create_t *
TEST_ERROR
/* Perform common file & heap open operations */
- if(open_heap(filename, fapl, dxpl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
+ if(open_heap(filename, fapl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
TEST_ERROR
@@ -8917,22 +8861,22 @@ test_man_fill_one_partial_skip_2nd_block_add_skipped(hid_t fapl, H5HF_create_t *
state.man_size = DBLOCK_SIZE(fh, 0);
state.man_alloc_size = DBLOCK_SIZE(fh, 0);
state.man_free_space = DBLOCK_FREE(fh, 0);
- if(fill_heap(fh, dxpl, 0, fill_size, &state, &keep_ids))
+ if(fill_heap(fh, 0, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert small object, to create root indirect block */
state.man_size += (cparam->managed.width - 1) * DBLOCK_SIZE(fh, 0);
state.man_alloc_size += DBLOCK_SIZE(fh, 0);
state.man_free_space += (cparam->managed.width - 1) * DBLOCK_FREE(fh, 0);
- if(add_obj(fh, dxpl, (size_t)10, (size_t)SMALL_OBJ_SIZE1, &state, &keep_ids))
+ if(add_obj(fh, (size_t)10, (size_t)SMALL_OBJ_SIZE1, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert large object, to force creation of indirect block and
@@ -8946,67 +8890,67 @@ test_man_fill_one_partial_skip_2nd_block_add_skipped(hid_t fapl, H5HF_create_t *
state.man_free_space += cparam->managed.width * DBLOCK_FREE(fh, 1);
state.man_free_space += cparam->managed.width * DBLOCK_FREE(fh, 2);
state.man_free_space += cparam->managed.width * DBLOCK_FREE(fh, 3);
- if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert an object to fill up the (smaller) heap block just created */
obj_size = (size_t)DBLOCK_FREE(fh, 0) - SMALL_OBJ_SIZE1;
- if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert object to fill remainder of 4 * start size block */
obj_size = (size_t)DBLOCK_FREE(fh, 3) - ((size_t)DBLOCK_SIZE(fh, 2) + 1);
- if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert objects to fill remaining heaps in first row */
for(u = 0; u < (cparam->managed.width - 2); u++) {
/* Fill a direct heap block up */
state.man_alloc_size += DBLOCK_SIZE(fh, 0);
- if(fill_heap(fh, dxpl, 0, fill_size, &state, &keep_ids))
+ if(fill_heap(fh, 0, fill_size, &state, &keep_ids))
TEST_ERROR
} /* end for */
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert objects to fill remaining heaps in second row */
- if(fill_row(fh, dxpl, 1, fill_size, &state, &keep_ids))
+ if(fill_row(fh, 1, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert objects to fill remaining heaps in third row */
- if(fill_row(fh, dxpl, 2, fill_size, &state, &keep_ids))
+ if(fill_row(fh, 2, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert one more object, to create new 4 * start size direct block */
state.man_alloc_size += DBLOCK_SIZE(fh, 3);
- if(add_obj(fh, dxpl, (size_t)10, (size_t)SMALL_OBJ_SIZE1, &state, &keep_ids))
+ if(add_obj(fh, (size_t)10, (size_t)SMALL_OBJ_SIZE1, &state, &keep_ids))
TEST_ERROR
/* Perform common file & heap close operations */
- if(close_heap(filename, fapl, dxpl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
+ if(close_heap(filename, fapl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
TEST_ERROR
/* Free resources */
@@ -9025,7 +8969,7 @@ error:
H5MM_xfree(keep_ids.lens);
H5MM_xfree(keep_ids.offs);
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -9057,7 +9001,6 @@ 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 = 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 */
@@ -9074,16 +9017,16 @@ test_man_fill_row_skip_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test
TEST_ERROR
/* Perform common file & heap open operations */
- if(open_heap(filename, fapl, dxpl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
+ if(open_heap(filename, fapl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
TEST_ERROR
/* Fill first row of direct blocks */
- if(fill_root_row(fh, dxpl, 0, fill_size, &state, &keep_ids))
+ if(fill_root_row(fh, 0, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert large object, to force creation of indirect block and
@@ -9097,46 +9040,46 @@ test_man_fill_row_skip_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test
state.man_free_space += cparam->managed.width * DBLOCK_FREE(fh, 1);
state.man_free_space += cparam->managed.width * DBLOCK_FREE(fh, 2);
state.man_free_space += cparam->managed.width * DBLOCK_FREE(fh, 3);
- if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert object to fill remainder of 4 * start size block */
obj_size = (size_t)DBLOCK_FREE(fh, 3) - obj_size;
- if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert objects to fill remaining heaps in second row */
- if(fill_row(fh, dxpl, 1, fill_size, &state, &keep_ids))
+ if(fill_row(fh, 1, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert objects to fill remaining heaps in third row */
- if(fill_row(fh, dxpl, 2, fill_size, &state, &keep_ids))
+ if(fill_row(fh, 2, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert one more object, to create new 4 * start size direct block */
state.man_alloc_size += DBLOCK_SIZE(fh, 3);
- if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
/* Perform common file & heap close operations */
- if(close_heap(filename, fapl, dxpl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
+ if(close_heap(filename, fapl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
TEST_ERROR
/* Free resources */
@@ -9155,7 +9098,7 @@ error:
H5MM_xfree(keep_ids.lens);
H5MM_xfree(keep_ids.offs);
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -9184,7 +9127,6 @@ 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 = 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 */
@@ -9203,7 +9145,7 @@ test_man_skip_direct_skip_indirect_two_rows_add_skipped(hid_t fapl, H5HF_create_
TEST_ERROR
/* Perform common file & heap open operations */
- if(open_heap(filename, fapl, dxpl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
+ if(open_heap(filename, fapl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
TEST_ERROR
@@ -9222,7 +9164,7 @@ test_man_skip_direct_skip_indirect_two_rows_add_skipped(hid_t fapl, H5HF_create_
*/
obj_size = (size_t)DBLOCK_SIZE(fh, row - 2) + 1;
state.man_alloc_size += DBLOCK_SIZE(fh, row - 1);
- if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
/* Compute heap size & free space when all direct blocks allocated */
@@ -9239,12 +9181,12 @@ test_man_skip_direct_skip_indirect_two_rows_add_skipped(hid_t fapl, H5HF_create_
obj_size = (size_t)DBLOCK_SIZE(fh, num_direct_rows - 2) + 1;
for(v = 0; v < cparam->managed.width; v++) {
state.man_alloc_size += DBLOCK_SIZE(fh, num_direct_rows - 1);
- if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
} /* end for */
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Compute heap size & free space when root indirect block doubles again */
@@ -9259,12 +9201,12 @@ test_man_skip_direct_skip_indirect_two_rows_add_skipped(hid_t fapl, H5HF_create_
*/
obj_size = (size_t)DBLOCK_SIZE(fh, num_direct_rows - 2) + 1;
state.man_alloc_size += DBLOCK_SIZE(fh, num_direct_rows - 1);
- if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Perform common file & heap close operations */
- if(close_heap(filename, fapl, dxpl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
+ if(close_heap(filename, fapl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
TEST_ERROR
/* Free resources */
@@ -9283,7 +9225,7 @@ error:
H5MM_xfree(keep_ids.lens);
H5MM_xfree(keep_ids.offs);
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -9311,7 +9253,6 @@ 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 = 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 */
@@ -9328,16 +9269,16 @@ test_man_fill_direct_skip_indirect_start_block_add_skipped(hid_t fapl, H5HF_crea
TEST_ERROR
/* Perform common file & heap open operations */
- if(open_heap(filename, fapl, dxpl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
+ if(open_heap(filename, fapl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
TEST_ERROR
/* Fill direct blocks in root indirect block */
- if(fill_root_direct(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_root_direct(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert large object, to force creation of indirect block and
@@ -9345,49 +9286,49 @@ test_man_fill_direct_skip_indirect_start_block_add_skipped(hid_t fapl, H5HF_crea
*/
obj_size = (size_t)DBLOCK_SIZE(fh, 2) + 1;
state.man_alloc_size += DBLOCK_SIZE(fh, 3);
- if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Add rows of blocks to "backfill" direct blocks that were skipped */
- if(fill_row(fh, dxpl, 0, fill_size, &state, &keep_ids))
+ if(fill_row(fh, 0, fill_size, &state, &keep_ids))
TEST_ERROR
- if(fill_row(fh, dxpl, 1, fill_size, &state, &keep_ids))
+ if(fill_row(fh, 1, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert an object to fill up the (biggest) heap block created */
obj_size = (size_t)DBLOCK_FREE(fh, 3) - obj_size;
- if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill direct block heaps with 2 * initial block size in nested indirect block */
- if(fill_row(fh, dxpl, 2, fill_size, &state, &keep_ids))
+ if(fill_row(fh, 2, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert one more object, to create new 4 * start size direct block */
obj_size = SMALL_OBJ_SIZE1;
state.man_alloc_size += DBLOCK_SIZE(fh, 3);
- if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
/* Perform common file & heap close operations */
- if(close_heap(filename, fapl, dxpl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
+ if(close_heap(filename, fapl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
TEST_ERROR
/* Free resources */
@@ -9406,7 +9347,7 @@ error:
H5MM_xfree(keep_ids.lens);
H5MM_xfree(keep_ids.offs);
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -9435,7 +9376,6 @@ 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 = 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 */
@@ -9455,7 +9395,7 @@ test_man_fill_direct_skip_2nd_indirect_start_block_add_skipped(hid_t fapl, H5HF_
TEST_ERROR
/* Perform common file & heap open operations */
- if(open_heap(filename, fapl, dxpl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
+ if(open_heap(filename, fapl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
TEST_ERROR
@@ -9463,11 +9403,11 @@ test_man_fill_direct_skip_2nd_indirect_start_block_add_skipped(hid_t fapl, H5HF_
num_first_indirect_rows = IBLOCK_MAX_DROWS(fh, 1);
/* Fill direct blocks in root indirect block */
- if(fill_root_direct(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_root_direct(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert large object, to force creation of indirect block and
@@ -9476,46 +9416,46 @@ test_man_fill_direct_skip_2nd_indirect_start_block_add_skipped(hid_t fapl, H5HF_
*/
obj_size = (size_t)DBLOCK_SIZE(fh, num_first_indirect_rows - 1) + 1;
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
- if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert object to fill space in (large) block created */
obj_size = (size_t)DBLOCK_FREE(fh, num_first_indirect_rows) - obj_size;
- if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill all rows of direct blocks that are smaller than large object's block size */
for(row = 0; row < num_first_indirect_rows; row++) {
/* Fill rows of direct blocks in skipped indirect blocks */
for(u = 0; u < cparam->managed.width; u++)
- if(fill_row(fh, dxpl, row, fill_size, &state, &keep_ids))
+ if(fill_row(fh, row, fill_size, &state, &keep_ids))
TEST_ERROR
/* Fill row of direct blocks in largest (i.e. non-skipped) indirect block */
- if(fill_row(fh, dxpl, row, fill_size, &state, &keep_ids))
+ if(fill_row(fh, row, fill_size, &state, &keep_ids))
TEST_ERROR
} /* end for */
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Add one more object, to create another "large" block */
obj_size = SMALL_OBJ_SIZE1;
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
- if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
/* Perform common file & heap close operations */
- if(close_heap(filename, fapl, dxpl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
+ if(close_heap(filename, fapl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
TEST_ERROR
/* Free resources */
@@ -9534,7 +9474,7 @@ error:
H5MM_xfree(keep_ids.lens);
H5MM_xfree(keep_ids.offs);
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -9564,7 +9504,6 @@ 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 = 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 */
@@ -9583,7 +9522,7 @@ test_man_fill_2nd_direct_less_one_wrap_start_block_add_skipped(hid_t fapl, H5HF_
TEST_ERROR
/* Perform common file & heap open operations */
- if(open_heap(filename, fapl, dxpl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
+ if(open_heap(filename, fapl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
TEST_ERROR
@@ -9591,21 +9530,21 @@ test_man_fill_2nd_direct_less_one_wrap_start_block_add_skipped(hid_t fapl, H5HF_
num_first_indirect_rows = IBLOCK_MAX_DROWS(fh, 1);
/* Fill direct blocks in root indirect block */
- if(fill_root_direct(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_root_direct(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill first row (except one) of 2nd level indirect blocks */
for(u = 0; u < cparam->managed.width - 1; u++)
/* Fill all rows of 2nd level indirect blocks in root block */
- if(fill_2nd_indirect(fh, dxpl, 1, fill_size, &state, &keep_ids))
+ if(fill_2nd_indirect(fh, 1, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert large object, to force creation of indirect block and
@@ -9617,20 +9556,20 @@ test_man_fill_2nd_direct_less_one_wrap_start_block_add_skipped(hid_t fapl, H5HF_
HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
#endif /* QAK */
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
- if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert object to fill space in (large) block created */
obj_size = (size_t)DBLOCK_FREE(fh, num_first_indirect_rows) - obj_size;
- if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill rows skipped over in 2nd level indirect block's direct blocks
@@ -9638,27 +9577,27 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
*/
for(u = 0; u < num_first_indirect_rows; u++) {
/* Direct block rows in skipped 2nd level indirect block */
- if(fill_row(fh, dxpl, u, fill_size, &state, &keep_ids))
+ if(fill_row(fh, u, fill_size, &state, &keep_ids))
TEST_ERROR
/* Direct block row in current 2nd level indirect block */
- if(fill_row(fh, dxpl, u, fill_size, &state, &keep_ids))
+ if(fill_row(fh, u, fill_size, &state, &keep_ids))
TEST_ERROR
} /* end for */
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Add one more object, to create another "large" block */
obj_size = SMALL_OBJ_SIZE1;
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
- if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
/* Perform common file & heap close operations */
- if(close_heap(filename, fapl, dxpl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
+ if(close_heap(filename, fapl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
TEST_ERROR
/* Free resources */
@@ -9677,7 +9616,7 @@ error:
H5MM_xfree(keep_ids.lens);
H5MM_xfree(keep_ids.offs);
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -9710,7 +9649,6 @@ 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 = 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 */
@@ -9730,7 +9668,7 @@ test_man_fill_direct_skip_2nd_indirect_skip_2nd_block_add_skipped(hid_t fapl, H5
TEST_ERROR
/* Perform common file & heap open operations */
- if(open_heap(filename, fapl, dxpl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
+ if(open_heap(filename, fapl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
TEST_ERROR
@@ -9738,11 +9676,11 @@ test_man_fill_direct_skip_2nd_indirect_skip_2nd_block_add_skipped(hid_t fapl, H5
num_first_indirect_rows = IBLOCK_MAX_DROWS(fh, 1);
/* Fill direct blocks in root indirect block */
- if(fill_root_direct(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_root_direct(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert large object, to force creation of indirect block and
@@ -9754,20 +9692,20 @@ test_man_fill_direct_skip_2nd_indirect_skip_2nd_block_add_skipped(hid_t fapl, H5
HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
#endif /* QAK */
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
- if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert object to fill space in (large) block created */
obj_size = (size_t)DBLOCK_FREE(fh, num_first_indirect_rows) - obj_size;
- if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert object too large for initial block size in skipped indirect blocks */
@@ -9776,11 +9714,11 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
#endif /* QAK */
state.man_alloc_size += DBLOCK_SIZE(fh, 4);
- if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert object to fill space in (medium) block just created */
@@ -9788,52 +9726,52 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
#ifdef QAK
HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
#endif /* QAK */
- if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Finish off blocks in row of medium block size (just to make row filling easier below) */
obj_size = (size_t)DBLOCK_FREE(fh, 4);
for(u = 1; u < cparam->managed.width; u++) {
state.man_alloc_size += DBLOCK_SIZE(fh, 4);
- if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
} /* end for */
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill all rows of direct blocks that are smaller than large object's block size */
for(row = 0; row < num_first_indirect_rows; row++) {
/* Fill rows of direct blocks in skipped indirect blocks */
for(u = 0; u < cparam->managed.width; u++)
- if(fill_row(fh, dxpl, row, fill_size, &state, &keep_ids))
+ if(fill_row(fh, row, fill_size, &state, &keep_ids))
TEST_ERROR
/* Fill row of direct blocks in largest (i.e. non-skipped) indirect block */
/* (Skip the row of blocks filled above) */
if(row != 4)
- if(fill_row(fh, dxpl, row, fill_size, &state, &keep_ids))
+ if(fill_row(fh, row, fill_size, &state, &keep_ids))
TEST_ERROR
} /* end while */
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Add one more object, to create another "large" block */
obj_size = SMALL_OBJ_SIZE1;
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
- if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
/* Perform common file & heap close operations */
- if(close_heap(filename, fapl, dxpl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
+ if(close_heap(filename, fapl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
TEST_ERROR
/* Free resources */
@@ -9852,7 +9790,7 @@ error:
H5MM_xfree(keep_ids.lens);
H5MM_xfree(keep_ids.offs);
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -9880,7 +9818,6 @@ 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 = 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 */
@@ -9900,7 +9837,7 @@ test_man_fill_direct_skip_indirect_two_rows_add_skipped(hid_t fapl, H5HF_create_
TEST_ERROR
/* Perform common file & heap open operations */
- if(open_heap(filename, fapl, dxpl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
+ if(open_heap(filename, fapl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
TEST_ERROR
@@ -9909,11 +9846,11 @@ test_man_fill_direct_skip_indirect_two_rows_add_skipped(hid_t fapl, H5HF_create_
max_dblock_rows = DTABLE_MAX_DROWS(fh);
/* Fill direct blocks in root indirect block */
- if(fill_root_direct(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_root_direct(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert large object, to force creation of indirect block and
@@ -9921,71 +9858,71 @@ test_man_fill_direct_skip_indirect_two_rows_add_skipped(hid_t fapl, H5HF_create_
*/
obj_size = (size_t)DBLOCK_SIZE(fh, max_dblock_rows - 2) + 1;
state.man_alloc_size += DBLOCK_SIZE(fh, max_dblock_rows - 1);
- if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert an object to fill up the (biggest) heap block created */
obj_size = (size_t)DBLOCK_FREE(fh, max_dblock_rows - 1) - obj_size;
- if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill rows skipped over in indirect block's direct blocks */
for(u = 0; u < num_first_indirect_rows; u++) {
/* Direct block rows in first row of skipped 2nd level indirect blocks */
for(v = 0; v < cparam->managed.width; v++)
- if(fill_row(fh, dxpl, u, fill_size, &state, &keep_ids))
+ if(fill_row(fh, u, fill_size, &state, &keep_ids))
TEST_ERROR
/* Direct block rows in second row of skipped 2nd level indirect blocks */
for(v = 0; v < cparam->managed.width; v++)
- if(fill_row(fh, dxpl, u, fill_size, &state, &keep_ids))
+ if(fill_row(fh, u, fill_size, &state, &keep_ids))
TEST_ERROR
/* Direct block row in used 2nd level indirect block */
- if(fill_row(fh, dxpl, u, fill_size, &state, &keep_ids))
+ if(fill_row(fh, u, fill_size, &state, &keep_ids))
TEST_ERROR
} /* end for */
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill rows in second row of skipped 2nd level indirect blocks (and used 2nd level block) */
/* Direct block rows in skipped 2nd level indirect blocks */
for(v = 0; v < cparam->managed.width; v++)
- if(fill_row(fh, dxpl, num_first_indirect_rows, fill_size, &state, &keep_ids))
+ if(fill_row(fh, num_first_indirect_rows, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Direct block row in used 2nd level indirect block */
- if(fill_row(fh, dxpl, num_first_indirect_rows, fill_size, &state, &keep_ids))
+ if(fill_row(fh, num_first_indirect_rows, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Add one more object, to create another "large" block */
obj_size = SMALL_OBJ_SIZE1;
state.man_alloc_size += DBLOCK_SIZE(fh, max_dblock_rows - 1);
- if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
/* Perform common file & heap close operations */
- if(close_heap(filename, fapl, dxpl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
+ if(close_heap(filename, fapl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
TEST_ERROR
/* Free resources */
@@ -10004,7 +9941,7 @@ error:
H5MM_xfree(keep_ids.lens);
H5MM_xfree(keep_ids.offs);
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -10034,7 +9971,6 @@ 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 = 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 */
@@ -10054,7 +9990,7 @@ test_man_fill_direct_skip_indirect_two_rows_skip_indirect_row_add_skipped(hid_t
TEST_ERROR
/* Perform common file & heap open operations */
- if(open_heap(filename, fapl, dxpl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
+ if(open_heap(filename, fapl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
TEST_ERROR
@@ -10063,11 +9999,11 @@ test_man_fill_direct_skip_indirect_two_rows_skip_indirect_row_add_skipped(hid_t
max_dblock_rows = DTABLE_MAX_DROWS(fh);
/* Fill direct blocks in root indirect block */
- if(fill_root_direct(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_root_direct(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert large object, to force creation of two rows of indirect blocks and
@@ -10075,20 +10011,20 @@ test_man_fill_direct_skip_indirect_two_rows_skip_indirect_row_add_skipped(hid_t
*/
obj_size = (size_t)DBLOCK_SIZE(fh, max_dblock_rows - 2) + 1;
state.man_alloc_size += DBLOCK_SIZE(fh, max_dblock_rows - 1);
- if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert an object to fill up the (biggest) heap block created */
obj_size = (size_t)DBLOCK_FREE(fh, max_dblock_rows - 1) - obj_size;
- if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert large object that can't fit in first row of indirect blocks
@@ -10097,76 +10033,76 @@ test_man_fill_direct_skip_indirect_two_rows_skip_indirect_row_add_skipped(hid_t
*/
obj_size = (size_t)DBLOCK_SIZE(fh, max_dblock_rows - 3) + 1;
state.man_alloc_size += DBLOCK_SIZE(fh, max_dblock_rows - 2);
- if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert an object to fill up the (2nd biggest) heap block created */
obj_size = (size_t)DBLOCK_FREE(fh, max_dblock_rows - 2) - obj_size;
- if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill rows skipped over in indirect block's direct blocks */
for(u = 0; u < num_first_indirect_rows; u++) {
/* Direct block rows in first row of skipped 2nd level indirect blocks */
for(v = 0; v < cparam->managed.width; v++)
- if(fill_row(fh, dxpl, u, fill_size, &state, &keep_ids))
+ if(fill_row(fh, u, fill_size, &state, &keep_ids))
TEST_ERROR
/* Direct block rows in second row of skipped 2nd level indirect blocks */
for(v = 0; v < cparam->managed.width; v++)
- if(fill_row(fh, dxpl, u, fill_size, &state, &keep_ids))
+ if(fill_row(fh, u, fill_size, &state, &keep_ids))
TEST_ERROR
/* Direct block row in used 2nd level indirect block */
- if(fill_row(fh, dxpl, u, fill_size, &state, &keep_ids))
+ if(fill_row(fh, u, fill_size, &state, &keep_ids))
TEST_ERROR
} /* end for */
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill rows in second row of skipped 2nd level indirect blocks (and used 2nd level block) */
/* Finish blocks in partially used 2nd level indirect block */
- if(fill_partial_row(fh, dxpl, num_first_indirect_rows, cparam->managed.width - 1, fill_size, &state, &keep_ids))
+ if(fill_partial_row(fh, num_first_indirect_rows, cparam->managed.width - 1, fill_size, &state, &keep_ids))
TEST_ERROR
/* Direct block rows in skipped 2nd level indirect blocks */
/* (less the one indirect block already used) */
for(v = 0; v < cparam->managed.width - 1; v++)
- if(fill_row(fh, dxpl, num_first_indirect_rows, fill_size, &state, &keep_ids))
+ if(fill_row(fh, num_first_indirect_rows, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Direct block row in used 3rd row 2nd level indirect block */
- if(fill_row(fh, dxpl, num_first_indirect_rows, fill_size, &state, &keep_ids))
+ if(fill_row(fh, num_first_indirect_rows, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Add one more object, to create another "large" block */
obj_size = SMALL_OBJ_SIZE1;
state.man_alloc_size += DBLOCK_SIZE(fh, max_dblock_rows - 1);
- if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
/* Perform common file & heap close operations */
- if(close_heap(filename, fapl, dxpl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
+ if(close_heap(filename, fapl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
TEST_ERROR
/* Free resources */
@@ -10185,7 +10121,7 @@ error:
H5MM_xfree(keep_ids.lens);
H5MM_xfree(keep_ids.offs);
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -10214,7 +10150,6 @@ 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 = 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 */
@@ -10231,24 +10166,24 @@ test_man_fill_2nd_direct_skip_start_block_add_skipped(hid_t fapl, H5HF_create_t
TEST_ERROR
/* Perform common file & heap open operations */
- if(open_heap(filename, fapl, dxpl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
+ if(open_heap(filename, fapl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
TEST_ERROR
/* Fill direct blocks in root indirect block */
- if(fill_root_direct(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_root_direct(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill all rows of 2nd level indirect blocks */
- if(fill_all_2nd_indirect_rows(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_all_2nd_indirect_rows(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert large object, to force creation of indirect block and
@@ -10257,43 +10192,43 @@ test_man_fill_2nd_direct_skip_start_block_add_skipped(hid_t fapl, H5HF_create_t
*/
obj_size = (size_t)DBLOCK_SIZE(fh, 2) + 1;
state.man_alloc_size += DBLOCK_SIZE(fh, 3);
- if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert object to fill space in (large) block created */
obj_size = (size_t)DBLOCK_FREE(fh, 3) - obj_size;
- if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill rows skipped over in 3rd level indirect block's direct blocks */
- if(fill_row(fh, dxpl, 0, fill_size, &state, &keep_ids))
+ if(fill_row(fh, 0, fill_size, &state, &keep_ids))
TEST_ERROR
- if(fill_row(fh, dxpl, 1, fill_size, &state, &keep_ids))
+ if(fill_row(fh, 1, fill_size, &state, &keep_ids))
TEST_ERROR
- if(fill_row(fh, dxpl, 2, fill_size, &state, &keep_ids))
+ if(fill_row(fh, 2, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Add one more object, to create another "large" block */
obj_size = SMALL_OBJ_SIZE1;
state.man_alloc_size += DBLOCK_SIZE(fh, 3);
- if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
/* Perform common file & heap close operations */
- if(close_heap(filename, fapl, dxpl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
+ if(close_heap(filename, fapl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
TEST_ERROR
/* Free resources */
@@ -10312,7 +10247,7 @@ error:
H5MM_xfree(keep_ids.lens);
H5MM_xfree(keep_ids.offs);
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -10343,7 +10278,6 @@ 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 = 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 */
@@ -10360,32 +10294,32 @@ test_man_fill_2nd_direct_skip_2nd_indirect_start_block_add_skipped(hid_t fapl, H
TEST_ERROR
/* Perform common file & heap open operations */
- if(open_heap(filename, fapl, dxpl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
+ if(open_heap(filename, fapl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
TEST_ERROR
/* Fill direct blocks in root indirect block */
- if(fill_root_direct(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_root_direct(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill all rows of 2nd level indirect blocks */
- if(fill_all_2nd_indirect_rows(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_all_2nd_indirect_rows(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill all direct block rows in third level indirect block */
- if(fill_all_direct(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_all_direct(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert large object, to force creation of indirect block and
@@ -10394,45 +10328,45 @@ test_man_fill_2nd_direct_skip_2nd_indirect_start_block_add_skipped(hid_t fapl, H
*/
obj_size = (size_t)DBLOCK_SIZE(fh, 2) + 1;
state.man_alloc_size += DBLOCK_SIZE(fh, 3);
- if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert object to fill space in (large) block created */
obj_size = (size_t)DBLOCK_FREE(fh, 3) - obj_size;
- if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill rows skipped over in (3rd level indirect block's) 2nd level
* indirect block's direct blocks
*/
- if(fill_row(fh, dxpl, 0, fill_size, &state, &keep_ids))
+ if(fill_row(fh, 0, fill_size, &state, &keep_ids))
TEST_ERROR
- if(fill_row(fh, dxpl, 1, fill_size, &state, &keep_ids))
+ if(fill_row(fh, 1, fill_size, &state, &keep_ids))
TEST_ERROR
- if(fill_row(fh, dxpl, 2, fill_size, &state, &keep_ids))
+ if(fill_row(fh, 2, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Add one more object, to create another "large" block */
obj_size = SMALL_OBJ_SIZE1;
state.man_alloc_size += DBLOCK_SIZE(fh, 3);
- if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
/* Perform common file & heap close operations */
- if(close_heap(filename, fapl, dxpl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
+ if(close_heap(filename, fapl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
TEST_ERROR
/* Free resources */
@@ -10451,7 +10385,7 @@ error:
H5MM_xfree(keep_ids.lens);
H5MM_xfree(keep_ids.offs);
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -10481,7 +10415,6 @@ 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 = 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 */
@@ -10500,7 +10433,7 @@ test_man_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped(h
TEST_ERROR
/* Perform common file & heap open operations */
- if(open_heap(filename, fapl, dxpl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
+ if(open_heap(filename, fapl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
TEST_ERROR
@@ -10508,27 +10441,27 @@ test_man_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped(h
num_first_indirect_rows = IBLOCK_MAX_DROWS(fh, 1);
/* Fill direct blocks in root indirect block */
- if(fill_root_direct(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_root_direct(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill all rows of 2nd level indirect blocks */
- if(fill_all_2nd_indirect_rows(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_all_2nd_indirect_rows(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill all direct block rows in third level indirect block */
- if(fill_all_direct(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_all_direct(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert large object, to force creation of indirect block and
@@ -10540,20 +10473,20 @@ test_man_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped(h
HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
#endif /* QAK */
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
- if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert object to fill space in (large) block created */
obj_size = (size_t)DBLOCK_FREE(fh, num_first_indirect_rows) - obj_size;
- if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill rows skipped over in (first 3rd level indirect block's) 2nd level
@@ -10563,27 +10496,27 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
for(u = 0; u < num_first_indirect_rows; u++) {
/* Direct block rows in 2nd level indirect blocks */
for(v = 0; v < cparam->managed.width; v++)
- if(fill_row(fh, dxpl, u, fill_size, &state, &keep_ids))
+ if(fill_row(fh, u, fill_size, &state, &keep_ids))
TEST_ERROR
/* Direct block row in 3rd level indirect block */
- if(fill_row(fh, dxpl, u, fill_size, &state, &keep_ids))
+ if(fill_row(fh, u, fill_size, &state, &keep_ids))
TEST_ERROR
} /* end for */
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Add one more object, to create another "large" block */
obj_size = SMALL_OBJ_SIZE1;
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
- if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
/* Perform common file & heap close operations */
- if(close_heap(filename, fapl, dxpl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
+ if(close_heap(filename, fapl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
TEST_ERROR
/* Free resources */
@@ -10602,7 +10535,7 @@ error:
H5MM_xfree(keep_ids.lens);
H5MM_xfree(keep_ids.offs);
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -10633,7 +10566,6 @@ 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 = 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 */
@@ -10652,7 +10584,7 @@ test_man_fill_2nd_direct_fill_direct_skip2_3rd_indirect_start_block_add_skipped(
TEST_ERROR
/* Perform common file & heap open operations */
- if(open_heap(filename, fapl, dxpl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
+ if(open_heap(filename, fapl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
TEST_ERROR
@@ -10663,27 +10595,27 @@ HDfprintf(stderr, "num_first_indirect_rows = %u\n", num_first_indirect_rows);
#endif /* QAK */
/* Fill direct blocks in root indirect block */
- if(fill_root_direct(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_root_direct(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill all rows of 2nd level indirect blocks */
- if(fill_all_2nd_indirect_rows(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_all_2nd_indirect_rows(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill all direct block rows in third level indirect block */
- if(fill_all_direct(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_all_direct(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert large object, to force creation of indirect block and
@@ -10695,11 +10627,11 @@ HDfprintf(stderr, "num_first_indirect_rows = %u\n", num_first_indirect_rows);
HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
#endif /* QAK */
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows + 1);
- if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert object to fill space in (large) block created */
@@ -10707,11 +10639,11 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
#ifdef QAK
HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
#endif /* QAK */
- if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill rows skipped over in (first 3rd level indirect block's) 2nd level
@@ -10721,31 +10653,31 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
for(u = 0; u < num_first_indirect_rows; u++) {
/* Direct block rows in 2nd level indirect blocks */
for(v = 0; v < cparam->managed.width; v++)
- if(fill_row(fh, dxpl, u, fill_size, &state, &keep_ids))
+ if(fill_row(fh, u, fill_size, &state, &keep_ids))
TEST_ERROR
/* Direct block row in 3rd level indirect block */
- if(fill_row(fh, dxpl, u, fill_size, &state, &keep_ids))
+ if(fill_row(fh, u, fill_size, &state, &keep_ids))
TEST_ERROR
} /* end for */
/* Fill row of direct blocks in second 3rd level indirect block */
- if(fill_row(fh, dxpl, num_first_indirect_rows, fill_size, &state, &keep_ids))
+ if(fill_row(fh, num_first_indirect_rows, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Add one more object, to create another "large" block */
obj_size = SMALL_OBJ_SIZE1;
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows + 1);
- if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
/* Perform common file & heap close operations */
- if(close_heap(filename, fapl, dxpl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
+ if(close_heap(filename, fapl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
TEST_ERROR
/* Free resources */
@@ -10764,7 +10696,7 @@ error:
H5MM_xfree(keep_ids.lens);
H5MM_xfree(keep_ids.offs);
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -10796,7 +10728,6 @@ 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 = 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 */
@@ -10815,7 +10746,7 @@ test_man_fill_3rd_direct_less_one_fill_direct_wrap_start_block_add_skipped(hid_t
TEST_ERROR
/* Perform common file & heap open operations */
- if(open_heap(filename, fapl, dxpl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
+ if(open_heap(filename, fapl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
TEST_ERROR
@@ -10823,37 +10754,37 @@ test_man_fill_3rd_direct_less_one_fill_direct_wrap_start_block_add_skipped(hid_t
num_first_indirect_rows = IBLOCK_MAX_DROWS(fh, 1);
/* Fill direct blocks in root indirect block */
- if(fill_root_direct(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_root_direct(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill all rows of 2nd level indirect blocks in root indirect block */
- if(fill_all_2nd_indirect_rows(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_all_2nd_indirect_rows(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill first row (except one) of 3rd level indirect blocks */
for(u = 0; u < cparam->managed.width - 1; u++)
/* Fill 3rd level indirect block */
- if(fill_3rd_indirect(fh, dxpl, 1, fill_size, &state, &keep_ids))
+ if(fill_3rd_indirect(fh, 1, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill all direct block rows in last third level indirect block */
- if(fill_all_direct(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_all_direct(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert large object, to force creation of indirect block and
@@ -10865,20 +10796,20 @@ test_man_fill_3rd_direct_less_one_fill_direct_wrap_start_block_add_skipped(hid_t
HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
#endif /* QAK */
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
- if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert object to fill space in (large) block created */
obj_size = (size_t)DBLOCK_FREE(fh, num_first_indirect_rows) - obj_size;
- if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill rows skipped over in 2nd level indirect block's direct blocks
@@ -10887,27 +10818,27 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
for(u = 0; u < num_first_indirect_rows; u++) {
/* Direct block rows in 2nd level indirect blocks */
for(v = 0; v < cparam->managed.width; v++)
- if(fill_row(fh, dxpl, u, fill_size, &state, &keep_ids))
+ if(fill_row(fh, u, fill_size, &state, &keep_ids))
TEST_ERROR
/* Direct block row in current 3rd level indirect block */
- if(fill_row(fh, dxpl, u, fill_size, &state, &keep_ids))
+ if(fill_row(fh, u, fill_size, &state, &keep_ids))
TEST_ERROR
} /* end for */
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Add one more object, to create another "large" block */
obj_size = SMALL_OBJ_SIZE1;
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
- if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
/* Perform common file & heap close operations */
- if(close_heap(filename, fapl, dxpl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
+ if(close_heap(filename, fapl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
TEST_ERROR
/* Free resources */
@@ -10926,7 +10857,7 @@ error:
H5MM_xfree(keep_ids.lens);
H5MM_xfree(keep_ids.offs);
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -10959,7 +10890,6 @@ 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 = 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 */
@@ -10978,7 +10908,7 @@ test_man_fill_1st_row_3rd_direct_fill_2nd_direct_less_one_wrap_start_block_add_s
TEST_ERROR
/* Perform common file & heap open operations */
- if(open_heap(filename, fapl, dxpl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
+ if(open_heap(filename, fapl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
TEST_ERROR
@@ -10986,44 +10916,44 @@ test_man_fill_1st_row_3rd_direct_fill_2nd_direct_less_one_wrap_start_block_add_s
num_first_indirect_rows = IBLOCK_MAX_DROWS(fh, 1);
/* Fill direct blocks in root indirect block */
- if(fill_root_direct(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_root_direct(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill all rows of 2nd level indirect blocks in 4th level indirect block */
- if(fill_all_2nd_indirect_rows(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_all_2nd_indirect_rows(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill first row of 3rd level indirect blocks */
- if(fill_3rd_indirect_row(fh, dxpl, 1, fill_size, &state, &keep_ids))
+ if(fill_3rd_indirect_row(fh, 1, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill all direct block rows in 2nd row third level indirect block */
- if(fill_all_direct(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_all_direct(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill first row (except one) of 2nd level indirect blocks */
for(u = 0; u < cparam->managed.width - 1; u++)
- if(fill_2nd_indirect(fh, dxpl, 1, fill_size, &state, &keep_ids))
+ if(fill_2nd_indirect(fh, 1, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert large object, to force creation of indirect block and
@@ -11035,20 +10965,20 @@ test_man_fill_1st_row_3rd_direct_fill_2nd_direct_less_one_wrap_start_block_add_s
HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
#endif /* QAK */
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
- if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert object to fill space in (large) block created */
obj_size = (size_t)DBLOCK_FREE(fh, num_first_indirect_rows) - obj_size;
- if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill rows skipped over in 2nd level indirect block's direct blocks
@@ -11056,27 +10986,27 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
*/
for(u = 0; u < num_first_indirect_rows; u++) {
/* Direct block rows in skipped 2nd level indirect block */
- if(fill_row(fh, dxpl, u, fill_size, &state, &keep_ids))
+ if(fill_row(fh, u, fill_size, &state, &keep_ids))
TEST_ERROR
/* Direct block row in current 2nd level indirect block */
- if(fill_row(fh, dxpl, u, fill_size, &state, &keep_ids))
+ if(fill_row(fh, u, fill_size, &state, &keep_ids))
TEST_ERROR
} /* end for */
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Add one more object, to create another "large" block */
obj_size = SMALL_OBJ_SIZE1;
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
- if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
/* Perform common file & heap close operations */
- if(close_heap(filename, fapl, dxpl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
+ if(close_heap(filename, fapl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
TEST_ERROR
/* Free resources */
@@ -11095,7 +11025,7 @@ error:
H5MM_xfree(keep_ids.lens);
H5MM_xfree(keep_ids.offs);
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -11126,7 +11056,6 @@ 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 = 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 */
@@ -11145,7 +11074,7 @@ test_man_fill_3rd_direct_fill_direct_skip_start_block_add_skipped(hid_t fapl, H5
TEST_ERROR
/* Perform common file & heap open operations */
- if(open_heap(filename, fapl, dxpl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
+ if(open_heap(filename, fapl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
TEST_ERROR
@@ -11153,35 +11082,35 @@ test_man_fill_3rd_direct_fill_direct_skip_start_block_add_skipped(hid_t fapl, H5
num_first_indirect_rows = IBLOCK_MAX_DROWS(fh, 1);
/* Fill direct blocks in root indirect block */
- if(fill_root_direct(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_root_direct(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill all rows of 2nd level indirect blocks */
- if(fill_all_2nd_indirect_rows(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_all_2nd_indirect_rows(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill all rows of 3rd level indirect blocks */
- if(fill_all_3rd_indirect_rows(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_all_3rd_indirect_rows(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill all direct block rows in fourth level indirect block */
- if(fill_all_direct(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_all_direct(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert large object, to force creation of indirect block and
@@ -11193,20 +11122,20 @@ test_man_fill_3rd_direct_fill_direct_skip_start_block_add_skipped(hid_t fapl, H5
HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
#endif /* QAK */
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
- if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert object to fill space in (large) block created */
obj_size = (size_t)DBLOCK_FREE(fh, num_first_indirect_rows) - obj_size;
- if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill rows skipped over in (first 4th level indirect block's) 2nd level
@@ -11216,27 +11145,27 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
for(u = 0; u < num_first_indirect_rows; u++) {
/* Direct block rows in 2nd level indirect blocks */
for(v = 0; v < cparam->managed.width; v++)
- if(fill_row(fh, dxpl, u, fill_size, &state, &keep_ids))
+ if(fill_row(fh, u, fill_size, &state, &keep_ids))
TEST_ERROR
/* Direct block row in 2nd level indirect block */
- if(fill_row(fh, dxpl, u, fill_size, &state, &keep_ids))
+ if(fill_row(fh, u, fill_size, &state, &keep_ids))
TEST_ERROR
} /* end for */
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Add one more object, to create another "large" block */
obj_size = SMALL_OBJ_SIZE1;
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
- if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
/* Perform common file & heap close operations */
- if(close_heap(filename, fapl, dxpl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
+ if(close_heap(filename, fapl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
TEST_ERROR
/* Free resources */
@@ -11255,7 +11184,7 @@ error:
H5MM_xfree(keep_ids.lens);
H5MM_xfree(keep_ids.offs);
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -11288,7 +11217,6 @@ 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 = 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 */
@@ -11307,7 +11235,7 @@ test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_blo
TEST_ERROR
/* Perform common file & heap open operations */
- if(open_heap(filename, fapl, dxpl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
+ if(open_heap(filename, fapl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
TEST_ERROR
@@ -11315,51 +11243,51 @@ test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_blo
num_first_indirect_rows = IBLOCK_MAX_DROWS(fh, 1);
/* Fill direct blocks in root indirect block */
- if(fill_root_direct(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_root_direct(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill all rows of 2nd level indirect blocks */
- if(fill_all_2nd_indirect_rows(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_all_2nd_indirect_rows(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill all rows of 3rd level indirect blocks */
- if(fill_all_3rd_indirect_rows(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_all_3rd_indirect_rows(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill all direct block rows in fourth level indirect block */
- if(fill_all_direct(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_all_direct(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill all rows of 2nd level indirect blocks in fourth level indirect block */
- if(fill_all_2nd_indirect_rows(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_all_2nd_indirect_rows(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill all direct block rows in fourth level indirect block's 3rd level indirect block */
- if(fill_all_direct(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_all_direct(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert large object, to force creation of indirect block and
@@ -11371,20 +11299,20 @@ test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_blo
HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
#endif /* QAK */
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
- if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert object to fill space in (large) block created */
obj_size = (size_t)DBLOCK_FREE(fh, num_first_indirect_rows) - obj_size;
- if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill rows skipped over in (first 4th level indirect block's first 3rd
@@ -11394,27 +11322,27 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
for(u = 0; u < num_first_indirect_rows; u++) {
/* Direct block rows in 2nd level indirect blocks */
for(v = 0; v < cparam->managed.width; v++)
- if(fill_row(fh, dxpl, u, fill_size, &state, &keep_ids))
+ if(fill_row(fh, u, fill_size, &state, &keep_ids))
TEST_ERROR
/* Direct block row in 3rd level indirect block */
- if(fill_row(fh, dxpl, u, fill_size, &state, &keep_ids))
+ if(fill_row(fh, u, fill_size, &state, &keep_ids))
TEST_ERROR
} /* end for */
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Add one more object, to create another "large" block */
obj_size = SMALL_OBJ_SIZE1;
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
- if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
/* Perform common file & heap close operations */
- if(close_heap(filename, fapl, dxpl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
+ if(close_heap(filename, fapl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
TEST_ERROR
/* Free resources */
@@ -11433,7 +11361,7 @@ error:
H5MM_xfree(keep_ids.lens);
H5MM_xfree(keep_ids.offs);
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -11468,7 +11396,6 @@ 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 = 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 */
@@ -11487,7 +11414,7 @@ test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_two_rows_
TEST_ERROR
/* Perform common file & heap open operations */
- if(open_heap(filename, fapl, dxpl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
+ if(open_heap(filename, fapl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
TEST_ERROR
@@ -11495,31 +11422,31 @@ test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_two_rows_
num_first_indirect_rows = IBLOCK_MAX_DROWS(fh, 1);
/* Fill direct blocks in root indirect block */
- if(fill_root_direct(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_root_direct(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill all rows of 2nd level indirect blocks */
- if(fill_all_2nd_indirect_rows(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_all_2nd_indirect_rows(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill all rows of 3rd level indirect blocks */
- if(fill_all_3rd_indirect_rows(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_all_3rd_indirect_rows(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill first row of 4th level indirect blocks */
- if(fill_4th_indirect_row(fh, dxpl, 1, fill_size, &state, &keep_ids))
+ if(fill_4th_indirect_row(fh, 1, fill_size, &state, &keep_ids))
TEST_ERROR
/* Account for root indirect block doubling # of rows again */
@@ -11540,39 +11467,39 @@ test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_two_rows_
} /* end if */
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill all direct block rows in 2nd row 4th level indirect block */
- if(fill_all_direct(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_all_direct(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill all rows of 2nd level indirect blocks in 2nd row 4th level indirect block */
- if(fill_all_2nd_indirect_rows(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_all_2nd_indirect_rows(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill first row of 3rd level indirect blocks in 2nd row 4th level indirect block */
- if(fill_3rd_indirect_row(fh, dxpl, 1, fill_size, &state, &keep_ids))
+ if(fill_3rd_indirect_row(fh, 1, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill all direct block rows in 4th level indirect block's 2nd row of 3rd level indirect block */
- if(fill_all_direct(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_all_direct(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert large object, to force creation of indirect block and
@@ -11584,20 +11511,20 @@ test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_two_rows_
HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
#endif /* QAK */
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
- if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert object to fill space in (large) block created */
obj_size = (size_t)DBLOCK_FREE(fh, num_first_indirect_rows) - obj_size;
- if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill rows skipped over in (first block in 2nd row 4th level indirect
@@ -11607,27 +11534,27 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
for(u = 0; u < num_first_indirect_rows; u++) {
/* Direct block rows in 2nd level indirect blocks */
for(v = 0; v < cparam->managed.width; v++)
- if(fill_row(fh, dxpl, u, fill_size, &state, &keep_ids))
+ if(fill_row(fh, u, fill_size, &state, &keep_ids))
TEST_ERROR
/* Direct block row in 3rd level indirect block */
- if(fill_row(fh, dxpl, u, fill_size, &state, &keep_ids))
+ if(fill_row(fh, u, fill_size, &state, &keep_ids))
TEST_ERROR
} /* end for */
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Add one more object, to create another "large" block */
obj_size = SMALL_OBJ_SIZE1;
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
- if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
/* Perform common file & heap close operations */
- if(close_heap(filename, fapl, dxpl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
+ if(close_heap(filename, fapl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
TEST_ERROR
/* Free resources */
@@ -11646,7 +11573,7 @@ error:
H5MM_xfree(keep_ids.lens);
H5MM_xfree(keep_ids.offs);
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -11683,7 +11610,6 @@ 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 = 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 */
@@ -11702,7 +11628,7 @@ test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_star
TEST_ERROR
/* Perform common file & heap open operations */
- if(open_heap(filename, fapl, dxpl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
+ if(open_heap(filename, fapl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
TEST_ERROR
@@ -11710,66 +11636,66 @@ test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_star
num_first_indirect_rows = IBLOCK_MAX_DROWS(fh, 1);
/* Fill direct blocks in root indirect block */
- if(fill_root_direct(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_root_direct(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill all rows of 2nd level indirect blocks */
- if(fill_all_2nd_indirect_rows(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_all_2nd_indirect_rows(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill all rows of 3rd level indirect blocks */
- if(fill_all_3rd_indirect_rows(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_all_3rd_indirect_rows(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill all direct block rows in 4th level indirect block */
- if(fill_all_direct(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_all_direct(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill all rows of 2nd level indirect blocks in 4th level indirect block */
- if(fill_all_2nd_indirect_rows(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_all_2nd_indirect_rows(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill first row (except one) of 3rd level indirect blocks in 4th level indirect block */
for(u = 0; u < cparam->managed.width - 1; u++) {
/* Fill all direct block rows in 3rd level indirect block */
- if(fill_all_direct(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_all_direct(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Fill row of 2nd level indirect blocks in 3rd level indirect block */
- if(fill_2nd_indirect_row(fh, dxpl, 1, fill_size, &state, &keep_ids))
+ if(fill_2nd_indirect_row(fh, 1, fill_size, &state, &keep_ids))
TEST_ERROR
} /* end for */
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill all direct block rows in 4th level indirect block's last 3rd level indirect block */
- if(fill_all_direct(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_all_direct(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert large object, to force creation of indirect block and
@@ -11781,20 +11707,20 @@ test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_star
HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
#endif /* QAK */
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
- if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert object to fill space in (large) block created */
obj_size = (size_t)DBLOCK_FREE(fh, num_first_indirect_rows) - obj_size;
- if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill rows skipped over in (4th level indirect block's first 3rd level
@@ -11804,27 +11730,27 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
for(u = 0; u < num_first_indirect_rows; u++) {
/* Direct block rows in 2nd level indirect blocks */
for(v = 0; v < cparam->managed.width; v++)
- if(fill_row(fh, dxpl, u, fill_size, &state, &keep_ids))
+ if(fill_row(fh, u, fill_size, &state, &keep_ids))
TEST_ERROR
/* Direct block row in 4th level indirect block */
- if(fill_row(fh, dxpl, u, fill_size, &state, &keep_ids))
+ if(fill_row(fh, u, fill_size, &state, &keep_ids))
TEST_ERROR
} /* end for */
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Add one more object, to create another "large" block */
obj_size = SMALL_OBJ_SIZE1;
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
- if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
/* Perform common file & heap close operations */
- if(close_heap(filename, fapl, dxpl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
+ if(close_heap(filename, fapl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
TEST_ERROR
/* Free resources */
@@ -11843,7 +11769,7 @@ error:
H5MM_xfree(keep_ids.lens);
H5MM_xfree(keep_ids.offs);
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -11880,7 +11806,6 @@ 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 = 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 */
@@ -11899,7 +11824,7 @@ test_man_fill_4th_direct_less_one_fill_2nd_direct_fill_direct_skip_3rd_indirect_
TEST_ERROR
/* Perform common file & heap open operations */
- if(open_heap(filename, fapl, dxpl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
+ if(open_heap(filename, fapl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
TEST_ERROR
@@ -11907,81 +11832,81 @@ test_man_fill_4th_direct_less_one_fill_2nd_direct_fill_direct_skip_3rd_indirect_
num_first_indirect_rows = IBLOCK_MAX_DROWS(fh, 1);
/* Fill direct blocks in root indirect block */
- if(fill_root_direct(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_root_direct(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill all rows of 2nd level indirect blocks */
- if(fill_all_2nd_indirect_rows(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_all_2nd_indirect_rows(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill all rows of 3rd level indirect blocks */
- if(fill_all_3rd_indirect_rows(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_all_3rd_indirect_rows(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill first row (except one) of 4th level indirect blocks */
for(u = 0; u < cparam->managed.width - 1; u++) {
/* Fill all direct block rows in 4th level indirect block */
- if(fill_all_direct(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_all_direct(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Fill all rows of 2nd level indirect blocks in 4th level indirect block */
- if(fill_all_2nd_indirect_rows(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_all_2nd_indirect_rows(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Fill row of 3rd level indirect blocks in 4th level indirect block */
- if(fill_3rd_indirect_row(fh, dxpl, 1, fill_size, &state, &keep_ids))
+ if(fill_3rd_indirect_row(fh, 1, fill_size, &state, &keep_ids))
TEST_ERROR
} /* end for */
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill all direct block rows in 4th level indirect block */
- if(fill_all_direct(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_all_direct(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill all rows of 2nd level indirect blocks in 4th level indirect block */
- if(fill_all_2nd_indirect_rows(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_all_2nd_indirect_rows(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill row (except one) of 3rd level indirect blocks in 4th level indirect block */
for(u = 0; u < cparam->managed.width - 1; u++) {
/* Fill all direct block rows in 3rd level indirect block */
- if(fill_all_direct(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_all_direct(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Fill row of 2nd level indirect blocks in 3rd level indirect block */
- if(fill_2nd_indirect_row(fh, dxpl, 1, fill_size, &state, &keep_ids))
+ if(fill_2nd_indirect_row(fh, 1, fill_size, &state, &keep_ids))
TEST_ERROR
} /* end for */
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill all direct block rows in 4th level indirect block's last 3rd level indirect block */
- if(fill_all_direct(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_all_direct(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Account for root indirect block doubling # of rows again */
@@ -12002,7 +11927,7 @@ test_man_fill_4th_direct_less_one_fill_2nd_direct_fill_direct_skip_3rd_indirect_
} /* end if */
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert large object, to force creation of indirect block and
@@ -12014,20 +11939,20 @@ test_man_fill_4th_direct_less_one_fill_2nd_direct_fill_direct_skip_3rd_indirect_
HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
#endif /* QAK */
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
- if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert object to fill space in (large) block created */
obj_size = (size_t)DBLOCK_FREE(fh, num_first_indirect_rows) - obj_size;
- if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill rows skipped over in (4th level indirect block's first 3rd level
@@ -12037,27 +11962,27 @@ HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
for(u = 0; u < num_first_indirect_rows; u++) {
/* Direct block rows in 2nd level indirect blocks */
for(v = 0; v < cparam->managed.width; v++)
- if(fill_row(fh, dxpl, u, fill_size, &state, &keep_ids))
+ if(fill_row(fh, u, fill_size, &state, &keep_ids))
TEST_ERROR
/* Direct block row in 4th level indirect block */
- if(fill_row(fh, dxpl, u, fill_size, &state, &keep_ids))
+ if(fill_row(fh, u, fill_size, &state, &keep_ids))
TEST_ERROR
} /* end for */
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Add one more object, to create another "large" block */
obj_size = SMALL_OBJ_SIZE1;
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
- if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
/* Perform common file & heap close operations */
- if(close_heap(filename, fapl, dxpl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
+ if(close_heap(filename, fapl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
TEST_ERROR
/* Free resources */
@@ -12076,7 +12001,7 @@ error:
H5MM_xfree(keep_ids.lens);
H5MM_xfree(keep_ids.offs);
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -12108,7 +12033,6 @@ 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 = 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 */
@@ -12125,7 +12049,7 @@ test_man_frag_simple(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
TEST_ERROR
/* Perform common file & heap open operations */
- if(open_heap(filename, fapl, dxpl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
+ if(open_heap(filename, fapl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
TEST_ERROR
@@ -12138,7 +12062,7 @@ test_man_frag_simple(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
state.man_free_space = DBLOCK_FREE(fh, 0);
for(u = 0; u < cparam->managed.width; u++) {
state.man_alloc_size += DBLOCK_SIZE(fh, 0);
- if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
if(u == 0) {
state.man_size = cparam->managed.width * DBLOCK_SIZE(fh, 0);
@@ -12149,12 +12073,12 @@ test_man_frag_simple(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
state.man_free_space += DBLOCK_FREE(fh, 1) * cparam->managed.width;
for(u = 0; u < cparam->managed.width; u++) {
state.man_alloc_size += DBLOCK_SIZE(fh, 1);
- if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
} /* end for */
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* (Account for doubling root indirect block for rows 3-4 */
@@ -12165,34 +12089,34 @@ test_man_frag_simple(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
/* Add one more object, to create a 2 * start_block_size block */
state.man_alloc_size += DBLOCK_SIZE(fh, 2);
- if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Go back and fill in direct blocks of initial block size (which have large free space in them) */
obj_size = (size_t)DBLOCK_FREE(fh, 0) - obj_size;
for(u = 0; u < cparam->managed.width; u++)
- if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
for(u = 0; u < cparam->managed.width; u++)
- if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill in 2 * start_block_size block */
obj_size = (size_t)DBLOCK_FREE(fh, 2) - ((size_t)DBLOCK_SIZE(fh, 0) / 2);
- if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
/* Perform common file & heap close operations */
- if(close_heap(filename, fapl, dxpl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
+ if(close_heap(filename, fapl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
TEST_ERROR
/* Free resources */
@@ -12211,7 +12135,7 @@ error:
H5MM_xfree(keep_ids.lens);
H5MM_xfree(keep_ids.offs);
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -12240,7 +12164,6 @@ 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 = 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 */
@@ -12258,7 +12181,7 @@ test_man_frag_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
TEST_ERROR
/* Perform common file & heap open operations */
- if(open_heap(filename, fapl, dxpl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
+ if(open_heap(filename, fapl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
TEST_ERROR
@@ -12274,7 +12197,7 @@ test_man_frag_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
/* First row */
for(u = 0; u < cparam->managed.width; u++) {
state.man_alloc_size += DBLOCK_SIZE(fh, 0);
- if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
if(u == 0) {
state.man_size = cparam->managed.width * DBLOCK_SIZE(fh, 0);
@@ -12286,12 +12209,12 @@ test_man_frag_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
/* Second row */
for(u = 0; u < cparam->managed.width; u++) {
state.man_alloc_size += DBLOCK_SIZE(fh, 1);
- if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
} /* end for */
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* (Account for doubling root indirect block for rows 3-4 */
@@ -12305,13 +12228,13 @@ test_man_frag_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
obj_size = (size_t)DBLOCK_SIZE(fh, u + 2) / 2;
for(v = 0; v < cparam->managed.width; v++) {
state.man_alloc_size += DBLOCK_SIZE(fh, u + 2);
- if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
} /* end for */
} /* end for */
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* (Account for doubling root indirect block for rows 5-8 */
@@ -12325,13 +12248,13 @@ test_man_frag_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
obj_size = (size_t)DBLOCK_SIZE(fh, u + 4) / 2;
for(v = 0; v < cparam->managed.width; v++) {
state.man_alloc_size += DBLOCK_SIZE(fh, u + 4);
- if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
} /* end for */
} /* end for */
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* (Account for doubling root indirect block for rows 9-16 */
@@ -12344,25 +12267,25 @@ test_man_frag_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
obj_size = (size_t)DBLOCK_SIZE(fh, 8) / 2;
for(v = 0; v < cparam->managed.width; v++) {
state.man_alloc_size += DBLOCK_SIZE(fh, 8);
- if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
} /* end for */
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Go back and backfill all root block's direct blocks */
for(u = 0; u < root_direct_rows; u++) {
obj_size = (size_t)DBLOCK_FREE(fh, u) - ((size_t)DBLOCK_SIZE(fh, u) / 2);
for(v = 0; v < cparam->managed.width; v++)
- if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
} /* end for */
/* Perform common file & heap close operations */
- if(close_heap(filename, fapl, dxpl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
+ if(close_heap(filename, fapl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
TEST_ERROR
/* Free resources */
@@ -12381,7 +12304,7 @@ error:
H5MM_xfree(keep_ids.lens);
H5MM_xfree(keep_ids.offs);
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -12412,7 +12335,6 @@ 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 = 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 */
@@ -12431,7 +12353,7 @@ test_man_frag_2nd_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *
TEST_ERROR
/* Perform common file & heap open operations */
- if(open_heap(filename, fapl, dxpl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
+ if(open_heap(filename, fapl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
TEST_ERROR
@@ -12442,11 +12364,11 @@ HDfprintf(stderr, "num_first_indirect_rows = %u\n", num_first_indirect_rows);
#endif /* QAK */
/* Fill direct blocks in root indirect block */
- if(fill_root_direct(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_root_direct(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert objects small enough to fit into each direct block, but not to
@@ -12456,26 +12378,26 @@ HDfprintf(stderr, "num_first_indirect_rows = %u\n", num_first_indirect_rows);
obj_size = (size_t)DBLOCK_SIZE(fh, u) / 2;
for(v = 0; v < cparam->managed.width; v++) {
state.man_alloc_size += DBLOCK_SIZE(fh, u);
- if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
} /* end for */
} /* end for */
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Go back and backfill all 2nd level indirect block's direct blocks */
for(u = 0; u < num_first_indirect_rows; u++) {
obj_size = (size_t)DBLOCK_FREE(fh, u) - ((size_t)DBLOCK_SIZE(fh, u) / 2);
for(v = 0; v < cparam->managed.width; v++)
- if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
} /* end for */
/* Perform common file & heap close operations */
- if(close_heap(filename, fapl, dxpl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
+ if(close_heap(filename, fapl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
TEST_ERROR
/* Free resources */
@@ -12494,7 +12416,7 @@ error:
H5MM_xfree(keep_ids.lens);
H5MM_xfree(keep_ids.offs);
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -12526,7 +12448,6 @@ 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 = 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 */
@@ -12545,7 +12466,7 @@ test_man_frag_3rd_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *
TEST_ERROR
/* Perform common file & heap open operations */
- if(open_heap(filename, fapl, dxpl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
+ if(open_heap(filename, fapl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
TEST_ERROR
@@ -12553,19 +12474,19 @@ test_man_frag_3rd_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *
root_direct_rows = DTABLE_MAX_DROWS(fh);
/* Fill direct blocks in root indirect block */
- if(fill_root_direct(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_root_direct(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Fill all rows of 2nd level indirect blocks in root indirect block */
- if(fill_all_2nd_indirect_rows(fh, dxpl, fill_size, &state, &keep_ids))
+ if(fill_all_2nd_indirect_rows(fh, fill_size, &state, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert objects small enough to fit into each direct block, but not to
@@ -12575,26 +12496,26 @@ test_man_frag_3rd_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *
obj_size = (size_t)DBLOCK_SIZE(fh, u) / 2;
for(v = 0; v < cparam->managed.width; v++) {
state.man_alloc_size += DBLOCK_SIZE(fh, u);
- if(add_obj(fh, dxpl, (size_t)10, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
} /* end for */
} /* end for */
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Go back and backfill all 3rd level indirect block's direct blocks */
for(u = 0; u < root_direct_rows; u++) {
obj_size = (size_t)DBLOCK_FREE(fh, u) - ((size_t)DBLOCK_SIZE(fh, u) / 2);
for(v = 0; v < cparam->managed.width; v++)
- if(add_obj(fh, dxpl, (size_t)20, obj_size, &state, &keep_ids))
+ if(add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
} /* end for */
/* Perform common file & heap close operations */
- if(close_heap(filename, fapl, dxpl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
+ if(close_heap(filename, fapl, tparam, file, f, &fh, fh_addr, &state, &keep_ids, empty_size) < 0)
TEST_ERROR
/* Free resources */
@@ -12613,7 +12534,7 @@ error:
H5MM_xfree(keep_ids.lens);
H5MM_xfree(keep_ids.offs);
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -12641,7 +12562,6 @@ 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 = 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 */
@@ -12662,7 +12582,7 @@ test_huge_insert_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
TEST_ERROR
/* Perform common file & heap open operations */
- if(open_heap(filename, fapl, dxpl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
+ if(open_heap(filename, fapl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
TEST_ERROR
/* Allocate heap ID(s) */
@@ -12677,7 +12597,7 @@ test_huge_insert_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
/* Insert object too large for managed heap blocks */
obj_size = SMALL_STAND_SIZE + 1;
- if(H5HF_insert(fh, dxpl, obj_size, shared_wobj_g, heap_id) < 0)
+ if(H5HF_insert(fh, obj_size, shared_wobj_g, heap_id) < 0)
FAIL_STACK_ERROR
if(H5HF_get_id_type_test(heap_id, &obj_type) < 0)
FAIL_STACK_ERROR
@@ -12685,7 +12605,7 @@ test_huge_insert_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -12695,12 +12615,12 @@ test_huge_insert_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
TEST_ERROR
/* Read in huge object */
- if(H5HF_get_obj_len(fh, dxpl, heap_id, &robj_size) < 0)
+ if(H5HF_get_obj_len(fh, heap_id, &robj_size) < 0)
FAIL_STACK_ERROR
if(obj_size != robj_size)
TEST_ERROR
HDmemset(shared_robj_g, 0, obj_size);
- if(H5HF_read(fh, dxpl, heap_id, shared_robj_g) < 0)
+ if(H5HF_read(fh, heap_id, shared_robj_g) < 0)
FAIL_STACK_ERROR
if(HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
TEST_ERROR
@@ -12708,11 +12628,11 @@ test_huge_insert_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
/* Delete individual objects, if we won't be deleting the entire heap later */
if(tparam->del_dir != FHEAP_DEL_HEAP) {
/* Remove object from heap */
- if(H5HF_remove(fh, dxpl, heap_id) < 0)
+ if(H5HF_remove(fh, heap_id) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -12724,14 +12644,14 @@ test_huge_insert_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
FAIL_STACK_ERROR
fh = NULL;
/* Check for deleting the entire heap */
if(tparam->del_dir == FHEAP_DEL_HEAP) {
/* Delete heap */
- if(H5HF_delete(f, dxpl, fh_addr) < 0)
+ if(H5HF_delete(f, fh_addr) < 0)
FAIL_STACK_ERROR
} /* end if */
@@ -12768,7 +12688,7 @@ error:
H5MM_xfree(keep_ids.lens);
H5MM_xfree(keep_ids.offs);
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -12794,7 +12714,6 @@ 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 = 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 */
@@ -12816,7 +12735,7 @@ test_huge_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
TEST_ERROR
/* Perform common file & heap open operations */
- if(open_heap(filename, fapl, dxpl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
+ if(open_heap(filename, fapl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
TEST_ERROR
/* Allocate heap ID(s) */
@@ -12833,7 +12752,7 @@ test_huge_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
/* Insert object too large for managed heap blocks */
obj_size = SMALL_STAND_SIZE + 1;
- if(H5HF_insert(fh, dxpl, obj_size, shared_wobj_g, heap_id) < 0)
+ if(H5HF_insert(fh, obj_size, shared_wobj_g, heap_id) < 0)
FAIL_STACK_ERROR
if(H5HF_get_id_type_test(heap_id, &obj_type) < 0)
FAIL_STACK_ERROR
@@ -12841,7 +12760,7 @@ test_huge_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -12851,19 +12770,19 @@ test_huge_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
TEST_ERROR
/* Read in huge object */
- if(H5HF_get_obj_len(fh, dxpl, heap_id, &robj_size) < 0)
+ if(H5HF_get_obj_len(fh, heap_id, &robj_size) < 0)
FAIL_STACK_ERROR
if(obj_size != robj_size)
TEST_ERROR
HDmemset(shared_robj_g, 0, obj_size);
- if(H5HF_read(fh, dxpl, heap_id, shared_robj_g) < 0)
+ if(H5HF_read(fh, heap_id, shared_robj_g) < 0)
FAIL_STACK_ERROR
if(HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
TEST_ERROR
/* Insert second object too large for managed heap blocks */
obj_size = SMALL_STAND_SIZE + 1;
- if(H5HF_insert(fh, dxpl, obj_size, shared_wobj_g, heap_id2) < 0)
+ if(H5HF_insert(fh, obj_size, shared_wobj_g, heap_id2) < 0)
FAIL_STACK_ERROR
if(H5HF_get_id_type_test(heap_id2, &obj_type) < 0)
FAIL_STACK_ERROR
@@ -12871,7 +12790,7 @@ test_huge_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -12881,12 +12800,12 @@ test_huge_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
TEST_ERROR
/* Read in second huge object */
- if(H5HF_get_obj_len(fh, dxpl, heap_id2, &robj_size) < 0)
+ if(H5HF_get_obj_len(fh, heap_id2, &robj_size) < 0)
FAIL_STACK_ERROR
if(obj_size != robj_size)
TEST_ERROR
HDmemset(shared_robj_g, 0, obj_size);
- if(H5HF_read(fh, dxpl, heap_id2, shared_robj_g) < 0)
+ if(H5HF_read(fh, heap_id2, shared_robj_g) < 0)
FAIL_STACK_ERROR
if(HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
TEST_ERROR
@@ -12895,11 +12814,11 @@ test_huge_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
if(tparam->del_dir != FHEAP_DEL_HEAP) {
if(tparam->del_dir == FHEAP_DEL_FORWARD) {
/* Remove first object from heap */
- if(H5HF_remove(fh, dxpl, heap_id) < 0)
+ if(H5HF_remove(fh, heap_id) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -12909,11 +12828,11 @@ test_huge_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
TEST_ERROR
/* Remove second object from heap */
- if(H5HF_remove(fh, dxpl, heap_id2) < 0)
+ if(H5HF_remove(fh, heap_id2) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -12924,11 +12843,11 @@ test_huge_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
} /* end if */
else {
/* Remove second object from heap */
- if(H5HF_remove(fh, dxpl, heap_id2) < 0)
+ if(H5HF_remove(fh, heap_id2) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -12938,11 +12857,11 @@ test_huge_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
TEST_ERROR
/* Remove first object from heap */
- if(H5HF_remove(fh, dxpl, heap_id) < 0)
+ if(H5HF_remove(fh, heap_id) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -12955,14 +12874,14 @@ test_huge_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
FAIL_STACK_ERROR
fh = NULL;
/* Check for deleting the entire heap */
if(tparam->del_dir == FHEAP_DEL_HEAP) {
/* Delete heap */
- if(H5HF_delete(f, dxpl, fh_addr) < 0)
+ if(H5HF_delete(f, fh_addr) < 0)
FAIL_STACK_ERROR
} /* end if */
@@ -13001,7 +12920,7 @@ error:
H5MM_xfree(keep_ids.lens);
H5MM_xfree(keep_ids.offs);
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -13027,7 +12946,6 @@ 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 = 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 */
@@ -13050,7 +12968,7 @@ test_huge_insert_three(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tp
TEST_ERROR
/* Perform common file & heap open operations */
- if(open_heap(filename, fapl, dxpl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
+ if(open_heap(filename, fapl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
TEST_ERROR
/* Allocate heap ID(s) */
@@ -13069,7 +12987,7 @@ test_huge_insert_three(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tp
/* Insert first object too large for managed heap blocks */
obj_size = SMALL_STAND_SIZE + 1;
- if(H5HF_insert(fh, dxpl, obj_size, shared_wobj_g, heap_id) < 0)
+ if(H5HF_insert(fh, obj_size, shared_wobj_g, heap_id) < 0)
FAIL_STACK_ERROR
if(H5HF_get_id_type_test(heap_id, &obj_type) < 0)
FAIL_STACK_ERROR
@@ -13077,7 +12995,7 @@ test_huge_insert_three(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tp
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -13087,19 +13005,19 @@ test_huge_insert_three(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tp
TEST_ERROR
/* Read in first huge object */
- if(H5HF_get_obj_len(fh, dxpl, heap_id, &robj_size) < 0)
+ if(H5HF_get_obj_len(fh, heap_id, &robj_size) < 0)
FAIL_STACK_ERROR
if(obj_size != robj_size)
TEST_ERROR
HDmemset(shared_robj_g, 0, obj_size);
- if(H5HF_read(fh, dxpl, heap_id, shared_robj_g) < 0)
+ if(H5HF_read(fh, heap_id, shared_robj_g) < 0)
FAIL_STACK_ERROR
if(HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
TEST_ERROR
/* Insert second object too large for managed heap blocks */
obj_size = SMALL_STAND_SIZE + 2;
- if(H5HF_insert(fh, dxpl, obj_size, shared_wobj_g, heap_id2) < 0)
+ if(H5HF_insert(fh, obj_size, shared_wobj_g, heap_id2) < 0)
FAIL_STACK_ERROR
if(H5HF_get_id_type_test(heap_id2, &obj_type) < 0)
FAIL_STACK_ERROR
@@ -13107,7 +13025,7 @@ test_huge_insert_three(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tp
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -13117,19 +13035,19 @@ test_huge_insert_three(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tp
TEST_ERROR
/* Read in second huge object */
- if(H5HF_get_obj_len(fh, dxpl, heap_id2, &robj_size) < 0)
+ if(H5HF_get_obj_len(fh, heap_id2, &robj_size) < 0)
FAIL_STACK_ERROR
if(obj_size != robj_size)
TEST_ERROR
HDmemset(shared_robj_g, 0, obj_size);
- if(H5HF_read(fh, dxpl, heap_id2, shared_robj_g) < 0)
+ if(H5HF_read(fh, heap_id2, shared_robj_g) < 0)
FAIL_STACK_ERROR
if(HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
TEST_ERROR
/* Insert third object too large for managed heap blocks */
obj_size = SMALL_STAND_SIZE + 3;
- if(H5HF_insert(fh, dxpl, obj_size, shared_wobj_g, heap_id3) < 0)
+ if(H5HF_insert(fh, obj_size, shared_wobj_g, heap_id3) < 0)
FAIL_STACK_ERROR
if(H5HF_get_id_type_test(heap_id3, &obj_type) < 0)
FAIL_STACK_ERROR
@@ -13137,7 +13055,7 @@ test_huge_insert_three(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tp
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -13147,12 +13065,12 @@ test_huge_insert_three(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tp
TEST_ERROR
/* Read in third huge object */
- if(H5HF_get_obj_len(fh, dxpl, heap_id3, &robj_size) < 0)
+ if(H5HF_get_obj_len(fh, heap_id3, &robj_size) < 0)
FAIL_STACK_ERROR
if(obj_size != robj_size)
TEST_ERROR
HDmemset(shared_robj_g, 0, obj_size);
- if(H5HF_read(fh, dxpl, heap_id3, shared_robj_g) < 0)
+ if(H5HF_read(fh, heap_id3, shared_robj_g) < 0)
FAIL_STACK_ERROR
if(HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
TEST_ERROR
@@ -13161,13 +13079,13 @@ test_huge_insert_three(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tp
if(tparam->del_dir != FHEAP_DEL_HEAP) {
if(tparam->del_dir == FHEAP_DEL_FORWARD) {
/* Remove first object from heap */
- if(H5HF_get_obj_len(fh, dxpl, heap_id, &robj_size) < 0)
+ if(H5HF_get_obj_len(fh, heap_id, &robj_size) < 0)
FAIL_STACK_ERROR
- if(H5HF_remove(fh, dxpl, heap_id) < 0)
+ if(H5HF_remove(fh, heap_id) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -13177,13 +13095,13 @@ test_huge_insert_three(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tp
TEST_ERROR
/* Remove second object from heap */
- if(H5HF_get_obj_len(fh, dxpl, heap_id2, &robj_size) < 0)
+ if(H5HF_get_obj_len(fh, heap_id2, &robj_size) < 0)
FAIL_STACK_ERROR
- if(H5HF_remove(fh, dxpl, heap_id2) < 0)
+ if(H5HF_remove(fh, heap_id2) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -13193,13 +13111,13 @@ test_huge_insert_three(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tp
TEST_ERROR
/* Remove third object from heap */
- if(H5HF_get_obj_len(fh, dxpl, heap_id3, &robj_size) < 0)
+ if(H5HF_get_obj_len(fh, heap_id3, &robj_size) < 0)
FAIL_STACK_ERROR
- if(H5HF_remove(fh, dxpl, heap_id3) < 0)
+ if(H5HF_remove(fh, heap_id3) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -13210,13 +13128,13 @@ test_huge_insert_three(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tp
} /* end if */
else {
/* Remove third object from heap */
- if(H5HF_get_obj_len(fh, dxpl, heap_id3, &robj_size) < 0)
+ if(H5HF_get_obj_len(fh, heap_id3, &robj_size) < 0)
FAIL_STACK_ERROR
- if(H5HF_remove(fh, dxpl, heap_id3) < 0)
+ if(H5HF_remove(fh, heap_id3) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -13226,13 +13144,13 @@ test_huge_insert_three(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tp
TEST_ERROR
/* Remove second object from heap */
- if(H5HF_get_obj_len(fh, dxpl, heap_id2, &robj_size) < 0)
+ if(H5HF_get_obj_len(fh, heap_id2, &robj_size) < 0)
FAIL_STACK_ERROR
- if(H5HF_remove(fh, dxpl, heap_id2) < 0)
+ if(H5HF_remove(fh, heap_id2) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -13242,13 +13160,13 @@ test_huge_insert_three(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tp
TEST_ERROR
/* Remove first object from heap */
- if(H5HF_get_obj_len(fh, dxpl, heap_id, &robj_size) < 0)
+ if(H5HF_get_obj_len(fh, heap_id, &robj_size) < 0)
FAIL_STACK_ERROR
- if(H5HF_remove(fh, dxpl, heap_id) < 0)
+ if(H5HF_remove(fh, heap_id) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -13261,14 +13179,14 @@ test_huge_insert_three(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tp
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
FAIL_STACK_ERROR
fh = NULL;
/* Check for deleting the entire heap */
if(tparam->del_dir == FHEAP_DEL_HEAP) {
/* Delete heap */
- if(H5HF_delete(f, dxpl, fh_addr) < 0)
+ if(H5HF_delete(f, fh_addr) < 0)
FAIL_STACK_ERROR
} /* end if */
@@ -13309,7 +13227,7 @@ error:
H5MM_xfree(keep_ids.lens);
H5MM_xfree(keep_ids.offs);
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -13335,7 +13253,6 @@ 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 = 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 */
@@ -13360,7 +13277,7 @@ test_huge_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
TEST_ERROR
/* Perform common file & heap open operations */
- if(open_heap(filename, fapl, dxpl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
+ if(open_heap(filename, fapl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
TEST_ERROR
/* Allocate heap ID(s) */
@@ -13383,7 +13300,7 @@ test_huge_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
/* Insert first object too large for managed heap blocks */
obj_size = SMALL_STAND_SIZE + 1;
- if(H5HF_insert(fh, dxpl, obj_size, shared_wobj_g, heap_id) < 0)
+ if(H5HF_insert(fh, obj_size, shared_wobj_g, heap_id) < 0)
FAIL_STACK_ERROR
if(H5HF_get_id_type_test(heap_id, &obj_type) < 0)
FAIL_STACK_ERROR
@@ -13391,7 +13308,7 @@ test_huge_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -13401,19 +13318,19 @@ test_huge_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
TEST_ERROR
/* Read in first huge object */
- if(H5HF_get_obj_len(fh, dxpl, heap_id, &robj_size) < 0)
+ if(H5HF_get_obj_len(fh, heap_id, &robj_size) < 0)
FAIL_STACK_ERROR
if(obj_size != robj_size)
TEST_ERROR
HDmemset(shared_robj_g, 0, obj_size);
- if(H5HF_read(fh, dxpl, heap_id, shared_robj_g) < 0)
+ if(H5HF_read(fh, heap_id, shared_robj_g) < 0)
FAIL_STACK_ERROR
if(HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
TEST_ERROR
/* Insert second object too large for managed heap blocks */
obj_size = SMALL_STAND_SIZE + 2;
- if(H5HF_insert(fh, dxpl, obj_size, shared_wobj_g, heap_id2) < 0)
+ if(H5HF_insert(fh, obj_size, shared_wobj_g, heap_id2) < 0)
FAIL_STACK_ERROR
if(H5HF_get_id_type_test(heap_id2, &obj_type) < 0)
FAIL_STACK_ERROR
@@ -13421,7 +13338,7 @@ test_huge_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -13431,19 +13348,19 @@ test_huge_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
TEST_ERROR
/* Read in second huge object */
- if(H5HF_get_obj_len(fh, dxpl, heap_id2, &robj_size) < 0)
+ if(H5HF_get_obj_len(fh, heap_id2, &robj_size) < 0)
FAIL_STACK_ERROR
if(obj_size != robj_size)
TEST_ERROR
HDmemset(shared_robj_g, 0, obj_size);
- if(H5HF_read(fh, dxpl, heap_id2, shared_robj_g) < 0)
+ if(H5HF_read(fh, heap_id2, shared_robj_g) < 0)
FAIL_STACK_ERROR
if(HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
TEST_ERROR
/* Insert third object too large for managed heap blocks */
obj_size = SMALL_STAND_SIZE + 3;
- if(H5HF_insert(fh, dxpl, obj_size, shared_wobj_g, heap_id3) < 0)
+ if(H5HF_insert(fh, obj_size, shared_wobj_g, heap_id3) < 0)
FAIL_STACK_ERROR
if(H5HF_get_id_type_test(heap_id3, &obj_type) < 0)
FAIL_STACK_ERROR
@@ -13451,7 +13368,7 @@ test_huge_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -13461,19 +13378,19 @@ test_huge_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
TEST_ERROR
/* Read in third huge object */
- if(H5HF_get_obj_len(fh, dxpl, heap_id3, &robj_size) < 0)
+ if(H5HF_get_obj_len(fh, heap_id3, &robj_size) < 0)
FAIL_STACK_ERROR
if(obj_size != robj_size)
TEST_ERROR
HDmemset(shared_robj_g, 0, obj_size);
- if(H5HF_read(fh, dxpl, heap_id3, shared_robj_g) < 0)
+ if(H5HF_read(fh, heap_id3, shared_robj_g) < 0)
FAIL_STACK_ERROR
if(HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
TEST_ERROR
/* Insert fourth object small enough to fit into 'normal' heap blocks */
obj_size = (size_t)DBLOCK_SIZE(fh, 0) + 1;
- if(H5HF_insert(fh, dxpl, obj_size, shared_wobj_g, heap_id4) < 0)
+ if(H5HF_insert(fh, obj_size, shared_wobj_g, heap_id4) < 0)
FAIL_STACK_ERROR
if(H5HF_get_id_type_test(heap_id4, &obj_type) < 0)
FAIL_STACK_ERROR
@@ -13481,7 +13398,7 @@ test_huge_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -13498,19 +13415,19 @@ test_huge_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
TEST_ERROR
/* Read in fourth ('normal') object */
- if(H5HF_get_obj_len(fh, dxpl, heap_id4, &robj_size) < 0)
+ if(H5HF_get_obj_len(fh, heap_id4, &robj_size) < 0)
FAIL_STACK_ERROR
if(obj_size != robj_size)
TEST_ERROR
HDmemset(shared_robj_g, 0, obj_size);
- if(H5HF_read(fh, dxpl, heap_id4, shared_robj_g) < 0)
+ if(H5HF_read(fh, heap_id4, shared_robj_g) < 0)
FAIL_STACK_ERROR
if(HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
TEST_ERROR
/* Insert fifth object small enough to fit into 'normal' heap blocks */
obj_size = (size_t)DBLOCK_SIZE(fh, 3) + 1;
- if(H5HF_insert(fh, dxpl, obj_size, shared_wobj_g, heap_id5) < 0)
+ if(H5HF_insert(fh, obj_size, shared_wobj_g, heap_id5) < 0)
FAIL_STACK_ERROR
if(H5HF_get_id_type_test(heap_id5, &obj_type) < 0)
FAIL_STACK_ERROR
@@ -13518,7 +13435,7 @@ test_huge_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -13536,12 +13453,12 @@ test_huge_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
TEST_ERROR
/* Read in fifth ('normal') object */
- if(H5HF_get_obj_len(fh, dxpl, heap_id5, &robj_size) < 0)
+ if(H5HF_get_obj_len(fh, heap_id5, &robj_size) < 0)
FAIL_STACK_ERROR
if(obj_size != robj_size)
TEST_ERROR
HDmemset(shared_robj_g, 0, obj_size);
- if(H5HF_read(fh, dxpl, heap_id5, shared_robj_g) < 0)
+ if(H5HF_read(fh, heap_id5, shared_robj_g) < 0)
FAIL_STACK_ERROR
if(HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
TEST_ERROR
@@ -13550,13 +13467,13 @@ test_huge_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
if(tparam->del_dir != FHEAP_DEL_HEAP) {
if(tparam->del_dir == FHEAP_DEL_FORWARD) {
/* Remove first object from heap */
- if(H5HF_get_obj_len(fh, dxpl, heap_id, &robj_size) < 0)
+ if(H5HF_get_obj_len(fh, heap_id, &robj_size) < 0)
FAIL_STACK_ERROR
- if(H5HF_remove(fh, dxpl, heap_id) < 0)
+ if(H5HF_remove(fh, heap_id) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -13566,13 +13483,13 @@ test_huge_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
TEST_ERROR
/* Remove second object from heap */
- if(H5HF_get_obj_len(fh, dxpl, heap_id2, &robj_size) < 0)
+ if(H5HF_get_obj_len(fh, heap_id2, &robj_size) < 0)
FAIL_STACK_ERROR
- if(H5HF_remove(fh, dxpl, heap_id2) < 0)
+ if(H5HF_remove(fh, heap_id2) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -13582,13 +13499,13 @@ test_huge_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
TEST_ERROR
/* Remove third object from heap */
- if(H5HF_get_obj_len(fh, dxpl, heap_id3, &robj_size) < 0)
+ if(H5HF_get_obj_len(fh, heap_id3, &robj_size) < 0)
FAIL_STACK_ERROR
- if(H5HF_remove(fh, dxpl, heap_id3) < 0)
+ if(H5HF_remove(fh, heap_id3) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -13598,36 +13515,36 @@ test_huge_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
TEST_ERROR
/* Remove fourth ('normal') object from heap */
- if(H5HF_remove(fh, dxpl, heap_id4) < 0)
+ if(H5HF_remove(fh, heap_id4) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Remove fifth ('normal') object from heap */
- if(H5HF_remove(fh, dxpl, heap_id5) < 0)
+ if(H5HF_remove(fh, heap_id5) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
} /* end if */
else {
/* Remove fifth ('normal') object from heap */
- if(H5HF_remove(fh, dxpl, heap_id5) < 0)
+ if(H5HF_remove(fh, heap_id5) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Remove fourth ('normal') object from heap */
- if(H5HF_remove(fh, dxpl, heap_id4) < 0)
+ if(H5HF_remove(fh, heap_id4) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Reset 'managed' object statistics after they are all removed */
@@ -13637,13 +13554,13 @@ test_huge_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
state.man_free_space = 0;
/* Remove third object from heap */
- if(H5HF_get_obj_len(fh, dxpl, heap_id3, &robj_size) < 0)
+ if(H5HF_get_obj_len(fh, heap_id3, &robj_size) < 0)
FAIL_STACK_ERROR
- if(H5HF_remove(fh, dxpl, heap_id3) < 0)
+ if(H5HF_remove(fh, heap_id3) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -13653,13 +13570,13 @@ test_huge_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
TEST_ERROR
/* Remove second object from heap */
- if(H5HF_get_obj_len(fh, dxpl, heap_id2, &robj_size) < 0)
+ if(H5HF_get_obj_len(fh, heap_id2, &robj_size) < 0)
FAIL_STACK_ERROR
- if(H5HF_remove(fh, dxpl, heap_id2) < 0)
+ if(H5HF_remove(fh, heap_id2) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -13669,11 +13586,11 @@ test_huge_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
TEST_ERROR
/* Remove first object from heap */
- if(H5HF_remove(fh, dxpl, heap_id) < 0)
+ if(H5HF_remove(fh, heap_id) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
} /* end else */
@@ -13685,14 +13602,14 @@ test_huge_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
FAIL_STACK_ERROR
fh = NULL;
/* Check for deleting the entire heap */
if(tparam->del_dir == FHEAP_DEL_HEAP) {
/* Delete heap */
- if(H5HF_delete(f, dxpl, fh_addr) < 0)
+ if(H5HF_delete(f, fh_addr) < 0)
FAIL_STACK_ERROR
} /* end if */
@@ -13737,7 +13654,7 @@ error:
H5MM_xfree(keep_ids.lens);
H5MM_xfree(keep_ids.offs);
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -13761,7 +13678,6 @@ 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 = 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 */
@@ -13796,7 +13712,7 @@ test_filtered_huge(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam
} /* end if */
/* Perform common file & heap open operations */
- if(open_heap(filename, fapl, dxpl, &tmp_cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
+ if(open_heap(filename, fapl, &tmp_cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
TEST_ERROR
/* Perform common test initialization operations */
@@ -13831,7 +13747,7 @@ test_filtered_huge(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam
/* Insert object too large for managed heap blocks */
obj_size = SMALL_STAND_SIZE + 1;
- if(H5HF_insert(fh, dxpl, obj_size, shared_wobj_g, heap_id) < 0)
+ if(H5HF_insert(fh, obj_size, shared_wobj_g, heap_id) < 0)
FAIL_STACK_ERROR
if(H5HF_get_id_type_test(heap_id, &obj_type) < 0)
FAIL_STACK_ERROR
@@ -13839,13 +13755,13 @@ test_filtered_huge(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* QAK */
#ifdef QAK
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
FAIL_STACK_ERROR
fh = NULL;
@@ -13866,7 +13782,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, H5AC_ind_read_dxpl_id, fh_addr)))
+ if(NULL == (fh = H5HF_open(f, fh_addr)))
FAIL_STACK_ERROR
#endif /* QAK */
/* QAK */
@@ -13878,12 +13794,12 @@ test_filtered_huge(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam
TEST_ERROR
/* Read in huge object */
- if(H5HF_get_obj_len(fh, dxpl, heap_id, &robj_size) < 0)
+ if(H5HF_get_obj_len(fh, heap_id, &robj_size) < 0)
FAIL_STACK_ERROR
if(obj_size != robj_size)
TEST_ERROR
HDmemset(shared_robj_g, 0, obj_size);
- if(H5HF_read(fh, dxpl, heap_id, shared_robj_g) < 0)
+ if(H5HF_read(fh, heap_id, shared_robj_g) < 0)
FAIL_STACK_ERROR
if(HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
TEST_ERROR
@@ -13891,11 +13807,11 @@ test_filtered_huge(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam
/* Delete individual objects, if we won't be deleting the entire heap later */
if(tparam->del_dir != FHEAP_DEL_HEAP) {
/* Remove object from heap */
- if(H5HF_remove(fh, dxpl, heap_id) < 0)
+ if(H5HF_remove(fh, heap_id) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -13906,14 +13822,14 @@ test_filtered_huge(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam
} /* end if */
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
FAIL_STACK_ERROR
fh = NULL;
/* Check for deleting the entire heap */
if(tparam->del_dir == FHEAP_DEL_HEAP) {
/* Delete heap */
- if(H5HF_delete(f, dxpl, fh_addr) < 0)
+ if(H5HF_delete(f, fh_addr) < 0)
FAIL_STACK_ERROR
} /* end if */
@@ -13949,7 +13865,7 @@ error:
H5E_BEGIN_TRY {
H5MM_xfree(heap_id);
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -13977,7 +13893,6 @@ 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 = 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 */
@@ -13998,7 +13913,7 @@ test_tiny_insert_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
TEST_ERROR
/* Perform common file & heap open operations */
- if(open_heap(filename, fapl, dxpl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
+ if(open_heap(filename, fapl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
TEST_ERROR
/* Allocate heap ID(s) */
@@ -14013,7 +13928,7 @@ test_tiny_insert_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
/* Insert object small enough to encode in heap ID */
obj_size = tparam->actual_id_len - 2;
- if(H5HF_insert(fh, dxpl, obj_size, shared_wobj_g, heap_id) < 0)
+ if(H5HF_insert(fh, obj_size, shared_wobj_g, heap_id) < 0)
FAIL_STACK_ERROR
if(H5HF_get_id_type_test(heap_id, &obj_type) < 0)
FAIL_STACK_ERROR
@@ -14021,7 +13936,7 @@ test_tiny_insert_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -14031,12 +13946,12 @@ test_tiny_insert_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
TEST_ERROR
/* Read in tiny object */
- if(H5HF_get_obj_len(fh, dxpl, heap_id, &robj_size) < 0)
+ if(H5HF_get_obj_len(fh, heap_id, &robj_size) < 0)
FAIL_STACK_ERROR
if(obj_size != robj_size)
TEST_ERROR
HDmemset(shared_robj_g, 0, obj_size);
- if(H5HF_read(fh, dxpl, heap_id, shared_robj_g) < 0)
+ if(H5HF_read(fh, heap_id, shared_robj_g) < 0)
FAIL_STACK_ERROR
if(HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
TEST_ERROR
@@ -14044,11 +13959,11 @@ test_tiny_insert_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
/* Delete individual objects, if we won't be deleting the entire heap later */
if(tparam->del_dir != FHEAP_DEL_HEAP) {
/* Remove object from heap */
- if(H5HF_remove(fh, dxpl, heap_id) < 0)
+ if(H5HF_remove(fh, heap_id) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -14060,14 +13975,14 @@ test_tiny_insert_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
FAIL_STACK_ERROR
fh = NULL;
/* Check for deleting the entire heap */
if(tparam->del_dir == FHEAP_DEL_HEAP) {
/* Delete heap */
- if(H5HF_delete(f, dxpl, fh_addr) < 0)
+ if(H5HF_delete(f, fh_addr) < 0)
FAIL_STACK_ERROR
} /* end if */
@@ -14104,7 +14019,7 @@ error:
H5MM_xfree(keep_ids.lens);
H5MM_xfree(keep_ids.offs);
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -14130,7 +14045,6 @@ 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 = 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 */
@@ -14152,7 +14066,7 @@ test_tiny_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
TEST_ERROR
/* Perform common file & heap open operations */
- if(open_heap(filename, fapl, dxpl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
+ if(open_heap(filename, fapl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
TEST_ERROR
/* Allocate heap ID(s) */
@@ -14169,7 +14083,7 @@ test_tiny_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
/* Insert object small enough to encode in heap ID */
obj_size = tparam->actual_id_len - 2;
- if(H5HF_insert(fh, dxpl, obj_size, shared_wobj_g, heap_id) < 0)
+ if(H5HF_insert(fh, obj_size, shared_wobj_g, heap_id) < 0)
FAIL_STACK_ERROR
if(H5HF_get_id_type_test(heap_id, &obj_type) < 0)
FAIL_STACK_ERROR
@@ -14177,7 +14091,7 @@ test_tiny_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -14187,19 +14101,19 @@ test_tiny_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
TEST_ERROR
/* Read in tiny object */
- if(H5HF_get_obj_len(fh, dxpl, heap_id, &robj_size) < 0)
+ if(H5HF_get_obj_len(fh, heap_id, &robj_size) < 0)
FAIL_STACK_ERROR
if(obj_size != robj_size)
TEST_ERROR
HDmemset(shared_robj_g, 0, obj_size);
- if(H5HF_read(fh, dxpl, heap_id, shared_robj_g) < 0)
+ if(H5HF_read(fh, heap_id, shared_robj_g) < 0)
FAIL_STACK_ERROR
if(HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
TEST_ERROR
/* Insert second object small enough to encode in heap ID */
obj_size = tparam->actual_id_len - 2;
- if(H5HF_insert(fh, dxpl, obj_size, shared_wobj_g, heap_id2) < 0)
+ if(H5HF_insert(fh, obj_size, shared_wobj_g, heap_id2) < 0)
FAIL_STACK_ERROR
if(H5HF_get_id_type_test(heap_id2, &obj_type) < 0)
FAIL_STACK_ERROR
@@ -14207,7 +14121,7 @@ test_tiny_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -14217,12 +14131,12 @@ test_tiny_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
TEST_ERROR
/* Read in second tiny object */
- if(H5HF_get_obj_len(fh, dxpl, heap_id2, &robj_size) < 0)
+ if(H5HF_get_obj_len(fh, heap_id2, &robj_size) < 0)
FAIL_STACK_ERROR
if(obj_size != robj_size)
TEST_ERROR
HDmemset(shared_robj_g, 0, obj_size);
- if(H5HF_read(fh, dxpl, heap_id2, shared_robj_g) < 0)
+ if(H5HF_read(fh, heap_id2, shared_robj_g) < 0)
FAIL_STACK_ERROR
if(HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
TEST_ERROR
@@ -14231,11 +14145,11 @@ test_tiny_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
if(tparam->del_dir != FHEAP_DEL_HEAP) {
if(tparam->del_dir == FHEAP_DEL_FORWARD) {
/* Remove first object from heap */
- if(H5HF_remove(fh, dxpl, heap_id) < 0)
+ if(H5HF_remove(fh, heap_id) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -14245,11 +14159,11 @@ test_tiny_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
TEST_ERROR
/* Remove second object from heap */
- if(H5HF_remove(fh, dxpl, heap_id2) < 0)
+ if(H5HF_remove(fh, heap_id2) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -14260,11 +14174,11 @@ test_tiny_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
} /* end if */
else {
/* Remove second object from heap */
- if(H5HF_remove(fh, dxpl, heap_id2) < 0)
+ if(H5HF_remove(fh, heap_id2) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -14274,11 +14188,11 @@ test_tiny_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
TEST_ERROR
/* Remove first object from heap */
- if(H5HF_remove(fh, dxpl, heap_id) < 0)
+ if(H5HF_remove(fh, heap_id) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -14291,14 +14205,14 @@ test_tiny_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
FAIL_STACK_ERROR
fh = NULL;
/* Check for deleting the entire heap */
if(tparam->del_dir == FHEAP_DEL_HEAP) {
/* Delete heap */
- if(H5HF_delete(f, dxpl, fh_addr) < 0)
+ if(H5HF_delete(f, fh_addr) < 0)
FAIL_STACK_ERROR
} /* end if */
@@ -14337,7 +14251,7 @@ error:
H5MM_xfree(keep_ids.lens);
H5MM_xfree(keep_ids.offs);
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -14364,7 +14278,6 @@ 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 = 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 */
@@ -14391,7 +14304,7 @@ test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
TEST_ERROR
/* Perform common file & heap open operations */
- if(open_heap(filename, fapl, dxpl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
+ if(open_heap(filename, fapl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
TEST_ERROR
/* Allocate heap ID(s) */
@@ -14418,7 +14331,7 @@ test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
/* Insert first object too large for managed heap blocks */
obj_size = SMALL_STAND_SIZE + 1;
- if(H5HF_insert(fh, dxpl, obj_size, shared_wobj_g, heap_id) < 0)
+ if(H5HF_insert(fh, obj_size, shared_wobj_g, heap_id) < 0)
FAIL_STACK_ERROR
if(H5HF_get_id_type_test(heap_id, &obj_type) < 0)
FAIL_STACK_ERROR
@@ -14426,7 +14339,7 @@ test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -14436,26 +14349,26 @@ test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
TEST_ERROR
/* Read in first huge object */
- if(H5HF_get_obj_len(fh, dxpl, heap_id, &robj_size) < 0)
+ if(H5HF_get_obj_len(fh, heap_id, &robj_size) < 0)
FAIL_STACK_ERROR
if(obj_size != robj_size)
TEST_ERROR
HDmemset(shared_robj_g, 0, obj_size);
- if(H5HF_read(fh, dxpl, heap_id, shared_robj_g) < 0)
+ if(H5HF_read(fh, heap_id, shared_robj_g) < 0)
FAIL_STACK_ERROR
if(HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
TEST_ERROR
/* Check 'op' functionality on first huge object */
HDmemset(shared_robj_g, 0, obj_size);
- if(H5HF_op(fh, dxpl, heap_id, op_memcpy, shared_robj_g) < 0)
+ if(H5HF_op(fh, heap_id, op_memcpy, shared_robj_g) < 0)
FAIL_STACK_ERROR
if(HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
TEST_ERROR
/* Insert second object too large for managed heap blocks */
obj_size = SMALL_STAND_SIZE + 2;
- if(H5HF_insert(fh, dxpl, obj_size, shared_wobj_g, heap_id2) < 0)
+ if(H5HF_insert(fh, obj_size, shared_wobj_g, heap_id2) < 0)
FAIL_STACK_ERROR
if(H5HF_get_id_type_test(heap_id2, &obj_type) < 0)
FAIL_STACK_ERROR
@@ -14463,7 +14376,7 @@ test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -14473,26 +14386,26 @@ test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
TEST_ERROR
/* Read in second huge object */
- if(H5HF_get_obj_len(fh, dxpl, heap_id2, &robj_size) < 0)
+ if(H5HF_get_obj_len(fh, heap_id2, &robj_size) < 0)
FAIL_STACK_ERROR
if(obj_size != robj_size)
TEST_ERROR
HDmemset(shared_robj_g, 0, obj_size);
- if(H5HF_read(fh, dxpl, heap_id2, shared_robj_g) < 0)
+ if(H5HF_read(fh, heap_id2, shared_robj_g) < 0)
FAIL_STACK_ERROR
if(HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
TEST_ERROR
/* Check 'op' functionality on second huge object */
HDmemset(shared_robj_g, 0, obj_size);
- if(H5HF_op(fh, dxpl, heap_id2, op_memcpy, shared_robj_g) < 0)
+ if(H5HF_op(fh, heap_id2, op_memcpy, shared_robj_g) < 0)
FAIL_STACK_ERROR
if(HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
TEST_ERROR
/* Insert third object too large for managed heap blocks */
obj_size = SMALL_STAND_SIZE + 3;
- if(H5HF_insert(fh, dxpl, obj_size, shared_wobj_g, heap_id3) < 0)
+ if(H5HF_insert(fh, obj_size, shared_wobj_g, heap_id3) < 0)
FAIL_STACK_ERROR
if(H5HF_get_id_type_test(heap_id3, &obj_type) < 0)
FAIL_STACK_ERROR
@@ -14500,7 +14413,7 @@ test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -14510,26 +14423,26 @@ test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
TEST_ERROR
/* Read in third huge object */
- if(H5HF_get_obj_len(fh, dxpl, heap_id3, &robj_size) < 0)
+ if(H5HF_get_obj_len(fh, heap_id3, &robj_size) < 0)
FAIL_STACK_ERROR
if(obj_size != robj_size)
TEST_ERROR
HDmemset(shared_robj_g, 0, obj_size);
- if(H5HF_read(fh, dxpl, heap_id3, shared_robj_g) < 0)
+ if(H5HF_read(fh, heap_id3, shared_robj_g) < 0)
FAIL_STACK_ERROR
if(HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
TEST_ERROR
/* Check 'op' functionality on third huge object */
HDmemset(shared_robj_g, 0, obj_size);
- if(H5HF_op(fh, dxpl, heap_id3, op_memcpy, shared_robj_g) < 0)
+ if(H5HF_op(fh, heap_id3, op_memcpy, shared_robj_g) < 0)
FAIL_STACK_ERROR
if(HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
TEST_ERROR
/* Insert fourth object small enough to fit into 'normal' heap blocks */
obj_size = (size_t)DBLOCK_SIZE(fh, 0) + 1;
- if(H5HF_insert(fh, dxpl, obj_size, shared_wobj_g, heap_id4) < 0)
+ if(H5HF_insert(fh, obj_size, shared_wobj_g, heap_id4) < 0)
FAIL_STACK_ERROR
if(H5HF_get_id_type_test(heap_id4, &obj_type) < 0)
FAIL_STACK_ERROR
@@ -14537,7 +14450,7 @@ test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -14554,26 +14467,26 @@ test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
TEST_ERROR
/* Read in fourth ('normal') object */
- if(H5HF_get_obj_len(fh, dxpl, heap_id4, &robj_size) < 0)
+ if(H5HF_get_obj_len(fh, heap_id4, &robj_size) < 0)
FAIL_STACK_ERROR
if(obj_size != robj_size)
TEST_ERROR
HDmemset(shared_robj_g, 0, obj_size);
- if(H5HF_read(fh, dxpl, heap_id4, shared_robj_g) < 0)
+ if(H5HF_read(fh, heap_id4, shared_robj_g) < 0)
FAIL_STACK_ERROR
if(HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
TEST_ERROR
/* Check 'op' functionality on fourth ('normal') object */
HDmemset(shared_robj_g, 0, obj_size);
- if(H5HF_op(fh, dxpl, heap_id4, op_memcpy, shared_robj_g) < 0)
+ if(H5HF_op(fh, heap_id4, op_memcpy, shared_robj_g) < 0)
FAIL_STACK_ERROR
if(HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
TEST_ERROR
/* Insert fifth object small enough to fit into 'normal' heap blocks */
obj_size = (size_t)DBLOCK_SIZE(fh, 3) + 1;
- if(H5HF_insert(fh, dxpl, obj_size, shared_wobj_g, heap_id5) < 0)
+ if(H5HF_insert(fh, obj_size, shared_wobj_g, heap_id5) < 0)
FAIL_STACK_ERROR
if(H5HF_get_id_type_test(heap_id5, &obj_type) < 0)
FAIL_STACK_ERROR
@@ -14581,7 +14494,7 @@ test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -14599,19 +14512,19 @@ test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
TEST_ERROR
/* Read in fifth ('normal') object */
- if(H5HF_get_obj_len(fh, dxpl, heap_id5, &robj_size) < 0)
+ if(H5HF_get_obj_len(fh, heap_id5, &robj_size) < 0)
FAIL_STACK_ERROR
if(obj_size != robj_size)
TEST_ERROR
HDmemset(shared_robj_g, 0, obj_size);
- if(H5HF_read(fh, dxpl, heap_id5, shared_robj_g) < 0)
+ if(H5HF_read(fh, heap_id5, shared_robj_g) < 0)
FAIL_STACK_ERROR
if(HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
TEST_ERROR
/* Check 'op' functionality on fifth ('normal') object */
HDmemset(shared_robj_g, 0, obj_size);
- if(H5HF_op(fh, dxpl, heap_id5, op_memcpy, shared_robj_g) < 0)
+ if(H5HF_op(fh, heap_id5, op_memcpy, shared_robj_g) < 0)
FAIL_STACK_ERROR
if(HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
TEST_ERROR
@@ -14619,7 +14532,7 @@ test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
/* Insert sixth object small enough to encode in heap ID */
obj_size = tparam->actual_id_len - 2;
- if(H5HF_insert(fh, dxpl, obj_size, shared_wobj_g, heap_id6) < 0)
+ if(H5HF_insert(fh, obj_size, shared_wobj_g, heap_id6) < 0)
FAIL_STACK_ERROR
if(H5HF_get_id_type_test(heap_id6, &obj_type) < 0)
FAIL_STACK_ERROR
@@ -14627,7 +14540,7 @@ test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -14637,26 +14550,26 @@ test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
TEST_ERROR
/* Read in tiny object */
- if(H5HF_get_obj_len(fh, dxpl, heap_id6, &robj_size) < 0)
+ if(H5HF_get_obj_len(fh, heap_id6, &robj_size) < 0)
FAIL_STACK_ERROR
if(obj_size != robj_size)
TEST_ERROR
HDmemset(shared_robj_g, 0, obj_size);
- if(H5HF_read(fh, dxpl, heap_id6, shared_robj_g) < 0)
+ if(H5HF_read(fh, heap_id6, shared_robj_g) < 0)
FAIL_STACK_ERROR
if(HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
TEST_ERROR
/* Check 'op' functionality on sixth ('tiny') object */
HDmemset(shared_robj_g, 0, obj_size);
- if(H5HF_op(fh, dxpl, heap_id6, op_memcpy, shared_robj_g) < 0)
+ if(H5HF_op(fh, heap_id6, op_memcpy, shared_robj_g) < 0)
FAIL_STACK_ERROR
if(HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
TEST_ERROR
/* Insert seventh object small enough to encode in heap ID */
obj_size = tparam->actual_id_len - 2;
- if(H5HF_insert(fh, dxpl, obj_size, shared_wobj_g, heap_id7) < 0)
+ if(H5HF_insert(fh, obj_size, shared_wobj_g, heap_id7) < 0)
FAIL_STACK_ERROR
if(H5HF_get_id_type_test(heap_id7, &obj_type) < 0)
FAIL_STACK_ERROR
@@ -14664,7 +14577,7 @@ test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -14674,19 +14587,19 @@ test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
TEST_ERROR
/* Read in tiny object */
- if(H5HF_get_obj_len(fh, dxpl, heap_id7, &robj_size) < 0)
+ if(H5HF_get_obj_len(fh, heap_id7, &robj_size) < 0)
FAIL_STACK_ERROR
if(obj_size != robj_size)
TEST_ERROR
HDmemset(shared_robj_g, 0, obj_size);
- if(H5HF_read(fh, dxpl, heap_id7, shared_robj_g) < 0)
+ if(H5HF_read(fh, heap_id7, shared_robj_g) < 0)
FAIL_STACK_ERROR
if(HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
TEST_ERROR
/* Check 'op' functionality on seventh ('tiny') object */
HDmemset(shared_robj_g, 0, obj_size);
- if(H5HF_op(fh, dxpl, heap_id7, op_memcpy, shared_robj_g) < 0)
+ if(H5HF_op(fh, heap_id7, op_memcpy, shared_robj_g) < 0)
FAIL_STACK_ERROR
if(HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
TEST_ERROR
@@ -14695,13 +14608,13 @@ test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
if(tparam->del_dir != FHEAP_DEL_HEAP) {
if(tparam->del_dir == FHEAP_DEL_FORWARD) {
/* Remove first object from heap */
- if(H5HF_get_obj_len(fh, dxpl, heap_id, &robj_size) < 0)
+ if(H5HF_get_obj_len(fh, heap_id, &robj_size) < 0)
FAIL_STACK_ERROR
- if(H5HF_remove(fh, dxpl, heap_id) < 0)
+ if(H5HF_remove(fh, heap_id) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -14711,13 +14624,13 @@ test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
TEST_ERROR
/* Remove second object from heap */
- if(H5HF_get_obj_len(fh, dxpl, heap_id2, &robj_size) < 0)
+ if(H5HF_get_obj_len(fh, heap_id2, &robj_size) < 0)
FAIL_STACK_ERROR
- if(H5HF_remove(fh, dxpl, heap_id2) < 0)
+ if(H5HF_remove(fh, heap_id2) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -14727,13 +14640,13 @@ test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
TEST_ERROR
/* Remove third object from heap */
- if(H5HF_get_obj_len(fh, dxpl, heap_id3, &robj_size) < 0)
+ if(H5HF_get_obj_len(fh, heap_id3, &robj_size) < 0)
FAIL_STACK_ERROR
- if(H5HF_remove(fh, dxpl, heap_id3) < 0)
+ if(H5HF_remove(fh, heap_id3) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -14743,19 +14656,19 @@ test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
TEST_ERROR
/* Remove fourth ('normal') object from heap */
- if(H5HF_remove(fh, dxpl, heap_id4) < 0)
+ if(H5HF_remove(fh, heap_id4) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Remove fifth ('normal') object from heap */
- if(H5HF_remove(fh, dxpl, heap_id5) < 0)
+ if(H5HF_remove(fh, heap_id5) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Reset 'managed' object statistics after they are all removed */
@@ -14765,13 +14678,13 @@ test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
state.man_free_space = 0;
/* Remove sixth object from heap */
- if(H5HF_get_obj_len(fh, dxpl, heap_id6, &robj_size) < 0)
+ if(H5HF_get_obj_len(fh, heap_id6, &robj_size) < 0)
FAIL_STACK_ERROR
- if(H5HF_remove(fh, dxpl, heap_id6) < 0)
+ if(H5HF_remove(fh, heap_id6) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -14781,22 +14694,22 @@ test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
TEST_ERROR
/* Remove seventh object from heap */
- if(H5HF_remove(fh, dxpl, heap_id7) < 0)
+ if(H5HF_remove(fh, heap_id7) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
} /* end if */
else {
/* Remove seventh object from heap */
- if(H5HF_get_obj_len(fh, dxpl, heap_id7, &robj_size) < 0)
+ if(H5HF_get_obj_len(fh, heap_id7, &robj_size) < 0)
FAIL_STACK_ERROR
- if(H5HF_remove(fh, dxpl, heap_id7) < 0)
+ if(H5HF_remove(fh, heap_id7) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -14806,13 +14719,13 @@ test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
TEST_ERROR
/* Remove sixth object from heap */
- if(H5HF_get_obj_len(fh, dxpl, heap_id6, &robj_size) < 0)
+ if(H5HF_get_obj_len(fh, heap_id6, &robj_size) < 0)
FAIL_STACK_ERROR
- if(H5HF_remove(fh, dxpl, heap_id6) < 0)
+ if(H5HF_remove(fh, heap_id6) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -14822,19 +14735,19 @@ test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
TEST_ERROR
/* Remove fifth ('normal') object from heap */
- if(H5HF_remove(fh, dxpl, heap_id5) < 0)
+ if(H5HF_remove(fh, heap_id5) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Remove fourth ('normal') object from heap */
- if(H5HF_remove(fh, dxpl, heap_id4) < 0)
+ if(H5HF_remove(fh, heap_id4) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Reset 'managed' object statistics after they are all removed */
@@ -14844,13 +14757,13 @@ test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
state.man_free_space = 0;
/* Remove third object from heap */
- if(H5HF_get_obj_len(fh, dxpl, heap_id3, &robj_size) < 0)
+ if(H5HF_get_obj_len(fh, heap_id3, &robj_size) < 0)
FAIL_STACK_ERROR
- if(H5HF_remove(fh, dxpl, heap_id3) < 0)
+ if(H5HF_remove(fh, heap_id3) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -14860,13 +14773,13 @@ test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
TEST_ERROR
/* Remove second object from heap */
- if(H5HF_get_obj_len(fh, dxpl, heap_id2, &robj_size) < 0)
+ if(H5HF_get_obj_len(fh, heap_id2, &robj_size) < 0)
FAIL_STACK_ERROR
- if(H5HF_remove(fh, dxpl, heap_id2) < 0)
+ if(H5HF_remove(fh, heap_id2) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -14876,11 +14789,11 @@ test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
TEST_ERROR
/* Remove first object from heap */
- if(H5HF_remove(fh, dxpl, heap_id) < 0)
+ if(H5HF_remove(fh, heap_id) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
} /* end else */
@@ -14892,14 +14805,14 @@ test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
FAIL_STACK_ERROR
fh = NULL;
/* Check for deleting the entire heap */
if(tparam->del_dir == FHEAP_DEL_HEAP) {
/* Delete heap */
- if(H5HF_delete(f, dxpl, fh_addr) < 0)
+ if(H5HF_delete(f, fh_addr) < 0)
FAIL_STACK_ERROR
} /* end if */
@@ -14948,7 +14861,7 @@ error:
H5MM_xfree(keep_ids.lens);
H5MM_xfree(keep_ids.offs);
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -14975,7 +14888,6 @@ 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 = 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 */
@@ -15003,7 +14915,7 @@ test_filtered_man_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_para
FAIL_STACK_ERROR
/* Perform common file & heap open operations */
- if(open_heap(filename, fapl, dxpl, &tmp_cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
+ if(open_heap(filename, fapl, &tmp_cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
TEST_ERROR
/* Perform common test initialization operations */
@@ -15013,7 +14925,7 @@ test_filtered_man_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_para
/* Insert object small enough to fit into direct heap block */
obj_size = (size_t)DBLOCK_SIZE(fh, 0) / 2;
- if(H5HF_insert(fh, dxpl, obj_size, shared_wobj_g, heap_id) < 0)
+ if(H5HF_insert(fh, obj_size, shared_wobj_g, heap_id) < 0)
FAIL_STACK_ERROR
if(H5HF_get_id_type_test(heap_id, &obj_type) < 0)
FAIL_STACK_ERROR
@@ -15021,11 +14933,11 @@ test_filtered_man_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_para
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
FAIL_STACK_ERROR
fh = NULL;
@@ -15046,7 +14958,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, H5AC_ind_read_dxpl_id, fh_addr)))
+ if(NULL == (fh = H5HF_open(f, fh_addr)))
FAIL_STACK_ERROR
/* Check up on heap... */
@@ -15058,12 +14970,12 @@ test_filtered_man_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_para
TEST_ERROR
/* Read in ('normal') object */
- if(H5HF_get_obj_len(fh, dxpl, heap_id, &robj_size) < 0)
+ if(H5HF_get_obj_len(fh, heap_id, &robj_size) < 0)
FAIL_STACK_ERROR
if(obj_size != robj_size)
TEST_ERROR
HDmemset(shared_robj_g, 0, obj_size);
- if(H5HF_read(fh, dxpl, heap_id, shared_robj_g) < 0)
+ if(H5HF_read(fh, heap_id, shared_robj_g) < 0)
FAIL_STACK_ERROR
if(HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
TEST_ERROR
@@ -15071,13 +14983,13 @@ test_filtered_man_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_para
/* Delete individual objects, if we won't be deleting the entire heap later */
if(tparam->del_dir != FHEAP_DEL_HEAP) {
/* Remove object from heap */
- if(H5HF_get_obj_len(fh, dxpl, heap_id, &robj_size) < 0)
+ if(H5HF_get_obj_len(fh, heap_id, &robj_size) < 0)
FAIL_STACK_ERROR
- if(H5HF_remove(fh, dxpl, heap_id) < 0)
+ if(H5HF_remove(fh, heap_id) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Check up on heap... */
@@ -15087,14 +14999,14 @@ 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, H5AC_ind_read_dxpl_id) < 0)
+ if(H5HF_close(fh) < 0)
FAIL_STACK_ERROR
fh = NULL;
/* Check for deleting the entire heap */
if(tparam->del_dir == FHEAP_DEL_HEAP) {
/* Delete heap */
- if(H5HF_delete(f, dxpl, fh_addr) < 0)
+ if(H5HF_delete(f, fh_addr) < 0)
FAIL_STACK_ERROR
} /* end if */
@@ -15127,7 +15039,7 @@ HDfprintf(stderr, "empty_size = %lu, file_size = %lu\n", (unsigned long)empty_si
error:
H5E_BEGIN_TRY {
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -15151,7 +15063,6 @@ 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 = 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 */
@@ -15180,7 +15091,7 @@ test_filtered_man_root_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa
FAIL_STACK_ERROR
/* Perform common file & heap open operations */
- if(open_heap(filename, fapl, dxpl, &tmp_cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
+ if(open_heap(filename, fapl, &tmp_cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
TEST_ERROR
/* Perform common test initialization operations */
@@ -15190,7 +15101,7 @@ test_filtered_man_root_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa
/* Insert object #1, small enough to fit into direct heap block */
obj_size = (size_t)DBLOCK_SIZE(fh, 0) / 2;
- if(H5HF_insert(fh, dxpl, obj_size, shared_wobj_g, heap_id1) < 0)
+ if(H5HF_insert(fh, obj_size, shared_wobj_g, heap_id1) < 0)
FAIL_STACK_ERROR
if(H5HF_get_id_type_test(heap_id1, &obj_type) < 0)
FAIL_STACK_ERROR
@@ -15198,12 +15109,12 @@ test_filtered_man_root_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Insert object #2, small enough to fit into direct heap block */
obj_size = (size_t)DBLOCK_SIZE(fh, 0) / 2;
- if(H5HF_insert(fh, dxpl, obj_size, shared_wobj_g, heap_id2) < 0)
+ if(H5HF_insert(fh, obj_size, shared_wobj_g, heap_id2) < 0)
FAIL_STACK_ERROR
if(H5HF_get_id_type_test(heap_id2, &obj_type) < 0)
FAIL_STACK_ERROR
@@ -15211,7 +15122,7 @@ test_filtered_man_root_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa
TEST_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
FAIL_STACK_ERROR
fh = NULL;
@@ -15232,7 +15143,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, H5AC_ind_read_dxpl_id, fh_addr)))
+ if(NULL == (fh = H5HF_open(f, fh_addr)))
FAIL_STACK_ERROR
/* Check up on heap... */
@@ -15244,23 +15155,23 @@ test_filtered_man_root_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa
TEST_ERROR
/* Read in ('normal') object #1 */
- if(H5HF_get_obj_len(fh, dxpl, heap_id1, &robj_size) < 0)
+ if(H5HF_get_obj_len(fh, heap_id1, &robj_size) < 0)
FAIL_STACK_ERROR
if(obj_size != robj_size)
TEST_ERROR
HDmemset(shared_robj_g, 0, obj_size);
- if(H5HF_read(fh, dxpl, heap_id1, shared_robj_g) < 0)
+ if(H5HF_read(fh, heap_id1, shared_robj_g) < 0)
FAIL_STACK_ERROR
if(HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
TEST_ERROR
/* Read in ('normal') object #2 */
- if(H5HF_get_obj_len(fh, dxpl, heap_id2, &robj_size) < 0)
+ if(H5HF_get_obj_len(fh, heap_id2, &robj_size) < 0)
FAIL_STACK_ERROR
if(obj_size != robj_size)
TEST_ERROR
HDmemset(shared_robj_g, 0, obj_size);
- if(H5HF_read(fh, dxpl, heap_id2, shared_robj_g) < 0)
+ if(H5HF_read(fh, heap_id2, shared_robj_g) < 0)
FAIL_STACK_ERROR
if(HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
TEST_ERROR
@@ -15269,13 +15180,13 @@ test_filtered_man_root_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa
if(tparam->del_dir != FHEAP_DEL_HEAP) {
if(tparam->del_dir == FHEAP_DEL_FORWARD) {
/* Remove object #1 from heap */
- if(H5HF_get_obj_len(fh, dxpl, heap_id1, &robj_size) < 0)
+ if(H5HF_get_obj_len(fh, heap_id1, &robj_size) < 0)
FAIL_STACK_ERROR
- if(H5HF_remove(fh, dxpl, heap_id1) < 0)
+ if(H5HF_remove(fh, heap_id1) < 0)
FAIL_STACK_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
FAIL_STACK_ERROR
fh = NULL;
@@ -15296,13 +15207,13 @@ 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, H5AC_ind_read_dxpl_id, fh_addr)))
+ if(NULL == (fh = H5HF_open(f, fh_addr)))
FAIL_STACK_ERROR
/* Remove object #2 from heap */
- if(H5HF_get_obj_len(fh, dxpl, heap_id2, &robj_size) < 0)
+ if(H5HF_get_obj_len(fh, heap_id2, &robj_size) < 0)
FAIL_STACK_ERROR
- if(H5HF_remove(fh, dxpl, heap_id2) < 0)
+ if(H5HF_remove(fh, heap_id2) < 0)
FAIL_STACK_ERROR
/* Check up on heap... */
@@ -15311,7 +15222,7 @@ test_filtered_man_root_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa
TEST_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
FAIL_STACK_ERROR
fh = NULL;
@@ -15332,7 +15243,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, H5AC_ind_read_dxpl_id, fh_addr)))
+ if(NULL == (fh = H5HF_open(f, fh_addr)))
FAIL_STACK_ERROR
/* Check up on heap... */
@@ -15342,13 +15253,13 @@ test_filtered_man_root_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa
} /* end if */
else {
/* Remove object #2 from heap */
- if(H5HF_get_obj_len(fh, dxpl, heap_id2, &robj_size) < 0)
+ if(H5HF_get_obj_len(fh, heap_id2, &robj_size) < 0)
FAIL_STACK_ERROR
- if(H5HF_remove(fh, dxpl, heap_id2) < 0)
+ if(H5HF_remove(fh, heap_id2) < 0)
FAIL_STACK_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
FAIL_STACK_ERROR
fh = NULL;
@@ -15369,13 +15280,13 @@ 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, H5AC_ind_read_dxpl_id, fh_addr)))
+ if(NULL == (fh = H5HF_open(f, fh_addr)))
FAIL_STACK_ERROR
/* Remove object #1 from heap */
- if(H5HF_get_obj_len(fh, dxpl, heap_id1, &robj_size) < 0)
+ if(H5HF_get_obj_len(fh, heap_id1, &robj_size) < 0)
FAIL_STACK_ERROR
- if(H5HF_remove(fh, dxpl, heap_id1) < 0)
+ if(H5HF_remove(fh, heap_id1) < 0)
FAIL_STACK_ERROR
/* Check up on heap... */
@@ -15384,7 +15295,7 @@ test_filtered_man_root_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa
TEST_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
FAIL_STACK_ERROR
fh = NULL;
@@ -15405,7 +15316,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, H5AC_ind_read_dxpl_id, fh_addr)))
+ if(NULL == (fh = H5HF_open(f, fh_addr)))
FAIL_STACK_ERROR
/* Check up on heap... */
@@ -15416,14 +15327,14 @@ 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, H5AC_ind_read_dxpl_id) < 0)
+ if(H5HF_close(fh) < 0)
FAIL_STACK_ERROR
fh = NULL;
/* Check for deleting the entire heap */
if(tparam->del_dir == FHEAP_DEL_HEAP) {
/* Delete heap */
- if(H5HF_delete(f, dxpl, fh_addr) < 0)
+ if(H5HF_delete(f, fh_addr) < 0)
FAIL_STACK_ERROR
} /* end if */
@@ -15456,7 +15367,7 @@ HDfprintf(stderr, "empty_size = %lu, file_size = %lu\n", (unsigned long)empty_si
error:
H5E_BEGIN_TRY {
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -15486,7 +15397,6 @@ 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 = 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 */
@@ -15520,7 +15430,7 @@ test_random(hsize_t size_limit, hid_t fapl, H5HF_create_t *cparam, fheap_test_pa
} /* end if */
/* Perform common file & heap open operations */
- if(open_heap(filename, fapl, dxpl, &tmp_cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
+ if(open_heap(filename, fapl, &tmp_cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
TEST_ERROR
/* Get information about heap ID lengths */
@@ -15561,11 +15471,11 @@ HDfprintf(stderr, "Random # seed was: %lu\n", seed);
obj_loc = (tmp_cparam.max_man_size + 255) - obj_size;
/* Insert object */
- if(add_obj(fh, dxpl, obj_loc, obj_size, NULL, &keep_ids))
+ if(add_obj(fh, obj_loc, obj_size, NULL, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Increment the amount of objects added */
@@ -15600,11 +15510,11 @@ HDfprintf(stderr, "keep_ids.num_ids = %Zu, total_obj_added = %Hu, size_limit = %
/* Delete objects inserted */
for(u = 0; u < keep_ids.num_ids; u++) {
/* Remove object from heap */
- if(H5HF_remove(fh, dxpl, &keep_ids.ids[id_len * u]) < 0)
+ if(H5HF_remove(fh, &keep_ids.ids[id_len * u]) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
} /* end for */
@@ -15614,14 +15524,14 @@ HDfprintf(stderr, "keep_ids.num_ids = %Zu, total_obj_added = %Hu, size_limit = %
} /* end if */
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
FAIL_STACK_ERROR
fh = NULL;
/* Check for deleting the entire heap */
if(tparam->del_dir == FHEAP_DEL_HEAP) {
/* Delete heap */
- if(H5HF_delete(f, dxpl, fh_addr) < 0)
+ if(H5HF_delete(f, fh_addr) < 0)
FAIL_STACK_ERROR
} /* end if */
@@ -15661,7 +15571,7 @@ error:
H5MM_xfree(keep_ids.lens);
H5MM_xfree(keep_ids.offs);
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -15690,7 +15600,6 @@ 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 = 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 */
@@ -15724,7 +15633,7 @@ test_random_pow2(hsize_t size_limit, hid_t fapl, H5HF_create_t *cparam, fheap_te
} /* end if */
/* Perform common file & heap open operations */
- if(open_heap(filename, fapl, dxpl, &tmp_cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
+ if(open_heap(filename, fapl, &tmp_cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
TEST_ERROR
/* Get information about heap ID lengths */
@@ -15777,11 +15686,11 @@ HDfprintf(stderr, "Random # seed was: %lu\n", seed);
obj_loc = (tmp_cparam.max_man_size + 255) - obj_size;
/* Insert object */
- if(add_obj(fh, dxpl, obj_loc, obj_size, NULL, &keep_ids))
+ if(add_obj(fh, obj_loc, obj_size, NULL, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Increment the amount of objects added */
@@ -15816,11 +15725,11 @@ HDfprintf(stderr, "keep_ids.num_ids = %Zu, total_obj_added = %Hu, size_limit = %
/* Delete objects inserted */
for(u = 0; u < keep_ids.num_ids; u++) {
/* Remove object from heap */
- if(H5HF_remove(fh, dxpl, &keep_ids.ids[id_len * u]) < 0)
+ if(H5HF_remove(fh, &keep_ids.ids[id_len * u]) < 0)
FAIL_STACK_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
} /* end for */
@@ -15830,14 +15739,14 @@ HDfprintf(stderr, "keep_ids.num_ids = %Zu, total_obj_added = %Hu, size_limit = %
} /* end if */
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
FAIL_STACK_ERROR
fh = NULL;
/* Check for deleting the entire heap */
if(tparam->del_dir == FHEAP_DEL_HEAP) {
/* Delete heap */
- if(H5HF_delete(f, dxpl, fh_addr) < 0)
+ if(H5HF_delete(f, fh_addr) < 0)
FAIL_STACK_ERROR
} /* end if */
@@ -15878,7 +15787,7 @@ error:
H5MM_xfree(keep_ids.lens);
H5MM_xfree(keep_ids.offs);
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -15916,7 +15825,6 @@ 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 = 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 */
@@ -15975,7 +15883,7 @@ test_write(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
} /* end if */
/* Perform common file & heap open operations */
- if(open_heap(filename, fapl, dxpl, &tmp_cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
+ if(open_heap(filename, fapl, &tmp_cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
TEST_ERROR
/* Get information about heap ID lengths */
@@ -15987,16 +15895,16 @@ test_write(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
/* Create 'tiny' and 'huge' objects */
obj_size = id_len / 2;
- if(H5HF_insert(fh, dxpl, obj_size, shared_wobj_g, tiny_heap_id) < 0)
+ if(H5HF_insert(fh, obj_size, shared_wobj_g, tiny_heap_id) < 0)
FAIL_STACK_ERROR
obj_size = tmp_cparam.max_man_size + 1;
- if(H5HF_insert(fh, dxpl, obj_size, shared_wobj_g, huge_heap_id) < 0)
+ if(H5HF_insert(fh, obj_size, shared_wobj_g, huge_heap_id) < 0)
FAIL_STACK_ERROR
/* Verify that writing to 'huge' objects works for un-filtered heaps */
H5E_BEGIN_TRY {
- ret = H5HF_write(fh, dxpl, huge_heap_id, &id_changed, shared_wobj_g);
+ ret = H5HF_write(fh, huge_heap_id, &id_changed, shared_wobj_g);
} H5E_END_TRY;
HDassert(!id_changed);
if(tparam->comp == FHEAP_TEST_COMPRESS) {
@@ -16010,14 +15918,14 @@ test_write(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
/* Verify that writing to 'tiny' objects return failure (for now) */
H5E_BEGIN_TRY {
- ret = H5HF_write(fh, dxpl, tiny_heap_id, &id_changed, shared_wobj_g);
+ ret = H5HF_write(fh, tiny_heap_id, &id_changed, shared_wobj_g);
} H5E_END_TRY;
HDassert(!id_changed);
if(ret >= 0)
TEST_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
FAIL_STACK_ERROR
fh = NULL;
@@ -16046,7 +15954,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, H5AC_ind_read_dxpl_id, fh_addr)))
+ if(NULL == (fh = H5HF_open(f, fh_addr)))
FAIL_STACK_ERROR
/* Initialize data to overwrite with */
@@ -16058,20 +15966,20 @@ test_write(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
obj_size = 20;
for(u = 0; u < 40; u++) {
obj_loc = u;
- if(add_obj(fh, dxpl, obj_loc, obj_size, NULL, &keep_ids))
+ if(add_obj(fh, obj_loc, obj_size, NULL, &keep_ids))
TEST_ERROR
/* Check for closing & re-opening the heap */
- if(reopen_heap(f, dxpl, &fh, fh_addr, tparam) < 0)
+ if(reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
/* Overwrite data just written */
- if(H5HF_write(fh, dxpl, &keep_ids.ids[id_len * u], &id_changed, rewrite_obj) < 0)
+ if(H5HF_write(fh, &keep_ids.ids[id_len * u], &id_changed, rewrite_obj) < 0)
FAIL_STACK_ERROR
HDassert(!id_changed);
/* Read data back in */
- if(H5HF_read(fh, dxpl, &keep_ids.ids[id_len * u], shared_robj_g) < 0)
+ if(H5HF_read(fh, &keep_ids.ids[id_len * u], shared_robj_g) < 0)
FAIL_STACK_ERROR
/* Compare data read in */
@@ -16086,7 +15994,7 @@ test_write(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
} /* end for */
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
FAIL_STACK_ERROR
fh = NULL;
@@ -16113,14 +16021,14 @@ 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, H5AC_ind_read_dxpl_id, fh_addr)))
+ if(NULL == (fh = H5HF_open(f, fh_addr)))
FAIL_STACK_ERROR
/* Verify changed objects */
obj_size = 20;
for(u = 0; u < 40; u++) {
/* Read data back in */
- if(H5HF_read(fh, dxpl, &keep_ids.ids[id_len * u], shared_robj_g) < 0)
+ if(H5HF_read(fh, &keep_ids.ids[id_len * u], shared_robj_g) < 0)
FAIL_STACK_ERROR
/* Compare data read in */
@@ -16135,7 +16043,7 @@ test_write(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
} /* end for */
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
FAIL_STACK_ERROR
fh = NULL;
@@ -16165,7 +16073,7 @@ error:
H5MM_xfree(keep_ids.offs);
H5MM_xfree(rewrite_obj);
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -16193,7 +16101,6 @@ 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 = 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 */
@@ -16214,7 +16121,7 @@ test_bug1(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
HDmemset(&keep_ids, 0, sizeof(fheap_heap_ids_t));
/* Perform common file & heap open operations */
- if(open_heap(filename, fapl, dxpl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
+ if(open_heap(filename, fapl, cparam, tparam, &file, &f, &fh, &fh_addr, &state, &empty_size) < 0)
TEST_ERROR
/* Get information about heap ID lengths */
@@ -16226,36 +16133,36 @@ test_bug1(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
/* Insert objects */
obj_size = 44;
obj_loc = 1;
- if(add_obj(fh, dxpl, obj_loc, obj_size, NULL, &keep_ids))
+ if(add_obj(fh, obj_loc, obj_size, NULL, &keep_ids))
TEST_ERROR
obj_size = 484;
obj_loc = 2;
- if(add_obj(fh, dxpl, obj_loc, obj_size, NULL, &keep_ids))
+ if(add_obj(fh, obj_loc, obj_size, NULL, &keep_ids))
TEST_ERROR
obj_size = 168;
obj_loc = 3;
- if(add_obj(fh, dxpl, obj_loc, obj_size, NULL, &keep_ids))
+ if(add_obj(fh, obj_loc, obj_size, NULL, &keep_ids))
TEST_ERROR
obj_size = 96;
obj_loc = 4;
- if(add_obj(fh, dxpl, obj_loc, obj_size, NULL, &keep_ids))
+ if(add_obj(fh, obj_loc, obj_size, NULL, &keep_ids))
TEST_ERROR
obj_size = 568;
obj_loc = 5;
- if(add_obj(fh, dxpl, obj_loc, obj_size, NULL, &keep_ids))
+ if(add_obj(fh, obj_loc, obj_size, NULL, &keep_ids))
TEST_ERROR
obj_size = 568;
obj_loc = 6;
- if(add_obj(fh, dxpl, obj_loc, obj_size, NULL, &keep_ids))
+ if(add_obj(fh, obj_loc, obj_size, NULL, &keep_ids))
TEST_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
FAIL_STACK_ERROR
fh = NULL;
@@ -16278,15 +16185,15 @@ 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, H5AC_ind_read_dxpl_id, fh_addr)))
+ if(NULL == (fh = H5HF_open(f, fh_addr)))
FAIL_STACK_ERROR
/* Remove one of the objects */
- if(H5HF_remove(fh, dxpl, &keep_ids.ids[id_len * 4]) < 0)
+ if(H5HF_remove(fh, &keep_ids.ids[id_len * 4]) < 0)
FAIL_STACK_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
FAIL_STACK_ERROR
fh = NULL;
@@ -16308,17 +16215,17 @@ 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, H5AC_ind_read_dxpl_id, fh_addr)))
+ if(NULL == (fh = H5HF_open(f, fh_addr)))
FAIL_STACK_ERROR
/* Insert another object */
obj_size = 208;
obj_loc = 6;
- if(add_obj(fh, dxpl, obj_loc, obj_size, NULL, &keep_ids))
+ if(add_obj(fh, obj_loc, obj_size, NULL, &keep_ids))
TEST_ERROR
/* Close the fractal heap */
- if(H5HF_close(fh, dxpl) < 0)
+ if(H5HF_close(fh) < 0)
FAIL_STACK_ERROR
fh = NULL;
@@ -16343,7 +16250,7 @@ error:
H5MM_xfree(keep_ids.lens);
H5MM_xfree(keep_ids.offs);
if(fh)
- H5HF_close(fh, dxpl);
+ H5HF_close(fh);
H5Fclose(file);
} H5E_END_TRY;
return(1);
@@ -16379,6 +16286,17 @@ main(void)
unsigned nerrors = 0; /* Cumulative error count */
unsigned num_pb_fs = 1; /* The number of settings to test for page buffering and file space handling */
int ExpressMode; /* Express testing level */
+ const char *envval; /* Environment variable */
+ hbool_t contig_addr_vfd; /* Whether VFD used has a contigous address space */
+ hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
+
+ /* Don't run this test using certain file drivers */
+ envval = HDgetenv("HDF5_DRIVER");
+ if(envval == NULL)
+ envval = "nomatch";
+
+ /* Current VFD that does not support contigous address space */
+ contig_addr_vfd = (hbool_t)(HDstrcmp(envval, "split") && HDstrcmp(envval, "multi"));
/* Reset library */
h5_reset();
@@ -16388,19 +16306,32 @@ main(void)
/*
* Caution when turning on ExpressMode 0:
- * It will activate testing with different combinations of
+ * It will activate testing with different combinations of
* page buffering and file space strategy and the
* running time will be long.
+ * For parallel build, the last two tests for page buffering
+ * are skipped because this feature is disabled in parallel.
+ * Activate full testing when this feature is re-enabled
+ * in the future for parallel build.
*/
if(ExpressMode > 1)
- printf("***Express test mode on. Some tests may be skipped\n");
- else if(ExpressMode == 0)
+ HDprintf("***Express test mode on. Some tests may be skipped\n");
+ else if(ExpressMode == 0) {
+#ifdef H5_HAVE_PARALLEL
+ num_pb_fs = NUM_PB_FS - 2;
+#else
num_pb_fs = NUM_PB_FS;
+#endif
+ }
/* Initialize heap creation parameters */
init_small_cparam(&small_cparam);
init_large_cparam(&large_cparam);
+ /* Push API context */
+ if(H5CX_push() < 0) FAIL_STACK_ERROR
+ api_ctx_pushed = TRUE;
+
/* Allocate space for the shared objects */
shared_obj_size_g = large_cparam.max_man_size + 256;
shared_wobj_g = (unsigned char *)H5MM_malloc(shared_obj_size_g);
@@ -16421,6 +16352,12 @@ main(void)
shared_wobj_g[u] = (unsigned char)u;
for(v = 0; v < num_pb_fs; v++) {
+ /* Skip test when:
+ a) multi/split drivers and
+ b) persisting free-space or using paged aggregation strategy
+ because the library will fail file creation (temporary) for the above conditions */
+ if(!contig_addr_vfd && v)
+ break;
if((fcpl = H5Pcopy(def_fcpl)) < 0)
TEST_ERROR
@@ -16435,6 +16372,33 @@ main(void)
if(H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, TRUE, (hsize_t)1) < 0)
TEST_ERROR
fapl = def_fapl;
+ /* This is a fix for the daily test failure from the checkin for libver bounds. */
+ /*
+ * Many tests failed the file size check when comparing (a) and (b) as below:
+ * --Create a file and close the file. Got the initial file size (a).
+ * --Reopen the file, perform fractal heap operations, and close the file.
+ * Got the file size (b).
+ * The cause for the file size differences:
+ * When the file is initially created with persisting free-space and with
+ * (earliest, latest) libver bounds, the file will have version 2 superblock
+ * due to non-default free-space handling. As the low bound is earliest,
+ * the library uses version 1 object header when creating the superblock
+ * extension message.
+ * When the file is reopened with the same libver bounds, the file's low
+ * bound is upgraded to v18 because the file has version 2 superblock.
+ * When the library creates the superblock extension message on file close,
+ * the library uses version 2 object header for the superblock extension
+ * message since the low bound is v18.
+ * This leads to the discrepancy in file sizes as the file is persisting
+ * free-space and there is object header version differences.
+ * The fix:
+ * Set libver bounds in fapl to (v18, latest) so that the file created in the
+ * test routines will have low bound set to v18. This will cause the
+ * library to use version 2 object header for the superblock extension
+ * message.
+ */
+ if(H5Pset_libver_bounds(fapl, H5F_LIBVER_V18, H5F_LIBVER_LATEST) < 0)
+ TEST_ERROR
break;
case 2:
if(H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, FALSE, (hsize_t)1) < 0)
@@ -16475,12 +16439,12 @@ main(void)
switch(curr_test) {
/* "Normal" testing parameters */
case FHEAP_TEST_NORMAL:
- puts("Testing with normal parameters");
+ HDputs("Testing with normal parameters");
break;
/* "Re-open heap" testing parameters */
case FHEAP_TEST_REOPEN:
- puts("Testing with reopen heap flag set");
+ HDputs("Testing with reopen heap flag set");
tparam.reopen_heap = FHEAP_TEST_REOPEN;
break;
@@ -16512,12 +16476,12 @@ main(void)
switch(fill) {
/* "Bulk fill" heap blocks with 'large' objects */
case FHEAP_TEST_FILL_LARGE:
- puts("Bulk-filling blocks w/large objects");
+ HDputs("Bulk-filling blocks w/large objects");
break;
/* "Bulk fill" heap blocks with 'single' objects */
case FHEAP_TEST_FILL_SINGLE:
- puts("Bulk-filling blocks w/single object");
+ HDputs("Bulk-filling blocks w/single object");
break;
/* An unknown test? */
@@ -16568,25 +16532,25 @@ main(void)
* level of complexity gradually. -QAK
*/
if(ExpressMode > 1)
- printf("***Express test mode on. test_man_start_5th_recursive_indirect is skipped\n");
+ HDprintf("***Express test mode on. test_man_start_5th_recursive_indirect is skipped\n");
else
nerrors += test_man_start_5th_recursive_indirect(fapl, &small_cparam, &tparam);
/*
* Test fractal heap object deletion
*/
- /* Simple removal */
- nerrors += test_man_remove_bogus(fapl, &small_cparam, &tparam);
- nerrors += test_man_remove_one(fapl, &small_cparam, &tparam);
- nerrors += test_man_remove_two(fapl, &small_cparam, &tparam);
- nerrors += test_man_remove_one_larger(fapl, &small_cparam, &tparam);
- tparam.del_dir = FHEAP_DEL_FORWARD;
- nerrors += test_man_remove_two_larger(fapl, &small_cparam, &tparam);
- tparam.del_dir = FHEAP_DEL_REVERSE;
- nerrors += test_man_remove_two_larger(fapl, &small_cparam, &tparam);
- tparam.del_dir = FHEAP_DEL_FORWARD;
- nerrors += test_man_remove_three_larger(fapl, &small_cparam, &tparam);
- tparam.del_dir = FHEAP_DEL_REVERSE;
+ /* Simple removal */
+ nerrors += test_man_remove_bogus(fapl, &small_cparam, &tparam);
+ nerrors += test_man_remove_one(fapl, &small_cparam, &tparam);
+ nerrors += test_man_remove_two(fapl, &small_cparam, &tparam);
+ nerrors += test_man_remove_one_larger(fapl, &small_cparam, &tparam);
+ tparam.del_dir = FHEAP_DEL_FORWARD;
+ nerrors += test_man_remove_two_larger(fapl, &small_cparam, &tparam);
+ tparam.del_dir = FHEAP_DEL_REVERSE;
+ nerrors += test_man_remove_two_larger(fapl, &small_cparam, &tparam);
+ tparam.del_dir = FHEAP_DEL_FORWARD;
+ nerrors += test_man_remove_three_larger(fapl, &small_cparam, &tparam);
+ tparam.del_dir = FHEAP_DEL_REVERSE;
nerrors += test_man_remove_three_larger(fapl, &small_cparam, &tparam);
/* Incremental insert & removal */
@@ -16613,7 +16577,7 @@ main(void)
nerrors += test_man_remove_first_two_rows(fapl, &small_cparam, &tparam);
nerrors += test_man_remove_first_four_rows(fapl, &small_cparam, &tparam);
if(ExpressMode > 1)
- printf("***Express test mode on. Some tests skipped\n");
+ HDprintf("***Express test mode on. Some tests skipped\n");
else {
nerrors += test_man_remove_all_root_direct(fapl, &small_cparam, &tparam);
nerrors += test_man_remove_2nd_indirect(fapl, &small_cparam, &tparam);
@@ -16643,7 +16607,7 @@ main(void)
nerrors += test_man_fill_3rd_direct_less_one_fill_direct_wrap_start_block_add_skipped(fapl, &small_cparam, &tparam);
nerrors += test_man_fill_1st_row_3rd_direct_fill_2nd_direct_less_one_wrap_start_block_add_skipped(fapl, &small_cparam, &tparam);
if(ExpressMode > 1)
- printf("***Express test mode on. Some tests skipped\n");
+ HDprintf("***Express test mode on. Some tests skipped\n");
else {
nerrors += test_man_fill_3rd_direct_fill_direct_skip_start_block_add_skipped(fapl, &small_cparam, &tparam);
nerrors += test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped(fapl, &small_cparam, &tparam);
@@ -16684,12 +16648,12 @@ main(void)
switch(id_len) {
/* Use "normal" form for 'huge' object's heap IDs */
case 0:
- puts("Using 'normal' heap ID format for 'huge' objects");
+ HDputs("Using 'normal' heap ID format for 'huge' objects");
break;
/* Use "direct" form for 'huge' object's heap IDs */
case 1:
- puts("Using 'direct' heap ID format for 'huge' objects");
+ HDputs("Using 'direct' heap ID format for 'huge' objects");
/* Adjust actual length of heap IDs for directly storing 'huge' object's file offset & length in heap ID */
tparam.actual_id_len = 17; /* 1 + 8 (file address size) + 8 (file length size) */
@@ -16698,7 +16662,7 @@ main(void)
/* Use "direct" storage for 'huge' objects and larger IDs for 'tiny' objects */
case 2:
small_cparam.id_len = 37;
- puts("Using 'direct' heap ID format for 'huge' objects and larger IDs for 'tiny' objects");
+ HDputs("Using 'direct' heap ID format for 'huge' objects and larger IDs for 'tiny' objects");
tparam.actual_id_len = 37;
break;
@@ -16756,10 +16720,10 @@ main(void)
/* Random object insertion & deletion */
if(ExpressMode > 1)
- printf("***Express test mode on. Some tests skipped\n");
+ HDprintf("***Express test mode on. Some tests skipped\n");
else {
/* Random tests using "small" heap creation parameters */
- puts("Using 'small' heap creation parameters");
+ HDputs("Using 'small' heap creation parameters");
/* (reduce size of tests when re-opening each time) */
/* XXX: Try to speed things up enough that these tests don't have to be reduced when re-opening */
@@ -16772,7 +16736,7 @@ main(void)
nerrors += test_random_pow2((curr_test == FHEAP_TEST_NORMAL ? (hsize_t)(100*1000*1000) : (hsize_t)(4*1000*1000)), fapl, &small_cparam, &tparam);
/* Random tests using "large" heap creation parameters */
- puts("Using 'large' heap creation parameters");
+ HDputs("Using 'large' heap creation parameters");
tparam.actual_id_len = LARGE_HEAP_ID_LEN;
/* (reduce size of tests when re-opening each time) */
@@ -16818,7 +16782,7 @@ main(void)
if(nerrors)
goto error;
- puts("All fractal heap tests passed.");
+ HDputs("All fractal heap tests passed.");
/* Release space for the shared objects */
H5MM_xfree(shared_wobj_g);
@@ -16830,17 +16794,17 @@ main(void)
if(H5Pclose(def_fcpl) < 0) TEST_ERROR
if(H5Pclose(pb_fapl) < 0) TEST_ERROR
+ /* Pop API context */
+ if(api_ctx_pushed && H5CX_pop() < 0) FAIL_STACK_ERROR
+ api_ctx_pushed = FALSE;
+
/* Clean up file used */
-#ifndef QAK
h5_cleanup(FILENAME, def_fapl);
-#else /* QAK */
-HDfprintf(stderr, "Uncomment cleanup!\n");
-#endif /* QAK */
return 0;
error:
- puts("*** TESTS FAILED ***");
+ HDputs("*** TESTS FAILED ***");
H5E_BEGIN_TRY {
H5MM_xfree(shared_wobj_g);
H5MM_xfree(shared_robj_g);
@@ -16852,6 +16816,9 @@ error:
H5Pclose(def_fcpl);
H5Pclose(fcpl);
} H5E_END_TRY;
+
+ if(api_ctx_pushed) H5CX_pop();
+
return 1;
} /* end main() */
diff --git a/test/file_image.c b/test/file_image.c
index dd0a483..12f0a18 100644
--- a/test/file_image.c
+++ b/test/file_image.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/***********************************************************
@@ -626,7 +624,7 @@ test_core(void)
VERIFY(udata->free_src == H5FD_FILE_IMAGE_OP_FILE_CLOSE, "Free callback came from wrong sourc in core close");
/* Create file image buffer */
- fd = HDopen(copied_filename, O_RDONLY, 0666);
+ fd = HDopen(copied_filename, O_RDONLY);
VERIFY(fd > 0, "open failed");
ret = HDfstat(fd, &sb);
VERIFY(ret == 0, "fstat failed");
@@ -816,7 +814,7 @@ test_get_file_image(const char * test_banner,
HDsnprintf(member_file_name, 1024, file_name, i);
/* open the test file using standard I/O calls */
- fd = HDopen(member_file_name, O_RDONLY, 0666);
+ fd = HDopen(member_file_name, O_RDONLY);
VERIFY(fd >= 0, "HDopen() failed.");
if(size_remaining >= FAMILY_SIZE ){
@@ -864,7 +862,7 @@ test_get_file_image(const char * test_banner,
VERIFY(file_image_ptr != NULL, "HDmalloc(2) failed.");
/* open the test file using standard I/O calls */
- fd = HDopen(file_name, O_RDONLY, 0666);
+ fd = HDopen(file_name, O_RDONLY);
VERIFY(fd >= 0, "HDopen() failed.");
if(user) {
diff --git a/test/filenotclosed.c b/test/filenotclosed.c
new file mode 100644
index 0000000..2c5c8dc
--- /dev/null
+++ b/test/filenotclosed.c
@@ -0,0 +1,146 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * Purpose: Test to verify that the assertion/abort failure is fixed when the
+ * application does not close the file. (See HDFFV-10160)
+ */
+
+
+#include "h5test.h"
+
+#define FILENAME "filenotclosed"
+#define DATASET_NAME "dset"
+
+/*-------------------------------------------------------------------------
+ * Function: catch_signal
+ *
+ * Purpose: The signal handler to catch the SIGABRT signal.
+ *
+ * Return: No return
+ *
+ * Programmer: Vailin Choi
+ *
+ *-------------------------------------------------------------------------
+ */
+static void catch_signal(int H5_ATTR_UNUSED signo)
+{
+ HDexit(1);
+} /* catch_signal() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: main
+ *
+ * Purpose: Test to verify the following problem described in HDFFV-10160 is fixed:
+ * "a.out: H5Fint.c:1679: H5F_close: Assertion `f->file_id > 0' failed."
+ *
+ * Return: Success: exit(EXIT_SUCCESS)
+ * Failure: exit(EXIT_FAILURE)
+ *
+ * Programmer: Vailin Choi; June 2017
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+main(void)
+{
+ hid_t fapl = -1; /* File access property lists */
+ hid_t fid = -1; /* File ID */
+ hid_t did = -1; /* Dataset ID */
+ hid_t dcpl = -1; /* Dataset creation property list */
+ hid_t sid = -1; /* Dataspace ID */
+ hsize_t cur_dim[1] = {5}; /* Current dimension sizes */
+ hsize_t max_dim[1] = {H5S_UNLIMITED}; /* Maximum dimension sizes */
+ hsize_t chunk_dim[1] = {10}; /* Chunk dimension sizes */
+ int buf[5] = {1, 2, 3, 4, 5}; /* The data to be written to the dataset */
+ char filename[100]; /* File name */
+ const char *env_h5_drvr; /* File Driver value from environment */
+ hbool_t contig_addr_vfd; /* Contiguous address vfd */
+
+ /* Get the VFD to use */
+ env_h5_drvr = HDgetenv("HDF5_DRIVER");
+ if(env_h5_drvr == NULL)
+ env_h5_drvr = "nomatch";
+
+ /* Skip test when using VFDs that has different address spaces for each
+ * type of metadata allocation.
+ * Further investigation is needed to resolve the test failure with the
+ * split/multi driver. Please see HDFFV-10160.
+ */
+ contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi"));
+ if(!contig_addr_vfd) {
+ SKIPPED();
+ puts(" Temporary skipped for a spilt/multi driver");
+ HDexit(EXIT_SUCCESS);
+ }
+
+ h5_reset();
+
+ /* To exit from the file for SIGABRT signal */
+ if(HDsignal(SIGABRT, catch_signal) == SIG_ERR)
+ TEST_ERROR
+
+ fapl = h5_fileaccess();
+ h5_fixname(FILENAME, fapl, filename, sizeof(filename));
+
+ /* Set to latest format */
+ if(H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
+ TEST_ERROR
+
+ /* Create the file */
+ if((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
+ TEST_ERROR
+
+ /* Create the dcpl and set the chunk size */
+ if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ TEST_ERROR
+
+ if(H5Pset_chunk(dcpl, 1, chunk_dim) < 0)
+ TEST_ERROR
+
+ /* Create the dataspace */
+ if((sid = H5Screate_simple(1, cur_dim, max_dim)) < 0)
+ TEST_ERROR
+
+ /* Create the dataset */
+ if((did = H5Dcreate2(fid, DATASET_NAME, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
+ TEST_ERROR
+
+ /* Write to the dataset */
+ if(H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
+ TEST_ERROR
+
+ /* Close the dataset */
+ if(H5Dclose(did) < 0)
+ TEST_ERROR
+
+ /* Close the dataspace */
+ if(H5Sclose(sid) < 0)
+ TEST_ERROR
+
+ /* Close the property lists */
+ if(H5Pclose(dcpl) < 0)
+ TEST_ERROR
+ if(H5Pclose(fapl) < 0)
+ TEST_ERROR
+
+ /* The file is not closed. */
+ /* The library will call H5_term_library to shut down the library. */
+
+ HDexit(EXIT_SUCCESS);
+
+error:
+ HDputs("*** TEST FAILED ***");
+ HDexit(EXIT_FAILURE);
+}
diff --git a/test/fillval.c b/test/fillval.c
index 6eb3565..8c8e902 100644
--- a/test/fillval.c
+++ b/test/fillval.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
@@ -1892,7 +1890,7 @@ test_extend(hid_t fapl, const char *base_name, H5D_layout_t layout)
hsize_t nelmts;
nelmts = max_size[0]*max_size[1]*max_size[2]*max_size[3]*max_size[4];
- if((fd=HDopen(FILE_NAME_RAW, O_RDWR|O_CREAT|O_TRUNC, 0666)) < 0 ||
+ if((fd = HDopen(FILE_NAME_RAW, O_RDWR|O_CREAT|O_TRUNC, H5_POSIX_CREATE_MODE_RW)) < 0 ||
HDclose(fd) < 0) goto error;
if(H5Pset_external(dcpl, FILE_NAME_RAW, (off_t)0, (hsize_t)nelmts*sizeof(int)) < 0)
goto error;
diff --git a/test/filter_fail.c b/test/filter_fail.c
index f165d8a..76b3106 100644
--- a/test/filter_fail.c
+++ b/test/filter_fail.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
diff --git a/test/filter_plugin.c b/test/filter_plugin.c
new file mode 100644
index 0000000..9897c84
--- /dev/null
+++ b/test/filter_plugin.c
@@ -0,0 +1,1559 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/*
+ * Purpose: Tests the plugin module (H5PL)
+ */
+
+#include "h5test.h"
+#include "H5srcdir.h"
+
+/*
+ * This file needs to access private datatypes from the H5Z and H5PL package.
+ */
+#define H5PL_FRIEND
+#include "H5PLpkg.h"
+#define H5Z_FRIEND
+#include "H5Zpkg.h"
+
+/* Filters IDs for test filter plugins */
+#define FILTER1_ID 257
+#define FILTER2_ID 258
+#define FILTER3_ID 259
+#define FILTER4_ID 260
+
+const char *FILENAME[] = {
+ "filter_plugin",
+ NULL
+};
+#define FILENAME_BUF_SIZE 1024
+
+/* Dataset names */
+#define DSET_DEFLATE_NAME "deflate dset"
+#define DSET_FILTER1_NAME "filter 1 dset"
+#define DSET_FILTER2_NAME "filter 2 dset"
+#define DSET_FILTER3_NAME "filter 3 dset"
+
+/* Array sizes used throughout the test */
+#define DSET_DIM1 100
+#define DSET_DIM2 200
+#define CHUNK_DIM1 2
+#define CHUNK_DIM2 25
+#define HYPERSLAB_OFFSET1 7
+#define HYPERSLAB_OFFSET2 30
+#define HYPERSLAB_SIZE1 4
+#define HYPERSLAB_SIZE2 50
+
+/* Global size arrays */
+const hsize_t sizes_g[2] = {DSET_DIM1, DSET_DIM2}; /* Dataset dimensions */
+const hsize_t hs_sizes_g[2] = {HYPERSLAB_SIZE1, HYPERSLAB_SIZE2}; /* Hyperslab sizes */
+const hsize_t hs_offsets_g[2] = {HYPERSLAB_OFFSET1, HYPERSLAB_OFFSET2}; /* Hyperslab offsets */
+const hsize_t chunk_sizes_g[2] = {CHUNK_DIM1, CHUNK_DIM2}; /* Chunk dimensions */
+
+/* Limit random number within 20000 */
+#define RANDOM_LIMIT 20000
+
+/* Things used in the groups + filter plugins test */
+#define N_SUBGROUPS 1000
+#define SUBGROUP_PREFIX "subgroup_"
+#define TOP_LEVEL_GROUP_NAME "top-level group"
+
+/* Global arrays in which to save data */
+int **orig_deflate_g = NULL;
+int **orig_dynlib1_g = NULL;
+int **orig_dynlib2_g = NULL;
+int **orig_dynlib4_g = NULL;
+
+
+
+/*-------------------------------------------------------------------------
+ * Function: free_2D_array
+ *
+ * Purpose: Free up a dynamic 2D pseudo array and set the pointer to NULL
+ * Designed to be callable in error conditions so NULLs are okay
+ *
+ * Return: SUCCEED (always)
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+free_2D_array(int ***arr) {
+
+ if (arr && *arr && (*arr)[0])
+ HDfree((*arr)[0]);
+ if (arr && *arr)
+ HDfree(*arr);
+ *arr = NULL;
+
+ return SUCCEED;
+} /* end free_2D_array() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: allocate_and_init_2D_array
+ *
+ * Purpose: Initialize an array as a pseudo 2D array and copy in some
+ * initial values.
+ *
+ * Return: SUCCEED/FAIL
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+allocate_and_init_2D_array(int ***arr, const hsize_t *sizes, int **initial_values) {
+
+ size_t r, c; /* Data rows and columns */
+ size_t i; /* Iterator */
+ size_t n_bytes; /* # of bytes to copy */
+
+ r = (size_t)sizes[0];
+ c = (size_t)sizes[1];
+
+ /* Allocate and set up pseudo-2D array */
+ if (NULL == (*arr = (int **)HDcalloc(r, sizeof(int *))))
+ TEST_ERROR;
+ if (NULL == ((*arr)[0] = (int *)HDcalloc(r * c, sizeof(int))))
+ TEST_ERROR;
+ for (i = 0; i < r; i++)
+ (*arr)[i] = (**arr + c * i);
+
+ /* Copy over the data elements */
+ if (initial_values) {
+ n_bytes = r * c * sizeof(int);
+ HDmemcpy((*arr)[0], initial_values[0], n_bytes);
+ }
+
+ return SUCCEED;
+error:
+ free_2D_array(arr);
+
+ return FAIL;
+} /* end allocate_and_init_2D_array() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: compare_2D_arrays
+ *
+ * Purpose: Compare two pseudo 2D arrays
+ *
+ * Return: SUCCEED/FAIL
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+compare_2D_arrays(int **dset1, int **dset2, const hsize_t *sizes, /*OUT*/ hbool_t *are_same) {
+ hsize_t i, j; /* index variables */
+
+ *are_same = TRUE;
+
+ /* Check all the array values. This could optionally emit any
+ * bad data, but it's not clear how that would help debugging.
+ */
+ for (i = 0; i < sizes[0]; i++)
+ for (j = 0; j < sizes[1]; j++)
+ if (dset1[i][j] != dset2[i][j]) {
+ *are_same = FALSE;
+ return SUCCEED;
+ }
+
+ return SUCCEED;
+
+} /* end compare_2D_arrays() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: ensure_filter_works
+ *
+ * Purpose: Tests writing entire data and partial data with filters
+ *
+ * Return: SUCCEED/FAIL
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+ensure_filter_works(hid_t fid, const char *name, hid_t dcpl_id)
+{
+ hid_t did = -1; /* Dataset ID */
+ hid_t dxpl_id = -1; /* Dataset xfer property list ID */
+ hid_t write_dxpl_id = -1; /* Dataset xfer property list ID for writing */
+ hid_t sid = -1; /* Dataspace ID */
+ void *tconv_buf = NULL; /* Temporary conversion buffer */
+ int **orig = NULL; /* Data written to the dataset */
+ int **read = NULL; /* Data read from the dataset */
+ size_t r, c; /* Data rows and columns */
+ size_t hs_r, hs_c, hs_offr, hs_offc; /* Hypserslab sizes and offsets */
+ size_t i, j; /* Local index variables */
+ int n = 0; /* Value written to point array */
+ hbool_t are_same; /* Output from dataset compare function */
+ int ***save_array = NULL; /* (Global) array where the final data go */
+
+ /* initialize */
+ r = (size_t)sizes_g[0];
+ c = (size_t)sizes_g[1];
+
+ /* Create the data space */
+ if ((sid = H5Screate_simple(2, sizes_g, NULL)) < 0)
+ TEST_ERROR;
+
+ /* Allocate memory for the data buffers
+ * We're using the hacky way of doing 2D arrays that uses a
+ * single data buffer but which allows normal 2D access.
+ */
+ if (allocate_and_init_2D_array(&orig, sizes_g, NULL) < 0)
+ TEST_ERROR;
+ if (allocate_and_init_2D_array(&read, sizes_g, NULL) < 0)
+ TEST_ERROR;
+
+ /* Create a small conversion buffer to test strip mining. We
+ * might as well test all we can!
+ */
+ if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
+ TEST_ERROR;
+ if (NULL == (tconv_buf = HDcalloc((size_t)1000, sizeof(char))))
+ TEST_ERROR;
+ if (H5Pset_buffer(dxpl_id, (size_t)1000, tconv_buf, NULL) < 0)
+ TEST_ERROR;
+ if ((write_dxpl_id = H5Pcopy(dxpl_id)) < 0)
+ TEST_ERROR;
+
+ TESTING(" filters (setup)");
+
+ /* Check if all the filters are available */
+ if (H5Pall_filters_avail(dcpl_id) != TRUE)
+ TEST_ERROR;
+
+ /* Create the dataset */
+ if ((did = H5Dcreate2(fid, name, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl_id, H5P_DEFAULT)) < 0)
+ TEST_ERROR;
+
+ PASSED();
+
+ /*----------------------------------------------------------------------
+ * STEP 1: Read uninitialized data. It should be zero.
+ *----------------------------------------------------------------------
+ */
+ TESTING(" filters (uninitialized read)");
+
+ if (H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl_id, *read) < 0)
+ TEST_ERROR;
+
+ /* The input buffer was calloc'd and has not been initialized yet */
+ if (compare_2D_arrays(orig, read, sizes_g, &are_same) < 0)
+ TEST_ERROR;
+ if (FALSE == are_same)
+ TEST_ERROR;
+
+ PASSED();
+
+ /*----------------------------------------------------------------------
+ * STEP 2: Test filters by setting up a chunked dataset and writing
+ * to it.
+ *----------------------------------------------------------------------
+ */
+ TESTING(" filters (write)");
+
+ n = 0;
+ for (i = 0; i < r; i++)
+ for (j = 0; j < c; j++)
+ orig[i][j] = n++;
+
+ if (H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, write_dxpl_id, *orig) < 0)
+ TEST_ERROR;
+
+ PASSED();
+
+ /*----------------------------------------------------------------------
+ * STEP 3: Try to read the data we just wrote.
+ *----------------------------------------------------------------------
+ */
+ TESTING(" filters (read)");
+
+ /* Read the dataset back */
+ if (H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl_id, *read) < 0)
+ TEST_ERROR;
+
+ /* Check that the values read are the same as the values written */
+ if (compare_2D_arrays(orig, read, sizes_g, &are_same) < 0)
+ TEST_ERROR;
+ if (FALSE == are_same)
+ TEST_ERROR;
+
+ PASSED();
+
+ /*----------------------------------------------------------------------
+ * STEP 4: Write new data over the top of the old data. The new data is
+ * random thus not very compressible, and will cause the chunks to move
+ * around as they grow. We only change values for the left half of the
+ * dataset although we rewrite the whole thing.
+ *----------------------------------------------------------------------
+ */
+ TESTING(" filters (modify)");
+
+ for (i = 0; i < r; i++)
+ for (j = 0; j < c / 2; j++)
+ orig[i][j] = (int)HDrandom() % RANDOM_LIMIT;
+
+ if (H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, write_dxpl_id, *orig) < 0)
+ TEST_ERROR;
+
+ /* Read the dataset back and check it */
+ if (H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl_id, *read) < 0)
+ TEST_ERROR;
+
+ /* Check that the values read are the same as the values written */
+ if (compare_2D_arrays(orig, read, sizes_g, &are_same) < 0)
+ TEST_ERROR;
+ if (FALSE == are_same)
+ TEST_ERROR;
+
+ PASSED();
+
+ /*----------------------------------------------------------------------
+ * STEP 5: Close the dataset and then open it and read it again. This
+ * insures that the filters message is picked up properly from the
+ * object header.
+ *----------------------------------------------------------------------
+ */
+ TESTING(" filters (re-open)");
+
+ if (H5Dclose(did) < 0)
+ TEST_ERROR;
+ if ((did = H5Dopen2(fid, name, H5P_DEFAULT)) < 0)
+ TEST_ERROR;
+
+ if (H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl_id, *read) < 0)
+ TEST_ERROR;
+
+ /* Check that the values read are the same as the values written */
+ if (compare_2D_arrays(orig, read, sizes_g, &are_same) < 0)
+ TEST_ERROR;
+ if (FALSE == are_same)
+ TEST_ERROR;
+
+ PASSED();
+
+ /*----------------------------------------------------------------------
+ * STEP 6: Test partial I/O by writing to and then reading from a
+ * hyperslab of the dataset. The hyperslab does not line up on chunk
+ * boundaries (we know that case already works from above tests).
+ *----------------------------------------------------------------------
+ */
+ TESTING(" filters (partial I/O)");
+
+ hs_r = (size_t)hs_sizes_g[0];
+ hs_c = (size_t)hs_sizes_g[1];
+ hs_offr = (size_t)hs_offsets_g[0];
+ hs_offc = (size_t)hs_offsets_g[1];
+ for (i = 0; i < hs_r; i++)
+ for (j = 0; j < hs_c; j++)
+ orig[hs_offr + i][hs_offc + j] = (int)HDrandom() % RANDOM_LIMIT;
+
+ if (H5Sselect_hyperslab(sid, H5S_SELECT_SET, hs_offsets_g, NULL, hs_sizes_g, NULL) < 0)
+ TEST_ERROR;
+
+ /* Use the "read" DXPL because partial I/O on corrupted data test
+ * needs to ignore errors during writing
+ */
+ if (H5Dwrite(did, H5T_NATIVE_INT, sid, sid, dxpl_id, *orig) < 0)
+ TEST_ERROR;
+
+ if (H5Dread(did, H5T_NATIVE_INT, sid, sid, dxpl_id, *read) < 0)
+ TEST_ERROR;
+
+ /* Check that the values read are the same as the values written */
+ if (compare_2D_arrays(orig, read, sizes_g, &are_same) < 0)
+ TEST_ERROR;
+ if (FALSE == are_same)
+ TEST_ERROR;
+
+ PASSED();
+
+ /* Save the data written to the file for later comparison when the file
+ * is reopened for read test.
+ */
+ if (!HDstrcmp(name, DSET_DEFLATE_NAME))
+ save_array = &orig_deflate_g;
+ else if (!HDstrcmp(name, DSET_FILTER1_NAME))
+ save_array = &orig_dynlib1_g;
+ else if (!HDstrcmp(name, DSET_FILTER2_NAME))
+ save_array = &orig_dynlib2_g;
+ else if (!HDstrcmp(name, DSET_FILTER3_NAME))
+ save_array = &orig_dynlib4_g;
+ else
+ TEST_ERROR;
+ if (allocate_and_init_2D_array(save_array, sizes_g, orig) < 0)
+ TEST_ERROR;
+
+ /* Clean up and exit */
+ if (H5Dclose(did) < 0)
+ TEST_ERROR;
+ if (H5Sclose(sid) < 0)
+ TEST_ERROR;
+ if (H5Pclose(dxpl_id) < 0)
+ TEST_ERROR;
+ if (H5Pclose(write_dxpl_id) < 0)
+ TEST_ERROR;
+
+ free_2D_array(&orig);
+ free_2D_array(&read);
+
+ HDfree(tconv_buf);
+
+ return SUCCEED;
+
+error:
+ /* Clean up objects used for this test */
+ H5E_BEGIN_TRY {
+ H5Dclose(did);
+ H5Sclose(sid);
+ H5Pclose(dxpl_id);
+ H5Pclose(write_dxpl_id);
+ } H5E_END_TRY
+
+ /* NULLs are okay here */
+ free_2D_array(&orig);
+ free_2D_array(&read);
+
+ if (tconv_buf)
+ HDfree(tconv_buf);
+
+ return FAIL;
+} /* end ensure_filter_works() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: test_dataset_write_with_filters
+ *
+ * Purpose: Tests creating datasets and writing data with dynamically loaded filters
+ *
+ * Return: SUCCEED/FAIL
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+test_dataset_write_with_filters(hid_t fid)
+{
+ hid_t dcpl_id = -1; /* Dataset creation property list ID */
+ unsigned int compress_level; /* Deflate compression level */
+ unsigned int filter1_data; /* Data used by filter 1 */
+ unsigned int libver_values[4]; /* Used w/ the filter that makes HDF5 calls */
+
+ /*----------------------------------------------------------
+ * STEP 1: Test deflation by itself.
+ *----------------------------------------------------------
+ */
+ HDputs("Testing dataset writes with deflate filter");
+#ifdef H5_HAVE_FILTER_DEFLATE
+ if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ TEST_ERROR;
+ if (H5Pset_chunk(dcpl_id, 2, chunk_sizes_g) < 0)
+ TEST_ERROR;
+ compress_level = 6;
+ if (H5Pset_deflate(dcpl_id, compress_level) < 0)
+ TEST_ERROR;
+
+ /* Ensure the filter works */
+ if (ensure_filter_works(fid, DSET_DEFLATE_NAME, dcpl_id) < 0)
+ TEST_ERROR;
+
+ /* Clean up objects used for this test */
+ if (H5Pclose(dcpl_id) < 0)
+ TEST_ERROR;
+#else /* H5_HAVE_FILTER_DEFLATE */
+ SKIPPED();
+ HDputs(" Deflate filter not enabled");
+#endif /* H5_HAVE_FILTER_DEFLATE */
+
+ /*----------------------------------------------------------
+ * STEP 2: Test filter plugin 1 by itself.
+ *----------------------------------------------------------
+ */
+ HDputs(" dataset writes with filter plugin 1");
+ if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ TEST_ERROR;
+ if (H5Pset_chunk(dcpl_id, 2, chunk_sizes_g) < 0)
+ TEST_ERROR;
+
+ /* Set up the filter, passing in the amount the filter will add and subtract
+ * from each data element. Note that this value has an arbitrary max of 9.
+ */
+ filter1_data = 9;
+ if (H5Pset_filter(dcpl_id, FILTER1_ID, H5Z_FLAG_MANDATORY, (size_t)1, &filter1_data) < 0)
+ TEST_ERROR;
+
+ /* Ensure the filter works */
+ if (ensure_filter_works(fid, DSET_FILTER1_NAME, dcpl_id) < 0)
+ TEST_ERROR;
+
+ /* Clean up objects used for this test */
+ if (H5Pclose(dcpl_id) < 0)
+ TEST_ERROR;
+
+ /* Unregister the dynamic filter for testing purpose. The next time when this test is run for
+ * the new file format, the library's H5PL code has to search in the table of loaded plugin libraries
+ * for this filter.
+ */
+ if (H5Zunregister(FILTER1_ID) < 0)
+ TEST_ERROR;
+
+ /*----------------------------------------------------------
+ * STEP 3: Test filter plugin 2 by itself.
+ *----------------------------------------------------------
+ */
+ HDputs(" dataset writes with filter plugin 2");
+ if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ TEST_ERROR;
+ if (H5Pset_chunk(dcpl_id, 2, chunk_sizes_g) < 0)
+ TEST_ERROR;
+ if (H5Pset_filter(dcpl_id, FILTER2_ID, H5Z_FLAG_MANDATORY, 0, NULL) < 0)
+ TEST_ERROR;
+
+ /* Ensure the filter works */
+ if (ensure_filter_works(fid, DSET_FILTER2_NAME, dcpl_id) < 0)
+ TEST_ERROR;
+
+ /* Clean up objects used for this test */
+ if (H5Pclose(dcpl_id) < 0)
+ TEST_ERROR;
+
+ /* Unregister the dynamic filter for testing purpose. The next time when this test is run for
+ * the new file format, the library's H5PL code has to search in the table of loaded plugin libraries
+ * for this filter.
+ */
+ if (H5Zunregister(FILTER2_ID) < 0)
+ TEST_ERROR;
+
+ /*----------------------------------------------------------
+ * STEP 4: Test filter plugin 3 by itself.
+ * (This filter plugin makes HDF5 API calls)
+ *----------------------------------------------------------
+ */
+ HDputs(" dataset writes with filter plugin 3");
+ if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ TEST_ERROR;
+ if (H5Pset_chunk(dcpl_id, 2, chunk_sizes_g) < 0)
+ TEST_ERROR;
+
+ /* Set the add/subtract value for the filter */
+ libver_values[0] = 9;
+
+ /* Get the library bounds and add to the filter data */
+ if (H5get_libversion(&libver_values[1], &libver_values[2], &libver_values[3]) < 0)
+ TEST_ERROR;
+ if (H5Pset_filter(dcpl_id, FILTER3_ID, H5Z_FLAG_MANDATORY, (size_t)4, libver_values) < 0)
+ TEST_ERROR;
+
+ /* Ensure the filter works */
+ if (ensure_filter_works(fid, DSET_FILTER3_NAME, dcpl_id) < 0)
+ TEST_ERROR;
+
+ /* Clean up objects used for this test */
+ if (H5Pclose(dcpl_id) < 0)
+ TEST_ERROR;
+
+ /* Unregister the dynamic filter for testing purpose. The next time when this test is run for
+ * the new file format, the library's H5PL code has to search in the table of loaded plugin libraries
+ * for this filter.
+ */
+ if (H5Zunregister(FILTER3_ID) < 0)
+ TEST_ERROR;
+
+ return SUCCEED;
+
+error:
+ /* Clean up objects used for this test */
+ H5E_BEGIN_TRY {
+ H5Pclose(dcpl_id);
+ } H5E_END_TRY
+
+ return FAIL;
+} /* end test_dataset_write_with_filters() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: test_read_data
+ *
+ * Purpose: Tests reading data and compares values
+ *
+ * Return: SUCCEED/FAIL
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+test_read_data(hid_t did, int *origin_data)
+{
+ int **check = NULL;
+ int *data_p = origin_data;
+ size_t i, j; /* Local index variables */
+
+ if (allocate_and_init_2D_array(&check, sizes_g, NULL) < 0)
+ TEST_ERROR;
+
+ /* Read the dataset back */
+ if (H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, *check) < 0)
+ TEST_ERROR;
+
+ /* Check that the values read are the same as the values written */
+ for(i = 0; i < sizes_g[0]; i++)
+ for(j = 0; j < sizes_g[1]; j++) {
+ if(*data_p != check[i][j])
+ TEST_ERROR
+ data_p++;
+ }
+
+ free_2D_array(&check);
+
+ PASSED();
+
+ return SUCCEED;
+
+error:
+ free_2D_array(&check);
+
+ return FAIL;
+} /* end test_read_data() */
+
+
+
+/*-------------------------------------------------------------------------
+ * Function: test_dataset_read_with_filters
+ *
+ * Purpose: Tests reading datasets created with dynamically-loaded
+ * filter plugins.
+ *
+ * Return: SUCCEED/FAIL
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+test_dataset_read_with_filters(hid_t fid)
+{
+ hid_t did = -1; /* Dataset ID */
+
+ /*----------------------------------------------------------
+ * STEP 1: Test deflation by itself.
+ *----------------------------------------------------------
+ */
+ TESTING("dataset read I/O with deflate filter");
+
+#ifdef H5_HAVE_FILTER_DEFLATE
+ if (H5Zfilter_avail(H5Z_FILTER_DEFLATE) != TRUE)
+ TEST_ERROR;
+
+ if ((did = H5Dopen2(fid, DSET_DEFLATE_NAME, H5P_DEFAULT)) < 0)
+ TEST_ERROR;
+
+ if (test_read_data(did, orig_deflate_g[0]) < 0)
+ TEST_ERROR;
+
+ if (H5Dclose(did) < 0)
+ TEST_ERROR;
+
+#else /* H5_HAVE_FILTER_DEFLATE */
+ SKIPPED();
+ HDputs(" Deflate filter not enabled");
+#endif /* H5_HAVE_FILTER_DEFLATE */
+
+ /*----------------------------------------------------------
+ * STEP 2: Test filter plugin 1 by itself.
+ *----------------------------------------------------------
+ */
+ TESTING(" dataset reads with filter plugin 1");
+
+ if ((did = H5Dopen2(fid, DSET_FILTER1_NAME, H5P_DEFAULT)) < 0)
+ TEST_ERROR;
+
+ if (test_read_data(did, orig_dynlib1_g[0]) < 0)
+ TEST_ERROR;
+
+ if (H5Dclose(did) < 0)
+ TEST_ERROR;
+
+ /*----------------------------------------------------------
+ * STEP 3: Test filter plugin 2 by itself.
+ *----------------------------------------------------------
+ */
+ TESTING(" dataset reads with filter plugin 2");
+
+ if ((did = H5Dopen2(fid, DSET_FILTER2_NAME, H5P_DEFAULT)) < 0)
+ TEST_ERROR;
+
+ if (test_read_data(did, orig_dynlib2_g[0]) < 0)
+ TEST_ERROR;
+
+ if (H5Dclose(did) < 0)
+ TEST_ERROR;
+
+ /*----------------------------------------------------------
+ * STEP 4: Test filter plugin 3 by itself.
+ *----------------------------------------------------------
+ */
+ TESTING(" dataset reads with filter plugin 3");
+
+ if ((did = H5Dopen2(fid, DSET_FILTER3_NAME, H5P_DEFAULT)) < 0)
+ TEST_ERROR;
+
+ if (test_read_data(did, orig_dynlib4_g[0]) < 0)
+ TEST_ERROR;
+
+ if (H5Dclose(did) < 0)
+ TEST_ERROR;
+
+ return SUCCEED;
+
+error:
+ /* Clean up objects used for this test */
+ H5E_BEGIN_TRY {
+ H5Dclose(did);
+ } H5E_END_TRY
+
+ return FAIL;
+} /* end test_dataset_read_with_filters() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: ensure_data_read_fails
+ *
+ * Purpose: Tests not reading data
+ *
+ * Return: SUCCEED/FAIL
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+ensure_data_read_fails(hid_t did)
+{
+ int **check = NULL;
+ herr_t ret = FAIL;
+
+ if (allocate_and_init_2D_array(&check, sizes_g, NULL) < 0)
+ TEST_ERROR;
+
+ /* Read the dataset back (should fail) */
+ H5E_BEGIN_TRY {
+ ret = H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, *check);
+ } H5E_END_TRY
+ if(ret >= 0)
+ TEST_ERROR;
+
+ free_2D_array(&check);
+
+ PASSED();
+
+ return SUCCEED;
+
+error:
+ free_2D_array(&check);
+ return FAIL;
+} /* end ensure_data_read_fails() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: test_no_read_when_plugins_disabled
+ *
+ * Purpose: Ensures we can't read data from a dataset that requires a
+ * filter located in a plugin.
+ *
+ * Return: SUCCEED/FAIL
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+test_no_read_when_plugins_disabled(hid_t fid)
+{
+ hid_t did = -1; /* Dataset ID */
+ unsigned plugin_flags; /* Plugin access flags */
+
+ TESTING("filter plugin 1 with filter plugins disabled");
+
+ /* Get the existing plugin flags */
+ if (H5PLget_loading_state(&plugin_flags) < 0)
+ TEST_ERROR;
+
+ /* Disable filter plugins and use the new flags */
+ plugin_flags &= (unsigned)(~H5PL_FILTER_PLUGIN);
+ if (H5PLset_loading_state(plugin_flags) < 0)
+ TEST_ERROR;
+
+ /* Open a dataset that requires a filter plugin to read the data */
+ if ((did = H5Dopen2(fid, DSET_FILTER1_NAME, H5P_DEFAULT)) < 0)
+ TEST_ERROR;
+
+ /* Make sure we can't read the data */
+ if (ensure_data_read_fails(did) < 0)
+ TEST_ERROR;
+
+ /* Close down */
+ if (H5Dclose(did) < 0)
+ TEST_ERROR;
+
+ /* Re-enable filter plugins */
+ plugin_flags |= (unsigned)H5PL_FILTER_PLUGIN;
+ if (H5PLset_loading_state(plugin_flags) < 0)
+ TEST_ERROR;
+
+ return SUCCEED;
+
+error:
+ /* Clean up objects used for this test */
+ H5E_BEGIN_TRY {
+ plugin_flags |= (unsigned)H5PL_FILTER_PLUGIN;
+ H5PLset_loading_state(plugin_flags);
+ H5Dclose(did);
+ } H5E_END_TRY
+
+ return FAIL;
+} /* end test_no_read_when_plugins_disabled() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: test_creating_groups_using_plugins
+ *
+ * Purpose: Tests creating group with dynamically loaded filters
+ *
+ * Return: SUCCEED/FAIL
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+test_creating_groups_using_plugins(hid_t fid)
+{
+ hid_t gcpl_id = -1;
+ hid_t gid = -1;
+ hid_t sub_gid = -1;
+ int i;
+ char subgroup_name[256];
+
+ TESTING("creating groups with filter plugin 4");
+
+ if ((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0)
+ TEST_ERROR;
+
+ /* Use a filter plugin for creating groups */
+ if (H5Pset_filter(gcpl_id, FILTER4_ID, H5Z_FLAG_MANDATORY, (size_t)0, NULL) < 0)
+ TEST_ERROR;
+
+ /* Create a group using this filter */
+ if ((gid = H5Gcreate2(fid, TOP_LEVEL_GROUP_NAME, H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0)
+ TEST_ERROR;
+
+ /* Create multiple groups under the top-level group */
+ for (i = 0; i < N_SUBGROUPS; i++) {
+ char *sp = subgroup_name;
+
+ sp += HDsprintf(subgroup_name, SUBGROUP_PREFIX);
+ HDsprintf(sp, "%d", i);
+
+ if ((sub_gid = H5Gcreate2(gid, subgroup_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ TEST_ERROR;
+ if (H5Gclose(sub_gid) < 0)
+ TEST_ERROR;
+ }
+
+ /* Close everything */
+ if (H5Gclose(gid) < 0)
+ TEST_ERROR;
+ if (H5Pclose(gcpl_id) < 0)
+ TEST_ERROR;
+
+ PASSED();
+
+ return SUCCEED;
+
+error:
+ /* Clean up objects used for this test */
+ H5E_BEGIN_TRY {
+ H5Gclose(sub_gid);
+ H5Gclose(gid);
+ H5Pclose(gcpl_id);
+ } H5E_END_TRY
+
+ return FAIL;
+} /* end test_creating_groups_using_plugins() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: test_opening_groups_using_plugins
+ *
+ * Purpose: Tests opening group with dynamically loaded filters
+ *
+ * Return: SUCCEED/FAIL
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+test_opening_groups_using_plugins(hid_t fid)
+{
+ hid_t gid = -1;
+ hid_t sub_gid = -1;
+ int i;
+ char subgroup_name[256];
+
+ TESTING("opening groups with filter plugin 4");
+
+ /* Open the top group */
+ if ((gid = H5Gopen2(fid, TOP_LEVEL_GROUP_NAME, H5P_DEFAULT)) < 0)
+ TEST_ERROR;
+
+ /* Open all the sub-groups under the top-level group */
+ for (i = 0; i < N_SUBGROUPS; i++) {
+ char *sp = subgroup_name;
+
+ sp += HDsprintf(subgroup_name, SUBGROUP_PREFIX);
+ HDsprintf(sp, "%d", i);
+
+ if ((sub_gid = H5Gopen2(gid, subgroup_name, H5P_DEFAULT)) < 0)
+ TEST_ERROR;
+ if (H5Gclose(sub_gid) < 0)
+ TEST_ERROR;
+ }
+
+ /* Close the top-level group */
+ if (H5Gclose(gid) < 0)
+ TEST_ERROR;
+
+ PASSED();
+
+ return SUCCEED;
+
+error:
+ /* Clean up objects used for this test */
+ H5E_BEGIN_TRY {
+ H5Gclose(gid);
+ H5Gclose(sub_gid);
+ } H5E_END_TRY
+
+ return FAIL;
+} /* end test_opening_groups_using_plugins() */
+
+
+
+/*-------------------------------------------------------------------------
+ * Function: test_path_api_calls
+ *
+ * Purpose: Tests the H5PL API calls that manipulate the plugin search
+ * paths.
+ *
+ * Return: SUCCEED/FAIL
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+test_path_api_calls(void)
+{
+ unsigned int n_starting_paths;
+ unsigned int u;
+ unsigned int n_paths;
+ herr_t ret;
+ ssize_t path_len = -1;
+ char path[256];
+ char temp_name[256];
+
+ HDputs("Testing access to the filter path table");
+
+ if (H5Zfilter_avail(FILTER1_ID) != TRUE)
+ TEST_ERROR;
+
+ /* Set the number of paths to create for this test.
+ *
+ * This should be set high enough to ensure that at least one array
+ * expansion will take place. See H5PLpath.c for details.
+ */
+ n_starting_paths = 42;
+
+ /* Check that initialization is correct */
+ TESTING(" initialize");
+
+ if (H5PLsize(&n_paths) < 0)
+ TEST_ERROR;
+ if (n_paths != 2)
+ TEST_ERROR;
+
+ PASSED();
+
+ /****************/
+ /* H5PLremove() */
+ /****************/
+
+ /* Remove all the current paths */
+ TESTING(" remove");
+
+ /* Get the current size */
+ if (H5PLsize(&n_paths) < 0)
+ TEST_ERROR;
+
+ /* Remove all existing paths */
+ for (u = n_paths; u > 0; u--)
+ if (H5PLremove(u-1) < 0) {
+ HDfprintf(stderr," at %u: %s\n", u, path);
+ TEST_ERROR;
+ }
+
+ /* Verify the table is empty */
+ if (H5PLsize(&n_paths) < 0)
+ TEST_ERROR;
+ if (n_paths > 0)
+ TEST_ERROR;
+
+ PASSED();
+
+
+ TESTING(" remove (index 0 in empty table)");
+
+ /* Try to remove index zero in an empty list (SHOULD FAIL) */
+ H5E_BEGIN_TRY {
+ ret = H5PLremove(0);
+ } H5E_END_TRY
+ if (ret >= 0)
+ TEST_ERROR;
+
+ PASSED();
+
+
+ /****************/
+ /* H5PLappend() */
+ /****************/
+
+ TESTING(" append");
+
+ /* Add a bunch of paths to the path table */
+ for (u = 0; u < n_starting_paths; u++) {
+ HDsprintf(path, "a_path_%u", u);
+ if (H5PLappend(path) < 0) {
+ HDfprintf(stderr," at %u: %s\n", u, path);
+ TEST_ERROR;
+ }
+ }
+
+ PASSED();
+
+
+ /**********************/
+ /* H5PLremove() again */
+ /**********************/
+
+ TESTING(" remove (index too high)");
+
+ /* Try to remove a path where the index is beyond the table capacity (SHOULD FAIL) */
+ H5E_BEGIN_TRY {
+ ret = H5PLremove(n_starting_paths);
+ } H5E_END_TRY
+
+ if (ret >= 0)
+ TEST_ERROR
+
+ PASSED();
+
+
+ /*************/
+ /* H5PLget() */
+ /*************/
+
+ TESTING(" get (path name)");
+
+ /* Get the path length by passing in NULL */
+ if ((path_len = H5PLget(0, NULL, 0)) <= 0) {
+ HDfprintf(stderr," get path 0 length failed\n");
+ TEST_ERROR;
+ }
+ if (path_len != 8)
+ TEST_ERROR;
+
+ /* Get the path */
+ if ((path_len = H5PLget(0, path, 256)) <= 0) {
+ HDfprintf(stderr," get 0 len: %u : %s\n", path_len, path);
+ TEST_ERROR;
+ }
+ if (HDstrcmp(path, "a_path_0") != 0) {
+ HDfprintf(stderr," get 0: %s\n", path);
+ TEST_ERROR;
+ }
+
+ PASSED();
+
+
+ TESTING(" get (high and low indices)");
+
+ /* Get path at index 1 */
+ if ((path_len = H5PLget(1, path, 256)) <= 0)
+ TEST_ERROR;
+ if (HDstrcmp(path, "a_path_1") != 0) {
+ HDfprintf(stderr," get 1: %s\n", path);
+ TEST_ERROR;
+ }
+
+ /* Get path at the last index */
+ if ((path_len = H5PLget(n_starting_paths - 1, path, 256)) <= 0)
+ TEST_ERROR;
+ HDsprintf(temp_name, "a_path_%u", n_starting_paths - 1);
+ if (HDstrcmp(path, temp_name) != 0) {
+ HDfprintf(stderr," get %u: %s\n", n_starting_paths - 1, path);
+ TEST_ERROR;
+ }
+
+ PASSED();
+
+
+ TESTING(" get (index too high)");
+
+ /* Get path at the last + 1 index (SHOULD FAIL) */
+ H5E_BEGIN_TRY {
+ path_len = H5PLget(n_starting_paths, NULL, 0);
+ } H5E_END_TRY
+ if (path_len > 0)
+ TEST_ERROR;
+
+ PASSED();
+
+
+ /*****************/
+ /* H5PLprepend() */
+ /*****************/
+
+ /* We'll remove a path at an arbitrary index and then
+ * prepend a new path.
+ */
+
+ TESTING(" remove (arbitrary index 1)");
+
+ /* Remove one path */
+ if (H5PLremove(8) < 0)
+ TEST_ERROR;
+
+ /* Verify that the entries were moved */
+ if ((path_len = H5PLget(8, path, 256)) <= 0)
+ TEST_ERROR;
+ if (HDstrcmp(path, "a_path_9") != 0) {
+ HDfprintf(stderr," get 8: %s\n", path);
+ TEST_ERROR;
+ }
+
+ /* Verify the table shrank */
+ if (H5PLsize(&n_paths) < 0)
+ TEST_ERROR;
+ if (n_paths != n_starting_paths - 1)
+ TEST_ERROR;
+
+ PASSED();
+
+
+ TESTING(" prepend");
+
+ /* Prepend one path */
+ HDsprintf(path, "a_path_%d", n_starting_paths + 1);
+ if (H5PLprepend(path) < 0) {
+ HDfprintf(stderr," prepend %u: %s\n", n_starting_paths + 1, path);
+ TEST_ERROR;
+ }
+
+ /* Verify the table increased */
+ if (H5PLsize(&n_paths) < 0)
+ TEST_ERROR;
+ if (n_paths != n_starting_paths)
+ TEST_ERROR;
+
+ /* Verify that the entries were moved */
+ if (H5PLget(8, path, 256) <= 0)
+ TEST_ERROR;
+ if (HDstrcmp(path, "a_path_7") != 0) {
+ HDfprintf(stderr," get 8: %s\n", path);
+ TEST_ERROR;
+ }
+
+ /* Verify that the path was inserted at index zero */
+ if (H5PLget(0, path, 256) <= 0)
+ TEST_ERROR;
+ HDsprintf(temp_name, "a_path_%d", n_starting_paths + 1);
+ if (HDstrcmp(path, temp_name) != 0) {
+ HDfprintf(stderr," get 0: %s\n", path);
+ TEST_ERROR;
+ }
+
+ PASSED();
+
+
+ /*****************/
+ /* H5PLreplace() */
+ /*****************/
+
+ TESTING(" replace");
+
+ /* Replace one path at index 1 */
+ HDsprintf(path, "a_path_%u", n_starting_paths + 4);
+ if (H5PLreplace(path, 1) < 0) {
+ HDfprintf(stderr," replace 1: %s\n", path);
+ TEST_ERROR;
+ }
+
+ /* Verify the table size remained the same */
+ if (H5PLsize(&n_paths) < 0)
+ TEST_ERROR;
+ if (n_paths != n_starting_paths)
+ TEST_ERROR;
+
+ /* Verify that the entries were not moved by
+ * inspecting the paths at indices +/- 1.
+ */
+
+ /* Check path at index 0 */
+ if (H5PLget(0, path, 256) <= 0)
+ TEST_ERROR;
+ HDsprintf(temp_name, "a_path_%u", n_starting_paths + 1);
+ if (HDstrcmp(path, temp_name) != 0) {
+ HDfprintf(stderr," get 0: %s\n", path);
+ TEST_ERROR;
+ }
+
+ /* Check path at index 2 */
+ if (H5PLget(2, path, 256) <= 0)
+ TEST_ERROR;
+ if (HDstrcmp(path, "a_path_1") != 0) {
+ HDfprintf(stderr," get 2: %s\n", path);
+ TEST_ERROR;
+ }
+
+ PASSED();
+
+
+ /****************/
+ /* H5PLinsert() */
+ /****************/
+
+ /* We'll remove a path at an arbitrary index and then
+ * insert a new path.
+ */
+
+ TESTING(" remove (arbitrary index 2)");
+
+ /* Remove one path */
+ if (H5PLremove(4) < 0)
+ TEST_ERROR;
+
+ /* Verify that the entries were moved */
+ if (H5PLget(4, path, 256) <= 0)
+ TEST_ERROR;
+ if (HDstrcmp(path, "a_path_4") != 0) {
+ HDfprintf(stderr," get 4: %s\n", path);
+ TEST_ERROR;
+ }
+
+ /* Verify the table size */
+ if (H5PLsize(&n_paths) < 0)
+ TEST_ERROR;
+ if (n_paths != n_starting_paths - 1)
+ TEST_ERROR;
+ PASSED();
+
+
+ TESTING(" insert");
+
+ /* Insert one path at index 3*/
+ HDsprintf(path, "a_path_%d", n_starting_paths + 5);
+ if (H5PLinsert(path, 3) < 0) {
+ HDfprintf(stderr," insert 3: %s\n", path);
+ TEST_ERROR;
+ }
+
+ /* Verify that the entries were moved */
+ if (H5PLget(4, path, 256) <= 0)
+ TEST_ERROR;
+ if (HDstrcmp(path, "a_path_2") != 0) {
+ HDfprintf(stderr," get 4: %s\n", path);
+ TEST_ERROR;
+ }
+
+ /* Verify the table size increased */
+ if (H5PLsize(&n_paths) < 0)
+ TEST_ERROR;
+ if (n_paths != n_starting_paths)
+ TEST_ERROR;
+
+ PASSED();
+
+
+ /****************/
+ /* H5PLremove() */
+ /****************/
+
+ /* Remove all the current paths */
+ TESTING(" remove (all)");
+
+ /* Get the current size */
+ if (H5PLsize(&n_paths) < 0)
+ TEST_ERROR;
+
+ /* Remove all existing paths */
+ for (u = n_paths; u > 0; u--)
+ if (H5PLremove(u-1) < 0) {
+ HDfprintf(stderr," at %u: %s\n", u, path);
+ TEST_ERROR;
+ }
+
+ /* Verify the table is empty */
+ if (H5PLsize(&n_paths) < 0)
+ TEST_ERROR;
+ if (n_paths > 0)
+ TEST_ERROR;
+
+ PASSED();
+
+
+ return SUCCEED;
+
+error:
+ return FAIL;
+} /* end test_path_api_calls() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: disable_chunk_cache
+ *
+ * Purpose: Turns the chunk cache off
+ *
+ * Return: SUCCEED/FAIL
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+disable_chunk_cache(hid_t fapl_id) {
+ int mdc_nelmts;
+ size_t rdcc_nelmts;
+ size_t rdcc_nbytes;
+ double rdcc_w0;
+
+ if (H5Pget_cache(fapl_id, &mdc_nelmts, &rdcc_nelmts, &rdcc_nbytes, &rdcc_w0) < 0)
+ TEST_ERROR;
+ rdcc_nbytes = 0;
+ if (H5Pset_cache(fapl_id, mdc_nelmts, rdcc_nelmts, rdcc_nbytes, rdcc_w0) < 0)
+ TEST_ERROR;
+
+ return SUCCEED;
+error:
+ return FAIL;
+} /* end disable_chunk_cache() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: main
+ *
+ * Purpose: Tests the plugin module (H5PL)
+ *
+ * Return: EXIT_SUCCESS/EXIT_FAILURE
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+main(void)
+{
+ char filename[FILENAME_BUF_SIZE];
+ hid_t fid = -1;
+ hid_t old_ff_fapl_id = -1;
+ hid_t new_ff_fapl_id = -1;
+ unsigned new_format;
+ int nerrors = 0;
+
+ /*******************************************************************/
+ /* ENSURE THAT WRITING TO DATASETS AND CREATING GROUPS WORKS */
+ /*******************************************************************/
+ /* Test with old & new format groups */
+ for (new_format = FALSE; new_format <= TRUE; new_format++) {
+ hid_t my_fapl_id;
+
+ /* Testing setup */
+ h5_reset();
+
+ /* Get a VFD-dependent filename */
+ if ((old_ff_fapl_id = h5_fileaccess()) < 0)
+ TEST_ERROR;
+
+ /* Turn off the chunk cache, so all the chunks are immediately written to disk */
+ if (disable_chunk_cache(old_ff_fapl_id) < 0)
+ TEST_ERROR;
+
+ /* Fix up the filename for the VFD */
+ h5_fixname(FILENAME[0], old_ff_fapl_id, filename, sizeof(filename));
+
+ /* Set the FAPL for the type of format */
+ if (new_format) {
+ HDputs("\nTesting with new file format:");
+ /* Copy the file access property list and set the latest file format on it */
+ if ((new_ff_fapl_id = H5Pcopy(old_ff_fapl_id)) < 0)
+ TEST_ERROR;
+ if (H5Pset_libver_bounds(new_ff_fapl_id, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
+ TEST_ERROR;
+
+ my_fapl_id = new_ff_fapl_id;
+ }
+ else {
+ HDputs("Testing with old file format:");
+ my_fapl_id = old_ff_fapl_id;
+ }
+
+ /* Create the file for this test */
+ if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, my_fapl_id)) < 0)
+ TEST_ERROR;
+
+ /* Test creating datasets and writing to them using plugin filters */
+ nerrors += (test_dataset_write_with_filters(fid) < 0 ? 1 : 0);
+
+ /* Test creating groups using dynamically-loaded plugin filters */
+ nerrors += (test_creating_groups_using_plugins(fid) < 0 ? 1 : 0);
+
+ if (H5Fclose(fid) < 0)
+ TEST_ERROR;
+
+ /* Close FAPLs */
+ if (H5Pclose(old_ff_fapl_id) < 0)
+ TEST_ERROR;
+ if (new_format) {
+ if (H5Pclose(new_ff_fapl_id) < 0)
+ TEST_ERROR;
+ }
+
+ /* Restore the default error handler (set in h5_reset()) */
+ h5_restore_err();
+
+ /*******************************************************************/
+ /* ENSURE THAT READING FROM DATASETS AND OPENING GROUPS WORKS */
+ /*******************************************************************/
+
+ HDputs("\nTesting reading data with with dynamic plugin filters:");
+
+ /* Close the library so that all loaded plugin libraries are unloaded */
+ h5_reset();
+ if ((old_ff_fapl_id = h5_fileaccess()) < 0)
+ TEST_ERROR;
+
+ /* Set the FAPL for the type of format */
+ if (new_format) {
+ /* Copy the file access property list and set the latest file format on it */
+ if ((new_ff_fapl_id = H5Pcopy(old_ff_fapl_id)) < 0)
+ TEST_ERROR;
+ if (H5Pset_libver_bounds(new_ff_fapl_id, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
+ TEST_ERROR;
+
+ my_fapl_id = new_ff_fapl_id;
+ }
+ else
+ my_fapl_id = old_ff_fapl_id;
+
+ /* Reopen the file for testing data reading */
+ if ((fid = H5Fopen(filename, H5F_ACC_RDONLY, my_fapl_id)) < 0)
+ TEST_ERROR;
+
+ /* Read the data with filters */
+ nerrors += (test_dataset_read_with_filters(fid) < 0 ? 1 : 0);
+
+ /* Test creating groups using dynamically-loaded plugin filters */
+ nerrors += (test_opening_groups_using_plugins(fid) < 0 ? 1 : 0);
+
+ /* Close FAPLs */
+ if (H5Pclose(old_ff_fapl_id) < 0)
+ TEST_ERROR;
+ if (new_format) {
+ if (H5Pclose(new_ff_fapl_id) < 0)
+ TEST_ERROR;
+ }
+
+ /* Restore the default error handler (set in h5_reset()) */
+ h5_restore_err();
+
+ /*******************************************************************/
+ /* ENSURE THAT DISABLING FILTER PLUGINS VIA THE FILTER FLAGS WORKS */
+ /*******************************************************************/
+
+ /* Close the library so that all loaded plugin libraries are unloaded */
+ h5_reset();
+ if ((old_ff_fapl_id = h5_fileaccess()) < 0)
+ TEST_ERROR;
+
+ /* Set the FAPL for the type of format */
+ if (new_format) {
+ /* Copy the file access property list and set the latest file format on it */
+ if ((new_ff_fapl_id = H5Pcopy(old_ff_fapl_id)) < 0)
+ TEST_ERROR;
+ if (H5Pset_libver_bounds(new_ff_fapl_id, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
+ TEST_ERROR;
+
+ my_fapl_id = new_ff_fapl_id;
+ }
+ else
+ my_fapl_id = old_ff_fapl_id;
+
+ /* Reopen the file for testing data reading */
+ if ((fid = H5Fopen(filename, H5F_ACC_RDONLY, my_fapl_id)) < 0)
+ TEST_ERROR;
+
+ /* When filters are disabled, make sure we can't read data from a
+ * dataset that requires a filter plugin.
+ */
+ nerrors += (test_no_read_when_plugins_disabled(fid) < 0 ? 1 : 0);
+
+ if (H5Fclose(fid) < 0)
+ TEST_ERROR;
+
+ /*********************/
+ /* CLEAN UP */
+ /*********************/
+ /* Close FAPLs */
+ if (new_format) {
+ if (H5Pclose(new_ff_fapl_id) < 0)
+ TEST_ERROR;
+ }
+ else {
+ /* Restore the default error handler (set in h5_reset()) */
+ h5_restore_err();
+
+ if (H5Pclose(old_ff_fapl_id) < 0)
+ TEST_ERROR;
+ }
+
+ /* Free up saved arrays */
+ free_2D_array(&orig_deflate_g);
+ free_2D_array(&orig_dynlib1_g);
+ free_2D_array(&orig_dynlib2_g);
+ free_2D_array(&orig_dynlib4_g);
+ } /* end for */
+
+ h5_cleanup(FILENAME, old_ff_fapl_id);
+
+ /************************************/
+ /* TEST THE FILTER PLUGIN API CALLS */
+ /************************************/
+
+ /* Test the APIs for access to the filter plugin path table */
+ nerrors += (test_path_api_calls() < 0 ? 1 : 0);
+
+ if (nerrors)
+ TEST_ERROR;
+
+ HDprintf("All plugin tests passed.\n");
+
+ HDexit(EXIT_SUCCESS);
+
+error:
+ H5E_BEGIN_TRY {
+ H5Fclose(fid);
+ H5Pclose(old_ff_fapl_id);
+ H5Pclose(new_ff_fapl_id);
+ } H5E_END_TRY
+
+ /* Free up saved arrays (NULLs okay) */
+ free_2D_array(&orig_deflate_g);
+ free_2D_array(&orig_dynlib1_g);
+ free_2D_array(&orig_dynlib2_g);
+ free_2D_array(&orig_dynlib4_g);
+
+ nerrors = MAX(1, nerrors);
+ HDprintf("***** %d PLUGIN TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S");
+ HDexit(EXIT_FAILURE);
+} /* end main() */
+
diff --git a/test/filter_plugin1_dsets.c b/test/filter_plugin1_dsets.c
new file mode 100644
index 0000000..b74e086
--- /dev/null
+++ b/test/filter_plugin1_dsets.c
@@ -0,0 +1,93 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * Purpose: Test dataset filter plugin for the filter_pluging.c test.
+ */
+
+
+#include <stdlib.h>
+#include <stdio.h>
+
+#include "H5PLextern.h"
+
+#define FILTER1_ID 257
+
+static size_t add_sub_value(unsigned int flags, size_t cd_nelmts,
+ const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf);
+
+/* Filter class struct */
+const H5Z_class2_t FILTER_INFO[1] = {{
+ H5Z_CLASS_T_VERS, /* H5Z_class_t version */
+ FILTER1_ID, /* Filter ID number */
+ 1, /* Encoding enabled */
+ 1, /* Decoding enabled */
+ "test filter plugin 1", /* Filter name for debugging */
+ NULL, /* The "can apply" callback */
+ NULL, /* The "set local" callback */
+ (H5Z_func_t)add_sub_value, /* The actual filter function */
+}};
+
+H5PL_type_t H5PLget_plugin_type(void) {return H5PL_TYPE_FILTER;}
+const void *H5PLget_plugin_info(void) {return FILTER_INFO;}
+
+
+/*-------------------------------------------------------------------------
+ * Function: add_sub_value
+ *
+ * Purpose: On write:
+ * Adds a caller-supplied value to the element
+ * On read:
+ * Subtracts a caller-supplied value from the element
+ *
+ * Return: Success: Data chunk size in bytes
+ * Failure: 0
+ *
+ *-------------------------------------------------------------------------
+ */
+static size_t
+add_sub_value(unsigned int flags, size_t cd_nelmts, const unsigned int *cd_values,
+ size_t nbytes, size_t *buf_size, void **buf)
+{
+ int *int_ptr = (int *)*buf; /* Pointer to the data values */
+ size_t buf_left = *buf_size; /* Amount of data buffer left to process */
+ int value = 0; /* Data value to add/subtract */
+
+ /* Check for the correct number of parameters */
+ if (0 == cd_nelmts)
+ return 0;
+
+ /* Check that permanent parameters are set correctly */
+ if (cd_values[0] > 9)
+ return 0;
+
+ value = (int)cd_values[0];
+
+ if (flags & H5Z_FLAG_REVERSE) {
+ /* READ - Substract the given value from all the data values */
+ while (buf_left > 0) {
+ *int_ptr++ -= value;
+ buf_left -= sizeof(int);
+ }
+ }
+ else {
+ /* WRITE - Add the given value to all the data values */
+ while (buf_left > 0) {
+ *int_ptr++ += value;
+ buf_left -= sizeof(int);
+ }
+ }
+
+ return nbytes;
+
+} /* end add_sub_value() */
+
diff --git a/test/filter_plugin2_dsets.c b/test/filter_plugin2_dsets.c
new file mode 100644
index 0000000..6a79148
--- /dev/null
+++ b/test/filter_plugin2_dsets.c
@@ -0,0 +1,88 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * Purpose: Test dataset filter plugin for the filter_pluging.c test.
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+
+#include "H5PLextern.h"
+
+#define FILTER2_ID 258
+#define MULTIPLIER 3
+
+static size_t mult_div_value(unsigned int flags, size_t cd_nelmts,
+ const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf);
+
+/* Filter class struct */
+const H5Z_class2_t FILTER_INFO[1] = {{
+ H5Z_CLASS_T_VERS, /* H5Z_class_t version */
+ FILTER2_ID, /* Filter ID number */
+ 1, /* Encoding enabled */
+ 1, /* Decoding enabled */
+ "test filter plugin 2", /* Filter name for debugging */
+ NULL, /* The "can apply" callback */
+ NULL, /* The "set local" callback */
+ (H5Z_func_t)mult_div_value, /* The actual filter function */
+}};
+
+H5PL_type_t H5PLget_plugin_type(void) {return H5PL_TYPE_FILTER;}
+const void *H5PLget_plugin_info(void) {return FILTER_INFO;}
+
+
+/*-------------------------------------------------------------------------
+ * Function: mult_div_value
+ *
+ * Purpose: On write:
+ * Multiplies an element by a constant value.
+ * On read:
+ * Divides an element by a constant value.
+ *
+ * Return: Success: Data chunk size in bytes
+ * Failure: 0
+ *
+ *-------------------------------------------------------------------------
+ */
+static size_t
+mult_div_value(unsigned int flags, size_t cd_nelmts,
+ const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf)
+{
+ int *int_ptr = (int *)*buf; /* Pointer to the data values */
+ size_t buf_left = *buf_size; /* Amount of data buffer left to process */
+
+ /* Check for the correct number of parameters */
+ if (cd_nelmts > 0)
+ return 0;
+
+ /* Assignment to eliminate unused parameter warning */
+ cd_values = cd_values;
+
+ if (flags & H5Z_FLAG_REVERSE) {
+ /* READ - Divide the original value by MULTIPLIER */
+ while (buf_left > 0) {
+ *int_ptr++ /= MULTIPLIER;
+ buf_left -= sizeof(int);
+ }
+ }
+ else {
+ /* WRITE - Multiply the original value by MULTIPLIER */
+ while (buf_left > 0) {
+ *int_ptr++ *= MULTIPLIER;
+ buf_left -= sizeof(int);
+ }
+ }
+
+ return nbytes;
+} /* end mult_div_value() */
+
diff --git a/test/filter_plugin3_dsets.c b/test/filter_plugin3_dsets.c
new file mode 100644
index 0000000..b43020f
--- /dev/null
+++ b/test/filter_plugin3_dsets.c
@@ -0,0 +1,119 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * Purpose: Test dataset filter plugin for the filter_pluging.c test.
+ * This filter makes an HDF5 API call to ensure that works correctly.
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+
+#include "H5PLextern.h"
+
+#define FILTER3_ID 259
+
+#define PUSH_ERR(func, minor, str) H5Epush2(H5E_DEFAULT, __FILE__, func, __LINE__, H5E_ERR_CLS, H5E_PLUGIN, minor, str)
+
+static size_t add_sub_value_hdf5(unsigned int flags, size_t cd_nelmts,
+ const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf);
+
+/* Filter class struct */
+const H5Z_class2_t FILTER_INFO[1] = {{
+ H5Z_CLASS_T_VERS, /* H5Z_class_t version */
+ FILTER3_ID, /* Filter ID number */
+ 1, /* Encoding enabled */
+ 1, /* Decoding enabled */
+ "test filter plugin 3", /* Filter name for debugging */
+ NULL, /* The "can apply" callback */
+ NULL, /* The "set local" callback */
+ (H5Z_func_t)add_sub_value_hdf5, /* The actual filter function */
+}};
+
+H5PL_type_t H5PLget_plugin_type(void) {return H5PL_TYPE_FILTER;}
+const void *H5PLget_plugin_info(void) {return FILTER_INFO;}
+
+
+/*-------------------------------------------------------------------------
+ * Function: add_sub_value_hdf5
+ *
+ * Purpose: On write:
+ * Adds a caller-supplied value to the element
+ * On read:
+ * Subtracts a caller-supplied value from the element
+ *
+ * NOTE: This filter is identical to filter #1 only it makes
+ * an HDF5 library call to ensure doing that doesn't
+ * cause problems.
+ *
+ * Return: Success: Data chunk size in bytes
+ * Failure: 0
+ *
+ *-------------------------------------------------------------------------
+ */
+static size_t
+add_sub_value_hdf5(unsigned int flags, size_t cd_nelmts, const unsigned int *cd_values,
+ size_t nbytes, size_t *buf_size, void **buf)
+{
+ int *int_ptr = (int *)*buf; /* Pointer to the data values */
+ size_t buf_left = *buf_size; /* Amount of data buffer left to process */
+ int value = 0; /* Data value to add/subtract */
+ unsigned majnum = 0; /* Output data from the HDF5 library call */
+ unsigned minnum = 0;
+ unsigned relnum = 0;
+
+ /* Check for the library version.
+ * We don't do anything with this information - it's just to ensure that
+ * HDF5 library calls work properly from inside filter plugins.
+ */
+ if (H5get_libversion(&majnum, &minnum, &relnum) < 0) {
+ PUSH_ERR("filter plugin 3", H5E_CALLBACK, "H5get_libversion");
+ return 0;
+ }
+
+ /* Check for the correct number of parameters */
+ if (cd_nelmts == 0)
+ return 0;
+
+ /* Check that permanent parameters are set correctly */
+ if (cd_values[0] > 9)
+ return 0;
+
+ /* Ensure that the version numbers match what was passed in.
+ * Again, this is trivial work, just to ensure that the library calls are
+ * working properly.
+ */
+ if (majnum != cd_values[1] || minnum != cd_values[2]) {
+ PUSH_ERR("filter plugin 3", H5E_CALLBACK, "library versions do not match");
+ return 0;
+ }
+
+ value = (int)cd_values[0];
+
+ if (flags & H5Z_FLAG_REVERSE) {
+ /* READ - Substract the given value from all the data values */
+ while (buf_left > 0) {
+ *int_ptr++ -= value;
+ buf_left -= sizeof(int);
+ }
+ }
+ else {
+ /* WRITE - Add the given value to all the data values */
+ while (buf_left > 0) {
+ *int_ptr++ += value;
+ buf_left -= sizeof(int);
+ }
+ }
+
+ return nbytes;
+} /* end add_sub_value_hdf5() */
+
diff --git a/test/filter_plugin4_groups.c b/test/filter_plugin4_groups.c
new file mode 100644
index 0000000..88ea20d
--- /dev/null
+++ b/test/filter_plugin4_groups.c
@@ -0,0 +1,106 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * Purpose: Test group filter plugin for the filter_pluging.c test.
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+#include "H5PLextern.h"
+
+#define FILTER4_ID 260
+#define SUFFIX_LEN 8
+#define GROUP_SUFFIX ".h5group"
+
+static size_t append_to_group_name(unsigned int flags, size_t cd_nelmts,
+ const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf);
+
+/* Filter class struct */
+const H5Z_class2_t FILTER_INFO[1] = {{
+ H5Z_CLASS_T_VERS, /* H5Z_class_t version */
+ FILTER4_ID, /* Filter ID number */
+ 1, /* Encoding enabled */
+ 1, /* Decoding enabled */
+ "test filter plugin 4", /* Filter name for debugging */
+ NULL, /* The "can apply" callback */
+ NULL, /* The "set local" callback */
+ (H5Z_func_t)append_to_group_name, /* The actual filter function */
+}};
+
+H5PL_type_t H5PLget_plugin_type(void) {return H5PL_TYPE_FILTER;}
+const void *H5PLget_plugin_info(void) {return FILTER_INFO;}
+
+
+/*-------------------------------------------------------------------------
+ * Function: append_to_group_name
+ *
+ * Purpose: On write:
+ * Appends the suffix ".h5group" to the group name
+ * On read:
+ * Removes the ".h5group" suffix from the group name
+ *
+ * Return: Success: Data size in bytes
+ * Failure: 0
+ *
+ *-------------------------------------------------------------------------
+ */
+static size_t
+append_to_group_name(unsigned int flags, size_t cd_nelmts,
+ const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf)
+{
+ size_t new_name_size = 0; /* Return value */
+
+ /* Check for the correct number of parameters */
+ if (cd_nelmts > 0)
+ return 0;
+
+ /* Assignment to eliminate unused parameter warning. */
+ cd_values = cd_values;
+
+ if (flags & H5Z_FLAG_REVERSE) {
+ /* READ - Remove the suffix from the group name */
+ new_name_size = *buf_size = nbytes - SUFFIX_LEN;
+ }
+ else {
+ /* WRITE - Append the suffix to the group name */
+ void *outbuf = NULL; /* Pointer to new buffer */
+ unsigned char *dst = NULL; /* Temporary pointer to destination buffer */
+
+ /* Get memory for the new, larger string buffer using the
+ * library's memory allocator.
+ */
+ if (NULL == (dst = (unsigned char *)(outbuf = H5allocate_memory(nbytes + SUFFIX_LEN, 0))))
+ return 0;
+
+ /* Copy raw data */
+ memcpy((void *)dst, (const void *)(*buf), nbytes);
+
+ /* Append suffix to raw data for storage */
+ dst += nbytes;
+ memcpy((void *)dst, (const void *)GROUP_SUFFIX, SUFFIX_LEN);
+
+ /* Free the passed-in buffer using the library's allocator */
+ H5free_memory(*buf);
+
+ /* Set return values */
+ *buf_size = nbytes + SUFFIX_LEN;
+ *buf = outbuf;
+ outbuf = NULL;
+ new_name_size = *buf_size;
+ }
+
+ return new_name_size;
+} /* append_to_group_name() */
+
diff --git a/test/flush1.c b/test/flush1.c
index 4f63093..bdbd731 100644
--- a/test/flush1.c
+++ b/test/flush1.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
diff --git a/test/flush2.c b/test/flush2.c
index ce3b3e7..9fdf6c1 100644
--- a/test/flush2.c
+++ b/test/flush2.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
diff --git a/test/flushrefresh.c b/test/flushrefresh.c
index e0a7484..0775dee 100644
--- a/test/flushrefresh.c
+++ b/test/flushrefresh.c
@@ -5,11 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
diff --git a/test/freespace.c b/test/freespace.c
index 2bf9111..33a6f89 100644
--- a/test/freespace.c
+++ b/test/freespace.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* Tests for free-space manager
@@ -25,6 +23,8 @@
/* Other private headers that this test requires */
#define H5F_FRIEND /*suppress error about including H5Fpkg */
#include "H5Fpkg.h"
+
+#include "H5CXprivate.h" /* API Contexts */
#include "H5Iprivate.h"
#include "H5VMprivate.h"
@@ -448,7 +448,6 @@ static unsigned
test_fs_create(hid_t fapl)
{
hid_t file = -1; /* File ID */
- hid_t dxpl_id = -1; /* dxpl ID (for tag) */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5FS_t *frsp = NULL; /* pointer to free space structure */
@@ -488,13 +487,10 @@ test_fs_create(hid_t fapl)
init_cparam(&cparam);
nclasses = NELMTS(test_classes);
- /* Create the dxpl and tag it with the global free space tag */
- if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
- FAIL_STACK_ERROR
- if(H5AC_tag(dxpl_id, H5AC__FREESPACE_TAG, NULL) < 0)
- FAIL_STACK_ERROR
+ /* Tag with the global free space tag */
+ H5AC_tag(H5AC__FREESPACE_TAG, NULL);
- if(NULL == (frsp = H5FS_create(f, dxpl_id, &fs_addr,
+ if(NULL == (frsp = H5FS_create(f, &fs_addr,
&cparam, nclasses, test_classes, &init_flags, (hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
FAIL_STACK_ERROR
@@ -514,12 +510,12 @@ test_fs_create(hid_t fapl)
FAIL_STACK_ERROR
/* Close the free space manager */
- if(H5FS_close(f, dxpl_id, frsp) < 0)
+ if(H5FS_close(f, frsp) < 0)
FAIL_STACK_ERROR
frsp = NULL;
/* reopen the free-space manager */
- if(NULL == (frsp = H5FS_open(f, dxpl_id, fs_addr,
+ if(NULL == (frsp = H5FS_open(f, fs_addr,
nclasses, test_classes, NULL, (hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
FAIL_STACK_ERROR
@@ -529,12 +525,12 @@ test_fs_create(hid_t fapl)
TEST_ERROR
/* Close the free space manager */
- if(H5FS_close(f, dxpl_id, frsp) < 0)
+ if(H5FS_close(f, frsp) < 0)
FAIL_STACK_ERROR
frsp = NULL;
/* Delete free space manager */
- if(H5FS_delete(f, dxpl_id, fs_addr) < 0)
+ if(H5FS_delete(f, fs_addr) < 0)
FAIL_STACK_ERROR
fs_addr = HADDR_UNDEF;
@@ -550,10 +546,6 @@ test_fs_create(hid_t fapl)
if(file_size != empty_size)
TEST_ERROR
- /* Close the dxpl */
- if(H5Pclose(dxpl_id) < 0)
- FAIL_STACK_ERROR;
-
PASSED()
return 0;
@@ -561,9 +553,8 @@ test_fs_create(hid_t fapl)
error:
H5E_BEGIN_TRY {
if(frsp)
- H5FS_close(f, dxpl_id, frsp);
+ H5FS_close(f, frsp);
H5Fclose(file);
- H5Pclose(dxpl_id);
} H5E_END_TRY;
return 1;
} /* test_fs_create() */
@@ -597,7 +588,6 @@ static unsigned
test_fs_sect_add(hid_t fapl)
{
hid_t file = -1; /* File ID */
- hid_t dxpl_id = -1; /* dxpl_id (for tag) */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5FS_t *frsp = NULL; /* pointer to free space structure */
@@ -638,13 +628,10 @@ test_fs_sect_add(hid_t fapl)
init_cparam(&cparam);
nclasses = NELMTS(test_classes);
- /* Create the dxpl and tag it with the global free space tag */
- if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
- FAIL_STACK_ERROR
- if(H5AC_tag(dxpl_id, H5AC__FREESPACE_TAG, NULL) < 0)
- FAIL_STACK_ERROR
+ /* Tag with the global free space tag */
+ H5AC_tag(H5AC__FREESPACE_TAG, NULL);
- if(NULL == (frsp = H5FS_create(f, dxpl_id, &fs_addr,
+ if(NULL == (frsp = H5FS_create(f, &fs_addr,
&cparam, nclasses, test_classes, &init_flags, (hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
FAIL_STACK_ERROR
@@ -656,7 +643,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, dxpl_id, frsp, (H5FS_section_info_t *)sect_node,
+ if(H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node,
H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR
@@ -671,7 +658,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, dxpl_id, frsp) < 0)
+ if(H5FS_close(f, frsp) < 0)
FAIL_STACK_ERROR
frsp = NULL;
@@ -706,7 +693,7 @@ test_fs_sect_add(hid_t fapl)
nclasses = NELMTS(test_classes);
init_flags = H5FS_CLS_GHOST_OBJ;
- if(NULL == (frsp = H5FS_create(f, dxpl_id, &fs_addr,
+ if(NULL == (frsp = H5FS_create(f, &fs_addr,
&cparam, nclasses, test_classes, &init_flags, (hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
FAIL_STACK_ERROR
@@ -719,7 +706,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, dxpl_id, frsp, (H5FS_section_info_t *)sect_node,
+ if(H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node,
0, NULL) < 0)
FAIL_STACK_ERROR
@@ -734,7 +721,7 @@ test_fs_sect_add(hid_t fapl)
fr_meta_size = H5FS_HEADER_SIZE(f);
/* Close the free space manager */
- if(H5FS_close(f, dxpl_id, frsp) < 0)
+ if(H5FS_close(f, frsp) < 0)
FAIL_STACK_ERROR
/* Close the file */
@@ -778,7 +765,7 @@ test_fs_sect_add(hid_t fapl)
nclasses = NELMTS(test_classes);
init_flags = 0;
- if(NULL == (frsp = H5FS_create(f, dxpl_id, &fs_addr,
+ if(NULL == (frsp = H5FS_create(f, &fs_addr,
&cparam, nclasses, test_classes, &init_flags, (hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
FAIL_STACK_ERROR
@@ -793,7 +780,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, dxpl_id, frsp, (H5FS_section_info_t *)sect_node,
+ if(H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node,
H5FS_ADD_RETURNED_SPACE, &can_shrink) < 0)
FAIL_STACK_ERROR
@@ -804,12 +791,12 @@ test_fs_sect_add(hid_t fapl)
TEST_ERROR
/* Close the free space manager */
- if(H5FS_close(f, dxpl_id, frsp) < 0)
+ if(H5FS_close(f, frsp) < 0)
FAIL_STACK_ERROR
frsp = NULL;
/* Delete free space manager */
- if(H5FS_delete(f, dxpl_id, fs_addr) < 0)
+ if(H5FS_delete(f, fs_addr) < 0)
FAIL_STACK_ERROR
fs_addr = HADDR_UNDEF;
@@ -847,7 +834,7 @@ test_fs_sect_add(hid_t fapl)
nclasses = NELMTS(test_classes);
init_flags = 0;
- if(NULL == (frsp = H5FS_create(f, dxpl_id, &fs_addr,
+ if(NULL == (frsp = H5FS_create(f, &fs_addr,
&cparam, nclasses, test_classes, &init_flags, (hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
FAIL_STACK_ERROR
@@ -862,7 +849,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, dxpl_id, frsp, (H5FS_section_info_t *)sect_node,
+ if(H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node,
H5FS_ADD_DESERIALIZING, &can_shrink) < 0)
FAIL_STACK_ERROR
@@ -874,7 +861,7 @@ test_fs_sect_add(hid_t fapl)
if(check_stats(f, frsp, &state))
TEST_ERROR
- if(H5FS_sect_remove(f, dxpl_id, frsp, (H5FS_section_info_t *)sect_node) < 0)
+ if(H5FS_sect_remove(f, frsp, (H5FS_section_info_t *)sect_node) < 0)
FAIL_STACK_ERROR
/* Free the section node(s) */
@@ -883,20 +870,18 @@ test_fs_sect_add(hid_t fapl)
sect_node = NULL;
/* Close the free space manager */
- if(H5FS_close(f, dxpl_id, frsp) < 0)
+ if(H5FS_close(f, frsp) < 0)
FAIL_STACK_ERROR
frsp = NULL;
/* Delete free space manager */
- if(H5FS_delete(f, dxpl_id, fs_addr) < 0)
+ if(H5FS_delete(f, fs_addr) < 0)
FAIL_STACK_ERROR
fs_addr = HADDR_UNDEF;
/* Close the file and dxpl */
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
- if(H5Pclose(dxpl_id) < 0)
- FAIL_STACK_ERROR
PASSED()
@@ -907,9 +892,8 @@ error:
if(sect_node)
TEST_sect_free((H5FS_section_info_t *)sect_node);
if(frsp)
- H5FS_close(f, dxpl_id, frsp);
+ H5FS_close(f, frsp);
H5Fclose(file);
- H5Pclose(dxpl_id);
} H5E_END_TRY;
return 1;
} /* test_fs_sect_add() */
@@ -939,7 +923,6 @@ static unsigned
test_fs_sect_find(hid_t fapl)
{
hid_t file = -1; /* File ID */
- hid_t dxpl_id = -1; /* dxpl ID (for tag) */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5FS_t *frsp = NULL; /* pointer to free space structure */
@@ -969,13 +952,10 @@ test_fs_sect_find(hid_t fapl)
init_cparam(&cparam);
nclasses = NELMTS(test_classes);
- /* Create the dxpl and tag it with the global free space tag */
- if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
- FAIL_STACK_ERROR
- if(H5AC_tag(dxpl_id, H5AC__FREESPACE_TAG, NULL) < 0)
- FAIL_STACK_ERROR
+ /* Tag with the global free space tag */
+ H5AC_tag(H5AC__FREESPACE_TAG, NULL);
- if(NULL == (frsp = H5FS_create(f, dxpl_id, &fs_addr,
+ if(NULL == (frsp = H5FS_create(f, &fs_addr,
&cparam, nclasses, test_classes, &init_flags, (hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
FAIL_STACK_ERROR
@@ -987,7 +967,7 @@ test_fs_sect_find(hid_t fapl)
if(check_stats(f, frsp, &state))
TEST_ERROR
- if((node_found = H5FS_sect_find(f, dxpl_id, frsp,
+ if((node_found = H5FS_sect_find(f, frsp,
(hsize_t)TEST_SECT_SIZE30, (H5FS_section_info_t **)&node)) < 0)
FAIL_STACK_ERROR
@@ -997,7 +977,7 @@ test_fs_sect_find(hid_t fapl)
TEST_ERROR
/* Close the free space manager */
- if(H5FS_close(f, dxpl_id, frsp) < 0)
+ if(H5FS_close(f, frsp) < 0)
FAIL_STACK_ERROR
frsp = NULL;
@@ -1006,7 +986,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, dxpl_id, fs_addr, nclasses,
+ if(NULL == (frsp = H5FS_open(f, fs_addr, nclasses,
test_classes, NULL, (hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
FAIL_STACK_ERROR
@@ -1023,7 +1003,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, dxpl_id, frsp, (H5FS_section_info_t *)sect_node1,
+ if(H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node1,
H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR
@@ -1044,7 +1024,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, dxpl_id, frsp, (H5FS_section_info_t *)sect_node3,
+ if(H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node3,
H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR
@@ -1063,7 +1043,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, dxpl_id, frsp, (H5FS_section_info_t *)sect_node2,
+ if(H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node2,
H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR
@@ -1082,7 +1062,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, dxpl_id, frsp, (H5FS_section_info_t *)sect_node4,
+ if(H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node4,
H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR
@@ -1093,7 +1073,7 @@ test_fs_sect_find(hid_t fapl)
if(check_stats(f, frsp, &state))
TEST_ERROR
- if((node_found = H5FS_sect_find(f, dxpl_id, frsp,
+ if((node_found = H5FS_sect_find(f, frsp,
(hsize_t)TEST_SECT_SIZE50, (H5FS_section_info_t **)&node)) < 0)
FAIL_STACK_ERROR
@@ -1106,11 +1086,11 @@ test_fs_sect_find(hid_t fapl)
TEST_ERROR
/* remove sections A, C and D */
- if(H5FS_sect_remove(f, dxpl_id, frsp, (H5FS_section_info_t *)sect_node1) < 0)
+ if(H5FS_sect_remove(f, frsp, (H5FS_section_info_t *)sect_node1) < 0)
FAIL_STACK_ERROR
- if(H5FS_sect_remove(f, dxpl_id, frsp, (H5FS_section_info_t *)sect_node3) < 0)
+ if(H5FS_sect_remove(f, frsp, (H5FS_section_info_t *)sect_node3) < 0)
FAIL_STACK_ERROR
- if(H5FS_sect_remove(f, dxpl_id, frsp, (H5FS_section_info_t *)sect_node4) < 0)
+ if(H5FS_sect_remove(f, frsp, (H5FS_section_info_t *)sect_node4) < 0)
FAIL_STACK_ERROR
/* Free the section node(s) */
@@ -1125,7 +1105,7 @@ test_fs_sect_find(hid_t fapl)
sect_node4 = NULL;
/* Close the free space manager */
- if(H5FS_close(f, dxpl_id, frsp) < 0)
+ if(H5FS_close(f, frsp) < 0)
FAIL_STACK_ERROR
frsp = NULL;
@@ -1134,7 +1114,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, dxpl_id, fs_addr, nclasses,
+ if(NULL == (frsp = H5FS_open(f, fs_addr, nclasses,
test_classes, NULL, (hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
FAIL_STACK_ERROR
@@ -1151,7 +1131,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, dxpl_id, frsp, (H5FS_section_info_t *)sect_node1,
+ if(H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node1,
H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR
@@ -1171,7 +1151,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, dxpl_id, frsp, (H5FS_section_info_t *)sect_node2,
+ if(H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node2,
H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR
@@ -1182,7 +1162,7 @@ test_fs_sect_find(hid_t fapl)
if(check_stats(f, frsp, &state))
TEST_ERROR
- if((node_found = H5FS_sect_find(f, dxpl_id, frsp,
+ if((node_found = H5FS_sect_find(f, frsp,
(hsize_t)TEST_SECT_SIZE50, (H5FS_section_info_t **)&node)) < 0)
FAIL_STACK_ERROR
@@ -1196,7 +1176,7 @@ test_fs_sect_find(hid_t fapl)
node = NULL;
/* remove sections A */
- if(H5FS_sect_remove(f, dxpl_id, frsp, (H5FS_section_info_t *)sect_node1) < 0)
+ if(H5FS_sect_remove(f, frsp, (H5FS_section_info_t *)sect_node1) < 0)
FAIL_STACK_ERROR
/* Free the section node(s) */
@@ -1205,7 +1185,7 @@ test_fs_sect_find(hid_t fapl)
sect_node1 = NULL;
/* Close the free space manager */
- if(H5FS_close(f, dxpl_id, frsp) < 0)
+ if(H5FS_close(f, frsp) < 0)
FAIL_STACK_ERROR
frsp = NULL;
@@ -1214,7 +1194,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, dxpl_id, fs_addr, nclasses,
+ if(NULL == (frsp = H5FS_open(f, fs_addr, nclasses,
test_classes, NULL, (hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
FAIL_STACK_ERROR
@@ -1231,7 +1211,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, dxpl_id, frsp, (H5FS_section_info_t *)sect_node1,
+ if(H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node1,
H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR
@@ -1243,14 +1223,14 @@ test_fs_sect_find(hid_t fapl)
if(check_stats(f, frsp, &state))
TEST_ERROR
- if((node_found = H5FS_sect_find(f, dxpl_id, frsp,
+ if((node_found = H5FS_sect_find(f, 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, dxpl_id, frsp, (H5FS_section_info_t *)sect_node1) < 0)
+ if(H5FS_sect_remove(f, frsp, (H5FS_section_info_t *)sect_node1) < 0)
FAIL_STACK_ERROR
/* Free the section node(s) */
@@ -1259,20 +1239,18 @@ test_fs_sect_find(hid_t fapl)
sect_node1 = NULL;
/* Close the free space manager */
- if(H5FS_close(f, dxpl_id, frsp) < 0)
+ if(H5FS_close(f, frsp) < 0)
FAIL_STACK_ERROR
frsp = NULL;
/* Delete free space manager */
- if(H5FS_delete(f, dxpl_id, fs_addr) < 0)
+ if(H5FS_delete(f, fs_addr) < 0)
FAIL_STACK_ERROR
fs_addr = HADDR_UNDEF;
/* Close the file and dxpl */
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
- if(H5Pclose(dxpl_id) < 0)
- FAIL_STACK_ERROR
PASSED()
@@ -1287,9 +1265,8 @@ error:
if(sect_node4)
TEST_sect_free((H5FS_section_info_t *)sect_node4);
if(frsp)
- H5FS_close(f, dxpl_id, frsp);
+ H5FS_close(f, frsp);
H5Fclose(file);
- H5Pclose(dxpl_id);
} H5E_END_TRY;
return 1;
} /* test_fs_sect_find() */
@@ -1331,7 +1308,6 @@ static unsigned
test_fs_sect_merge(hid_t fapl)
{
hid_t file = -1; /* File ID */
- hid_t dxpl_id = -1; /* dxpl ID (for tag) */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5FS_t *frsp = NULL; /* pointer to free space structure */
@@ -1364,13 +1340,10 @@ test_fs_sect_merge(hid_t fapl)
init_cparam(&cparam);
nclasses = NELMTS(test_classes);
- /* Create the dxpl and tag it with the global free space tag */
- if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
- FAIL_STACK_ERROR
- if(H5AC_tag(dxpl_id, H5AC__FREESPACE_TAG, NULL) < 0)
- FAIL_STACK_ERROR
+ /* Tag with the global free space tag */
+ H5AC_tag(H5AC__FREESPACE_TAG, NULL);
- if(NULL == (frsp = H5FS_create(f, dxpl_id, &fs_addr,
+ if(NULL == (frsp = H5FS_create(f, &fs_addr,
&cparam, nclasses, test_classes, &init_flags, (hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
FAIL_STACK_ERROR
@@ -1385,7 +1358,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, dxpl_id, frsp, (H5FS_section_info_t *)sect_node1,
+ if(H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node1,
H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR
@@ -1405,7 +1378,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, dxpl_id, frsp, (H5FS_section_info_t *)sect_node2,
+ if(H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node2,
H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR
@@ -1423,7 +1396,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, dxpl_id, frsp, (H5FS_section_info_t *)sect_node3,
+ if(H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node3,
H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR
@@ -1441,7 +1414,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, dxpl_id, frsp, (H5FS_section_info_t *)sect_node4,
+ if(H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node4,
H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR
@@ -1453,7 +1426,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, dxpl_id, frsp,
+ if((node_found = H5FS_sect_find(f, frsp,
(hsize_t)(TEST_SECT_SIZE10+TEST_SECT_SIZE30+TEST_SECT_SIZE50+TEST_SECT_SIZE80), (H5FS_section_info_t **)&node)) < 0)
FAIL_STACK_ERROR
@@ -1466,12 +1439,12 @@ test_fs_sect_merge(hid_t fapl)
TEST_ERROR
/* Close the free space manager */
- if(H5FS_close(f, dxpl_id, frsp) < 0)
+ if(H5FS_close(f, frsp) < 0)
FAIL_STACK_ERROR
frsp = NULL;
/* Delete free space manager */
- if(H5FS_delete(f, dxpl_id, fs_addr) < 0)
+ if(H5FS_delete(f, fs_addr) < 0)
FAIL_STACK_ERROR
fs_addr = HADDR_UNDEF;
@@ -1498,7 +1471,7 @@ test_fs_sect_merge(hid_t fapl)
nclasses = NELMTS(test_classes);
init_flags = H5FS_CLS_SEPAR_OBJ;
- if(NULL == (frsp = H5FS_create(f, dxpl_id, &fs_addr,
+ if(NULL == (frsp = H5FS_create(f, &fs_addr,
&cparam, nclasses, test_classes, &init_flags, (hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
FAIL_STACK_ERROR
@@ -1513,7 +1486,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, dxpl_id, frsp, (H5FS_section_info_t *)sect_node1,
+ if(H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node1,
H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR
@@ -1533,7 +1506,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, dxpl_id, frsp, (H5FS_section_info_t *)sect_node2,
+ if(H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node2,
H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR
@@ -1546,17 +1519,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, dxpl_id, frsp,
+ if((node_found = H5FS_sect_find(f, 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, dxpl_id, frsp, (H5FS_section_info_t *)sect_node1) < 0)
+ if(H5FS_sect_remove(f, frsp, (H5FS_section_info_t *)sect_node1) < 0)
FAIL_STACK_ERROR
/* remove section B from free-space */
- if(H5FS_sect_remove(f, dxpl_id, frsp, (H5FS_section_info_t *)sect_node2) < 0)
+ if(H5FS_sect_remove(f, frsp, (H5FS_section_info_t *)sect_node2) < 0)
FAIL_STACK_ERROR
/* Free the section node(s) */
@@ -1568,12 +1541,12 @@ test_fs_sect_merge(hid_t fapl)
sect_node2 = NULL;
/* Close the free space manager */
- if(H5FS_close(f, dxpl_id, frsp) < 0)
+ if(H5FS_close(f, frsp) < 0)
FAIL_STACK_ERROR
frsp = NULL;
/* Delete free space manager */
- if(H5FS_delete(f, dxpl_id, fs_addr) < 0)
+ if(H5FS_delete(f, fs_addr) < 0)
FAIL_STACK_ERROR
fs_addr = HADDR_UNDEF;
@@ -1600,7 +1573,7 @@ test_fs_sect_merge(hid_t fapl)
nclasses = NELMTS(test_classes);
init_flags = 0; /* reset */
- if(NULL == (frsp = H5FS_create(f, dxpl_id, &fs_addr,
+ if(NULL == (frsp = H5FS_create(f, &fs_addr,
&cparam, nclasses, test_classes, &init_flags, (hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
FAIL_STACK_ERROR
@@ -1615,7 +1588,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, dxpl_id, frsp, (H5FS_section_info_t *)sect_node1,
+ if(H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node1,
H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR
@@ -1635,7 +1608,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, dxpl_id, frsp, (H5FS_section_info_t *)sect_node2,
+ if(H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node2,
H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR
@@ -1655,7 +1628,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, dxpl_id, frsp, (H5FS_section_info_t *)sect_node3,
+ if(H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node3,
H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR
@@ -1673,7 +1646,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, dxpl_id, frsp, (H5FS_section_info_t *)sect_node4,
+ if(H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node4,
H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR
@@ -1689,14 +1662,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, dxpl_id, frsp,
+ if((node_found = H5FS_sect_find(f, 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, dxpl_id, frsp,
+ if((node_found = H5FS_sect_find(f, frsp,
(hsize_t)(TEST_SECT_SIZE30+TEST_SECT_SIZE50), (H5FS_section_info_t **)&node)) < 0)
FAIL_STACK_ERROR
@@ -1710,7 +1683,7 @@ test_fs_sect_merge(hid_t fapl)
TEST_ERROR
/* should be able to find section A */
- if((node_found = H5FS_sect_find(f, dxpl_id, frsp,
+ if((node_found = H5FS_sect_find(f, frsp,
(hsize_t)(TEST_SECT_SIZE10), (H5FS_section_info_t **)&node)) < 0)
FAIL_STACK_ERROR
@@ -1723,7 +1696,7 @@ test_fs_sect_merge(hid_t fapl)
TEST_ERROR
/* should be able to find section D */
- if((node_found = H5FS_sect_find(f, dxpl_id, frsp,
+ if((node_found = H5FS_sect_find(f, frsp,
(hsize_t)(TEST_SECT_SIZE80), (H5FS_section_info_t **)&node)) < 0)
FAIL_STACK_ERROR
@@ -1736,20 +1709,18 @@ test_fs_sect_merge(hid_t fapl)
TEST_ERROR
/* Close the free space manager */
- if(H5FS_close(f, dxpl_id, frsp) < 0)
+ if(H5FS_close(f, frsp) < 0)
FAIL_STACK_ERROR
frsp = NULL;
/* Delete free space manager */
- if(H5FS_delete(f, dxpl_id, fs_addr) < 0)
+ if(H5FS_delete(f, fs_addr) < 0)
FAIL_STACK_ERROR
fs_addr = HADDR_UNDEF;
- /* Close the file and dxpl */
+ /* Close the file */
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
- if(H5Pclose(dxpl_id) < 0)
- FAIL_STACK_ERROR
PASSED()
@@ -1762,8 +1733,7 @@ error:
if(sect_node2)
TEST_sect_free((H5FS_section_info_t *)sect_node2);
if(frsp)
- H5FS_close(f, dxpl_id, frsp);
- H5Pclose(dxpl_id);
+ H5FS_close(f, frsp);
H5Fclose(file);
} H5E_END_TRY;
return 1;
@@ -1807,7 +1777,6 @@ static unsigned
test_fs_sect_shrink(hid_t fapl)
{
hid_t file = -1; /* File ID */
- hid_t dxpl_id = -1; /* dxpl ID (for tag) */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5FS_t *frsp = NULL; /* pointer to free space structure */
@@ -1840,13 +1809,10 @@ test_fs_sect_shrink(hid_t fapl)
TEST_set_eoa((haddr_t)TEST_SECT_ADDR150); /* set end of file address for shrinking */
- /* Create the dxpl and tag it with the global free space tag */
- if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
- FAIL_STACK_ERROR
- if(H5AC_tag(dxpl_id, H5AC__FREESPACE_TAG, NULL) < 0)
- FAIL_STACK_ERROR
+ /* Tag with the global free space tag */
+ H5AC_tag(H5AC__FREESPACE_TAG, NULL);
- if(NULL == (frsp = H5FS_create(f, dxpl_id, &fs_addr,
+ if(NULL == (frsp = H5FS_create(f, &fs_addr,
&cparam, nclasses, test_classes, &init_flags, (hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
FAIL_STACK_ERROR
@@ -1862,7 +1828,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, dxpl_id, frsp, (H5FS_section_info_t *)sect_node1,
+ if(H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node1,
H5FS_ADD_RETURNED_SPACE, &can_shrink) < 0)
FAIL_STACK_ERROR
@@ -1875,7 +1841,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, dxpl_id, frsp,
+ if((node_found = H5FS_sect_find(f, frsp,
(hsize_t)(TEST_SECT_SIZE50), (H5FS_section_info_t **)&node)) < 0)
FAIL_STACK_ERROR
@@ -1896,7 +1862,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, dxpl_id, frsp, (H5FS_section_info_t *)sect_node1,
+ if(H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node1,
H5FS_ADD_RETURNED_SPACE, &can_shrink) < 0)
FAIL_STACK_ERROR
@@ -1907,19 +1873,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, dxpl_id, frsp,
+ if((node_found = H5FS_sect_find(f, 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, dxpl_id, frsp) < 0)
+ if(H5FS_close(f, frsp) < 0)
FAIL_STACK_ERROR
frsp = NULL;
/* Delete free space manager */
- if(H5FS_delete(f, dxpl_id, fs_addr) < 0)
+ if(H5FS_delete(f, fs_addr) < 0)
FAIL_STACK_ERROR
fs_addr = HADDR_UNDEF;
@@ -1947,7 +1913,7 @@ test_fs_sect_shrink(hid_t fapl)
/* does not allow merging */
init_flags = H5FS_CLS_SEPAR_OBJ;
- if(NULL == (frsp = H5FS_create(f, dxpl_id, &fs_addr,
+ if(NULL == (frsp = H5FS_create(f, &fs_addr,
&cparam, nclasses, test_classes, &init_flags, (hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
FAIL_STACK_ERROR
@@ -1962,7 +1928,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, dxpl_id, frsp, (H5FS_section_info_t *)sect_node1,
+ if(H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node1,
H5FS_ADD_RETURNED_SPACE, &can_shrink) < 0)
FAIL_STACK_ERROR
@@ -1982,7 +1948,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, dxpl_id, frsp, (H5FS_section_info_t *)sect_node2,
+ if(H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node2,
H5FS_ADD_RETURNED_SPACE, &can_shrink) < 0)
FAIL_STACK_ERROR
@@ -1991,7 +1957,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, dxpl_id, frsp,
+ if((node_found = H5FS_sect_find(f, frsp,
(hsize_t)(TEST_SECT_SIZE50), (H5FS_section_info_t **)&node)) < 0)
FAIL_STACK_ERROR
@@ -2003,7 +1969,7 @@ test_fs_sect_shrink(hid_t fapl)
/* section A should still be there in free-space */
- if((node_found = H5FS_sect_find(f, dxpl_id, frsp,
+ if((node_found = H5FS_sect_find(f, frsp,
(hsize_t)(TEST_SECT_SIZE20), (H5FS_section_info_t **)&node)) < 0)
FAIL_STACK_ERROR
@@ -2016,12 +1982,12 @@ test_fs_sect_shrink(hid_t fapl)
TEST_ERROR
/* Close the free space manager */
- if(H5FS_close(f, dxpl_id, frsp) < 0)
+ if(H5FS_close(f, frsp) < 0)
FAIL_STACK_ERROR
frsp = NULL;
/* Delete free space manager */
- if(H5FS_delete(f, dxpl_id, fs_addr) < 0)
+ if(H5FS_delete(f, fs_addr) < 0)
FAIL_STACK_ERROR
fs_addr = HADDR_UNDEF;
@@ -2047,7 +2013,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, dxpl_id, &fs_addr,
+ if(NULL == (frsp = H5FS_create(f, &fs_addr,
&cparam, nclasses, test_classes, &init_flags, (hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
FAIL_STACK_ERROR
@@ -2062,7 +2028,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, dxpl_id, frsp, (H5FS_section_info_t *)sect_node1,
+ if(H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node1,
H5FS_ADD_RETURNED_SPACE, &can_shrink) < 0)
FAIL_STACK_ERROR
@@ -2082,7 +2048,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, dxpl_id, frsp, (H5FS_section_info_t *)sect_node2,
+ if(H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node2,
H5FS_ADD_RETURNED_SPACE, &can_shrink) < 0)
FAIL_STACK_ERROR
@@ -2092,7 +2058,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, dxpl_id, frsp,
+ if((node_found = H5FS_sect_find(f, frsp,
(hsize_t)(TEST_SECT_SIZE50), (H5FS_section_info_t **)&node)) < 0)
FAIL_STACK_ERROR
@@ -2100,27 +2066,25 @@ 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, dxpl_id, frsp,
+ if((node_found = H5FS_sect_find(f, 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, dxpl_id, frsp) < 0)
+ if(H5FS_close(f, frsp) < 0)
FAIL_STACK_ERROR
frsp = NULL;
/* Delete free space manager */
- if(H5FS_delete(f, dxpl_id, fs_addr) < 0)
+ if(H5FS_delete(f, fs_addr) < 0)
FAIL_STACK_ERROR
fs_addr = HADDR_UNDEF;
/* Close the file and dxpl */
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
- if(H5Pclose(dxpl_id) < 0)
- FAIL_STACK_ERROR
PASSED()
@@ -2129,9 +2093,8 @@ test_fs_sect_shrink(hid_t fapl)
error:
H5E_BEGIN_TRY {
if(frsp)
- H5FS_close(f, dxpl_id, frsp);
+ H5FS_close(f, frsp);
H5Fclose(file);
- H5Pclose(dxpl_id);
} H5E_END_TRY;
return 1;
} /* test_sect_shrink() */
@@ -2157,7 +2120,6 @@ static unsigned
test_fs_sect_change_class(hid_t fapl)
{
hid_t file = -1; /* File ID */
- hid_t dxpl_id = -1; /* dxpl ID (for tag) */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5FS_t *frsp = NULL; /* pointer to free space structure */
@@ -2186,14 +2148,11 @@ test_fs_sect_change_class(hid_t fapl)
init_cparam(&cparam);
nclasses = NELMTS(test_classes);
- /* Create the dxpl and tag it with the global free space tag */
- if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
- FAIL_STACK_ERROR
- if(H5AC_tag(dxpl_id, H5AC__FREESPACE_TAG, NULL) < 0)
- FAIL_STACK_ERROR
+ /* Tag with the global free space tag */
+ H5AC_tag(H5AC__FREESPACE_TAG, NULL);
init_flags = H5FS_CLS_GHOST_OBJ;
- if(NULL == (frsp = H5FS_create(f, dxpl_id, &fs_addr,
+ if(NULL == (frsp = H5FS_create(f, &fs_addr,
&cparam, nclasses, test_classes, &init_flags, (hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
FAIL_STACK_ERROR
@@ -2208,7 +2167,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, dxpl_id, frsp, (H5FS_section_info_t *)sect_node1,
+ if(H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node1,
H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR
@@ -2228,7 +2187,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, dxpl_id, frsp, (H5FS_section_info_t *)sect_node2,
+ if(H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node2,
H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR
@@ -2239,7 +2198,7 @@ test_fs_sect_change_class(hid_t fapl)
if(check_stats(f, frsp, &state))
TEST_ERROR
- if (H5FS_sect_change_class(f, dxpl_id, frsp, (H5FS_section_info_t *)sect_node1,
+ if (H5FS_sect_change_class(f, frsp, (H5FS_section_info_t *)sect_node1,
TEST_FSPACE_SECT_TYPE_NONE) < 0)
TEST_ERROR
@@ -2248,7 +2207,7 @@ test_fs_sect_change_class(hid_t fapl)
if(check_stats(f, frsp, &state))
TEST_ERROR
- if(H5FS_sect_find(f, dxpl_id, frsp,
+ if(H5FS_sect_find(f, frsp,
(hsize_t)TEST_SECT_SIZE30, (H5FS_section_info_t **)&node) < 0)
FAIL_STACK_ERROR
@@ -2258,7 +2217,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, dxpl_id, frsp, (H5FS_section_info_t *)sect_node2) < 0)
+ if(H5FS_sect_remove(f, frsp, (H5FS_section_info_t *)sect_node2) < 0)
FAIL_STACK_ERROR
/* Free the section node(s) */
@@ -2267,12 +2226,12 @@ test_fs_sect_change_class(hid_t fapl)
sect_node2 = NULL;
/* Close the free space manager */
- if(H5FS_close(f, dxpl_id, frsp) < 0)
+ if(H5FS_close(f, frsp) < 0)
FAIL_STACK_ERROR
frsp = NULL;
/* Delete free space manager */
- if(H5FS_delete(f, dxpl_id, fs_addr) < 0)
+ if(H5FS_delete(f, fs_addr) < 0)
FAIL_STACK_ERROR
fs_addr = HADDR_UNDEF;
@@ -2299,7 +2258,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, dxpl_id, &fs_addr,
+ if(NULL == (frsp = H5FS_create(f, &fs_addr,
&cparam, nclasses, test_classes, &init_flags, (hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
FAIL_STACK_ERROR
@@ -2314,7 +2273,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, dxpl_id, frsp, (H5FS_section_info_t *)sect_node1,
+ if(H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node1,
H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR
@@ -2326,7 +2285,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, dxpl_id, frsp, (H5FS_section_info_t *)sect_node2,
+ if(H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node2,
H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR
@@ -2338,17 +2297,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, dxpl_id, frsp, (H5FS_section_info_t *)sect_node3,
+ if(H5FS_sect_add(f, 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, dxpl_id, frsp, (H5FS_section_info_t *)sect_node2,
+ if (H5FS_sect_change_class(f, 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, dxpl_id, frsp, (H5FS_section_info_t *)sect_node3,
+ if (H5FS_sect_change_class(f, frsp, (H5FS_section_info_t *)sect_node3,
TEST_FSPACE_SECT_TYPE) < 0)
TEST_ERROR
@@ -2358,7 +2317,7 @@ test_fs_sect_change_class(hid_t fapl)
TEST_ERROR
/* verify that section B has changed class */
- if(H5FS_sect_find(f, dxpl_id, frsp,
+ if(H5FS_sect_find(f, frsp,
(hsize_t)TEST_SECT_SIZE50, (H5FS_section_info_t **)&node) < 0)
FAIL_STACK_ERROR
@@ -2369,7 +2328,7 @@ test_fs_sect_change_class(hid_t fapl)
TEST_ERROR
/* verify that section C has changed class */
- if(H5FS_sect_find(f, dxpl_id, frsp,
+ if(H5FS_sect_find(f, frsp,
(hsize_t)TEST_SECT_SIZE80, (H5FS_section_info_t **)&node) < 0)
FAIL_STACK_ERROR
@@ -2380,7 +2339,7 @@ test_fs_sect_change_class(hid_t fapl)
TEST_ERROR
/* remove section A from free-space */
- if(H5FS_sect_remove(f, dxpl_id, frsp, (H5FS_section_info_t *)sect_node1) < 0)
+ if(H5FS_sect_remove(f, frsp, (H5FS_section_info_t *)sect_node1) < 0)
FAIL_STACK_ERROR
/* Free the section node(s) */
@@ -2389,20 +2348,18 @@ test_fs_sect_change_class(hid_t fapl)
sect_node1 = NULL;
/* Close the free space manager */
- if(H5FS_close(f, dxpl_id, frsp) < 0)
+ if(H5FS_close(f, frsp) < 0)
FAIL_STACK_ERROR
frsp = NULL;
/* Delete free space manager */
- if(H5FS_delete(f, dxpl_id, fs_addr) < 0)
+ if(H5FS_delete(f, fs_addr) < 0)
FAIL_STACK_ERROR
fs_addr = HADDR_UNDEF;
/* Close the file and dxpl */
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
- if(H5Pclose(dxpl_id) < 0)
- FAIL_STACK_ERROR
PASSED()
@@ -2415,9 +2372,8 @@ error:
if(sect_node2)
TEST_sect_free((H5FS_section_info_t *)sect_node2);
if(frsp)
- H5FS_close(f, dxpl_id, frsp);
+ H5FS_close(f, frsp);
H5Fclose(file);
- H5Pclose(dxpl_id);
} H5E_END_TRY;
return 1;
} /* test_sect_change_class() */
@@ -2457,7 +2413,6 @@ static unsigned
test_fs_sect_extend(hid_t fapl)
{
hid_t file = -1; /* File ID */
- hid_t dxpl_id = -1; /* dxpl ID (for tag) */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5FS_t *frsp = NULL; /* pointer to free space structure */
@@ -2481,11 +2436,8 @@ test_fs_sect_extend(hid_t fapl)
if(NULL == (f = (H5F_t *)H5I_object(file)))
FAIL_STACK_ERROR
- /* Create the dxpl and tag it with the global free space tag */
- if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
- FAIL_STACK_ERROR
- if(H5AC_tag(dxpl_id, H5AC__FREESPACE_TAG, NULL) < 0)
- FAIL_STACK_ERROR
+ /* Tag with the global free space tag */
+ H5AC_tag(H5AC__FREESPACE_TAG, NULL);
/*
* TEST 1
@@ -2493,7 +2445,7 @@ test_fs_sect_extend(hid_t fapl)
init_cparam(&cparam);
nclasses = NELMTS(test_classes);
- if(NULL == (frsp = H5FS_create(f, dxpl_id, &fs_addr,
+ if(NULL == (frsp = H5FS_create(f, &fs_addr,
&cparam, nclasses, test_classes, &init_flags, (hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
FAIL_STACK_ERROR
@@ -2508,7 +2460,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, dxpl_id, frsp, (H5FS_section_info_t *)sect_node1,
+ if(H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node1,
H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR
@@ -2528,7 +2480,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, dxpl_id, frsp, (H5FS_section_info_t *)sect_node2,
+ if(H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node2,
H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR
@@ -2540,7 +2492,7 @@ test_fs_sect_extend(hid_t fapl)
TEST_ERROR
/* Extend a block by requested-size */
- if((status = H5FS_sect_try_extend(f, dxpl_id, frsp, (haddr_t)TEST_SECT_SIZE80, (hsize_t)TEST_SECT_SIZE20, (hsize_t)TEST_SECT_SIZE40, 0, NULL)) < 0)
+ if((status = H5FS_sect_try_extend(f, frsp, (haddr_t)TEST_SECT_SIZE80, (hsize_t)TEST_SECT_SIZE20, (hsize_t)TEST_SECT_SIZE40, 0, NULL)) < 0)
FAIL_STACK_ERROR
if(FALSE == status)
TEST_ERROR
@@ -2553,12 +2505,12 @@ test_fs_sect_extend(hid_t fapl)
TEST_ERROR
/* Close the free space manager */
- if(H5FS_close(f, dxpl_id, frsp) < 0)
+ if(H5FS_close(f, frsp) < 0)
FAIL_STACK_ERROR
frsp = NULL;
/* Delete free space manager */
- if(H5FS_delete(f, dxpl_id, fs_addr) < 0)
+ if(H5FS_delete(f, fs_addr) < 0)
FAIL_STACK_ERROR
fs_addr = HADDR_UNDEF;
@@ -2569,7 +2521,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, dxpl_id, &fs_addr,
+ if(NULL == (frsp = H5FS_create(f, &fs_addr,
&cparam, nclasses, test_classes, &init_flags, (hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
FAIL_STACK_ERROR
@@ -2584,7 +2536,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, dxpl_id, frsp, (H5FS_section_info_t *)sect_node1,
+ if(H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node1,
H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR
@@ -2604,7 +2556,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, dxpl_id, frsp, (H5FS_section_info_t *)sect_node2,
+ if(H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node2,
H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR
@@ -2616,7 +2568,7 @@ test_fs_sect_extend(hid_t fapl)
TEST_ERROR
/* Extend the block by requested-size */
- if((status = H5FS_sect_try_extend(f, dxpl_id, frsp, (haddr_t)TEST_SECT_ADDR80, (hsize_t)TEST_SECT_SIZE20, (hsize_t)TEST_SECT_SIZE50, 0, NULL)) < 0)
+ if((status = H5FS_sect_try_extend(f, frsp, (haddr_t)TEST_SECT_ADDR80, (hsize_t)TEST_SECT_SIZE20, (hsize_t)TEST_SECT_SIZE50, 0, NULL)) < 0)
FAIL_STACK_ERROR
if(TRUE == status)
TEST_ERROR
@@ -2626,12 +2578,12 @@ test_fs_sect_extend(hid_t fapl)
TEST_ERROR
/* Close the free space manager */
- if(H5FS_close(f, dxpl_id, frsp) < 0)
+ if(H5FS_close(f, frsp) < 0)
FAIL_STACK_ERROR
frsp = NULL;
/* Delete free space manager */
- if(H5FS_delete(f, dxpl_id, fs_addr) < 0)
+ if(H5FS_delete(f, fs_addr) < 0)
FAIL_STACK_ERROR
fs_addr = HADDR_UNDEF;
@@ -2642,7 +2594,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, dxpl_id, &fs_addr,
+ if(NULL == (frsp = H5FS_create(f, &fs_addr,
&cparam, nclasses, test_classes, &init_flags, (hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
FAIL_STACK_ERROR
@@ -2657,7 +2609,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, dxpl_id, frsp, (H5FS_section_info_t *)sect_node1,
+ if(H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node1,
H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR
@@ -2677,7 +2629,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, dxpl_id, frsp, (H5FS_section_info_t *)sect_node2,
+ if(H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node2,
H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR
@@ -2689,7 +2641,7 @@ test_fs_sect_extend(hid_t fapl)
TEST_ERROR
/* Extend the block by requested-size */
- if((status = H5FS_sect_try_extend(f, dxpl_id, frsp, (haddr_t)TEST_SECT_ADDR80, (hsize_t)TEST_SECT_SIZE20, (hsize_t)TEST_SECT_SIZE30, 0, NULL)) < 0)
+ if((status = H5FS_sect_try_extend(f, frsp, (haddr_t)TEST_SECT_ADDR80, (hsize_t)TEST_SECT_SIZE20, (hsize_t)TEST_SECT_SIZE30, 0, NULL)) < 0)
TEST_ERROR
if(FALSE == status)
TEST_ERROR
@@ -2700,12 +2652,12 @@ test_fs_sect_extend(hid_t fapl)
TEST_ERROR
/* Close the free space manager */
- if(H5FS_close(f, dxpl_id, frsp) < 0)
+ if(H5FS_close(f, frsp) < 0)
FAIL_STACK_ERROR
frsp = NULL;
/* Delete free space manager */
- if(H5FS_delete(f, dxpl_id, fs_addr) < 0)
+ if(H5FS_delete(f, fs_addr) < 0)
FAIL_STACK_ERROR
fs_addr = HADDR_UNDEF;
@@ -2716,7 +2668,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, dxpl_id, &fs_addr,
+ if(NULL == (frsp = H5FS_create(f, &fs_addr,
&cparam, nclasses, test_classes, &init_flags, (hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
FAIL_STACK_ERROR
@@ -2731,7 +2683,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, dxpl_id, frsp, (H5FS_section_info_t *)sect_node1,
+ if(H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node1,
H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR
@@ -2751,7 +2703,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, dxpl_id, frsp, (H5FS_section_info_t *)sect_node2,
+ if(H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node2,
H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR
@@ -2763,7 +2715,7 @@ test_fs_sect_extend(hid_t fapl)
TEST_ERROR
/* Extend the block by requested-size */
- if((status = H5FS_sect_try_extend(f, dxpl_id, frsp, (haddr_t)TEST_SECT_ADDR80, (hsize_t)TEST_SECT_SIZE15, (hsize_t)TEST_SECT_SIZE40, 0, NULL)) < 0)
+ if((status = H5FS_sect_try_extend(f, frsp, (haddr_t)TEST_SECT_ADDR80, (hsize_t)TEST_SECT_SIZE15, (hsize_t)TEST_SECT_SIZE40, 0, NULL)) < 0)
TEST_ERROR
if(TRUE == status)
TEST_ERROR
@@ -2773,12 +2725,12 @@ test_fs_sect_extend(hid_t fapl)
TEST_ERROR
/* Close the free space manager */
- if(H5FS_close(f, dxpl_id, frsp) < 0)
+ if(H5FS_close(f, frsp) < 0)
FAIL_STACK_ERROR
frsp = NULL;
/* Delete free space manager */
- if(H5FS_delete(f, dxpl_id, fs_addr) < 0)
+ if(H5FS_delete(f, fs_addr) < 0)
FAIL_STACK_ERROR
fs_addr = HADDR_UNDEF;
@@ -2787,17 +2739,14 @@ test_fs_sect_extend(hid_t fapl)
/* Close the file and dxpl */
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
- if(H5Pclose(dxpl_id) < 0)
- FAIL_STACK_ERROR
return 0;
error:
H5E_BEGIN_TRY {
if(frsp)
- H5FS_close(f, dxpl_id, frsp);
+ H5FS_close(f, frsp);
H5Fclose(file);
- H5Pclose(dxpl_id);
} H5E_END_TRY;
return 1;
} /* test_sect_extend() */
@@ -2815,7 +2764,6 @@ static unsigned
test_fs_sect_iterate(hid_t fapl)
{
hid_t file = -1; /* File ID */
- hid_t dxpl_id = -1; /* dxpl ID (for tag) */
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t *f = NULL; /* Internal file object pointer */
H5FS_t *frsp = NULL; /* pointer to free space structure */
@@ -2847,14 +2795,11 @@ test_fs_sect_iterate(hid_t fapl)
udata.tot_size = 0;
udata.tot_sect_count = 0;
- /* Create the dxpl and tag it with the global free space tag */
- if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
- FAIL_STACK_ERROR
- if(H5AC_tag(dxpl_id, H5AC__FREESPACE_TAG, NULL) < 0)
- FAIL_STACK_ERROR
+ /* Tag with the global free space tag */
+ H5AC_tag(H5AC__FREESPACE_TAG, NULL);
init_flags = H5FS_CLS_SEPAR_OBJ;
- if(NULL == (frsp = H5FS_create(f, dxpl_id, &fs_addr,
+ if(NULL == (frsp = H5FS_create(f, &fs_addr,
&cparam, nclasses, test_classes, &init_flags, (hsize_t)FSPACE_THRHD_DEF, (hsize_t)FSPACE_ALIGN_DEF)))
FAIL_STACK_ERROR
@@ -2868,12 +2813,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, dxpl_id, frsp, (H5FS_section_info_t *)sect_node,
+ if(H5FS_sect_add(f, frsp, (H5FS_section_info_t *)sect_node,
H5FS_ADD_RETURNED_SPACE, NULL) < 0)
FAIL_STACK_ERROR
} /* end for */
- if(H5FS_sect_iterate(f, dxpl_id, frsp, TEST_sects_cb, &udata) < 0)
+ if(H5FS_sect_iterate(f, frsp, TEST_sects_cb, &udata) < 0)
TEST_ERROR
H5FS_sect_stats(frsp, &tot_space, &nsects);
@@ -2884,20 +2829,18 @@ test_fs_sect_iterate(hid_t fapl)
TEST_ERROR
/* Close the free space manager */
- if(H5FS_close(f, dxpl_id, frsp) < 0)
+ if(H5FS_close(f, frsp) < 0)
FAIL_STACK_ERROR
frsp = NULL;
/* Delete free space manager */
- if(H5FS_delete(f, dxpl_id, fs_addr) < 0)
+ if(H5FS_delete(f, fs_addr) < 0)
FAIL_STACK_ERROR
fs_addr = HADDR_UNDEF;
/* Close the file and dxpl */
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
- if(H5Pclose(dxpl_id) < 0)
- FAIL_STACK_ERROR
PASSED()
@@ -2906,9 +2849,8 @@ test_fs_sect_iterate(hid_t fapl)
error:
H5E_BEGIN_TRY {
if(frsp)
- H5FS_close(f, dxpl_id, frsp);
+ H5FS_close(f, frsp);
H5Fclose(file);
- H5Pclose(dxpl_id);
} H5E_END_TRY;
return 1;
} /* test_fs_sect_iterate() */
@@ -2920,6 +2862,7 @@ main(void)
hid_t fapl = -1; /* File access property list for data files */
unsigned nerrors = 0; /* Cumulative error count */
const char *env_h5_drvr = NULL; /* File Driver value from environment */
+ hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
/* Get the VFD to use */
env_h5_drvr = HDgetenv("HDF5_DRIVER");
@@ -2933,6 +2876,10 @@ main(void)
PUTS_ERROR("Can't get VFD-dependent fapl")
} /* end if */
+ /* Push API context */
+ if(H5CX_push() < 0) FAIL_STACK_ERROR
+ api_ctx_pushed = TRUE;
+
/* make sure alignment is not set for tests to succeed */
if(H5Pset_alignment(fapl, (hsize_t)1, (hsize_t)1) < 0) {
nerrors++;
@@ -2955,6 +2902,10 @@ main(void)
goto error;
HDputs("All free-space tests passed.");
+ /* Pop API context */
+ if(api_ctx_pushed && H5CX_pop() < 0) FAIL_STACK_ERROR
+ api_ctx_pushed = FALSE;
+
h5_cleanup(FILENAME, fapl);
HDexit(EXIT_SUCCESS);
@@ -2963,6 +2914,9 @@ error:
H5E_BEGIN_TRY {
H5Pclose(fapl);
} H5E_END_TRY;
+
+ if(api_ctx_pushed) H5CX_pop();
+
HDexit(EXIT_FAILURE);
} /* main() */
diff --git a/test/gen_bad_compound.c b/test/gen_bad_compound.c
index b864195..c52eb95 100644
--- a/test/gen_bad_compound.c
+++ b/test/gen_bad_compound.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
diff --git a/test/gen_bad_offset.c b/test/gen_bad_offset.c
new file mode 100644
index 0000000..82e94cd
--- /dev/null
+++ b/test/gen_bad_offset.c
@@ -0,0 +1,147 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * Purpose: Generate an HDF5 file for testing H5FFV-10216
+ */
+#include "h5test.h"
+
+#define TESTFILE "bad_offset.h5"
+#define GRP1 "group1"
+#define GRP2 "group2"
+#define DSET "dsetA"
+#define SOFT1 "soft_one"
+#define SOFT2 "soft_two"
+
+
+
+/*-------------------------------------------------------------------------
+ * Function: main
+ *
+ * Generate an HDF5 file with groups, datasets and symbolic links.
+ * After the file is generated, write bad offset values to
+ * the heap at 3 locations in the file:
+ * (A) Open the file:
+ * fd = HDopen(TESTFILE, O_RDWR, 0663);
+ * (B) Position the file at:
+ * (1) HDlseek(fd, (HDoff_t)880, SEEK_SET);
+ * "/group1/group2": replace heap offset "8" by bad offset
+ * (2) HDlseek(fd, (HDoff_t)1512, SEEK_SET);
+ * "/dsetA": replace name offset into private heap "72" by bad offset
+ * (3) HDlseek(fd, (HDoff_t)1616, SEEK_SET);
+ * /soft_one: replace link value offset in the scratch pad "32" by bad offset
+ * (C) Write the bad offset value to the file for (1), (2) and (3):
+ * write(fd, &val, sizeof(val));
+ *
+ * Note: if the groups/datasets/symbolic links are changed in the file,
+ * the above locations need to be adjusted accordingly.
+ *
+ * Return: EXIT_SUCCESS/EXIT_FAILURE
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+main(void)
+{
+ hid_t fid = -1, gid1 = -1, gid2 = -1; /* File and group IDs */
+ hid_t did = -1, sid = -1; /* Dataset and dataspace IDs */
+ int fd = -1; /* File descriptor */
+ int64_t val = 999; /* Bad offset value */
+
+ /* Create the test file */
+ if((fid = H5Fcreate(TESTFILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ FAIL_STACK_ERROR
+
+ /* Create two groups */
+ if((gid1 = H5Gcreate2(fid, GRP1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ FAIL_STACK_ERROR
+ if((gid2 = H5Gcreate2(gid1, GRP2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ FAIL_STACK_ERROR
+
+ /* Close the groups */
+ if(H5Gclose(gid1) < 0)
+ FAIL_STACK_ERROR
+ if(H5Gclose(gid2) < 0)
+ FAIL_STACK_ERROR
+
+ /* Create soft links to the groups */
+ if(H5Lcreate_soft("/group1", fid, SOFT1, H5P_DEFAULT, H5P_DEFAULT) < 0)
+ FAIL_STACK_ERROR
+ if(H5Lcreate_soft("/group1/group2", fid, SOFT2, H5P_DEFAULT, H5P_DEFAULT) < 0)
+ FAIL_STACK_ERROR
+
+ /* Create a dataset */
+ if((sid = H5Screate(H5S_SCALAR)) < 0)
+ FAIL_STACK_ERROR
+ if((did = H5Dcreate2(fid, DSET, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ FAIL_STACK_ERROR
+
+ /* Close the dataset */
+ if(H5Dclose(did) < 0)
+ FAIL_STACK_ERROR
+
+ /* Close the dataspace */
+ if(H5Sclose(sid) < 0)
+ FAIL_STACK_ERROR
+
+ /* Close the file */
+ if(H5Fclose(fid) < 0)
+ FAIL_STACK_ERROR
+
+ /*
+ * Write bad offset values at 3 locations in the file
+ */
+
+ /* Open the file */
+ if((fd = HDopen(TESTFILE, O_RDWR, 0663)) < 0)
+ FAIL_STACK_ERROR
+
+ /* Position the file for /group1/group2: replace heap offset "8" by bad offset */
+ if(HDlseek(fd, (HDoff_t)880, SEEK_SET) < 0)
+ FAIL_STACK_ERROR
+ /* Write the bad offset value to the file */
+ if(HDwrite(fd, &val, sizeof(val)) < 0)
+ FAIL_STACK_ERROR
+
+ /* Position the file for /dsetA: replace name offset into private heap "72" by bad offset */
+ if(HDlseek(fd, (HDoff_t)1512, SEEK_SET) < 0)
+ FAIL_STACK_ERROR
+ /* Write the bad offset value to the file */
+ if(HDwrite(fd, &val, sizeof(val)) < 0)
+ FAIL_STACK_ERROR
+
+ /* Position the file for /soft_one: replace link value offset in the scratch pad "32" by bad offset */
+ if(HDlseek(fd, (HDoff_t)1616, SEEK_SET) < 0)
+ FAIL_STACK_ERROR
+ /* Write the bad offset value to the file */
+ if(HDwrite(fd, &val, sizeof(val)) < 0)
+ FAIL_STACK_ERROR
+
+ /* Close the file */
+ if(HDclose(fd) < 0)
+ FAIL_STACK_ERROR
+
+ return EXIT_SUCCESS;
+
+error:
+ H5E_BEGIN_TRY {
+ H5Gclose(gid1);
+ H5Gclose(gid2);
+ H5Dclose(did);
+ H5Sclose(sid);
+ H5Fclose(fid);
+ } H5E_END_TRY;
+
+ return EXIT_FAILURE;
+} /* end main() */
+
diff --git a/test/gen_bad_ohdr.c b/test/gen_bad_ohdr.c
index 6d50230..36ba64a 100644
--- a/test/gen_bad_ohdr.c
+++ b/test/gen_bad_ohdr.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
diff --git a/test/gen_bogus.c b/test/gen_bogus.c
index fdd8744..ec29eb9 100644
--- a/test/gen_bogus.c
+++ b/test/gen_bogus.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
diff --git a/test/gen_bounds.c b/test/gen_bounds.c
new file mode 100644
index 0000000..7b670f7
--- /dev/null
+++ b/test/gen_bounds.c
@@ -0,0 +1,619 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * Purpose: This program is to generate HDF5 data files used to test
+ * version bounds.
+ *
+ * Description
+ * ===========
+ * gen_bounds.c will generate the following files:
+ * - bounds_earliest_latest.h5
+ * - bounds_earliest_v18.h5
+ * - bounds_latest_latest.h5
+ * - bounds_v18_latest.h5
+ * - bounds_v18_v18.h5
+ * These files are copied to 1.6 and 1.8 libraries for verifying
+ * that they can or cannot read particular file format.
+ */
+
+#include "h5test.h"
+
+/***********************************************************************
+ * gen_earliest_latest() creates file "bounds_earliest_latest.h5"
+ *
+ * File contents:
+ * - Version 0 superblock (default)
+ * - A chunked dataset with layout version 3, "DS_chunked_layout_3". (default)
+ * - A chunked dataset with layout version 4, "DS_chunked_layout_4". (H5Pset_chunk_opts)
+ *
+ * Return: SUCCEED/FAIL
+ *
+ ***********************************************************************/
+
+/* File names for different file format */
+#define FILENAME_E_L "bounds_earliest_latest.h5"
+#define FILENAME_E_18 "bounds_earliest_v18.h5"
+#define FILENAME_L_L "bounds_latest_latest.h5"
+#define FILENAME_18_L "bounds_v18_latest.h5"
+#define FILENAME_18_18 "bounds_v18_v18.h5"
+
+/* 2-D dataset with fixed dimensions */
+#define RANK 2
+#define DIM1 100
+#define DIM2 200
+#define CHK_DIM1 50
+#define CHK_DIM2 50
+
+static herr_t gen_earliest_latest(void)
+{
+ hid_t fid = -1; /* File ID */
+ hid_t fapl = -1; /* File access property list ID */
+ hid_t fcpl = -1; /* File creation property list ID */
+ hid_t dcpl = -1; /* Dataset creation property list ID */
+ hid_t space = -1; /* Dataspace ID */
+ hid_t dset = -1; /* Dataset ID */
+ float *buf = NULL; /* Buffer for writing data */
+ float *bufp = NULL; /* Pointer to data buffer */
+ hsize_t dims[RANK] = {DIM1, DIM2}; /* Dimensions */
+ hsize_t chunk_dims[RANK] = {CHK_DIM1, CHK_DIM2}; /* Dimensions of chunk */
+ int i, j;
+ herr_t ret = SUCCEED; /* Generic return value */
+
+ /* Create file creation property list */
+ if((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) TEST_ERROR;
+
+ /* Create file access property list */
+ if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) TEST_ERROR;
+
+ /* Set the "use the earliest/latest version of the format" bounds
+ for creating objects in the file */
+ if(H5Pset_libver_bounds(fapl, H5F_LIBVER_EARLIEST, H5F_LIBVER_LATEST) < 0)
+ TEST_ERROR;
+
+ /* Create file */
+ if((fid = H5Fcreate(FILENAME_E_L, H5F_ACC_TRUNC, fcpl, fapl)) <0)
+ TEST_ERROR;
+
+ /* Close file property lists */
+ if(H5Pclose(fapl) < 0) TEST_ERROR;
+ if(H5Pclose(fcpl) < 0) TEST_ERROR;
+
+ /*
+ * Add a chunked dataset with layout version 3 (default)
+ */
+ buf = (float *)HDmalloc((size_t)DIM1 * (size_t)DIM2 * sizeof(float));
+ if (buf == NULL) TEST_ERROR;
+
+ /* Fill sample data */
+ bufp = buf;
+ for (i = 0; i < DIM1; i++)
+ for (j = 0; j < DIM2; j++)
+ *bufp = 100.0F;
+
+ /* Create the dataspace */
+ if((space = H5Screate_simple(RANK, dims, NULL)) < 0) TEST_ERROR;
+
+ /* Create the dataset creation property list */
+ if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) TEST_ERROR;
+
+ /* Set up for chunked data */
+ if(H5Pset_chunk(dcpl, 2, chunk_dims) < 0) TEST_ERROR;
+
+ /* Create and write the dataset */
+ dset = H5Dcreate2(fid, "DS_chunked_layout_3", H5T_NATIVE_FLOAT, space, H5P_DEFAULT, dcpl, H5P_DEFAULT);
+ if (dset < 0) TEST_ERROR;
+
+ ret = H5Dwrite(dset, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf);
+ if (ret < 0) TEST_ERROR;
+
+ /* Close property list and dataset, will reuse dataspace */
+ if(H5Pclose(dcpl) < 0) TEST_ERROR;
+ if(H5Dclose(dset) < 0) TEST_ERROR;
+
+ /*
+ * Add a chunked dataset with layout version 4 (H5Pset_chunk_opts)
+ */
+
+ /* Create the dataset creation property list */
+ if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) TEST_ERROR;
+
+ /* Set up for chunked data */
+ if(H5Pset_chunk(dcpl, 2, chunk_dims) < 0) TEST_ERROR;
+
+ /* Disable partial chunk filters, triggers layout version 4 */
+ if(H5Pset_chunk_opts(dcpl, H5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS) < 0)
+ TEST_ERROR;
+
+ /* Create and write the dataset */
+ dset = H5Dcreate2(fid, "DS_chunked_layout_4", H5T_NATIVE_FLOAT, space, H5P_DEFAULT, dcpl, H5P_DEFAULT);
+ if (dset < 0) TEST_ERROR;
+ ret = H5Dwrite(dset, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf);
+ if (ret < 0) TEST_ERROR;
+
+ /* Release allocated buffer */
+ HDfree(buf);
+ bufp = buf = NULL;
+
+ /* Close everything */
+ if(H5Pclose(dcpl) < 0) TEST_ERROR;
+ if(H5Dclose(dset) < 0) TEST_ERROR;
+ if(H5Sclose(space) < 0) TEST_ERROR;
+ if(H5Fclose(fid) < 0) TEST_ERROR;
+
+ return SUCCEED;
+
+error:
+ H5E_BEGIN_TRY {
+ H5Dclose(dset);
+ H5Sclose(space);
+ H5Pclose(dcpl);
+ H5Pclose(fcpl);
+ H5Pclose(fapl);
+ H5Fclose(fid);
+ HDfree(buf);
+ } H5E_END_TRY;
+ return FAIL;
+} /* gen_earliest_latest */
+
+/***********************************************************************
+ * gen_earliest_v18() creates file "bounds_earliest_v18.h5"
+ *
+ * File contents:
+ * - Version 0 superblock (default)
+ * - A chunked dataset with layout version 3, "DS_chunked_layout_3". (default)
+ *
+ * Return: SUCCEED/FAIL
+ *
+ ***********************************************************************/
+static herr_t gen_earliest_v18(void)
+{
+ hid_t fid = -1; /* File ID */
+ hid_t fapl = -1; /* File access property list ID */
+ hid_t fcpl = -1; /* File creation property list ID */
+ hid_t dcpl = -1; /* Dataset creation property list ID */
+ hid_t space = -1; /* Dataspace ID */
+ hid_t dset = -1; /* Dataset ID */
+ float *buf = NULL; /* Buffer for writing data */
+ float *bufp = NULL; /* Pointer to data buffer */
+ hsize_t dims[RANK] = {DIM1, DIM2}; /* Dimensions */
+ hsize_t chunk_dims[RANK] = {CHK_DIM1, CHK_DIM2}; /* Dimensions of chunk */
+ int i, j;
+ herr_t ret = SUCCEED; /* Generic return value */
+
+ /* Create file creation property list */
+ if((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) TEST_ERROR;
+
+ /* Create file access property list */
+ if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) TEST_ERROR;
+
+ /* Set the "use the earliest/v18 version of the format" bounds
+ for creating objects in the file */
+ if(H5Pset_libver_bounds(fapl, H5F_LIBVER_EARLIEST, H5F_LIBVER_V18) < 0)
+ TEST_ERROR;
+
+ /* Create file */
+ if((fid = H5Fcreate(FILENAME_E_18, H5F_ACC_TRUNC, fcpl, fapl)) <0)
+ TEST_ERROR;
+
+ /* Close file property lists */
+ if(H5Pclose(fapl) < 0) TEST_ERROR;
+ if(H5Pclose(fcpl) < 0) TEST_ERROR;
+
+ /*
+ * Add a chunked dataset with layout version 3 (default)
+ */
+
+ buf = (float *)HDmalloc((size_t)DIM1 * (size_t)DIM2 * sizeof(float));
+ if (buf == NULL) TEST_ERROR;
+
+ /* Fill sample data */
+ bufp = buf;
+ for (i = 0; i < DIM1; i++)
+ for (j = 0; j < DIM2; j++)
+ *bufp = 100.0F;
+
+ /* Create the dataspace */
+ if((space = H5Screate_simple(RANK, dims, NULL)) < 0) TEST_ERROR;
+
+ /* Create the dataset creation property list */
+ if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) TEST_ERROR;
+
+ /* Set up for chunked data */
+ if(H5Pset_chunk(dcpl, 2, chunk_dims) < 0) TEST_ERROR;
+
+ /* Create and write the dataset */
+ dset = H5Dcreate2(fid, "DS_chunked_layout_3", H5T_NATIVE_FLOAT, space, H5P_DEFAULT, dcpl, H5P_DEFAULT);
+ if (dset < 0) TEST_ERROR;
+
+ ret = H5Dwrite(dset, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf);
+ if (ret < 0) TEST_ERROR;
+
+ /* Release allocated buffer */
+ HDfree(buf);
+ bufp = buf = NULL;
+
+ /* Close everything */
+ if(H5Pclose(dcpl) < 0) TEST_ERROR;
+ if(H5Dclose(dset) < 0) TEST_ERROR;
+ if(H5Sclose(space) < 0) TEST_ERROR;
+ if(H5Fclose(fid) < 0) TEST_ERROR;
+
+ return SUCCEED;
+
+error:
+ H5E_BEGIN_TRY {
+ H5Dclose(dset);
+ H5Sclose(space);
+ H5Pclose(dcpl);
+ H5Pclose(fcpl);
+ H5Pclose(fapl);
+ H5Fclose(fid);
+ HDfree(buf);
+ } H5E_END_TRY;
+ return FAIL;
+} /* gen_earliest_v18 */
+
+/***********************************************************************
+ * gen_latest_latest() creates file "bounds_latest_latest.h5"
+ *
+ * NOTE: As of March 2018, latest is 1.10.
+ *
+ * File contents:
+ * - Version 3 superblock (NOTE: this can also be triggered by passing in
+ * H5F_ACC_SWMR_WRITE, in place of H5F_ACC_TRUNC, to H5Fcreate)
+ * - A chunked dataset with layout version 4, "DS_chunked_layout_4".
+ * (triggered by H5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS)
+ *
+ * Return: SUCCEED/FAIL
+ *
+ ***********************************************************************/
+static herr_t gen_latest_latest(void)
+{
+ hid_t fid = -1; /* File ID */
+ hid_t fapl = -1; /* File access property list ID */
+ hid_t dcpl = -1; /* Dataset creation property list ID */
+ hid_t space = -1; /* Dataspace ID */
+ hid_t dset = -1; /* Dataset ID */
+ float *buf = NULL; /* Buffer for writing data */
+ float *bufp = NULL; /* Pointer to data buffer */
+ hsize_t dims[RANK] = {DIM1, DIM2}; /* Dimensions */
+ hsize_t chunk_dims[RANK] = {CHK_DIM1, CHK_DIM2}; /* Dimensions of chunk */
+ int i, j;
+ herr_t ret = SUCCEED; /* Generic return value */
+
+ /* Create file access property list */
+ if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) TEST_ERROR;
+
+ /* Set the "use the latest/latest version of the format" bounds
+ for creating objects in the file */
+ if(H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
+ TEST_ERROR;
+
+ /* Create the file with version 3 superblock */
+ fid = H5Fcreate(FILENAME_L_L, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
+ if (fid < 0) TEST_ERROR;
+
+ /*
+ * Add a chunked dataset with layout version 4 (H5Pset_chunk_opts)
+ */
+
+ buf = (float *)HDmalloc((size_t)DIM1 * (size_t)DIM2 * sizeof(float));
+ if (buf == NULL) TEST_ERROR;
+
+ /* Fill sample data */
+ bufp = buf;
+ for (i = 0; i < DIM1; i++)
+ for (j = 0; j < DIM2; j++)
+ *bufp = 100.0F;
+
+ /* Create the dataspace */
+ if((space = H5Screate_simple(RANK, dims, NULL)) < 0) TEST_ERROR;
+
+ /* Create the dataset creation property list */
+ if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) TEST_ERROR;
+
+ /* Set up for chunked data */
+ if(H5Pset_chunk(dcpl, 2, chunk_dims) < 0) TEST_ERROR;
+
+ /* Disable partial chunk filters, triggers layout version 4 */
+ if(H5Pset_chunk_opts(dcpl, H5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS) < 0)
+ TEST_ERROR;
+
+ /* Create and write the dataset */
+ dset = H5Dcreate2(fid, "DS_chunked_layout_4", H5T_NATIVE_FLOAT, space, H5P_DEFAULT, dcpl, H5P_DEFAULT);
+ if (dset < 0) TEST_ERROR;
+ ret = H5Dwrite(dset, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf);
+ if (ret < 0) TEST_ERROR;
+
+ /* Release allocated buffer */
+ HDfree(buf);
+ bufp = buf = NULL;
+
+ /* Close everything */
+ if(H5Pclose(dcpl) < 0) TEST_ERROR;
+ if(H5Dclose(dset) < 0) TEST_ERROR;
+ if(H5Sclose(space) < 0) TEST_ERROR;
+ if(H5Fclose(fid) < 0) TEST_ERROR;
+
+ return SUCCEED;
+
+error:
+ H5E_BEGIN_TRY {
+ H5Dclose(dset);
+ H5Sclose(space);
+ H5Pclose(dcpl);
+ H5Fclose(fid);
+ HDfree(buf);
+ } H5E_END_TRY;
+ return FAIL;
+} /* gen_latest_latest */
+
+/***********************************************************************
+ * gen_v18_latest() creates file "bounds_v18_latest.h5"
+ *
+ * NOTE: As of March 2018, latest is 1.10.
+ *
+ * File contents:
+ * - Version 2 superblock
+ * - A chunked dataset with layout version 3, "DS_chunked_layout_3". (default)
+ *
+ * Return: SUCCEED/FAIL
+ *
+ ***********************************************************************/
+static herr_t gen_v18_latest(void)
+{
+ hid_t fid = -1; /* File ID */
+ hid_t fapl = -1; /* File access property list ID */
+ hid_t fcpl = -1; /* File creation property list ID */
+ hid_t dcpl = -1; /* Dataset creation property list ID */
+ hid_t space = -1; /* Dataspace ID */
+ hid_t dset = -1; /* Dataset ID */
+ float *buf = NULL; /* Buffer for writing data */
+ float *bufp = NULL; /* Pointer to data buffer */
+ hsize_t dims[RANK] = {DIM1, DIM2}; /* Dimensions */
+ hsize_t chunk_dims[RANK] = {CHK_DIM1, CHK_DIM2}; /* Dimensions of chunk */
+ int i, j;
+ herr_t ret = SUCCEED; /* Generic return value */
+
+ /* Create file creation property list */
+ if((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) TEST_ERROR;
+
+ /* Create file access property list */
+ if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) TEST_ERROR;
+
+ /* Set the "use the v18/latest version of the format" bounds
+ for creating objects in the file, also trigger version 2 superblock */
+ if(H5Pset_libver_bounds(fapl, H5F_LIBVER_V18, H5F_LIBVER_LATEST) < 0)
+ TEST_ERROR;
+
+ /* Create file */
+ if((fid = H5Fcreate(FILENAME_18_L, H5F_ACC_TRUNC, fcpl, fapl)) <0)
+ TEST_ERROR;
+
+ /* Close file property lists */
+ if(H5Pclose(fapl) < 0) TEST_ERROR;
+ if(H5Pclose(fcpl) < 0) TEST_ERROR;
+
+ /*
+ * Add a chunked dataset with layout version 3 (default)
+ */
+
+ buf = (float *)HDmalloc((size_t)DIM1 * (size_t)DIM2 * sizeof(float));
+ if (buf == NULL) TEST_ERROR;
+
+ /* Fill sample data */
+ bufp = buf;
+ for (i = 0; i < DIM1; i++)
+ for (j = 0; j < DIM2; j++)
+ *bufp = 100.0F;
+
+ /* Create the dataspace */
+ if((space = H5Screate_simple(RANK, dims, NULL)) < 0) TEST_ERROR;
+
+ /* Create the dataset creation property list */
+ if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) TEST_ERROR;
+
+ /* Set up for chunked data */
+ if(H5Pset_chunk(dcpl, 2, chunk_dims) < 0) TEST_ERROR;
+
+ /* Create and write the dataset */
+ dset = H5Dcreate2(fid, "DS_chunked_layout_3", H5T_NATIVE_FLOAT, space, H5P_DEFAULT, dcpl, H5P_DEFAULT);
+ if (dset < 0) TEST_ERROR;
+ ret = H5Dwrite(dset, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf);
+ if (ret < 0) TEST_ERROR;
+
+ /* Release allocated buffer */
+ HDfree(buf);
+ bufp = buf = NULL;
+
+ /* Close property list and dataset, will reuse dataspace */
+ if(H5Pclose(dcpl) < 0) TEST_ERROR;
+ if(H5Dclose(dset) < 0) TEST_ERROR;
+ if(H5Sclose(space) < 0) TEST_ERROR;
+ if(H5Fclose(fid) < 0) TEST_ERROR;
+
+ return SUCCEED;
+
+error:
+ H5E_BEGIN_TRY {
+ H5Dclose(dset);
+ H5Sclose(space);
+ H5Pclose(dcpl);
+ H5Pclose(fcpl);
+ H5Pclose(fapl);
+ H5Fclose(fid);
+ HDfree(buf);
+ } H5E_END_TRY;
+ return FAIL;
+} /* gen_v18_latest */
+
+/***********************************************************************
+ * gen_v18_v18() creates file "bounds_v18_v18.h5"
+ *
+ * File contents:
+ * - Version 2 superblock (H5Pset_libver_bounds(v18, v18)
+ * - A chunked dataset with layout version 3, "DS_chunked_layout_3". (default)
+ * - A chunked dataset with layout version 4, "DS_chunked_layout_4". (H5Pset_chunk_opts)
+ *
+ * Return: SUCCEED/FAIL
+ *
+ ***********************************************************************/
+static herr_t gen_v18_v18(void)
+{
+ hid_t fid = -1; /* File ID */
+ hid_t fapl = -1; /* File access property list ID */
+ hid_t fcpl = -1; /* File creation property list ID */
+ hid_t dcpl = -1; /* Dataset creation property list ID */
+ hid_t space = -1; /* Dataspace ID */
+ hid_t dset = -1; /* Dataset ID */
+ float *buf = NULL; /* Buffer for writing data */
+ float *bufp = NULL; /* Pointer to data buffer */
+ hsize_t dims[RANK] = {DIM1, DIM2}; /* Dimensions */
+ hsize_t chunk_dims[RANK] = {CHK_DIM1, CHK_DIM2}; /* Dimensions of chunk */
+ int i, j;
+ herr_t ret = SUCCEED; /* Generic return value */
+
+ /* Create file creation property list */
+ if((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) TEST_ERROR;
+
+ /* Create file access property list */
+ if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) TEST_ERROR;
+
+ /* Set the "use the v18 version of the format" bounds
+ for creating objects in the file */
+ if(H5Pset_libver_bounds(fapl, H5F_LIBVER_V18, H5F_LIBVER_V18) < 0)
+ TEST_ERROR;
+
+ /* Create file */
+ if((fid = H5Fcreate(FILENAME_18_18, H5F_ACC_TRUNC, fcpl, fapl)) <0)
+ TEST_ERROR;
+
+ /* Close file property lists */
+ if(H5Pclose(fapl) < 0) TEST_ERROR;
+ if(H5Pclose(fcpl) < 0) TEST_ERROR;
+
+ /*
+ * Add a chunked dataset with layout version 3 (default)
+ */
+
+ buf = (float *)HDmalloc((size_t)DIM1 * (size_t)DIM2 * sizeof(float));
+ if (buf == NULL) TEST_ERROR;
+
+ /* Fill sample data */
+ bufp = buf;
+ for (i = 0; i < DIM1; i++)
+ for (j = 0; j < DIM2; j++)
+ *bufp = 100.0F;
+
+ /* Create the dataspace */
+ if((space = H5Screate_simple(RANK, dims, NULL)) < 0) TEST_ERROR;
+
+ /* Create the dataset creation property list */
+ if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) TEST_ERROR;
+
+ /* Set up for chunked data */
+ if(H5Pset_chunk(dcpl, 2, chunk_dims) < 0) TEST_ERROR;
+
+ /* Create and write the dataset */
+ dset = H5Dcreate2(fid, "DS_chunked_layout_3", H5T_NATIVE_FLOAT, space, H5P_DEFAULT, dcpl, H5P_DEFAULT);
+ if (dset < 0) TEST_ERROR;
+ ret = H5Dwrite(dset, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf);
+ if (ret < 0) TEST_ERROR;
+
+ /* Close property list and dataset, will reuse dataspace */
+ if(H5Pclose(dcpl) < 0) TEST_ERROR;
+ if(H5Dclose(dset) < 0) TEST_ERROR;
+
+ /* Close the file, then reopen it with the latest version */
+ if(H5Fclose(fid) < 0) TEST_ERROR;
+
+ /* Create file access property list */
+ if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) TEST_ERROR;
+
+ /* Set the "use the v18/latest version of the format" bounds
+ for creating a layout version 4 object in the file */
+ if(H5Pset_libver_bounds(fapl, H5F_LIBVER_V18, H5F_LIBVER_LATEST) < 0)
+ TEST_ERROR;
+
+ if((fid = H5Fopen(FILENAME_18_18, H5F_ACC_RDWR, fapl)) < 0)
+ TEST_ERROR;
+
+ /*
+ * Add a chunked dataset with layout version 4 (H5Pset_chunk_opts)
+ */
+
+ /* Create the dataset creation property list */
+ if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) TEST_ERROR;
+
+ /* Set up for chunked data */
+ if(H5Pset_chunk(dcpl, 2, chunk_dims) < 0) TEST_ERROR;
+
+ /* Disable partial chunk filters */
+ if(H5Pset_chunk_opts(dcpl, H5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS) < 0)
+ TEST_ERROR;
+
+ /* Create and write the dataset */
+ dset = H5Dcreate2(fid, "DS_chunked_layout_4", H5T_NATIVE_FLOAT, space, H5P_DEFAULT, dcpl, H5P_DEFAULT);
+ if (dset < 0) TEST_ERROR;
+ ret = H5Dwrite(dset, H5T_NATIVE_FLOAT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf);
+ if (ret < 0) TEST_ERROR;
+
+ /* Release allocated buffer */
+ HDfree(buf);
+ bufp = buf = NULL;
+
+ /* Close everything */
+ if(H5Pclose(dcpl) < 0) TEST_ERROR;
+ if(H5Pclose(fapl) < 0) TEST_ERROR;
+ if(H5Dclose(dset) < 0) TEST_ERROR;
+ if(H5Sclose(space) < 0) TEST_ERROR;
+ if(H5Fclose(fid) < 0) TEST_ERROR;
+ return SUCCEED;
+
+error:
+ H5E_BEGIN_TRY {
+ H5Dclose(dset);
+ H5Sclose(space);
+ H5Pclose(dcpl);
+ H5Pclose(fcpl);
+ H5Pclose(fapl);
+ H5Fclose(fid);
+ HDfree(buf);
+ } H5E_END_TRY;
+ return FAIL;
+} /* gen_v18_v18 */
+
+int main(void)
+{
+ /* Generate file bounds_earliest_latest.h5 */
+ if (gen_earliest_latest() < 0) TEST_ERROR;
+
+ /* Generate file bounds_earliest_v18.h5 */
+ if (gen_earliest_v18() < 0) TEST_ERROR;
+
+ /* Generate file bounds_latest_latest.h5 */
+ if (gen_latest_latest() < 0) TEST_ERROR;
+
+ /* Generate file bounds_v18_latest.h5 */
+ if (gen_v18_latest() < 0) TEST_ERROR;
+
+ /* Generate file bounds_v18_v18.h5 */
+ if (gen_v18_v18() < 0) TEST_ERROR;
+
+ return EXIT_SUCCESS;
+
+error:
+ return EXIT_FAILURE;
+}
+
diff --git a/test/gen_cross.c b/test/gen_cross.c
index af39f69..f7a1938 100644
--- a/test/gen_cross.c
+++ b/test/gen_cross.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
@@ -28,7 +26,6 @@
* worth keeping around for now.
*/
-#include <stdio.h>
#include "h5test.h"
#define H5FILE_NAME "data.h5"
@@ -81,7 +78,7 @@ int create_szip_dsets_float(hid_t fid, hid_t fsid, hid_t msid);
int create_shuffle_dsets_float(hid_t fid, hid_t fsid, hid_t msid);
int create_nbit_dsets_float(hid_t fid, hid_t fsid, hid_t msid);
-
+
/*-------------------------------------------------------------------------
* Function: create_normal_dset
*
@@ -110,8 +107,8 @@ create_normal_dset(hid_t fid, hid_t fsid, hid_t msid)
* Data and output buffer initialization.
*/
for (j = 0; j < NX; j++) {
- for (i = 0; i < NY; i++)
- data[j][i] = ((float)(i + j + 1)) / 3;
+ for (i = 0; i < NY; i++)
+ data[j][i] = ((float)(i + j + 1)) / 3;
}
/*
* 1/3 2/3 3/3 4/3 5/3 6/3
@@ -145,7 +142,7 @@ create_normal_dset(hid_t fid, hid_t fsid, hid_t msid)
if(H5Dwrite(dataset, H5T_NATIVE_FLOAT, msid, fsid, H5P_DEFAULT, data) < 0)
TEST_ERROR
- /*
+ /*
* Close dataset
*/
if(H5Dclose(dataset) < 0)
@@ -165,7 +162,7 @@ create_normal_dset(hid_t fid, hid_t fsid, hid_t msid)
if(H5Dwrite(dataset, H5T_NATIVE_FLOAT, msid, fsid, H5P_DEFAULT, data) < 0)
TEST_ERROR
- /*
+ /*
* Close dataset
*/
if(H5Dclose(dataset) < 0)
@@ -188,7 +185,7 @@ error:
return -1;
}
-
+
/*-------------------------------------------------------------------------
* Function: create_scale_offset_dsets_float
*
@@ -279,7 +276,7 @@ error:
return -1;
}
-
+
/*-------------------------------------------------------------------------
* Function: create_scale_offset_dsets_double
*
@@ -309,8 +306,8 @@ create_scale_offset_dsets_double(hid_t fid, hid_t fsid, hid_t msid)
* Data and output buffer initialization.
*/
for (j = 0; j < NX; j++) {
- for (i = 0; i < NY; i++)
- data[j][i] = ((double)(i + j + 1))/3;
+ for (i = 0; i < NY; i++)
+ data[j][i] = ((double)(i + j + 1))/3;
}
/*
@@ -370,7 +367,7 @@ error:
return -1;
}
-
+
/*-------------------------------------------------------------------------
* Function: create_scale_offset_dset_char
*
@@ -469,7 +466,7 @@ error:
return -1;
}
-
+
/*-------------------------------------------------------------------------
* Function: create_scale_offset_dset_short
*
@@ -568,7 +565,7 @@ error:
return -1;
}
-
+
/*-------------------------------------------------------------------------
* Function: create_scale_offset_dset_int
*
@@ -598,8 +595,8 @@ create_scale_offset_dsets_int(hid_t fid, hid_t fsid, hid_t msid)
* Data and output buffer initialization.
*/
for (j = 0; j < NX; j++) {
- for (i = 0; i < NY; i++)
- data[j][i] = i + j;
+ for (i = 0; i < NY; i++)
+ data[j][i] = i + j;
}
/*
* 0 1 2 3 4 5
@@ -667,7 +664,7 @@ error:
return -1;
}
-
+
/*-------------------------------------------------------------------------
* Function: create_scale_offset_dset_long_long
*
@@ -767,7 +764,7 @@ error:
return -1;
}
-
+
/*-------------------------------------------------------------------------
* Function: create_fletcher_dsets_float
*
@@ -858,7 +855,7 @@ error:
return -1;
}
-
+
/*-------------------------------------------------------------------------
* Function: create_deflate_dsets_float
*
@@ -959,7 +956,7 @@ error:
}
#ifdef H5_HAVE_FILTER_SZIP
-
+
/*-------------------------------------------------------------------------
* Function: create_szip_dsets_float
*
@@ -1051,7 +1048,7 @@ error:
}
#endif /* H5_HAVE_FILTER_SZIP */
-
+
/*-------------------------------------------------------------------------
* Function: create_shuffle_dsets_float
*
@@ -1142,7 +1139,7 @@ error:
return -1;
}
-
+
/*-------------------------------------------------------------------------
* Function: create_nbit_dsets_float
*
@@ -1227,7 +1224,7 @@ create_nbit_dsets_float(hid_t fid, hid_t fsid, hid_t msid)
TEST_ERROR
/* Now create a dataset with a big-endian type */
- if(H5Tset_order(datatype, H5T_ORDER_BE) < 0)
+ if(H5Tset_order(datatype, H5T_ORDER_BE) < 0)
TEST_ERROR
if((dataset = H5Dcreate2(fid, DATASETNAME23, datatype, fsid,
H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
@@ -1254,7 +1251,7 @@ error:
return -1;
}
-
+
/*-------------------------------------------------------------------------
* Function: main
*
diff --git a/test/gen_deflate.c b/test/gen_deflate.c
index 3a9370d..3409a81 100644
--- a/test/gen_deflate.c
+++ b/test/gen_deflate.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
diff --git a/test/gen_file_image.c b/test/gen_file_image.c
index 0637473..9607cc2 100644
--- a/test/gen_file_image.c
+++ b/test/gen_file_image.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
diff --git a/test/gen_filespace.c b/test/gen_filespace.c
index 52715ae..4397836 100644
--- a/test/gen_filespace.c
+++ b/test/gen_filespace.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include "hdf5.h"
diff --git a/test/gen_filters.c b/test/gen_filters.c
index f506602..fa66078 100644
--- a/test/gen_filters.c
+++ b/test/gen_filters.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include "h5test.h"
diff --git a/test/gen_mergemsg.c b/test/gen_mergemsg.c
index 5df5674..f158d57 100644
--- a/test/gen_mergemsg.c
+++ b/test/gen_mergemsg.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
diff --git a/test/gen_new_array.c b/test/gen_new_array.c
index c78644d..27f162c 100644
--- a/test/gen_new_array.c
+++ b/test/gen_new_array.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
diff --git a/test/gen_new_fill.c b/test/gen_new_fill.c
index 4ba85ad..5bdbf73 100644
--- a/test/gen_new_fill.c
+++ b/test/gen_new_fill.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
diff --git a/test/gen_new_group.c b/test/gen_new_group.c
index b998913..6924291 100644
--- a/test/gen_new_group.c
+++ b/test/gen_new_group.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
diff --git a/test/gen_new_mtime.c b/test/gen_new_mtime.c
index d7a0f32..b44d567 100644
--- a/test/gen_new_mtime.c
+++ b/test/gen_new_mtime.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
diff --git a/test/gen_new_super.c b/test/gen_new_super.c
index f6d15f4..f6ce589 100644
--- a/test/gen_new_super.c
+++ b/test/gen_new_super.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
diff --git a/test/gen_noencoder.c b/test/gen_noencoder.c
index 46a2036..e6ac9cf 100644
--- a/test/gen_noencoder.c
+++ b/test/gen_noencoder.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include "hdf5.h"
diff --git a/test/gen_nullspace.c b/test/gen_nullspace.c
index 8349a5c..9d76deb 100644
--- a/test/gen_nullspace.c
+++ b/test/gen_nullspace.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
diff --git a/test/gen_old_array.c b/test/gen_old_array.c
index a4162f2..3fab657 100644
--- a/test/gen_old_array.c
+++ b/test/gen_old_array.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
diff --git a/test/gen_old_group.c b/test/gen_old_group.c
index 1b33cea..d109329 100644
--- a/test/gen_old_group.c
+++ b/test/gen_old_group.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
diff --git a/test/gen_old_layout.c b/test/gen_old_layout.c
index 312ee58..56c3e4e 100644
--- a/test/gen_old_layout.c
+++ b/test/gen_old_layout.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
diff --git a/test/gen_old_mtime.c b/test/gen_old_mtime.c
index ca6012a..cbe3bdc 100644
--- a/test/gen_old_mtime.c
+++ b/test/gen_old_mtime.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
diff --git a/test/gen_plist.c b/test/gen_plist.c
index 5c54ce8..62693bd 100644
--- a/test/gen_plist.c
+++ b/test/gen_plist.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
@@ -465,23 +463,23 @@ encode_plist(hid_t plist_id, int little_endian, int word_length, const char *fil
/* Generate filename */
if((ret = HDsnprintf(filename, sizeof(filename), "%s%d%s", filename_prefix, word_length, little_endian ? "le" : "be")) < 0)
- assert(ret > 0);
+ HDassert(ret > 0);
/* first call to encode returns only the size of the buffer needed */
if((ret = H5Pencode(plist_id, NULL, &temp_size)) < 0)
- assert(ret > 0);
+ HDassert(ret > 0);
temp_buf = (void *)HDmalloc(temp_size);
- assert(temp_buf);
+ HDassert(temp_buf);
if((ret = H5Pencode(plist_id, temp_buf, &temp_size)) < 0)
- assert(ret > 0);
+ HDassert(ret > 0);
- fd = HDopen(filename, O_RDWR | O_CREAT | O_TRUNC, 0666);
- assert(fd > 0);
+ fd = HDopen(filename, O_RDWR | O_CREAT | O_TRUNC, H5_POSIX_CREATE_MODE_RW);
+ HDassert(fd > 0);
write_size = HDwrite(fd, temp_buf, temp_size);
- assert(write_size == (ssize_t)temp_size);
+ HDassert(write_size == (ssize_t)temp_size);
HDclose(fd);
diff --git a/test/gen_sizes_lheap.c b/test/gen_sizes_lheap.c
index de7e261..81742df 100644
--- a/test/gen_sizes_lheap.c
+++ b/test/gen_sizes_lheap.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
diff --git a/test/gen_specmetaread.c b/test/gen_specmetaread.c
index f489119..d06bd59 100644
--- a/test/gen_specmetaread.c
+++ b/test/gen_specmetaread.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
diff --git a/test/gen_udlinks.c b/test/gen_udlinks.c
index 55abab0..e48d0e8 100644
--- a/test/gen_udlinks.c
+++ b/test/gen_udlinks.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
diff --git a/test/genall5.c b/test/genall5.c
index 8a1e853..e3a9c96 100644
--- a/test/genall5.c
+++ b/test/genall5.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* Programmer: John Mainzer
@@ -1250,29 +1248,55 @@ void
os_grp_0(hid_t fid, const char *group_name)
{
hid_t gid = -1;
+ hid_t fapl = -1;
+ H5F_libver_t low, high;
+
herr_t ret;
- if ( pass ) { /* turn file format latest off */
+ if ( pass ) { /* get the file's file access property list */
- ret = H5Fset_latest_format(fid, FALSE);
+ fapl = H5Fget_access_plist(fid);
+ if ( fapl <= 0 ) {
- if ( ret < 0 ) {
+ pass = FALSE;
+ failure_mssg = "os_grp_0: H5Fget_access_plist() failed.";
+ }
+ HDassert(fapl > 0);
+ }
+
+ if ( pass ) { /* get low and high bounds from fapl */
- pass = FALSE;
- failure_mssg = "os_grp_0: H5Fset_latest_format() failed(1).";
- }
+ ret = H5Pget_libver_bounds(fapl, &low, &high);
+ if ( ret < 0 ) {
+
+ pass = FALSE;
+ failure_mssg = "os_grp_0: H5Pget_libver_bounds() failed(1).";
+ }
HDassert(ret >= 0);
}
+ if ( pass ) { /* turn file format latest off */
+
+ if(low >= H5F_LIBVER_V18) {
+ ret = H5Fset_libver_bounds(fid, H5F_LIBVER_EARLIEST, high);
+ if ( ret < 0 ) {
+
+ pass = FALSE;
+ failure_mssg = "os_grp_0: H5Fset_libver_bounds() failed(1).";
+ }
+ HDassert(ret >= 0);
+ }
+ }
+
if ( pass ) {
gid = H5Gcreate2(fid, group_name, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT);
if ( gid <= 0 ) {
- pass = FALSE;
- failure_mssg = "os_grp_0: H5Gcreate2() failed.";
- }
+ pass = FALSE;
+ failure_mssg = "os_grp_0: H5Gcreate2() failed.";
+ }
HDassert(gid > 0);
}
@@ -1280,24 +1304,25 @@ os_grp_0(hid_t fid, const char *group_name)
ret = H5Gclose(gid);
- if ( ret < 0 ) {
+ if ( ret < 0 ) {
- pass = FALSE;
- failure_mssg = "os_grp_0: H5Gclose() failed.";
- }
+ pass = FALSE;
+ failure_mssg = "os_grp_0: H5Gclose() failed.";
+ }
HDassert(ret >= 0);
}
- if ( pass ) { /* turn file format latest on */
+ if ( pass ) { /* restore low and high bounds */
- ret = H5Fset_latest_format(fid, TRUE);
-
- if ( ret < 0 ) {
+ if(low >= H5F_LIBVER_V18) {
+ ret = H5Fset_libver_bounds(fid, low, high);
+ if ( ret < 0 ) {
- pass = FALSE;
- failure_mssg = "os_grp_0: H5Fset_latest_format() failed(2).";
- }
- HDassert(ret >= 0);
+ pass = FALSE;
+ failure_mssg = "os_grp_0: H5Fset_libver_bounds() failed(1).";
+ }
+ HDassert(ret >= 0);
+ }
}
return;
@@ -1464,28 +1489,53 @@ os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
{
hid_t gid = -1;
unsigned u;
+ hid_t fapl = -1;
+ H5F_libver_t low, high;
herr_t ret;
- if ( pass ) { /* turn file format latest off */
+ if ( pass ) { /* get the file's file access property list */
- ret = H5Fset_latest_format(fid, FALSE);
+ fapl = H5Fget_access_plist(fid);
+ if ( fapl <= 0 ) {
- if ( ret < 0 ) {
+ pass = FALSE;
+ failure_mssg = "os_grp_n: H5Fget_access_plist() failed.";
+ }
+ HDassert(fapl > 0);
+ }
- pass = FALSE;
- failure_mssg = "os_grp_n: H5Fset_latest_format() failed(1).";
- }
+ if ( pass ) { /* get low and high bounds from fapl */
+
+ ret = H5Pget_libver_bounds(fapl, &low, &high);
+ if ( ret < 0 ) {
+
+ pass = FALSE;
+ failure_mssg = "os_grp_0: H5Pget_libver_bounds() failed(1).";
+ }
HDassert(ret >= 0);
}
+ if ( pass ) { /* turn file format latest off */
+
+ if(low >= H5F_LIBVER_V18) {
+ ret = H5Fset_libver_bounds(fid, H5F_LIBVER_EARLIEST, high);
+ if ( ret < 0 ) {
+
+ pass = FALSE;
+ failure_mssg = "os_grp_0: H5Fset_libver_bounds() failed(1).";
+ }
+ HDassert(ret >= 0);
+ }
+ }
+
if ( pass ) {
gid = H5Gcreate2(fid, group_name, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT);
if ( gid <= 0 ) {
- pass = FALSE;
- failure_mssg = "os_grp_n: H5Gcreate2() failed.";
+ pass = FALSE;
+ failure_mssg = "os_grp_n: H5Gcreate2() failed.";
}
HDassert(gid > 0);
}
@@ -1540,16 +1590,17 @@ os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks)
assert(ret >= 0);
}
- if ( pass ) { /* turn file format latest on */
-
- ret = H5Fset_latest_format(fid, TRUE);
+ if ( pass ) { /* restore low and high bounds */
- if ( ret < 0 ) {
+ if(low >= H5F_LIBVER_V18) {
+ ret = H5Fset_libver_bounds(fid, low, high);
+ if ( ret < 0 ) {
- pass = FALSE;
- failure_mssg = "os_grp_n: H5Fset_latest_format() failed(2).";
- }
- HDassert(ret >= 0);
+ pass = FALSE;
+ failure_mssg = "os_grp_n: H5Fset_libver_bounds() failed(2).";
+ }
+ HDassert(ret >= 0);
+ }
}
return;
diff --git a/test/genall5.h b/test/genall5.h
index 70b5a6f..1dce195 100644
--- a/test/genall5.h
+++ b/test/genall5.h
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* Programmer: John Mainzer
diff --git a/test/getname.c b/test/getname.c
index e6d26ce..c3f3c54 100644
--- a/test/getname.c
+++ b/test/getname.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
diff --git a/test/gheap.c b/test/gheap.c
index eafc49d..bf0f18a 100644
--- a/test/gheap.c
+++ b/test/gheap.c
@@ -5,25 +5,23 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* Programmer: Robb Matzke <matzke@llnl.gov>
* Tuesday, March 31, 1998
*
- * Purpose: Tests the global heap. The global heap is the set of all
- * collections but the collections are not related to one
- * another by anything that appears in the file format.
+ * Purpose: Tests the global heap. The global heap is the set of all
+ * collections but the collections are not related to one
+ * another by anything that appears in the file format.
*/
#include "h5test.h"
-#include "H5private.h"
#include "H5ACprivate.h"
+#include "H5CXprivate.h" /* API Contexts */
#include "H5Eprivate.h"
#include "H5Fprivate.h"
#include "H5Gprivate.h"
@@ -58,18 +56,18 @@ const char *FILENAME[] = {
NULL
};
-
+
/*-------------------------------------------------------------------------
- * Function: test_1
+ * Function: test_1
*
- * Purpose: Writes a sequence of objects to the global heap where each
- * object is larger than the one before.
+ * Purpose: Writes a sequence of objects to the global heap where each
+ * object is larger than the one before.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: number of errors
+ * Failure: number of errors
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Tuesday, March 31, 1998
*
* Modifications:
@@ -79,16 +77,16 @@ const char *FILENAME[] = {
static int
test_1 (hid_t fapl)
{
- hid_t file = -1;
- H5F_t *f = NULL;
- H5HG_t *obj = NULL;
- uint8_t out[GHEAP_TEST_NOBJS];
- uint8_t in[GHEAP_TEST_NOBJS];
- size_t u;
- size_t size;
- herr_t status;
- int nerrors = 0;
- char filename[1024];
+ hid_t file = -1;
+ H5F_t *f = NULL;
+ H5HG_t *obj = NULL;
+ uint8_t out[GHEAP_TEST_NOBJS];
+ uint8_t in[GHEAP_TEST_NOBJS];
+ size_t u;
+ size_t size;
+ herr_t status;
+ int nerrors = 0;
+ char filename[1024];
TESTING("monotonically increasing lengths");
@@ -101,9 +99,9 @@ test_1 (hid_t fapl)
if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
goto error;
if(NULL == (f = (H5F_t *)H5I_object(file))) {
- H5_FAILED();
- puts(" Unable to create file");
- goto error;
+ H5_FAILED();
+ puts(" Unable to create file");
+ goto error;
}
/*
@@ -112,37 +110,37 @@ test_1 (hid_t fapl)
* be monotonically increasing.
*/
for(u = 0; u < GHEAP_TEST_NOBJS; u++) {
- size = u + 1;
- HDmemset(out, (int)('A' + u % 26), size);
- H5Eclear2(H5E_DEFAULT);
- status = H5HG_insert(f, H5AC_ind_read_dxpl_id, size, out, obj + u);
- if(status < 0) {
- H5_FAILED();
- puts(" Unable to insert object into global heap");
- nerrors++;
- } else if(u && H5F_addr_gt(obj[u - 1].addr, obj[u].addr)) {
- H5_FAILED();
- puts(" Collection addresses are not monotonically increasing");
- nerrors++;
- }
+ size = u + 1;
+ HDmemset(out, (int)('A' + u % 26), size);
+ H5Eclear2(H5E_DEFAULT);
+ status = H5HG_insert(f, size, out, obj + u);
+ if(status < 0) {
+ H5_FAILED();
+ puts(" Unable to insert object into global heap");
+ nerrors++;
+ } else if(u && H5F_addr_gt(obj[u - 1].addr, obj[u].addr)) {
+ H5_FAILED();
+ puts(" Collection addresses are not monotonically increasing");
+ nerrors++;
+ }
}
/*
* Now try to read each object back.
*/
for(u = 0; u < GHEAP_TEST_NOBJS; u++) {
- size = u + 1;
- HDmemset(out, (int)('A' + u % 26), size);
- H5Eclear2(H5E_DEFAULT);
- if(NULL == H5HG_read(f, H5AC_ind_read_dxpl_id, obj + u, in, NULL)) {
- H5_FAILED();
- puts(" Unable to read object");
- nerrors++;
- } else if(HDmemcmp(in, out, size)) {
- H5_FAILED();
- puts(" Value read doesn't match value written");
- nerrors++;
- }
+ size = u + 1;
+ HDmemset(out, (int)('A' + u % 26), size);
+ H5Eclear2(H5E_DEFAULT);
+ if(NULL == H5HG_read(f, obj + u, in, NULL)) {
+ H5_FAILED();
+ puts(" Unable to read object");
+ nerrors++;
+ } else if(HDmemcmp(in, out, size)) {
+ H5_FAILED();
+ puts(" Value read doesn't match value written");
+ nerrors++;
+ }
}
/* Release buffer */
@@ -164,18 +162,18 @@ error:
return MAX(1, nerrors);
}
-
+
/*-------------------------------------------------------------------------
- * Function: test_2
+ * Function: test_2
*
- * Purpose: Writes a sequence of objects to the global heap where each
- * object is smaller than the one before.
+ * Purpose: Writes a sequence of objects to the global heap where each
+ * object is smaller than the one before.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: number of errors
+ * Failure: number of errors
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Tuesday, March 31, 1998
*
* Modifications:
@@ -185,15 +183,15 @@ error:
static int
test_2 (hid_t fapl)
{
- hid_t file = -1;
- H5F_t *f = NULL;
- H5HG_t *obj = NULL;
- uint8_t out[GHEAP_TEST_NOBJS];
- uint8_t in[GHEAP_TEST_NOBJS];
- size_t u;
- size_t size;
- int nerrors = 0;
- char filename[1024];
+ hid_t file = -1;
+ H5F_t *f = NULL;
+ H5HG_t *obj = NULL;
+ uint8_t out[GHEAP_TEST_NOBJS];
+ uint8_t in[GHEAP_TEST_NOBJS];
+ size_t u;
+ size_t size;
+ int nerrors = 0;
+ char filename[1024];
TESTING("monotonically decreasing lengths");
@@ -206,41 +204,41 @@ test_2 (hid_t fapl)
if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
goto error;
if(NULL == (f = (H5F_t *)H5I_object(file))) {
- H5_FAILED();
- puts(" Unable to create file");
- goto error;
+ H5_FAILED();
+ puts(" Unable to create file");
+ goto error;
}
/*
* Write the objects, monotonically decreasing in length.
*/
for(u = 0; u < GHEAP_TEST_NOBJS; u++) {
- size = GHEAP_TEST_NOBJS - u;
- HDmemset(out, (int)('A' + u % 26), size);
- H5Eclear2(H5E_DEFAULT);
- if (H5HG_insert (f, H5AC_ind_read_dxpl_id, size, out, obj + u) < 0) {
- H5_FAILED();
- puts(" Unable to insert object into global heap");
- nerrors++;
- }
+ size = GHEAP_TEST_NOBJS - u;
+ HDmemset(out, (int)('A' + u % 26), size);
+ H5Eclear2(H5E_DEFAULT);
+ if (H5HG_insert (f, size, out, obj + u) < 0) {
+ H5_FAILED();
+ puts(" Unable to insert object into global heap");
+ nerrors++;
+ }
}
/*
* Now try to read each object back.
*/
for(u = 0; u < GHEAP_TEST_NOBJS; u++) {
- size = GHEAP_TEST_NOBJS - u;
- HDmemset(out, (int)('A' + u % 26), size);
- H5Eclear2(H5E_DEFAULT);
- if (NULL==H5HG_read (f, H5AC_ind_read_dxpl_id, obj + u, in, NULL)) {
- H5_FAILED();
- puts(" Unable to read object");
- nerrors++;
- } else if (memcmp (in, out, size)) {
- H5_FAILED();
- puts(" Value read doesn't match value written");
- nerrors++;
- }
+ size = GHEAP_TEST_NOBJS - u;
+ HDmemset(out, (int)('A' + u % 26), size);
+ H5Eclear2(H5E_DEFAULT);
+ if(NULL == H5HG_read(f, obj + u, in, NULL)) {
+ H5_FAILED();
+ puts(" Unable to read object");
+ nerrors++;
+ } else if (memcmp (in, out, size)) {
+ H5_FAILED();
+ puts(" Value read doesn't match value written");
+ nerrors++;
+ }
}
/* Release buffer */
@@ -262,18 +260,18 @@ test_2 (hid_t fapl)
return MAX(1, nerrors);
}
-
+
/*-------------------------------------------------------------------------
- * Function: test_3
+ * Function: test_3
*
- * Purpose: Creates a few global heap objects and then removes them all.
- * The collection should also be removed.
+ * Purpose: Creates a few global heap objects and then removes them all.
+ * The collection should also be removed.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: number of errors
+ * Failure: number of errors
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Tuesday, March 31, 1998
*
* Modifications:
@@ -283,15 +281,15 @@ test_2 (hid_t fapl)
static int
test_3 (hid_t fapl)
{
- hid_t file = -1;
- H5F_t *f = NULL;
- H5HG_t *obj = NULL;
- uint8_t out[GHEAP_TEST_NOBJS];
- size_t u;
- size_t size;
- herr_t status;
- int nerrors = 0;
- char filename[1024];
+ hid_t file = -1;
+ H5F_t *f = NULL;
+ H5HG_t *obj = NULL;
+ uint8_t out[GHEAP_TEST_NOBJS];
+ size_t u;
+ size_t size;
+ herr_t status;
+ int nerrors = 0;
+ char filename[1024];
TESTING("complete object removal");
@@ -304,32 +302,32 @@ test_3 (hid_t fapl)
if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
goto error;
if(NULL == (f = (H5F_t *)H5I_object(file))) {
- H5_FAILED();
- puts(" Unable to create file");
- goto error;
+ H5_FAILED();
+ puts(" Unable to create file");
+ goto error;
}
/* Create some stuff */
for(u = 0; u < GHEAP_TEST_NOBJS; u++) {
- size = u % 30 + 100;
- HDmemset(out, (int)('A' + u % 26), size);
- H5Eclear2(H5E_DEFAULT);
- status = H5HG_insert (f, H5AC_ind_read_dxpl_id, size, out, obj + u);
- if (status<0) {
- H5_FAILED();
- puts(" Unable to insert object into global heap");
- nerrors++;
- }
+ size = u % 30 + 100;
+ HDmemset(out, (int)('A' + u % 26), size);
+ H5Eclear2(H5E_DEFAULT);
+ status = H5HG_insert(f, size, out, obj + u);
+ if (status<0) {
+ H5_FAILED();
+ puts(" Unable to insert object into global heap");
+ nerrors++;
+ }
}
/* Remove everything */
for(u = 0; u < GHEAP_TEST_NOBJS; u++) {
- status = H5HG_remove (f, H5AC_ind_read_dxpl_id, obj + u);
- if (status<0) {
- H5_FAILED();
- puts(" Unable to remove object");
- nerrors++;
- }
+ status = H5HG_remove(f, obj + u);
+ if (status<0) {
+ H5_FAILED();
+ puts(" Unable to remove object");
+ nerrors++;
+ }
}
/* Release buffer */
@@ -351,19 +349,19 @@ test_3 (hid_t fapl)
return MAX(1, nerrors);
}
-
+
/*-------------------------------------------------------------------------
- * Function: test_4
+ * Function: test_4
*
- * Purpose: Tests the H5HG_remove() feature by writing lots of objects
- * and occassionally removing some. When we're done they're all
- * removed.
+ * Purpose: Tests the H5HG_remove() feature by writing lots of objects
+ * and occassionally removing some. When we're done they're all
+ * removed.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: number of errors
+ * Failure: number of errors
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Tuesday, March 31, 1998
*
* Modifications:
@@ -373,15 +371,15 @@ test_3 (hid_t fapl)
static int
test_4 (hid_t fapl)
{
- hid_t file = -1;
- H5F_t *f = NULL;
- H5HG_t *obj = NULL;
- uint8_t out[GHEAP_TEST_NOBJS];
- size_t u;
- size_t size;
- herr_t status;
- int nerrors = 0;
- char filename[1024];
+ hid_t file = -1;
+ H5F_t *f = NULL;
+ H5HG_t *obj = NULL;
+ uint8_t out[GHEAP_TEST_NOBJS];
+ size_t u;
+ size_t size;
+ herr_t status;
+ int nerrors = 0;
+ char filename[1024];
TESTING("partial object removal");
@@ -394,38 +392,38 @@ test_4 (hid_t fapl)
if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
goto error;
if(NULL == (f = (H5F_t *)H5I_object(file))) {
- H5_FAILED();
- puts(" Unable to create file");
- goto error;
+ H5_FAILED();
+ puts(" Unable to create file");
+ goto error;
}
for(u = 0; u < GHEAP_TEST_NOBJS; u++) {
- /* Insert */
- size = u % 30 + 100;
- HDmemset(out, (int)('A' + u % 26), size);
- H5Eclear2(H5E_DEFAULT);
- status = H5HG_insert (f, H5AC_ind_read_dxpl_id, size, out, obj + u);
- if (status<0) {
- H5_FAILED();
- puts(" Unable to insert object into global heap");
- nerrors++;
- }
-
- /*
- * Remove every third one beginning with the second, but after the
- * next one has already been inserted. That is, insert A, B, C;
- * remove B, insert D, E, F; remove E; etc.
- */
- if(1 == (u % 3)) {
- H5Eclear2(H5E_DEFAULT);
- status = H5HG_remove (f, H5AC_ind_read_dxpl_id, obj + u - 1);
- if (status<0) {
- H5_FAILED();
- puts(" Unable to remove object");
- nerrors++;
- }
- HDmemset(obj + u - 1, 0, sizeof *obj);
- }
+ /* Insert */
+ size = u % 30 + 100;
+ HDmemset(out, (int)('A' + u % 26), size);
+ H5Eclear2(H5E_DEFAULT);
+ status = H5HG_insert(f, size, out, obj + u);
+ if (status<0) {
+ H5_FAILED();
+ puts(" Unable to insert object into global heap");
+ nerrors++;
+ }
+
+ /*
+ * Remove every third one beginning with the second, but after the
+ * next one has already been inserted. That is, insert A, B, C;
+ * remove B, insert D, E, F; remove E; etc.
+ */
+ if(1 == (u % 3)) {
+ H5Eclear2(H5E_DEFAULT);
+ status = H5HG_remove(f, obj + u - 1);
+ if (status<0) {
+ H5_FAILED();
+ puts(" Unable to remove object");
+ nerrors++;
+ }
+ HDmemset(obj + u - 1, 0, sizeof *obj);
+ }
}
/* Release buffer */
@@ -447,20 +445,20 @@ test_4 (hid_t fapl)
return MAX(1, nerrors);
}
-
+
/*-------------------------------------------------------------------------
- * Function: test_ooo_indices
+ * Function: test_ooo_indices
*
- * Purpose: Tests that indices can be stored out of order. This can
+ * Purpose: Tests that indices can be stored out of order. This can
* happen when the indices "wrap around" due to many
* insertions and deletions (for example, from rewriting a
* VL dataset).
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: number of errors
+ * Failure: number of errors
*
- * Programmer: Neil Fortner
+ * Programmer: Neil Fortner
* Monday, October 26, 2009
*
* Modifications:
@@ -470,13 +468,13 @@ test_4 (hid_t fapl)
static int
test_ooo_indices(hid_t fapl)
{
- hid_t file = -1;
- H5F_t *f = NULL;
- unsigned i, j;
- H5HG_t *obj = NULL;
- herr_t status;
- int nerrors=0;
- char filename[1024];
+ hid_t file = -1;
+ H5F_t *f = NULL;
+ unsigned i, j;
+ H5HG_t *obj = NULL;
+ herr_t status;
+ int nerrors=0;
+ char filename[1024];
TESTING("out of order indices");
@@ -501,7 +499,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, H5AC_ind_read_dxpl_id, sizeof(j), &j, &obj[j]);
+ status = H5HG_insert(f, sizeof(j), &j, &obj[j]);
if (status<0)
GHEAP_REPEATED_ERR(" Unable to insert object into global heap")
@@ -514,7 +512,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, H5AC_ind_read_dxpl_id, &obj[j]);
+ status = H5HG_remove(f, &obj[j]);
if (status<0)
GHEAP_REPEATED_ERR(" Unable to remove object from global heap");
} /* end for */
@@ -536,7 +534,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, H5AC_ind_read_dxpl_id, &obj[i], &j, NULL))
+ if(NULL == H5HG_read(f, &obj[i], &j, NULL))
goto error;
if(i != j) {
H5_FAILED();
@@ -547,8 +545,10 @@ test_ooo_indices(hid_t fapl)
if (H5Fclose(file)<0) goto error;
if (nerrors) goto error;
+
HDfree(obj);
obj = NULL;
+
PASSED();
return 0;
@@ -561,17 +561,17 @@ test_ooo_indices(hid_t fapl)
return MAX(1, nerrors);
} /* end test_ooo_indices */
-
+
/*-------------------------------------------------------------------------
- * Function: main
+ * Function: main
*
- * Purpose: Tests global heap.
+ * Purpose: Tests global heap.
*
- * Return: Success: zero
+ * Return: Success: zero
*
- * Failure: non-zero
+ * Failure: non-zero
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Tuesday, March 31, 1998
*
* Modifications:
@@ -581,12 +581,17 @@ test_ooo_indices(hid_t fapl)
int
main (void)
{
- int nerrors=0;
- hid_t fapl;
+ int nerrors=0;
+ hid_t fapl;
+ hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
h5_reset();
fapl = h5_fileaccess();
+ /* Push API context */
+ if(H5CX_push() < 0) FAIL_STACK_ERROR
+ api_ctx_pushed = TRUE;
+
nerrors += test_1(fapl);
nerrors += test_2(fapl);
nerrors += test_3(fapl);
@@ -596,13 +601,22 @@ main (void)
/* Verify symbol table messages are cached */
nerrors += (h5_verify_cached_stabs(FILENAME, fapl) < 0 ? 1 : 0);
- if (nerrors) goto error;
-
+ if (nerrors)
+ goto error;
puts("All global heap tests passed.");
+
+ /* Pop API context */
+ if(api_ctx_pushed && H5CX_pop() < 0) FAIL_STACK_ERROR
+ api_ctx_pushed = FALSE;
+
h5_cleanup(FILENAME, fapl);
return 0;
error:
puts("*** TESTS FAILED ***");
+
+ if(api_ctx_pushed) H5CX_pop();
+
return 1;
}
+
diff --git a/test/h5test.c b/test/h5test.c
index a36d580..bbdd58b 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
@@ -1598,9 +1596,9 @@ h5_make_local_copy(const char *origfilename, const char *local_copy_name)
goto error;
/* Copy old file into temporary file */
- if((fd_old = HDopen(filename, O_RDONLY, 0666)) < 0)
+ if((fd_old = HDopen(filename, O_RDONLY)) < 0)
goto error;
- if((fd_new = HDopen(local_copy_name, O_RDWR|O_CREAT|O_TRUNC, 0666)) < 0)
+ if((fd_new = HDopen(local_copy_name, O_RDWR|O_CREAT|O_TRUNC, H5_POSIX_CREATE_MODE_RW)) < 0)
goto error;
/* Copy data */
@@ -1830,3 +1828,80 @@ error:
return FAIL;
} /* h5_wait_message() */
+/* Functions for the dummy VFD class (see below).
+ *
+ * Useful for testing things like ID handling where we shouldn't mess with the
+ * real VFDs.
+ */
+static H5FD_t *dummy_vfd_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr);
+static H5FD_t *dummy_vfd_open(const char H5_ATTR_UNUSED *name, unsigned H5_ATTR_UNUSED flags, hid_t H5_ATTR_UNUSED fapl_id, haddr_t H5_ATTR_UNUSED maxaddr) { return NULL; }
+
+static herr_t dummy_vfd_close(H5FD_t *_file);
+static herr_t dummy_vfd_close(H5FD_t H5_ATTR_UNUSED *_file) { return FAIL; }
+
+static haddr_t dummy_vfd_get_eoa(const H5FD_t *file, H5FD_mem_t type);
+static haddr_t dummy_vfd_get_eoa(const H5FD_t H5_ATTR_UNUSED *file, H5FD_mem_t H5_ATTR_UNUSED type) { return HADDR_UNDEF; }
+
+static herr_t dummy_vfd_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr);
+static herr_t dummy_vfd_set_eoa(H5FD_t H5_ATTR_UNUSED *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t H5_ATTR_UNUSED addr) { return FAIL; }
+
+static haddr_t dummy_vfd_get_eof(const H5FD_t *file, H5FD_mem_t type);
+static haddr_t dummy_vfd_get_eof(const H5FD_t H5_ATTR_UNUSED *file, H5FD_mem_t H5_ATTR_UNUSED type) { return HADDR_UNDEF; }
+
+static herr_t dummy_vfd_read(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr, size_t size, void *buf);
+static herr_t dummy_vfd_read(H5FD_t H5_ATTR_UNUSED *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNUSED fapl_id, haddr_t H5_ATTR_UNUSED addr, size_t H5_ATTR_UNUSED size, void H5_ATTR_UNUSED *buf) { return FAIL; }
+
+static herr_t dummy_vfd_write(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr, size_t size, const void *buf);
+static herr_t dummy_vfd_write(H5FD_t H5_ATTR_UNUSED *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNUSED fapl_id, haddr_t H5_ATTR_UNUSED addr, size_t H5_ATTR_UNUSED size, const void H5_ATTR_UNUSED *buf) { return FAIL; }
+
+
+/*-------------------------------------------------------------------------
+ * Function: h5_get_dummy_vfd_class()
+ *
+ * Purpose: Returns a disposable, generally non-functional,
+ * VFD class struct.
+ *
+ * In some of the test code, we need a disposable VFD but
+ * we don't want to mess with the real VFDs and we also
+ * don't have access to the internals of the real VFDs (which
+ * use static globals and functions) to easily duplicate
+ * them (e.g.: for testing VFD ID handling).
+ *
+ * This API call will return a pointer to a VFD class that
+ * can be used to construct a test VFD using H5FDregister().
+ *
+ * Return: Success: A pointer to a VFD class struct
+ * Failure: NULL
+ *
+ *-------------------------------------------------------------------------
+ */
+H5FD_class_t *
+h5_get_dummy_vfd_class(void)
+{
+ H5FD_class_t *vfd_class = NULL; /* Dummy VFD that will be returned */
+
+ /* Create the class and initialize everything to zero/NULL */
+ if(NULL == (vfd_class = (H5FD_class_t *)HDcalloc((size_t)1, sizeof(H5FD_class_t))))
+ TEST_ERROR;
+
+ /* Fill in the minimum parameters to make a VFD that
+ * can be registered.
+ */
+ vfd_class->name = "dummy";
+ vfd_class->maxaddr = 1;
+ vfd_class->open = dummy_vfd_open;
+ vfd_class->close = dummy_vfd_close;
+ vfd_class->get_eoa = dummy_vfd_get_eoa;
+ vfd_class->set_eoa = dummy_vfd_set_eoa;
+ vfd_class->get_eof = dummy_vfd_get_eof;
+ vfd_class->read = dummy_vfd_read;
+ vfd_class->write = dummy_vfd_write;
+
+ return vfd_class;
+
+error:
+ if(vfd_class)
+ HDfree(vfd_class);
+ return NULL;
+} /* h5_get_dummy_vfd_class */
+
diff --git a/test/h5test.h b/test/h5test.h
index e79f2b1..8e87192 100644
--- a/test/h5test.h
+++ b/test/h5test.h
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
@@ -22,8 +20,13 @@
#ifndef _H5TEST_H
#define _H5TEST_H
+/*
+ * Include required headers. This file tests internal library functions,
+ * so we include the private headers here.
+ */
#include "hdf5.h"
#include "H5private.h"
+#include "H5Eprivate.h"
/*
* Predefined test verbosity levels.
@@ -138,6 +141,7 @@ H5TEST_DLL h5_stat_size_t h5_get_file_size(const char *filename, hid_t fapl);
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);
+H5TEST_DLL H5FD_class_t *h5_get_dummy_vfd_class(void);
/* Functions that will replace VFD-dependent functions that violate
* the single responsibility principle. Unlike their predecessors,
diff --git a/test/hyperslab.c b/test/hyperslab.c
index 065d001..feb96bd 100644
--- a/test/hyperslab.c
+++ b/test/hyperslab.c
@@ -5,118 +5,114 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Robb Matzke <matzke@llnl.gov>
- * Friday, October 10, 1997
+/* Programmer: Robb Matzke <matzke@llnl.gov>
+ * Friday, October 10, 1997
*
- * Purpose: Hyperslab operations are rather complex, so this file
- * attempts to test them extensively so we can be relatively
- * sure they really work. We only test 1d, 2d, and 3d cases
- * because testing general dimensionalities would require us to
- * rewrite much of the hyperslab stuff.
+ * Purpose: Hyperslab operations are rather complex, so this file
+ * attempts to test them extensively so we can be relatively
+ * sure they really work. We only test 1d, 2d, and 3d cases
+ * because testing general dimensionalities would require us to
+ * rewrite much of the hyperslab stuff.
*/
#include "h5test.h"
-#include "H5private.h"
-#include "H5Eprivate.h"
#include "H5VMprivate.h"
-#define TEST_SMALL 0x0001
-#define TEST_MEDIUM 0x0002
+#define TEST_SMALL 0x0001
+#define TEST_MEDIUM 0x0002
-#define VARIABLE_SRC 0
-#define VARIABLE_DST 1
-#define VARIABLE_BOTH 2
+#define VARIABLE_SRC 0
+#define VARIABLE_DST 1
+#define VARIABLE_BOTH 2
#define ARRAY_FILL_SIZE 4
#define ARRAY_OFFSET_NDIMS 3
-
+
/*-------------------------------------------------------------------------
- * Function: init_full
+ * Function: init_full
*
- * Purpose: Initialize full array.
+ * Purpose: Initialize full array.
*
- * Return: void
+ * Return: void
*
- * Programmer: Robb Matzke
- * Friday, October 10, 1997
+ * Programmer: Robb Matzke
+ * Friday, October 10, 1997
*
*-------------------------------------------------------------------------
*/
static unsigned
init_full(uint8_t *array, size_t nx, size_t ny, size_t nz)
{
- uint8_t acc = 128;
- unsigned total = 0;
- size_t i, j, k;
+ uint8_t acc = 128;
+ unsigned total = 0;
+ size_t i, j, k;
for(i = 0; i < nx; i++)
- for(j = 0; j < ny; j++)
- for(k = 0; k < nz; k++) {
- total += acc;
- *array = acc;
- acc++;
- array++;
- } /* end for */
+ for(j = 0; j < ny; j++)
+ for(k = 0; k < nz; k++) {
+ total += acc;
+ *array = acc;
+ acc++;
+ array++;
+ } /* end for */
return total;
} /* end init_full() */
-
+
/*-------------------------------------------------------------------------
- * Function: print_array
+ * Function: print_array
*
- * Purpose: Prints the values in an array
+ * Purpose: Prints the values in an array
*
- * Return: void
+ * Return: void
*
- * Programmer: Robb Matzke
- * Friday, October 10, 1997
+ * Programmer: Robb Matzke
+ * Friday, October 10, 1997
*
*-------------------------------------------------------------------------
*/
static void
print_array(uint8_t *array, size_t nx, size_t ny, size_t nz)
{
- size_t i, j, k;
+ size_t i, j, k;
for(i = 0; i < nx; i++) {
- if(nz > 1)
- printf("i=%lu:\n", (unsigned long)i);
- else
- printf("%03lu:", (unsigned long)i);
-
- for(j = 0; j < ny; j++) {
- if(nz > 1)
- printf("%03lu:", (unsigned long)j);
- for(k = 0; k < nz; k++)
- printf(" %3d", *array++);
- if(nz > 1)
- printf("\n");
- } /* end for */
- printf("\n");
+ if(nz > 1)
+ printf("i=%lu:\n", (unsigned long)i);
+ else
+ printf("%03lu:", (unsigned long)i);
+
+ for(j = 0; j < ny; j++) {
+ if(nz > 1)
+ printf("%03lu:", (unsigned long)j);
+ for(k = 0; k < nz; k++)
+ printf(" %3d", *array++);
+ if(nz > 1)
+ printf("\n");
+ } /* end for */
+ printf("\n");
} /* end for */
} /* end print_array() */
-
+
/*-------------------------------------------------------------------------
- * Function: print_ref
+ * Function: print_ref
*
- * Purpose: Prints the reference value
+ * Purpose: Prints the reference value
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure:
+ * Failure:
*
- * Programmer: Robb Matzke
- * Friday, October 10, 1997
+ * Programmer: Robb Matzke
+ * Friday, October 10, 1997
*
*-------------------------------------------------------------------------
*/
@@ -133,37 +129,37 @@ print_ref(size_t nx, size_t ny, size_t nz)
} /* end if */
} /* end print_ref() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_fill
+ * Function: test_fill
*
- * Purpose: Tests the H5VM_hyper_fill() function.
+ * Purpose: Tests the H5VM_hyper_fill() function.
*
- * Return: Success: SUCCEED
+ * Return: Success: SUCCEED
*
- * Failure: FAIL
+ * Failure: FAIL
*
- * Programmer: Robb Matzke
- * Saturday, October 11, 1997
+ * Programmer: Robb Matzke
+ * Saturday, October 11, 1997
*
*-------------------------------------------------------------------------
*/
static herr_t
test_fill(size_t nx, size_t ny, size_t nz,
- size_t di, size_t dj, size_t dk,
- size_t ddx, size_t ddy, size_t ddz)
+ size_t di, size_t dj, size_t dk,
+ size_t ddx, size_t ddy, size_t ddz)
{
- uint8_t *dst = NULL; /*destination array */
- hsize_t hs_size[3]; /*hyperslab size */
- hsize_t dst_size[3]; /*destination total size */
+ uint8_t *dst = NULL; /*destination array */
+ hsize_t hs_size[3]; /*hyperslab size */
+ hsize_t dst_size[3]; /*destination total size */
hsize_t dst_offset[3]; /*offset of hyperslab in dest */
- unsigned ref_value; /*reference value */
- unsigned acc; /*accumulator */
- size_t i, j, k, dx, dy, dz; /*counters */
+ unsigned ref_value; /*reference value */
+ unsigned acc; /*accumulator */
+ size_t i, j, k, dx, dy, dz; /*counters */
size_t u, v, w;
- unsigned ndims; /*hyperslab dimensionality */
- char dim[64], s[256]; /*temp string */
- unsigned fill_value; /*fill value */
+ unsigned ndims; /*hyperslab dimensionality */
+ char dim[64], s[256]; /*temp string */
+ unsigned fill_value; /*fill value */
/*
* Dimensionality.
@@ -192,7 +188,7 @@ test_fill(size_t nx, size_t ny, size_t nz,
/* Allocate array */
if(NULL == (dst = (uint8_t *)HDcalloc((size_t)1, nx * ny * nz)))
TEST_ERROR
-
+
init_full(dst, nx, ny, nz);
for(i = 0; i < nx; i += di) {
@@ -281,52 +277,52 @@ error:
return FAIL;
} /* end test_fill() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_copy
+ * Function: test_copy
*
- * Purpose: Tests H5VM_hyper_copy().
+ * Purpose: Tests H5VM_hyper_copy().
*
- * The NX, NY, and NZ arguments are the size for the source and
- * destination arrays. You may pass zero for NZ or for NY and
- * NZ to test the 2-d and 1-d cases respectively.
+ * The NX, NY, and NZ arguments are the size for the source and
+ * destination arrays. You may pass zero for NZ or for NY and
+ * NZ to test the 2-d and 1-d cases respectively.
*
- * A hyperslab is copied from/to (depending on MODE) various
- * places in SRC and DST beginning at 0,0,0 and increasing
- * location by DI,DJ,DK in the x, y, and z directions.
+ * A hyperslab is copied from/to (depending on MODE) various
+ * places in SRC and DST beginning at 0,0,0 and increasing
+ * location by DI,DJ,DK in the x, y, and z directions.
*
- * For each hyperslab location, various sizes of hyperslabs are
- * tried beginning with 1x1x1 and increasing the size in each
- * dimension by DDX,DDY,DDZ.
+ * For each hyperslab location, various sizes of hyperslabs are
+ * tried beginning with 1x1x1 and increasing the size in each
+ * dimension by DDX,DDY,DDZ.
*
- * Return: Success: SUCCEED
+ * Return: Success: SUCCEED
*
- * Failure: FAIL
+ * Failure: FAIL
*
- * Programmer: Robb Matzke
- * Friday, October 10, 1997
+ * Programmer: Robb Matzke
+ * Friday, October 10, 1997
*
*-------------------------------------------------------------------------
*/
static herr_t
test_copy(int mode,
- size_t nx, size_t ny, size_t nz,
- size_t di, size_t dj, size_t dk,
- size_t ddx, size_t ddy, size_t ddz)
+ size_t nx, size_t ny, size_t nz,
+ size_t di, size_t dj, size_t dk,
+ size_t ddx, size_t ddy, size_t ddz)
{
- uint8_t *src = NULL; /*source array */
- uint8_t *dst = NULL; /*destination array */
- hsize_t hs_size[3]; /*hyperslab size */
- hsize_t dst_size[3]; /*destination total size */
- hsize_t src_size[3]; /*source total size */
- hsize_t dst_offset[3]; /*offset of hyperslab in dest */
+ uint8_t *src = NULL; /*source array */
+ uint8_t *dst = NULL; /*destination array */
+ hsize_t hs_size[3]; /*hyperslab size */
+ hsize_t dst_size[3]; /*destination total size */
+ hsize_t src_size[3]; /*source total size */
+ hsize_t dst_offset[3]; /*offset of hyperslab in dest */
hsize_t src_offset[3]; /*offset of hyperslab in source */
- unsigned ref_value; /*reference value */
- unsigned acc; /*accumulator */
- hsize_t i, j, k, dx, dy, dz; /*counters */
+ unsigned ref_value; /*reference value */
+ unsigned acc; /*accumulator */
+ hsize_t i, j, k, dx, dy, dz; /*counters */
hsize_t u, v, w;
- unsigned ndims; /*hyperslab dimensionality */
- char dim[64], s[256]; /*temp string */
+ unsigned ndims; /*hyperslab dimensionality */
+ char dim[64], s[256]; /*temp string */
const char *sub;
/*
@@ -495,7 +491,7 @@ test_copy(int mode,
(unsigned long)dy,
(unsigned long)dz);
print_ref(nx, ny, nz);
- printf("\n Destination array is:\n");
+ printf("\n Destination array is:\n");
print_array(dst, nx, ny, nz);
} /* end if */
goto error;
@@ -537,7 +533,7 @@ test_copy(int mode,
(unsigned long)dy,
(unsigned long)dz);
print_ref(nx, ny, nz);
- printf("\n Destination array is:\n");
+ printf("\n Destination array is:\n");
print_array(dst, nx, ny, nz);
} /* end if */
goto error;
@@ -565,38 +561,38 @@ error:
return FAIL;
} /* end test_copy() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_multifill
+ * Function: test_multifill
*
- * Purpose: Tests the H5VM_stride_copy() function by using it to fill a
- * hyperslab by replicating a multi-byte sequence. This might
- * be useful to initialize an array of structs with a default
- * struct value, or to initialize an array of floating-point
- * values with a default bit-pattern.
+ * Purpose: Tests the H5VM_stride_copy() function by using it to fill a
+ * hyperslab by replicating a multi-byte sequence. This might
+ * be useful to initialize an array of structs with a default
+ * struct value, or to initialize an array of floating-point
+ * values with a default bit-pattern.
*
- * Return: Success: SUCCEED
+ * Return: Success: SUCCEED
*
- * Failure: FAIL
+ * Failure: FAIL
*
- * Programmer: Robb Matzke
- * Saturday, October 11, 1997
+ * Programmer: Robb Matzke
+ * Saturday, October 11, 1997
*
*-------------------------------------------------------------------------
*/
static herr_t
test_multifill(size_t nx)
{
- hsize_t size;
- hsize_t src_stride;
- hsize_t dst_stride;
- char s[64];
+ hsize_t size;
+ hsize_t src_stride;
+ hsize_t dst_stride;
+ char s[64];
struct a_struct {
int left;
double mid;
int right;
} fill, *src = NULL, *dst = NULL;
- hsize_t i, j;
+ hsize_t i, j;
printf("%-70s", "Testing multi-byte fill value");
fflush(stdout);
@@ -617,7 +613,7 @@ test_multifill(size_t nx)
} /* end for */
/*
- * Describe the fill value. The zero stride says to read the same thing
+ * Describe the fill value. The zero stride says to read the same thing
* over and over again.
*/
fill.left = 55555555;
@@ -686,32 +682,32 @@ error:
return FAIL;
} /* end test_multifill() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_endian
+ * Function: test_endian
*
- * Purpose: Tests the H5VM_stride_copy() function by using it to copy an
- * array of integers and swap the byte ordering from little
- * endian to big endian or vice versa depending on the hardware.
+ * Purpose: Tests the H5VM_stride_copy() function by using it to copy an
+ * array of integers and swap the byte ordering from little
+ * endian to big endian or vice versa depending on the hardware.
*
- * Return: Success: SUCCEED
+ * Return: Success: SUCCEED
*
- * Failure: FAIL
+ * Failure: FAIL
*
- * Programmer: Robb Matzke
- * Saturday, October 11, 1997
+ * Programmer: Robb Matzke
+ * Saturday, October 11, 1997
*
*-------------------------------------------------------------------------
*/
static herr_t
test_endian(size_t nx)
{
- uint8_t *src = NULL; /*source array */
- uint8_t *dst = NULL; /*destination array */
- hssize_t src_stride[2]; /*source strides */
- hssize_t dst_stride[2]; /*destination strides */
- hsize_t size[2]; /*size vector */
- hsize_t i, j;
+ uint8_t *src = NULL; /*source array */
+ uint8_t *dst = NULL; /*destination array */
+ hssize_t src_stride[2]; /*source strides */
+ hssize_t dst_stride[2]; /*destination strides */
+ hsize_t size[2]; /*size vector */
+ hsize_t i, j;
printf("%-70s", "Testing endian conversion by stride");
fflush(stdout);
@@ -749,7 +745,7 @@ test_endian(size_t nx)
printf(" i=%lu, j=%lu\n", (unsigned long)i, (unsigned long)j);
printf(" Source array is:\n");
print_array(src, nx, (size_t)4, (size_t)1);
- printf("\n Result is:\n");
+ printf("\n Result is:\n");
print_array(dst, nx, (size_t)4, (size_t)1);
} /* end if */
goto error;
@@ -773,31 +769,31 @@ error:
return FAIL;
} /* end test_endian() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_transpose
+ * Function: test_transpose
*
- * Purpose: Copy a 2d array from here to there and transpose the elements
- * as it's copied.
+ * Purpose: Copy a 2d array from here to there and transpose the elements
+ * as it's copied.
*
- * Return: Success: SUCCEED
+ * Return: Success: SUCCEED
*
- * Failure: FAIL
+ * Failure: FAIL
*
- * Programmer: Robb Matzke
- * Saturday, October 11, 1997
+ * Programmer: Robb Matzke
+ * Saturday, October 11, 1997
*
*-------------------------------------------------------------------------
*/
static herr_t
test_transpose(size_t nx, size_t ny)
{
- int *src = NULL;
- int *dst = NULL;
- hsize_t src_stride[2], dst_stride[2];
- hsize_t size[2];
- char s[256];
- hsize_t i, j;
+ int *src = NULL;
+ int *dst = NULL;
+ hsize_t src_stride[2], dst_stride[2];
+ hsize_t size[2];
+ char s[256];
+ hsize_t i, j;
sprintf(s, "Testing 2d transpose by stride %4lux%-lud", (unsigned long)nx,
(unsigned long)ny);
@@ -845,7 +841,7 @@ test_transpose(size_t nx, size_t ny)
printf(" %6d", src[i * ny + j]);
printf("\n");
} /* end for */
- printf("\n Destination is:\n");
+ printf("\n Destination is:\n");
for (i = 0; i < ny; i++) {
printf("%3lu:", (unsigned long)i);
for(j = 0; j < nx; j++)
@@ -874,35 +870,35 @@ error:
return FAIL;
} /* end test_transpose() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_sub_super
+ * Function: test_sub_super
*
- * Purpose: Tests H5VM_stride_copy() to reduce the resolution of an image
- * by copying half the pixels in the X and Y directions. Then
- * we use the small image and duplicate every pixel to result in
- * a 2x2 square.
+ * Purpose: Tests H5VM_stride_copy() to reduce the resolution of an image
+ * by copying half the pixels in the X and Y directions. Then
+ * we use the small image and duplicate every pixel to result in
+ * a 2x2 square.
*
- * Return: Success: SUCCEED
+ * Return: Success: SUCCEED
*
- * Failure: FAIL
+ * Failure: FAIL
*
- * Programmer: Robb Matzke
- * Monday, October 13, 1997
+ * Programmer: Robb Matzke
+ * Monday, October 13, 1997
*
*-------------------------------------------------------------------------
*/
static herr_t
test_sub_super(size_t nx, size_t ny)
{
- uint8_t *full = NULL; /*original image */
- uint8_t *half = NULL; /*image at 1/2 resolution */
- uint8_t *twice = NULL; /*2x2 pixels */
- hsize_t src_stride[4]; /*source stride info */
- hsize_t dst_stride[4]; /*destination stride info */
- hsize_t size[4]; /*number of sample points */
- hsize_t i, j;
- char s[256];
+ uint8_t *full = NULL; /*original image */
+ uint8_t *half = NULL; /*image at 1/2 resolution */
+ uint8_t *twice = NULL; /*2x2 pixels */
+ hsize_t src_stride[4]; /*source stride info */
+ hsize_t dst_stride[4]; /*destination stride info */
+ hsize_t size[4]; /*number of sample points */
+ hsize_t i, j;
+ char s[256];
sprintf(s, "Testing image sampling %4lux%-4lu to %4lux%-4lu ",
(unsigned long)(2 * nx), (unsigned long)(2 * ny),
@@ -944,7 +940,7 @@ test_sub_super(size_t nx, size_t ny)
(unsigned long)i, (unsigned long)j);
printf(" full is:\n");
print_array(full, 2 * nx, 2 * ny, (size_t)1);
- printf("\n half is:\n");
+ printf("\n half is:\n");
print_array(half, nx, ny, (size_t)1);
} /* end if */
goto error;
@@ -1007,7 +1003,7 @@ test_sub_super(size_t nx, size_t ny)
AT();
printf(" %s\n Half is:\n", s);
print_array(half, nx, ny, (size_t)1);
- printf("\n Twice is:\n");
+ printf("\n Twice is:\n");
print_array(twice, 2 * nx, 2 * ny, (size_t)1);
} /* end if */
goto error;
@@ -1034,20 +1030,20 @@ error:
return FAIL;
} /* test_sub_super() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_array_fill
+ * Function: test_array_fill
*
- * Purpose: Tests H5VM_array_fill routine by copying a multibyte value
+ * Purpose: Tests H5VM_array_fill routine by copying a multibyte value
* (an array of ints, in our case) into all the elements of an
* array.
*
- * Return: Success: SUCCEED
+ * Return: Success: SUCCEED
*
- * Failure: FAIL
+ * Failure: FAIL
*
- * Programmer: Quincey Koziol
- * Monday, April 21, 2003
+ * Programmer: Quincey Koziol
+ * Monday, April 21, 2003
*
*-------------------------------------------------------------------------
*/
@@ -1056,8 +1052,8 @@ test_array_fill(size_t lo, size_t hi)
{
int *dst = NULL; /* Destination */
int src[ARRAY_FILL_SIZE]; /* Source to duplicate */
- size_t u, v, w; /* Local index variables */
- char s[256];
+ size_t u, v, w; /* Local index variables */
+ char s[256];
sprintf(s, "array filling %4lu-%-4lu elements", (unsigned long)lo,(unsigned long)hi);
TESTING(s);
@@ -1095,20 +1091,20 @@ error:
return FAIL;
} /* end test_array_fill() */
-
+
/*-------------------------------------------------------------------------
- * Function: test_array_offset_n_calc
+ * Function: test_array_offset_n_calc
*
- * Purpose: Tests H5VM_array_offset and H5VM_array_calc routines by comparing
+ * Purpose: Tests H5VM_array_offset and H5VM_array_calc routines by comparing
* computed array offsets against calculated ones and then going
* back to the coordinates from the offset and checking those.
*
- * Return: Success: SUCCEED
+ * Return: Success: SUCCEED
*
- * Failure: FAIL
+ * Failure: FAIL
*
- * Programmer: Quincey Koziol
- * Monday, April 21, 2003
+ * Programmer: Quincey Koziol
+ * Monday, April 21, 2003
*
*-------------------------------------------------------------------------
*/
@@ -1118,11 +1114,11 @@ test_array_offset_n_calc(size_t n, size_t x, size_t y, size_t z)
hsize_t *a = NULL;
hsize_t *temp_a; /* Array for stored calculated offsets */
hsize_t off; /* Offset in array */
- size_t u, v, w; /* Local index variables */
+ size_t u, v, w; /* Local index variables */
hsize_t dims[ARRAY_OFFSET_NDIMS]; /* X, Y & X coordinates of array to check */
hsize_t coords[ARRAY_OFFSET_NDIMS]; /* X, Y & X coordinates to check offset of */
hsize_t new_coords[ARRAY_OFFSET_NDIMS]; /* X, Y & X coordinates of offset */
- char s[256];
+ char s[256];
sprintf(s, "array offset %4lux%4lux%4lu elements", (unsigned long)z,(unsigned long)y,(unsigned long)x);
TESTING(s);
@@ -1180,29 +1176,29 @@ error:
return FAIL;
} /* end test_array_offset_n_calc() */
-
+
/*-------------------------------------------------------------------------
- * Function: main
+ * Function: main
*
- * Purpose: Test various hyperslab operations. Give the words
- * `small' and/or `medium' on the command line or only `small'
- * is assumed.
+ * Purpose: Test various hyperslab operations. Give the words
+ * `small' and/or `medium' on the command line or only `small'
+ * is assumed.
*
- * Return: Success: exit(EXIT_SUCCESS)
+ * Return: Success: exit(EXIT_SUCCESS)
*
- * Failure: exit(EXIT_FAILURE)
+ * Failure: exit(EXIT_FAILURE)
*
- * Programmer: Robb Matzke
- * Friday, October 10, 1997
+ * Programmer: Robb Matzke
+ * Friday, October 10, 1997
*
*-------------------------------------------------------------------------
*/
int
main(int argc, char *argv[])
{
- herr_t status;
- int nerrors = 0;
- unsigned size_of_test;
+ herr_t status;
+ int nerrors = 0;
+ unsigned size_of_test;
/* Parse arguments or assume `small' & `medium' */
if(1 == argc)
diff --git a/test/istore.c b/test/istore.c
index f6b83c9..b5bac2c 100644
--- a/test/istore.c
+++ b/test/istore.c
@@ -5,32 +5,28 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Robb Matzke <matzke@llnl.gov>
- * Wednesday, October 15, 1997
+/* Programmer: Robb Matzke <matzke@llnl.gov>
+ * Wednesday, October 15, 1997
*
- * Purpose: Tests various aspects of indexed raw data storage.
+ * Purpose: Tests various aspects of indexed raw data storage.
*/
-#define H5F_FRIEND /*suppress error about including H5Fpkg */
+#define H5F_FRIEND /*suppress error about including H5Fpkg */
#include "h5test.h"
-#include "H5private.h"
+
#include "H5Dprivate.h"
-#include "H5Eprivate.h"
#include "H5Iprivate.h"
#include "H5Pprivate.h"
#include "H5Fpkg.h"
#include "H5Gprivate.h"
#include "H5Oprivate.h"
-#include "H5Pprivate.h"
#include "H5VMprivate.h"
const char *FILENAME[] = {
@@ -39,9 +35,9 @@ const char *FILENAME[] = {
};
-#define TEST_SMALL 0x0001
-#define TEST_MEDIUM 0x0002
-#define TEST_LARGE 0x0004
+#define TEST_SMALL 0x0001
+#define TEST_MEDIUM 0x0002
+#define TEST_LARGE 0x0004
/* The datatype of the dataset operated on by this test */
#define TEST_DATATYPE H5T_NATIVE_UCHAR
@@ -52,19 +48,19 @@ const char *FILENAME[] = {
hsize_t chunk_dims[H5O_LAYOUT_NDIMS];
hsize_t zero[H5O_LAYOUT_NDIMS];
-
+
/*-------------------------------------------------------------------------
- * Function: is_sparse
+ * Function: is_sparse
*
- * Purpose: Determines if the file system of the current working
- * directory supports holes.
+ * Purpose: Determines if the file system of the current working
+ * directory supports holes.
*
- * Return: Success: Non-zero if holes are supported; zero
- * otherwise.
+ * Return: Success: Non-zero if holes are supported; zero
+ * otherwise.
*
- * Failure: zero
+ * Failure: zero
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Wednesday, July 15, 1998
*
*-------------------------------------------------------------------------
@@ -72,10 +68,10 @@ hsize_t zero[H5O_LAYOUT_NDIMS];
static int
is_sparse(void)
{
- int fd;
- h5_stat_t sb;
+ int fd;
+ h5_stat_t sb;
- if ((fd=HDopen("x.h5", O_RDWR|O_TRUNC|O_CREAT, 0666)) < 0) return 0;
+ if ((fd = HDopen("x.h5", O_RDWR|O_TRUNC|O_CREAT, H5_POSIX_CREATE_MODE_RW)) < 0) return 0;
if (HDlseek(fd, (off_t)(1024*1024), SEEK_SET)!=1024*1024) return 0;
if (5!=HDwrite(fd, "hello", (size_t)5)) return 0;
if (HDclose(fd) < 0) return 0;
@@ -88,16 +84,16 @@ is_sparse(void)
#endif
}
-
+
/*-------------------------------------------------------------------------
- * Function: print_array
+ * Function: print_array
*
- * Purpose: Prints the values in an array
+ * Purpose: Prints the values in an array
*
- * Return: void
+ * Return: void
*
- * Programmer: Robb Matzke
- * Friday, October 10, 1997
+ * Programmer: Robb Matzke
+ * Friday, October 10, 1997
*
* Modifications:
*
@@ -106,41 +102,41 @@ is_sparse(void)
static void
print_array(uint8_t *array, size_t nx, size_t ny, size_t nz)
{
- size_t i, j, k;
+ size_t i, j, k;
for (i = 0; i < nx; i++) {
- if (nz > 1) {
- fprintf(stderr,"i=%lu:\n", (unsigned long)i);
- } else {
- fprintf(stderr,"%03lu:", (unsigned long)i);
- }
-
- for (j = 0; j < ny; j++) {
- if (nz > 1)
- fprintf(stderr,"%03lu:", (unsigned long)j);
- for (k = 0; k < nz; k++) {
- fprintf(stderr," %3d", *array++);
- }
- if (nz > 1)
- fprintf(stderr,"\n");
- }
- fprintf(stderr,"\n");
+ if (nz > 1) {
+ fprintf(stderr,"i=%lu:\n", (unsigned long)i);
+ } else {
+ fprintf(stderr,"%03lu:", (unsigned long)i);
+ }
+
+ for (j = 0; j < ny; j++) {
+ if (nz > 1)
+ fprintf(stderr,"%03lu:", (unsigned long)j);
+ for (k = 0; k < nz; k++) {
+ fprintf(stderr," %3d", *array++);
+ }
+ if (nz > 1)
+ fprintf(stderr,"\n");
+ }
+ fprintf(stderr,"\n");
}
}
-
+
/*-------------------------------------------------------------------------
- * Function: new_object
+ * Function: new_object
*
- * Purpose: Creates a new object that refers to a indexed storage of raw
- * data. No raw data is stored.
+ * Purpose: Creates a new object that refers to a indexed storage of raw
+ * data. No raw data is stored.
*
- * Return: Success: ID of dataset
+ * Return: Success: ID of dataset
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Robb Matzke
- * Wednesday, October 15, 1997
+ * Programmer: Robb Matzke
+ * Wednesday, October 15, 1997
*
* Modifications:
* Converted to use datasets instead of directly messing with
@@ -184,19 +180,19 @@ error:
return -1;
}
-
+
/*-------------------------------------------------------------------------
- * Function: test_create
+ * Function: test_create
*
- * Purpose: Creates a named object that refers to indexed storage of raw
- * data. No raw data is stored.
+ * Purpose: Creates a named object that refers to indexed storage of raw
+ * data. No raw data is stored.
*
- * Return: Success: SUCCEED
+ * Return: Success: SUCCEED
*
- * Failure: FAIL
+ * Failure: FAIL
*
- * Programmer: Robb Matzke
- * Wednesday, October 15, 1997
+ * Programmer: Robb Matzke
+ * Wednesday, October 15, 1997
*
* Modifications:
*
@@ -219,9 +215,9 @@ test_create(hid_t f, const char *prefix)
dims[u] = my_chunk_dims[u] = 2;
/* Create chunked dataset of this dimensionality */
- HDsnprintf(name, sizeof name, "%s_%02u", prefix, u);
- if ((dataset=new_object(f, name, (int)u, dims, my_chunk_dims)) < 0)
- return FAIL;
+ HDsnprintf(name, sizeof name, "%s_%02u", prefix, u);
+ if ((dataset=new_object(f, name, (int)u, dims, my_chunk_dims)) < 0)
+ return FAIL;
/* Close dataset created */
if(H5Dclose(dataset) < 0)
@@ -232,20 +228,20 @@ test_create(hid_t f, const char *prefix)
return SUCCEED;
}
-
+
/*-------------------------------------------------------------------------
- * Function: test_extend
+ * Function: test_extend
*
- * Purpose: Creates an empty object and then writes to it in such a way
- * as to always extend the object's domain without creating
- * holes and without causing the object to become concave.
+ * Purpose: Creates an empty object and then writes to it in such a way
+ * as to always extend the object's domain without creating
+ * holes and without causing the object to become concave.
*
- * Return: Success: SUCCEED
+ * Return: Success: SUCCEED
*
- * Failure: FAIL
+ * Failure: FAIL
*
- * Programmer: Robb Matzke
- * Wednesday, October 15, 1997
+ * Programmer: Robb Matzke
+ * Wednesday, October 15, 1997
*
* Modifications:
*
@@ -253,35 +249,35 @@ test_create(hid_t f, const char *prefix)
*/
static herr_t
test_extend(hid_t f, const char *prefix,
- size_t nx, size_t ny, size_t nz)
+ size_t nx, size_t ny, size_t nz)
{
hid_t dataset; /* Dataset ID */
hid_t fspace; /* Dataset's file dataspace */
hid_t mspace; /* Dataset's memory dataspace */
- size_t i, j, k, ctr;
- int ndims;
- uint8_t *buf = NULL, *check = NULL, *whole = NULL;
- char dims[64], s[256], name[256];
- hsize_t offset[3];
- hsize_t max_corner[3];
- hsize_t size[3];
- hsize_t whole_size[3];
- hsize_t nelmts;
+ size_t i, j, k, ctr;
+ int ndims;
+ uint8_t *buf = NULL, *check = NULL, *whole = NULL;
+ char dims[64], s[256], name[256];
+ hsize_t offset[3];
+ hsize_t max_corner[3];
+ hsize_t size[3];
+ hsize_t whole_size[3];
+ hsize_t nelmts;
if (!nz) {
- if (!ny) {
- ndims = 1;
- ny = nz = 1;
- sprintf(dims, "%lu", (unsigned long) nx);
- } else {
- ndims = 2;
- nz = 1;
- sprintf(dims, "%lux%lu", (unsigned long) nx, (unsigned long) ny);
- }
+ if (!ny) {
+ ndims = 1;
+ ny = nz = 1;
+ sprintf(dims, "%lu", (unsigned long) nx);
} else {
- ndims = 3;
- sprintf(dims, "%lux%lux%lu",
- (unsigned long) nx, (unsigned long) ny, (unsigned long) nz);
+ ndims = 2;
+ nz = 1;
+ sprintf(dims, "%lux%lu", (unsigned long) nx, (unsigned long) ny);
+ }
+ } else {
+ ndims = 3;
+ sprintf(dims, "%lux%lux%lu",
+ (unsigned long) nx, (unsigned long) ny, (unsigned long) nz);
}
sprintf(s, "istore extend: %s", dims);
@@ -300,57 +296,57 @@ test_extend(hid_t f, const char *prefix,
/* Build the new empty object */
sprintf(name, "%s_%s", prefix, dims);
if ((dataset=new_object(f, name, ndims, whole_size, whole_size)) < 0) {
- fprintf(stderr," Cannot create %u-d object `%s'\n", ndims, name);
- goto error;
+ fprintf(stderr," Cannot create %u-d object `%s'\n", ndims, name);
+ goto error;
}
/* Get dataset's dataspace */
if((fspace=H5Dget_space(dataset)) < 0) TEST_ERROR;
for (ctr = 0;
- H5VM_vector_lt_u((unsigned)ndims, max_corner, whole_size);
- ctr++) {
-
- /* Size and location */
- if (0 == ctr) {
- offset[0] = offset[1] = offset[2] = 0;
- size[0] = size[1] = size[2] = 1;
- nelmts = 1;
- } else {
- for (i=0, nelmts=1; i<(size_t)ndims; i++) {
- if (ctr % (size_t)ndims == i) {
- offset[i] = max_corner[i];
- size[i] = MIN(1, whole_size[i] - offset[i]);
- } else {
- offset[i] = 0;
- size[i] = max_corner[i];
- }
- nelmts *= size[i];
- }
- }
+ H5VM_vector_lt_u((unsigned)ndims, max_corner, whole_size);
+ ctr++) {
+
+ /* Size and location */
+ if (0 == ctr) {
+ offset[0] = offset[1] = offset[2] = 0;
+ size[0] = size[1] = size[2] = 1;
+ nelmts = 1;
+ } else {
+ for (i=0, nelmts=1; i<(size_t)ndims; i++) {
+ if (ctr % (size_t)ndims == i) {
+ offset[i] = max_corner[i];
+ size[i] = MIN(1, whole_size[i] - offset[i]);
+ } else {
+ offset[i] = 0;
+ size[i] = max_corner[i];
+ }
+ nelmts *= size[i];
+ }
+ }
#if 0
- if (0 == ctr)
- fprintf(stderr,"\n");
- fprintf(stderr," Insert: ctr=%lu, corner=(%ld", (unsigned long)ctr, (long)offset[0]);
- if (ndims > 1)
- fprintf(stderr,",%ld", (long)offset[1]);
- if (ndims > 2)
- fprintf(stderr,",%ld", (long)offset[2]);
- fprintf(stderr,"), size=(%lu", (unsigned long)size[0]);
- if (ndims > 1)
- fprintf(stderr,",%lu", (unsigned long)size[1]);
- if (ndims > 2)
- fprintf(stderr,",%lu", (unsigned long)size[2]);
- fprintf(stderr,"), %lu element%s", (unsigned long)nelmts, 1 == nelmts ? "" : "s");
- if (0 == nelmts)
- fprintf(stderr," *SKIPPED*");
- fprintf(stderr,"\n");
+ if (0 == ctr)
+ fprintf(stderr,"\n");
+ fprintf(stderr," Insert: ctr=%lu, corner=(%ld", (unsigned long)ctr, (long)offset[0]);
+ if (ndims > 1)
+ fprintf(stderr,",%ld", (long)offset[1]);
+ if (ndims > 2)
+ fprintf(stderr,",%ld", (long)offset[2]);
+ fprintf(stderr,"), size=(%lu", (unsigned long)size[0]);
+ if (ndims > 1)
+ fprintf(stderr,",%lu", (unsigned long)size[1]);
+ if (ndims > 2)
+ fprintf(stderr,",%lu", (unsigned long)size[2]);
+ fprintf(stderr,"), %lu element%s", (unsigned long)nelmts, 1 == nelmts ? "" : "s");
+ if (0 == nelmts)
+ fprintf(stderr," *SKIPPED*");
+ fprintf(stderr,"\n");
#endif
- /* Fill the source array */
- if (0 == nelmts) continue;
- HDmemset(buf, (signed)(128+ctr), (size_t)nelmts);
+ /* Fill the source array */
+ if (0 == nelmts) continue;
+ HDmemset(buf, (signed)(128+ctr), (size_t)nelmts);
/* Create dataspace for selection in memory */
if((mspace=H5Screate_simple(1,&nelmts,NULL)) < 0) TEST_ERROR;
@@ -358,72 +354,72 @@ test_extend(hid_t f, const char *prefix,
/* Select region in file dataspace */
if(H5Sselect_hyperslab(fspace,H5S_SELECT_SET,offset,NULL,size,NULL) < 0) TEST_ERROR;
- /* Write to disk */
- if (H5Dwrite(dataset, TEST_DATATYPE, mspace, fspace, H5P_DEFAULT, buf) < 0) {
- H5_FAILED();
- fprintf(stderr," Write failed: ctr=%lu\n", (unsigned long)ctr);
- goto error;
- }
-
- /* Read from disk */
- HDmemset(check, 0xff, (size_t)nelmts);
- if (H5Dread(dataset, TEST_DATATYPE, mspace, fspace, H5P_DEFAULT, check) < 0) {
- H5_FAILED();
- fprintf(stderr," Read failed: ctr=%lu\n", (unsigned long)ctr);
- goto error;
- }
- if (HDmemcmp(buf, check, (size_t)nelmts)) {
- H5_FAILED();
- fprintf(stderr," Read check failed: ctr=%lu\n", (unsigned long)ctr);
- fprintf(stderr," Wrote:\n");
- print_array(buf, (size_t)size[0], (size_t)size[1],
- (size_t)size[2]);
- fprintf(stderr," Read:\n");
- print_array(check, (size_t)size[0], (size_t)size[1],
- (size_t)size[2]);
- goto error;
- }
+ /* Write to disk */
+ if (H5Dwrite(dataset, TEST_DATATYPE, mspace, fspace, H5P_DEFAULT, buf) < 0) {
+ H5_FAILED();
+ fprintf(stderr," Write failed: ctr=%lu\n", (unsigned long)ctr);
+ goto error;
+ }
+
+ /* Read from disk */
+ HDmemset(check, 0xff, (size_t)nelmts);
+ if (H5Dread(dataset, TEST_DATATYPE, mspace, fspace, H5P_DEFAULT, check) < 0) {
+ H5_FAILED();
+ fprintf(stderr," Read failed: ctr=%lu\n", (unsigned long)ctr);
+ goto error;
+ }
+ if (HDmemcmp(buf, check, (size_t)nelmts)) {
+ H5_FAILED();
+ fprintf(stderr," Read check failed: ctr=%lu\n", (unsigned long)ctr);
+ fprintf(stderr," Wrote:\n");
+ print_array(buf, (size_t)size[0], (size_t)size[1],
+ (size_t)size[2]);
+ fprintf(stderr," Read:\n");
+ print_array(check, (size_t)size[0], (size_t)size[1],
+ (size_t)size[2]);
+ goto error;
+ }
/* Close memory dataspace */
if(H5Sclose(mspace) < 0) TEST_ERROR;
- /* Write to `whole' buffer for later checking */
- H5VM_hyper_copy((unsigned)ndims, size,
- whole_size, offset, whole, /*dst*/
- size, H5VM_ZERO, buf); /*src*/
+ /* Write to `whole' buffer for later checking */
+ H5VM_hyper_copy((unsigned)ndims, size,
+ whole_size, offset, whole, /*dst*/
+ size, H5VM_ZERO, buf); /*src*/
- /* Update max corner */
- for (i=0; i<(size_t)ndims; i++)
- max_corner[i] = MAX(max_corner[i], offset[i]+size[i]);
+ /* Update max corner */
+ for (i=0; i<(size_t)ndims; i++)
+ max_corner[i] = MAX(max_corner[i], offset[i]+size[i]);
}
/* Now read the entire array back out and check it */
HDmemset(buf, 0xff, nx * ny * nz);
if (H5Dread(dataset, TEST_DATATYPE, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) {
- H5_FAILED();
- fprintf(stderr," Read failed for whole array.\n");
- goto error;
+ H5_FAILED();
+ fprintf(stderr," Read failed for whole array.\n");
+ goto error;
}
for (i=0; i<nx; i++) {
- for (j=0; j<ny; j++) {
- for (k=0; k<nz; k++) {
- if (whole[i*ny*nz + j*nz + k] != buf[i*ny*nz + j*nz + k]) {
- H5_FAILED();
- fprintf(stderr," Check failed at i=%lu", (unsigned long)i);
- if (ndims > 1) {
- fprintf(stderr,", j=%lu", (unsigned long)j);
- }
- if (ndims > 2) {
- fprintf(stderr,", k=%lu", (unsigned long)k);
- }
- fprintf(stderr,"\n Check array is:\n");
- print_array(whole, nx, ny, nz);
- fprintf(stderr," Value read is:\n");
- print_array(buf, nx, ny, nz);
- goto error;
- }
- }
- }
+ for (j=0; j<ny; j++) {
+ for (k=0; k<nz; k++) {
+ if (whole[i*ny*nz + j*nz + k] != buf[i*ny*nz + j*nz + k]) {
+ H5_FAILED();
+ fprintf(stderr," Check failed at i=%lu", (unsigned long)i);
+ if (ndims > 1) {
+ fprintf(stderr,", j=%lu", (unsigned long)j);
+ }
+ if (ndims > 2) {
+ fprintf(stderr,", k=%lu", (unsigned long)k);
+ }
+ fprintf(stderr,"\n Check array is:\n");
+ print_array(whole, nx, ny, nz);
+ fprintf(stderr," Value read is:\n");
+ print_array(buf, nx, ny, nz);
+ goto error;
+ }
+ }
+ }
}
/* Close dataset's dataspace */
@@ -447,19 +443,19 @@ error:
return FAIL;
}
-
+
/*-------------------------------------------------------------------------
- * Function: test_sparse
+ * Function: test_sparse
*
- * Purpose: Creates a sparse matrix consisting of NBLOCKS randomly placed
- * blocks each of size NX,NY,NZ.
+ * Purpose: Creates a sparse matrix consisting of NBLOCKS randomly placed
+ * blocks each of size NX,NY,NZ.
*
- * Return: Success: SUCCEED
+ * Return: Success: SUCCEED
*
- * Failure: FAIL
+ * Failure: FAIL
*
- * Programmer: Robb Matzke
- * Wednesday, October 22, 1997
+ * Programmer: Robb Matzke
+ * Wednesday, October 22, 1997
*
* Modifications:
*
@@ -467,34 +463,34 @@ error:
*/
static herr_t
test_sparse(hid_t f, const char *prefix, size_t nblocks,
- size_t nx, size_t ny, size_t nz, int skip_test)
+ size_t nx, size_t ny, size_t nz, int skip_test)
{
hid_t dataset; /* Dataset ID */
hid_t fspace; /* Dataset's file dataspace */
hid_t mspace; /* Dataset's memory dataspace */
- int ndims;
- hsize_t ctr;
- char dims[64], s[256], name[256];
- hsize_t offset[3];
- hsize_t size[3], total = 0;
- uint8_t *buf = NULL;
- hsize_t whole_size[3]; /* Size of dataset's dataspace */
+ int ndims;
+ hsize_t ctr;
+ char dims[64], s[256], name[256];
+ hsize_t offset[3];
+ hsize_t size[3], total = 0;
+ uint8_t *buf = NULL;
+ hsize_t whole_size[3]; /* Size of dataset's dataspace */
size_t u; /* Local index variable */
if (!nz) {
- if (!ny) {
- ndims = 1;
- ny = nz = 1;
- sprintf(dims, "%lu", (unsigned long) nx);
- } else {
- ndims = 2;
- nz = 1;
- sprintf(dims, "%lux%lu", (unsigned long) nx, (unsigned long) ny);
- }
+ if (!ny) {
+ ndims = 1;
+ ny = nz = 1;
+ sprintf(dims, "%lu", (unsigned long) nx);
} else {
- ndims = 3;
- sprintf(dims, "%lux%lux%lu",
- (unsigned long) nx, (unsigned long) ny, (unsigned long) nz);
+ ndims = 2;
+ nz = 1;
+ sprintf(dims, "%lux%lu", (unsigned long) nx, (unsigned long) ny);
+ }
+ } else {
+ ndims = 3;
+ sprintf(dims, "%lux%lux%lu",
+ (unsigned long) nx, (unsigned long) ny, (unsigned long) nz);
}
sprintf(s, "istore sparse: %s", dims);
@@ -518,8 +514,8 @@ test_sparse(hid_t f, const char *prefix, size_t nblocks,
/* Build the new empty object */
sprintf(name, "%s_%s", prefix, dims);
if ((dataset=new_object(f, name, ndims, whole_size, chunk_dims)) < 0) {
- printf(" Cannot create %u-d object `%s'\n", ndims, name);
- goto error;
+ printf(" Cannot create %u-d object `%s'\n", ndims, name);
+ goto error;
}
/* Get dataset's dataspace */
@@ -536,29 +532,29 @@ test_sparse(hid_t f, const char *prefix, size_t nblocks,
/* Select region in file dataspace */
if(H5Sselect_hyperslab(fspace,H5S_SELECT_SET,offset,NULL,size,NULL) < 0) TEST_ERROR;
- /* write to disk */
- if (H5Dwrite(dataset, TEST_DATATYPE, mspace, fspace, H5P_DEFAULT, buf) < 0) {
- H5_FAILED();
- printf(" Write failed: ctr=%lu\n", (unsigned long)ctr);
- printf(" offset=(%lu", (unsigned long) (offset[0]));
- if (ndims > 1)
- printf(",%lu", (unsigned long) (offset[1]));
- if (ndims > 2)
- printf(",%lu", (unsigned long) (offset[2]));
- printf("), size=(%lu", (unsigned long) (size[0]));
- if (ndims > 1)
- printf(",%lu", (unsigned long) (size[1]));
- if (ndims > 2)
- printf(",%lu", (unsigned long) (size[2]));
- printf(")\n");
- goto error;
- }
- total += nx * ny * nz;
+ /* write to disk */
+ if (H5Dwrite(dataset, TEST_DATATYPE, mspace, fspace, H5P_DEFAULT, buf) < 0) {
+ H5_FAILED();
+ printf(" Write failed: ctr=%lu\n", (unsigned long)ctr);
+ printf(" offset=(%lu", (unsigned long) (offset[0]));
+ if (ndims > 1)
+ printf(",%lu", (unsigned long) (offset[1]));
+ if (ndims > 2)
+ printf(",%lu", (unsigned long) (offset[2]));
+ printf("), size=(%lu", (unsigned long) (size[0]));
+ if (ndims > 1)
+ printf(",%lu", (unsigned long) (size[1]));
+ if (ndims > 2)
+ printf(",%lu", (unsigned long) (size[2]));
+ printf(")\n");
+ goto error;
+ }
+ total += nx * ny * nz;
#if 0
- HDfprintf(stderr,"ctr: ctr=%Zu, total=%Zu\n", ctr, total);
+ HDfprintf(stderr,"ctr: ctr=%Zu, total=%Zu\n", ctr, total);
#endif
- /* We don't test reading yet.... */
+ /* We don't test reading yet.... */
}
/* Close memory dataspace */
@@ -579,18 +575,18 @@ error:
return FAIL;
}
-
+
/*-------------------------------------------------------------------------
- * Function: main
+ * Function: main
*
- * Purpose: Tests indexed storage stuff.
+ * Purpose: Tests indexed storage stuff.
*
- * Return: Success: exit(EXIT_SUCCESS)
+ * Return: Success: exit(EXIT_SUCCESS)
*
- * Failure: exit(EXIT_FAILURE)
+ * Failure: exit(EXIT_FAILURE)
*
- * Programmer: Robb Matzke
- * Wednesday, October 15, 1997
+ * Programmer: Robb Matzke
+ * Wednesday, October 15, 1997
*
* Modifications:
*
@@ -599,12 +595,12 @@ error:
int
main(int argc, char *argv[])
{
- hid_t fapl=-1, file=-1, fcpl=-1;
- herr_t status;
- int nerrors = 0;
- unsigned size_of_test;
+ hid_t fapl=-1, file=-1, fcpl=-1;
+ herr_t status;
+ int nerrors = 0;
+ unsigned size_of_test;
unsigned u; /* Local index variable */
- char filename[1024];
+ char filename[1024];
int skip_test = 0;
int has_sparse_support = 0;
@@ -612,7 +608,7 @@ main(int argc, char *argv[])
if (1 == argc) {
size_of_test = TEST_SMALL | TEST_MEDIUM | TEST_LARGE;
} else {
- int i;
+ int i;
for (i = 1, size_of_test = 0; i < argc; i++) {
if (!strcmp(argv[i], "small")) {
size_of_test |= TEST_SMALL;
diff --git a/test/lheap.c b/test/lheap.c
index 61323a9..4f09b6e 100644
--- a/test/lheap.c
+++ b/test/lheap.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
@@ -22,6 +20,7 @@
#include "h5test.h"
#include "H5srcdir.h"
#include "H5ACprivate.h"
+#include "H5CXprivate.h" /* API Contexts */
#include "H5HLprivate.h"
#include "H5Iprivate.h"
@@ -64,11 +63,15 @@ main(void)
int i, j; /* miscellaneous counters */
char buf[1024]; /* the value to store */
const char *s; /* value to read */
+ hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
/* Reset library */
h5_reset();
fapl = h5_fileaccess();
+ /* Push API context */
+ if(H5CX_push() < 0) FAIL_STACK_ERROR
+ api_ctx_pushed = TRUE;
/*
* Test writing to the heap...
@@ -87,12 +90,12 @@ main(void)
H5Eprint2(H5E_DEFAULT, stdout);
goto error;
}
- if(FAIL == H5HL_create(f, H5AC_ind_read_dxpl_id, (size_t)0, &heap_addr/*out*/)) {
+ if(FAIL == H5HL_create(f, (size_t)0, &heap_addr/*out*/)) {
H5_FAILED();
H5Eprint2(H5E_DEFAULT, stdout);
goto error;
}
- if (NULL == (heap = H5HL_protect(f, H5AC_ind_read_dxpl_id, heap_addr, H5AC__NO_FLAGS_SET))) {
+ if (NULL == (heap = H5HL_protect(f, heap_addr, H5AC__NO_FLAGS_SET))) {
H5_FAILED();
H5Eprint2(H5E_DEFAULT, stdout);
goto error;
@@ -104,7 +107,7 @@ main(void)
if(j > 4)
buf[j] = '\0';
- if(UFAIL == (obj[i] = H5HL_insert(f, H5AC_ind_read_dxpl_id, heap, strlen(buf) + 1, buf))) {
+ if(UFAIL == (obj[i] = H5HL_insert(f, heap, strlen(buf) + 1, buf))) {
H5_FAILED();
H5Eprint2(H5E_DEFAULT, stdout);
goto error;
@@ -144,7 +147,7 @@ main(void)
if(j > 4)
buf[j] = '\0';
- if (NULL == (heap = H5HL_protect(f, H5AC_ind_read_dxpl_id, heap_addr, H5AC__READ_ONLY_FLAG))) {
+ if (NULL == (heap = H5HL_protect(f, heap_addr, H5AC__READ_ONLY_FLAG))) {
H5_FAILED();
H5Eprint2(H5E_DEFAULT, stdout);
goto error;
@@ -201,6 +204,10 @@ main(void)
/* Verify symbol table messages are cached */
if(h5_verify_cached_stabs(FILENAME, fapl) < 0) TEST_ERROR
+ /* Pop API context */
+ if(api_ctx_pushed && H5CX_pop() < 0) FAIL_STACK_ERROR
+ api_ctx_pushed = FALSE;
+
HDputs("All local heap tests passed.");
h5_cleanup(FILENAME, fapl);
@@ -211,6 +218,9 @@ main(void)
H5E_BEGIN_TRY {
H5Fclose(file);
} H5E_END_TRY;
+
+ if(api_ctx_pushed) H5CX_pop();
+
return 1;
}
diff --git a/test/links.c b/test/links.c
index e3bbdb2..4e88af5 100644
--- a/test/links.c
+++ b/test/links.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
@@ -3523,7 +3521,7 @@ external_set_elink_fapl1(hid_t fapl, hbool_t new_format)
hid_t lapl_idA=-1, lapl_idB=-1;
H5FD_mem_t mt, memb_map[H5FD_MEM_NTYPES];
hid_t memb_fapl[H5FD_MEM_NTYPES];
- char sv[H5FD_MEM_NTYPES][500];
+ char sv[H5FD_MEM_NTYPES][64];
const char *memb_name[H5FD_MEM_NTYPES];
haddr_t memb_addr[H5FD_MEM_NTYPES];
@@ -3732,7 +3730,7 @@ external_set_elink_fapl2(hid_t fapl, hbool_t new_format)
TESTING("H5Pset/get_elink_fapl() with same physical layout")
if((HDmkdir(TMPDIR, (mode_t)0755) < 0 && errno != EEXIST) || (NULL == HDgetcwd(cwdpath, (size_t)NAME_BUF_SIZE)))
- TEST_ERROR
+ TEST_ERROR
/*
* set up name for main file:
@@ -3782,7 +3780,7 @@ external_set_elink_fapl2(hid_t fapl, hbool_t new_format)
/* Create external link to target file: ext_link->extlinks17:/A/Dataset */
if(H5Lcreate_external(filename2, "/A/Dataset", fid, "ext_link", H5P_DEFAULT, H5P_DEFAULT) < 0)
- TEST_ERROR
+ TEST_ERROR
/* create fapl to be a "core" file without backing store */
if(H5Pset_fapl_core(core_fapl, (size_t)CORE_INCREMENT, FALSE) < 0)
@@ -3795,9 +3793,9 @@ external_set_elink_fapl2(hid_t fapl, hbool_t new_format)
/* try to open the external linked target dataset */
did = H5Dopen2(fid, "ext_link", dapl_id);
if(did < 0) {
- H5_FAILED();
- HDputs(" Should succeed in opening the target dataset");
- goto error;
+ H5_FAILED();
+ HDputs(" Should succeed in opening the target dataset");
+ goto error;
}
/* Initialize the dataset */
@@ -3807,7 +3805,7 @@ external_set_elink_fapl2(hid_t fapl, hbool_t new_format)
/* Write the data to the dataset */
if(H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, points) < 0)
- TEST_ERROR
+ TEST_ERROR
if(H5Pclose(dapl_id) < 0) TEST_ERROR
if(H5Dclose(did) < 0) TEST_ERROR
@@ -7764,7 +7762,8 @@ done:
/* Traverse a hard link by opening the object */
static hid_t
UD_hard_traverse(const char H5_ATTR_UNUSED *link_name, hid_t cur_group,
- const void *udata, size_t udata_size, hid_t H5_ATTR_UNUSED lapl_id)
+ const void *udata, size_t udata_size, hid_t H5_ATTR_UNUSED lapl_id,
+ hid_t H5_ATTR_UNUSED dxpl_id)
{
haddr_t addr;
hid_t ret_value = -1;
@@ -8000,7 +7999,8 @@ ud_hard_links(hid_t fapl)
*/
static hid_t
UD_rereg_traverse(const char H5_ATTR_UNUSED * link_name, hid_t cur_group,
- const void H5_ATTR_UNUSED *udata, size_t H5_ATTR_UNUSED udata_size, hid_t lapl_id)
+ const void H5_ATTR_UNUSED *udata, size_t H5_ATTR_UNUSED udata_size, hid_t lapl_id,
+ hid_t H5_ATTR_UNUSED dxpl_id)
{
hid_t ret_value;
@@ -8203,7 +8203,7 @@ error:
static hid_t
UD_cb_traverse(const char * link_name, hid_t cur_group, const void *udata,
- size_t udata_size, hid_t lapl_id)
+ size_t udata_size, hid_t lapl_id, hid_t H5_ATTR_UNUSED dxpl_id)
{
const char *target = (const char *)udata;
hid_t ret_value;
@@ -8439,7 +8439,8 @@ error:
*/
static hid_t
UD_plist_traverse(const char H5_ATTR_UNUSED * link_name, hid_t cur_group,
- const void H5_ATTR_UNUSED *udata, size_t udata_size, hid_t lapl_id)
+ const void H5_ATTR_UNUSED *udata, size_t udata_size, hid_t lapl_id,
+ hid_t H5_ATTR_UNUSED dxpl_id)
{
char target[NAME_BUF_SIZE];
hid_t ret_value;
@@ -8589,7 +8590,8 @@ UD_cbsucc_create(const char H5_ATTR_UNUSED * link_name, hid_t H5_ATTR_UNUSED loc
static hid_t
UD_cbsucc_traverse(const char H5_ATTR_UNUSED *link_name, hid_t cur_group,
- const void *udata, size_t H5_ATTR_UNUSED udata_size, hid_t lapl_id)
+ const void *udata, size_t H5_ATTR_UNUSED udata_size, hid_t lapl_id,
+ hid_t H5_ATTR_UNUSED dxpl_id)
{
const char *target = (const char *)udata;
hid_t ret_value;
diff --git a/test/links_env.c b/test/links_env.c
index efc7c1e..b32fb32 100644
--- a/test/links_env.c
+++ b/test/links_env.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
diff --git a/test/mf.c b/test/mf.c
index 160fb92..a537679 100644
--- a/test/mf.c
+++ b/test/mf.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
@@ -35,6 +33,7 @@
#define H5F_TESTING
#include "H5Fpkg.h"
+#include "H5CXprivate.h" /* API Contexts */
#include "H5FLprivate.h"
#include "H5Iprivate.h"
#include "H5VMprivate.h"
@@ -47,8 +46,10 @@
#define TBLOCK_SIZE4 4
#define TBLOCK_SIZE5 5
#define TBLOCK_SIZE6 6
+#ifdef PB_OUT
#define TBLOCK_SIZE7 7
#define TBLOCK_SIZE8 8
+#endif /* PB_OUT */
#define TBLOCK_SIZE10 10
#define TBLOCK_SIZE11 11
#define TBLOCK_SIZE20 20
@@ -140,8 +141,10 @@ static unsigned test_mf_fs_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new
static unsigned test_mf_strat_thres_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format);
static unsigned test_mf_fs_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_format);
static unsigned test_mf_strat_thres_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_format);
+#ifdef PB_OUT
static unsigned test_mf_fs_persist_split(void);
static unsigned test_mf_fs_persist_multi(void);
+#endif
static unsigned test_page_alloc_xfree(const char *env_h5_drvr, hid_t fapl);
static unsigned test_page_small(const char *env_h5_drvr, hid_t fapl);
static unsigned test_page_large(const char *env_h5_drvr, hid_t fapl);
@@ -258,7 +261,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, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE30);
+ addr1 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE30);
/* nothing should be changed in meta_aggr */
H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &ma_size);
@@ -268,7 +271,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, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE50);
+ addr2 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE50);
/* nothing should be changed in meta_aggr */
H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &ma_size);
@@ -297,8 +300,8 @@ test_mf_eoa(const char *env_h5_drvr, hid_t fapl)
if(NULL == (f = (H5F_t *)H5I_object(file)))
FAIL_STACK_ERROR
- H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr1, (hsize_t)TBLOCK_SIZE30);
- H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr2, (hsize_t)TBLOCK_SIZE50);
+ H5MF_xfree(f, type, addr1, (hsize_t)TBLOCK_SIZE30);
+ H5MF_xfree(f, type, addr2, (hsize_t)TBLOCK_SIZE50);
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
@@ -403,7 +406,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, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE30);
+ addr = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE30);
if (addr < (haddr_t)file_size)
TEST_ERROR
@@ -435,7 +438,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, H5AC_ind_read_dxpl_id, addr, (hsize_t)TBLOCK_SIZE30) <= 0)
+ if(H5MF_try_shrink(f, type, addr, (hsize_t)TBLOCK_SIZE30) <= 0)
TEST_ERROR
/* nothing should be changed in meta_aggr */
@@ -479,13 +482,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, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE30);
+ addr = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE30);
if (addr < (haddr_t)file_size)
TEST_ERROR
/* should not succeed in shrinking */
- if(H5MF_try_shrink(f, type, H5AC_ind_read_dxpl_id, addr, (hsize_t)TBLOCK_SIZE30 - 10) > 0)
+ if(H5MF_try_shrink(f, type, addr, (hsize_t)TBLOCK_SIZE30 - 10) > 0)
TEST_ERROR
/* nothing should be changed in meta_aggr */
@@ -529,7 +532,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, H5AC_ind_read_dxpl_id, addr, (hsize_t)TBLOCK_SIZE30 + 10) > 0)
+ if(H5MF_try_shrink(f, type, addr, (hsize_t)TBLOCK_SIZE30 + 10) > 0)
TEST_ERROR
/* nothing should be changed in meta_aggr */
@@ -572,7 +575,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, H5AC_ind_read_dxpl_id, addr+10, (hsize_t)(TBLOCK_SIZE30 - 10)) <= 0)
+ if(H5MF_try_shrink(f, type, addr+10, (hsize_t)(TBLOCK_SIZE30 - 10)) <= 0)
TEST_ERROR
/* nothing should be changed in meta_aggr */
@@ -684,7 +687,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, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE30);
+ addr = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE30);
if (addr < (haddr_t)file_size)
TEST_ERROR
@@ -713,7 +716,7 @@ test_mf_eoa_extend(const char *env_h5_drvr, hid_t fapl)
FAIL_STACK_ERROR
/* should succeed */
- was_extended = H5MF_try_extend(f, H5AC_ind_read_dxpl_id, type, (haddr_t)addr, (hsize_t)TBLOCK_SIZE30, (hsize_t)TBLOCK_SIZE50);
+ was_extended = H5MF_try_extend(f, type, (haddr_t)addr, (hsize_t)TBLOCK_SIZE30, (hsize_t)TBLOCK_SIZE50);
if(was_extended <= 0)
TEST_ERROR
@@ -762,7 +765,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, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE30);
+ addr = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE30);
if(addr < (haddr_t)file_size)
TEST_ERROR
@@ -772,7 +775,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, H5AC_ind_read_dxpl_id, type, (haddr_t)addr, (hsize_t)(TBLOCK_SIZE30-10), (hsize_t)(TBLOCK_SIZE50));
+ was_extended = H5MF_try_extend(f, type, (haddr_t)addr, (hsize_t)(TBLOCK_SIZE30-10), (hsize_t)(TBLOCK_SIZE50));
/* should not succeed */
if(was_extended > 0)
@@ -915,19 +918,19 @@ test_mf_tmp(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
/* Reading & writing with a temporary address value should fail */
H5E_BEGIN_TRY {
- status = H5F_block_read(f, H5FD_MEM_SUPER, tmp_addr, sizeof(buf), H5AC_ind_read_dxpl_id, &buf);
+ status = H5F_block_read(f, H5FD_MEM_SUPER, tmp_addr, sizeof(buf), &buf);
} H5E_END_TRY;
if(status >= 0)
TEST_ERROR
H5E_BEGIN_TRY {
- status = H5F_block_write(f, H5FD_MEM_SUPER, tmp_addr, sizeof(buf), H5AC_ind_read_dxpl_id, &buf);
+ status = H5F_block_write(f, H5FD_MEM_SUPER, tmp_addr, sizeof(buf), &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, H5AC_ind_read_dxpl_id, tmp_addr, (hsize_t)TBLOCK_SIZE30);
+ status = H5MF_xfree(f, H5FD_MEM_SUPER, tmp_addr, (hsize_t)TBLOCK_SIZE30);
} H5E_END_TRY;
if(status >= 0)
TEST_ERROR
@@ -960,7 +963,7 @@ test_mf_tmp(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
TEST_ERROR
/* Allocate 1/3 of the file as normal address space */
- if(HADDR_UNDEF == (norm_addr = H5MF_alloc(f, H5FD_MEM_DRAW, H5AC_ind_read_dxpl_id, (hsize_t)(maxaddr / 3))))
+ if(HADDR_UNDEF == (norm_addr = H5MF_alloc(f, H5FD_MEM_DRAW, (hsize_t)(maxaddr / 3))))
FAIL_STACK_ERROR
if(H5F_IS_TMP_ADDR(f, norm_addr))
TEST_ERROR
@@ -974,13 +977,13 @@ test_mf_tmp(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
/* Test that pushing normal space allocation into temporary space fails */
H5E_BEGIN_TRY {
- check_addr = H5MF_alloc(f, H5FD_MEM_DRAW, H5AC_ind_read_dxpl_id, (hsize_t)(maxaddr / 3));
+ check_addr = H5MF_alloc(f, H5FD_MEM_DRAW, (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, H5AC_ind_read_dxpl_id, norm_addr, (hsize_t)(maxaddr / 3)) < 0)
+ if(H5MF_xfree(f, H5FD_MEM_DRAW, norm_addr, (hsize_t)(maxaddr / 3)) < 0)
FAIL_STACK_ERROR
/* Close the file */
@@ -1030,7 +1033,7 @@ test_mf_fs_start(hid_t fapl)
H5FS_stat_t state;
- TESTING("H5MF_create_fstype()/H5MF_open_fstype() of free-space manager");
+ TESTING("H5MF_create_fstype()/H5MF__open_fstype() of free-space manager");
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -1062,7 +1065,7 @@ test_mf_fs_start(hid_t fapl)
FAIL_STACK_ERROR
/* Start up H5FD_MEM_SUPER free-space manager */
- if(H5MF_start_fstype(f, H5AC_ind_read_dxpl_id, (H5F_mem_page_t)H5FD_MEM_SUPER) < 0)
+ if(H5MF__start_fstype(f, (H5F_mem_page_t)H5FD_MEM_SUPER) < 0)
FAIL_STACK_ERROR
if(f->shared->fs_state[H5FD_MEM_SUPER] != H5F_FS_STATE_OPEN)
@@ -1174,7 +1177,7 @@ test_mf_fs_alloc_free(hid_t fapl)
FAIL_STACK_ERROR
/* Start up H5FD_MEM_SUPER free-space manager */
- if(H5MF_start_fstype(f, H5AC_ind_read_dxpl_id, (H5F_mem_page_t)H5FD_MEM_SUPER) < 0)
+ if(H5MF__start_fstype(f, (H5F_mem_page_t)H5FD_MEM_SUPER) < 0)
FAIL_STACK_ERROR
if(f->shared->fs_state[H5FD_MEM_SUPER] != H5F_FS_STATE_OPEN)
@@ -1186,7 +1189,7 @@ test_mf_fs_alloc_free(hid_t fapl)
sect_node = H5MF_sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR70, (hsize_t)TBLOCK_SIZE30);
/* Add section A to free-space manager */
- if(H5MF_add_sect(f, H5FD_MEM_SUPER, H5AC_ind_read_dxpl_id, f->shared->fs_man[H5FD_MEM_SUPER], sect_node))
+ if(H5MF__add_sect(f, H5FD_MEM_SUPER, f->shared->fs_man[H5FD_MEM_SUPER], sect_node))
FAIL_STACK_ERROR
HDmemset(&state, 0, sizeof(H5FS_stat_t));
@@ -1198,7 +1201,7 @@ test_mf_fs_alloc_free(hid_t fapl)
TEST_ERROR
/* Allocate a block of 30 */
- addr = H5MF_alloc(f, H5FD_MEM_SUPER, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE30);
+ addr = H5MF_alloc(f, H5FD_MEM_SUPER, (hsize_t)TBLOCK_SIZE30);
/* Verify that the allocated block is section A in free-space */
if(addr != TBLOCK_ADDR70)
@@ -1212,7 +1215,7 @@ test_mf_fs_alloc_free(hid_t fapl)
TEST_ERROR
/* Free the block to free-space */
- H5MF_xfree(f, H5FD_MEM_SUPER, H5AC_ind_read_dxpl_id, addr, (hsize_t)TBLOCK_SIZE30);
+ H5MF_xfree(f, H5FD_MEM_SUPER, addr, (hsize_t)TBLOCK_SIZE30);
state.tot_space += TBLOCK_SIZE30;
state.tot_sect_count += 1;
@@ -1221,7 +1224,7 @@ test_mf_fs_alloc_free(hid_t fapl)
TEST_ERROR
/* Remove section A from free-space */
- if(H5MF_find_sect(f, H5FD_MEM_SUPER, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE30, f->shared->fs_man[H5FD_MEM_SUPER], &tmp) != TRUE)
+ if(H5MF__find_sect(f, H5FD_MEM_SUPER, (hsize_t)TBLOCK_SIZE30, f->shared->fs_man[H5FD_MEM_SUPER], &tmp) != TRUE)
TEST_ERROR
if(tmp != TBLOCK_ADDR70)
@@ -1251,7 +1254,7 @@ test_mf_fs_alloc_free(hid_t fapl)
FAIL_STACK_ERROR
/* Start up H5FD_MEM_SUPER free-space manager */
- if(H5MF_start_fstype(f, H5AC_ind_read_dxpl_id, (H5F_mem_page_t)H5FD_MEM_SUPER) < 0)
+ if(H5MF__start_fstype(f, (H5F_mem_page_t)H5FD_MEM_SUPER) < 0)
FAIL_STACK_ERROR
if(f->shared->fs_state[H5FD_MEM_SUPER] != H5F_FS_STATE_OPEN)
@@ -1263,7 +1266,7 @@ test_mf_fs_alloc_free(hid_t fapl)
sect_node = H5MF_sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR70, (hsize_t)TBLOCK_SIZE30);
/* Add section A to free-space manager */
- if(H5MF_add_sect(f, H5FD_MEM_SUPER, H5AC_ind_read_dxpl_id, f->shared->fs_man[H5FD_MEM_SUPER], sect_node))
+ if(H5MF__add_sect(f, H5FD_MEM_SUPER, f->shared->fs_man[H5FD_MEM_SUPER], sect_node))
FAIL_STACK_ERROR
HDmemset(&state, 0, sizeof(H5FS_stat_t));
@@ -1275,7 +1278,7 @@ test_mf_fs_alloc_free(hid_t fapl)
TEST_ERROR
/* Allocate a block of 20 */
- addr = H5MF_alloc(f, H5FD_MEM_SUPER, H5AC_ind_read_dxpl_id, (hsize_t)(TBLOCK_SIZE20));
+ addr = H5MF_alloc(f, H5FD_MEM_SUPER, (hsize_t)(TBLOCK_SIZE20));
/* Verify that the allocated block is section A in free-space manager */
if(addr != TBLOCK_ADDR70)
@@ -1288,7 +1291,7 @@ test_mf_fs_alloc_free(hid_t fapl)
TEST_ERROR
/* Free the block to free-space manager */
- H5MF_xfree(f, H5FD_MEM_SUPER, H5AC_ind_read_dxpl_id, addr, (hsize_t)(TBLOCK_SIZE20));
+ H5MF_xfree(f, H5FD_MEM_SUPER, addr, (hsize_t)(TBLOCK_SIZE20));
/* Still 1 section in free-space because of merging */
state.tot_space += TBLOCK_SIZE20;
@@ -1296,7 +1299,7 @@ test_mf_fs_alloc_free(hid_t fapl)
TEST_ERROR
/* Remove section A from free-space */
- if(H5MF_find_sect(f, H5FD_MEM_SUPER, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE30, f->shared->fs_man[H5FD_MEM_SUPER], &tmp) != TRUE)
+ if(H5MF__find_sect(f, H5FD_MEM_SUPER, (hsize_t)TBLOCK_SIZE30, f->shared->fs_man[H5FD_MEM_SUPER], &tmp) != TRUE)
TEST_ERROR
if(tmp != TBLOCK_ADDR70)
@@ -1326,7 +1329,7 @@ test_mf_fs_alloc_free(hid_t fapl)
FAIL_STACK_ERROR
/* Start up H5FD_MEM_SUPER free-space manager */
- if(H5MF_start_fstype(f, H5AC_ind_read_dxpl_id, (H5F_mem_page_t)H5FD_MEM_SUPER) < 0)
+ if(H5MF__start_fstype(f, (H5F_mem_page_t)H5FD_MEM_SUPER) < 0)
FAIL_STACK_ERROR
if(f->shared->fs_state[H5FD_MEM_SUPER] != H5F_FS_STATE_OPEN)
@@ -1338,7 +1341,7 @@ test_mf_fs_alloc_free(hid_t fapl)
sect_node = H5MF_sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR70, (hsize_t)TBLOCK_SIZE30);
/* Add section A to free-space manager */
- if(H5MF_add_sect(f, H5FD_MEM_SUPER, H5AC_ind_read_dxpl_id, f->shared->fs_man[H5FD_MEM_SUPER], sect_node))
+ if(H5MF__add_sect(f, H5FD_MEM_SUPER, f->shared->fs_man[H5FD_MEM_SUPER], sect_node))
FAIL_STACK_ERROR
HDmemset(&state, 0, sizeof(H5FS_stat_t));
@@ -1354,7 +1357,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, H5FD_MEM_SUPER, H5AC_ind_read_dxpl_id, (hsize_t)(TBLOCK_SIZE40));
+ addr = H5MF_alloc(f, H5FD_MEM_SUPER, (hsize_t)(TBLOCK_SIZE40));
/* Verify that the allocated block is not section A in free-space */
if(addr == TBLOCK_ADDR70)
@@ -1365,7 +1368,7 @@ test_mf_fs_alloc_free(hid_t fapl)
TEST_ERROR
/* Remove section A from free-space */
- if(H5MF_find_sect(f, H5FD_MEM_SUPER, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE30, f->shared->fs_man[H5FD_MEM_SUPER], &tmp) != TRUE)
+ if(H5MF__find_sect(f, H5FD_MEM_SUPER, (hsize_t)TBLOCK_SIZE30, f->shared->fs_man[H5FD_MEM_SUPER], &tmp) != TRUE)
TEST_ERROR
/* Verify that the block is section A in free-space */
@@ -1377,7 +1380,7 @@ test_mf_fs_alloc_free(hid_t fapl)
TEST_ERROR
/* Free the block of size 40 to free-space */
- H5MF_xfree(f, H5FD_MEM_SUPER, H5AC_ind_read_dxpl_id, addr, (hsize_t)(TBLOCK_SIZE40));
+ H5MF_xfree(f, H5FD_MEM_SUPER, addr, (hsize_t)(TBLOCK_SIZE40));
/*
* Free-space info is the same.
@@ -1499,7 +1502,7 @@ test_mf_fs_extend(hid_t fapl)
FAIL_STACK_ERROR
/* Start up H5FD_MEM_SUPER free-space manager */
- if(H5MF_start_fstype(f, H5AC_ind_read_dxpl_id, (H5F_mem_page_t)H5FD_MEM_SUPER) < 0)
+ if(H5MF__start_fstype(f, (H5F_mem_page_t)H5FD_MEM_SUPER) < 0)
FAIL_STACK_ERROR
if(f->shared->fs_state[H5FD_MEM_SUPER] != H5F_FS_STATE_OPEN)
@@ -1511,7 +1514,7 @@ test_mf_fs_extend(hid_t fapl)
sect_node1 = H5MF_sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR70, (hsize_t)TBLOCK_SIZE30);
/* Add section A to free-space manager */
- if(H5MF_add_sect(f, H5FD_MEM_SUPER, H5AC_ind_read_dxpl_id, f->shared->fs_man[H5FD_MEM_SUPER], sect_node1))
+ if(H5MF__add_sect(f, H5FD_MEM_SUPER, f->shared->fs_man[H5FD_MEM_SUPER], sect_node1))
FAIL_STACK_ERROR
HDmemset(&state, 0, sizeof(H5FS_stat_t));
@@ -1523,7 +1526,7 @@ test_mf_fs_extend(hid_t fapl)
TEST_ERROR
/* Allocate a block of 30 */
- addr = H5MF_alloc(f, H5FD_MEM_SUPER, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE30);
+ addr = H5MF_alloc(f, H5FD_MEM_SUPER, (hsize_t)TBLOCK_SIZE30);
/* Verify that the allocated block is section A in free-space manager */
if(addr != TBLOCK_ADDR70)
@@ -1540,7 +1543,7 @@ test_mf_fs_extend(hid_t fapl)
sect_node2 = H5MF_sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR100, (hsize_t)TBLOCK_SIZE50);
/* Add section B to free-space manager */
- if(H5MF_add_sect(f, H5FD_MEM_SUPER, H5AC_ind_read_dxpl_id, f->shared->fs_man[H5FD_MEM_SUPER], sect_node2))
+ if(H5MF__add_sect(f, H5FD_MEM_SUPER, f->shared->fs_man[H5FD_MEM_SUPER], sect_node2))
FAIL_STACK_ERROR
state.tot_space += TBLOCK_SIZE50;
@@ -1551,7 +1554,7 @@ test_mf_fs_extend(hid_t fapl)
TEST_ERROR
/* Try to extend the allocated block */
- was_extended = H5MF_try_extend(f, H5AC_ind_read_dxpl_id, H5FD_MEM_SUPER, (haddr_t)TBLOCK_ADDR70, (hsize_t)TBLOCK_SIZE30, (hsize_t)TBLOCK_SIZE50);
+ was_extended = H5MF_try_extend(f, H5FD_MEM_SUPER, (haddr_t)TBLOCK_ADDR70, (hsize_t)TBLOCK_SIZE30, (hsize_t)TBLOCK_SIZE50);
/* should succeed */
if(was_extended <= 0)
@@ -1566,7 +1569,7 @@ test_mf_fs_extend(hid_t fapl)
TEST_ERROR
/* Free the extended block to free-space manager */
- H5MF_xfree(f, H5FD_MEM_SUPER, H5AC_ind_read_dxpl_id, addr, (hsize_t)(TBLOCK_SIZE30+TBLOCK_SIZE50));
+ H5MF_xfree(f, H5FD_MEM_SUPER, addr, (hsize_t)(TBLOCK_SIZE30+TBLOCK_SIZE50));
/* Verify that the extended block is back into free-space */
state.tot_space += (TBLOCK_SIZE30+TBLOCK_SIZE50);
@@ -1577,7 +1580,7 @@ test_mf_fs_extend(hid_t fapl)
TEST_ERROR
/* Remove the extended block */
- if(H5MF_find_sect(f, H5FD_MEM_SUPER, H5AC_ind_read_dxpl_id, (hsize_t)(TBLOCK_SIZE30+TBLOCK_SIZE50), f->shared->fs_man[H5FD_MEM_SUPER], &tmp) != TRUE)
+ if(H5MF__find_sect(f, H5FD_MEM_SUPER, (hsize_t)(TBLOCK_SIZE30+TBLOCK_SIZE50), f->shared->fs_man[H5FD_MEM_SUPER], &tmp) != TRUE)
TEST_ERROR
if(tmp != TBLOCK_ADDR70)
@@ -1607,7 +1610,7 @@ test_mf_fs_extend(hid_t fapl)
FAIL_STACK_ERROR
/* Start up H5FD_MEM_SUPER free-space manager */
- if(H5MF_start_fstype(f, H5AC_ind_read_dxpl_id, (H5F_mem_page_t)H5FD_MEM_SUPER) < 0)
+ if(H5MF__start_fstype(f, (H5F_mem_page_t)H5FD_MEM_SUPER) < 0)
FAIL_STACK_ERROR
if(f->shared->fs_state[H5FD_MEM_SUPER] != H5F_FS_STATE_OPEN)
@@ -1619,7 +1622,7 @@ test_mf_fs_extend(hid_t fapl)
sect_node1 = H5MF_sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR70, (hsize_t)TBLOCK_SIZE30);
/* Add section A to free-space manager */
- if(H5MF_add_sect(f, H5FD_MEM_SUPER, H5AC_ind_read_dxpl_id, f->shared->fs_man[H5FD_MEM_SUPER], sect_node1))
+ if(H5MF__add_sect(f, H5FD_MEM_SUPER, f->shared->fs_man[H5FD_MEM_SUPER], sect_node1))
FAIL_STACK_ERROR
HDmemset(&state, 0, sizeof(H5FS_stat_t));
@@ -1631,7 +1634,7 @@ test_mf_fs_extend(hid_t fapl)
TEST_ERROR
/* Allocate a block of 30 */
- addr = H5MF_alloc(f, H5FD_MEM_SUPER, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE30);
+ addr = H5MF_alloc(f, H5FD_MEM_SUPER, (hsize_t)TBLOCK_SIZE30);
/* Verify that the allocated block is section A in free-space manager */
if(addr != TBLOCK_ADDR70)
@@ -1648,7 +1651,7 @@ test_mf_fs_extend(hid_t fapl)
sect_node2 = H5MF_sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR100, (hsize_t)TBLOCK_SIZE50);
/* Add section B to free-space manager */
- if(H5MF_add_sect(f, H5FD_MEM_SUPER, H5AC_ind_read_dxpl_id, f->shared->fs_man[H5FD_MEM_SUPER], sect_node2))
+ if(H5MF__add_sect(f, H5FD_MEM_SUPER, f->shared->fs_man[H5FD_MEM_SUPER], sect_node2))
FAIL_STACK_ERROR
state.tot_space += TBLOCK_SIZE50;
@@ -1659,7 +1662,7 @@ test_mf_fs_extend(hid_t fapl)
TEST_ERROR
/* Try to extend the allocated block */
- was_extended = H5MF_try_extend(f, H5AC_ind_read_dxpl_id, H5FD_MEM_SUPER, (haddr_t)TBLOCK_ADDR70, (hsize_t)TBLOCK_SIZE30, (hsize_t)(TBLOCK_SIZE50+10));
+ was_extended = H5MF_try_extend(f, H5FD_MEM_SUPER, (haddr_t)TBLOCK_ADDR70, (hsize_t)TBLOCK_SIZE30, (hsize_t)(TBLOCK_SIZE50+10));
/* Should not be able to extend the allocated block */
if(was_extended)
@@ -1670,7 +1673,7 @@ test_mf_fs_extend(hid_t fapl)
TEST_ERROR
/* Free the allocated block A to free-space */
- H5MF_xfree(f, H5FD_MEM_SUPER, H5AC_ind_read_dxpl_id, addr, (hsize_t)TBLOCK_SIZE30);
+ H5MF_xfree(f, H5FD_MEM_SUPER, addr, (hsize_t)TBLOCK_SIZE30);
/* the returned section A is merged with section B in free-space */
/* rest of the info remains the same */
@@ -1680,7 +1683,7 @@ test_mf_fs_extend(hid_t fapl)
TEST_ERROR
/* Remove the merged sections A & B from free-space */
- if(H5MF_find_sect(f, H5FD_MEM_SUPER, H5AC_ind_read_dxpl_id, (hsize_t)(TBLOCK_SIZE30+TBLOCK_SIZE50), f->shared->fs_man[H5FD_MEM_SUPER], &tmp) != TRUE)
+ if(H5MF__find_sect(f, H5FD_MEM_SUPER, (hsize_t)(TBLOCK_SIZE30+TBLOCK_SIZE50), f->shared->fs_man[H5FD_MEM_SUPER], &tmp) != TRUE)
TEST_ERROR
if(tmp != addr) TEST_ERROR
@@ -1709,7 +1712,7 @@ test_mf_fs_extend(hid_t fapl)
FAIL_STACK_ERROR
/* Start up H5FD_MEM_SUPER free-space manager */
- if(H5MF_start_fstype(f, H5AC_ind_read_dxpl_id, (H5F_mem_page_t)H5FD_MEM_SUPER) < 0)
+ if(H5MF__start_fstype(f, (H5F_mem_page_t)H5FD_MEM_SUPER) < 0)
FAIL_STACK_ERROR
if(f->shared->fs_state[H5FD_MEM_SUPER] != H5F_FS_STATE_OPEN)
@@ -1721,7 +1724,7 @@ test_mf_fs_extend(hid_t fapl)
sect_node1 = H5MF_sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR70, (hsize_t)TBLOCK_SIZE30);
/* Add section A to free-space manager */
- if(H5MF_add_sect(f, H5FD_MEM_SUPER, H5AC_ind_read_dxpl_id, f->shared->fs_man[H5FD_MEM_SUPER], sect_node1))
+ if(H5MF__add_sect(f, H5FD_MEM_SUPER, f->shared->fs_man[H5FD_MEM_SUPER], sect_node1))
FAIL_STACK_ERROR
HDmemset(&state, 0, sizeof(H5FS_stat_t));
@@ -1733,7 +1736,7 @@ test_mf_fs_extend(hid_t fapl)
TEST_ERROR
/* Allocate a block of 30 */
- addr = H5MF_alloc(f, H5FD_MEM_SUPER, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE30);
+ addr = H5MF_alloc(f, H5FD_MEM_SUPER, (hsize_t)TBLOCK_SIZE30);
/* Verify that the allocated block is section A in free-space manager */
if(addr != TBLOCK_ADDR70)
@@ -1750,7 +1753,7 @@ test_mf_fs_extend(hid_t fapl)
sect_node2 = H5MF_sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR100, (hsize_t)TBLOCK_SIZE50);
/* Add section B to free-space manager */
- if(H5MF_add_sect(f, H5FD_MEM_SUPER, H5AC_ind_read_dxpl_id, f->shared->fs_man[H5FD_MEM_SUPER], sect_node2))
+ if(H5MF__add_sect(f, H5FD_MEM_SUPER, f->shared->fs_man[H5FD_MEM_SUPER], sect_node2))
FAIL_STACK_ERROR
state.tot_space += TBLOCK_SIZE50;
@@ -1761,7 +1764,7 @@ test_mf_fs_extend(hid_t fapl)
TEST_ERROR
/* Try to extend the allocated block */
- was_extended = H5MF_try_extend(f, H5AC_ind_read_dxpl_id, H5FD_MEM_SUPER, (haddr_t)TBLOCK_ADDR70, (hsize_t)TBLOCK_SIZE30, (hsize_t)(TBLOCK_SIZE40));
+ was_extended = H5MF_try_extend(f, H5FD_MEM_SUPER, (haddr_t)TBLOCK_ADDR70, (hsize_t)TBLOCK_SIZE30, (hsize_t)(TBLOCK_SIZE40));
/* Should succeed in extending the allocated block */
if(was_extended <=0)
@@ -1773,7 +1776,7 @@ test_mf_fs_extend(hid_t fapl)
TEST_ERROR
/* Free the extended block */
- H5MF_xfree(f, H5FD_MEM_SUPER, H5AC_ind_read_dxpl_id, addr, (hsize_t)(TBLOCK_SIZE30+TBLOCK_SIZE40));
+ H5MF_xfree(f, H5FD_MEM_SUPER, addr, (hsize_t)(TBLOCK_SIZE30+TBLOCK_SIZE40));
/* rest info is same, the extended section returned is merged with the section in free-space */
state.tot_space += (TBLOCK_SIZE30+TBLOCK_SIZE40);
@@ -1782,7 +1785,7 @@ test_mf_fs_extend(hid_t fapl)
TEST_ERROR
/* Remove the merged sections A & B from free-space */
- if(H5MF_find_sect(f, H5FD_MEM_SUPER, H5AC_ind_read_dxpl_id, (hsize_t)(TBLOCK_SIZE30+TBLOCK_SIZE50), f->shared->fs_man[H5FD_MEM_SUPER], &tmp) != TRUE)
+ if(H5MF__find_sect(f, H5FD_MEM_SUPER, (hsize_t)(TBLOCK_SIZE30+TBLOCK_SIZE50), f->shared->fs_man[H5FD_MEM_SUPER], &tmp) != TRUE)
TEST_ERROR
if(tmp != addr) TEST_ERROR
@@ -1811,7 +1814,7 @@ test_mf_fs_extend(hid_t fapl)
FAIL_STACK_ERROR
/* Start up H5FD_MEM_SUPER free-space manager */
- if(H5MF_start_fstype(f, H5AC_ind_read_dxpl_id, (H5F_mem_page_t)H5FD_MEM_SUPER) < 0)
+ if(H5MF__start_fstype(f, (H5F_mem_page_t)H5FD_MEM_SUPER) < 0)
FAIL_STACK_ERROR
if(f->shared->fs_state[H5FD_MEM_SUPER] != H5F_FS_STATE_OPEN)
@@ -1823,7 +1826,7 @@ test_mf_fs_extend(hid_t fapl)
sect_node1 = H5MF_sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR70, (hsize_t)(TBLOCK_SIZE30-10));
/* Add section A of size=20 to free-space */
- if(H5MF_add_sect(f, H5FD_MEM_SUPER, H5AC_ind_read_dxpl_id, f->shared->fs_man[H5FD_MEM_SUPER], sect_node1))
+ if(H5MF__add_sect(f, H5FD_MEM_SUPER, f->shared->fs_man[H5FD_MEM_SUPER], sect_node1))
FAIL_STACK_ERROR
HDmemset(&state, 0, sizeof(H5FS_stat_t));
@@ -1835,7 +1838,7 @@ test_mf_fs_extend(hid_t fapl)
TEST_ERROR
/* Allocate a block of size=20 */
- addr = H5MF_alloc(f, H5FD_MEM_SUPER, H5AC_ind_read_dxpl_id, (hsize_t)(TBLOCK_SIZE30-10));
+ addr = H5MF_alloc(f, H5FD_MEM_SUPER, (hsize_t)(TBLOCK_SIZE30-10));
/* Verify that the allocated block is section A in free-space manager */
if(addr != TBLOCK_ADDR70)
@@ -1852,7 +1855,7 @@ test_mf_fs_extend(hid_t fapl)
sect_node2 = H5MF_sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR100, (hsize_t)TBLOCK_SIZE50);
/* Add section B to free-space manager */
- if(H5MF_add_sect(f, H5FD_MEM_SUPER, H5AC_ind_read_dxpl_id, f->shared->fs_man[H5FD_MEM_SUPER], sect_node2))
+ if(H5MF__add_sect(f, H5FD_MEM_SUPER, f->shared->fs_man[H5FD_MEM_SUPER], sect_node2))
FAIL_STACK_ERROR
state.tot_space += TBLOCK_SIZE50;
@@ -1863,7 +1866,7 @@ test_mf_fs_extend(hid_t fapl)
TEST_ERROR
/* Try to extend the allocated block */
- was_extended = H5MF_try_extend(f, H5AC_ind_read_dxpl_id, H5FD_MEM_SUPER, (haddr_t)TBLOCK_ADDR70, (hsize_t)(TBLOCK_SIZE30-10), (hsize_t)TBLOCK_SIZE50);
+ was_extended = H5MF_try_extend(f, H5FD_MEM_SUPER, (haddr_t)TBLOCK_ADDR70, (hsize_t)(TBLOCK_SIZE30-10), (hsize_t)TBLOCK_SIZE50);
/* Should not succeed in extending the allocated block */
if(was_extended)
@@ -1874,7 +1877,7 @@ test_mf_fs_extend(hid_t fapl)
TEST_ERROR
/* Free the allocated block */
- H5MF_xfree(f, H5FD_MEM_SUPER, H5AC_ind_read_dxpl_id, addr, (hsize_t)(TBLOCK_SIZE30-10));
+ H5MF_xfree(f, H5FD_MEM_SUPER, addr, (hsize_t)(TBLOCK_SIZE30-10));
state.tot_space += (TBLOCK_SIZE30-10);
state.tot_sect_count += 1;
@@ -1884,13 +1887,13 @@ test_mf_fs_extend(hid_t fapl)
TEST_ERROR
/* Remove section A from free-space manger */
- if(H5MF_find_sect(f, H5FD_MEM_SUPER, H5AC_ind_read_dxpl_id, (hsize_t)(TBLOCK_SIZE30-10), f->shared->fs_man[H5FD_MEM_SUPER], &tmp) != TRUE)
+ if(H5MF__find_sect(f, H5FD_MEM_SUPER, (hsize_t)(TBLOCK_SIZE30-10), f->shared->fs_man[H5FD_MEM_SUPER], &tmp) != TRUE)
TEST_ERROR
if(tmp != addr) TEST_ERROR
/* Remove section B from free-space manager */
- if(H5MF_find_sect(f, H5FD_MEM_SUPER, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE50, f->shared->fs_man[H5FD_MEM_SUPER], &tmp) != TRUE)
+ if(H5MF__find_sect(f, H5FD_MEM_SUPER, (hsize_t)TBLOCK_SIZE50, f->shared->fs_man[H5FD_MEM_SUPER], &tmp) != TRUE)
TEST_ERROR
if(H5Fclose(file) < 0)
@@ -1982,9 +1985,9 @@ test_mf_fs_absorb(const char *env_h5_drvr, hid_t fapl)
if(NULL == (f = (H5F_t *)H5I_object(file)))
FAIL_STACK_ERROR
- /* Start up H5FD_MEM_SUPER free-space manager */
- if(H5MF_start_fstype(f, H5AC_ind_read_dxpl_id, (H5F_mem_page_t)H5FD_MEM_SUPER) < 0)
- FAIL_STACK_ERROR
+ /* Start up H5FD_MEM_SUPER free-space manager */
+ if(H5MF__start_fstype(f, (H5F_mem_page_t)H5FD_MEM_SUPER) < 0)
+ FAIL_STACK_ERROR
if(f->shared->fs_state[H5FD_MEM_SUPER] != H5F_FS_STATE_OPEN)
TEST_ERROR
@@ -1992,7 +1995,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, H5FD_MEM_SUPER, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE30);
+ addr = H5MF_alloc(f, H5FD_MEM_SUPER, (hsize_t)TBLOCK_SIZE30);
H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
@@ -2000,11 +2003,11 @@ test_mf_fs_absorb(const char *env_h5_drvr, hid_t fapl)
sect_node = H5MF_sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)(ma_addr+ma_size), (hsize_t)TBLOCK_SIZE2048);
/* Add a section to free-space that adjoins end of the aggregator */
- if(H5MF_add_sect(f, H5FD_MEM_SUPER, H5AC_ind_read_dxpl_id, f->shared->fs_man[H5FD_MEM_SUPER], sect_node))
+ if(H5MF__add_sect(f, H5FD_MEM_SUPER, f->shared->fs_man[H5FD_MEM_SUPER], sect_node))
FAIL_STACK_ERROR
/* Verify that the section did absorb the aggregator */
- if(H5MF_find_sect(f, H5FD_MEM_SUPER, H5AC_ind_read_dxpl_id, (hsize_t)(ma_addr+ma_size), f->shared->fs_man[H5FD_MEM_SUPER], &tmp) != TRUE)
+ if(H5MF__find_sect(f, H5FD_MEM_SUPER, (hsize_t)(ma_addr+ma_size), f->shared->fs_man[H5FD_MEM_SUPER], &tmp) != TRUE)
TEST_ERROR
if(tmp != ma_addr) TEST_ERROR
@@ -2014,7 +2017,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, H5FD_MEM_SUPER, H5AC_ind_read_dxpl_id, addr, (hsize_t)TBLOCK_SIZE30);
+ H5MF_xfree(f, H5FD_MEM_SUPER, addr, (hsize_t)TBLOCK_SIZE30);
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
@@ -2039,7 +2042,7 @@ test_mf_fs_absorb(const char *env_h5_drvr, hid_t fapl)
FAIL_STACK_ERROR
/* Start up H5FD_MEM_SUPER free-space manager */
- if(H5MF_start_fstype(f, H5AC_ind_read_dxpl_id, (H5F_mem_page_t)H5FD_MEM_SUPER) < 0)
+ if(H5MF__start_fstype(f, (H5F_mem_page_t)H5FD_MEM_SUPER) < 0)
FAIL_STACK_ERROR
if(f->shared->fs_state[H5FD_MEM_SUPER] != H5F_FS_STATE_OPEN)
@@ -2048,21 +2051,21 @@ test_mf_fs_absorb(const char *env_h5_drvr, hid_t fapl)
TEST_ERROR
/* Allocate a section from meta_aggr */
- addr = H5MF_alloc(f, H5FD_MEM_SUPER, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE30);
+ addr = H5MF_alloc(f, H5FD_MEM_SUPER, (hsize_t)TBLOCK_SIZE30);
H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
/* Allocate a section from sdata_aggr */
- saddr = H5MF_alloc(f, H5FD_MEM_DRAW, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE50);
+ saddr = H5MF_alloc(f, H5FD_MEM_DRAW, (hsize_t)TBLOCK_SIZE50);
/* Add a section to free-space that adjoins the beginning of meta_aggr */
sect_node = H5MF_sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)addr, (hsize_t)TBLOCK_SIZE30);
/* When adding, meta_aggr is absorbed onto the end of the section */
- if(H5MF_add_sect(f, H5FD_MEM_SUPER, H5AC_ind_read_dxpl_id, f->shared->fs_man[H5FD_MEM_SUPER], sect_node))
+ if(H5MF__add_sect(f, H5FD_MEM_SUPER, f->shared->fs_man[H5FD_MEM_SUPER], sect_node))
FAIL_STACK_ERROR
/* Verify that the section did absorb the aggregator */
- if(H5MF_find_sect(f, H5FD_MEM_SUPER, H5AC_ind_read_dxpl_id, (hsize_t)(ma_size+TBLOCK_SIZE30), f->shared->fs_man[H5FD_MEM_SUPER], &tmp) != TRUE)
+ if(H5MF__find_sect(f, H5FD_MEM_SUPER, (hsize_t)(ma_size+TBLOCK_SIZE30), f->shared->fs_man[H5FD_MEM_SUPER], &tmp) != TRUE)
TEST_ERROR
if((tmp + TBLOCK_SIZE30) != ma_addr)
@@ -2073,9 +2076,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, H5FD_MEM_SUPER, H5AC_ind_read_dxpl_id, addr, (hsize_t)TBLOCK_SIZE30);
+ H5MF_xfree(f, H5FD_MEM_SUPER, addr, (hsize_t)TBLOCK_SIZE30);
/* Remove section from sdata_aggr */
- H5MF_xfree(f, H5FD_MEM_DRAW, H5AC_ind_read_dxpl_id, saddr, (hsize_t)TBLOCK_SIZE50);
+ H5MF_xfree(f, H5FD_MEM_DRAW, saddr, (hsize_t)TBLOCK_SIZE50);
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
@@ -2166,7 +2169,7 @@ test_mf_aggr_alloc1(const char *env_h5_drvr, hid_t fapl)
/* Allocate first block from meta_aggr */
type = H5FD_MEM_SUPER;
- if((addr1 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE30)) == HADDR_UNDEF)
+ if((addr1 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE30)) == HADDR_UNDEF)
TEST_ERROR
H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
@@ -2174,7 +2177,7 @@ test_mf_aggr_alloc1(const char *env_h5_drvr, hid_t fapl)
TEST_ERROR
/* Allocate second block from meta_aggr */
- if((addr2 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE50)) == HADDR_UNDEF)
+ if((addr2 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE50)) == HADDR_UNDEF)
TEST_ERROR
H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
@@ -2203,9 +2206,9 @@ test_mf_aggr_alloc1(const char *env_h5_drvr, hid_t fapl)
TEST_ERROR
/* Free the two blocks: order matters because of H5F_FSPACE_STRATEGY_AGGR strategy */
- if(H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr2, (hsize_t)TBLOCK_SIZE50) < 0)
+ if(H5MF_xfree(f, type, addr2, (hsize_t)TBLOCK_SIZE50) < 0)
TEST_ERROR
- if(H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr1, (hsize_t)TBLOCK_SIZE30) < 0)
+ if(H5MF_xfree(f, type, addr1, (hsize_t)TBLOCK_SIZE30) < 0)
TEST_ERROR
if(H5Fclose(file) < 0)
@@ -2306,13 +2309,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, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE30);
+ addr1 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE30);
H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if((addr1+TBLOCK_SIZE30) != ma_addr)
TEST_ERROR
- addr2 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE50);
+ addr2 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE50);
H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if((addr2+TBLOCK_SIZE50) != ma_addr)
@@ -2321,7 +2324,7 @@ test_mf_aggr_alloc2(const char *env_h5_drvr, hid_t fapl)
if (ma_size != (TBLOCK_SIZE2048 - (TBLOCK_SIZE30 + TBLOCK_SIZE50)))
TEST_ERROR
- addr3 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE2058);
+ addr3 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE2058);
H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
@@ -2351,7 +2354,7 @@ test_mf_aggr_alloc2(const char *env_h5_drvr, hid_t fapl)
if(NULL == (f = (H5F_t *)H5I_object(file)))
FAIL_STACK_ERROR
- H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr1, (hsize_t)TBLOCK_SIZE30+TBLOCK_SIZE50+TBLOCK_SIZE2058);
+ H5MF_xfree(f, type, addr1, (hsize_t)TBLOCK_SIZE30+TBLOCK_SIZE50+TBLOCK_SIZE2058);
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
@@ -2463,14 +2466,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, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE30);
+ addr1 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE30);
H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if ((addr1+TBLOCK_SIZE30) != ma_addr)
TEST_ERROR
/* Allocate second block from meta_aggr */
- addr2 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE50);
+ addr2 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE50);
H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
@@ -2481,14 +2484,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, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE30);
+ saddr1 = H5MF_alloc(f, stype, (hsize_t)TBLOCK_SIZE30);
H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size);
if((saddr1+TBLOCK_SIZE30) != sdata_addr)
TEST_ERROR
if(sdata_size != (TBLOCK_SIZE2048 - TBLOCK_SIZE30)) TEST_ERROR
/* Allocate third block, which is from file allocation not from meta_aggr */
- addr3 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)(TBLOCK_SIZE2058));
+ addr3 = H5MF_alloc(f, type, (hsize_t)(TBLOCK_SIZE2058));
H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size);
@@ -2498,7 +2501,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, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE50);
+ addr4 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE50);
H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if((addr4+TBLOCK_SIZE50) != ma_addr)
@@ -2507,11 +2510,11 @@ test_mf_aggr_alloc3(const char *env_h5_drvr, hid_t fapl)
TEST_ERROR
/* Free all the allocated blocks */
- H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr1, (hsize_t)TBLOCK_SIZE30);
- H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr2, (hsize_t)TBLOCK_SIZE50);
- H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr3, (hsize_t)TBLOCK_SIZE2058);
- H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr4, (hsize_t)TBLOCK_SIZE50);
- H5MF_xfree(f, stype, H5AC_ind_read_dxpl_id, saddr1, (hsize_t)TBLOCK_SIZE30);
+ H5MF_xfree(f, type, addr1, (hsize_t)TBLOCK_SIZE30);
+ H5MF_xfree(f, type, addr2, (hsize_t)TBLOCK_SIZE50);
+ H5MF_xfree(f, type, addr3, (hsize_t)TBLOCK_SIZE2058);
+ H5MF_xfree(f, type, addr4, (hsize_t)TBLOCK_SIZE50);
+ H5MF_xfree(f, stype, saddr1, (hsize_t)TBLOCK_SIZE30);
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
@@ -2626,7 +2629,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, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE30);
+ addr1 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE30);
H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
@@ -2637,19 +2640,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, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE30);
+ saddr1 = H5MF_alloc(f, stype, (hsize_t)TBLOCK_SIZE30);
H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size);
if((saddr1+TBLOCK_SIZE30) != sdata_addr)
TEST_ERROR
/* Allocate second block from sdata_aggr */
- saddr2 = H5MF_alloc(f, stype, H5AC_ind_read_dxpl_id, (hsize_t)(TBLOCK_SIZE2048 - TBLOCK_SIZE30));
+ saddr2 = H5MF_alloc(f, stype, (hsize_t)(TBLOCK_SIZE2048 - TBLOCK_SIZE30));
H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size);
if(saddr2+(TBLOCK_SIZE2048 - TBLOCK_SIZE30) != sdata_addr)
TEST_ERROR
/* Allocate third block from sdata_aggr */
- saddr3 = H5MF_alloc(f, stype, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE50);
+ saddr3 = H5MF_alloc(f, stype, (hsize_t)TBLOCK_SIZE50);
H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size);
if((saddr3+TBLOCK_SIZE50) != sdata_addr)
@@ -2658,7 +2661,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, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE2058);
+ addr2 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE2058);
if(addr2 != sdata_addr)
TEST_ERROR
@@ -2674,11 +2677,11 @@ test_mf_aggr_alloc4(const char *env_h5_drvr, hid_t fapl)
TEST_ERROR
/* Free all the allocated blocks */
- H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr1, (hsize_t)TBLOCK_SIZE30);
- H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr2, (hsize_t)TBLOCK_SIZE2058);
- H5MF_xfree(f, stype, H5AC_ind_read_dxpl_id, saddr1, (hsize_t)TBLOCK_SIZE30);
- H5MF_xfree(f, stype, H5AC_ind_read_dxpl_id, saddr2, (hsize_t)TBLOCK_SIZE2048 - TBLOCK_SIZE30);
- H5MF_xfree(f, stype, H5AC_ind_read_dxpl_id, saddr3, (hsize_t)TBLOCK_SIZE50);
+ H5MF_xfree(f, type, addr1, (hsize_t)TBLOCK_SIZE30);
+ H5MF_xfree(f, type, addr2, (hsize_t)TBLOCK_SIZE2058);
+ H5MF_xfree(f, stype, saddr1, (hsize_t)TBLOCK_SIZE30);
+ H5MF_xfree(f, stype, saddr2, (hsize_t)TBLOCK_SIZE2048 - TBLOCK_SIZE30);
+ H5MF_xfree(f, stype, saddr3, (hsize_t)TBLOCK_SIZE50);
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
@@ -2774,14 +2777,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, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE30);
+ addr1 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE30);
H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if((addr1+TBLOCK_SIZE30) != ma_addr)
TEST_ERROR
/* Allocate second block from meta_aggr */
- addr2 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE50);
+ addr2 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE50);
H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if(addr2+TBLOCK_SIZE50 != ma_addr)
@@ -2790,7 +2793,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, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE1970);
+ addr3 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE1970);
H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size);
if(addr3 != ma_addr) TEST_ERROR
@@ -2799,9 +2802,9 @@ test_mf_aggr_alloc5(const char *env_h5_drvr, hid_t fapl)
TEST_ERROR
/* Free all the allocated blocks */
- H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr1, (hsize_t)TBLOCK_SIZE30);
- H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr2, (hsize_t)TBLOCK_SIZE50);
- H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr3, (hsize_t)TBLOCK_SIZE1970);
+ H5MF_xfree(f, type, addr1, (hsize_t)TBLOCK_SIZE30);
+ H5MF_xfree(f, type, addr2, (hsize_t)TBLOCK_SIZE50);
+ H5MF_xfree(f, type, addr3, (hsize_t)TBLOCK_SIZE1970);
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
@@ -2909,14 +2912,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, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE30);
+ addr1 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE30);
H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if((addr1+TBLOCK_SIZE30) != ma_addr)
TEST_ERROR
/* Allocate second block from meta_aggr */
- addr2 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE50);
+ addr2 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE50);
H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if(addr2+TBLOCK_SIZE50 != ma_addr)
@@ -2926,14 +2929,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, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE30);
+ saddr1 = H5MF_alloc(f, stype, (hsize_t)TBLOCK_SIZE30);
H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size);
if((saddr1+TBLOCK_SIZE30) != sdata_addr) TEST_ERROR
if(sdata_size != (TBLOCK_SIZE2048 - TBLOCK_SIZE30)) TEST_ERROR
/* Allocate third block from meta_aggr */
- addr3 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE1970);
+ addr3 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE1970);
H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size);
@@ -2954,10 +2957,10 @@ test_mf_aggr_alloc6(const char *env_h5_drvr, hid_t fapl)
TEST_ERROR
/* Free all the allocated blocks */
- H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr1, (hsize_t)TBLOCK_SIZE30);
- H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr2, (hsize_t)TBLOCK_SIZE50);
- H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr3, (hsize_t)TBLOCK_SIZE1970);
- H5MF_xfree(f, stype, H5AC_ind_read_dxpl_id, saddr1, (hsize_t)TBLOCK_SIZE30);
+ H5MF_xfree(f, type, addr1, (hsize_t)TBLOCK_SIZE30);
+ H5MF_xfree(f, type, addr2, (hsize_t)TBLOCK_SIZE50);
+ H5MF_xfree(f, type, addr3, (hsize_t)TBLOCK_SIZE1970);
+ H5MF_xfree(f, stype, saddr1, (hsize_t)TBLOCK_SIZE30);
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
@@ -3075,13 +3078,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, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE30);
+ addr1 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE30);
H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if ((addr1+TBLOCK_SIZE30) != ma_addr)
TEST_ERROR
/* Allocate the second block from meta_aggr */
- addr2 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE50);
+ addr2 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE50);
H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if (addr2+TBLOCK_SIZE50 != ma_addr)
@@ -3091,13 +3094,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, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE30);
+ saddr1 = H5MF_alloc(f, stype, (hsize_t)TBLOCK_SIZE30);
H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size);
if ((saddr1+TBLOCK_SIZE30) != sdata_addr)
TEST_ERROR
/* Allocate the second block from sdata_aggr */
- saddr2 = H5MF_alloc(f, stype, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE2048 - TBLOCK_SIZE30);
+ saddr2 = H5MF_alloc(f, stype, (hsize_t)TBLOCK_SIZE2048 - TBLOCK_SIZE30);
H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size);
if ((saddr2+(TBLOCK_SIZE2048 - TBLOCK_SIZE30)) != sdata_addr)
@@ -3105,7 +3108,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, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE50);
+ saddr3 = H5MF_alloc(f, stype, (hsize_t)TBLOCK_SIZE50);
H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size);
if ((saddr3+TBLOCK_SIZE50) != sdata_addr)
@@ -3114,7 +3117,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, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE1970);
+ addr3 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE1970);
H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if (addr3 != sdata_addr) TEST_ERROR
@@ -3136,12 +3139,12 @@ test_mf_aggr_alloc7(const char *env_h5_drvr, hid_t fapl)
TEST_ERROR
/* Free all the allocated blocks */
- H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr1, (hsize_t)TBLOCK_SIZE30);
- H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr2, (hsize_t)TBLOCK_SIZE50);
- H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr3, (hsize_t)TBLOCK_SIZE1970);
- H5MF_xfree(f, stype, H5AC_ind_read_dxpl_id, saddr1, (hsize_t)TBLOCK_SIZE30);
- H5MF_xfree(f, stype, H5AC_ind_read_dxpl_id, saddr2, (hsize_t)(TBLOCK_SIZE2048 - TBLOCK_SIZE30));
- H5MF_xfree(f, stype, H5AC_ind_read_dxpl_id, saddr3, (hsize_t)TBLOCK_SIZE50);
+ H5MF_xfree(f, type, addr1, (hsize_t)TBLOCK_SIZE30);
+ H5MF_xfree(f, type, addr2, (hsize_t)TBLOCK_SIZE50);
+ H5MF_xfree(f, type, addr3, (hsize_t)TBLOCK_SIZE1970);
+ H5MF_xfree(f, stype, saddr1, (hsize_t)TBLOCK_SIZE30);
+ H5MF_xfree(f, stype, saddr2, (hsize_t)(TBLOCK_SIZE2048 - TBLOCK_SIZE30));
+ H5MF_xfree(f, stype, saddr3, (hsize_t)TBLOCK_SIZE50);
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
@@ -3238,7 +3241,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, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE30);
+ addr = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE30);
H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if((addr+TBLOCK_SIZE30) != ma_addr)
TEST_ERROR
@@ -3250,7 +3253,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, H5AC_ind_read_dxpl_id, type, (haddr_t)new_addr, (hsize_t)10, (hsize_t)(TBLOCK_SIZE50));
+ was_extended = H5MF_try_extend(f, type, (haddr_t)new_addr, (hsize_t)10, (hsize_t)(TBLOCK_SIZE50));
/* should succeed */
if(!was_extended)
@@ -3263,10 +3266,10 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl)
if(new_ma_size != (f->shared->meta_aggr.alloc_size - TBLOCK_SIZE50)) TEST_ERROR
/* Free the allocated blocks */
- H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr, (hsize_t)TBLOCK_SIZE50);
+ H5MF_xfree(f, type, addr, (hsize_t)TBLOCK_SIZE50);
/* Try to extend the block by an amount > (% * aggr->alloc_size) but amount < aggr->alloc_size */
- was_extended = H5MF_try_extend(f, H5AC_ind_read_dxpl_id, type, (haddr_t)new_addr, (hsize_t)10, (hsize_t)(TBLOCK_SIZE700));
+ was_extended = H5MF_try_extend(f, type, (haddr_t)new_addr, (hsize_t)10, (hsize_t)(TBLOCK_SIZE700));
/* should succeed */
if(!was_extended)
@@ -3279,10 +3282,10 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl)
if(new_ma_size != (f->shared->meta_aggr.alloc_size * 2 - TBLOCK_SIZE700)) TEST_ERROR
/* Free the allocated blocks */
- H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr, (hsize_t)TBLOCK_SIZE700);
+ H5MF_xfree(f, type, addr, (hsize_t)TBLOCK_SIZE700);
/* Try to extend the block by an amount > (% * aggr->alloc_size) but amount > aggr->alloc_size */
- was_extended = H5MF_try_extend(f, H5AC_ind_read_dxpl_id, type, (haddr_t)new_addr, (hsize_t)10, (hsize_t)(TBLOCK_SIZE2058));
+ was_extended = H5MF_try_extend(f, type, (haddr_t)new_addr, (hsize_t)10, (hsize_t)(TBLOCK_SIZE2058));
/* should succeed */
if(!was_extended)
@@ -3295,7 +3298,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, H5AC_ind_read_dxpl_id, addr, (hsize_t)TBLOCK_SIZE2058);
+ H5MF_xfree(f, type, addr, (hsize_t)TBLOCK_SIZE2058);
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
@@ -3329,14 +3332,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, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE30);
+ addr = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE30);
H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if((addr+TBLOCK_SIZE30) != ma_addr)
TEST_ERROR
/* Allocate the first block from sdata_aggr */
stype = H5FD_MEM_DRAW;
- saddr = H5MF_alloc(f, stype, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE50);
+ saddr = H5MF_alloc(f, stype, (hsize_t)TBLOCK_SIZE50);
H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size);
if((saddr+TBLOCK_SIZE50) != sdata_addr)
TEST_ERROR
@@ -3348,7 +3351,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, H5AC_ind_read_dxpl_id, type, (haddr_t)new_addr, (hsize_t)10, (hsize_t)(TBLOCK_SIZE50));
+ was_extended = H5MF_try_extend(f, type, (haddr_t)new_addr, (hsize_t)10, (hsize_t)(TBLOCK_SIZE50));
if(!was_extended)
TEST_ERROR
@@ -3364,8 +3367,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, H5AC_ind_read_dxpl_id, addr, (hsize_t)TBLOCK_SIZE30);
- H5MF_xfree(f, stype, H5AC_ind_read_dxpl_id, saddr, (hsize_t)TBLOCK_SIZE50);
+ H5MF_xfree(f, type, addr, (hsize_t)TBLOCK_SIZE30);
+ H5MF_xfree(f, stype, saddr, (hsize_t)TBLOCK_SIZE50);
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
@@ -3399,14 +3402,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, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE30);
+ addr = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE30);
H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if ((addr+TBLOCK_SIZE30) != ma_addr)
TEST_ERROR
/* Allocate first block from sdata_aggr */
stype = H5FD_MEM_DRAW;
- saddr = H5MF_alloc(f, stype, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE50);
+ saddr = H5MF_alloc(f, stype, (hsize_t)TBLOCK_SIZE50);
H5MF_aggr_query(f, &(f->shared->sdata_aggr), &sdata_addr, &sdata_size);
if((saddr+TBLOCK_SIZE50) != sdata_addr)
TEST_ERROR
@@ -3418,7 +3421,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, H5AC_ind_read_dxpl_id, type, (haddr_t)new_addr, (hsize_t)10, (hsize_t)(TBLOCK_SIZE50));
+ was_extended = H5MF_try_extend(f, type, (haddr_t)new_addr, (hsize_t)10, (hsize_t)(TBLOCK_SIZE50));
if(was_extended)
TEST_ERROR
@@ -3432,8 +3435,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, H5AC_ind_read_dxpl_id, addr, (hsize_t)TBLOCK_SIZE30);
- H5MF_xfree(f, stype, H5AC_ind_read_dxpl_id, saddr, (hsize_t)TBLOCK_SIZE50);
+ H5MF_xfree(f, type, addr, (hsize_t)TBLOCK_SIZE30);
+ H5MF_xfree(f, stype, saddr, (hsize_t)TBLOCK_SIZE50);
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
@@ -3529,7 +3532,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, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE30);
+ addr1 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE30);
H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size);
ma_addr = new_ma_addr - TBLOCK_SIZE30;
@@ -3537,7 +3540,7 @@ test_mf_aggr_absorb(const char *env_h5_drvr, hid_t fapl)
TEST_ERROR
/* should succeed */
- if(H5MF_try_shrink(f, type, H5AC_ind_read_dxpl_id, addr1, (hsize_t)TBLOCK_SIZE30) <= 0)
+ if(H5MF_try_shrink(f, type, addr1, (hsize_t)TBLOCK_SIZE30) <= 0)
TEST_ERROR
H5MF_aggr_query(f, &(f->shared->meta_aggr), &new_ma_addr, &new_ma_size);
@@ -3576,7 +3579,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, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE30);
+ addr1 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE30);
H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if((addr1+TBLOCK_SIZE30) != ma_addr) TEST_ERROR
@@ -3584,12 +3587,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, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE50);
+ saddr1 = H5MF_alloc(f, stype, (hsize_t)TBLOCK_SIZE50);
H5MF_aggr_query(f, &(f->shared->sdata_aggr), NULL, &sdata_size);
/* should succeed */
- if(H5MF_try_shrink(f, stype, H5AC_ind_read_dxpl_id, saddr1, (hsize_t)TBLOCK_SIZE50) <= 0)
+ if(H5MF_try_shrink(f, stype, saddr1, (hsize_t)TBLOCK_SIZE50) <= 0)
TEST_ERROR
H5MF_aggr_query(f, &(f->shared->sdata_aggr), &new_sdata_addr, &new_sdata_size);
@@ -3601,7 +3604,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, H5AC_ind_read_dxpl_id, addr1, (hsize_t)TBLOCK_SIZE30);
+ H5MF_xfree(f, type, addr1, (hsize_t)TBLOCK_SIZE30);
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
@@ -3635,35 +3638,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, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE30);
+ addr1 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE30);
H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if((addr1+TBLOCK_SIZE30) != ma_addr)
TEST_ERROR
/* Allocate block B from meta_aggr */
- addr2 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE50);
+ addr2 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE50);
H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if((addr2+TBLOCK_SIZE50) != ma_addr)
TEST_ERROR
/* Allocate block C from meta_aggr */
- addr3 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)(TBLOCK_SIZE30+TBLOCK_SIZE50));
+ addr3 = H5MF_alloc(f, type, (hsize_t)(TBLOCK_SIZE30+TBLOCK_SIZE50));
H5MF_aggr_query(f, &(f->shared->meta_aggr), &ma_addr, &ma_size);
if((addr3+TBLOCK_SIZE30+TBLOCK_SIZE50) != ma_addr)
TEST_ERROR
/* should not succeed */
- if(H5MF_try_shrink(f, type, H5AC_ind_read_dxpl_id, addr2, (hsize_t)TBLOCK_SIZE50) > 0)
+ if(H5MF_try_shrink(f, type, addr2, (hsize_t)TBLOCK_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, H5AC_ind_read_dxpl_id, addr1, (hsize_t)TBLOCK_SIZE30);
- H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr2, (hsize_t)TBLOCK_SIZE50);
- H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr3, (hsize_t)(TBLOCK_SIZE30+TBLOCK_SIZE50));
+ H5MF_xfree(f, type, addr1, (hsize_t)TBLOCK_SIZE30);
+ H5MF_xfree(f, type, addr2, (hsize_t)TBLOCK_SIZE50);
+ H5MF_xfree(f, type, addr3, (hsize_t)(TBLOCK_SIZE30+TBLOCK_SIZE50));
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
@@ -3790,7 +3793,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, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE30);
+ addr1 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE30);
/* Verify that the allocated block is aligned */
if(addr1 % alignment) TEST_ERROR
@@ -3814,7 +3817,7 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
mis_align = alignment - tmp;
accum += (mis_align + TBLOCK_SIZE50);
- addr2 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE50);
+ addr2 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE50);
/* Verify that the allocated block is aligned */
if (addr2 % alignment) TEST_ERROR
@@ -3831,8 +3834,8 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
TEST_ERROR
}
- H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr1, (hsize_t)TBLOCK_SIZE30);
- H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr2, (hsize_t)TBLOCK_SIZE50);
+ H5MF_xfree(f, type, addr1, (hsize_t)TBLOCK_SIZE30);
+ H5MF_xfree(f, type, addr2, (hsize_t)TBLOCK_SIZE50);
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
@@ -3866,7 +3869,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, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE50);
+ addr1 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE50);
/* address should be aligned */
if (addr1 % alignment) TEST_ERROR
@@ -3887,7 +3890,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, H5AC_ind_read_dxpl_id, addr1, (hsize_t)TBLOCK_SIZE50) <= 0)
+ if(H5MF_try_shrink(f, type, addr1, (hsize_t)TBLOCK_SIZE50) <= 0)
TEST_ERROR
if(H5Fclose(file) < 0)
@@ -3921,7 +3924,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, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE50);
+ addr1 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE50);
/* address should be aligned */
if(addr1 % alignment) TEST_ERROR
@@ -3942,7 +3945,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, H5AC_ind_read_dxpl_id, type, (haddr_t)addr1, (hsize_t)TBLOCK_SIZE50, (hsize_t)TBLOCK_SIZE30);
+ was_extended = H5MF_try_extend(f, type, (haddr_t)addr1, (hsize_t)TBLOCK_SIZE50, (hsize_t)TBLOCK_SIZE30);
if(was_extended <=0) TEST_ERROR
@@ -4042,7 +4045,7 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
FAIL_STACK_ERROR
/* Start up H5FD_MEM_SUPER free-space manager */
- if(H5MF_start_fstype(f, H5AC_ind_read_dxpl_id, (H5F_mem_page_t)H5FD_MEM_SUPER) < 0)
+ if(H5MF__start_fstype(f, (H5F_mem_page_t)H5FD_MEM_SUPER) < 0)
FAIL_STACK_ERROR
if(f->shared->fs_state[H5FD_MEM_SUPER] != H5F_FS_STATE_OPEN)
@@ -4054,7 +4057,7 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
sect_node = H5MF_sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)alignment, (hsize_t)TBLOCK_SIZE50);
/* Add section A to free-space manager */
- if(H5MF_add_sect(f, H5FD_MEM_SUPER, H5AC_ind_read_dxpl_id, f->shared->fs_man[H5FD_MEM_SUPER], sect_node))
+ if(H5MF__add_sect(f, H5FD_MEM_SUPER, f->shared->fs_man[H5FD_MEM_SUPER], sect_node))
FAIL_STACK_ERROR
HDmemset(&state, 0, sizeof(H5FS_stat_t));
@@ -4066,7 +4069,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, H5FD_MEM_SUPER, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE50);
+ addr = H5MF_alloc(f, H5FD_MEM_SUPER, (hsize_t)TBLOCK_SIZE50);
/* Verify that the allocated block is section A in free-space */
if(addr != (haddr_t)alignment) TEST_ERROR
@@ -4080,7 +4083,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, H5FD_MEM_SUPER, H5AC_ind_read_dxpl_id, addr, (hsize_t)TBLOCK_SIZE50);
+ H5MF_xfree(f, H5FD_MEM_SUPER, addr, (hsize_t)TBLOCK_SIZE50);
state.tot_space += TBLOCK_SIZE50;
state.tot_sect_count += 1;
@@ -4105,7 +4108,7 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
FAIL_STACK_ERROR
/* Start up H5FD_MEM_SUPER free-space manager */
- if(H5MF_start_fstype(f, H5AC_ind_read_dxpl_id, (H5F_mem_page_t)H5FD_MEM_SUPER) < 0)
+ if(H5MF__start_fstype(f, (H5F_mem_page_t)H5FD_MEM_SUPER) < 0)
FAIL_STACK_ERROR
if(f->shared->fs_state[H5FD_MEM_SUPER] != H5F_FS_STATE_OPEN)
@@ -4117,7 +4120,7 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
sect_node = H5MF_sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR70, (hsize_t)TBLOCK_SIZE8000);
/* Add section A to free-space manager */
- if(H5MF_add_sect(f, H5FD_MEM_SUPER, H5AC_ind_read_dxpl_id, f->shared->fs_man[H5FD_MEM_SUPER], sect_node))
+ if(H5MF__add_sect(f, H5FD_MEM_SUPER, f->shared->fs_man[H5FD_MEM_SUPER], sect_node))
FAIL_STACK_ERROR
HDmemset(&state, 0, sizeof(H5FS_stat_t));
@@ -4129,7 +4132,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, H5FD_MEM_SUPER, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE600);
+ addr = H5MF_alloc(f, H5FD_MEM_SUPER, (hsize_t)TBLOCK_SIZE600);
/* Verify that the allocated block is aligned */
if (addr % alignment) TEST_ERROR
@@ -4143,7 +4146,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, H5AC_ind_read_dxpl_id, H5FD_MEM_SUPER, (haddr_t)addr, (hsize_t)TBLOCK_SIZE600, (hsize_t)TBLOCK_SIZE200);
+ was_extended = H5MF_try_extend(f, H5FD_MEM_SUPER, (haddr_t)addr, (hsize_t)TBLOCK_SIZE600, (hsize_t)TBLOCK_SIZE200);
if(was_extended <=0) TEST_ERROR
@@ -4154,7 +4157,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, H5FD_MEM_SUPER, H5AC_ind_read_dxpl_id, addr, (hsize_t)(TBLOCK_SIZE600+TBLOCK_SIZE200));
+ H5MF_xfree(f, H5FD_MEM_SUPER, addr, (hsize_t)(TBLOCK_SIZE600+TBLOCK_SIZE200));
/* only 1 section in free-space because of merging */
state.tot_space += (TBLOCK_SIZE600+TBLOCK_SIZE200);
@@ -4188,7 +4191,7 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
FAIL_STACK_ERROR
/* Start up H5FD_MEM_SUPER free-space manager */
- if(H5MF_start_fstype(f, H5AC_ind_read_dxpl_id, (H5F_mem_page_t)H5FD_MEM_SUPER) < 0)
+ if(H5MF__start_fstype(f, (H5F_mem_page_t)H5FD_MEM_SUPER) < 0)
FAIL_STACK_ERROR
if(f->shared->fs_state[H5FD_MEM_SUPER] != H5F_FS_STATE_OPEN)
@@ -4200,7 +4203,7 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
sect_node = H5MF_sect_new(H5MF_FSPACE_SECT_SIMPLE, (haddr_t)TBLOCK_ADDR70, (hsize_t)TBLOCK_SIZE700);
/* Add section A to free-space manager */
- if(H5MF_add_sect(f, H5FD_MEM_SUPER, H5AC_ind_read_dxpl_id, f->shared->fs_man[H5FD_MEM_SUPER], sect_node))
+ if(H5MF__add_sect(f, H5FD_MEM_SUPER, f->shared->fs_man[H5FD_MEM_SUPER], sect_node))
FAIL_STACK_ERROR
HDmemset(&state, 0, sizeof(H5FS_stat_t));
@@ -4215,7 +4218,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, H5FD_MEM_SUPER, H5AC_ind_read_dxpl_id, (hsize_t)(TBLOCK_SIZE40));
+ addr = H5MF_alloc(f, H5FD_MEM_SUPER, (hsize_t)(TBLOCK_SIZE40));
/* Verify that the allocated block is aligned */
if(addr % alignment)
@@ -4413,7 +4416,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, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE30);
+ addr1 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE30);
/* Verify that the allocated block is aligned */
if(addr1 % alignment) TEST_ERROR
@@ -4437,7 +4440,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, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE50);
+ addr2 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE50);
/* Verify that the allocated block is aligned */
if(addr2 % alignment) TEST_ERROR
@@ -4459,7 +4462,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, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE80);
+ addr3 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE80);
/* Verify that the allocated block is aligned */
if(addr3 % alignment) TEST_ERROR
@@ -4482,7 +4485,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, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE1970);
+ addr4 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE1970);
/* Verify that the allocated block is aligned */
if(addr4 % alignment) TEST_ERROR
@@ -4503,10 +4506,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, H5AC_ind_read_dxpl_id, addr1, (hsize_t)TBLOCK_SIZE30);
- H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr2, (hsize_t)TBLOCK_SIZE50);
- H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr3, (hsize_t)TBLOCK_SIZE80);
- H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr3, (hsize_t)TBLOCK_SIZE1970);
+ H5MF_xfree(f, type, addr1, (hsize_t)TBLOCK_SIZE30);
+ H5MF_xfree(f, type, addr2, (hsize_t)TBLOCK_SIZE50);
+ H5MF_xfree(f, type, addr3, (hsize_t)TBLOCK_SIZE80);
+ H5MF_xfree(f, type, addr3, (hsize_t)TBLOCK_SIZE1970);
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
@@ -4669,7 +4672,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, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE30);
+ addr1 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE30);
/* Verify that the allocated block is aligned */
if(addr1 % alignment) TEST_ERROR
@@ -4692,7 +4695,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, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE50);
+ addr2 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE50);
/* Verify that the allocated block is aligned */
if(addr2 % alignment) TEST_ERROR
@@ -4728,7 +4731,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, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE30);
+ saddr1 = H5MF_alloc(f, stype, (hsize_t)TBLOCK_SIZE30);
/* fragment for alignment of block 30 for sdata_aggr is freed to free-space */
if(mis_align) {
@@ -4761,7 +4764,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, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE80);
+ addr3 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE80);
/* Verify that the allocated block is aligned */
if (addr3 % alignment) TEST_ERROR
@@ -4789,10 +4792,10 @@ test_mf_align_alloc2(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
TEST_ERROR
}
- H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr1, (hsize_t)TBLOCK_SIZE30);
- H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr2, (hsize_t)TBLOCK_SIZE50);
- H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr3, (hsize_t)TBLOCK_SIZE80);
- H5MF_xfree(f, stype, H5AC_ind_read_dxpl_id, saddr1, (hsize_t)TBLOCK_SIZE30);
+ H5MF_xfree(f, type, addr1, (hsize_t)TBLOCK_SIZE30);
+ H5MF_xfree(f, type, addr2, (hsize_t)TBLOCK_SIZE50);
+ H5MF_xfree(f, type, addr3, (hsize_t)TBLOCK_SIZE80);
+ H5MF_xfree(f, stype, saddr1, (hsize_t)TBLOCK_SIZE30);
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
@@ -5008,7 +5011,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, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE30);
+ addr1 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE30);
/* Verify that the allocated block is aligned */
if(addr1 % alignment) TEST_ERROR
@@ -5031,7 +5034,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, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE50);
+ addr2 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE50);
/* Verify that the allocated block is aligned */
if(addr2 % alignment) TEST_ERROR
@@ -5066,7 +5069,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, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE30);
+ saddr1 = H5MF_alloc(f, stype, (hsize_t)TBLOCK_SIZE30);
/* Verify that the allocated block is aligned */
if(saddr1 % alignment) TEST_ERROR
@@ -5087,7 +5090,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, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE50);
+ saddr2 = H5MF_alloc(f, stype, (hsize_t)TBLOCK_SIZE50);
/* Verify that the allocated block is aligned */
if(saddr2 % alignment) TEST_ERROR
@@ -5108,7 +5111,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, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE80);
+ saddr3 = H5MF_alloc(f, stype, (hsize_t)TBLOCK_SIZE80);
/* Verify that the allocated block is aligned */
if(saddr3 % alignment) TEST_ERROR
@@ -5130,7 +5133,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, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE1034);
+ addr3 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE1034);
/* Verify that the allocated block is aligned */
if(addr3 % alignment) TEST_ERROR
@@ -5313,7 +5316,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, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE30);
+ addr1 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE30);
/* Verify that the allocated block is aligned */
if(addr1 % alignment) TEST_ERROR
@@ -5336,7 +5339,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, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE2058);
+ addr2 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE2058);
/* Verify that the allocated block is aligned */
if(addr2 % alignment) TEST_ERROR
@@ -5361,7 +5364,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, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE5);
+ addr3 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE5);
/* fragment for alignment of block 5 is freed to free-space */
if(mis_align) {
@@ -5524,7 +5527,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, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE30);
+ addr1 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE30);
/* Verify that the allocated block is aligned */
if(addr1 % alignment) TEST_ERROR
@@ -5548,7 +5551,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, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE30);
+ saddr1 = H5MF_alloc(f, stype, (hsize_t)TBLOCK_SIZE30);
/* Verify that the allocated block is aligned */
if(saddr1 % alignment) TEST_ERROR
@@ -5569,7 +5572,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, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE2058);
+ addr2 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE2058);
/* Verify that the allocated block is aligned */
if (addr2 % alignment) TEST_ERROR
@@ -5788,7 +5791,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, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE30);
+ addr1 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE30);
/* Verify that the allocated block is aligned */
if (addr1 % alignment) TEST_ERROR
@@ -5812,7 +5815,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, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE30);
+ saddr1 = H5MF_alloc(f, stype, (hsize_t)TBLOCK_SIZE30);
/* Verify that the allocated block is aligned */
if (saddr1 % alignment) TEST_ERROR
@@ -5833,7 +5836,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, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE50);
+ saddr2 = H5MF_alloc(f, stype, (hsize_t)TBLOCK_SIZE50);
/* Verify that the allocated block is aligned */
if (saddr2 % alignment) TEST_ERROR
@@ -5854,7 +5857,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, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE80);
+ saddr3 = H5MF_alloc(f, stype, (hsize_t)TBLOCK_SIZE80);
/* Verify that the allocated block is aligned */
if (saddr3 % alignment) TEST_ERROR
@@ -5876,7 +5879,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, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE2058);
+ addr2 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE2058);
/* Verify that the allocated block is aligned */
if (addr2 % alignment) TEST_ERROR
@@ -6032,7 +6035,7 @@ test_mf_bug1(const char *env_h5_drvr, hid_t fapl)
* aggregator that extends to the end of the file, with
* block_size / 2 bytes remaining, and the end of the file aligned */
type = H5FD_MEM_SUPER;
- addr1 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, align);
+ addr1 = H5MF_alloc(f, type, align);
/* Verify that the allocated block is aligned */
if(addr1 % align) TEST_ERROR
@@ -6041,7 +6044,7 @@ test_mf_bug1(const char *env_h5_drvr, hid_t fapl)
* aggregator to extend to the end of the file, with 0 bytes remaining, and
* the end of the file aligned */
type = H5FD_MEM_SUPER;
- addr2 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, align);
+ addr2 = H5MF_alloc(f, type, align);
/* Verify that the allocated block is aligned */
if(addr2 % align) TEST_ERROR
@@ -6053,7 +6056,7 @@ test_mf_bug1(const char *env_h5_drvr, hid_t fapl)
* force the aggregator to extend to the end of the file, with 0 bytes
* remaining, and the end of the file unaligned */
type = H5FD_MEM_SUPER;
- addr1 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, block_size + (hsize_t)1);
+ addr1 = H5MF_alloc(f, type, block_size + (hsize_t)1);
/* Verify that the allocated block is aligned */
if(addr1 % align) TEST_ERROR
@@ -6065,7 +6068,7 @@ test_mf_bug1(const char *env_h5_drvr, hid_t fapl)
/* Allocate a block of size 1. This should extend the aggregator from
* the previous allocation, and align the new block */
type = H5FD_MEM_SUPER;
- addr2 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)1);
+ addr2 = H5MF_alloc(f, type, (hsize_t)1);
/* Verify that the allocated block is aligned */
if(addr2 % align) TEST_ERROR
@@ -6093,6 +6096,7 @@ error:
* Verify that the file's free-space manager(s) are persistent for a split-file
*-------------------------------------------------------------------------
*/
+#ifdef PB_OUT
static unsigned
test_mf_fs_persist_split(void)
{
@@ -6157,36 +6161,36 @@ test_mf_fs_persist_split(void)
/* Allocate 4 blocks of type H5FD_MEM_SUPER */
type = H5FD_MEM_SUPER;
- if(HADDR_UNDEF == (addr1 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE1)))
+ if(HADDR_UNDEF == (addr1 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE1)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (addr2 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE2)))
+ if(HADDR_UNDEF == (addr2 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE2)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (addr3 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE3)))
+ if(HADDR_UNDEF == (addr3 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE3)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (addr4 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE4)))
+ if(HADDR_UNDEF == (addr4 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE4)))
FAIL_STACK_ERROR
/* Put block #1, #3 into H5FD_MEM_SUPER free-space manager */
- if(H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr1, (hsize_t)TBLOCK_SIZE1) < 0)
+ if(H5MF_xfree(f, type, addr1, (hsize_t)TBLOCK_SIZE1) < 0)
FAIL_STACK_ERROR
- if(H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr3, (hsize_t)TBLOCK_SIZE3) < 0)
+ if(H5MF_xfree(f, type, addr3, (hsize_t)TBLOCK_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, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE1)))
+ if(HADDR_UNDEF == (saddr1 = H5MF_alloc(f, stype, (hsize_t)TBLOCK_SIZE1)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (saddr2 = H5MF_alloc(f, stype, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE2)))
+ if(HADDR_UNDEF == (saddr2 = H5MF_alloc(f, stype, (hsize_t)TBLOCK_SIZE2)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (saddr3 = H5MF_alloc(f, stype, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE3)))
+ if(HADDR_UNDEF == (saddr3 = H5MF_alloc(f, stype, (hsize_t)TBLOCK_SIZE3)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (saddr4 = H5MF_alloc(f, stype, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE4)))
+ if(HADDR_UNDEF == (saddr4 = H5MF_alloc(f, stype, (hsize_t)TBLOCK_SIZE4)))
FAIL_STACK_ERROR
/* Put block #1, #3 into H5FD_MEM_DRAW free-space manager */
- if(H5MF_xfree(f, stype, H5AC_ind_read_dxpl_id, saddr1, (hsize_t)TBLOCK_SIZE1) < 0)
+ if(H5MF_xfree(f, stype, saddr1, (hsize_t)TBLOCK_SIZE1) < 0)
FAIL_STACK_ERROR
- if(H5MF_xfree(f, stype, H5AC_ind_read_dxpl_id, saddr3, (hsize_t)TBLOCK_SIZE3) < 0)
+ if(H5MF_xfree(f, stype, saddr3, (hsize_t)TBLOCK_SIZE3) < 0)
FAIL_STACK_ERROR
if(H5Fclose(file) < 0)
@@ -6205,7 +6209,7 @@ test_mf_fs_persist_split(void)
TEST_ERROR
/* Start up H5FD_MEM_SUPER free-space manager */
- if(H5MF_open_fstype(f, H5AC_ind_read_dxpl_id, (H5F_mem_page_t)type) < 0)
+ if(H5MF__open_fstype(f, (H5F_mem_page_t)type) < 0)
FAIL_STACK_ERROR
/* Get free-space info */
@@ -6219,7 +6223,7 @@ test_mf_fs_persist_split(void)
TEST_ERROR
/* Retrieve block #1 from H5FD_MEM_SUPER free-space manager; block #3 still in free-space */
- if(HADDR_UNDEF == (tmp_addr = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE1)))
+ if(HADDR_UNDEF == (tmp_addr = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE1)))
FAIL_STACK_ERROR
if(tmp_addr != addr1)
TEST_ERROR
@@ -6230,7 +6234,7 @@ test_mf_fs_persist_split(void)
/* Start up H5FD_MEM_DRAW free-space manager */
- if(H5MF_open_fstype(f, H5AC_ind_read_dxpl_id, (H5F_mem_page_t)stype) < 0)
+ if(H5MF__open_fstype(f, (H5F_mem_page_t)stype) < 0)
FAIL_STACK_ERROR
/* Get free-space info */
@@ -6244,13 +6248,13 @@ test_mf_fs_persist_split(void)
TEST_ERROR
/* Retrieve blocks #1 from H5FD_MEM_DRAW free-space manager */
- if(HADDR_UNDEF == (tmp_addr = H5MF_alloc(f, stype, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE1)))
+ if(HADDR_UNDEF == (tmp_addr = H5MF_alloc(f, stype, (hsize_t)TBLOCK_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, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE3)))
+ if(HADDR_UNDEF == (tmp_addr = H5MF_alloc(f, stype, (hsize_t)TBLOCK_SIZE3)))
FAIL_STACK_ERROR
if(tmp_addr != saddr3)
TEST_ERROR
@@ -6259,19 +6263,19 @@ test_mf_fs_persist_split(void)
/* Allocate 4 blocks of type H5FD_MEM_BTREE */
btype = H5FD_MEM_BTREE;
- if(HADDR_UNDEF == (baddr5 = H5MF_alloc(f, btype, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE5)))
+ if(HADDR_UNDEF == (baddr5 = H5MF_alloc(f, btype, (hsize_t)TBLOCK_SIZE5)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (baddr6 = H5MF_alloc(f, btype, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE6)))
+ if(HADDR_UNDEF == (baddr6 = H5MF_alloc(f, btype, (hsize_t)TBLOCK_SIZE6)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (baddr7 = H5MF_alloc(f, btype, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE7)))
+ if(HADDR_UNDEF == (baddr7 = H5MF_alloc(f, btype, (hsize_t)TBLOCK_SIZE7)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (baddr8 = H5MF_alloc(f, btype, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE8)))
+ if(HADDR_UNDEF == (baddr8 = H5MF_alloc(f, btype, (hsize_t)TBLOCK_SIZE8)))
FAIL_STACK_ERROR
/* Put block #5 & #7 into H5FD_MEM_BTREE free-space manager */
- if(H5MF_xfree(f, btype, H5AC_ind_read_dxpl_id, baddr5, (hsize_t)TBLOCK_SIZE5) < 0)
+ if(H5MF_xfree(f, btype, baddr5, (hsize_t)TBLOCK_SIZE5) < 0)
FAIL_STACK_ERROR
- if(H5MF_xfree(f, btype, H5AC_ind_read_dxpl_id, baddr7, (hsize_t)TBLOCK_SIZE7) < 0)
+ if(H5MF_xfree(f, btype, baddr7, (hsize_t)TBLOCK_SIZE7) < 0)
FAIL_STACK_ERROR
if(H5Fclose(file) < 0)
@@ -6294,7 +6298,7 @@ test_mf_fs_persist_split(void)
TEST_ERROR
/* Start up H5FD_MEM_SUPER free-space manager */
- if(H5MF_open_fstype(f, H5AC_ind_read_dxpl_id, (H5F_mem_page_t)type) < 0)
+ if(H5MF__open_fstype(f, (H5F_mem_page_t)type) < 0)
FAIL_STACK_ERROR
/* Get free-space info */
@@ -6306,13 +6310,13 @@ test_mf_fs_persist_split(void)
TEST_ERROR
/* Retrieve block #3 from H5FD_MEM_SUPER free-space manager */
- if(HADDR_UNDEF == (tmp_addr = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE3)))
+ if(HADDR_UNDEF == (tmp_addr = H5MF_alloc(f, type, (hsize_t)TBLOCK_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, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE7)))
+ if(HADDR_UNDEF == (tmp_addr = H5MF_alloc(f, btype, (hsize_t)TBLOCK_SIZE7)))
FAIL_STACK_ERROR
if(tmp_addr != baddr7)
TEST_ERROR
@@ -6334,7 +6338,7 @@ test_mf_fs_persist_split(void)
TEST_ERROR
/* Start up H5FD_MEM_SUPER free-space manager */
- if(H5MF_open_fstype(f, H5AC_ind_read_dxpl_id, (H5F_mem_page_t)type) < 0)
+ if(H5MF__open_fstype(f, (H5F_mem_page_t)type) < 0)
FAIL_STACK_ERROR
/* Get free-space info */
@@ -6474,36 +6478,36 @@ test_mf_fs_persist_multi(void)
/* Allocate 4 blocks of type H5FD_MEM_SUPER */
type = H5FD_MEM_SUPER;
- if(HADDR_UNDEF == (addr1 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE1)))
+ if(HADDR_UNDEF == (addr1 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE1)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (addr2 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE2)))
+ if(HADDR_UNDEF == (addr2 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE2)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (addr3 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE3)))
+ if(HADDR_UNDEF == (addr3 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE3)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (addr4 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE4)))
+ if(HADDR_UNDEF == (addr4 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE4)))
FAIL_STACK_ERROR
/* Put block #1, #3 into H5FD_MEM_SUPER free-space manager */
- if(H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr1, (hsize_t)TBLOCK_SIZE1) < 0)
+ if(H5MF_xfree(f, type, addr1, (hsize_t)TBLOCK_SIZE1) < 0)
FAIL_STACK_ERROR
- if(H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr3, (hsize_t)TBLOCK_SIZE3) < 0)
+ if(H5MF_xfree(f, type, addr3, (hsize_t)TBLOCK_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, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE1)))
+ if(HADDR_UNDEF == (saddr1 = H5MF_alloc(f, stype, (hsize_t)TBLOCK_SIZE1)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (saddr2 = H5MF_alloc(f, stype, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE2)))
+ if(HADDR_UNDEF == (saddr2 = H5MF_alloc(f, stype, (hsize_t)TBLOCK_SIZE2)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (saddr3 = H5MF_alloc(f, stype, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE3)))
+ if(HADDR_UNDEF == (saddr3 = H5MF_alloc(f, stype, (hsize_t)TBLOCK_SIZE3)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (saddr4 = H5MF_alloc(f, stype, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE4)))
+ if(HADDR_UNDEF == (saddr4 = H5MF_alloc(f, stype, (hsize_t)TBLOCK_SIZE4)))
FAIL_STACK_ERROR
/* Put block #1, #3 into H5FD_MEM_DRAW free-space manager */
- if(H5MF_xfree(f, stype, H5AC_ind_read_dxpl_id, saddr1, (hsize_t)TBLOCK_SIZE1) < 0)
+ if(H5MF_xfree(f, stype, saddr1, (hsize_t)TBLOCK_SIZE1) < 0)
FAIL_STACK_ERROR
- if(H5MF_xfree(f, stype, H5AC_ind_read_dxpl_id, saddr3, (hsize_t)TBLOCK_SIZE3) < 0)
+ if(H5MF_xfree(f, stype, saddr3, (hsize_t)TBLOCK_SIZE3) < 0)
FAIL_STACK_ERROR
if(H5Fclose(file) < 0)
@@ -6522,7 +6526,7 @@ test_mf_fs_persist_multi(void)
TEST_ERROR
/* Start up H5FD_MEM_SUPER free-space manager */
- if(H5MF_open_fstype(f, H5AC_ind_read_dxpl_id, (H5F_mem_page_t)type) < 0)
+ if(H5MF__open_fstype(f, (H5F_mem_page_t)type) < 0)
FAIL_STACK_ERROR
/* Get free-space info */
@@ -6536,7 +6540,7 @@ test_mf_fs_persist_multi(void)
TEST_ERROR
/* Retrieve block #1 from H5FD_MEM_SUPER free-space manager; block #3 still in free-space */
- if(HADDR_UNDEF == (tmp_addr = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE1)))
+ if(HADDR_UNDEF == (tmp_addr = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE1)))
FAIL_STACK_ERROR
if(tmp_addr != addr1)
TEST_ERROR
@@ -6546,7 +6550,7 @@ test_mf_fs_persist_multi(void)
TEST_ERROR
/* Start up H5FD_MEM_DRAW free-space manager */
- if(H5MF_open_fstype(f, H5AC_ind_read_dxpl_id, (H5F_mem_page_t)stype) < 0)
+ if(H5MF__open_fstype(f, (H5F_mem_page_t)stype) < 0)
FAIL_STACK_ERROR
/* Get free-space info */
@@ -6560,32 +6564,32 @@ test_mf_fs_persist_multi(void)
TEST_ERROR
/* Retrieve blocks #1 from H5FD_MEM_DRAW free-space manager */
- if(HADDR_UNDEF == (tmp_addr = H5MF_alloc(f, stype, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE1)))
+ if(HADDR_UNDEF == (tmp_addr = H5MF_alloc(f, stype, (hsize_t)TBLOCK_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, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE3)))
+ if(HADDR_UNDEF == (tmp_addr = H5MF_alloc(f, stype, (hsize_t)TBLOCK_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, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE1)))
+ if(HADDR_UNDEF == (baddr1 = H5MF_alloc(f, btype, (hsize_t)TBLOCK_SIZE1)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (baddr2 = H5MF_alloc(f, btype, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE2)))
+ if(HADDR_UNDEF == (baddr2 = H5MF_alloc(f, btype, (hsize_t)TBLOCK_SIZE2)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (baddr3 = H5MF_alloc(f, btype, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE3)))
+ if(HADDR_UNDEF == (baddr3 = H5MF_alloc(f, btype, (hsize_t)TBLOCK_SIZE3)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (baddr4 = H5MF_alloc(f, btype, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE4)))
+ if(HADDR_UNDEF == (baddr4 = H5MF_alloc(f, btype, (hsize_t)TBLOCK_SIZE4)))
FAIL_STACK_ERROR
/* Put block #1 & #3 into H5FD_MEM_BTREE free-space manager */
- if(H5MF_xfree(f, btype, H5AC_ind_read_dxpl_id, baddr1, (hsize_t)TBLOCK_SIZE1) < 0)
+ if(H5MF_xfree(f, btype, baddr1, (hsize_t)TBLOCK_SIZE1) < 0)
FAIL_STACK_ERROR
- if(H5MF_xfree(f, btype, H5AC_ind_read_dxpl_id, baddr3, (hsize_t)TBLOCK_SIZE3) < 0)
+ if(H5MF_xfree(f, btype, baddr3, (hsize_t)TBLOCK_SIZE3) < 0)
FAIL_STACK_ERROR
if(H5Fclose(file) < 0)
@@ -6604,7 +6608,7 @@ test_mf_fs_persist_multi(void)
TEST_ERROR
/* Start up H5FD_MEM_SUPER free-space manager */
- if(H5MF_open_fstype(f, H5AC_ind_read_dxpl_id, (H5F_mem_page_t)type) < 0)
+ if(H5MF__open_fstype(f, (H5F_mem_page_t)type) < 0)
FAIL_STACK_ERROR
/* Get free-space info */
@@ -6616,7 +6620,7 @@ test_mf_fs_persist_multi(void)
TEST_ERROR
/* Retrieve block #3 from H5FD_MEM_SUPER free-space manager */
- if(HADDR_UNDEF == (tmp_addr = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE3)))
+ if(HADDR_UNDEF == (tmp_addr = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE3)))
FAIL_STACK_ERROR
if(tmp_addr != addr3)
TEST_ERROR
@@ -6630,7 +6634,7 @@ test_mf_fs_persist_multi(void)
TEST_ERROR
/* Start up H5FD_MEM_BTREE free-space manager */
- if(H5MF_open_fstype(f, H5AC_ind_read_dxpl_id, (H5F_mem_page_t)btype) < 0)
+ if(H5MF__open_fstype(f, (H5F_mem_page_t)btype) < 0)
FAIL_STACK_ERROR
/* Get free-space info */
@@ -6645,13 +6649,13 @@ test_mf_fs_persist_multi(void)
/* Allocate 2 blocks of type H5FD_MEM_GHEAP */
gtype = H5FD_MEM_GHEAP;
- if(HADDR_UNDEF == (gaddr2 = H5MF_alloc(f, gtype, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE2)))
+ if(HADDR_UNDEF == (gaddr2 = H5MF_alloc(f, gtype, (hsize_t)TBLOCK_SIZE2)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (gaddr1 = H5MF_alloc(f, gtype, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE1)))
+ if(HADDR_UNDEF == (gaddr1 = H5MF_alloc(f, gtype, (hsize_t)TBLOCK_SIZE1)))
FAIL_STACK_ERROR
/* Put block #2 into H5FD_MEM_GHEAP free-space manager */
- if(H5MF_xfree(f, gtype, H5AC_ind_read_dxpl_id, gaddr2, (hsize_t)TBLOCK_SIZE2) < 0)
+ if(H5MF_xfree(f, gtype, gaddr2, (hsize_t)TBLOCK_SIZE2) < 0)
FAIL_STACK_ERROR
if(H5Fclose(file) < 0)
@@ -6668,15 +6672,15 @@ test_mf_fs_persist_multi(void)
/* 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_open_fstype(f, H5AC_ind_read_dxpl_id, (H5F_mem_page_t)type) < 0)
+ if(H5MF__open_fstype(f, (H5F_mem_page_t)type) < 0)
FAIL_STACK_ERROR
- if((node_found = H5FS_sect_find(f, H5AC_ind_read_dxpl_id, f->shared->fs_man[type],
+ if((node_found = H5FS_sect_find(f, f->shared->fs_man[type],
(hsize_t)TBLOCK_SIZE1, (H5FS_section_info_t **)&node)) < 0)
FAIL_STACK_ERROR
if(node_found) TEST_ERROR
- if((node_found = H5FS_sect_find(f, H5AC_ind_read_dxpl_id, f->shared->fs_man[type],
+ if((node_found = H5FS_sect_find(f, f->shared->fs_man[type],
(hsize_t)TBLOCK_SIZE3, (H5FS_section_info_t **)&node)) < 0)
FAIL_STACK_ERROR
if(node_found) TEST_ERROR
@@ -6687,7 +6691,7 @@ test_mf_fs_persist_multi(void)
TEST_ERROR
/* Start up H5FD_MEM_GHEAP free-space manager */
- if(H5MF_open_fstype(f, H5AC_ind_read_dxpl_id, (H5F_mem_page_t)gtype) < 0)
+ if(H5MF__open_fstype(f, (H5F_mem_page_t)gtype) < 0)
FAIL_STACK_ERROR
/* Get free-space info */
@@ -6718,6 +6722,7 @@ error:
} H5E_END_TRY;
return(1);
} /* test_mf_fs_persist_multi() */
+#endif /* PB_OUT */
/*
*-------------------------------------------------------------------------
@@ -6778,25 +6783,25 @@ test_mf_fs_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
/* Allocate 6 blocks */
type = H5FD_MEM_SUPER;
- if(HADDR_UNDEF == (addr1 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE1)))
+ if(HADDR_UNDEF == (addr1 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE1)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (addr2 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE2)))
+ if(HADDR_UNDEF == (addr2 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE2)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (addr3 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE3)))
+ if(HADDR_UNDEF == (addr3 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE3)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (addr4 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE4)))
+ if(HADDR_UNDEF == (addr4 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE4)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (addr5 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE5)))
+ if(HADDR_UNDEF == (addr5 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE5)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (addr6 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE6)))
+ if(HADDR_UNDEF == (addr6 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE6)))
FAIL_STACK_ERROR
/* Put block #1, #3, #5 to H5FD_MEM_SUPER free-space manager */
- if(H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr1, (hsize_t)TBLOCK_SIZE1) < 0)
+ if(H5MF_xfree(f, type, addr1, (hsize_t)TBLOCK_SIZE1) < 0)
FAIL_STACK_ERROR
- if(H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr3, (hsize_t)TBLOCK_SIZE3) < 0)
+ if(H5MF_xfree(f, type, addr3, (hsize_t)TBLOCK_SIZE3) < 0)
FAIL_STACK_ERROR
- if(H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr5, (hsize_t)TBLOCK_SIZE5) < 0)
+ if(H5MF_xfree(f, type, addr5, (hsize_t)TBLOCK_SIZE5) < 0)
FAIL_STACK_ERROR
if(H5Fclose(file) < 0)
@@ -6823,12 +6828,12 @@ test_mf_fs_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
*/
if((f->shared->first_alloc_dealloc) &&
(SUCCEED !=
- H5MF_tidy_self_referential_fsm_hack(f, H5AC_ind_read_dxpl_id)))
+ H5MF_tidy_self_referential_fsm_hack(f)))
FAIL_STACK_ERROR
/* Start up H5FD_MEM_SUPER free-space manager */
if(!(f->shared->fs_man[tt]))
- if(H5MF_open_fstype(f, H5AC_ind_read_dxpl_id, (H5F_mem_page_t)tt) < 0)
+ if(H5MF__open_fstype(f, (H5F_mem_page_t)tt) < 0)
FAIL_STACK_ERROR
/* Get info for free-space manager */
@@ -6843,13 +6848,13 @@ test_mf_fs_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
TEST_ERROR
/* Retrieve block #3 from H5FD_MEM_SUPER free-space manager */
- if(HADDR_UNDEF == (tmp_addr = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE3)))
+ if(HADDR_UNDEF == (tmp_addr = H5MF_alloc(f, type, (hsize_t)TBLOCK_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, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE1)))
+ if(HADDR_UNDEF == (tmp_addr = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE1)))
FAIL_STACK_ERROR
if(tmp_addr != addr1)
TEST_ERROR
@@ -6870,7 +6875,7 @@ test_mf_fs_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
TEST_ERROR
/* Retrieve block #5 from H5FD_MEM_SUPER free-space manager */
- if(HADDR_UNDEF == (tmp_addr = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE5)))
+ if(HADDR_UNDEF == (tmp_addr = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE5)))
FAIL_STACK_ERROR
if(tmp_addr != addr5)
TEST_ERROR
@@ -6916,6 +6921,7 @@ test_mf_fs_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
H5FD_mem_t type; /* File allocation type */
H5FS_stat_t fs_stat; /* Information for free-space manager */
haddr_t addr1, addr2, addr3, addr4; /* File address for H5FD_MEM_SUPER */
+ haddr_t addrx;
H5FD_mem_t fs_type;
hbool_t contig_addr_vfd;
hbool_t ran_H5MF_tidy_self_referential_fsm_hack = FALSE;
@@ -6958,25 +6964,25 @@ test_mf_fs_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
/* Allocate 4 blocks */
type = H5FD_MEM_SUPER;
- if(HADDR_UNDEF == (addr1 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE1)))
+ if(HADDR_UNDEF == (addr1 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE1)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (addr2 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE2)))
+ if(HADDR_UNDEF == (addr2 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE2)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (addr3 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE3)))
+ if(HADDR_UNDEF == (addr3 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE3)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (addr4 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE4)))
+ if(HADDR_UNDEF == (addr4 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE4)))
FAIL_STACK_ERROR
/* Put block #1, #3 to H5FD_MEM_SUPER free-space manager */
- if(H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr1, (hsize_t)TBLOCK_SIZE1) < 0)
+ if(H5MF_xfree(f, type, addr1, (hsize_t)TBLOCK_SIZE1) < 0)
FAIL_STACK_ERROR
- if(H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr3, (hsize_t)TBLOCK_SIZE3) < 0)
+ if(H5MF_xfree(f, type, addr3, (hsize_t)TBLOCK_SIZE3) < 0)
FAIL_STACK_ERROR
/* Retrieve block #1, #3 from H5FD_MEM_SUPER free-space manager */
- if(HADDR_UNDEF == (addr3 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE3)))
+ if(HADDR_UNDEF == (addr3 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE3)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (addr1 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE1)))
+ if(HADDR_UNDEF == (addr1 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE1)))
FAIL_STACK_ERROR
if(H5Fclose(file) < 0)
@@ -6997,7 +7003,7 @@ test_mf_fs_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
TEST_ERROR
/* Put block #3 to H5FD_MEM_SUPER free-space manager */
- if(H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr3, (hsize_t)TBLOCK_SIZE3) < 0)
+ if(H5MF_xfree(f, type, addr3, (hsize_t)TBLOCK_SIZE3) < 0)
FAIL_STACK_ERROR
if(H5Fclose(file) < 0)
@@ -7021,14 +7027,14 @@ test_mf_fs_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
* assertion failures on the first file space alloc / dealloc.
*/
if(f->shared->first_alloc_dealloc){
- if(SUCCEED!=H5MF_tidy_self_referential_fsm_hack(f,H5AC_ind_read_dxpl_id))
+ if(SUCCEED!=H5MF_tidy_self_referential_fsm_hack(f))
FAIL_STACK_ERROR
ran_H5MF_tidy_self_referential_fsm_hack = TRUE;
}
/* Start up H5FD_MEM_SUPER free-space manager */
if(!(f->shared->fs_man[fs_type]))
- if(H5MF_open_fstype(f, H5AC_ind_read_dxpl_id, (H5F_mem_page_t)fs_type) < 0)
+ if(H5MF__open_fstype(f, (H5F_mem_page_t)fs_type) < 0)
FAIL_STACK_ERROR
/* Get info for H5FD_MEM_SUPER free-space manager */
@@ -7047,9 +7053,15 @@ test_mf_fs_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
TEST_ERROR
/* Put block #4 to H5FD_MEM_SUPER free-space manager */
- if(H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr4, (hsize_t)TBLOCK_SIZE4) < 0)
+ if(H5MF_xfree(f, type, addr4, (hsize_t)TBLOCK_SIZE4) < 0)
FAIL_STACK_ERROR
+ if(!new_format) {
+ /* Need to take up this space so that the free-space manager will go away */
+ if(HADDR_UNDEF == (addrx = H5MF_alloc(f, type, (hsize_t)103)))
+ FAIL_STACK_ERROR
+ }
+
/* The H5FD_MEM_SUPER free-space manager will go away at H5MF_close() */
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
@@ -7061,7 +7073,6 @@ test_mf_fs_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
/* Get a pointer to the internal file object */
if(NULL == (f = (H5F_t *)H5I_object(file)))
FAIL_STACK_ERROR
-
/* Verify that the H5FD_MEM_SUPER free-space manager is not there */
if(H5F_addr_defined(f->shared->fs_addr[fs_type]))
TEST_ERROR
@@ -7163,25 +7174,25 @@ test_mf_strat_thres_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_for
/* Allocate 6 blocks */
type = H5FD_MEM_SUPER;
- if(HADDR_UNDEF == (addr1 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE1)))
+ if(HADDR_UNDEF == (addr1 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE1)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (addr2 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE2)))
+ if(HADDR_UNDEF == (addr2 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE2)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (addr3 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE3)))
+ if(HADDR_UNDEF == (addr3 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE3)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (addr4 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE4)))
+ if(HADDR_UNDEF == (addr4 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE4)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (addr5 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE5)))
+ if(HADDR_UNDEF == (addr5 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE5)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (addr6 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE6)))
+ if(HADDR_UNDEF == (addr6 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE6)))
FAIL_STACK_ERROR
/* Put block #1, #3, #5 to H5FD_MEM_SUPER free-space manager */
- if(H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr1, (hsize_t)TBLOCK_SIZE1) < 0)
+ if(H5MF_xfree(f, type, addr1, (hsize_t)TBLOCK_SIZE1) < 0)
FAIL_STACK_ERROR
- if(H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr3, (hsize_t)TBLOCK_SIZE3) < 0)
+ if(H5MF_xfree(f, type, addr3, (hsize_t)TBLOCK_SIZE3) < 0)
FAIL_STACK_ERROR
- if(H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr5, (hsize_t)TBLOCK_SIZE5) < 0)
+ if(H5MF_xfree(f, type, addr5, (hsize_t)TBLOCK_SIZE5) < 0)
FAIL_STACK_ERROR
@@ -7335,17 +7346,17 @@ test_mf_strat_thres_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format
/* Allocate 6 blocks */
type = H5FD_MEM_SUPER;
- if(HADDR_UNDEF == (addr1 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE1)))
+ if(HADDR_UNDEF == (addr1 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE1)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (addr2 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE2)))
+ if(HADDR_UNDEF == (addr2 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE2)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (addr3 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE3)))
+ if(HADDR_UNDEF == (addr3 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE3)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (addr4 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE4)))
+ if(HADDR_UNDEF == (addr4 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE4)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (addr5 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE5)))
+ if(HADDR_UNDEF == (addr5 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE5)))
FAIL_STACK_ERROR
- if(HADDR_UNDEF == (addr6 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE6)))
+ if(HADDR_UNDEF == (addr6 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE6)))
FAIL_STACK_ERROR
H5MF_alloc_to_fs_type(f, type, TBLOCK_SIZE6, (H5F_mem_page_t *)&tt);
@@ -7357,9 +7368,9 @@ test_mf_strat_thres_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format
}
/* Put block #3, #5 to H5FD_MEM_SUPER free-space manager */
- if(H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr3, (hsize_t)TBLOCK_SIZE3) < 0)
+ if(H5MF_xfree(f, type, addr3, (hsize_t)TBLOCK_SIZE3) < 0)
FAIL_STACK_ERROR
- if(H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr5, (hsize_t)TBLOCK_SIZE5) < 0)
+ if(H5MF_xfree(f, type, addr5, (hsize_t)TBLOCK_SIZE5) < 0)
FAIL_STACK_ERROR
fs_state.tot_space += TBLOCK_SIZE3 + TBLOCK_SIZE5;
@@ -7370,17 +7381,17 @@ test_mf_strat_thres_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format
TEST_ERROR
/* section #2 is less than threshold but is merged into section #3 */
- if(H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr2, (hsize_t)TBLOCK_SIZE2) < 0)
+ if(H5MF_xfree(f, type, addr2, (hsize_t)TBLOCK_SIZE2) < 0)
FAIL_STACK_ERROR
fs_state.tot_space += TBLOCK_SIZE2;
if(check_stats(f, f->shared->fs_man[tt], &fs_state))
TEST_ERROR
- if(H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr4, (hsize_t)TBLOCK_SIZE4) < 0)
+ if(H5MF_xfree(f, type, addr4, (hsize_t)TBLOCK_SIZE4) < 0)
FAIL_STACK_ERROR
- if(H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr6, (hsize_t)TBLOCK_SIZE6) < 0)
+ if(H5MF_xfree(f, type, addr6, (hsize_t)TBLOCK_SIZE6) < 0)
FAIL_STACK_ERROR
/* For paged aggregation, the sections in the page at EOF for small meta fs are merged but are not shrunk away */
@@ -7394,7 +7405,7 @@ test_mf_strat_thres_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format
TEST_ERROR
/* section #1 is less than threshold but is shrunk away */
- if(H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr1, (hsize_t)TBLOCK_SIZE1) < 0)
+ if(H5MF_xfree(f, type, addr1, (hsize_t)TBLOCK_SIZE1) < 0)
FAIL_STACK_ERROR
/* For paged aggregation, the section in the page at EOF for small meta fs is not shrunk away */
@@ -7492,29 +7503,29 @@ test_dichotomy(hid_t fapl)
/* Allocate the first block of type H5FD_MEM_SUPER */
type = H5FD_MEM_SUPER;
- addr1 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE30);
+ addr1 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE30);
/* Allocate the second block of type H5FD_MEM_SUPER */
- H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE50);
+ H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE50);
/* Allocate the first block of type H5FD_MEM_DRAW */
stype = H5FD_MEM_DRAW;
- saddr1 = H5MF_alloc(f, stype, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE30);
+ saddr1 = H5MF_alloc(f, stype, (hsize_t)TBLOCK_SIZE30);
/* Free the first block of type H5FD_MEM_SUPER */
- H5MF_xfree(f, type, H5AC_ind_read_dxpl_id, addr1, (hsize_t)TBLOCK_SIZE30);
+ H5MF_xfree(f, type, addr1, (hsize_t)TBLOCK_SIZE30);
/* Allocate the second block of type H5FD_MEM_DRAW */
- saddr2 = H5MF_alloc(f, stype, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE30);
+ saddr2 = H5MF_alloc(f, stype, (hsize_t)TBLOCK_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, H5AC_ind_read_dxpl_id, saddr1, (hsize_t)TBLOCK_SIZE30);
+ H5MF_xfree(f, stype, saddr1, (hsize_t)TBLOCK_SIZE30);
/* Allocate the third block of type H5FD_MEM_SUPER */
- addr3 = H5MF_alloc(f, type, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE30);
+ addr3 = H5MF_alloc(f, type, (hsize_t)TBLOCK_SIZE30);
/* Verify that addr3 is not saddr1 */
if(addr3 == saddr1) TEST_ERROR
@@ -7651,52 +7662,52 @@ test_page_alloc_xfree(const char *env_h5_drvr, hid_t fapl)
TEST_ERROR
/* Allocate 3 small meta data blocks: addr1, addr2, addr3 */
- H5MF_alloc(f, H5FD_MEM_OHDR, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE30);
- addr2 = H5MF_alloc(f, H5FD_MEM_OHDR, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE1034);
- addr3 = H5MF_alloc(f, H5FD_MEM_OHDR, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE50);
+ H5MF_alloc(f, H5FD_MEM_OHDR, (hsize_t)TBLOCK_SIZE30);
+ addr2 = H5MF_alloc(f, H5FD_MEM_OHDR, (hsize_t)TBLOCK_SIZE1034);
+ addr3 = H5MF_alloc(f, H5FD_MEM_OHDR, (hsize_t)TBLOCK_SIZE50);
/* Free the block with addr2 */
- H5MF_xfree(f, H5FD_MEM_OHDR, H5AC_ind_read_dxpl_id, addr2, (hsize_t)TBLOCK_SIZE1034);
+ H5MF_xfree(f, H5FD_MEM_OHDR, addr2, (hsize_t)TBLOCK_SIZE1034);
if(!fs_persist) {
H5MF_alloc_to_fs_type(f, H5FD_MEM_OHDR, TBLOCK_SIZE1034, (H5F_mem_page_t *)&fs_type);
/* Verify that the freed block with addr2 is found from the small meta data manager */
- if(H5MF_find_sect(f, H5FD_MEM_OHDR, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE1034, f->shared->fs_man[fs_type], &found_addr) < 0)
+ if(H5MF__find_sect(f, H5FD_MEM_OHDR, (hsize_t)TBLOCK_SIZE1034, f->shared->fs_man[fs_type], &found_addr) < 0)
TEST_ERROR
if(found_addr != addr2)
TEST_ERROR
} /* end if */
/* Allocate 2 small raw data blocks: saddr1, saddr2 */
- saddr1 = H5MF_alloc(f, H5FD_MEM_DRAW, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE30);
- H5MF_alloc(f, H5FD_MEM_DRAW, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE1034);
+ saddr1 = H5MF_alloc(f, H5FD_MEM_DRAW, (hsize_t)TBLOCK_SIZE30);
+ H5MF_alloc(f, H5FD_MEM_DRAW, (hsize_t)TBLOCK_SIZE1034);
/* Free the block with saddr1 */
- H5MF_xfree(f, H5FD_MEM_DRAW, H5AC_ind_read_dxpl_id, saddr1, (hsize_t)TBLOCK_SIZE30);
+ H5MF_xfree(f, H5FD_MEM_DRAW, saddr1, (hsize_t)TBLOCK_SIZE30);
if(!fs_persist) {
/* Verify that the freed block with saddr1 is found from the small raw data manager */
- if(H5MF_find_sect(f, H5FD_MEM_DRAW, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE30, f->shared->fs_man[H5F_MEM_PAGE_DRAW], &found_addr) < 0)
+ if(H5MF__find_sect(f, H5FD_MEM_DRAW, (hsize_t)TBLOCK_SIZE30, f->shared->fs_man[H5F_MEM_PAGE_DRAW], &found_addr) < 0)
TEST_ERROR
if(found_addr != saddr1)
TEST_ERROR
} /* end if */
/* Allocate 2 large data blocks: gaddr1, gaddr2 */
- gaddr1 = H5MF_alloc(f, H5FD_MEM_DRAW, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE5000);
- H5MF_alloc(f, H5FD_MEM_DRAW, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE8000);
+ gaddr1 = H5MF_alloc(f, H5FD_MEM_DRAW, (hsize_t)TBLOCK_SIZE5000);
+ H5MF_alloc(f, H5FD_MEM_DRAW, (hsize_t)TBLOCK_SIZE8000);
/* Free the block with gaddr1 */
- H5MF_xfree(f, H5FD_MEM_DRAW, H5AC_ind_read_dxpl_id, gaddr1, (hsize_t)TBLOCK_SIZE5000);
+ H5MF_xfree(f, H5FD_MEM_DRAW, gaddr1, (hsize_t)TBLOCK_SIZE5000);
if(!fs_persist) {
H5MF_alloc_to_fs_type(f, H5FD_MEM_DRAW, TBLOCK_SIZE5000, (H5F_mem_page_t *)&fs_type);
/* Verify that the freed block with gaddr1 is found from the large data manager */
- if(H5MF_find_sect(f, H5FD_MEM_DRAW, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE8192, f->shared->fs_man[fs_type], &found_addr) < 0)
+ if(H5MF__find_sect(f, H5FD_MEM_DRAW, (hsize_t)TBLOCK_SIZE8192, f->shared->fs_man[fs_type], &found_addr) < 0)
TEST_ERROR
if(found_addr != gaddr1)
TEST_ERROR
@@ -7735,17 +7746,17 @@ test_page_alloc_xfree(const char *env_h5_drvr, hid_t fapl)
* assertion failures on the first file space alloc / dealloc.
*/
if(f->shared->first_alloc_dealloc){
- if(SUCCEED!=H5MF_tidy_self_referential_fsm_hack(f,H5AC_ind_read_dxpl_id))
+ if(SUCCEED!=H5MF_tidy_self_referential_fsm_hack(f))
FAIL_STACK_ERROR
}
/* Set up to use the small meta data manager */
if(!(f->shared->fs_man[fs_type]))
- if(H5MF_open_fstype(f, H5AC_ind_read_dxpl_id, fs_type) < 0)
+ if(H5MF__open_fstype(f, fs_type) < 0)
TEST_ERROR
/* Verify that the freed block with addr2 is found from the small meta data manager */
- if(H5MF_find_sect(f, H5FD_MEM_OHDR, H5AC_ind_read_dxpl_id, (hsize_t)(f->shared->fs_page_size-(addr3+TBLOCK_SIZE50)), f->shared->fs_man[fs_type], &found_addr) < 0)
+ if(H5MF__find_sect(f, H5FD_MEM_OHDR, (hsize_t)(f->shared->fs_page_size-(addr3+TBLOCK_SIZE50)), f->shared->fs_man[fs_type], &found_addr) < 0)
TEST_ERROR
if(found_addr != (addr3+TBLOCK_SIZE50))
@@ -7757,11 +7768,11 @@ test_page_alloc_xfree(const char *env_h5_drvr, hid_t fapl)
/* Set up to use the small raw data manager */
if(!(f->shared->fs_man[H5F_MEM_PAGE_DRAW]))
- if(H5MF_open_fstype(f, H5AC_ind_read_dxpl_id, H5F_MEM_PAGE_DRAW) < 0)
+ if(H5MF__open_fstype(f, H5F_MEM_PAGE_DRAW) < 0)
TEST_ERROR
/* Verify that the freed block with saddr1 is found from the small raw data manager */
- if(H5MF_find_sect(f, H5FD_MEM_DRAW, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE30, f->shared->fs_man[H5F_MEM_PAGE_DRAW], &found_addr) < 0)
+ if(H5MF__find_sect(f, H5FD_MEM_DRAW, (hsize_t)TBLOCK_SIZE30, f->shared->fs_man[H5F_MEM_PAGE_DRAW], &found_addr) < 0)
TEST_ERROR
if(found_addr != saddr1)
TEST_ERROR
@@ -7770,11 +7781,11 @@ test_page_alloc_xfree(const char *env_h5_drvr, hid_t fapl)
if(!(f->shared->fs_man[fs_type]))
/* Set up to use the large data manager */
- if(H5MF_open_fstype(f, H5AC_ind_read_dxpl_id, fs_type) < 0)
+ if(H5MF__open_fstype(f, fs_type) < 0)
TEST_ERROR
/* Verify that the freed block with gaddr1 is found from the large data manager */
- if(H5MF_find_sect(f, H5FD_MEM_DRAW, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE8192, f->shared->fs_man[fs_type], &found_addr) < 0)
+ if(H5MF__find_sect(f, H5FD_MEM_DRAW, (hsize_t)TBLOCK_SIZE8192, f->shared->fs_man[fs_type], &found_addr) < 0)
TEST_ERROR
if(found_addr != gaddr1)
TEST_ERROR
@@ -7862,40 +7873,40 @@ test_page_try_shrink(const char *env_h5_drvr, hid_t fapl)
FAIL_STACK_ERROR
/* Allocate a small meta data block with addr1 */
- addr1 = H5MF_alloc(f, H5FD_MEM_OHDR, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE50);
+ addr1 = H5MF_alloc(f, H5FD_MEM_OHDR, (hsize_t)TBLOCK_SIZE50);
/* Try to shrink the block with addr1 */
- if((status = H5MF_try_shrink(f, H5FD_MEM_OHDR, H5AC_ind_read_dxpl_id, addr1, (hsize_t)TBLOCK_SIZE50)) < 0)
+ if((status = H5MF_try_shrink(f, H5FD_MEM_OHDR, addr1, (hsize_t)TBLOCK_SIZE50)) < 0)
FAIL_STACK_ERROR
/* Couldn't shrink due to the section (remaining space in the page) is in the small meta data free-space manager */
if(status == TRUE) TEST_ERROR
/* Allocate a small raw data block with saddr1 */
- saddr1 = H5MF_alloc(f, H5FD_MEM_DRAW, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE50);
+ saddr1 = H5MF_alloc(f, H5FD_MEM_DRAW, (hsize_t)TBLOCK_SIZE50);
/* Try to shrink the block with saddr1 */
- if((status = H5MF_try_shrink(f, H5FD_MEM_DRAW, H5AC_ind_read_dxpl_id, saddr1, (hsize_t)TBLOCK_SIZE50)) < 0)
+ if((status = H5MF_try_shrink(f, H5FD_MEM_DRAW, saddr1, (hsize_t)TBLOCK_SIZE50)) < 0)
FAIL_STACK_ERROR
/* Couldn't shrink due to the section (remaining space in the page) is in the small raw data free-space manager */
if(status == TRUE) TEST_ERROR
/* Allocate a large data block with gaddr1 */
- gaddr1 = H5MF_alloc(f, H5FD_MEM_DRAW, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE5000);
+ gaddr1 = H5MF_alloc(f, H5FD_MEM_DRAW, (hsize_t)TBLOCK_SIZE5000);
/* Try to shrink the block with gaddr1 */
- if((status = H5MF_try_shrink(f, H5FD_MEM_DRAW, H5AC_ind_read_dxpl_id, gaddr1, (hsize_t)TBLOCK_SIZE5000)) < 0)
+ if((status = H5MF_try_shrink(f, H5FD_MEM_DRAW, gaddr1, (hsize_t)TBLOCK_SIZE5000)) < 0)
FAIL_STACK_ERROR
/* Couldn't shrink due to the section (remaining space in the page) is in the large-sized free-space manager */
if(status == TRUE) TEST_ERROR
/* Free the block with saddr1--merge to become 1 page, then return to the large manager */
- H5MF_xfree(f, H5FD_MEM_DRAW, H5AC_ind_read_dxpl_id, saddr1, (hsize_t)TBLOCK_SIZE50);
+ H5MF_xfree(f, H5FD_MEM_DRAW, saddr1, (hsize_t)TBLOCK_SIZE50);
/* Merge all 3 sections and shrunk */
- H5MF_xfree(f, H5FD_MEM_OHDR, H5AC_ind_read_dxpl_id, gaddr1, (hsize_t)TBLOCK_SIZE5000);
+ H5MF_xfree(f, H5FD_MEM_OHDR, gaddr1, (hsize_t)TBLOCK_SIZE5000);
if(H5Fclose(fid) < 0)
FAIL_STACK_ERROR
@@ -7983,16 +7994,16 @@ test_page_small_try_extend(const char *env_h5_drvr, hid_t fapl)
FAIL_STACK_ERROR
/* Allocate a small meta data block with addr1 */
- addr1 = H5MF_alloc(f, H5FD_MEM_OHDR, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE98);
+ addr1 = H5MF_alloc(f, H5FD_MEM_OHDR, (hsize_t)TBLOCK_SIZE98);
/* Try extending the block with addr1 at EOF not crossing page boundary */
- was_extended = H5MF_try_extend(f, H5AC_ind_read_dxpl_id, H5FD_MEM_OHDR, (haddr_t)addr1, (hsize_t)TBLOCK_SIZE98, (hsize_t)3100);
+ was_extended = H5MF_try_extend(f, H5FD_MEM_OHDR, (haddr_t)addr1, (hsize_t)TBLOCK_SIZE98, (hsize_t)3100);
/* Should succeed */
if(was_extended != TRUE) TEST_ERROR
/* Allocate 2 small meta data blocks with addr2 and addr3--will be on another meta data page */
- addr2 = H5MF_alloc(f, H5FD_MEM_OHDR, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE100);
- addr3 = H5MF_alloc(f, H5FD_MEM_OHDR, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE150);
+ addr2 = H5MF_alloc(f, H5FD_MEM_OHDR, (hsize_t)TBLOCK_SIZE100);
+ addr3 = H5MF_alloc(f, H5FD_MEM_OHDR, (hsize_t)TBLOCK_SIZE150);
/* The block with addr2 should be page aligned */
/* The block with addr3 resides right next to the block with addr2 */
@@ -8002,60 +8013,60 @@ test_page_small_try_extend(const char *env_h5_drvr, hid_t fapl)
TEST_ERROR
/* Free the block with addr2 */
- H5MF_xfree(f, H5FD_MEM_OHDR, H5AC_ind_read_dxpl_id, addr2, (hsize_t)TBLOCK_SIZE100);
+ H5MF_xfree(f, H5FD_MEM_OHDR, addr2, (hsize_t)TBLOCK_SIZE100);
/* Try extending the block with addr1 that will cross to the next page where the freed block with addr2 resides */
- was_extended = H5MF_try_extend(f, H5AC_ind_read_dxpl_id, H5FD_MEM_OHDR, (haddr_t)addr1, (hsize_t)TBLOCK_SIZE3198, (hsize_t)TBLOCK_SIZE100);
+ was_extended = H5MF_try_extend(f, H5FD_MEM_OHDR, (haddr_t)addr1, (hsize_t)TBLOCK_SIZE3198, (hsize_t)TBLOCK_SIZE100);
/* Shouldn't succeed--should not cross page boundary */
if(was_extended == TRUE) TEST_ERROR
/* Try extending the block with addr1 into the free-space section that is big enough to fulfill the request */
- was_extended = H5MF_try_extend(f, H5AC_ind_read_dxpl_id, H5FD_MEM_OHDR, (haddr_t)addr1, (hsize_t)TBLOCK_SIZE3198, (hsize_t)TBLOCK_SIZE50);
+ was_extended = H5MF_try_extend(f, H5FD_MEM_OHDR, (haddr_t)addr1, (hsize_t)TBLOCK_SIZE3198, (hsize_t)TBLOCK_SIZE50);
/* Should succeed */
if(was_extended != TRUE) TEST_ERROR
/* Free the block with addr1 */
- H5MF_xfree(f, H5FD_MEM_OHDR, H5AC_ind_read_dxpl_id, addr1, (hsize_t)TBLOCK_SIZE3248);
+ H5MF_xfree(f, H5FD_MEM_OHDR, addr1, (hsize_t)TBLOCK_SIZE3248);
/* Allocate a new meta data block with addr1 */
/* There is a page end threshold of size H5F_FILE_SPACE_PGEND_META_THRES at the end of the block */
/* The block is right next to the threshold */
- addr1 = H5MF_alloc(f, H5FD_MEM_OHDR, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE3286);
+ addr1 = H5MF_alloc(f, H5FD_MEM_OHDR, (hsize_t)TBLOCK_SIZE3286);
/* Try extending the block into the threshold with size > H5F_FILE_SPACE_PGEND_META_THRES */
- was_extended = H5MF_try_extend(f, H5AC_ind_read_dxpl_id, H5FD_MEM_OHDR, (haddr_t)addr1, (hsize_t)TBLOCK_SIZE3286, (hsize_t)TBLOCK_SIZE11);
+ was_extended = H5MF_try_extend(f, H5FD_MEM_OHDR, (haddr_t)addr1, (hsize_t)TBLOCK_SIZE3286, (hsize_t)TBLOCK_SIZE11);
/* Shouldn't succeed */
if(was_extended == TRUE) TEST_ERROR
/* Try extending the block into the threshold with size < H5F_FILE_SPACE_PGEND_META_THRES */
- was_extended = H5MF_try_extend(f, H5AC_ind_read_dxpl_id, H5FD_MEM_OHDR, (haddr_t)addr1, (hsize_t)TBLOCK_SIZE3286, (hsize_t)TBLOCK_SIZE2);
+ was_extended = H5MF_try_extend(f, H5FD_MEM_OHDR, (haddr_t)addr1, (hsize_t)TBLOCK_SIZE3286, (hsize_t)TBLOCK_SIZE2);
/* Should succeed */
if(was_extended != TRUE) TEST_ERROR
/* Free the block with addr3--will merge with the remaining sections to become a page and then free the page */
- H5MF_xfree(f, H5FD_MEM_OHDR, H5AC_ind_read_dxpl_id, addr3, (hsize_t)TBLOCK_SIZE150);
+ H5MF_xfree(f, H5FD_MEM_OHDR, addr3, (hsize_t)TBLOCK_SIZE150);
/* Allocate a small raw data block with saddr1 */
- saddr1 = H5MF_alloc(f, H5FD_MEM_DRAW, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE4086);
+ saddr1 = H5MF_alloc(f, H5FD_MEM_DRAW, (hsize_t)TBLOCK_SIZE4086);
/* Try extending the block crossing the page boundary */
- was_extended = H5MF_try_extend(f, H5AC_ind_read_dxpl_id, H5FD_MEM_DRAW, (haddr_t)saddr1, (hsize_t)TBLOCK_SIZE4086, (hsize_t)TBLOCK_SIZE11);
+ was_extended = H5MF_try_extend(f, H5FD_MEM_DRAW, (haddr_t)saddr1, (hsize_t)TBLOCK_SIZE4086, (hsize_t)TBLOCK_SIZE11);
/* Shouldn't succeed */
if(was_extended == TRUE) TEST_ERROR
/* Try extending the block not crossing page boundary */
- was_extended = H5MF_try_extend(f, H5AC_ind_read_dxpl_id, H5FD_MEM_DRAW, (haddr_t)saddr1, (hsize_t)TBLOCK_SIZE4086, (hsize_t)TBLOCK_SIZE10);
+ was_extended = H5MF_try_extend(f, H5FD_MEM_DRAW, (haddr_t)saddr1, (hsize_t)TBLOCK_SIZE4086, (hsize_t)TBLOCK_SIZE10);
/* Should succeed */
if(was_extended != TRUE) TEST_ERROR
/* The extended block is now "large" in size */
/* Try extending the block */
- was_extended = H5MF_try_extend(f, H5AC_ind_read_dxpl_id, H5FD_MEM_DRAW, (haddr_t)saddr1, (hsize_t)TBLOCK_SIZE4096, (hsize_t)TBLOCK_SIZE10);
+ was_extended = H5MF_try_extend(f, H5FD_MEM_DRAW, (haddr_t)saddr1, (hsize_t)TBLOCK_SIZE4096, (hsize_t)TBLOCK_SIZE10);
/* Should succeed */
if(was_extended != TRUE) TEST_ERROR
/* Try extending the large-sized block */
- was_extended = H5MF_try_extend(f, H5AC_ind_read_dxpl_id, H5FD_MEM_DRAW, (haddr_t)saddr1, (hsize_t)TBLOCK_SIZE4106, (hsize_t)TBLOCK_SIZE5000);
+ was_extended = H5MF_try_extend(f, H5FD_MEM_DRAW, (haddr_t)saddr1, (hsize_t)TBLOCK_SIZE4106, (hsize_t)TBLOCK_SIZE5000);
/* Should not succeed because the mis-aligned fragment in the page is in the large-sized free-space manager */
if(was_extended == TRUE) TEST_ERROR
@@ -8137,66 +8148,66 @@ test_page_large_try_extend(const char *env_h5_drvr, hid_t fapl)
FAIL_STACK_ERROR
/* Allocate a large data block with gaddr1 */
- gaddr1 = H5MF_alloc(f, H5FD_MEM_DRAW, H5AC_ind_read_dxpl_id, (hsize_t)6000);
+ gaddr1 = H5MF_alloc(f, H5FD_MEM_DRAW, (hsize_t)6000);
/* Should be page aligned */
if(gaddr1 % TBLOCK_SIZE4096)
TEST_ERROR
/* Extending the block with gaddr1 at EOF to become 2 pages */
- was_extended = H5MF_try_extend(f, H5AC_ind_read_dxpl_id, H5FD_MEM_DRAW, (haddr_t)gaddr1, (hsize_t)TBLOCK_SIZE6000, (hsize_t)TBLOCK_SIZE2192);
+ was_extended = H5MF_try_extend(f, H5FD_MEM_DRAW, (haddr_t)gaddr1, (hsize_t)TBLOCK_SIZE6000, (hsize_t)TBLOCK_SIZE2192);
/* Should succeed */
if(was_extended != TRUE) TEST_ERROR
/* Allocate a large data block with gaddr2 */
- gaddr2 = H5MF_alloc(f, H5FD_MEM_DRAW, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE8000);
+ gaddr2 = H5MF_alloc(f, H5FD_MEM_DRAW, (hsize_t)TBLOCK_SIZE8000);
/* Should be page aligned */
if(gaddr2 % TBLOCK_SIZE4096)
TEST_ERROR
/* Try extending the block with gaddr1 */
- was_extended = H5MF_try_extend(f, H5AC_ind_read_dxpl_id, H5FD_MEM_DRAW, (haddr_t)gaddr1, (hsize_t)TBLOCK_SIZE8192, (hsize_t)TBLOCK_SIZE50);
+ was_extended = H5MF_try_extend(f, H5FD_MEM_DRAW, (haddr_t)gaddr1, (hsize_t)TBLOCK_SIZE8192, (hsize_t)TBLOCK_SIZE50);
/* Should not succeed */
if(was_extended == TRUE) TEST_ERROR
/* Allocate a large data block with gaddr3 */
- gaddr3 = H5MF_alloc(f, H5FD_MEM_DRAW, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE8000);
+ gaddr3 = H5MF_alloc(f, H5FD_MEM_DRAW, (hsize_t)TBLOCK_SIZE8000);
/* Should be page aligned */
if(gaddr3 % TBLOCK_SIZE4096)
TEST_ERROR
/* Try extending the block with gaddr2--there is a free-space section big enough to fulfill the request */
- was_extended = H5MF_try_extend(f, H5AC_ind_read_dxpl_id, H5FD_MEM_DRAW, (haddr_t)gaddr2, (hsize_t)TBLOCK_SIZE8000, (hsize_t)TBLOCK_SIZE100);
+ was_extended = H5MF_try_extend(f, H5FD_MEM_DRAW, (haddr_t)gaddr2, (hsize_t)TBLOCK_SIZE8000, (hsize_t)TBLOCK_SIZE100);
/* Should succeed */
if(was_extended == FALSE) TEST_ERROR
/* Try extending the block with gaddr2--there is no free-space section big enough to fulfill the request */
- was_extended = H5MF_try_extend(f, H5AC_ind_read_dxpl_id, H5FD_MEM_DRAW, (haddr_t)gaddr2, (hsize_t)TBLOCK_SIZE8100, (hsize_t)TBLOCK_SIZE100);
+ was_extended = H5MF_try_extend(f, H5FD_MEM_DRAW, (haddr_t)gaddr2, (hsize_t)TBLOCK_SIZE8100, (hsize_t)TBLOCK_SIZE100);
/* Should not succeed */
if(was_extended == TRUE) TEST_ERROR
/* Try extending the block with gaddr2--there is a free-space section big enough to fulfill the request */
- was_extended = H5MF_try_extend(f, H5AC_ind_read_dxpl_id, H5FD_MEM_DRAW, (haddr_t)gaddr2, (hsize_t)TBLOCK_SIZE8100, (hsize_t)TBLOCK_SIZE90);
+ was_extended = H5MF_try_extend(f, H5FD_MEM_DRAW, (haddr_t)gaddr2, (hsize_t)TBLOCK_SIZE8100, (hsize_t)TBLOCK_SIZE90);
/* Should succeed */
if(was_extended == FALSE) TEST_ERROR
/* Try extending the block with gaddr2 */
/* There is no free-space section big enough to fulfill the request (request is < H5F_FILE_SPACE_PGEND_META_THRES) */
- was_extended = H5MF_try_extend(f, H5AC_ind_read_dxpl_id, H5FD_MEM_DRAW, (haddr_t)gaddr2, (hsize_t)TBLOCK_SIZE8190, (hsize_t)TBLOCK_SIZE5);
+ was_extended = H5MF_try_extend(f, H5FD_MEM_DRAW, (haddr_t)gaddr2, (hsize_t)TBLOCK_SIZE8190, (hsize_t)TBLOCK_SIZE5);
/* Should not succeed */
if(was_extended == TRUE) TEST_ERROR
/* Allocate a large data block with gaddr4 */
- gaddr4 = H5MF_alloc(f, H5FD_MEM_DRAW, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE5000);
+ gaddr4 = H5MF_alloc(f, H5FD_MEM_DRAW, (hsize_t)TBLOCK_SIZE5000);
/* Should be page aligned */
if(gaddr4 % TBLOCK_SIZE4096)
TEST_ERROR
/* Free the block with gaddr3--will merge with remaining free space to become 2 pages + section (size 2) in previous page */
- H5MF_xfree(f, H5FD_MEM_DRAW, H5AC_ind_read_dxpl_id, gaddr3, (hsize_t)TBLOCK_SIZE8000);
+ H5MF_xfree(f, H5FD_MEM_DRAW, gaddr3, (hsize_t)TBLOCK_SIZE8000);
/* Try extending the block with gaddr2 crossing page boundary--there is free-space section big enough to fulfill the request */
- was_extended = H5MF_try_extend(f, H5AC_ind_read_dxpl_id, H5FD_MEM_DRAW, (haddr_t)gaddr2, (hsize_t)TBLOCK_SIZE8190, (hsize_t)TBLOCK_SIZE5);
+ was_extended = H5MF_try_extend(f, H5FD_MEM_DRAW, (haddr_t)gaddr2, (hsize_t)TBLOCK_SIZE8190, (hsize_t)TBLOCK_SIZE5);
/* Should succeed */
if(was_extended == FALSE) TEST_ERROR
@@ -8280,7 +8291,7 @@ test_page_large(const char *env_h5_drvr, hid_t fapl)
/* Allocate a large data block with gaddr1 */
/* 1 page + 1904 bytes; 2192 bytes in free-space manager */
- gaddr1 = H5MF_alloc(f, H5FD_MEM_DRAW, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE6000);
+ gaddr1 = H5MF_alloc(f, H5FD_MEM_DRAW, (hsize_t)TBLOCK_SIZE6000);
/* Should be page aligned */
if(gaddr1 % TBLOCK_SIZE4096)
@@ -8288,20 +8299,20 @@ test_page_large(const char *env_h5_drvr, hid_t fapl)
/* Allocate a large data block with gaddr2--should be on another page */
/* Allocate 1 page + 3904 bytes; 192 bytes in free-space manager */
- gaddr2 = H5MF_alloc(f, H5FD_MEM_DRAW, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE8000);
+ gaddr2 = H5MF_alloc(f, H5FD_MEM_DRAW, (hsize_t)TBLOCK_SIZE8000);
/* Should be page aligned */
if(gaddr2 % TBLOCK_SIZE4096)
TEST_ERROR
/* Allocate a large data block with gaddr3--should be on another page */
/* Allocate 2 pages + 3808 bytes; 288 bytes in free-space manager */
- gaddr3 = H5MF_alloc(f, H5FD_MEM_DRAW, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE12000);
+ gaddr3 = H5MF_alloc(f, H5FD_MEM_DRAW, (hsize_t)TBLOCK_SIZE12000);
if(!H5F_addr_defined(gaddr3))
TEST_ERROR
/* Free the block with gaddr2 */
/* Merged sections: 2192 + 8000 + 192 = 10384 */
- H5MF_xfree(f, H5FD_MEM_DRAW, H5AC_ind_read_dxpl_id, gaddr2, (hsize_t)TBLOCK_SIZE8000);
+ H5MF_xfree(f, H5FD_MEM_DRAW, gaddr2, (hsize_t)TBLOCK_SIZE8000);
/* Get free-space info */
if(H5FS_stat_info(f, f->shared->fs_man[H5F_MEM_PAGE_GENERIC], &fs_stat) < 0)
@@ -8315,7 +8326,7 @@ test_page_large(const char *env_h5_drvr, hid_t fapl)
/* Allocate a large data block with gaddr4--there is a free-space section able to fulfill the request */
/* Free-space sections: 2192 + 3192 + 288 = 5672 bytes */
- gaddr4 = H5MF_alloc(f, H5FD_MEM_DRAW, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE5000);
+ gaddr4 = H5MF_alloc(f, H5FD_MEM_DRAW, (hsize_t)TBLOCK_SIZE5000);
/* Should be page aligned */
if(gaddr4 % TBLOCK_SIZE4096)
@@ -8333,8 +8344,8 @@ test_page_large(const char *env_h5_drvr, hid_t fapl)
TEST_ERROR
/* Free the two blocks with gaddr1 and gaddr4 */
- H5MF_xfree(f, H5FD_MEM_DRAW, H5AC_ind_read_dxpl_id, gaddr1, (hsize_t)TBLOCK_SIZE6000);
- H5MF_xfree(f, H5FD_MEM_DRAW, H5AC_ind_read_dxpl_id, gaddr4, (hsize_t)TBLOCK_SIZE5000);
+ H5MF_xfree(f, H5FD_MEM_DRAW, gaddr1, (hsize_t)TBLOCK_SIZE6000);
+ H5MF_xfree(f, H5FD_MEM_DRAW, gaddr4, (hsize_t)TBLOCK_SIZE5000);
/* Get free-space info */
if(H5FS_stat_info(f, f->shared->fs_man[H5F_MEM_PAGE_GENERIC], &fs_stat) < 0)
@@ -8435,17 +8446,17 @@ test_page_small(const char *env_h5_drvr, hid_t fapl)
FAIL_STACK_ERROR
/* Allocate 2 small meta data blocks: addr1, addr2 */
- H5MF_alloc(f, H5FD_MEM_OHDR, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE30);
- addr2 = H5MF_alloc(f, H5FD_MEM_OHDR, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE50);
+ H5MF_alloc(f, H5FD_MEM_OHDR, (hsize_t)TBLOCK_SIZE30);
+ addr2 = H5MF_alloc(f, H5FD_MEM_OHDR, (hsize_t)TBLOCK_SIZE50);
/* Allocate a small raw data block with saddr1 */
- saddr1 = H5MF_alloc(f, H5FD_MEM_DRAW, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE30);
+ saddr1 = H5MF_alloc(f, H5FD_MEM_DRAW, (hsize_t)TBLOCK_SIZE30);
/* Should be on the second page and page aligned */
if(saddr1 % TBLOCK_SIZE4096)
TEST_ERROR
/* Allocate a small raw data block with saddr2 */
- saddr2 = H5MF_alloc(f, H5FD_MEM_DRAW, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE50);
+ saddr2 = H5MF_alloc(f, H5FD_MEM_DRAW, (hsize_t)TBLOCK_SIZE50);
/* Should not be page aligned */
if(!(saddr2 % TBLOCK_SIZE4096))
TEST_ERROR
@@ -8454,13 +8465,13 @@ test_page_small(const char *env_h5_drvr, hid_t fapl)
TEST_ERROR
/* Allocate a small meta data block with addr3--there is no free-space section big enough to fulfill the request */
- addr3 = H5MF_alloc(f, H5FD_MEM_OHDR, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE4020);
+ addr3 = H5MF_alloc(f, H5FD_MEM_OHDR, (hsize_t)TBLOCK_SIZE4020);
/* Should be on the third page and page aligned */
if(addr3 % TBLOCK_SIZE4096)
TEST_ERROR
/* Allocate a small meta data block with addr4--there is a free-space section big enough to fulfill the request */
- addr4 = H5MF_alloc(f, H5FD_MEM_OHDR, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE80);
+ addr4 = H5MF_alloc(f, H5FD_MEM_OHDR, (hsize_t)TBLOCK_SIZE80);
/* Should not be page aligned */
if(!(addr4 % TBLOCK_SIZE4096))
TEST_ERROR
@@ -8469,7 +8480,7 @@ test_page_small(const char *env_h5_drvr, hid_t fapl)
TEST_ERROR
/* Allocate a small meta data block with addr5--there is a free-space section big enough to fulfill the request */
- addr5 = H5MF_alloc(f, H5FD_MEM_OHDR, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE40);
+ addr5 = H5MF_alloc(f, H5FD_MEM_OHDR, (hsize_t)TBLOCK_SIZE40);
/* Should not be page aligned */
if(!(addr5 % TBLOCK_SIZE4096))
TEST_ERROR
@@ -8480,20 +8491,20 @@ test_page_small(const char *env_h5_drvr, hid_t fapl)
/* Allocate a small meta data block with addr6--taking up the remaining space in the first page */
if(family)
- H5MF_alloc(f, H5FD_MEM_OHDR, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE3080);
+ H5MF_alloc(f, H5FD_MEM_OHDR, (hsize_t)TBLOCK_SIZE3080);
else
- H5MF_alloc(f, H5FD_MEM_OHDR, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE3088);
+ H5MF_alloc(f, H5FD_MEM_OHDR, (hsize_t)TBLOCK_SIZE3088);
/* Allocate a small meta data block with addr7--taking up the remaining space in the third page */
- H5MF_alloc(f, H5FD_MEM_OHDR, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE36);
+ H5MF_alloc(f, H5FD_MEM_OHDR, (hsize_t)TBLOCK_SIZE36);
/* Allocate 2 small meta data blocks: addr8, addr9--there is no free-space to fulfill the request */
- H5MF_alloc(f, H5FD_MEM_OHDR, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE50);
- addr9 = H5MF_alloc(f, H5FD_MEM_OHDR, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE80);
+ H5MF_alloc(f, H5FD_MEM_OHDR, (hsize_t)TBLOCK_SIZE50);
+ addr9 = H5MF_alloc(f, H5FD_MEM_OHDR, (hsize_t)TBLOCK_SIZE80);
/* Free the block with saddr1 and saddr2--merge with remaining section to become a page which will be returned to the large manager */
- H5MF_xfree(f, H5FD_MEM_DRAW, H5AC_ind_read_dxpl_id, saddr1, (hsize_t)TBLOCK_SIZE30);
- H5MF_xfree(f, H5FD_MEM_DRAW, H5AC_ind_read_dxpl_id, saddr2, (hsize_t)TBLOCK_SIZE50);
+ H5MF_xfree(f, H5FD_MEM_DRAW, saddr1, (hsize_t)TBLOCK_SIZE30);
+ H5MF_xfree(f, H5FD_MEM_DRAW, saddr2, (hsize_t)TBLOCK_SIZE50);
/* Verify that the large manager does contain a section with file space page size (default is 4096) */
if(!f->shared->fs_man[H5F_MEM_PAGE_GENERIC])
@@ -8504,14 +8515,14 @@ test_page_small(const char *env_h5_drvr, hid_t fapl)
TEST_ERROR
/* Allocate a small meta data block with addr10--there is a free-space section big enough to fulfill the request */
- addr10 = H5MF_alloc(f, H5FD_MEM_OHDR, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE3900);
+ addr10 = H5MF_alloc(f, H5FD_MEM_OHDR, (hsize_t)TBLOCK_SIZE3900);
/* The block should be next to the block with addr9 */
if(addr10 != (addr9 + TBLOCK_SIZE80))
TEST_ERROR
/* Allocate a small meta data block with addr11 */
/* The current free-space section is unable to fulfill the request; obtain a page from the large manager */
- addr11 = H5MF_alloc(f, H5FD_MEM_OHDR, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE80);
+ addr11 = H5MF_alloc(f, H5FD_MEM_OHDR, (hsize_t)TBLOCK_SIZE80);
/* The address of the block should be the same the freed block with saddr1 */
if(addr11 != saddr1)
TEST_ERROR
@@ -8679,8 +8690,8 @@ test_page_alignment(const char *env_h5_drvr, hid_t fapl)
TEST_ERROR
/* Allocate 2 small raw data blocks */
- saddr1 = H5MF_alloc(f, H5FD_MEM_DRAW, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE30);
- saddr2 = H5MF_alloc(f, H5FD_MEM_DRAW, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE50);
+ saddr1 = H5MF_alloc(f, H5FD_MEM_DRAW, (hsize_t)TBLOCK_SIZE30);
+ saddr2 = H5MF_alloc(f, H5FD_MEM_DRAW, (hsize_t)TBLOCK_SIZE50);
/* Should be on the second page and page aligned on 4096 (default file space page size) */
if(saddr1 % TBLOCK_SIZE4096)
@@ -8691,8 +8702,8 @@ test_page_alignment(const char *env_h5_drvr, hid_t fapl)
TEST_ERROR
/* Allocate 2 large raw data blocks */
- gaddr1 = H5MF_alloc(f, H5FD_MEM_DRAW, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE5000);
- gaddr2 = H5MF_alloc(f, H5FD_MEM_DRAW, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE8000);
+ gaddr1 = H5MF_alloc(f, H5FD_MEM_DRAW, (hsize_t)TBLOCK_SIZE5000);
+ gaddr2 = H5MF_alloc(f, H5FD_MEM_DRAW, (hsize_t)TBLOCK_SIZE8000);
/* Should be on the 3rd page and page aligned */
if(gaddr1 % TBLOCK_SIZE4096)
@@ -8731,8 +8742,8 @@ test_page_alignment(const char *env_h5_drvr, hid_t fapl)
TEST_ERROR
/* Allocate 2 small meta data blocks */
- addr1 = H5MF_alloc(f, H5FD_MEM_SUPER, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE30);
- addr2 = H5MF_alloc(f, H5FD_MEM_SUPER, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE50);
+ addr1 = H5MF_alloc(f, H5FD_MEM_SUPER, (hsize_t)TBLOCK_SIZE30);
+ addr2 = H5MF_alloc(f, H5FD_MEM_SUPER, (hsize_t)TBLOCK_SIZE50);
/* Should be aligned on 16 */
if(addr1 % TEST_ALIGN16 || addr2 % TEST_ALIGN16)
@@ -8744,8 +8755,8 @@ test_page_alignment(const char *env_h5_drvr, hid_t fapl)
TEST_ERROR
/* Allocate 2 small raw data blocks */
- saddr1 = H5MF_alloc(f, H5FD_MEM_DRAW, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE80);
- saddr2 = H5MF_alloc(f, H5FD_MEM_DRAW, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE100);
+ saddr1 = H5MF_alloc(f, H5FD_MEM_DRAW, (hsize_t)TBLOCK_SIZE80);
+ saddr2 = H5MF_alloc(f, H5FD_MEM_DRAW, (hsize_t)TBLOCK_SIZE100);
/* Should be aligned on 16 */
if(saddr1 % TEST_ALIGN16 || saddr2 % TEST_ALIGN16)
@@ -8792,8 +8803,8 @@ test_page_alignment(const char *env_h5_drvr, hid_t fapl)
TEST_ERROR
/* Allocate 2 small raw data blocks */
- saddr1 = H5MF_alloc(f, H5FD_MEM_DRAW, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE30);
- saddr2 = H5MF_alloc(f, H5FD_MEM_DRAW, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE50);
+ saddr1 = H5MF_alloc(f, H5FD_MEM_DRAW, (hsize_t)TBLOCK_SIZE30);
+ saddr2 = H5MF_alloc(f, H5FD_MEM_DRAW, (hsize_t)TBLOCK_SIZE50);
/* Should be aligned on 16 */
if(saddr1 % TEST_ALIGN16)
@@ -8807,7 +8818,7 @@ test_page_alignment(const char *env_h5_drvr, hid_t fapl)
TEST_ERROR
/* Allocate a large raw data block */
- gaddr1 = H5MF_alloc(f, H5FD_MEM_DRAW, H5AC_ind_read_dxpl_id, (hsize_t)TBLOCK_SIZE5000);
+ gaddr1 = H5MF_alloc(f, H5FD_MEM_DRAW, (hsize_t)TBLOCK_SIZE5000);
/* Should be aligned on 16 */
if(gaddr1 % TEST_ALIGN16)
@@ -8857,6 +8868,7 @@ main(void)
unsigned nerrors = 0; /* Cumulative error count */
test_type_t curr_test; /* Current test being worked on */
const char *env_h5_drvr; /* File Driver value from environment */
+ hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
/* Get the VFD to use */
env_h5_drvr = HDgetenv("HDF5_DRIVER");
@@ -8867,6 +8879,10 @@ main(void)
fapl = h5_fileaccess();
+ /* Push API context */
+ if(H5CX_push() < 0) FAIL_STACK_ERROR
+ api_ctx_pushed = TRUE;
+
/* Make a copy of the FAPL before adjusting the alignment */
if((new_fapl = H5Pcopy(fapl)) < 0) TEST_ERROR
/* For old library format--interaction with file allocation */
@@ -8980,6 +8996,10 @@ main(void)
FAIL_STACK_ERROR
h5_cleanup(FILENAME, fapl);
+ /* Pop API context */
+ if(api_ctx_pushed && H5CX_pop() < 0) FAIL_STACK_ERROR
+ api_ctx_pushed = FALSE;
+
if(nerrors)
goto error;
puts("All free-space manager tests for file memory passed.");
@@ -8992,6 +9012,9 @@ error:
H5Pclose(fapl);
H5Pclose(new_fapl);
} H5E_END_TRY;
+
+ if(api_ctx_pushed) H5CX_pop();
+
return(1);
} /* main() */
diff --git a/test/mount.c b/test/mount.c
index 2502bbe..d2c0d21 100644
--- a/test/mount.c
+++ b/test/mount.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
diff --git a/test/mtime.c b/test/mtime.c
index 88ed31c..38e3960 100644
--- a/test/mtime.c
+++ b/test/mtime.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
diff --git a/test/ntypes.c b/test/ntypes.c
index bb6c973..b6f4de7 100644
--- a/test/ntypes.c
+++ b/test/ntypes.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
diff --git a/test/objcopy.c b/test/objcopy.c
index 0711fb0..3fbb7b8 100644
--- a/test/objcopy.c
+++ b/test/objcopy.c
@@ -5,47 +5,61 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Peter X. Cao
- * May 01, 2005
+ * Programmer: Peter X. Cao
+ * May 01, 2005
*
- * Purpose: Test H5Ocopy().
+ * Purpose: Test H5Ocopy().
*/
#include "testhdf5.h"
#include "H5srcdir.h"
+#include "H5Bprivate.h"
+#include "H5Iprivate.h"
+#include "H5Pprivate.h"
+
+#define H5F_FRIEND /*suppress error about including H5Fpkg */
+#define H5F_TESTING
+#include "H5Fpkg.h" /* File access */
+
/*
* This file needs to access private information from the H5S package.
* This file also needs to access the dataspace testing code.
*/
-#define H5S_FRIEND /*suppress error about including H5Spkg */
+#define H5S_FRIEND /*suppress error about including H5Spkg */
#define H5S_TESTING
-#include "H5Spkg.h" /* Dataspaces */
+#include "H5Spkg.h" /* Dataspaces */
/*
* This file needs to access private information from the H5P package.
* This file also needs to access the property list testing code.
*/
-#define H5P_FRIEND /*suppress error about including H5Ppkg */
+#define H5P_FRIEND /*suppress error about including H5Ppkg */
#define H5P_TESTING
-#include "H5Ppkg.h" /* Property Lists */
+#include "H5Ppkg.h" /* Property Lists */
/*
* This file needs to access private information from the H5D package.
* This file also needs to access the dataset testing code.
*/
-#define H5D_FRIEND /*suppress error about including H5Dpkg */
+#define H5D_FRIEND /*suppress error about including H5Dpkg */
#define H5D_TESTING
-#include "H5Dpkg.h" /* Datasets */
+#include "H5Dpkg.h" /* Datasets */
+
+/*
+ * This file needs to access private information from the H5O package.
+ * This file also needs to access the dataspace testing code.
+ */
+#define H5O_FRIEND /*suppress error about including H5Opkg */
+#define H5O_TESTING
+#include "H5Opkg.h" /* Object header */
const char *FILENAME[] = {
@@ -53,6 +67,8 @@ const char *FILENAME[] = {
"objcopy_dst",
"objcopy_ext",
"objcopy_src2",
+ "verbound_src",
+ "verbound_dst",
NULL
};
@@ -66,76 +82,76 @@ const char *FILENAME[] = {
#define CONFIG_DENSE 16
#define MAX_CONFIGURATION 31
-#define FILE_EXT "objcopy_ext.dat"
+#define FILE_EXT "objcopy_ext.dat"
/* The fill_old.h5 is generated from gen_old_fill.c in HDF5 'test' directory
* for version 1.4(after 1.4.3). To get this data file, simply compile
* gen_old_fill.c with HDF5 library (before v1.5) and run it. */
#define FILE_OLD_LAYOUT "fill_old.h5"
-#define NAME_DATATYPE_SIMPLE "H5T_NATIVE_INT"
-#define NAME_DATATYPE_SIMPLE2 "H5T_NATIVE_INT-2"
-#define NAME_DATATYPE_VL "vlen of int"
-#define NAME_DATATYPE_VL_VL "vlen of vlen of int"
-#define NAME_DATASET_SIMPLE "dataset_simple"
+#define NAME_DATATYPE_SIMPLE "H5T_NATIVE_INT"
+#define NAME_DATATYPE_SIMPLE2 "H5T_NATIVE_INT-2"
+#define NAME_DATATYPE_VL "vlen of int"
+#define NAME_DATATYPE_VL_VL "vlen of vlen of int"
+#define NAME_DATASET_SIMPLE "dataset_simple"
#define NAME_DATASET_SIMPLE2 "dataset_simple_copy"
#define NAME_DATASET_SIMPLE3 "dataset_simple_another_copy"
-#define NAME_DATASET_COMPOUND "dataset_compound"
-#define NAME_DATASET_CHUNKED "dataset_chunked"
-#define NAME_DATASET_CHUNKED_SINGLE "dataset_chunked_single"
-#define NAME_DATASET_CHUNKED2 "dataset_chunked2"
-#define NAME_DATASET_CHUNKED2_SINGLE "dataset_chunked2_single"
-#define NAME_DATASET_CHUNKED3 "dataset_chunked3"
-#define NAME_DATASET_CHUNKED3_SINGLE "dataset_chunked3_single"
-#define NAME_DATASET_CHUNKED4 "dataset_chunked4"
-#define NAME_DATASET_CHUNKED4_SINGLE "dataset_chunked4_single"
-#define NAME_DATASET_COMPACT "dataset_compact"
-#define NAME_DATASET_EXTERNAL "dataset_ext"
-#define NAME_DATASET_NAMED_DTYPE "dataset_named_dtype"
-#define NAME_DATASET_NAMED_DTYPE2 "dataset_named_dtype2"
-#define NAME_DATASET_MULTI_OHDR "dataset_multi_ohdr"
-#define NAME_DATASET_MULTI_OHDR2 "dataset_multi_ohdr2"
-#define NAME_DATASET_VL "dataset_vl"
-#define NAME_DATASET_VL2 "dataset_vl2"
-#define NAME_DATASET_VL_VL "dataset_vl_vl"
-#define NAME_DATASET_VL_VL2 "dataset_vl_vl2"
-#define NAME_DATASET_CMPD_VL "dataset_cmpd_vl"
-#define NAME_DATASET_SUB_SUB "/g0/g00/g000/dataset_simple"
-#define NAME_GROUP_UNCOPIED "/uncopied"
-#define NAME_GROUP_EMPTY "/empty"
-#define NAME_GROUP_TOP "/g0"
+#define NAME_DATASET_COMPOUND "dataset_compound"
+#define NAME_DATASET_CHUNKED "dataset_chunked"
+#define NAME_DATASET_CHUNKED_SINGLE "dataset_chunked_single"
+#define NAME_DATASET_CHUNKED2 "dataset_chunked2"
+#define NAME_DATASET_CHUNKED2_SINGLE "dataset_chunked2_single"
+#define NAME_DATASET_CHUNKED3 "dataset_chunked3"
+#define NAME_DATASET_CHUNKED3_SINGLE "dataset_chunked3_single"
+#define NAME_DATASET_CHUNKED4 "dataset_chunked4"
+#define NAME_DATASET_CHUNKED4_SINGLE "dataset_chunked4_single"
+#define NAME_DATASET_COMPACT "dataset_compact"
+#define NAME_DATASET_EXTERNAL "dataset_ext"
+#define NAME_DATASET_NAMED_DTYPE "dataset_named_dtype"
+#define NAME_DATASET_NAMED_DTYPE2 "dataset_named_dtype2"
+#define NAME_DATASET_MULTI_OHDR "dataset_multi_ohdr"
+#define NAME_DATASET_MULTI_OHDR2 "dataset_multi_ohdr2"
+#define NAME_DATASET_VL "dataset_vl"
+#define NAME_DATASET_VL2 "dataset_vl2"
+#define NAME_DATASET_VL_VL "dataset_vl_vl"
+#define NAME_DATASET_VL_VL2 "dataset_vl_vl2"
+#define NAME_DATASET_CMPD_VL "dataset_cmpd_vl"
+#define NAME_DATASET_SUB_SUB "/g0/g00/g000/dataset_simple"
+#define NAME_GROUP_UNCOPIED "/uncopied"
+#define NAME_GROUP_EMPTY "/empty"
+#define NAME_GROUP_TOP "/g0"
#define NAME_GROUP_TOP2 "/g1"
#define NAME_GROUP_TOP3 "/g2"
#define NAME_GROUP_TOP4 "/g3"
-#define NAME_GROUP_SUB "/g0/g00"
-#define NAME_GROUP_SUB_2 "/g0/g01"
-#define NAME_GROUP_SUB_SUB "/g0/g00/g000"
-#define NAME_GROUP_SUB_SUB2 "g000"
-#define NAME_GROUP_DATASET "/g0/dataset_simple"
-#define NAME_GROUP_LINK "/g_links"
-#define NAME_GROUP_LINK2 "/g_links2"
-#define NAME_GROUP_LOOP "g_loop"
-#define NAME_GROUP_LOOP2 "g_loop2"
-#define NAME_GROUP_LOOP3 "g_loop3"
-#define NAME_GROUP_REF "ref_grp"
-#define NAME_LINK_DATASET "/g_links/dataset_simple"
-#define NAME_LINK_HARD "/g_links/hard_link_to_dataset_simple"
-#define NAME_LINK_SOFT "/g_links/soft_link_to_dataset_simple"
-#define NAME_LINK_SOFT2 "/g_links2/soft_link_to_dataset_simple"
-#define NAME_LINK_EXTERN "/g_links/external_link_to_dataset_simple"
+#define NAME_GROUP_SUB "/g0/g00"
+#define NAME_GROUP_SUB_2 "/g0/g01"
+#define NAME_GROUP_SUB_SUB "/g0/g00/g000"
+#define NAME_GROUP_SUB_SUB2 "g000"
+#define NAME_GROUP_DATASET "/g0/dataset_simple"
+#define NAME_GROUP_LINK "/g_links"
+#define NAME_GROUP_LINK2 "/g_links2"
+#define NAME_GROUP_LOOP "g_loop"
+#define NAME_GROUP_LOOP2 "g_loop2"
+#define NAME_GROUP_LOOP3 "g_loop3"
+#define NAME_GROUP_REF "ref_grp"
+#define NAME_LINK_DATASET "/g_links/dataset_simple"
+#define NAME_LINK_HARD "/g_links/hard_link_to_dataset_simple"
+#define NAME_LINK_SOFT "/g_links/soft_link_to_dataset_simple"
+#define NAME_LINK_SOFT2 "/g_links2/soft_link_to_dataset_simple"
+#define NAME_LINK_EXTERN "/g_links/external_link_to_dataset_simple"
#define NAME_LINK_EXTERN2 "/g_links2/external_link_to_dataset_simple"
-#define NAME_LINK_SOFT_DANGLE "/g_links/soft_link_to_nowhere"
-#define NAME_LINK_SOFT_DANGLE2 "/g_links2/soft_link_to_nowhere"
+#define NAME_LINK_SOFT_DANGLE "/g_links/soft_link_to_nowhere"
+#define NAME_LINK_SOFT_DANGLE2 "/g_links2/soft_link_to_nowhere"
#define NAME_LINK_EXTERN_DANGLE "/g_links/external_link_to_nowhere"
#define NAME_LINK_EXTERN_DANGLE2 "/g_links2/external_link_to_nowhere"
-#define NAME_OLD_FORMAT "/dset1"
+#define NAME_OLD_FORMAT "/dset1"
#define NAME_BUF_SIZE 1024
#define ATTR_NAME_LEN 80
#define DIM_SIZE_1 12
#define DIM_SIZE_2 6
-#define MAX_DIM_SIZE_1 100
-#define MAX_DIM_SIZE_2 80
+#define MAX_DIM_SIZE_1 100
+#define MAX_DIM_SIZE_2 80
#define CHUNK_SIZE_1 5 /* Not an even fraction of dimension sizes, so we test copying partial chunks */
#define CHUNK_SIZE_2 5
#define NUM_SUB_GROUPS 20
@@ -162,7 +178,7 @@ static int
compare_datasets(hid_t did, hid_t did2, hid_t pid, const void *wbuf);
static int
compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags);
-static int
+static int
compare_idx_type(hid_t fapl, hid_t did, H5D_chunk_index_t new_type, H5D_chunk_index_t old_type);
static int
@@ -172,7 +188,7 @@ attach_attribute_compound_vlstr(hid_t loc_id);
static int
compare_attribute_compound_vlstr(hid_t loc, hid_t loc2);
-
+
/*-------------------------------------------------------------------------
* Function: addr_insert
*
@@ -206,7 +222,7 @@ addr_insert(H5O_info_t *oi)
idtab_g.obj[n] = oi->addr;
} /* end addr_insert() */
-
+
/*-------------------------------------------------------------------------
* Function: addr_lookup
*
@@ -235,7 +251,7 @@ addr_lookup(H5O_info_t *oi)
return FALSE;
} /* end addr_lookup() */
-
+
/*-------------------------------------------------------------------------
* Function: addr_reset
*
@@ -257,7 +273,7 @@ addr_reset(void)
idtab_g.nalloc = idtab_g.nobjs = 0;
} /* end addr_reset() */
-
+
/*-------------------------------------------------------------------------
* Function: attach_ref_attr
*
@@ -318,7 +334,7 @@ error:
return(-1);
}
-
+
/*-------------------------------------------------------------------------
* Function: attach_reg_ref_attr
*
@@ -395,7 +411,7 @@ error:
return(-1);
}
-
+
/*-------------------------------------------------------------------------
* Function: create_reg_ref_dataset
*
@@ -490,7 +506,7 @@ error:
return(-1);
}
-
+
/*-------------------------------------------------------------------------
* Function: attach_attribute_vl
*
@@ -552,13 +568,13 @@ done:
} /* end of attach_attribute_vl */
-
+
/*-------------------------------------------------------------------------
* Function: test_copy_attach_attributes
*
* Purpose: Attach NUM_ATTRIBUTES attributes to the object to be copied
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
* Programmer: Peter Cao
* Friday, September 30, 2005
@@ -626,13 +642,13 @@ done:
return ret_value;
}
-
+
/*-------------------------------------------------------------------------
* Function: test_copy_attach_paired_attributes
*
* Purpose: Attach NUM_ATTRIBUTES attributes to a pair of objects to be copied
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* Tuesday, November 1, 2005
@@ -695,7 +711,7 @@ done:
return -1;
} /* end test_copy_attach_paired_attributes() */
-
+
/*-------------------------------------------------------------------------
* Function: compare_attribute
*
@@ -826,18 +842,18 @@ error:
return FALSE;
} /* end compare_attribute() */
-
+
/*-------------------------------------------------------------------------
* Function: compare_std_attributes
*
* Purpose: Compare "standard" attributes on two objects to check that they are equal
*
- * Return: TRUE if objects have same attributes/FALSE if they are different
+ * Return: TRUE if objects have same attributes/FALSE if they are different
*
* Programmer: Quincey Koziol
* Monday, October 31, 2005
*
- * Note: This isn't very general, the attributes are assumed to be
+ * Note: This isn't very general, the attributes are assumed to be
* those written in test_copy_attach_attributes().
*
* Modifier: Peter Cao
@@ -898,19 +914,19 @@ compare_std_attributes(hid_t oid, hid_t oid2, hid_t pid)
error:
H5E_BEGIN_TRY {
- H5Aclose(aid2);
- H5Aclose(aid);
+ H5Aclose(aid2);
+ H5Aclose(aid);
} H5E_END_TRY;
return FALSE;
} /* end compare_std_attributes() */
-
+
/*-------------------------------------------------------------------------
* Function: compare_data
*
* Purpose: Compare two buffers of data to check that they are equal
*
- * Return: TRUE if buffer are equal/FALSE if they are different
+ * Return: TRUE if buffer are equal/FALSE if they are different
*
* Programmer: Quincey Koziol
* Monday, November 21, 2005
@@ -1171,13 +1187,13 @@ error:
return FALSE;
} /* end compare_data() */
-
+
/*-------------------------------------------------------------------------
* Function: compare_datasets
*
* Purpose: Compare two datasets to check that they are equal
*
- * Return: TRUE if datasets are equal/FALSE if they are different
+ * Return: TRUE if datasets are equal/FALSE if they are different
*
* Programmer: Quincey Koziol
* Tuesday, October 25, 2005
@@ -1334,23 +1350,23 @@ error:
HDfree(rbuf);
if(rbuf2)
HDfree(rbuf2);
- H5Pclose(dcpl2);
- H5Pclose(dcpl);
- H5Sclose(sid2);
- H5Sclose(sid);
- H5Tclose(tid2);
- H5Tclose(tid);
+ H5Pclose(dcpl2);
+ H5Pclose(dcpl);
+ H5Sclose(sid2);
+ H5Sclose(sid);
+ H5Tclose(tid2);
+ H5Tclose(tid);
} H5E_END_TRY;
return FALSE;
} /* end compare_datasets() */
-
+
/*-------------------------------------------------------------------------
* Function: compare_groups
*
* Purpose: Compare two groups to check that they are "equal"
*
- * Return: TRUE if group are equal/FALSE if they are different
+ * Return: TRUE if group are equal/FALSE if they are different
*
* Programmer: Quincey Koziol
* Monday, October 31, 2005
@@ -1500,48 +1516,48 @@ error:
return FALSE;
} /* end compare_groups() */
-
+
/*-------------------------------------------------------------------------
* Function: compare_idx_type
*
* Purpose: If using new format, the index array type should be NEW_TYPE
- * If not, the index array type should be OLD_TYPE
+ * If not, the index array type should be OLD_TYPE
*
- * Return: TRUE if the index type retrieved for the dataset DID is
- * as expected
- * FALSE if not
+ * Return: TRUE if the index type retrieved for the dataset DID is
+ * as expected
+ * FALSE if not
*
* Programmer: Vailin Choi; August 2009
*
*-------------------------------------------------------------------------
*/
-static int
+static int
compare_idx_type(hid_t fapl, hid_t did, H5D_chunk_index_t new_type, H5D_chunk_index_t old_type)
{
H5D_chunk_index_t idx_type; /* Dataset chunk index type */
H5F_libver_t low; /* File format low bound */
/* Get the chunk index type */
- if(H5D__layout_idx_type_test(did, &idx_type) < 0)
- FAIL_STACK_ERROR
+ if(H5D__layout_idx_type_test(did, &idx_type) < 0)
+ FAIL_STACK_ERROR
/* Check if we are using the latest version of the format */
- if(H5Pget_libver_bounds(fapl, &low, NULL) < 0)
- FAIL_STACK_ERROR
+ if(H5Pget_libver_bounds(fapl, &low, NULL) < 0)
+ FAIL_STACK_ERROR
/* Verify index type */
if(low == H5F_LIBVER_LATEST) {
- if(idx_type != new_type)
- TEST_ERROR
- } else if(idx_type != old_type)
- TEST_ERROR
+ if(idx_type != new_type)
+ TEST_ERROR
+ } else if(idx_type != old_type)
+ TEST_ERROR
return TRUE;
error:
return FALSE;
} /* compare_idx_type() */
-
+
/*-------------------------------------------------------------------------
* Function: test_copy_named_datatype
*
@@ -1562,8 +1578,8 @@ test_copy_named_datatype(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d
{
hid_t fid_src = -1, fid_dst = -1; /* File IDs */
hid_t tid = -1, tid2 = -1; /* Datatype IDs */
- char src_filename[NAME_BUF_SIZE];
- char dst_filename[NAME_BUF_SIZE];
+ char src_filename[NAME_BUF_SIZE];
+ char dst_filename[NAME_BUF_SIZE];
TESTING("H5Ocopy(): named datatype");
@@ -1628,15 +1644,15 @@ test_copy_named_datatype(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d
error:
H5E_BEGIN_TRY {
- H5Tclose(tid2);
- H5Tclose(tid);
- H5Fclose(fid_dst);
- H5Fclose(fid_src);
+ H5Tclose(tid2);
+ H5Tclose(tid);
+ H5Fclose(fid_dst);
+ H5Fclose(fid_src);
} H5E_END_TRY;
return 1;
} /* end test_copy_named_datatype */
-
+
/*-------------------------------------------------------------------------
* Function: test_copy_named_datatype_vl
*
@@ -1655,8 +1671,8 @@ test_copy_named_datatype_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_
{
hid_t fid_src = -1, fid_dst = -1; /* File IDs */
hid_t tid = -1, tid2 = -1; /* Datatype IDs */
- char src_filename[NAME_BUF_SIZE];
- char dst_filename[NAME_BUF_SIZE];
+ char src_filename[NAME_BUF_SIZE];
+ char dst_filename[NAME_BUF_SIZE];
TESTING("H5Ocopy(): named vlen datatype");
@@ -1721,15 +1737,15 @@ test_copy_named_datatype_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_
error:
H5E_BEGIN_TRY {
- H5Tclose(tid2);
- H5Tclose(tid);
- H5Fclose(fid_dst);
- H5Fclose(fid_src);
+ H5Tclose(tid2);
+ H5Tclose(tid);
+ H5Fclose(fid_dst);
+ H5Fclose(fid_src);
} H5E_END_TRY;
return 1;
} /* end test_copy_named_datatype_vl */
-
+
/*-------------------------------------------------------------------------
* Function: test_copy_named_datatype_vl_vl
*
@@ -1748,8 +1764,8 @@ test_copy_named_datatype_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h
{
hid_t fid_src = -1, fid_dst = -1; /* File IDs */
hid_t tid = -1, tid2 = -1; /* Datatype IDs */
- char src_filename[NAME_BUF_SIZE];
- char dst_filename[NAME_BUF_SIZE];
+ char src_filename[NAME_BUF_SIZE];
+ char dst_filename[NAME_BUF_SIZE];
TESTING("H5Ocopy(): named nested vlen datatype");
@@ -1820,15 +1836,15 @@ test_copy_named_datatype_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h
error:
H5E_BEGIN_TRY {
- H5Tclose(tid2);
- H5Tclose(tid);
- H5Fclose(fid_dst);
- H5Fclose(fid_src);
+ H5Tclose(tid2);
+ H5Tclose(tid);
+ H5Fclose(fid_dst);
+ H5Fclose(fid_src);
} H5E_END_TRY;
return 1;
} /* end test_copy_named_datatype_vl_vl */
-
+
/*-------------------------------------------------------------------------
* Function: test_copy_named_datatype_attr_self
*
@@ -1971,7 +1987,7 @@ error:
return 1;
} /* end test_copy_named_datatype_attr_self */
-
+
/*-------------------------------------------------------------------------
* Function: test_copy_dataset_simple
*
@@ -2080,16 +2096,194 @@ test_copy_dataset_simple(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d
error:
H5E_BEGIN_TRY {
- H5Dclose(did2);
- H5Dclose(did);
- H5Sclose(sid);
- H5Fclose(fid_dst);
- H5Fclose(fid_src);
+ H5Dclose(did2);
+ H5Dclose(did);
+ H5Sclose(sid);
+ H5Fclose(fid_dst);
+ H5Fclose(fid_src);
} H5E_END_TRY;
return 1;
} /* end test_copy_dataset_simple */
-
+
+/*-------------------------------------------------------------------------
+ * Function: test_copy_dataset_versionbounds
+ *
+ * Purpose: Verify copying dataset works as expected in various version
+ * bound combination.
+ *
+ * Description:
+ * Create a simple dataset in SRC file using default versions.
+ * For each valid version bound combination, create a DST file,
+ * and attempt to copy the SRC dataset to the DST file.
+ * When copying fails, verify that the failure is a result of
+ * the invalid bounds, that is, DST has lower bounds than SRC.
+ *
+ * Return: Success: 0
+ * Failure: 1
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+test_copy_dataset_versionbounds(hid_t fcpl_src, hid_t fapl_src)
+{
+ hid_t fid_src = -1, fid_dst = -1; /* Source and destination file IDs */
+ hid_t fapl_dst = -1; /* File access plist for dest file */
+ hid_t sid = -1; /* Dataspace ID */
+ hid_t did_src = -1, did_dst = -1; /* Source and destination dataset IDs */
+ int buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
+ hsize_t dim2d[2]; /* Dataset dimensions */
+ char src_fname[NAME_BUF_SIZE]; /* Name of source file */
+ char dst_fname[NAME_BUF_SIZE]; /* Name of destination file */
+ H5F_libver_t low, high; /* File format bounds */
+ H5F_libver_t low_src, high_src; /* Source file format bounds */
+ unsigned srcdset_fillversion; /* Fill version of source dataset */
+ hbool_t valid_high = FALSE; /* TRUE if high bound is valid */
+ int i, j; /* Local index variables */
+ H5D_t *dsetp = NULL; /* Pointer to internal dset structure */
+ herr_t ret; /* Generic return value */
+
+ TESTING("H5Ocopy(): simple dataset with version bounds");
+
+ /* Initialize write buffer */
+ for (i=0; i<DIM_SIZE_1; i++)
+ for (j=0; j<DIM_SIZE_2; j++)
+ buf[i][j] = 10000 + 100*i+j;
+
+ /* Create a file access property list for destination file */
+ if ((fapl_dst = H5Pcreate(H5P_FILE_ACCESS)) < 0) TEST_ERROR
+
+ /* Initialize the filenames */
+ h5_fixname(FILENAME[4], fapl_src, src_fname, sizeof src_fname);
+ h5_fixname(FILENAME[5], fapl_dst, dst_fname, sizeof dst_fname);
+
+ /* Reset file address checking info */
+ addr_reset();
+
+ /* Create source file */
+ fid_src = H5Fcreate(src_fname, H5F_ACC_TRUNC, fcpl_src, fapl_src);
+ if (fid_src < 0) TEST_ERROR
+
+ /* Set dataspace dimensions */
+ dim2d[0] = DIM_SIZE_1;
+ dim2d[1] = DIM_SIZE_2;
+
+ /* Create 2D dataspace */
+ if((sid = H5Screate_simple(2, dim2d, NULL)) < 0) TEST_ERROR
+
+ /* Create 2D int dataset in SRC file */
+ did_src = H5Dcreate2(fid_src, NAME_DATASET_SIMPLE, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ if (did_src < 0) TEST_ERROR
+
+ /* Write data into SRC file */
+ ret = H5Dwrite(did_src, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf);
+ if (ret < 0) TEST_ERROR
+
+ /* Get the internal dset ptr to get the fill version for verifying later */
+ if ((dsetp = (H5D_t *)H5I_object(did_src)) == NULL) TEST_ERROR
+ srcdset_fillversion = dsetp->shared->dcpl_cache.fill.version;
+
+ /* Close dataspace */
+ if(H5Sclose(sid) < 0) TEST_ERROR
+
+ /* Close the dataset */
+ if(H5Dclose(did_src) < 0) TEST_ERROR
+
+ /* Close the SRC file */
+ if(H5Fclose(fid_src) < 0) TEST_ERROR
+
+ /* Open the source file with read-only */
+ fid_src = H5Fopen(src_fname, H5F_ACC_RDONLY, fapl_src);
+ if (fid_src < 0) TEST_ERROR
+
+ /* Loop through all the combinations of low/high library format bounds,
+ skipping invalid combinations. Create a destination file and copy the
+ source dataset to it, then verify */
+ for(low = H5F_LIBVER_EARLIEST; low < H5F_LIBVER_NBOUNDS; low++) {
+ for(high = H5F_LIBVER_EARLIEST; high < H5F_LIBVER_NBOUNDS; high++) {
+
+ /* Set version bounds */
+ H5E_BEGIN_TRY {
+ ret = H5Pset_libver_bounds(fapl_dst, low, high);
+ } H5E_END_TRY;
+
+ if (ret < 0) /* Invalid low/high combinations */
+ continue;
+
+ /* Create destination file */
+ fid_dst = H5Fcreate(dst_fname, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_dst);
+ if (fid_dst < 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
+
+ /* Try to copy the dataset */
+ H5E_BEGIN_TRY {
+ ret = H5Ocopy(fid_src, NAME_DATASET_SIMPLE, fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT, H5P_DEFAULT);
+ } H5E_END_TRY;
+
+ /* If copy failed, check if the failure is expected */
+ if (ret < 0)
+ {
+ /* Failure is valid if fill version of source dataset is
+ greater than destination */
+ if (srcdset_fillversion <= H5O_fill_ver_bounds[high])
+ TEST_ERROR
+
+ /* Close the DST file before continue */
+ if(H5Fclose(fid_dst) < 0) TEST_ERROR
+ continue;
+ }
+
+ /* Close the DST file */
+ if(H5Fclose(fid_dst) < 0) TEST_ERROR
+
+ /* Open destination file */
+ fid_dst = H5Fopen(dst_fname, H5F_ACC_RDWR, fapl_dst);
+ if (fid_dst < 0) TEST_ERROR
+
+ /* Open the datasets to compare */
+ did_src = H5Dopen2(fid_src, NAME_DATASET_SIMPLE, H5P_DEFAULT);
+ if (did_src < 0) TEST_ERROR
+ did_dst = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT);
+ if (did_dst < 0) TEST_ERROR
+
+ /* Check if the datasets are equal */
+ if (compare_datasets(did_src, did_dst, H5P_DEFAULT, buf) != TRUE)
+ TEST_ERROR
+
+ /* Close the datasets */
+ if(H5Dclose(did_dst) < 0) TEST_ERROR
+ if(H5Dclose(did_src) < 0) TEST_ERROR
+
+ /* Close the DST file */
+ if(H5Fclose(fid_dst) < 0) TEST_ERROR
+
+ } /* for high */
+ } /* for low */
+
+ /* Close property list and source file */
+ if (H5Pclose(fapl_dst) < 0) TEST_ERROR
+ if (H5Fclose(fid_src) < 0) TEST_ERROR
+
+ PASSED();
+ return 0;
+
+error:
+ H5E_BEGIN_TRY {
+ H5Dclose(did_dst);
+ H5Dclose(did_src);
+ H5Sclose(sid);
+ H5Pclose(fapl_dst);
+ H5Fclose(fid_dst);
+ H5Fclose(fid_src);
+ } H5E_END_TRY;
+
+ return 1;
+} /* end test_copy_dataset_versionbounds */
+
+
/*-------------------------------------------------------------------------
* Function: test_copy_dataset_simple_samefile
*
@@ -2187,21 +2381,24 @@ test_copy_dataset_simple_samefile(hid_t fcpl, hid_t fapl)
error:
H5E_BEGIN_TRY {
- H5Dclose(did2);
- H5Dclose(did);
- H5Sclose(sid);
- H5Fclose(fid);
+ H5Dclose(did2);
+ H5Dclose(did);
+ H5Sclose(sid);
+ H5Fclose(fid);
} H5E_END_TRY;
return 1;
} /* end test_copy_dataset_simple_samefile */
-
+
/*-------------------------------------------------------------------------
* Function: test_copy_dataset_simple_empty
*
* Purpose: Create a simple dataset in SRC file and copy it to DST file
* (Note: dataset has no data)
*
+ * Note: The parameter "test_open" is added to test for H5Ocopy when
+ * the dataset is open in the file (HDFFV-7853).
+ *
* Return: Success: 0
* Failure: number of errors
*
@@ -2211,7 +2408,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_copy_dataset_simple_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
+test_copy_dataset_simple_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, hbool_t test_open)
{
hid_t fid_src = -1, fid_dst = -1; /* File IDs */
hid_t sid = -1; /* Dataspace ID */
@@ -2220,7 +2417,11 @@ test_copy_dataset_simple_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
- TESTING("H5Ocopy(): empty contiguous dataset");
+ if(test_open) {
+ TESTING("H5Ocopy(): empty and openend contiguous dataset");
+ } else {
+ TESTING("H5Ocopy(): empty contiguous dataset");
+ }
/* Initialize the filenames */
h5_fixname(FILENAME[0], src_fapl, src_filename, sizeof src_filename);
@@ -2248,15 +2449,18 @@ test_copy_dataset_simple_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h
/* 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
+ if(!test_open) {
- /* close the SRC file */
- if(H5Fclose(fid_src) < 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
+ /* 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
@@ -2267,8 +2471,10 @@ test_copy_dataset_simple_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h
/* copy the dataset from SRC to DST */
if(H5Ocopy(fid_src, NAME_DATASET_SIMPLE, fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
- /* open the dataset for copy */
- if((did = H5Dopen2(fid_src, NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR
+ if(!test_open) {
+ /* open the dataset for copy */
+ if((did = H5Dopen2(fid_src, NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR
+ }
/* open the destination dataset */
if((did2 = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR
@@ -2293,16 +2499,16 @@ test_copy_dataset_simple_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h
error:
H5E_BEGIN_TRY {
- H5Dclose(did2);
- H5Dclose(did);
- H5Sclose(sid);
- H5Fclose(fid_dst);
- H5Fclose(fid_src);
+ H5Dclose(did2);
+ H5Dclose(did);
+ H5Sclose(sid);
+ H5Fclose(fid_dst);
+ H5Fclose(fid_src);
} H5E_END_TRY;
return 1;
} /* end test_copy_dataset_simple_empty */
-
+
/*-------------------------------------------------------------------------
* Function: test_copy_dataset_compound
*
@@ -2424,17 +2630,17 @@ test_copy_dataset_compound(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
error:
H5E_BEGIN_TRY {
- H5Dclose(did2);
- H5Dclose(did);
- H5Tclose(tid);
- H5Sclose(sid);
- H5Fclose(fid_dst);
- H5Fclose(fid_src);
+ H5Dclose(did2);
+ H5Dclose(did);
+ H5Tclose(tid);
+ H5Sclose(sid);
+ H5Fclose(fid_dst);
+ H5Fclose(fid_src);
} H5E_END_TRY;
return 1;
} /* end test_copy_dataset_compound */
-
+
/*-------------------------------------------------------------------------
* Function: test_copy_dataset_chunked
*
@@ -2516,10 +2722,10 @@ test_copy_dataset_chunked(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
/* close the dataset */
if(H5Dclose(did) < 0) TEST_ERROR
- /*
+ /*
* Create 1-D dataset: chunked, non-filterd, with data
- * dims=max dims=chunk dims
- * H5D_ALLOC_TIME_INC (default)
+ * dims=max dims=chunk dims
+ * H5D_ALLOC_TIME_INC (default)
*/
/* create 1-D dataspace */
if((sid = H5Screate_simple(1, dim1d, dim1d)) < 0) TEST_ERROR
@@ -2591,9 +2797,9 @@ test_copy_dataset_chunked(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
/* close the dataset */
if(H5Dclose(did) < 0) TEST_ERROR
- /*
+ /*
* Create 2-D dataset: chunked, non-filterd, with data, dims=chunk dims,
- * H5D_ALLOC_TIME_INC (default)
+ * H5D_ALLOC_TIME_INC (default)
*/
/* create 2-D dataspace */
@@ -2615,9 +2821,9 @@ test_copy_dataset_chunked(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
/* close the dataset */
if(H5Dclose(did) < 0) TEST_ERROR
- /*
+ /*
* Create 2-D dataset: chunked, non-filterd, with data, dims=chunk dims,
- * H5D_ALLOC_TIME_EARLY
+ * H5D_ALLOC_TIME_EARLY
*/
if(H5Pset_alloc_time(pid, H5D_ALLOC_TIME_EARLY) < 0) TEST_ERROR
@@ -2639,9 +2845,9 @@ test_copy_dataset_chunked(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
/* close chunk plist */
if(H5Pclose(pid) < 0) TEST_ERROR
- /*
+ /*
* Create 2-D dataset: chunked, non-filterd, with data, dims=max dims=chunk dims,
- * H5D_ALLOC_TIME_LATE
+ * H5D_ALLOC_TIME_LATE
*/
/* create 2-D dataspace */
if((sid = H5Screate_simple(2, dim2d, dim2d)) < 0) TEST_ERROR
@@ -2700,7 +2906,7 @@ test_copy_dataset_chunked(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
/* Check if the array index type is correct */
if(compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_EARRAY, H5D_CHUNK_IDX_BTREE) != TRUE)
- TEST_ERROR
+ TEST_ERROR
/* Check if the datasets are equal */
if(compare_datasets(did, did2, H5P_DEFAULT, buf1d) != TRUE) TEST_ERROR
@@ -2720,7 +2926,7 @@ test_copy_dataset_chunked(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
/* Check if the array index type is correct */
if(compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE)
- TEST_ERROR
+ TEST_ERROR
/* Check if the datasets are equal */
if(compare_datasets(did, did2, H5P_DEFAULT, buf1d) != TRUE) TEST_ERROR
@@ -2739,7 +2945,7 @@ test_copy_dataset_chunked(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
/* Check if the array index type is correct */
if(compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_FARRAY, H5D_CHUNK_IDX_BTREE) != TRUE)
- TEST_ERROR
+ TEST_ERROR
/* Check if the datasets are equal */
if(compare_datasets(did, did2, H5P_DEFAULT, buf2d) != TRUE) TEST_ERROR
@@ -2759,7 +2965,7 @@ test_copy_dataset_chunked(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
/* Check if the array index type is correct */
if(compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_NONE, H5D_CHUNK_IDX_BTREE) != TRUE)
- TEST_ERROR
+ TEST_ERROR
/* Check if the datasets are equal */
if(compare_datasets(did, did2, H5P_DEFAULT, buf2d) != TRUE) TEST_ERROR
@@ -2778,7 +2984,7 @@ test_copy_dataset_chunked(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
/* Check if the array index type is correct */
if(compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE)
- TEST_ERROR
+ TEST_ERROR
/* Check if the datasets are equal */
if(compare_datasets(did, did2, H5P_DEFAULT, buf2d) != TRUE) TEST_ERROR
@@ -2797,7 +3003,7 @@ test_copy_dataset_chunked(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
/* Check if the array index type is correct */
if(compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE)
- TEST_ERROR
+ TEST_ERROR
/* Check if the datasets are equal */
if(compare_datasets(did, did2, H5P_DEFAULT, buf2d) != TRUE) TEST_ERROR
@@ -2816,7 +3022,7 @@ test_copy_dataset_chunked(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
/* Check if the array index type is correct */
if(compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE)
- TEST_ERROR
+ TEST_ERROR
/* Check if the datasets are equal */
if(compare_datasets(did, did2, H5P_DEFAULT, buf2d) != TRUE) TEST_ERROR
@@ -2838,17 +3044,17 @@ test_copy_dataset_chunked(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
error:
H5E_BEGIN_TRY {
- H5Dclose(did2);
- H5Dclose(did);
- H5Pclose(pid);
- H5Sclose(sid);
- H5Fclose(fid_dst);
- H5Fclose(fid_src);
+ H5Dclose(did2);
+ H5Dclose(did);
+ H5Pclose(pid);
+ H5Sclose(sid);
+ H5Fclose(fid_dst);
+ H5Fclose(fid_src);
} H5E_END_TRY;
return 1;
} /* end test_copy_dataset_chunked */
-
+
/*-------------------------------------------------------------------------
* Function: test_copy_dataset_chunked_empty
*
@@ -2916,9 +3122,9 @@ test_copy_dataset_chunked_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
/* close the dataset */
if(H5Dclose(did) < 0) TEST_ERROR
- /*
+ /*
* create 1-D dataset: chunked, empty, non-filtered,
- * dims=max dims=chunk dims, H5D_ALLOC_TIME_INC(default)
+ * dims=max dims=chunk dims, H5D_ALLOC_TIME_INC(default)
*/
/* Set 1-D dataspace dimensions */
@@ -2986,9 +3192,9 @@ test_copy_dataset_chunked_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
if(H5Dclose(did) < 0) TEST_ERROR
- /*
+ /*
* create 2-D dataset: chunked, empty, non-filtered,
- * dims=chunk dims, H5D_ALLOC_TIME_INC (default)
+ * dims=chunk dims, H5D_ALLOC_TIME_INC (default)
*/
/* Set 2-D dataspace dimensions */
@@ -3011,9 +3217,9 @@ test_copy_dataset_chunked_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
/* close the dataset */
if(H5Dclose(did) < 0) TEST_ERROR
- /*
+ /*
* create 2-D dataset: chunked, empty, non-filtered, dims=chunk dims
- * H5D_ALLOC_TIME_EARLY
+ * H5D_ALLOC_TIME_EARLY
*/
/* Set allocation time to early */
if(H5Pset_alloc_time(pid, H5D_ALLOC_TIME_EARLY) < 0) TEST_ERROR
@@ -3033,9 +3239,9 @@ test_copy_dataset_chunked_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
/* close the dataset */
if(H5Dclose(did) < 0) TEST_ERROR
- /*
- * create 2-D dataset: chunked, empty, non-filtered,
- * dims=max dims=chunk dims, H5D_ALLOC_TIME_LATE
+ /*
+ * create 2-D dataset: chunked, empty, non-filtered,
+ * dims=max dims=chunk dims, H5D_ALLOC_TIME_LATE
*/
/* Set 2-D dataspace dimensions */
@@ -3097,7 +3303,7 @@ test_copy_dataset_chunked_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
/* Check if the array index type is correct */
if(compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_EARRAY, H5D_CHUNK_IDX_BTREE) != TRUE)
- TEST_ERROR
+ TEST_ERROR
/* Check if the datasets are equal */
if(compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE) TEST_ERROR
@@ -3116,7 +3322,7 @@ test_copy_dataset_chunked_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
/* Check if the array index type is correct */
if(compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE)
- TEST_ERROR
+ TEST_ERROR
/* Check if the datasets are equal */
if(compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE) TEST_ERROR
@@ -3135,7 +3341,7 @@ test_copy_dataset_chunked_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
/* Check if the array index type is correct */
if(compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_FARRAY, H5D_CHUNK_IDX_BTREE) != TRUE)
- TEST_ERROR
+ TEST_ERROR
/* Check if the datasets are equal */
if(compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE) TEST_ERROR
@@ -3154,7 +3360,7 @@ test_copy_dataset_chunked_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
/* Check if the array index type is correct */
if(compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE)
- TEST_ERROR
+ TEST_ERROR
/* Check if the datasets are equal */
if(compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE) TEST_ERROR
@@ -3174,7 +3380,7 @@ test_copy_dataset_chunked_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
/* Check if the array index type is correct */
if(compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_NONE, H5D_CHUNK_IDX_BTREE) != TRUE)
- TEST_ERROR
+ TEST_ERROR
/* Check if the datasets are equal */
if(compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE) TEST_ERROR
@@ -3194,7 +3400,7 @@ test_copy_dataset_chunked_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
/* Check if the array index type is correct */
if(compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE)
- TEST_ERROR
+ TEST_ERROR
/* Check if the datasets are equal */
if(compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE) TEST_ERROR
@@ -3213,7 +3419,7 @@ test_copy_dataset_chunked_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
/* Check if the array index type is correct */
if(compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE)
- TEST_ERROR
+ TEST_ERROR
/* Check if the datasets are equal */
if(compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE) TEST_ERROR
@@ -3235,17 +3441,17 @@ test_copy_dataset_chunked_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
error:
H5E_BEGIN_TRY {
- H5Dclose(did2);
- H5Dclose(did);
- H5Pclose(pid);
- H5Sclose(sid);
- H5Fclose(fid_dst);
- H5Fclose(fid_src);
+ H5Dclose(did2);
+ H5Dclose(did);
+ H5Pclose(pid);
+ H5Sclose(sid);
+ H5Fclose(fid_dst);
+ H5Fclose(fid_src);
} H5E_END_TRY;
return 1;
} /* end test_copy_dataset_chunked_empty */
-
+
/*-------------------------------------------------------------------------
* Function: test_copy_dataset_chunked_sparse
*
@@ -3469,7 +3675,7 @@ test_copy_dataset_chunked_sparse(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
/* Check if the array index type is correct */
if(compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_EARRAY, H5D_CHUNK_IDX_BTREE) != TRUE)
- TEST_ERROR
+ TEST_ERROR
/* Check if the datasets are equal */
if(compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE) TEST_ERROR
@@ -3489,7 +3695,7 @@ test_copy_dataset_chunked_sparse(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
/* Check if the array index type is correct */
if(compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_BT2, H5D_CHUNK_IDX_BTREE) != TRUE)
- TEST_ERROR
+ TEST_ERROR
/* Check if the datasets are equal */
if(compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE) TEST_ERROR
@@ -3509,7 +3715,7 @@ test_copy_dataset_chunked_sparse(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
/* Check if the array index type is correct */
if(compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_NONE, H5D_CHUNK_IDX_BTREE) != TRUE)
- TEST_ERROR
+ TEST_ERROR
/* Check if the datasets are equal */
if(compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE) TEST_ERROR
@@ -3529,7 +3735,7 @@ test_copy_dataset_chunked_sparse(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
/* Check if the array index type is correct */
if(compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_NONE, H5D_CHUNK_IDX_BTREE) != TRUE)
- TEST_ERROR
+ TEST_ERROR
/* Check if the datasets are equal */
if(compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE) TEST_ERROR
@@ -3552,17 +3758,17 @@ test_copy_dataset_chunked_sparse(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
error:
H5E_BEGIN_TRY {
- H5Dclose(did2);
- H5Dclose(did);
- H5Pclose(pid);
- H5Sclose(sid);
- H5Fclose(fid_dst);
- H5Fclose(fid_src);
+ H5Dclose(did2);
+ H5Dclose(did);
+ H5Pclose(pid);
+ H5Sclose(sid);
+ H5Fclose(fid_dst);
+ H5Fclose(fid_src);
} H5E_END_TRY;
return 1;
} /* end test_copy_dataset_chunked_sparse */
-
+
/*-------------------------------------------------------------------------
* Function: test_copy_dataset_compressed
*
@@ -3659,9 +3865,9 @@ test_copy_dataset_compressed(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
/* close the dataset */
if(H5Dclose(did) < 0) TEST_ERROR
- /*
+ /*
* create 2-D dataset: chunked, filtered, with data
- * dims=max dims=chunk dims, H5D_ALLOC_TIME_INC(default)
+ * dims=max dims=chunk dims, H5D_ALLOC_TIME_INC(default)
*/
/* create dataspace */
if((sid = H5Screate_simple(2, dim2d, dim2d)) < 0) TEST_ERROR
@@ -3683,9 +3889,9 @@ test_copy_dataset_compressed(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
/* close the dataset */
if(H5Dclose(did) < 0) TEST_ERROR
- /*
+ /*
* create 2-D dataset: chunked, filtered, with data
- * dims=chunk dims, H5D_ALLOC_TIME_EARLY
+ * dims=chunk dims, H5D_ALLOC_TIME_EARLY
*/
/* create dataspace */
if((sid = H5Screate_simple(2, dim2d, NULL)) < 0) TEST_ERROR
@@ -3711,9 +3917,9 @@ test_copy_dataset_compressed(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
/* close the dataset */
if(H5Dclose(did) < 0) TEST_ERROR
- /*
+ /*
* create 2-D dataset: chunked, filtered, with data
- * dims=chunk dims, H5D_ALLOC_TIME_LATE
+ * dims=chunk dims, H5D_ALLOC_TIME_LATE
*/
/* create dataspace */
if((sid = H5Screate_simple(2, dim2d, NULL)) < 0) TEST_ERROR
@@ -3778,7 +3984,7 @@ test_copy_dataset_compressed(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
if((did2 = H5Dopen2(fid_dst, NAME_DATASET_CHUNKED, H5P_DEFAULT)) < 0) TEST_ERROR
if(compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_FARRAY, H5D_CHUNK_IDX_BTREE) != TRUE)
- TEST_ERROR
+ TEST_ERROR
/* Check if the datasets are equal */
if(compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE) TEST_ERROR
@@ -3797,7 +4003,7 @@ test_copy_dataset_compressed(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
if((did2 = H5Dopen2(fid_dst, NAME_DATASET_CHUNKED2, H5P_DEFAULT)) < 0) TEST_ERROR
if(compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_FARRAY, H5D_CHUNK_IDX_BTREE) != TRUE)
- TEST_ERROR
+ TEST_ERROR
/* Check if the datasets are equal */
if(compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE) TEST_ERROR
@@ -3815,7 +4021,7 @@ test_copy_dataset_compressed(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
if((did2 = H5Dopen2(fid_dst, NAME_DATASET_CHUNKED2_SINGLE, H5P_DEFAULT)) < 0) TEST_ERROR
if(compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE)
- TEST_ERROR
+ TEST_ERROR
/* Check if the datasets are equal */
if(compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE) TEST_ERROR
@@ -3833,7 +4039,7 @@ test_copy_dataset_compressed(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
if((did2 = H5Dopen2(fid_dst, NAME_DATASET_CHUNKED3_SINGLE, H5P_DEFAULT)) < 0) TEST_ERROR
if(compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE)
- TEST_ERROR
+ TEST_ERROR
/* Check if the datasets are equal */
if(compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE) TEST_ERROR
@@ -3851,7 +4057,7 @@ test_copy_dataset_compressed(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
if((did2 = H5Dopen2(fid_dst, NAME_DATASET_CHUNKED4_SINGLE, H5P_DEFAULT)) < 0) TEST_ERROR
if(compare_idx_type(src_fapl, did2, H5D_CHUNK_IDX_SINGLE, H5D_CHUNK_IDX_BTREE) != TRUE)
- TEST_ERROR
+ TEST_ERROR
/* Check if the datasets are equal */
if(compare_datasets(did, did2, H5P_DEFAULT, NULL) != TRUE) TEST_ERROR
@@ -3875,23 +4081,26 @@ test_copy_dataset_compressed(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
#ifdef H5_HAVE_FILTER_DEFLATE
error:
H5E_BEGIN_TRY {
- H5Dclose(did2);
- H5Dclose(did);
- H5Pclose(pid);
- H5Sclose(sid);
- H5Fclose(fid_dst);
- H5Fclose(fid_src);
+ 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_compressed */
-
+
/*-------------------------------------------------------------------------
* Function: test_copy_dataset_no_edge_filt
*
* Purpose: Create a compressed, chunked dataset in SRC file and copy it to DST file
*
+ * Note: The parameter "test_open" is added to test for H5Ocopy when
+ * the dataset is open in the file (HDFFV-7853).
+ *
* Return: Success: 0
* Failure: number of errors
*
@@ -3904,7 +4113,7 @@ error:
*/
static int
test_copy_dataset_no_edge_filt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
- hid_t dst_fapl)
+ hid_t dst_fapl, hbool_t test_open)
{
#ifdef H5_HAVE_FILTER_DEFLATE
hid_t fid_src = -1, fid_dst = -1; /* File IDs */
@@ -3919,7 +4128,11 @@ test_copy_dataset_no_edge_filt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
char dst_filename[NAME_BUF_SIZE];
#endif /* H5_HAVE_FILTER_DEFLATE */
- TESTING("H5Ocopy(): compressed dataset with no edge filters");
+ if(test_open) {
+ TESTING("H5Ocopy(): compressed and opened dataset with no edge filters");
+ } else {
+ TESTING("H5Ocopy(): compressed dataset with no edge filters");
+ }
#ifndef H5_HAVE_FILTER_DEFLATE
SKIPPED();
@@ -3968,15 +4181,19 @@ test_copy_dataset_no_edge_filt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
/* 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
+ if(!test_open) {
- /* close the SRC file */
- if(H5Fclose(fid_src) < 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
+
+ /* 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
@@ -3987,8 +4204,10 @@ test_copy_dataset_no_edge_filt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
/* 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
+ if(!test_open) {
+ /* 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
@@ -4030,12 +4249,15 @@ error:
#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
*
+ * Note: The parameter "test_open" is added to test for H5Ocopy when
+ * the dataset is open in the file (HDFFV-7853).
+ *
* Return: Success: 0
* Failure: number of errors
*
@@ -4045,7 +4267,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_copy_dataset_compact(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
+test_copy_dataset_compact(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, hbool_t test_open)
{
hid_t fid_src = -1, fid_dst = -1; /* File IDs */
hid_t sid = -1; /* Dataspace ID */
@@ -4057,7 +4279,11 @@ test_copy_dataset_compact(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
- TESTING("H5Ocopy(): compact dataset");
+ if(test_open) {
+ TESTING("H5Ocopy(): compact and opened dataset");
+ } else {
+ TESTING("H5Ocopy(): compact dataset");
+ }
/* set initial data values */
for (i=0; i<DIM_SIZE_1; i++)
@@ -4100,15 +4326,17 @@ test_copy_dataset_compact(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
/* 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
+ if(!test_open) {
+ /* close the dataset */
+ if(H5Dclose(did) < 0) TEST_ERROR
- /* close the SRC file */
- if(H5Fclose(fid_src) < 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
+ /* 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
@@ -4119,8 +4347,10 @@ test_copy_dataset_compact(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
/* copy the dataset from SRC to DST */
if(H5Ocopy(fid_src, NAME_DATASET_COMPACT, fid_dst, NAME_DATASET_COMPACT, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
- /* open the dataset for copy */
- if((did = H5Dopen2(fid_src, NAME_DATASET_COMPACT, H5P_DEFAULT)) < 0) TEST_ERROR
+ if(!test_open) {
+ /* open the dataset for copy */
+ if((did = H5Dopen2(fid_src, NAME_DATASET_COMPACT, H5P_DEFAULT)) < 0) TEST_ERROR
+ }
/* open the destination dataset */
if((did2 = H5Dopen2(fid_dst, NAME_DATASET_COMPACT, H5P_DEFAULT)) < 0) TEST_ERROR
@@ -4145,17 +4375,17 @@ test_copy_dataset_compact(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
error:
H5E_BEGIN_TRY {
- H5Dclose(did2);
- H5Dclose(did);
- H5Pclose(pid);
- H5Sclose(sid);
- H5Fclose(fid_dst);
- H5Fclose(fid_src);
+ H5Dclose(did2);
+ H5Dclose(did);
+ H5Pclose(pid);
+ H5Sclose(sid);
+ H5Fclose(fid_dst);
+ H5Fclose(fid_src);
} H5E_END_TRY;
return 1;
} /* end test_copy_dataset_compact */
-
+
/*-------------------------------------------------------------------------
* Function: test_copy_dataset_external
*
@@ -4272,17 +4502,17 @@ test_copy_dataset_external(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
error:
H5E_BEGIN_TRY {
- H5Dclose(did2);
- H5Dclose(did);
- H5Pclose(pid);
- H5Sclose(sid);
- H5Fclose(fid_dst);
- H5Fclose(fid_src);
+ H5Dclose(did2);
+ H5Dclose(did);
+ H5Pclose(pid);
+ H5Sclose(sid);
+ H5Fclose(fid_dst);
+ H5Fclose(fid_src);
} H5E_END_TRY;
return 1;
} /* end test_copy_dataset_external */
-
+
/*-------------------------------------------------------------------------
* Function: test_copy_dataset_named_dtype
*
@@ -4393,17 +4623,17 @@ test_copy_dataset_named_dtype(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hi
error:
H5E_BEGIN_TRY {
- H5Dclose(did2);
- H5Dclose(did);
- H5Tclose(tid);
- H5Sclose(sid);
- H5Fclose(fid_dst);
- H5Fclose(fid_src);
+ H5Dclose(did2);
+ H5Dclose(did);
+ H5Tclose(tid);
+ H5Sclose(sid);
+ H5Fclose(fid_dst);
+ H5Fclose(fid_src);
} H5E_END_TRY;
return 1;
} /* end test_copy_dataset_named_dtype */
-
+
/*-------------------------------------------------------------------------
* Function: test_copy_dataset_named_dtype_hier
*
@@ -4530,18 +4760,18 @@ test_copy_dataset_named_dtype_hier(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
error:
H5E_BEGIN_TRY {
- H5Dclose(did);
- H5Tclose(tid);
- H5Sclose(sid);
- H5Gclose(gid2);
- H5Gclose(gid);
- H5Fclose(fid_dst);
- H5Fclose(fid_src);
+ H5Dclose(did);
+ H5Tclose(tid);
+ H5Sclose(sid);
+ H5Gclose(gid2);
+ H5Gclose(gid);
+ H5Fclose(fid_dst);
+ H5Fclose(fid_src);
} H5E_END_TRY;
return 1;
} /* end test_copy_dataset_named_dtype_hier */
-
+
/*-------------------------------------------------------------------------
* Function: test_copy_dataset_named_dtype_hier_outside
*
@@ -4669,18 +4899,18 @@ test_copy_dataset_named_dtype_hier_outside(hid_t fcpl_src, hid_t fcpl_dst, hid_t
error:
H5E_BEGIN_TRY {
- H5Dclose(did);
- H5Tclose(tid);
- H5Sclose(sid);
- H5Gclose(gid2);
- H5Gclose(gid);
- H5Fclose(fid_dst);
- H5Fclose(fid_src);
+ H5Dclose(did);
+ H5Tclose(tid);
+ H5Sclose(sid);
+ H5Gclose(gid2);
+ H5Gclose(gid);
+ H5Fclose(fid_dst);
+ H5Fclose(fid_src);
} H5E_END_TRY;
return 1;
} /* end test_copy_dataset_named_dtype_hier_outside */
-
+
/*-------------------------------------------------------------------------
* Function: test_copy_dataset_multi_ohdr_chunks
*
@@ -4688,6 +4918,9 @@ error:
* creates lots of object header chunks in SRC file and copy
* datasets to DST file
*
+ * Note: The parameter "test_open" is added to test for H5Ocopy when
+ * the dataset is open in the file (HDFFV-7853).
+ *
* Return: Success: 0
* Failure: number of errors
*
@@ -4697,7 +4930,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_copy_dataset_multi_ohdr_chunks(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
+test_copy_dataset_multi_ohdr_chunks(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, hbool_t test_open)
{
hid_t fid_src = -1, fid_dst = -1; /* File IDs */
hid_t sid = -1; /* Dataspace ID */
@@ -4709,7 +4942,11 @@ test_copy_dataset_multi_ohdr_chunks(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fa
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
- TESTING("H5Ocopy(): datasets that have multiple ohdr chunks");
+ if(test_open) {
+ TESTING("H5Ocopy(): opened datasets that have multiple ohdr chunks");
+ } else {
+ TESTING("H5Ocopy(): datasets that have multiple ohdr chunks");
+ }
/* set initial data values */
for (i=0; i<DIM_SIZE_1; i++)
@@ -4749,24 +4986,27 @@ test_copy_dataset_multi_ohdr_chunks(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fa
/* Add attributes to datasets in a way that creates lots of chunks */
if(test_copy_attach_paired_attributes(did, did2, H5T_NATIVE_INT) < 0) TEST_ERROR
+ /* close dataspace */
+ if(H5Sclose(sid) < 0) TEST_ERROR
+
/* close the first dataset */
if(H5Dclose(did) < 0) TEST_ERROR
- /* close the second dataset */
- if(H5Dclose(did2) < 0) TEST_ERROR
+ if(!test_open) {
- /* close dataspace */
- if(H5Sclose(sid) < 0) TEST_ERROR
+ /* close the second dataset */
+ if(H5Dclose(did2) < 0) TEST_ERROR
- /* close group */
- if(H5Gclose(gid) < 0) TEST_ERROR
+ /* close group */
+ if(H5Gclose(gid) < 0) TEST_ERROR
- /* close the SRC file */
- if(H5Fclose(fid_src) < 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
- /* 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
@@ -4777,8 +5017,13 @@ test_copy_dataset_multi_ohdr_chunks(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fa
/* copy the dataset from SRC to DST */
if(H5Ocopy(fid_src, NAME_GROUP_TOP, fid_dst, NAME_GROUP_TOP, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
- /* open the group for copy */
- if((gid = H5Gopen2(fid_src, NAME_GROUP_TOP, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
+ if(test_open) {
+ /* close the second dataset */
+ if(H5Dclose(did2) < 0) TEST_ERROR
+
+ } else
+ /* open the group for copy */
+ if((gid = H5Gopen2(fid_src, NAME_GROUP_TOP, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* open the destination group */
if((gid2 = H5Gopen2(fid_dst, NAME_GROUP_TOP, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
@@ -4803,18 +5048,18 @@ test_copy_dataset_multi_ohdr_chunks(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fa
error:
H5E_BEGIN_TRY {
- H5Dclose(did2);
- H5Dclose(did);
- H5Sclose(sid);
- H5Gclose(gid2);
- H5Gclose(gid);
- H5Fclose(fid_dst);
- H5Fclose(fid_src);
+ H5Dclose(did2);
+ H5Dclose(did);
+ H5Sclose(sid);
+ H5Gclose(gid2);
+ H5Gclose(gid);
+ H5Fclose(fid_dst);
+ H5Fclose(fid_src);
} H5E_END_TRY;
return 1;
} /* end test_copy_dataset_multi_ohdr_chunks */
-
+
/*-------------------------------------------------------------------------
* Function: test_copy_dataset_attr_named_dtype
*
@@ -4944,19 +5189,19 @@ test_copy_dataset_attr_named_dtype(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
error:
H5E_BEGIN_TRY {
- H5Dclose(did2);
- H5Dclose(did);
- H5Tclose(tid);
- H5Sclose(sid);
- H5Gclose(gid2);
- H5Gclose(gid);
- H5Fclose(fid_dst);
- H5Fclose(fid_src);
+ H5Dclose(did2);
+ H5Dclose(did);
+ H5Tclose(tid);
+ H5Sclose(sid);
+ H5Gclose(gid2);
+ H5Gclose(gid);
+ H5Fclose(fid_dst);
+ H5Fclose(fid_src);
} H5E_END_TRY;
return 1;
} /* end test_copy_dataset_attr_named_dtype */
-
+
/*-------------------------------------------------------------------------
* Function: test_copy_dataset_contig_vl
*
@@ -5080,19 +5325,19 @@ test_copy_dataset_contig_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_
error:
H5E_BEGIN_TRY {
- H5Dclose(did2);
- H5Dclose(did);
+ H5Dclose(did2);
+ H5Dclose(did);
H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf);
- H5Pclose(dxpl_id);
- H5Tclose(tid);
- H5Sclose(sid);
- H5Fclose(fid_dst);
- H5Fclose(fid_src);
+ H5Pclose(dxpl_id);
+ H5Tclose(tid);
+ H5Sclose(sid);
+ H5Fclose(fid_dst);
+ H5Fclose(fid_src);
} H5E_END_TRY;
return 1;
} /* end test_copy_dataset_contig_vl */
-
+
/*-------------------------------------------------------------------------
* Function: test_copy_dataset_chunked_vl
*
@@ -5263,20 +5508,20 @@ test_copy_dataset_chunked_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
error:
H5E_BEGIN_TRY {
- H5Dclose(did2);
- H5Dclose(did);
+ H5Dclose(did2);
+ H5Dclose(did);
H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf);
- H5Pclose(dxpl_id);
- H5Pclose(pid);
- H5Tclose(tid);
- H5Sclose(sid);
- H5Fclose(fid_dst);
- H5Fclose(fid_src);
+ H5Pclose(dxpl_id);
+ H5Pclose(pid);
+ H5Tclose(tid);
+ H5Sclose(sid);
+ H5Fclose(fid_dst);
+ H5Fclose(fid_src);
} H5E_END_TRY;
return 1;
} /* end test_copy_dataset_chunked_vl */
-
+
/*-------------------------------------------------------------------------
* Function: test_copy_dataset_compact_vl
*
@@ -5408,19 +5653,19 @@ test_copy_dataset_compact_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid
error:
H5E_BEGIN_TRY {
- H5Dclose(did2);
- H5Dclose(did);
+ H5Dclose(did2);
+ H5Dclose(did);
H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf);
- H5Pclose(dxpl_id);
- H5Tclose(tid);
- H5Sclose(sid);
- H5Fclose(fid_dst);
- H5Fclose(fid_src);
+ H5Pclose(dxpl_id);
+ H5Tclose(tid);
+ H5Sclose(sid);
+ H5Fclose(fid_dst);
+ H5Fclose(fid_src);
} H5E_END_TRY;
return 1;
} /* end test_copy_dataset_compact_vl */
-
+
/*-------------------------------------------------------------------------
* Function: test_copy_attribute_vl
*
@@ -5526,11 +5771,11 @@ error:
H5E_BEGIN_TRY {
H5Aclose(aid2);
H5Aclose(aid);
- H5Dclose(did2);
- H5Dclose(did);
- H5Sclose(sid);
- H5Fclose(fid_dst);
- H5Fclose(fid_src);
+ H5Dclose(did2);
+ H5Dclose(did);
+ H5Sclose(sid);
+ H5Fclose(fid_dst);
+ H5Fclose(fid_src);
} H5E_END_TRY;
return 1;
} /* end test_copy_dataset_simple_empty */
@@ -5549,18 +5794,18 @@ error:
static int
attach_attribute_compound_vlstr(hid_t loc_id)
{
- hid_t aid = -1; /* Attribute ID */
- hid_t sid = -1; /* Dataspace ID */
- hid_t tid = -1; /* Datatype ID */
- hid_t vl_str_tid = -1; /* Variable length string datatype ID */
- hid_t cmpd_tid = -1; /* Compound datatype ID */
- hsize_t dim1 = 1; /* Dimension size */
- typedef struct { /* Compound structure for the attribute */
+ hid_t aid = -1; /* Attribute ID */
+ hid_t sid = -1; /* Dataspace ID */
+ hid_t tid = -1; /* Datatype ID */
+ hid_t vl_str_tid = -1; /* Variable length string datatype ID */
+ hid_t cmpd_tid = -1; /* Compound datatype ID */
+ hsize_t dim1 = 1; /* Dimension size */
+ typedef struct { /* Compound structure for the attribute */
int i;
char *v;
} s1;
s1 buf; /* Buffer */
- int ret_value = -1; /* Return value */
+ int ret_value = -1; /* Return value */
/* Create dataspace */
if((sid = H5Screate_simple(1, &dim1, NULL)) < 0 )
@@ -5614,7 +5859,7 @@ done:
* Function: compare_attribute_compound_vlstr
*
* Purpose: Compare data of the attributes attached to the two objects.
- * The attribute is a compound datatype with a variable length string.
+ * The attribute is a compound datatype with a variable length string.
*
* Return: Non-negative on success/Negative on failure
*
@@ -5625,46 +5870,46 @@ done:
static int
compare_attribute_compound_vlstr(hid_t loc, hid_t loc2)
{
- hid_t aid = -1, aid2 = -1; /* Attribute IDs */
- hid_t tid = -1, tid2 = -1; /* Datatype IDs */
- typedef struct { /* Compound structure for the attribute */
- int i;
- char *v;
+ hid_t aid = -1, aid2 = -1; /* Attribute IDs */
+ hid_t tid = -1, tid2 = -1; /* Datatype IDs */
+ typedef struct { /* Compound structure for the attribute */
+ int i;
+ char *v;
} s1;
- s1 rbuf; /* Buffer for data read */
- s1 rbuf2; /* Buffer for data read */
-
+ s1 rbuf; /* Buffer for data read */
+ s1 rbuf2; /* Buffer for data read */
+
/* Open the attributes attached to the objects */
if((aid = H5Aopen_by_idx(loc, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)0, H5P_DEFAULT, H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR
if((aid2 = H5Aopen_by_idx(loc2, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)0, H5P_DEFAULT, H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR
/* Get the attributes' datatypes */
- if((tid = H5Aget_type(aid)) < 0)
- FAIL_STACK_ERROR
+ if((tid = H5Aget_type(aid)) < 0)
+ FAIL_STACK_ERROR
if((tid2 = H5Aget_type(aid2)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR
/* Read the attributes */
if(H5Aread(aid, tid, &rbuf) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR
if(H5Aread(aid2, tid2, &rbuf2) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR
/* Compare the attributes' data */
if(rbuf.i != rbuf2.i)
- FAIL_STACK_ERROR
- if(HDstrlen(rbuf.v) != HDstrlen(rbuf2.v))
- FAIL_STACK_ERROR
- if(HDmemcmp(rbuf.v, rbuf2.v, HDstrlen(rbuf.v)))
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR
+ if(HDstrlen(rbuf.v) != HDstrlen(rbuf2.v))
+ FAIL_STACK_ERROR
+ if(HDmemcmp(rbuf.v, rbuf2.v, HDstrlen(rbuf.v)))
+ FAIL_STACK_ERROR
/* Close the attributes */
if(H5Aclose(aid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR
if(H5Aclose(aid2) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR
return TRUE;
error:
@@ -5682,15 +5927,15 @@ error:
* Function: test_copy_attribute_compound_vlstr
*
* Purpose: Create a simple dataset and a group in SRC file.
- * Both has an attribute with a compound datatype consisting
+ * Both has an attribute with a compound datatype consisting
* of a variable length string
* Copy the dataset and the group to DST file
- * This is for HDFFV-7991
+ * This is for HDFFV-7991
*
* Return: Success: 0
* Failure: number of errors
*
- * Programmer:
+ * Programmer:
*
*-------------------------------------------------------------------------
*/
@@ -5701,10 +5946,10 @@ test_copy_attribute_compound_vlstr(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
hid_t sid = -1; /* Dataspace ID */
hid_t did = -1, did2 = -1; /* Dataset IDs */
hid_t aid = -1, aid2 = -1; /* Attribute IDs */
- hid_t gid = -1, gid2 = -1; /* Group IDs */
+ hid_t gid = -1, gid2 = -1; /* Group IDs */
hsize_t dim2d[2]; /* Dataset dimensions */
- char src_filename[NAME_BUF_SIZE]; /* Source file name */
- char dst_filename[NAME_BUF_SIZE]; /* Destination file name */
+ char src_filename[NAME_BUF_SIZE]; /* Source file name */
+ char dst_filename[NAME_BUF_SIZE]; /* Destination file name */
TESTING("H5Ocopy(): attribute with compound datatype consisting of variable length string");
@@ -5717,7 +5962,7 @@ test_copy_attribute_compound_vlstr(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
/* create source file */
if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR
/* set dataspace dimensions */
dim2d[0] = DIM_SIZE_1;
@@ -5725,103 +5970,103 @@ test_copy_attribute_compound_vlstr(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
/* create 2D dataspace */
if((sid = H5Screate_simple(2, dim2d, NULL)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR
/* create 2D int dataset at SRC file */
if((did = H5Dcreate2(fid_src, NAME_DATASET_SIMPLE, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR
/* close dataspace */
if(H5Sclose(sid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR
/* attach an attribute to the dataset */
if(attach_attribute_compound_vlstr(did) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR
/* close the dataset */
if(H5Dclose(did) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR
/* create a group */
if((gid = H5Gcreate2(fid_src, NAME_GROUP_EMPTY, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR
/* attach attribute to the group */
if(attach_attribute_compound_vlstr(gid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR
/* close the group */
if(H5Gclose(gid) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR
/* close the SRC file */
if(H5Fclose(fid_src) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR
/* open the source file with read-only */
if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR
/* create destination file */
if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_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)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR
/* copy the dataset from SRC to DST */
if(H5Ocopy(fid_src, NAME_DATASET_SIMPLE, fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT, H5P_DEFAULT) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR
/* open the src dataset */
if((did = H5Dopen2(fid_src, NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR
/* open the destination dataset */
if((did2 = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR
/* compare the data of the attributes attached to the two datasets */
if(compare_attribute_compound_vlstr(did, did2) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR
/* close the datasets */
if(H5Dclose(did2) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR
if(H5Dclose(did) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR
/* Copy the group */
if(H5Ocopy(fid_src, NAME_GROUP_EMPTY, fid_dst, NAME_GROUP_EMPTY, H5P_DEFAULT, H5P_DEFAULT) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR
/* Open the src group */
if((gid = H5Gopen2(fid_src, NAME_GROUP_EMPTY, H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR
/* Open the destination group */
if((gid2 = H5Gopen2(fid_dst, NAME_GROUP_EMPTY, H5P_DEFAULT)) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR
/* compare the data of the attributes attached to the two groups */
if(compare_attribute_compound_vlstr(gid, gid2) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR
/* close the groups */
- if(H5Gclose(gid) < 0)
- FAIL_STACK_ERROR
- if(H5Gclose(gid2) < 0)
- FAIL_STACK_ERROR
+ if(H5Gclose(gid) < 0)
+ FAIL_STACK_ERROR
+ if(H5Gclose(gid2) < 0)
+ FAIL_STACK_ERROR
/* close the SRC file */
if(H5Fclose(fid_src) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR
/* close the DST file */
if(H5Fclose(fid_dst) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR
PASSED();
return 0;
@@ -5830,18 +6075,18 @@ error:
H5E_BEGIN_TRY {
H5Aclose(aid2);
H5Aclose(aid);
- H5Dclose(did2);
- H5Dclose(did);
- H5Gclose(gid);
- H5Gclose(gid2);
- H5Sclose(sid);
- H5Fclose(fid_dst);
- H5Fclose(fid_src);
+ H5Dclose(did2);
+ H5Dclose(did);
+ H5Gclose(gid);
+ H5Gclose(gid2);
+ H5Sclose(sid);
+ H5Fclose(fid_dst);
+ H5Fclose(fid_src);
} H5E_END_TRY;
return 1;
} /* end test_copy_attribute_compound_vlstr() */
-
+
/*-------------------------------------------------------------------------
* Function: test_copy_dataset_compressed_vl
*
@@ -5985,21 +6230,21 @@ test_copy_dataset_compressed_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
#ifdef H5_HAVE_FILTER_DEFLATE
error:
H5E_BEGIN_TRY {
- H5Dclose(did2);
- H5Dclose(did);
- H5Pclose(pid);
+ H5Dclose(did2);
+ H5Dclose(did);
+ H5Pclose(pid);
H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf);
- H5Pclose(dxpl_id);
- H5Tclose(tid);
- H5Sclose(sid);
- H5Fclose(fid_dst);
- H5Fclose(fid_src);
+ H5Pclose(dxpl_id);
+ H5Tclose(tid);
+ H5Sclose(sid);
+ H5Fclose(fid_dst);
+ H5Fclose(fid_src);
} H5E_END_TRY;
return 1;
#endif /* H5_HAVE_FILTER_DEFLATE */
} /* end test_copy_dataset_compressed_vl */
-
+
/*-------------------------------------------------------------------------
* Function: test_copy_group_empty
*
@@ -6086,15 +6331,15 @@ test_copy_group_empty(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_
error:
H5E_BEGIN_TRY {
- H5Gclose(gid2);
- H5Gclose(gid);
- H5Fclose(fid_dst);
- H5Fclose(fid_src);
+ H5Gclose(gid2);
+ H5Gclose(gid);
+ H5Fclose(fid_dst);
+ H5Fclose(fid_src);
} H5E_END_TRY;
return 1;
} /* end test_copy_group_empty */
-
+
/*-------------------------------------------------------------------------
* Function: test_copy_root_group
*
@@ -6227,7 +6472,7 @@ error:
return 1;
} /* end test_copy_root_group */
-
+
/*-------------------------------------------------------------------------
* Function: test_copy_group
*
@@ -6350,18 +6595,18 @@ test_copy_group(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
error:
H5E_BEGIN_TRY {
- H5Sclose(sid);
- H5Dclose(did);
- H5Gclose(gid_sub);
- H5Gclose(gid2);
- H5Gclose(gid);
- H5Fclose(fid_dst);
- H5Fclose(fid_src);
+ H5Sclose(sid);
+ H5Dclose(did);
+ H5Gclose(gid_sub);
+ H5Gclose(gid2);
+ H5Gclose(gid);
+ H5Fclose(fid_dst);
+ H5Fclose(fid_src);
} H5E_END_TRY;
return 1;
} /* end test_copy_group */
-
+
/*-------------------------------------------------------------------------
* Function: test_copy_group_deep
*
@@ -6492,18 +6737,18 @@ test_copy_group_deep(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_f
error:
H5E_BEGIN_TRY {
- H5Sclose(sid);
- H5Dclose(did);
- H5Gclose(gid_sub);
- H5Gclose(gid2);
- H5Gclose(gid);
- H5Fclose(fid_dst);
- H5Fclose(fid_src);
+ H5Sclose(sid);
+ H5Dclose(did);
+ H5Gclose(gid_sub);
+ H5Gclose(gid2);
+ H5Gclose(gid);
+ H5Fclose(fid_dst);
+ H5Fclose(fid_src);
} H5E_END_TRY;
return 1;
} /* end test_copy_group_deep */
-
+
/*-------------------------------------------------------------------------
* Function: test_copy_group_loop
*
@@ -6603,17 +6848,17 @@ test_copy_group_loop(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_f
error:
H5E_BEGIN_TRY {
- H5Gclose(gid_sub2);
- H5Gclose(gid_sub);
- H5Gclose(gid2);
- H5Gclose(gid);
- H5Fclose(fid_dst);
- H5Fclose(fid_src);
+ H5Gclose(gid_sub2);
+ H5Gclose(gid_sub);
+ H5Gclose(gid2);
+ H5Gclose(gid);
+ H5Fclose(fid_dst);
+ H5Fclose(fid_src);
} H5E_END_TRY;
return 1;
} /* end test_copy_group_loop */
-
+
/*-------------------------------------------------------------------------
* Function: test_copy_group_wide_loop
*
@@ -6732,17 +6977,17 @@ test_copy_group_wide_loop(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t
error:
H5E_BEGIN_TRY {
- H5Gclose(gid_sub2);
- H5Gclose(gid_sub);
- H5Gclose(gid2);
- H5Gclose(gid);
- H5Fclose(fid_dst);
- H5Fclose(fid_src);
+ H5Gclose(gid_sub2);
+ H5Gclose(gid_sub);
+ H5Gclose(gid2);
+ H5Gclose(gid);
+ H5Fclose(fid_dst);
+ H5Fclose(fid_src);
} H5E_END_TRY;
return 1;
} /* end test_copy_group_wide_loop */
-
+
/*-------------------------------------------------------------------------
* Function: test_copy_group_links
*
@@ -6990,26 +7235,29 @@ test_copy_group_links(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_
error:
H5E_BEGIN_TRY {
- H5Sclose(sid);
- H5Dclose(did2);
- H5Dclose(did);
- H5Gclose(gid2);
- H5Gclose(gid);
- H5Fclose(fid_ext);
- H5Fclose(fid_dst);
- H5Fclose(fid_src);
- H5Pclose(plid);
+ H5Sclose(sid);
+ H5Dclose(did2);
+ H5Dclose(did);
+ H5Gclose(gid2);
+ H5Gclose(gid);
+ H5Fclose(fid_ext);
+ H5Fclose(fid_dst);
+ H5Fclose(fid_src);
+ H5Pclose(plid);
} H5E_END_TRY;
return 1;
} /* end test_copy_group_links */
-
+
/*-------------------------------------------------------------------------
* Function: test_copy_soft_link
*
* Purpose: Create a soft link in SRC file and copy it to DST file
* copy a datast pointed by a soft link to DST file
*
+ * Note: The parameter "test_open" is added to test for H5Ocopy when
+ * the dataset is open in the file (HDFFV-7853).
+ *
* Return: Success: 0
* Failure: number of errors
*
@@ -7019,7 +7267,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_copy_soft_link(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
+test_copy_soft_link(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, hbool_t test_open)
{
hid_t fid_src = -1, fid_dst = -1; /* File IDs */
hid_t sid = -1; /* Dataspace ID */
@@ -7031,7 +7279,11 @@ test_copy_soft_link(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fa
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
- TESTING("H5Ocopy(): object through soft link");
+ if(test_open) {
+ TESTING("H5Ocopy(): openend object through soft link");
+ } else {
+ TESTING("H5Ocopy(): object through soft link");
+ }
/* set initial data values */
for (i=0; i<DIM_SIZE_1; i++)
@@ -7068,21 +7320,22 @@ test_copy_soft_link(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fa
/* close dataspace */
if(H5Sclose(sid) < 0) FAIL_STACK_ERROR
- /* close the dataset */
- if(H5Dclose(did) < 0) FAIL_STACK_ERROR
+ /* close the group */
+ if(H5Gclose(gid) < 0) FAIL_STACK_ERROR
/* make a soft link to the dataset */
if(H5Lcreate_soft(NAME_LINK_DATASET, fid_src, NAME_LINK_SOFT, H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR
- /* close the group */
- if(H5Gclose(gid) < 0) FAIL_STACK_ERROR
-
- /* close the SRC file */
- if(H5Fclose(fid_src) < 0) FAIL_STACK_ERROR
+ if(!test_open) {
+ /* close the dataset */
+ if(H5Dclose(did) < 0) FAIL_STACK_ERROR
+ /* close the SRC file */
+ if(H5Fclose(fid_src) < 0) FAIL_STACK_ERROR
- /* open the source file with read-only */
- if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 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
@@ -7093,8 +7346,10 @@ test_copy_soft_link(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fa
/* copy the dataset from SRC to DST */
if(H5Ocopy(fid_src, NAME_LINK_SOFT, fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
- /* open the dataset through the soft link for copy */
- if((did = H5Dopen2(fid_src, NAME_LINK_SOFT, H5P_DEFAULT)) < 0) TEST_ERROR
+ if(!test_open) {
+ /* open the dataset through the soft link for copy */
+ if((did = H5Dopen2(fid_src, NAME_LINK_SOFT, H5P_DEFAULT)) < 0) TEST_ERROR
+ }
/* open the destination dataset */
if((did2 = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR
@@ -7119,17 +7374,17 @@ test_copy_soft_link(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fa
error:
H5E_BEGIN_TRY {
- H5Sclose(sid);
- H5Dclose(did2);
- H5Dclose(did);
- H5Gclose(gid);
- H5Fclose(fid_dst);
- H5Fclose(fid_src);
+ H5Sclose(sid);
+ H5Dclose(did2);
+ H5Dclose(did);
+ H5Gclose(gid);
+ H5Fclose(fid_dst);
+ H5Fclose(fid_src);
} H5E_END_TRY;
return 1;
} /* end test_copy_soft_link */
-
+
/*-------------------------------------------------------------------------
* Function: test_copy_ext_link
*
@@ -7253,17 +7508,17 @@ test_copy_ext_link(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fap
error:
H5E_BEGIN_TRY {
- H5Sclose(sid);
- H5Dclose(did2);
- H5Dclose(did);
- H5Gclose(gid);
- H5Fclose(fid_dst);
- H5Fclose(fid_src);
+ H5Sclose(sid);
+ H5Dclose(did2);
+ H5Dclose(did);
+ H5Gclose(gid);
+ H5Fclose(fid_dst);
+ H5Fclose(fid_src);
} H5E_END_TRY;
return 1;
} /* end test_copy_ext_link */
-
+
/*-------------------------------------------------------------------------
* Function: test_copy_exist
*
@@ -7363,15 +7618,15 @@ test_copy_exist(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
error:
H5E_BEGIN_TRY {
- H5Dclose(did);
- H5Sclose(sid);
- H5Fclose(fid_dst);
- H5Fclose(fid_src);
+ H5Dclose(did);
+ H5Sclose(sid);
+ H5Fclose(fid_dst);
+ H5Fclose(fid_src);
} H5E_END_TRY;
return 1;
} /* end test_copy_exist */
-
+
/*-------------------------------------------------------------------------
* Function: test_copy_path
*
@@ -7497,17 +7752,17 @@ test_copy_path(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
error:
H5E_BEGIN_TRY {
- H5Dclose(did2);
- H5Dclose(did);
- H5Sclose(sid);
- H5Gclose(gid);
- H5Fclose(fid_dst);
- H5Fclose(fid_src);
+ H5Dclose(did2);
+ H5Dclose(did);
+ H5Sclose(sid);
+ H5Gclose(gid);
+ H5Fclose(fid_dst);
+ H5Fclose(fid_src);
} H5E_END_TRY;
return 1;
} /* end test_copy_path */
-
+
/*-------------------------------------------------------------------------
* Function: test_copy_same_file_named_datatype
*
@@ -7569,21 +7824,21 @@ test_copy_same_file_named_datatype(hid_t fcpl_src, hid_t fapl)
error:
H5E_BEGIN_TRY {
- H5Tclose(tid2);
- H5Tclose(tid);
- H5Fclose(fid);
+ H5Tclose(tid2);
+ H5Tclose(tid);
+ H5Fclose(fid);
} H5E_END_TRY;
return 1;
} /* end test_copy_same_file_named_datatype */
-
+
/*-------------------------------------------------------------------------
* Function: test_copy_old_layout
*
* Purpose: Copy dataset that uses the "old" layout version (pre version 3)
* format.
*
- * Note: This test uses the "fill_old.h5" file for convenience, since it
+ * Note: This test uses the "fill_old.h5" file for convenience, since it
* has a dataset with the old layout format.
*
* Return: Success: 0
@@ -7595,14 +7850,18 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_copy_old_layout(hid_t fcpl_dst, hid_t fapl)
+test_copy_old_layout(hid_t fcpl_dst, hid_t fapl, hbool_t test_open)
{
hid_t fid_src = -1, fid_dst = -1; /* File IDs */
hid_t did = -1, did2 = -1; /* Dataset IDs */
const char *src_filename = H5_get_srcdir_filename(FILE_OLD_LAYOUT); /* Corrected test file name */
char dst_filename[NAME_BUF_SIZE];
- TESTING("H5Ocopy(): dataset with old layout format");
+ if(test_open) {
+ TESTING("H5Ocopy(): opened dataset with old layout format");
+ } else {
+ TESTING("H5Ocopy(): dataset with old layout format");
+ }
/* Initialize the destination filename */
h5_fixname(FILENAME[1], fapl, dst_filename, sizeof dst_filename);
@@ -7619,11 +7878,18 @@ test_copy_old_layout(hid_t fcpl_dst, hid_t fapl)
/* 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
+ if(test_open) {
+ /* open the source dataset */
+ if((did = H5Dopen2(fid_src, NAME_OLD_FORMAT, H5P_DEFAULT)) < 0) TEST_ERROR
+ }
+
/* copy the dataset from SRC to DST */
if(H5Ocopy(fid_src, NAME_OLD_FORMAT, fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
- /* open the source dataset */
- if((did = H5Dopen2(fid_src, NAME_OLD_FORMAT, H5P_DEFAULT)) < 0) TEST_ERROR
+ if(!test_open) {
+ /* open the source dataset */
+ if((did = H5Dopen2(fid_src, NAME_OLD_FORMAT, H5P_DEFAULT)) < 0) TEST_ERROR
+ }
/* open the destination dataset */
if((did2 = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR
@@ -7648,15 +7914,15 @@ test_copy_old_layout(hid_t fcpl_dst, hid_t fapl)
error:
H5E_BEGIN_TRY {
- H5Dclose(did2);
- H5Dclose(did);
- H5Fclose(fid_dst);
- H5Fclose(fid_src);
+ H5Dclose(did2);
+ H5Dclose(did);
+ H5Fclose(fid_dst);
+ H5Fclose(fid_src);
} H5E_END_TRY;
return 1;
} /* end test_copy_old_layout */
-
+
/*-------------------------------------------------------------------------
* Function: test_copy_dataset_compact_named_vl
*
@@ -7797,21 +8063,21 @@ test_copy_dataset_compact_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
error:
H5E_BEGIN_TRY {
- H5Pclose(pid);
- H5Dclose(did2);
- H5Dclose(did);
+ H5Pclose(pid);
+ H5Dclose(did2);
+ H5Dclose(did);
H5Dvlen_reclaim(tid_copy, sid, H5P_DEFAULT, buf);
- H5Pclose(dxpl_id);
- H5Tclose(tid);
- H5Tclose(tid_copy);
- H5Sclose(sid);
- H5Fclose(fid_dst);
- H5Fclose(fid_src);
+ H5Pclose(dxpl_id);
+ H5Tclose(tid);
+ H5Tclose(tid_copy);
+ H5Sclose(sid);
+ H5Fclose(fid_dst);
+ H5Fclose(fid_src);
} H5E_END_TRY;
return 1;
} /* end test_copy_dataset_compact_named_vl */
-
+
/*-------------------------------------------------------------------------
* Function: test_copy_dataset_contig_named_vl
*
@@ -7944,26 +8210,29 @@ test_copy_dataset_contig_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl
error:
H5E_BEGIN_TRY {
- H5Dclose(did2);
- H5Dclose(did);
+ H5Dclose(did2);
+ H5Dclose(did);
H5Dvlen_reclaim(tid_copy, sid, H5P_DEFAULT, buf);
- H5Pclose(dxpl_id);
- H5Tclose(tid);
- H5Tclose(tid_copy);
- H5Sclose(sid);
- H5Fclose(fid_dst);
- H5Fclose(fid_src);
+ H5Pclose(dxpl_id);
+ H5Tclose(tid);
+ H5Tclose(tid_copy);
+ H5Sclose(sid);
+ H5Fclose(fid_dst);
+ H5Fclose(fid_src);
} H5E_END_TRY;
return 1;
} /* end test_copy_dataset_contig_named_vl */
-
+
/*-------------------------------------------------------------------------
* Function: test_copy_dataset_chunked_named_vl
*
* Purpose: Create a dataset that uses a named variable length datatype
* in SRC file and copy it to DST file
*
+ * Note: The parameter "test_open" is added to test for H5Ocopy when
+ * the dataset is open in the file (HDFFV-7853).
+ *
* Return: Success: 0
* Failure: number of errors
*
@@ -7973,7 +8242,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_copy_dataset_chunked_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
+test_copy_dataset_chunked_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, hbool_t test_open)
{
hid_t fid_src = -1, fid_dst = -1; /* File IDs */
hid_t tid = -1, tid_copy=-1; /* Datatype ID */
@@ -7988,7 +8257,11 @@ test_copy_dataset_chunked_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
- TESTING("H5Ocopy(): chunked dataset with named VLEN datatype");
+ if(test_open) {
+ TESTING("H5Ocopy(): chunked and opened dataset with named VLEN datatype");
+ } else {
+ TESTING("H5Ocopy(): chunked dataset with named VLEN datatype");
+ }
/* set initial data values */
for(i = 0; i < DIM_SIZE_1; i++) {
@@ -8039,15 +8312,18 @@ test_copy_dataset_chunked_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
/* close the datatype */
if(H5Tclose(tid) < 0) TEST_ERROR
- /* close the dataset */
- if(H5Dclose(did) < 0) TEST_ERROR
+ if(!test_open) {
- /* close the SRC file */
- if(H5Fclose(fid_src) < 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
+
+ /* 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
@@ -8058,8 +8334,10 @@ test_copy_dataset_chunked_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
/* copy the dataset from SRC to DST */
if(H5Ocopy(fid_src, NAME_DATASET_VL, fid_dst, NAME_DATASET_VL, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
- /* open the dataset for copy */
- if((did = H5Dopen2(fid_src, NAME_DATASET_VL, H5P_DEFAULT)) < 0) TEST_ERROR
+ if(!test_open) {
+ /* open the dataset for copy */
+ if((did = H5Dopen2(fid_src, NAME_DATASET_VL, H5P_DEFAULT)) < 0) TEST_ERROR
+ }
/* open the destination dataset */
if((did2 = H5Dopen2(fid_dst, NAME_DATASET_VL, H5P_DEFAULT)) < 0) TEST_ERROR
@@ -8099,21 +8377,21 @@ test_copy_dataset_chunked_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
error:
H5E_BEGIN_TRY {
- H5Pclose(pid);
- H5Dclose(did2);
- H5Dclose(did);
+ H5Pclose(pid);
+ H5Dclose(did2);
+ H5Dclose(did);
H5Dvlen_reclaim(tid_copy, sid, H5P_DEFAULT, buf);
- H5Pclose(dxpl_id);
- H5Tclose(tid);
- H5Tclose(tid_copy);
- H5Sclose(sid);
- H5Fclose(fid_dst);
- H5Fclose(fid_src);
+ H5Pclose(dxpl_id);
+ H5Tclose(tid);
+ H5Tclose(tid_copy);
+ H5Sclose(sid);
+ H5Fclose(fid_dst);
+ H5Fclose(fid_src);
} H5E_END_TRY;
return 1;
} /* end test_copy_dataset_chunked_named_vl */
-
+
/*-------------------------------------------------------------------------
* Function: test_copy_dataset_compressed_named_vl
*
@@ -8256,21 +8534,21 @@ test_copy_dataset_compressed_named_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_
error:
H5E_BEGIN_TRY {
- H5Pclose(pid);
- H5Dclose(did2);
- H5Dclose(did);
+ H5Pclose(pid);
+ H5Dclose(did2);
+ H5Dclose(did);
H5Dvlen_reclaim(tid_copy, sid, H5P_DEFAULT, buf);
- H5Pclose(dxpl_id);
- H5Tclose(tid);
- H5Tclose(tid_copy);
- H5Sclose(sid);
- H5Fclose(fid_dst);
- H5Fclose(fid_src);
+ H5Pclose(dxpl_id);
+ H5Tclose(tid);
+ H5Tclose(tid_copy);
+ H5Sclose(sid);
+ H5Fclose(fid_dst);
+ H5Fclose(fid_src);
} H5E_END_TRY;
return 1;
} /* end test_copy_dataset_compressed_named_vl */
-
+
/*-------------------------------------------------------------------------
* Function: test_copy_dataset_compact_vl_vl
*
@@ -8419,27 +8697,30 @@ test_copy_dataset_compact_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
error:
H5E_BEGIN_TRY {
- H5Dclose(did2);
- H5Dclose(did);
+ H5Dclose(did2);
+ H5Dclose(did);
H5Dvlen_reclaim(tid2, sid, H5P_DEFAULT, buf);
- H5Pclose(dxpl_id);
- H5Pclose(pid);
- H5Tclose(tid);
- H5Tclose(tid2);
- H5Sclose(sid);
- H5Fclose(fid_dst);
- H5Fclose(fid_src);
+ H5Pclose(dxpl_id);
+ H5Pclose(pid);
+ H5Tclose(tid);
+ H5Tclose(tid2);
+ H5Sclose(sid);
+ H5Fclose(fid_dst);
+ H5Fclose(fid_src);
} H5E_END_TRY;
return 1;
} /* end test_copy_dataset_compact_vl_vl */
-
+
/*-------------------------------------------------------------------------
* Function: test_copy_dataset_contig_vl_vl
*
* Purpose: Create a compact dataset w/nested VLEN datatype
* in SRC file and copy it to DST file
*
+ * Note: The parameter "test_open" is added to test for H5Ocopy when
+ * the dataset is open in the file (HDFFV-7853).
+ *
* Return: Success: 0
* Failure: number of errors
*
@@ -8449,7 +8730,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_copy_dataset_contig_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
+test_copy_dataset_contig_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, hbool_t test_open)
{
hid_t fid_src = -1, fid_dst = -1; /* File IDs */
hid_t tid=-1, tid2=-1; /* Datatype ID */
@@ -8464,7 +8745,11 @@ test_copy_dataset_contig_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
- TESTING("H5Ocopy(): contigous dataset with nested VLEN datatype");
+ if(test_open) {
+ TESTING("H5Ocopy(): contigous and opened dataset with nested VLEN datatype");
+ } else {
+ TESTING("H5Ocopy(): contigous dataset with nested VLEN datatype");
+ }
/* set initial data values */
for(i=0; i<DIM_SIZE_1; i++) {
@@ -8521,15 +8806,17 @@ test_copy_dataset_contig_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h
/* close compact plist */
if(H5Pclose(pid) < 0) TEST_ERROR
- /* close the dataset */
- if(H5Dclose(did) < 0) TEST_ERROR
+ if(!test_open) {
+ /* close the dataset */
+ if(H5Dclose(did) < 0) TEST_ERROR
- /* close the SRC file */
- if(H5Fclose(fid_src) < 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
+ /* 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
@@ -8540,8 +8827,10 @@ test_copy_dataset_contig_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h
/* copy the dataset from SRC to DST */
if(H5Ocopy(fid_src, NAME_DATASET_VL_VL, fid_dst, NAME_DATASET_VL_VL, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
- /* open the dataset for copy */
- if((did = H5Dopen2(fid_src, NAME_DATASET_VL_VL, H5P_DEFAULT)) < 0) TEST_ERROR
+ if(!test_open) {
+ /* open the dataset for copy */
+ if((did = H5Dopen2(fid_src, NAME_DATASET_VL_VL, H5P_DEFAULT)) < 0) TEST_ERROR
+ }
/* open the destination dataset */
if((did2 = H5Dopen2(fid_dst, NAME_DATASET_VL_VL, H5P_DEFAULT)) < 0) TEST_ERROR
@@ -8581,21 +8870,21 @@ test_copy_dataset_contig_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, h
error:
H5E_BEGIN_TRY {
- H5Dclose(did2);
- H5Dclose(did);
+ H5Dclose(did2);
+ H5Dclose(did);
H5Dvlen_reclaim(tid2, sid, H5P_DEFAULT, buf);
- H5Pclose(dxpl_id);
- H5Pclose(pid);
- H5Tclose(tid);
- H5Tclose(tid2);
- H5Sclose(sid);
- H5Fclose(fid_dst);
- H5Fclose(fid_src);
+ H5Pclose(dxpl_id);
+ H5Pclose(pid);
+ H5Tclose(tid);
+ H5Tclose(tid2);
+ H5Sclose(sid);
+ H5Fclose(fid_dst);
+ H5Fclose(fid_src);
} H5E_END_TRY;
return 1;
} /* end test_copy_dataset_contig_vl_vl */
-
+
/*-------------------------------------------------------------------------
* Function: test_copy_dataset_chunked_vl_vl
*
@@ -8614,7 +8903,7 @@ static int
test_copy_dataset_chunked_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
{
hid_t fid_src = -1, fid_dst = -1; /* File IDs */
- hid_t tid = -1, tid2=-1; /* Datatype ID */
+ hid_t tid = -1, tid2=-1; /* Datatype ID */
hid_t sid = -1; /* Dataspace ID */
hid_t pid = -1; /* Dataset creation property list ID */
hid_t did = -1, did2 = -1; /* Dataset IDs */
@@ -8782,27 +9071,30 @@ test_copy_dataset_chunked_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
error:
H5E_BEGIN_TRY {
- H5Pclose(pid);
- H5Dclose(did2);
- H5Dclose(did);
+ H5Pclose(pid);
+ H5Dclose(did2);
+ H5Dclose(did);
H5Dvlen_reclaim(tid2, sid, H5P_DEFAULT, buf);
- H5Pclose(dxpl_id);
- H5Tclose(tid);
- H5Tclose(tid2);
- H5Sclose(sid);
- H5Fclose(fid_dst);
- H5Fclose(fid_src);
+ H5Pclose(dxpl_id);
+ H5Tclose(tid);
+ H5Tclose(tid2);
+ H5Sclose(sid);
+ H5Fclose(fid_dst);
+ H5Fclose(fid_src);
} H5E_END_TRY;
return 1;
} /* end test_copy_dataset_chunked_vl_vl */
-
+
/*-------------------------------------------------------------------------
* Function: test_copy_dataset_compressed_vl_vl
*
* Purpose: Create a dataset that uses a named variable length datatype
* in SRC file and copy it to DST file
*
+ * Note: The parameter "test_open" is added to test for H5Ocopy when
+ * the dataset is open in the file (HDFFV-7853).
+ *
* Return: Success: 0
* Failure: number of errors
*
@@ -8812,7 +9104,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-test_copy_dataset_compressed_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
+test_copy_dataset_compressed_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl, hbool_t test_open)
{
hid_t fid_src = -1, fid_dst = -1; /* File IDs */
hid_t tid = -1, tid2=-1; /* Datatype ID */
@@ -8828,7 +9120,11 @@ test_copy_dataset_compressed_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
- TESTING("H5Ocopy(): compressed dataset with nested VLEN datatype");
+ if(test_open) {
+ TESTING("H5Ocopy(): compressed and opened dataset with nested VLEN datatype");
+ } else {
+ TESTING("H5Ocopy(): compressed dataset with nested VLEN datatype");
+ }
/* set initial data values */
for(i=0; i<DIM_SIZE_1; i++) {
@@ -8886,15 +9182,18 @@ test_copy_dataset_compressed_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
/* close compact plist */
if(H5Pclose(pid) < 0) TEST_ERROR
- /* close the dataset */
- if(H5Dclose(did) < 0) TEST_ERROR
+ if(!test_open) {
- /* close the SRC file */
- if(H5Fclose(fid_src) < 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
+
+ /* 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
@@ -8904,8 +9203,10 @@ test_copy_dataset_compressed_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
/* copy the dataset from SRC to DST */
if(H5Ocopy(fid_src, NAME_DATASET_VL_VL, fid_dst, NAME_DATASET_VL_VL, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
- /* open the dataset for copy */
- if((did = H5Dopen2(fid_src, NAME_DATASET_VL_VL, H5P_DEFAULT)) < 0) TEST_ERROR
+ if(!test_open) {
+ /* open the dataset for copy */
+ if((did = H5Dopen2(fid_src, NAME_DATASET_VL_VL, H5P_DEFAULT)) < 0) TEST_ERROR
+ }
/* open the destination dataset */
if((did2 = H5Dopen2(fid_dst, NAME_DATASET_VL_VL, H5P_DEFAULT)) < 0) TEST_ERROR
@@ -8946,16 +9247,16 @@ test_copy_dataset_compressed_vl_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fap
error:
H5E_BEGIN_TRY {
- H5Pclose(pid);
- H5Dclose(did2);
- H5Dclose(did);
+ H5Pclose(pid);
+ H5Dclose(did2);
+ H5Dclose(did);
H5Dvlen_reclaim(tid2, sid, H5P_DEFAULT, buf);
- H5Pclose(dxpl_id);
- H5Tclose(tid);
- H5Tclose(tid2);
- H5Sclose(sid);
- H5Fclose(fid_dst);
- H5Fclose(fid_src);
+ H5Pclose(dxpl_id);
+ H5Tclose(tid);
+ H5Tclose(tid2);
+ H5Sclose(sid);
+ H5Fclose(fid_dst);
+ H5Fclose(fid_src);
} H5E_END_TRY;
return 1;
} /* end test_copy_dataset_compressed_vl_vl */
@@ -8969,7 +9270,7 @@ typedef struct cmpd_vl_t {
double c;
} cmpd_vl_t;
-
+
/*-------------------------------------------------------------------------
* Function: test_copy_dataset_contig_cmpd_vl
*
@@ -9102,20 +9403,20 @@ test_copy_dataset_contig_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
error:
H5E_BEGIN_TRY {
- H5Dclose(did2);
- H5Dclose(did);
+ H5Dclose(did2);
+ H5Dclose(did);
H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf);
H5Pclose(dxpl_id);
H5Tclose(tid2);
- H5Tclose(tid);
- H5Sclose(sid);
- H5Fclose(fid_dst);
- H5Fclose(fid_src);
+ H5Tclose(tid);
+ H5Sclose(sid);
+ H5Fclose(fid_dst);
+ H5Fclose(fid_src);
} H5E_END_TRY;
return 1;
} /* end test_copy_dataset_contig_cmpd_vl */
-
+
/*-------------------------------------------------------------------------
* Function: test_copy_dataset_chunked_cmpd_vl
*
@@ -9255,21 +9556,21 @@ test_copy_dataset_chunked_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl
error:
H5E_BEGIN_TRY {
- H5Dclose(did2);
- H5Dclose(did);
+ H5Dclose(did2);
+ H5Dclose(did);
H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf);
H5Pclose(dxpl_id);
H5Pclose(pid);
H5Tclose(tid2);
- H5Tclose(tid);
- H5Sclose(sid);
- H5Fclose(fid_dst);
- H5Fclose(fid_src);
+ H5Tclose(tid);
+ H5Sclose(sid);
+ H5Fclose(fid_dst);
+ H5Fclose(fid_src);
} H5E_END_TRY;
return 1;
} /* end test_copy_dataset_chunked_cmpd_vl */
-
+
/*-------------------------------------------------------------------------
* Function: test_copy_dataset_compact_cmpd_vl
*
@@ -9408,21 +9709,21 @@ test_copy_dataset_compact_cmpd_vl(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl
error:
H5E_BEGIN_TRY {
- H5Dclose(did2);
- H5Dclose(did);
+ H5Dclose(did2);
+ H5Dclose(did);
H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf);
- H5Pclose(dxpl_id);
- H5Pclose(pid);
+ H5Pclose(dxpl_id);
+ H5Pclose(pid);
H5Tclose(tid2);
- H5Tclose(tid);
- H5Sclose(sid);
- H5Fclose(fid_dst);
- H5Fclose(fid_src);
+ H5Tclose(tid);
+ H5Sclose(sid);
+ H5Fclose(fid_dst);
+ H5Fclose(fid_src);
} H5E_END_TRY;
return 1;
} /* end test_copy_dataset_compact_cmpd_vl */
-
+
/*-------------------------------------------------------------------------
* Function: test_copy_null_ref
*
@@ -9584,7 +9885,190 @@ error:
return 1;
} /* end test_copy_null_ref */
-
+
+/*-------------------------------------------------------------------------
+ * Function: test_copy_null_ref_open
+ *
+ * Purpose: Creates 2 datasets with references, one with object and
+ * the other with region references. Copies these datasets
+ * to a new file without expanding references, causing them
+ * to become NULL. Next, copies these references to a third
+ * file with expanding references, to verify that NULL
+ * references are handled correctly.
+ *
+ * Note: this is copied from test_copy_null_ref() with modifications
+ * to test for opened datasets in the files.
+ *
+ * Return: Success: 0
+ * Failure: number of errors
+ *
+ * Programmer: Neil Fortner
+ * Wednesday, March 31, 2010
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+test_copy_null_ref_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl)
+{
+ hid_t fid1 = -1, fid2 = -1, fid3 = -1; /* File IDs */
+ hid_t sid = -1; /* Dataspace ID */
+ hid_t pid = -1; /* Object copy property list ID */
+ hid_t did1 = -1, did2 = -1; /* Dataset IDs */
+ hid_t did3 = -1, did4 = -1; /* Dataset IDs */
+ hid_t did5 = -1, did6 = -1; /* Dataset IDs */
+ hid_t dcpl = -1; /* Dataset creation property list */
+ hsize_t chunk_dim1d[1] = {2}; /* Chunk dimensions */
+ hsize_t dim1d[1] = {3}; /* Dataset dimensions */
+ hobj_ref_t obj_buf[3]; /* Buffer for object refs */
+ hdset_reg_ref_t reg_buf[3]; /* Buffer for region refs */
+ char zeros[MAX(sizeof(obj_buf),sizeof(reg_buf))]; /* Array of zeros, for memcmp */
+ char src_filename[NAME_BUF_SIZE];
+ char mid_filename[NAME_BUF_SIZE];
+ char dst_filename[NAME_BUF_SIZE];
+
+ TESTING("H5Ocopy(): NULL references for opened datasets");
+
+ /* Initialize "zeros" array */
+ HDmemset(zeros, 0, sizeof(zeros));
+
+ /* Initialize the filenames */
+ h5_fixname(FILENAME[0], src_fapl, src_filename, sizeof src_filename);
+ h5_fixname(FILENAME[1], src_fapl, mid_filename, sizeof mid_filename);
+ h5_fixname(FILENAME[2], dst_fapl, dst_filename, sizeof dst_filename);
+
+ /* Reset file address checking info */
+ addr_reset();
+
+ /* Create source file */
+ if((fid1 = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0)
+ TEST_ERROR
+
+ /* Create dataspace */
+ if((sid = H5Screate_simple(1, dim1d, NULL)) < 0) TEST_ERROR
+
+ /* create and set chunk plist */
+ if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) TEST_ERROR
+ if(H5Pset_chunk(dcpl, 1, chunk_dim1d) < 0) TEST_ERROR
+ if(H5Pset_deflate(dcpl, 9) < 0) TEST_ERROR
+ if(H5Pset_chunk_opts(dcpl, H5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS) < 0) TEST_ERROR
+
+ /* Create object reference dataset at SRC file */
+ if((did1 = H5Dcreate2(fid1, "obj_ref_dset", H5T_STD_REF_OBJ, sid,
+ H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) TEST_ERROR
+
+ /* Create region reference dataset at SRC file */
+ if((did2 = H5Dcreate2(fid1, "reg_ref_dset", H5T_STD_REF_DSETREG,
+ sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) TEST_ERROR
+
+ /* Create references */
+ if(H5Rcreate(&obj_buf[0], did1, ".", H5R_OBJECT, (hid_t)-1) < 0) TEST_ERROR
+ if(H5Rcreate(&obj_buf[1], did2, ".", H5R_OBJECT, (hid_t)-1) < 0) TEST_ERROR
+ if(H5Rcreate(&reg_buf[0], did1, ".", H5R_DATASET_REGION, sid) < 0)
+ TEST_ERROR
+ if(H5Rcreate(&reg_buf[1], did2, ".", H5R_DATASET_REGION, sid) < 0)
+ TEST_ERROR
+
+ /* Write data into file */
+ if(H5Dwrite(did1, H5T_STD_REF_OBJ, H5S_ALL, H5S_ALL, H5P_DEFAULT, obj_buf)
+ < 0) TEST_ERROR
+ if(H5Dwrite(did2, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT,
+ reg_buf) < 0) TEST_ERROR
+
+
+ /* Create middle file */
+ if((fid2 = H5Fcreate(mid_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0)
+ TEST_ERROR
+
+ /* Copy the source file to the middle file. Note the expand references
+ * flag is not set. */
+ if(H5Ocopy(fid1, "/", fid2, "/A", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
+
+ /* Close datasets in source file */
+ if(H5Dclose(did1) < 0) TEST_ERROR
+ if(H5Dclose(did2) < 0) TEST_ERROR
+
+ /* Close source file */
+ if(H5Fclose(fid1) < 0) TEST_ERROR
+
+ /* Open copied datasets */
+ if((did3 = H5Dopen2(fid2, "/A/obj_ref_dset", H5P_DEFAULT)) < 0) TEST_ERROR
+ if((did4 = H5Dopen2(fid2, "/A/reg_ref_dset", H5P_DEFAULT)) < 0) TEST_ERROR
+
+ /* Read copied datasets */
+ if(H5Dread(did3, H5T_STD_REF_OBJ, H5S_ALL, H5S_ALL, H5P_DEFAULT, obj_buf)
+ < 0) TEST_ERROR
+ if(H5Dread(did4, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT,
+ reg_buf) < 0) TEST_ERROR
+
+ /* Verify that the references contain only "0" bytes */
+ if(HDmemcmp(obj_buf, zeros, sizeof(obj_buf))) TEST_ERROR
+ if(HDmemcmp(reg_buf, zeros, sizeof(reg_buf))) TEST_ERROR
+
+ /* Create destination file */
+ if((fid3 = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0)
+ TEST_ERROR
+
+ /* Create object copy property list */
+ if((pid = H5Pcreate(H5P_OBJECT_COPY)) < 0) TEST_ERROR
+
+ /* Set the "expand references" flag */
+ if(H5Pset_copy_object(pid, H5O_COPY_EXPAND_REFERENCE_FLAG) < 0) TEST_ERROR
+
+ /* Copy the middle file to the destination file. Note the expand references
+ * flag *is* set, even though the references are now NULL. */
+ if(H5Ocopy(fid2, "/", fid3, "/AA", pid, H5P_DEFAULT) < 0) TEST_ERROR
+
+ /* Close datasets in middle file */
+ if(H5Dclose(did3) < 0) TEST_ERROR
+ if(H5Dclose(did4) < 0) TEST_ERROR
+
+ /* Close the middle file */
+ if(H5Fclose(fid2) < 0) TEST_ERROR
+
+ /* Open copied datasets */
+ if((did5 = H5Dopen2(fid3, "/AA/A/obj_ref_dset", H5P_DEFAULT)) < 0) TEST_ERROR
+ if((did6 = H5Dopen2(fid3, "/AA/A/reg_ref_dset", H5P_DEFAULT)) < 0) TEST_ERROR
+
+ /* Read copied datasets */
+ if(H5Dread(did5, H5T_STD_REF_OBJ, H5S_ALL, H5S_ALL, H5P_DEFAULT, obj_buf)
+ < 0) TEST_ERROR
+ if(H5Dread(did6, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT,
+ reg_buf) < 0) TEST_ERROR
+
+ /* Verify that the references contain only "0" bytes */
+ if(HDmemcmp(obj_buf, zeros, sizeof(obj_buf))) TEST_ERROR
+ if(HDmemcmp(reg_buf, zeros, sizeof(reg_buf))) TEST_ERROR
+
+ /* Close */
+ if(H5Pclose(pid) < 0) TEST_ERROR
+ if(H5Pclose(dcpl) < 0) TEST_ERROR
+ if(H5Dclose(did5) < 0) TEST_ERROR
+ if(H5Dclose(did6) < 0) TEST_ERROR
+ if(H5Fclose(fid3) < 0) TEST_ERROR
+ if(H5Sclose(sid) < 0) TEST_ERROR
+
+ PASSED();
+ return 0;
+
+error:
+ H5E_BEGIN_TRY {
+ H5Pclose(pid);
+ H5Pclose(dcpl);
+ H5Sclose(sid);
+ H5Dclose(did1);
+ H5Dclose(did2);
+ H5Dclose(did3);
+ H5Dclose(did4);
+ H5Dclose(did5);
+ H5Dclose(did6);
+ H5Fclose(fid1);
+ H5Fclose(fid2);
+ H5Fclose(fid3);
+ } H5E_END_TRY;
+ return 1;
+} /* end test_copy_null_ref_open */
+
+
/*-------------------------------------------------------------------------
* Function: test_copy_attr_crt_order
*
@@ -9706,7 +10190,7 @@ error:
return 1;
} /* end test_copy_attr_crt_order */
-
+
/*-------------------------------------------------------------------------
* Function: test_copy_committed_datatype_merge
*
@@ -9943,7 +10427,7 @@ error:
return 1;
} /* end test_copy_committed_datatype_merge */
-
+
/*-------------------------------------------------------------------------
* Function: test_copy_committed_datatype_merge_same_file
*
@@ -10215,7 +10699,7 @@ error:
} /* end test_copy_committed_datatype_merge_same_file */
-
+
/*-------------------------------------------------------------------------
* Function: test_copy_committed_dt_merge_sugg
*
@@ -10444,7 +10928,7 @@ error:
return 1;
} /* end test_copy_committed_dt_merge_sugg */
-
+
/*-------------------------------------------------------------------------
* Function: test_copy_committed_dt_merge_attr
*
@@ -10637,27 +11121,27 @@ error:
#define ROOT_NDT_INT "root_ndt_int"
#define GROUP_NDT_SHORT "group_ndt_short"
-#define SRC_GRP "src_grp"
-#define DST_GRP "dst_grp"
-#define DST_GRP2 "dst_grp2"
+#define SRC_GRP "src_grp"
+#define DST_GRP "dst_grp"
+#define DST_GRP2 "dst_grp2"
-#define SRC_NDT_SHORT "src_ndt_short"
-#define SRC_NDT_INT "src_ndt_int"
-#define SRC_NDT_INT2 "src_ndt_int2"
-#define SRC_NDT_FLOAT "src_ndt_float"
-#define SRC_NDT_DOUBLE "src_ndt_double"
+#define SRC_NDT_SHORT "src_ndt_short"
+#define SRC_NDT_INT "src_ndt_int"
+#define SRC_NDT_INT2 "src_ndt_int2"
+#define SRC_NDT_FLOAT "src_ndt_float"
+#define SRC_NDT_DOUBLE "src_ndt_double"
-#define DST_NDT_SHORT "dst_ndt_short"
-#define DST_NDT_INT "dst_ndt_int"
-#define DST_NDT_FLOAT "dst_ndt_float"
-#define DST_NDT_DOUBLE "dst_ndt_double"
+#define DST_NDT_SHORT "dst_ndt_short"
+#define DST_NDT_INT "dst_ndt_int"
+#define DST_NDT_FLOAT "dst_ndt_float"
+#define DST_NDT_DOUBLE "dst_ndt_double"
-#define SRC_NDT_DSET "src_ndt_dset"
-#define SRC_NDT_DSET2 "src_ndt_dset2"
-#define SRC_NDT_DSET3 "src_ndt_dset3"
+#define SRC_NDT_DSET "src_ndt_dset"
+#define SRC_NDT_DSET2 "src_ndt_dset2"
+#define SRC_NDT_DSET3 "src_ndt_dset3"
-#define SRC_DSET "src_dset"
-#define SRC_DSET1 "src_dset1"
+#define SRC_DSET "src_dset"
+#define SRC_DSET1 "src_dset1"
#define SRC_ATTR "src_attr"
@@ -10666,21 +11150,21 @@ error:
#define DST_ATTR "dst_attr"
#define DST_ATTR2 "dst_attr2"
-
+
/*-------------------------------------------------------------------------
* Function: test_copy_cdt_hier_merge
*
* Purpose: Tests the "merge committed datatypes" feature of H5Ocopy:
- * SRC file:
- * Create committed datatypes at / and /g0
- * Create datasets with native type and committed datatypes at /g0
- * DST file:
- * Create attributes with anonymous committed datatypes at /uncopied
+ * SRC file:
+ * Create committed datatypes at / and /g0
+ * Create datasets with native type and committed datatypes at /g0
+ * DST file:
+ * Create attributes with anonymous committed datatypes at /uncopied
*
- * Copy / at SRC to DST
- * Copy /g0 at SRC to DST
- * Copy the datasets in /g0 at SRC to DST /uncopied
- * Verify that committed datatypes are copied and merged correctly
+ * Copy / at SRC to DST
+ * Copy /g0 at SRC to DST
+ * Copy the datasets in /g0 at SRC to DST /uncopied
+ * Verify that committed datatypes are copied and merged correctly
*
* Return: Success: 0
* Failure: number of errors
@@ -10696,19 +11180,19 @@ test_copy_cdt_hier_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d
hid_t tid = -1; /* Datatype ID */
hid_t sid = -1; /* Dataspace ID */
hid_t did = -1; /* Dataset ID */
- hid_t gid = -1; /* Group IDs */
- hid_t f_tid = -1; /* Datatype ID for root group */
- hid_t g_tid = -1; /* Datatype ID for group */
- hid_t anon_tid = -1; /* Anonymous datatype */
- hid_t aid = -1; /* Attribute ID */
+ hid_t gid = -1; /* Group IDs */
+ hid_t f_tid = -1; /* Datatype ID for root group */
+ hid_t g_tid = -1; /* Datatype ID for group */
+ hid_t anon_tid = -1; /* Anonymous datatype */
+ hid_t aid = -1; /* Attribute ID */
hid_t ocpypl_id = -1; /* Object copy plist ID */
- int i; /* Local index variable */
- hsize_t dim1d[1]; /* dimension sizes */
- int buf[DIM_SIZE_1]; /* Buffer for data */
- haddr_t exp_addr_int, exp_addr_short; /* Expected object addresses */
+ int i; /* Local index variable */
+ hsize_t dim1d[1]; /* dimension sizes */
+ int buf[DIM_SIZE_1]; /* Buffer for data */
+ haddr_t exp_addr_int, exp_addr_short; /* Expected object addresses */
H5O_info_t oinfo; /* Object info */
- char src_filename[NAME_BUF_SIZE]; /* Source file name */
- char dst_filename[NAME_BUF_SIZE]; /* Destination file name */
+ char src_filename[NAME_BUF_SIZE]; /* Source file name */
+ char dst_filename[NAME_BUF_SIZE]; /* Destination file name */
if(reopen)
TESTING("H5Ocopy(): hier. of committed datatypes and merging with reopen")
@@ -10726,8 +11210,8 @@ test_copy_cdt_hier_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d
/* Reset file address checking info */
addr_reset();
- /*
- * Populate source file
+ /*
+ * Populate source file
*/
if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) TEST_ERROR
@@ -10785,8 +11269,8 @@ test_copy_cdt_hier_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d
/* close the SRC file */
if(H5Fclose(fid_src) < 0) TEST_ERROR
- /*
- * Populate destination file
+ /*
+ * Populate destination file
*/
if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) TEST_ERROR
@@ -10799,7 +11283,7 @@ test_copy_cdt_hier_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d
/* create attribute of anon ndt (short) in /uncopied */
if((aid = H5Acreate2(gid, DST_ATTR_ANON_SHORT, anon_tid, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR
/* close the attribute */
if(H5Aclose(aid) < 0) TEST_ERROR
@@ -10813,7 +11297,7 @@ test_copy_cdt_hier_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d
/* create attribute of anon ndt (int) in /uncopied */
if((aid = H5Acreate2(gid, DST_ATTR_ANON_INT, anon_tid, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
- TEST_ERROR
+ TEST_ERROR
/* close the attribute */
if(H5Aclose(aid) < 0) TEST_ERROR
@@ -10974,17 +11458,17 @@ test_copy_cdt_hier_merge(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t d
error:
H5E_BEGIN_TRY {
- H5Tclose(tid);
- H5Tclose(f_tid);
- H5Tclose(g_tid);
- H5Tclose(anon_tid);
- H5Pclose(ocpypl_id);
- H5Aclose(aid);
- H5Dclose(did);
- H5Sclose(sid);
- H5Gclose(gid);
- H5Fclose(fid_dst);
- H5Fclose(fid_src);
+ H5Tclose(tid);
+ H5Tclose(f_tid);
+ H5Tclose(g_tid);
+ H5Tclose(anon_tid);
+ H5Pclose(ocpypl_id);
+ H5Aclose(aid);
+ H5Dclose(did);
+ H5Sclose(sid);
+ H5Gclose(gid);
+ H5Fclose(fid_dst);
+ H5Fclose(fid_src);
} H5E_END_TRY;
return 1;
} /* end test_copy_cdt_hier_merge */
@@ -10994,22 +11478,22 @@ error:
* Function: test_copy_cdt_merge_cdt
*
* Purpose: Tests the "merge committed datatypes" feature of H5Ocopy:
- * SRC file:
- * Create committed datatype (short)
- * Create committed datatype (float)
- * Create committed datatype (int), with attribute of ndt int
- * Create committed datatype (double), with attribute of anon ndt short
- * DST file:
- * Create committed datatype (int)
- * Create committed datatype (float), with attribute of native int
- * Create committed datatype (double), with attribute of anon ndt short
- *
- * Copy / at SRC to DST
- * Verify that committed datatypes are copied and merged correctly
- *
- * NOTE:
- * Comparison of attributes are not implemented yet.
- * Further tests will be added in the future.
+ * SRC file:
+ * Create committed datatype (short)
+ * Create committed datatype (float)
+ * Create committed datatype (int), with attribute of ndt int
+ * Create committed datatype (double), with attribute of anon ndt short
+ * DST file:
+ * Create committed datatype (int)
+ * Create committed datatype (float), with attribute of native int
+ * Create committed datatype (double), with attribute of anon ndt short
+ *
+ * Copy / at SRC to DST
+ * Verify that committed datatypes are copied and merged correctly
+ *
+ * NOTE:
+ * Comparison of attributes are not implemented yet.
+ * Further tests will be added in the future.
*
* Return: Success: 0
* Failure: number of errors
@@ -11024,15 +11508,15 @@ test_copy_cdt_merge_cdt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t ds
hid_t fid_src = -1, fid_dst = -1; /* File IDs */
hid_t tid1 = -1, tid2 = -1; /* Datatype IDs */
hid_t tid3 = -1, tid4 = -1; /* Datatype IDs */
- hid_t tid5 = -1, tid = -1; /* Datatype IDs */
+ hid_t tid5 = -1, tid = -1; /* Datatype IDs */
hid_t sid = -1; /* Dataspace ID */
- hid_t aid = -1; /* Attribute ID */
+ hid_t aid = -1; /* Attribute ID */
hid_t ocpypl_id = -1; /* Object copy plist ID */
- hsize_t dim1d[1]; /* dimension sizes */
+ hsize_t dim1d[1]; /* dimension sizes */
H5O_info_t oinfo; /* Object info */
- haddr_t exp_addr; /* Expected object addresses */
- char src_filename[NAME_BUF_SIZE]; /* Source file name */
- char dst_filename[NAME_BUF_SIZE]; /* Destination file name */
+ haddr_t exp_addr; /* Expected object addresses */
+ char src_filename[NAME_BUF_SIZE]; /* Source file name */
+ char dst_filename[NAME_BUF_SIZE]; /* Destination file name */
if(reopen)
TESTING("H5Ocopy(): merging various committed datatypes with reopen")
@@ -11046,8 +11530,8 @@ test_copy_cdt_merge_cdt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t ds
/* Reset file address checking info */
addr_reset();
- /*
- * Populate source file
+ /*
+ * Populate source file
*/
if((fid_src = H5Fcreate(src_filename, H5F_ACC_TRUNC, fcpl_src, src_fapl)) < 0) TEST_ERROR
@@ -11097,8 +11581,8 @@ test_copy_cdt_merge_cdt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t ds
/* close the SRC file */
if(H5Fclose(fid_src) < 0) TEST_ERROR
- /*
- * Populate destination file
+ /*
+ * Populate destination file
*/
if((fid_dst = H5Fcreate(dst_filename, H5F_ACC_TRUNC, fcpl_dst, dst_fapl)) < 0) TEST_ERROR
@@ -11153,8 +11637,8 @@ test_copy_cdt_merge_cdt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t ds
/* copy everything in SRC to DST */
if(H5Ocopy(fid_src, "/", fid_dst, SRC_ROOT_GROUP, ocpypl_id, H5P_DEFAULT) < 0) TEST_ERROR
- /*
- * Verification
+ /*
+ * Verification
*/
/* get address of committed datatype: /src_root/src_ndt_double */
if((tid = H5Topen2(fid_dst, "/" SRC_ROOT_GROUP "/" SRC_NDT_DOUBLE, H5P_DEFAULT)) < 0) TEST_ERROR
@@ -11218,29 +11702,29 @@ test_copy_cdt_merge_cdt(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t ds
error:
H5E_BEGIN_TRY {
- H5Pclose(ocpypl_id);
- H5Tclose(tid);
- H5Tclose(tid1);
- H5Tclose(tid2);
- H5Tclose(tid3);
- H5Tclose(tid4);
- H5Tclose(tid5);
- H5Aclose(aid);
- H5Sclose(sid);
- H5Fclose(fid_dst);
- H5Fclose(fid_src);
+ H5Pclose(ocpypl_id);
+ H5Tclose(tid);
+ H5Tclose(tid1);
+ H5Tclose(tid2);
+ H5Tclose(tid3);
+ H5Tclose(tid4);
+ H5Tclose(tid5);
+ H5Aclose(aid);
+ H5Sclose(sid);
+ H5Fclose(fid_dst);
+ H5Fclose(fid_src);
} H5E_END_TRY;
return 1;
} /* end test_copy_cdt_merge_cdt */
-
+
/*-------------------------------------------------------------------------
* Function: test_copy_cdt_merge_suggs
*
* Purpose: Tests the suggested searching paths feature (H5Padd_merge_committed_dtype_path)
- * is correctly applied in merging the committed datatypes.
- *
+ * is correctly applied in merging the committed datatypes.
+ *
* Return: Success: 0
* Failure: number of errors
*
@@ -11309,7 +11793,7 @@ test_copy_cdt_merge_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
if(H5Fclose(fid_dst) < 0) TEST_ERROR
/*
- * Test 1
+ * Test 1
*/
/* open the source file with read-only */
if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) TEST_ERROR
@@ -11345,8 +11829,8 @@ test_copy_cdt_merge_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
/* close the DST file */
if(H5Fclose(fid_dst) < 0) TEST_ERROR
- /*
- * Test 2
+ /*
+ * Test 2
*/
/* open destination file */
if((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDWR, dst_fapl)) < 0) TEST_ERROR
@@ -11378,14 +11862,14 @@ test_copy_cdt_merge_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
/* close the DST file */
if(H5Fclose(fid_dst) < 0) TEST_ERROR
- /*
- * Test 3
+ /*
+ * Test 3
*/
/* open destination file */
if((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDWR, dst_fapl)) < 0) TEST_ERROR
/* remove "/uncopied/src_ndt_int" from DST file */
- if(H5Ldelete(fid_dst, NAME_GROUP_UNCOPIED "/" SRC_NDT_INT, H5P_DEFAULT) < 0) TEST_ERROR
+ if(H5Ldelete(fid_dst, NAME_GROUP_UNCOPIED "/" SRC_NDT_INT, H5P_DEFAULT) < 0) TEST_ERROR
/* copy "/src_ndt_int" from SRC file to "/uncopied/src_ndt_int" at DST file */
/* use default ocpypl_id -- without merging and suggestion */
@@ -11394,7 +11878,7 @@ test_copy_cdt_merge_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
/* copy "/src_ndt_int" from SRC file to "/src_ndt_int2" at DST file */
/* copy with merging and search suggestion: "/uncopied/src_ndt_int" */
if(H5Ocopy(fid_src, SRC_NDT_INT, fid_dst, SRC_NDT_INT2, ocpypl_id, H5P_DEFAULT) < 0) TEST_ERROR
-
+
if(reopen) {
/* Reopen file */
if(H5Fclose(fid_dst) < 0) TEST_ERROR
@@ -11416,8 +11900,8 @@ test_copy_cdt_merge_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
/* close the DST file */
if(H5Fclose(fid_dst) < 0) TEST_ERROR
- /*
- * Test 4
+ /*
+ * Test 4
*/
/* open destination file */
if((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDWR, dst_fapl)) < 0) TEST_ERROR
@@ -11469,13 +11953,13 @@ error:
return 1;
} /* end test_copy_cdt_merge_suggs */
-
+
/*-------------------------------------------------------------------------
* Function: test_copy_cdt_merge_dset_suggs
*
* Purpose: Tests the suggested searching paths feature (H5Padd_merge_committed_dtype_path)
- * is correctly applied in merging the committed datatypes of datasets.
- *
+ * is correctly applied in merging the committed datatypes of datasets.
+ *
* Return: Success: 0
* Failure: number of errors
*
@@ -11570,7 +12054,7 @@ test_copy_cdt_merge_dset_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
if(H5Sclose(sid) < 0) TEST_ERROR
/*
- * Test 1
+ * Test 1
*/
/* open the source file with read-only */
if((fid_src = H5Fopen(src_filename, H5F_ACC_RDONLY, src_fapl)) < 0) TEST_ERROR
@@ -11608,8 +12092,8 @@ test_copy_cdt_merge_dset_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
/* close the DST file */
if(H5Fclose(fid_dst) < 0) TEST_ERROR
- /*
- * Test 2
+ /*
+ * Test 2
*/
/* open destination file */
if((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDWR, dst_fapl)) < 0) TEST_ERROR
@@ -11645,14 +12129,14 @@ test_copy_cdt_merge_dset_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
/* close the DST file */
if(H5Fclose(fid_dst) < 0) TEST_ERROR
- /*
- * Test 3
+ /*
+ * Test 3
*/
/* open destination file */
if((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDWR, dst_fapl)) < 0) TEST_ERROR
/* remove "/uncopied/src_ndt_dset" */
- if(H5Ldelete(fid_dst, NAME_GROUP_UNCOPIED "/" SRC_NDT_DSET, H5P_DEFAULT) < 0) TEST_ERROR
+ if(H5Ldelete(fid_dst, NAME_GROUP_UNCOPIED "/" SRC_NDT_DSET, H5P_DEFAULT) < 0) TEST_ERROR
/* copy "src_ndt_dset" from SRC file to "/uncopied/src_ndt_dset" at DST file */
/* use default ocpypl_id -- without merging and suggestion */
@@ -11661,7 +12145,7 @@ test_copy_cdt_merge_dset_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
/* copy "src_ndt_dset" from SRC file to "/src_ndt_dset2" at DST file */
/* use merging and suggested searching path: "/uncopied/src_ndt_dset" */
if(H5Ocopy(fid_src, SRC_NDT_DSET, fid_dst, SRC_NDT_DSET2, ocpypl_id, H5P_DEFAULT) < 0) TEST_ERROR
-
+
if(reopen) {
/* Reopen file */
if(H5Fclose(fid_dst) < 0) TEST_ERROR
@@ -11687,8 +12171,8 @@ test_copy_cdt_merge_dset_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
/* close the DST file */
if(H5Fclose(fid_dst) < 0) TEST_ERROR
- /*
- * Test 4
+ /*
+ * Test 4
*/
/* open destination file */
if((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDWR, dst_fapl)) < 0) TEST_ERROR
@@ -11746,12 +12230,12 @@ error:
return 1;
} /* end test_copy_cdt_merge_dset_suggs */
-
+
/*-------------------------------------------------------------------------
* Function: test_copy_cdt_merge_all_suggs
*
* Purpose: Tests the merging committed datatype + search suggestion feature.
- *
+ *
* Return: Success: 0
* Failure: number of errors
*
@@ -11770,8 +12254,8 @@ test_copy_cdt_merge_all_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
hid_t aid = -1; /* Attribute ID */
hid_t did = -1; /* Dataset ID */
hid_t exp_did = -1; /* Dataset ID */
- hid_t tid_short = -1; /* Datatype ID */
- hid_t exp_tid = -1; /* Expected datatype ID */
+ hid_t tid_short = -1; /* Datatype ID */
+ hid_t exp_tid = -1; /* Expected datatype ID */
hid_t ocpypl_id = -1; /* Object copy plist ID */
hsize_t dim1d[1]; /* Dataset dimensions */
char src_filename[NAME_BUF_SIZE];
@@ -11827,7 +12311,7 @@ test_copy_cdt_merge_all_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
/* create third dataset in group */
if((did = H5Dcreate2(gid, SRC_DSET, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
-
+
/* get datatype */
if((tid_short = H5Topen2(fid_src, "/" SRC_GRP "/" SRC_NDT_SHORT, H5P_DEFAULT)) < 0) TEST_ERROR
@@ -11956,7 +12440,7 @@ test_copy_cdt_merge_all_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
/* close the DST file */
if(H5Fclose(fid_dst) < 0) TEST_ERROR
- /*
+ /*
* Test 1
*/
/* open the source file with read-only */
@@ -11997,7 +12481,7 @@ test_copy_cdt_merge_all_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
if(H5Fclose(fid_dst) < 0) TEST_ERROR
- /*
+ /*
* Test 2
*/
if((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDWR, dst_fapl)) < 0) TEST_ERROR
@@ -12034,7 +12518,7 @@ test_copy_cdt_merge_all_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
/* close the DST file */
if(H5Fclose(fid_dst) < 0) TEST_ERROR
- /*
+ /*
* Test 3
*/
if((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDWR, dst_fapl)) < 0) TEST_ERROR
@@ -12069,7 +12553,7 @@ test_copy_cdt_merge_all_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
/* close the DST file */
if(H5Fclose(fid_dst) < 0) TEST_ERROR
- /*
+ /*
* Test 4
*/
if((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDWR, dst_fapl)) < 0) TEST_ERROR
@@ -12122,7 +12606,7 @@ test_copy_cdt_merge_all_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
/* close the DST file */
if(H5Fclose(fid_dst) < 0) TEST_ERROR
- /*
+ /*
* Test 5
*/
/* open destination file */
@@ -12160,7 +12644,7 @@ test_copy_cdt_merge_all_suggs(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
/* close the DST file */
if(H5Fclose(fid_dst) < 0) TEST_ERROR
- /*
+ /*
* Test 6
*/
/* open destination file */
@@ -12221,7 +12705,7 @@ error:
return 1;
} /* end test_copy_cdt_merge_all_suggs */
-
+
/*-------------------------------------------------------------------------
* Function: test_copy_set_mcdt_search_cb
*
@@ -12406,7 +12890,7 @@ test_copy_set_mcdt_search_cb(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
/* Continue the global search */
if(H5Pset_mcdt_search_cb(ocpypl_id, mcdt_search_cb, &cb_udata) < 0)
- TEST_ERROR
+ TEST_ERROR
/* open destination file */
if((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDWR, dst_fapl)) < 0) TEST_ERROR
@@ -12441,7 +12925,7 @@ test_copy_set_mcdt_search_cb(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
if(H5Fclose(fid_dst) < 0) TEST_ERROR
- /*
+ /*
* Stop the search, default action is to create an anonymous committed datatype
*/
cb_udata.search_action = H5O_MCDT_SEARCH_STOP;
@@ -12577,7 +13061,7 @@ error:
return 1;
} /* end test_copy_set_mcdt_search_cb */
-
+
/*-------------------------------------------------------------------------
* Function: test_copy_set_get_mcdt_cb
*
@@ -12623,10 +13107,10 @@ test_copy_set_get_mcdt_search_cb(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
int buf[DIM_SIZE_1]; /* Buffer for writing data */
char src_filename[NAME_BUF_SIZE];
char dst_filename[NAME_BUF_SIZE];
- H5O_mcdt_search_cb_t mcdt_cb = NULL; /* The callback function */
- H5O_mcdt_search_ret_t mcdt_udataA; /* User data for callback */
- H5O_mcdt_search_ret_t mcdt_udataB; /* User data for callback */
- H5O_mcdt_search_ret_t *mcdt_udata_p = NULL; /* Pointer to user data for callback */
+ H5O_mcdt_search_cb_t mcdt_cb = NULL; /* The callback function */
+ H5O_mcdt_search_ret_t mcdt_udataA; /* User data for callback */
+ H5O_mcdt_search_ret_t mcdt_udataB; /* User data for callback */
+ H5O_mcdt_search_ret_t *mcdt_udata_p = NULL; /* Pointer to user data for callback */
if(reopen)
TESTING("H5Ocopy(): H5Pset/get_mcdt_search_cb and reopen")
@@ -12756,7 +13240,7 @@ test_copy_set_get_mcdt_search_cb(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
/* Continue the global search */
if(H5Pset_mcdt_search_cb(ocpypl_id, mcdt_search_cbA, &mcdt_udataA) < 0)
- TEST_ERROR
+ TEST_ERROR
/* open the destination file */
if((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDWR, dst_fapl)) < 0) TEST_ERROR
@@ -12789,7 +13273,7 @@ test_copy_set_get_mcdt_search_cb(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
mcdt_udataB = H5O_MCDT_SEARCH_STOP;
if(H5Pset_mcdt_search_cb(ocpypl_id, mcdt_search_cbA, &mcdt_udataB) < 0)
- TEST_ERROR
+ TEST_ERROR
/* open destination file */
if((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDWR, dst_fapl)) < 0) TEST_ERROR
@@ -12819,7 +13303,7 @@ test_copy_set_get_mcdt_search_cb(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl,
if(H5Pfree_merge_committed_dtype_paths(ocpypl_id) < 0) TEST_ERROR
if(H5Pset_mcdt_search_cb(ocpypl_id, mcdt_search_cbB, &mcdt_udataB) < 0)
- TEST_ERROR
+ TEST_ERROR
/* open destination file */
if((fid_dst = H5Fopen(dst_filename, H5F_ACC_RDWR, dst_fapl)) < 0) TEST_ERROR
@@ -12872,7 +13356,7 @@ error:
return 1;
} /* end test_copy_set_get_mcdt_search_cb */
-
+
/*-------------------------------------------------------------------------
* Function: test_copy_iterate
*
@@ -12970,7 +13454,7 @@ error:
return 1;
} /* end test_copy_iterate */
-
+
/*-------------------------------------------------------------------------
* Function: test_copy_option
*
@@ -12995,7 +13479,7 @@ test_copy_option(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst_fapl,
hid_t did = -1; /* Dataset ID */
hid_t gid=-1, gid2=-1, gid_ref=-1; /* Group IDs */
hid_t gid_sub=-1, gid_sub_sub=-1; /* Sub-group ID */
- hid_t pid=-1, lcpl_id=-1; /* Property IDs */
+ hid_t pid=-1, lcpl_id=-1; /* Property IDs */
unsigned cpy_flags; /* Object copy flags */
int depth = -1; /* Copy depth */
hsize_t dim2d[2];
@@ -13248,51 +13732,51 @@ error:
H5E_BEGIN_TRY {
H5Pclose(lcpl_id);
H5Pclose(pid);
- H5Sclose(sid);
- H5Dclose(did);
- H5Gclose(gid_ref);
- H5Gclose(gid_sub);
- H5Gclose(gid2);
- H5Gclose(gid);
- H5Fclose(fid_dst);
- H5Fclose(fid_src);
- H5Fclose(fid_ext);
+ H5Sclose(sid);
+ H5Dclose(did);
+ H5Gclose(gid_ref);
+ H5Gclose(gid_sub);
+ H5Gclose(gid2);
+ H5Gclose(gid);
+ H5Fclose(fid_dst);
+ H5Fclose(fid_src);
+ H5Fclose(fid_ext);
} H5E_END_TRY;
return 1;
} /* end test_copy_option */
-
+
/*-------------------------------------------------------------------------
* Function: test_copy_dataset_open
*
* Purpose: To ensure that H5Ocopy() copies data of opened dataset correctly.
- * This is for bug fix HDFFV-7853.
- *
- * Test Case 1:
- * Create a dataset with attributes in SRC file
- * Copy the opened dataset to another location in the same file
- * Copy the opened dataset to DST file
- * Close the dataset
- *
- * Test Case 2:
- * Reopen the dataset, write new data to the dataset
- * Copy the opened dataset to another location in the same file
- * Copy the opened dataset to to DST file
- * Close the dataset
- *
- * Test Case 3:
- * Create a committed datatype
- * Create a dataset with the committed datatype in SRC file
- * Open the committed datatype
- * Copy the opened dataset (with the opened committed datatype) to another location in the same file
- * Copy the opened dataset (with the opened committed datatype) to DST file
- * Close the dataset and the committed datatype
- *
- * Test Case 4:
- * Create a group with attributes, create a dataset in the group
- * Copy the opened group (together with the opened dataset) to another location in the same file
- * Copy the opened group (together with the opened dataset) to DST file
- * Close the group and the dataset
+ * This is for bug fix HDFFV-7853.
+ *
+ * Test Case 1:
+ * Create a dataset with attributes in SRC file
+ * Copy the opened dataset to another location in the same file
+ * Copy the opened dataset to DST file
+ * Close the dataset
+ *
+ * Test Case 2:
+ * Reopen the dataset, write new data to the dataset
+ * Copy the opened dataset to another location in the same file
+ * Copy the opened dataset to to DST file
+ * Close the dataset
+ *
+ * Test Case 3:
+ * Create a committed datatype
+ * Create a dataset with the committed datatype in SRC file
+ * Open the committed datatype
+ * Copy the opened dataset (with the opened committed datatype) to another location in the same file
+ * Copy the opened dataset (with the opened committed datatype) to DST file
+ * Close the dataset and the committed datatype
+ *
+ * Test Case 4:
+ * Create a group with attributes, create a dataset in the group
+ * Copy the opened group (together with the opened dataset) to another location in the same file
+ * Copy the opened group (together with the opened dataset) to DST file
+ * Close the group and the dataset
*
* Return: Success: 0
* Failure: number of errors
@@ -13311,9 +13795,12 @@ test_copy_dataset_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst
hid_t sid = -1; /* Dataspace ID */
hid_t tid = -1; /* Datatype ID */
hid_t did = -1, did2 = -1; /* Dataset IDs */
+ hid_t did3 = -1, did4 = -1; /* Dataset IDs */
hid_t gid = -1, gid2 = -1; /* Group IDs */
+ hid_t pid = -1; /* Dataset creation property list */
+ hsize_t chunk_dim2d[2] = {CHUNK_SIZE_1, CHUNK_SIZE_2}; /* Chunk dimension sizes */
int buf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
- int newbuf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
+ int newbuf[DIM_SIZE_1][DIM_SIZE_2]; /* Buffer for writing data */
hsize_t dim2d[2]; /* Dataset dimensions */
int i, j; /* local index variables */
char src_filename[NAME_BUF_SIZE];
@@ -13354,95 +13841,124 @@ test_copy_dataset_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst
/* create 2D dataspace */
if((sid = H5Screate_simple(2, dim2d, NULL)) < 0) TEST_ERROR
- /* create 2D int dataset in SRC file */
+ /* create and set chunk plist */
+ if((pid = H5Pcreate(H5P_DATASET_CREATE)) < 0) TEST_ERROR
+ if(H5Pset_chunk(pid, 2, chunk_dim2d) < 0) TEST_ERROR
+
+ /* create 2D dataset in SRC file */
if((did = H5Dcreate2(fid_src, NAME_DATASET_SIMPLE, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
+ /* create 2D chunked dataset in SRC file */
+ if((did2 = H5Dcreate2(fid_src, NAME_DATASET_CHUNKED, H5T_NATIVE_INT, sid, H5P_DEFAULT, pid, H5P_DEFAULT)) < 0) TEST_ERROR
+
/* write data to the dataset */
if(H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) TEST_ERROR
+ if(H5Dwrite(did2, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) TEST_ERROR
/* attach attributes to the dataset */
if(test_copy_attach_attributes(did, H5T_NATIVE_INT) < 0) TEST_ERROR
+ if(test_copy_attach_attributes(did2, H5T_NATIVE_INT) < 0) TEST_ERROR
- /*
- * Test case 1
+ /*
+ * Test case 1
*/
- /*
+ /*
* Copy within the same file
*/
/* copy the opened dataset to another location in SRC file */
if(H5Ocopy(fid_src, NAME_DATASET_SIMPLE, fid_src, NAME_DATASET_SIMPLE2, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
+ if(H5Ocopy(fid_src, NAME_DATASET_CHUNKED, fid_src, NAME_DATASET_CHUNKED2, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
/* open the copied dataset */
- if((did2 = H5Dopen2(fid_src, NAME_DATASET_SIMPLE2, H5P_DEFAULT)) < 0) TEST_ERROR
+ if((did3 = H5Dopen2(fid_src, NAME_DATASET_SIMPLE2, H5P_DEFAULT)) < 0) TEST_ERROR
+ if((did4 = H5Dopen2(fid_src, NAME_DATASET_CHUNKED2, H5P_DEFAULT)) < 0) TEST_ERROR
/* Check if the datasets are equal */
- if(compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE) TEST_ERROR
+ if(compare_datasets(did, did3, H5P_DEFAULT, buf) != TRUE) TEST_ERROR
+ if(compare_datasets(did2, did4, H5P_DEFAULT, buf) != TRUE) TEST_ERROR
/* close the copied dataset */
- if(H5Dclose(did2) < 0) TEST_ERROR
+ if(H5Dclose(did3) < 0) TEST_ERROR
+ if(H5Dclose(did4) < 0) TEST_ERROR
- /*
+ /*
* Copy to another file
*/
/* copy the opened dataset from SRC to DST */
if(H5Ocopy(fid_src, NAME_DATASET_SIMPLE, fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
+ if(H5Ocopy(fid_src, NAME_DATASET_CHUNKED, fid_dst, NAME_DATASET_CHUNKED, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
/* open the copied dataset in DST file */
- if((did2 = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR
+ if((did3 = H5Dopen2(fid_dst, NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR
+ if((did4 = H5Dopen2(fid_dst, NAME_DATASET_CHUNKED, H5P_DEFAULT)) < 0) TEST_ERROR
/* Check if the datasets are equal */
- if(compare_datasets(did, did2, H5P_DEFAULT, buf) != TRUE) TEST_ERROR
+ if(compare_datasets(did, did3, H5P_DEFAULT, buf) != TRUE) TEST_ERROR
+ if(compare_datasets(did2, did4, H5P_DEFAULT, buf) != TRUE) TEST_ERROR
/* close the copied dataset in DST file */
- if(H5Dclose(did2) < 0) TEST_ERROR
+ if(H5Dclose(did3) < 0) TEST_ERROR
+ if(H5Dclose(did4) < 0) TEST_ERROR
/* close the dataset in SRC file */
if(H5Dclose(did) < 0) TEST_ERROR
+ if(H5Dclose(did2) < 0) TEST_ERROR
- /*
- * Test case 2
+ /*
+ * Test case 2
*/
/* reopen the dataset in SRC file */
if((did = H5Dopen2(fid_src, NAME_DATASET_SIMPLE, H5P_DEFAULT)) < 0) TEST_ERROR
+ if((did2 = H5Dopen2(fid_src, NAME_DATASET_CHUNKED, H5P_DEFAULT)) < 0) TEST_ERROR
/* write another set of data to the dataset */
if(H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, newbuf) < 0) TEST_ERROR
+ if(H5Dwrite(did2, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, newbuf) < 0) TEST_ERROR
- /*
+ /*
* Copy within the same file
*/
/* copy the opened dataset to another location in SRC file */
- if(H5Ocopy(fid_src, NAME_DATASET_SIMPLE, fid_src, "NEW_DATASET", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
+ if(H5Ocopy(fid_src, NAME_DATASET_SIMPLE, fid_src, "NEW_DATASET_SIMPLE", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
+ if(H5Ocopy(fid_src, NAME_DATASET_CHUNKED, fid_src, "NEW_DATASET_CHUNKED", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
/* open the copied dataset */
- if((did2 = H5Dopen2(fid_src, "NEW_DATASET", H5P_DEFAULT)) < 0) TEST_ERROR
+ if((did3 = H5Dopen2(fid_src, "NEW_DATASET_SIMPLE", H5P_DEFAULT)) < 0) TEST_ERROR
+ if((did4 = H5Dopen2(fid_src, "NEW_DATASET_CHUNKED", H5P_DEFAULT)) < 0) TEST_ERROR
/* Check if the datasets are equal */
- if(compare_datasets(did, did2, H5P_DEFAULT, newbuf) != TRUE) TEST_ERROR
+ if(compare_datasets(did, did3, H5P_DEFAULT, newbuf) != TRUE) TEST_ERROR
+ if(compare_datasets(did2, did4, H5P_DEFAULT, newbuf) != TRUE) TEST_ERROR
/* close the copied dataset in SRC file */
- if(H5Dclose(did2) < 0) TEST_ERROR
- /*
+ if(H5Dclose(did3) < 0) TEST_ERROR
+ if(H5Dclose(did4) < 0) TEST_ERROR
+ /*
* Copy to another file
*/
/* copy the opened dataset from SRC to DST */
- if(H5Ocopy(fid_src, NAME_DATASET_SIMPLE, fid_dst, "NEW_DATASET", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
+ if(H5Ocopy(fid_src, NAME_DATASET_SIMPLE, fid_dst, "NEW_DATASET_SIMPLE", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
+ if(H5Ocopy(fid_src, NAME_DATASET_CHUNKED, fid_dst, "NEW_DATASET_CHUNKED", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR
/* open the copied dataset in DST file */
- if((did2 = H5Dopen2(fid_dst, "NEW_DATASET", H5P_DEFAULT)) < 0) TEST_ERROR
+ if((did3 = H5Dopen2(fid_dst, "NEW_DATASET_SIMPLE", H5P_DEFAULT)) < 0) TEST_ERROR
+ if((did4 = H5Dopen2(fid_dst, "NEW_DATASET_CHUNKED", H5P_DEFAULT)) < 0) TEST_ERROR
/* Check if the datasets are equal */
- if(compare_datasets(did, did2, H5P_DEFAULT, newbuf) != TRUE) TEST_ERROR
+ if(compare_datasets(did, did3, H5P_DEFAULT, newbuf) != TRUE) TEST_ERROR
+ if(compare_datasets(did2, did4, H5P_DEFAULT, newbuf) != TRUE) TEST_ERROR
/* close the copied dataset in DST file */
- if(H5Dclose(did2) < 0) TEST_ERROR
+ if(H5Dclose(did3) < 0) TEST_ERROR
+ if(H5Dclose(did4) < 0) TEST_ERROR
/* close the dataset at SRC file */
if(H5Dclose(did) < 0) TEST_ERROR
+ if(H5Dclose(did2) < 0) TEST_ERROR
- /*
- * Test case 3
+ /*
+ * Test case 3
*/
/* make a copy of the datatype */
@@ -13463,7 +13979,7 @@ test_copy_dataset_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst
/* write data to the dataset */
if(H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) TEST_ERROR
- /*
+ /*
* Copy within the same file
*/
/* copy the opened dataset (with the opened committed datatype) to another location in SRC file */
@@ -13478,7 +13994,7 @@ test_copy_dataset_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst
/* close the copied dataset in SRC file */
if(H5Dclose(did2) < 0) TEST_ERROR
- /*
+ /*
* Copy to another file
*/
/* copy the opened dataset (with the opened committed datatype) from SRC to DST */
@@ -13499,8 +14015,8 @@ test_copy_dataset_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst
/* close the committed datatype at SRC file */
if(H5Tclose(tid) < 0) TEST_ERROR
- /*
- * Test case 4
+ /*
+ * Test case 4
*/
/* create a group in SRC file */
if((gid = H5Gcreate2(fid_src, NAME_GROUP_TOP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
@@ -13513,7 +14029,7 @@ test_copy_dataset_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst
/* write data to the dataset */
if(H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) TEST_ERROR
- /*
+ /*
* Copy within the same file
*/
/* copy the opened group (together with opened dataset) to another location in SRC file */
@@ -13528,7 +14044,7 @@ test_copy_dataset_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst
/* close the DST dataset */
if(H5Gclose(gid2) < 0) TEST_ERROR
- /*
+ /*
* Copy to another file
*/
/* copy the opened group (together with opened dataset) to DST file */
@@ -13563,20 +14079,20 @@ test_copy_dataset_open(hid_t fcpl_src, hid_t fcpl_dst, hid_t src_fapl, hid_t dst
error:
H5E_BEGIN_TRY {
- H5Dclose(did);
- H5Dclose(did2);
- H5Sclose(sid);
- H5Gclose(gid);
- H5Gclose(gid2);
- H5Fclose(fid_dst);
- H5Fclose(fid_src);
+ H5Dclose(did);
+ H5Dclose(did2);
+ H5Sclose(sid);
+ H5Gclose(gid);
+ H5Gclose(gid2);
+ H5Fclose(fid_dst);
+ H5Fclose(fid_src);
} H5E_END_TRY;
return 1;
} /* end test_copy_dataset_open */
-
+
/*-------------------------------------------------------------------------
- * Function: main
+ * Function: main
*
* Purpose: Test H5Ocopy()
*
@@ -13597,11 +14113,11 @@ int
main(void)
{
int nerrors = 0;
- hid_t fapl, fapl2;
+ hid_t fapl, fapl2;
hid_t fcpl_shared, ocpl;
unsigned max_compact, min_dense;
int configuration; /* Configuration of tests. */
- int ExpressMode;
+ int ExpressMode;
hbool_t same_file; /* Whether to run tests that only use one file */
/* Setup */
@@ -13679,7 +14195,7 @@ main(void)
}
} /* end if */
else {
- puts("Testing with oldest file format for source file:");
+ puts("Testing with oldest file format for source file:");
src_fapl = fapl;
num_attributes_g = 4;
} /* end else */
@@ -13697,16 +14213,30 @@ main(void)
/* The tests... */
nerrors += test_copy_dataset_simple(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
+ nerrors += test_copy_dataset_versionbounds(fcpl_src, src_fapl);
nerrors += test_copy_dataset_simple_samefile(fcpl_src, src_fapl);
- nerrors += test_copy_dataset_simple_empty(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
+
+ /* Test with dataset opened in the file or not */
+ nerrors += test_copy_dataset_simple_empty(fcpl_src, fcpl_dst, src_fapl, dst_fapl, FALSE);
+ nerrors += test_copy_dataset_simple_empty(fcpl_src, fcpl_dst, src_fapl, dst_fapl, TRUE);
+
nerrors += test_copy_dataset_compound(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
nerrors += test_copy_dataset_chunked(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
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);
+
+ /* Test with dataset opened in the file or not */
+ nerrors += test_copy_dataset_no_edge_filt(fcpl_src, fcpl_dst, src_fapl, dst_fapl, FALSE);
+ nerrors += test_copy_dataset_no_edge_filt(fcpl_src, fcpl_dst, src_fapl, dst_fapl, TRUE);
+
+ /* Test with dataset opened in the file or not */
+ nerrors += test_copy_dataset_compact(fcpl_src, fcpl_dst, src_fapl, dst_fapl, FALSE);
+ nerrors += test_copy_dataset_compact(fcpl_src, fcpl_dst, src_fapl, dst_fapl, TRUE);
+
+ nerrors += test_copy_dataset_multi_ohdr_chunks(fcpl_src, fcpl_dst, src_fapl, dst_fapl, FALSE);
+ nerrors += test_copy_dataset_multi_ohdr_chunks(fcpl_src, fcpl_dst, src_fapl, dst_fapl, TRUE);
+
nerrors += test_copy_dataset_attr_named_dtype(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
nerrors += test_copy_group_empty(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
@@ -13716,7 +14246,11 @@ main(void)
nerrors += test_copy_group_loop(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
nerrors += test_copy_group_wide_loop(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
nerrors += test_copy_group_links(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
- nerrors += test_copy_soft_link(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
+
+ /* Test with dataset opened in the file or not */
+ nerrors += test_copy_soft_link(fcpl_src, fcpl_dst, src_fapl, dst_fapl, FALSE);
+ nerrors += test_copy_soft_link(fcpl_src, fcpl_dst, src_fapl, dst_fapl, TRUE);
+
nerrors += test_copy_ext_link(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
nerrors += test_copy_exist(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
nerrors += test_copy_path(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
@@ -13736,10 +14270,10 @@ main(void)
FALSE, "H5Ocopy(): expand soft link");
nerrors += test_copy_option(fcpl_src, fcpl_dst, src_fapl, dst_fapl,
H5O_COPY_EXPAND_EXT_LINK_FLAG,
- FALSE, "H5Ocopy: expand external link");
+ FALSE, "H5Ocopy(): expand external link");
nerrors += test_copy_option(fcpl_src, fcpl_dst, src_fapl, dst_fapl,
H5O_COPY_EXPAND_SOFT_LINK_FLAG | H5O_COPY_EXPAND_EXT_LINK_FLAG,
- FALSE, "H5Ocopy: expand soft and external links");
+ FALSE, "H5Ocopy(): expand soft and external links");
nerrors += test_copy_option(fcpl_src, fcpl_dst, src_fapl, dst_fapl,
H5O_COPY_SHALLOW_HIERARCHY_FLAG,
FALSE, "H5Ocopy(): shallow group copy");
@@ -13796,19 +14330,38 @@ main(void)
nerrors += test_copy_attribute_compound_vlstr(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
nerrors += test_copy_dataset_compact_named_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
nerrors += test_copy_dataset_contig_named_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
- nerrors += test_copy_dataset_chunked_named_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
+
+ /* Test with dataset opened in the file or not */
+ nerrors += test_copy_dataset_chunked_named_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl, FALSE);
+ nerrors += test_copy_dataset_chunked_named_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl, TRUE);
+
nerrors += test_copy_dataset_compressed_named_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
nerrors += test_copy_dataset_compact_vl_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
- nerrors += test_copy_dataset_contig_vl_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
+
+ /* Test with dataset opened in the file or not */
+ nerrors += test_copy_dataset_contig_vl_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl, FALSE);
+ nerrors += test_copy_dataset_contig_vl_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl, TRUE);
+
nerrors += test_copy_dataset_chunked_vl_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
- nerrors += test_copy_dataset_compressed_vl_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
+
+ /* Test with dataset opened in the file or not */
+ nerrors += test_copy_dataset_compressed_vl_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl, FALSE);
+ nerrors += test_copy_dataset_compressed_vl_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl, TRUE);
+
nerrors += test_copy_dataset_contig_cmpd_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
nerrors += test_copy_dataset_chunked_cmpd_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
nerrors += test_copy_dataset_compact_cmpd_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
nerrors += test_copy_same_file_named_datatype(fcpl_src, src_fapl);
- nerrors += test_copy_old_layout(fcpl_dst, dst_fapl);
+
+ /* Test with dataset opened in the file or not */
+ nerrors += test_copy_old_layout(fcpl_dst, dst_fapl, FALSE);
+ nerrors += test_copy_old_layout(fcpl_dst, dst_fapl, TRUE);
+
+ /* Test with dataset opened in the file or not */
nerrors += test_copy_null_ref(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
+ nerrors += test_copy_null_ref_open(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
+
nerrors += test_copy_iterate(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
} /* end if */
diff --git a/test/ohdr.c b/test/ohdr.c
index 2ac9866..e91c6a8 100644
--- a/test/ohdr.c
+++ b/test/ohdr.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* Programmer: Robb Matzke <matzke@llnl.gov>
@@ -23,16 +21,18 @@
* This file needs to access private datatypes from the H5O package.
* This file also needs to access the object header testing code.
*/
-#define H5O_FRIEND /*suppress error about including H5Opkg */
+#define H5O_FRIEND /*suppress error about including H5Opkg */
#define H5O_TESTING
#include "H5Opkg.h"
/*
* This file needs to access private datatypes from the H5G package.
*/
-#define H5G_FRIEND /*suppress error about including H5Gpkg */
+#define H5G_FRIEND /*suppress error about including H5Gpkg */
#include "H5Gpkg.h"
+#include "H5CXprivate.h" /* API Contexts */
+
const char *FILENAME[] = {
"ohdr",
NULL
@@ -51,24 +51,24 @@ const char *FILENAME[] = {
/*
* Verify that messages are moved forward into a "continuation message":
- * Create an object header with several continuation chunks
- * Remove a message in the last chunk
- * The remaining message(s) in the last chunk should be moved forward into the continuation message
- * The process will repeat when the continuation message is big enough to hold all the
- * messages in the last chunk.
- * Result: the number of chunks should be reduced
+ * Create an object header with several continuation chunks
+ * Remove a message in the last chunk
+ * The remaining message(s) in the last chunk should be moved forward into the continuation message
+ * The process will repeat when the continuation message is big enough to hold all the
+ * messages in the last chunk.
+ * Result: the number of chunks should be reduced
*/
static herr_t
test_cont(char *filename, hid_t fapl)
{
- hid_t file=-1;
- H5F_t *f = NULL;
+ hid_t file=-1;
+ H5F_t *f = NULL;
H5O_hdr_info_t hdr_info;
- H5O_loc_t oh_locA, oh_locB;
- time_t time_new;
- const char *short_name = "T";
- const char *long_name = "This is the message";
- size_t nchunks;
+ H5O_loc_t oh_locA, oh_locB;
+ time_t time_new;
+ const char *short_name = "T";
+ const char *long_name = "This is the message";
+ size_t nchunks;
TESTING("object header continuation block");
@@ -86,51 +86,51 @@ test_cont(char *filename, hid_t fapl)
goto error;
} /* end if */
- 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)
+ if(H5O_create(f, (size_t)H5O_MIN_SIZE, (size_t)0, H5P_GROUP_CREATE_DEFAULT, &oh_locA/*out*/) < 0)
FAIL_STACK_ERROR
- 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)
+ if(H5O_create(f, (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, H5AC_ind_read_dxpl_id) < 0)
+ if(H5O_msg_create(&oh_locA, H5O_NAME_ID, 0, 0, &long_name) < 0)
FAIL_STACK_ERROR
- if(H5O_msg_create(&oh_locB, H5O_MTIME_ID, 0, 0, &time_new, H5AC_ind_read_dxpl_id) < 0)
+ if(H5O_msg_create(&oh_locB, H5O_MTIME_ID, 0, 0, &time_new) < 0)
FAIL_STACK_ERROR
- if(H5O_msg_create(&oh_locB, H5O_MTIME_ID, 0, 0, &time_new, H5AC_ind_read_dxpl_id) < 0)
+ if(H5O_msg_create(&oh_locB, H5O_MTIME_ID, 0, 0, &time_new) < 0)
FAIL_STACK_ERROR
- if(H5O_msg_create(&oh_locB, H5O_MTIME_ID, 0, 0, &time_new, H5AC_ind_read_dxpl_id) < 0)
+ if(H5O_msg_create(&oh_locB, H5O_MTIME_ID, 0, 0, &time_new) < 0)
FAIL_STACK_ERROR
- if(H5O_msg_create(&oh_locA, H5O_MTIME_NEW_ID, 0, 0, &time_new, H5AC_ind_read_dxpl_id) < 0)
+ if(H5O_msg_create(&oh_locA, H5O_MTIME_NEW_ID, 0, 0, &time_new) < 0)
FAIL_STACK_ERROR
- if(H5O_msg_create(&oh_locB, H5O_MTIME_ID, 0, 0, &time_new, H5AC_ind_read_dxpl_id) < 0)
+ if(H5O_msg_create(&oh_locB, H5O_MTIME_ID, 0, 0, &time_new) < 0)
FAIL_STACK_ERROR
- if(H5O_msg_create(&oh_locA, H5O_NAME_ID, 0, 0, &short_name, H5AC_ind_read_dxpl_id) < 0)
+ if(H5O_msg_create(&oh_locA, H5O_NAME_ID, 0, 0, &short_name) < 0)
FAIL_STACK_ERROR
- if(1 != H5O_link(&oh_locA, 1, H5AC_ind_read_dxpl_id))
+ if(1 != H5O_link(&oh_locA, 1))
FAIL_STACK_ERROR
- if(1 != H5O_link(&oh_locB, 1, H5AC_ind_read_dxpl_id))
+ if(1 != H5O_link(&oh_locB, 1))
FAIL_STACK_ERROR
- if(H5AC_flush(f, H5AC_ind_read_dxpl_id) < 0)
+ if(H5AC_flush(f) < 0)
FAIL_STACK_ERROR
- if(H5O_expunge_chunks_test(&oh_locA, H5AC_ind_read_dxpl_id) < 0)
+ if(H5O_expunge_chunks_test(&oh_locA) < 0)
FAIL_STACK_ERROR
- if(H5O_get_hdr_info(&oh_locA, H5AC_ind_read_dxpl_id, &hdr_info) < 0)
+ if(H5O_get_hdr_info(&oh_locA, &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, H5AC_ind_read_dxpl_id) < 0)
+ if(H5O_msg_remove(&oh_locA, H5O_NAME_ID, 0, FALSE) < 0)
FAIL_STACK_ERROR
- if(H5O_get_hdr_info(&oh_locA, H5AC_ind_read_dxpl_id, &hdr_info) < 0)
+ if(H5O_get_hdr_info(&oh_locA, &hdr_info) < 0)
FAIL_STACK_ERROR
if(hdr_info.nchunks >= nchunks)
@@ -145,7 +145,6 @@ test_cont(char *filename, hid_t fapl)
PASSED();
-
return SUCCEED;
error:
@@ -169,15 +168,14 @@ error:
static herr_t
test_ohdr_cache(char *filename, hid_t fapl)
{
- hid_t file = -1; /* File ID */
+ hid_t file = -1; /* File ID */
hid_t my_fapl; /* FAPL ID */
- hid_t my_dxpl; /* DXPL ID */
H5AC_cache_config_t mdc_config; /* Metadata cache configuration info */
- H5F_t *f = NULL; /* File handle */
+ H5F_t *f = NULL; /* File handle */
H5HL_t *lheap, *lheap2, *lheap3; /* Pointer to local heaps */
haddr_t lheap_addr, lheap_addr2, lheap_addr3; /* Local heap addresses */
- H5O_loc_t oh_loc; /* Object header location */
- time_t time_new; /* Time value for modification time message */
+ H5O_loc_t oh_loc; /* Object header location */
+ time_t time_new; /* Time value for modification time message */
unsigned rc; /* Refcount for object */
TESTING("object header creation in cache");
@@ -197,10 +195,6 @@ test_ohdr_cache(char *filename, hid_t fapl)
if(H5Pset_mdc_config(my_fapl, &mdc_config) < 0)
FAIL_STACK_ERROR
- /* Make a copy of the default DXPL */
- 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
@@ -212,31 +206,31 @@ test_ohdr_cache(char *filename, hid_t fapl)
FAIL_STACK_ERROR
/* Create object (local heap) that occupies most of cache */
- if(H5HL_create(f, my_dxpl, (31 * 1024), &lheap_addr) < 0)
+ if(H5HL_create(f, (31 * 1024), &lheap_addr) < 0)
FAIL_STACK_ERROR
/* Protect local heap (which actually pins it in the cache) */
- if(NULL == (lheap = H5HL_protect(f, my_dxpl, lheap_addr, H5AC__READ_ONLY_FLAG)))
+ if(NULL == (lheap = H5HL_protect(f, lheap_addr, H5AC__READ_ONLY_FLAG)))
FAIL_STACK_ERROR
/* Create an object header */
HDmemset(&oh_loc, 0, sizeof(oh_loc));
- if(H5O_create(f, my_dxpl, (size_t)2048, (size_t)1, H5P_GROUP_CREATE_DEFAULT, &oh_loc/*out*/) < 0)
+ if(H5O_create(f, (size_t)2048, (size_t)1, H5P_GROUP_CREATE_DEFAULT, &oh_loc/*out*/) < 0)
FAIL_STACK_ERROR
/* Query object header information */
rc = 0;
- if(H5O_get_rc(&oh_loc, my_dxpl, &rc) < 0)
+ if(H5O_get_rc(&oh_loc, &rc) < 0)
FAIL_STACK_ERROR
if(0 != rc)
TEST_ERROR
/* Create object (local heap) that occupies most of cache */
- if(H5HL_create(f, my_dxpl, (31 * 1024), &lheap_addr2) < 0)
+ if(H5HL_create(f, (31 * 1024), &lheap_addr2) < 0)
FAIL_STACK_ERROR
/* Protect local heap (which actually pins it in the cache) */
- if(NULL == (lheap2 = H5HL_protect(f, my_dxpl, lheap_addr2, H5AC__READ_ONLY_FLAG)))
+ if(NULL == (lheap2 = H5HL_protect(f, lheap_addr2, H5AC__READ_ONLY_FLAG)))
FAIL_STACK_ERROR
/* Unprotect local heap (which actually unpins it from the cache) */
@@ -245,15 +239,15 @@ test_ohdr_cache(char *filename, hid_t fapl)
/* Create object header message in new object header */
time_new = 11111111;
- if(H5O_msg_create(&oh_loc, H5O_MTIME_NEW_ID, 0, 0, &time_new, my_dxpl) < 0)
+ if(H5O_msg_create(&oh_loc, H5O_MTIME_NEW_ID, 0, 0, &time_new) < 0)
FAIL_STACK_ERROR
/* Create object (local heap) that occupies most of cache */
- if(H5HL_create(f, my_dxpl, (31 * 1024), &lheap_addr3) < 0)
+ if(H5HL_create(f, (31 * 1024), &lheap_addr3) < 0)
FAIL_STACK_ERROR
/* Protect local heap (which actually pins it in the cache) */
- if(NULL == (lheap3 = H5HL_protect(f, my_dxpl, lheap_addr3, H5AC__READ_ONLY_FLAG)))
+ if(NULL == (lheap3 = H5HL_protect(f, lheap_addr3, H5AC__READ_ONLY_FLAG)))
FAIL_STACK_ERROR
/* Unprotect local heap (which actually unpins it from the cache) */
@@ -267,13 +261,13 @@ test_ohdr_cache(char *filename, hid_t fapl)
* a non-invasive way -QAK)
*/
rc = 0;
- if(H5O_get_rc(&oh_loc, my_dxpl, &rc) < 0)
+ if(H5O_get_rc(&oh_loc, &rc) < 0)
FAIL_STACK_ERROR
if(0 != rc)
TEST_ERROR
/* Decrement reference count o object header */
- if(H5O_dec_rc_by_loc(&oh_loc, my_dxpl) < 0)
+ if(H5O_dec_rc_by_loc(&oh_loc) < 0)
FAIL_STACK_ERROR
/* Close object header created */
@@ -284,8 +278,6 @@ test_ohdr_cache(char *filename, hid_t fapl)
if(H5HL_unprotect(lheap) < 0)
FAIL_STACK_ERROR
- if(H5Pclose(my_dxpl) < 0)
- FAIL_STACK_ERROR
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
@@ -311,17 +303,17 @@ error:
static herr_t
test_ohdr_swmr(hbool_t new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t fapl = -1; /* File access property list */
- hid_t did = -1; /* Dataset ID */
+ hid_t fid = -1; /* File ID */
+ hid_t fapl = -1; /* File access property list */
+ hid_t did = -1; /* Dataset ID */
hid_t sid = -1; /* Dataspace ID */
- hid_t plist = -1; /* Dataset creation property list */
- size_t compact_size = 1024; /* The size of compact dataset */
- int *wbuf = NULL; /* Buffer for writing */
- hsize_t dims[1]; /* Dimension sizes */
- size_t u; /* Iterator */
+ hid_t plist = -1; /* Dataset creation property list */
+ size_t compact_size = 1024; /* The size of compact dataset */
+ int *wbuf = NULL; /* Buffer for writing */
+ hsize_t dims[1]; /* Dimension sizes */
+ size_t u; /* Iterator */
int n; /* Data variable */
- H5O_info_t obj_info; /* Information for the object */
+ H5O_info_t obj_info; /* Information for the object */
if(new_format) {
TESTING("exercise the coding for the re-read of the object header for SWMR access: latest-format");
@@ -357,7 +349,7 @@ test_ohdr_swmr(hbool_t new_format)
dims[0] = (hsize_t)compact_size;
if((sid = H5Screate_simple(1, dims, NULL)) < 0)
FAIL_STACK_ERROR
-
+
/* Create property list for compact dataset creation */
if((plist = H5Pcreate(H5P_DATASET_CREATE)) < 0)
FAIL_STACK_ERROR
@@ -394,8 +386,9 @@ test_ohdr_swmr(hbool_t new_format)
if(H5Oget_info(did, &obj_info) < 0)
FAIL_STACK_ERROR
- if(obj_info.hdr.version != OBJ_VERSION_LATEST)
- FAIL_STACK_ERROR
+ if(new_format)
+ if(obj_info.hdr.version != OBJ_VERSION_LATEST)
+ FAIL_STACK_ERROR
/* The size of object header should be greater than the speculative read size of H5O_SPEC_READ_SIZE */
/* This will exercise the coding for the re-read of the object header for SWMR access */
@@ -449,10 +442,10 @@ error:
/*
* 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[]
+ * 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 "/"
@@ -463,15 +456,15 @@ error:
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 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 */
+ 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 */
char testfile[256];
/* create a different name for a local copy of the data file to be
@@ -498,7 +491,7 @@ test_unknown(unsigned bogus_id, char *filename, hid_t fapl)
/* 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)
+ if((gid_bogus = H5Gopen2(fid_bogus, "group", H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR
loc_bogus = gid_bogus;
@@ -563,7 +556,7 @@ test_unknown(unsigned bogus_id, char *filename, hid_t fapl)
/* 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)
+ if((gid = H5Gopen2(fid, "group", H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR
loc = gid;
} else
@@ -597,7 +590,7 @@ test_unknown(unsigned bogus_id, char *filename, hid_t fapl)
/* 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)
+ if((gid = H5Gopen2(fid, "group", H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR
loc = gid;
} else
@@ -643,7 +636,7 @@ test_unknown(unsigned bogus_id, char *filename, hid_t fapl)
/* 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)
+ if((gid = H5Gopen2(fid, "group", H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR
loc = gid;
} else
@@ -661,7 +654,7 @@ test_unknown(unsigned bogus_id, char *filename, hid_t fapl)
if(H5Dclose(did) < 0)
FAIL_STACK_ERROR
- /* Closing: filename */
+ /* Closing: filename */
if(bogus_id == H5O_BOGUS_INVALID_ID)
if(H5Gclose(gid) < 0)
FAIL_STACK_ERROR
@@ -686,7 +679,7 @@ test_unknown(unsigned bogus_id, char *filename, hid_t fapl)
/* 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)
+ if((gid_bogus = H5Gopen2(fid_bogus, "group", H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR
loc_bogus = gid_bogus;
} else
@@ -717,7 +710,7 @@ test_unknown(unsigned bogus_id, char *filename, hid_t fapl)
/* Closing: FILE_BOGUS */
if(bogus_id == H5O_BOGUS_INVALID_ID)
if(H5Gclose(gid_bogus) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR
if(H5Fclose(fid_bogus) < 0)
FAIL_STACK_ERROR
@@ -739,49 +732,110 @@ error:
return FAIL;
} /* test_unknown() */
-
+#define STR_EARLIEST "earliest"
+#define STR_V18 "v18"
+#define STR_LATEST "latest"
+static char *
+version_string(H5F_libver_t libver)
+{
+ char *str = NULL;
+
+ str = (char *) HDmalloc(20);
+ if (str == NULL) {
+ HDfprintf(stderr, "Allocation failed\n");
+ HDexit(1);
+ }
+
+ switch(libver) {
+ case H5F_LIBVER_EARLIEST:
+ HDstrcpy(str, STR_EARLIEST);
+ break;
+
+ case H5F_LIBVER_V18:
+ HDstrcpy(str, STR_V18);
+ break;
+
+ case H5F_LIBVER_V110:
+ HDassert(H5F_LIBVER_LATEST == H5F_LIBVER_V110);
+ HDstrcpy(str, STR_LATEST);
+ break;
+
+ case H5F_LIBVER_ERROR:
+ case H5F_LIBVER_NBOUNDS:
+ default:
+ HDsprintf(str, "%ld", (long)libver);
+ break;
+ } /* end switch */
+
+ /* Return the formed version bound string */
+ return str;
+} /* end of version_string */
+
+
/*-------------------------------------------------------------------------
- * Function: main
+ * Function: main
*
* Purpose: Exercise private object header behavior and routines
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Tuesday, November 24, 1998
*
+ * Modification:
+ * - Added loop of combinations of low/high library format bounds
+ * (BMR, Feb 2018)
+ *
*-------------------------------------------------------------------------
*/
int
main(void)
{
- hid_t fapl = -1, file = -1;
- H5F_t *f = NULL;
- char filename[1024];
- H5O_hdr_info_t hdr_info; /* Object info */
- H5O_loc_t oh_loc; /* Object header locations */
- time_t time_new, ro;
- int i; /* Local index variable */
- unsigned b; /* Index for "new format" loop */
- herr_t ret; /* Generic return value */
+ hid_t fapl = -1;
+ hid_t file = -1;
+ H5F_t *f = NULL;
+ char filename[1024];
+ H5O_hdr_info_t hdr_info; /* Object info */
+ H5O_loc_t oh_loc; /* Object header locations */
+ H5F_libver_t low, high; /* File format bounds */
+ time_t time_new, ro;
+ char msg[80]; /* Message for file format version */
+ int i; /* Local index variable */
+ hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
+ herr_t ret; /* Generic return value */
/* Reset library */
h5_reset();
fapl = h5_fileaccess();
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
- /* Loop over old & new formats */
- for(b = FALSE; b <= TRUE; b++) {
- /* Display info about testing */
- if(b)
- HDputs("Using new file format:");
- else
- HDputs("Using default file format:");
+ /* Push API context */
+ if(H5CX_push() < 0) FAIL_STACK_ERROR
+ api_ctx_pushed = TRUE;
- /* Set the format to use for the file */
- if(H5Pset_libver_bounds(fapl, (b ? H5F_LIBVER_LATEST : H5F_LIBVER_EARLIEST), H5F_LIBVER_LATEST) < 0)
- FAIL_STACK_ERROR
+ /* Loop through all the combinations of low/high library format bounds */
+ for(low = H5F_LIBVER_EARLIEST; low < H5F_LIBVER_NBOUNDS; low++) {
+ for(high = H5F_LIBVER_EARLIEST; high < H5F_LIBVER_NBOUNDS; high++) {
+ char *low_string = NULL;
+ char *high_string = NULL;
+
+ /* Set version bounds before opening the file */
+ H5E_BEGIN_TRY {
+ ret = H5Pset_libver_bounds(fapl, low, high);
+ } H5E_END_TRY;
+
+ if (ret < 0) /* Invalid low/high combinations */
+ continue;
+
+ /* Display info about testing */
+ low_string = version_string(low);
+ high_string = version_string(high);
+ sprintf(msg, "Using file format version: (%s, %s)", low_string,
+ high_string);
+ HDputs(msg);
+ HDfree(high_string);
+ HDfree(low_string);
/* test on object continuation block */
if(test_cont(filename, fapl) < 0)
@@ -804,22 +858,22 @@ main(void)
*/
TESTING("object header creation");
HDmemset(&oh_loc, 0, sizeof(oh_loc));
- if(H5O_create(f, H5AC_ind_read_dxpl_id, (size_t)64, (size_t)0, H5P_GROUP_CREATE_DEFAULT, &oh_loc/*out*/) < 0)
+ if(H5O_create(f, (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, H5AC_ind_read_dxpl_id) < 0)
+ if(H5O_msg_create(&oh_loc, H5O_MTIME_NEW_ID, 0, 0, &time_new) < 0)
FAIL_STACK_ERROR
- if(1 != H5O_link(&oh_loc, 1, H5AC_ind_read_dxpl_id))
+ if(1 != H5O_link(&oh_loc, 1))
FAIL_STACK_ERROR
- if(H5AC_flush(f, H5AC_ind_read_dxpl_id) < 0)
+ if(H5AC_flush(f) < 0)
FAIL_STACK_ERROR
- if(H5AC_expunge_entry(f, H5AC_ind_read_dxpl_id, H5AC_OHDR, oh_loc.addr, H5AC__NO_FLAGS_SET) < 0)
+ if(H5AC_expunge_entry(f, 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, H5AC_ind_read_dxpl_id))
+ if(NULL == H5O_msg_read(&oh_loc, H5O_MTIME_NEW_ID, &ro))
FAIL_STACK_ERROR
if(ro != time_new)
TEST_ERROR
@@ -830,19 +884,19 @@ main(void)
*/
TESTING("message modification");
time_new = 33333333;
- if(H5O_msg_write(&oh_loc, H5O_MTIME_NEW_ID, 0, 0, &time_new, H5AC_ind_read_dxpl_id) < 0)
+ if(H5O_msg_write(&oh_loc, H5O_MTIME_NEW_ID, 0, 0, &time_new) < 0)
FAIL_STACK_ERROR
- if(H5AC_flush(f, H5AC_ind_read_dxpl_id) < 0)
+ if(H5AC_flush(f) < 0)
FAIL_STACK_ERROR
- if(H5AC_expunge_entry(f, H5AC_ind_read_dxpl_id, H5AC_OHDR, oh_loc.addr, H5AC__NO_FLAGS_SET) < 0)
+ if(H5AC_expunge_entry(f, 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, H5AC_ind_read_dxpl_id))
+ if(NULL == H5O_msg_read(&oh_loc, H5O_MTIME_NEW_ID, &ro))
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, H5AC_ind_read_dxpl_id, &hdr_info) < 0)
+ if(H5O_get_hdr_info(&oh_loc, &hdr_info) < 0)
FAIL_STACK_ERROR
if(hdr_info.space.total >=256)
TEST_ERROR
@@ -860,16 +914,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, H5AC_ind_read_dxpl_id) < 0)
+ if(H5O_msg_create(&oh_loc, H5O_MTIME_ID, 0, 0, &time_new) < 0)
FAIL_STACK_ERROR
} /* end for */
- if(H5AC_flush(f, H5AC_ind_read_dxpl_id) < 0)
+ if(H5AC_flush(f) < 0)
FAIL_STACK_ERROR
- if(H5AC_expunge_entry(f, H5AC_ind_read_dxpl_id, H5AC_OHDR, oh_loc.addr, H5AC__NO_FLAGS_SET) < 0)
+ if(H5AC_expunge_entry(f, 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, H5AC_ind_read_dxpl_id, &hdr_info) < 0)
+ if(H5O_get_hdr_info(&oh_loc, &hdr_info) < 0)
FAIL_STACK_ERROR
if(hdr_info.space.total < 256)
TEST_ERROR
@@ -904,11 +958,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, H5AC_ind_read_dxpl_id) < 0)
+ if(H5O_msg_create(&oh_loc, H5O_MTIME_NEW_ID, 0, 0, &time_new) < 0)
FAIL_STACK_ERROR
- if(H5AC_flush(f, H5AC_ind_read_dxpl_id) < 0)
+ if(H5AC_flush(f) < 0)
FAIL_STACK_ERROR
- if(H5AC_expunge_entry(f, H5AC_ind_read_dxpl_id, H5AC_OHDR, oh_loc.addr, H5AC__NO_FLAGS_SET) < 0)
+ if(H5AC_expunge_entry(f, H5AC_OHDR, oh_loc.addr, H5AC__NO_FLAGS_SET) < 0)
FAIL_STACK_ERROR
} /* end for */
PASSED();
@@ -917,13 +971,13 @@ main(void)
* Delete all time messages.
*/
TESTING("message deletion");
- if(H5O_msg_remove(&oh_loc, H5O_MTIME_NEW_ID, H5O_ALL, TRUE, H5AC_ind_read_dxpl_id) < 0)
+ if(H5O_msg_remove(&oh_loc, H5O_MTIME_NEW_ID, H5O_ALL, TRUE) < 0)
FAIL_STACK_ERROR
- if(H5O_msg_remove(&oh_loc, H5O_MTIME_ID, H5O_ALL, TRUE, H5AC_ind_read_dxpl_id) < 0)
+ if(H5O_msg_remove(&oh_loc, H5O_MTIME_ID, H5O_ALL, TRUE) < 0)
FAIL_STACK_ERROR
- if(H5O_msg_read(&oh_loc, H5O_MTIME_NEW_ID, &ro, H5AC_ind_read_dxpl_id))
+ if(H5O_msg_read(&oh_loc, H5O_MTIME_NEW_ID, &ro))
FAIL_STACK_ERROR
- if(H5O_msg_read(&oh_loc, H5O_MTIME_ID, &ro, H5AC_ind_read_dxpl_id))
+ if(H5O_msg_read(&oh_loc, H5O_MTIME_ID, &ro))
FAIL_STACK_ERROR
PASSED();
@@ -934,23 +988,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, H5AC_ind_read_dxpl_id) < 0)
+ if(H5O_msg_create(&oh_loc, H5O_MTIME_NEW_ID, H5O_MSG_FLAG_CONSTANT, 0, &time_new) < 0)
FAIL_STACK_ERROR
- if(H5AC_flush(f, H5AC_ind_read_dxpl_id) < 0)
+ if(H5AC_flush(f) < 0)
FAIL_STACK_ERROR
- if(H5AC_expunge_entry(f, H5AC_ind_read_dxpl_id, H5AC_OHDR, oh_loc.addr, H5AC__NO_FLAGS_SET) < 0)
+ if(H5AC_expunge_entry(f, 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, H5AC_ind_read_dxpl_id))
+ if(NULL == H5O_msg_read(&oh_loc, H5O_MTIME_NEW_ID, &ro))
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, H5AC_ind_read_dxpl_id);
+ ret = H5O_msg_write(&oh_loc, H5O_MTIME_NEW_ID, 0, 0, &time_new);
} H5E_END_TRY;
if(ret >= 0)
TEST_ERROR
- if(H5O_msg_remove(&oh_loc, H5O_MTIME_NEW_ID, H5O_ALL, TRUE, H5AC_ind_read_dxpl_id) < 0)
+ if(H5O_msg_remove(&oh_loc, H5O_MTIME_NEW_ID, H5O_ALL, TRUE) < 0)
FAIL_STACK_ERROR
PASSED();
@@ -978,7 +1032,9 @@ main(void)
/* Test object header creation metadata cache issues */
if(test_ohdr_cache(filename, fapl) < 0)
TEST_ERROR
- } /* end for */
+
+ } /* high */
+ } /* low */
/* Verify symbol table messages are cached */
if(h5_verify_cached_stabs(FILENAME, fapl) < 0) TEST_ERROR
@@ -987,6 +1043,10 @@ main(void)
if(test_ohdr_swmr(TRUE) < 0) TEST_ERROR
if(test_ohdr_swmr(FALSE) < 0) TEST_ERROR
+ /* Pop API context */
+ if(api_ctx_pushed && H5CX_pop() < 0) FAIL_STACK_ERROR
+ api_ctx_pushed = FALSE;
+
HDputs("All object header tests passed.");
h5_cleanup(FILENAME, fapl);
return 0;
@@ -997,6 +1057,8 @@ error:
H5Fclose(file);
} H5E_END_TRY;
+ if(api_ctx_pushed) H5CX_pop();
+
return 1;
} /* end main() */
diff --git a/test/page_buffer.c b/test/page_buffer.c
index 54a25d6..a6e85ee 100644
--- a/test/page_buffer.c
+++ b/test/page_buffer.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/***********************************************************
@@ -23,9 +21,6 @@
#include "h5test.h"
-#include "H5PBprivate.h"
-#include "H5Iprivate.h"
-
/*
* This file needs to access private information from the H5F package.
*/
@@ -36,6 +31,10 @@
#define H5F_TESTING
#include "H5Fpkg.h"
+#include "H5CXprivate.h" /* API Contexts */
+#include "H5Iprivate.h"
+#include "H5PBprivate.h"
+
#define FILENAME_LEN 1024
#define NUM_DSETS 5
@@ -572,9 +571,6 @@ test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr)
hid_t file_id = -1; /* File ID */
hid_t fcpl = -1;
hid_t fapl = -1;
- H5FD_io_info_t fdio_info;
- H5P_genplist_t *meta_plist = (H5P_genplist_t *)H5I_object(H5AC_ind_read_dxpl_id);
- H5P_genplist_t *raw_plist = (H5P_genplist_t *)H5I_object(H5AC_rawdata_dxpl_id);
size_t base_page_cnt;
size_t page_count = 0;
int i, num_elements = 2000;
@@ -620,13 +616,13 @@ test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr)
TEST_ERROR;
/* allocate space for a 2000 elements */
- if(HADDR_UNDEF == (addr = H5MF_alloc(f, H5FD_MEM_DRAW, H5AC_ind_read_dxpl_id, sizeof(int)*(size_t)num_elements)))
+ if(HADDR_UNDEF == (addr = H5MF_alloc(f, H5FD_MEM_DRAW, sizeof(int)*(size_t)num_elements)))
FAIL_STACK_ERROR;
/* intialize all the elements to have a value of -1 */
for(i=0 ; i<num_elements ; i++)
data[i] = -1;
- if(H5F_block_write(f, H5FD_MEM_DRAW, addr, sizeof(int)*(size_t)num_elements, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, addr, sizeof(int)*(size_t)num_elements, data) < 0)
FAIL_STACK_ERROR;
/* update the first 50 elements to have values 0-49 - this will be
@@ -636,7 +632,7 @@ test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr)
for(i=0 ; i<100 ; i++)
data[i] = i;
- if(H5F_block_write(f, H5FD_MEM_DRAW, addr, sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, addr, sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
page_count ++;
@@ -648,7 +644,7 @@ test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr)
bring two more pages into the page buffer. */
for(i=0 ; i<150 ; i++)
data[i] = i+300;
- if(H5F_block_write(f, H5FD_MEM_DRAW, addr+(sizeof(int)*300), sizeof(int)*150, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, addr+(sizeof(int)*300), sizeof(int)*150, data) < 0)
FAIL_STACK_ERROR;
page_count += 2;
if(H5SL_count(f->shared->page_buf->slist_ptr) != page_count + base_page_cnt)
@@ -658,7 +654,7 @@ test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr)
existing pages in the page buffer. */
for(i=0 ; i<200 ; i++)
data[i] = i+100;
- if(H5F_block_write(f, H5FD_MEM_DRAW, addr+(sizeof(int)*100), sizeof(int)*200, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, addr+(sizeof(int)*100), sizeof(int)*200, data) < 0)
FAIL_STACK_ERROR;
if(H5SL_count(f->shared->page_buf->slist_ptr) != page_count + base_page_cnt)
FAIL_STACK_ERROR;
@@ -667,7 +663,7 @@ test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr)
/* Changes: 450 - 600; 150 */
for(i=0 ; i<150 ; i++)
data[i] = i+450;
- if(H5F_block_write(f, H5FD_MEM_DRAW, addr+(sizeof(int)*450), sizeof(int)*150, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, addr+(sizeof(int)*450), sizeof(int)*150, data) < 0)
FAIL_STACK_ERROR;
if(H5SL_count(f->shared->page_buf->slist_ptr) != page_count + base_page_cnt)
FAIL_STACK_ERROR;
@@ -675,13 +671,13 @@ test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr)
/* Do a full page write to block 600-800 - should bypass the PB */
for(i=0 ; i<200 ; i++)
data[i] = i+600;
- if(H5F_block_write(f, H5FD_MEM_DRAW, addr+(sizeof(int)*600), sizeof(int)*200, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, addr+(sizeof(int)*600), sizeof(int)*200, data) < 0)
FAIL_STACK_ERROR;
if(H5SL_count(f->shared->page_buf->slist_ptr) != page_count + base_page_cnt)
FAIL_STACK_ERROR;
/* read elements 800 - 1200, this should not affect the PB, and should read -1s */
- if(H5F_block_read(f, H5FD_MEM_DRAW, addr+(sizeof(int)*800), sizeof(int)*400, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_read(f, H5FD_MEM_DRAW, addr+(sizeof(int)*800), sizeof(int)*400, data) < 0)
FAIL_STACK_ERROR;
for (i=0; i < 400; i++) {
if(data[i] != -1) {
@@ -695,7 +691,7 @@ test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr)
/* read elements 1200 - 1201, this should read -1 and bring in an
* entire page of addr 1200
*/
- if(H5F_block_read(f, H5FD_MEM_DRAW, addr+(sizeof(int)*1200), sizeof(int)*1, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_read(f, H5FD_MEM_DRAW, addr+(sizeof(int)*1200), sizeof(int)*1, data) < 0)
FAIL_STACK_ERROR;
for (i=0; i < 1; i++) {
if(data[i] != -1) {
@@ -710,7 +706,7 @@ test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr)
/* read elements 175 - 225, this should use the PB existing pages */
/* Changes: 350 - 450 */
/* read elements 175 - 225, this should use the PB existing pages */
- if(H5F_block_read(f, H5FD_MEM_DRAW, addr+(sizeof(int)*350), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_read(f, H5FD_MEM_DRAW, addr+(sizeof(int)*350), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
for (i=0; i < 100; i++) {
if(data[i] != i+350) {
@@ -723,10 +719,7 @@ test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr)
/* read elements 0 - 800 using the VFD.. this should result in -1s
except for the writes that went through the PB (100-300 & 600-800) */
- fdio_info.file = f->shared->lf;
- fdio_info.meta_dxpl = meta_plist;
- fdio_info.raw_dxpl = raw_plist;
- if(H5FD_read(&fdio_info, H5FD_MEM_DRAW, addr, sizeof(int)*800, data) < 0)
+ if(H5FD_read(f->shared->lf, H5FD_MEM_DRAW, addr, sizeof(int)*800, data) < 0)
FAIL_STACK_ERROR;
i = 0;
while (i < 800) {
@@ -748,7 +741,7 @@ test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr)
/* read elements 0 - 800 using the PB.. this should result in all
* what we have written so far and should get the updates from the PB
*/
- if(H5F_block_read(f, H5FD_MEM_DRAW, addr, sizeof(int)*800, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_read(f, H5FD_MEM_DRAW, addr, sizeof(int)*800, data) < 0)
FAIL_STACK_ERROR;
if(H5SL_count(f->shared->page_buf->slist_ptr) != page_count + base_page_cnt)
TEST_ERROR;
@@ -765,7 +758,7 @@ test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr)
*/
for(i=0 ; i<1000 ; i++)
data[i] = 0;
- if(H5F_block_write(f, H5FD_MEM_DRAW, addr+(sizeof(int)*400), sizeof(int)*1000, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, addr+(sizeof(int)*400), sizeof(int)*1000, data) < 0)
FAIL_STACK_ERROR;
page_count -= 2;
if(H5SL_count(f->shared->page_buf->slist_ptr) != page_count + base_page_cnt)
@@ -774,7 +767,7 @@ test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr)
/* read elements 0 - 1000.. this should go to disk then update the
* buffer result 200-400 with existing pages
*/
- if(H5F_block_read(f, H5FD_MEM_DRAW, addr, sizeof(int)*1000, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_read(f, H5FD_MEM_DRAW, addr, sizeof(int)*1000, data) < 0)
FAIL_STACK_ERROR;
i=0;
while (i < 1000) {
@@ -906,14 +899,14 @@ test_lru_processing(hid_t orig_fapl, const char *env_h5_drvr)
TEST_ERROR;
/* allocate space for a 2000 elements */
- if(HADDR_UNDEF == (addr = H5MF_alloc(f, H5FD_MEM_DRAW, H5AC_ind_read_dxpl_id, sizeof(int)*(size_t)num_elements)))
+ if(HADDR_UNDEF == (addr = H5MF_alloc(f, H5FD_MEM_DRAW, sizeof(int)*(size_t)num_elements)))
FAIL_STACK_ERROR;
/* intialize all the elements to have a value of -1 */
for(i=0 ; i<num_elements ; i++)
data[i] = -1;
- if(H5F_block_write(f, H5FD_MEM_DRAW, addr, sizeof(int)*(size_t)num_elements, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, addr, sizeof(int)*(size_t)num_elements, data) < 0)
FAIL_STACK_ERROR;
/* update the first 100 elements to have values 0-99 - this will be
@@ -923,7 +916,7 @@ test_lru_processing(hid_t orig_fapl, const char *env_h5_drvr)
for(i=0 ; i<100 ; i++)
data[i] = i;
- if(H5F_block_write(f, H5FD_MEM_DRAW, addr, sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, addr, sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
page_count ++;
@@ -937,7 +930,7 @@ test_lru_processing(hid_t orig_fapl, const char *env_h5_drvr)
for(i=0 ; i<150 ; i++)
data[i] = i+300;
- if(H5F_block_write(f, H5FD_MEM_DRAW, addr+(sizeof(int)*300), sizeof(int)*150, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, addr+(sizeof(int)*300), sizeof(int)*150, data) < 0)
FAIL_STACK_ERROR;
page_count = 2;
@@ -966,7 +959,7 @@ test_lru_processing(hid_t orig_fapl, const char *env_h5_drvr)
/* Changes: 300 - 301 */
for(i=0 ; i<1 ; i++)
data[i] = i+300;
- if(H5F_block_write(f, H5FD_MEM_DRAW, addr+(sizeof(int)*300), sizeof(int)*1, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, addr+(sizeof(int)*300), sizeof(int)*1, data) < 0)
FAIL_STACK_ERROR;
if(H5SL_count(f->shared->page_buf->slist_ptr) != page_count)
FAIL_STACK_ERROR;
@@ -974,7 +967,7 @@ test_lru_processing(hid_t orig_fapl, const char *env_h5_drvr)
/* read elements 600 - 601, this should read -1 and bring in an
entire page of addr 600, and evict page 200 */
/* Changes: 1200 - 1201; 1200, 400 */
- if(H5F_block_read(f, H5FD_MEM_DRAW, addr+(sizeof(int)*1200), sizeof(int)*1, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_read(f, H5FD_MEM_DRAW, addr+(sizeof(int)*1200), sizeof(int)*1, data) < 0)
FAIL_STACK_ERROR;
for (i=0; i < 1; i++) {
if(data[i] != -1) {
@@ -1001,7 +994,7 @@ test_lru_processing(hid_t orig_fapl, const char *env_h5_drvr)
FAIL_STACK_ERROR;
/* read elements 175 - 225, this should move 100 to the top, evict 600 and bring in 200 */
/* Changes: 350 - 450; 200, 1200, 400 */
- if(H5F_block_read(f, H5FD_MEM_DRAW, addr+(sizeof(int)*350), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_read(f, H5FD_MEM_DRAW, addr+(sizeof(int)*350), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
for (i=0; i < 100; i++) {
if(data[i] != i+350) {
@@ -1032,7 +1025,7 @@ test_lru_processing(hid_t orig_fapl, const char *env_h5_drvr)
/* Changes: 400 - 1400; 400 */
for(i=0 ; i<1000 ; i++)
data[i] = 0;
- if(H5F_block_write(f, H5FD_MEM_DRAW, addr+(sizeof(int)*400), sizeof(int)*1000, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, addr+(sizeof(int)*400), sizeof(int)*1000, data) < 0)
FAIL_STACK_ERROR;
page_count -= 1;
if(H5SL_count(f->shared->page_buf->slist_ptr) != page_count)
@@ -1180,10 +1173,10 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr)
if(page_buf->min_raw_count != 0)
TEST_ERROR;
- if(HADDR_UNDEF == (meta_addr = H5MF_alloc(f, H5FD_MEM_SUPER, H5AC_ind_read_dxpl_id, sizeof(int)*(size_t)num_elements)))
+ if(HADDR_UNDEF == (meta_addr = H5MF_alloc(f, H5FD_MEM_SUPER, sizeof(int)*(size_t)num_elements)))
FAIL_STACK_ERROR;
- if(HADDR_UNDEF == (raw_addr = H5MF_alloc(f, H5FD_MEM_DRAW, H5AC_ind_read_dxpl_id, sizeof(int)*(size_t)num_elements)))
+ if(HADDR_UNDEF == (raw_addr = H5MF_alloc(f, H5FD_MEM_DRAW, sizeof(int)*(size_t)num_elements)))
FAIL_STACK_ERROR;
/* write all raw data, this would end up in page buffer since there
@@ -1194,19 +1187,19 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr)
for(i=0 ; i<100 ; i++)
data[i] = i;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr, sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr, sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*200), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*200), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*400), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*400), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*600), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*600), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*800), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*800), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
page_count += 5;
@@ -1218,19 +1211,19 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr)
TEST_ERROR;
/* write all meta data, this would end up in page buffer */
- if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr, sizeof(int)*100, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr, sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*200), sizeof(int)*50, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*200), sizeof(int)*50, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*400), sizeof(int)*50, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*400), sizeof(int)*50, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_read(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*600), sizeof(int)*50, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_read(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*600), sizeof(int)*50, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_read(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*800), sizeof(int)*50, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_read(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*800), sizeof(int)*50, data) < 0)
FAIL_STACK_ERROR;
if(H5SL_count(f->shared->page_buf->slist_ptr) != page_count)
@@ -1246,19 +1239,19 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr)
* page buffer since the minimum metadata is actually the entire
* page buffer
*/
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*200), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*200), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*350), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*350), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_read(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*500), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_read(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*500), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_read(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*750), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_read(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*750), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_read(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*900), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_read(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*900), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
if(H5SL_count(f->shared->page_buf->slist_ptr) != page_count)
@@ -1314,10 +1307,10 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr)
if(page_buf->min_raw_count != 5)
FAIL_STACK_ERROR;
- if(HADDR_UNDEF == (meta_addr = H5MF_alloc(f, H5FD_MEM_SUPER, H5AC_ind_read_dxpl_id, sizeof(int)*(size_t)num_elements)))
+ if(HADDR_UNDEF == (meta_addr = H5MF_alloc(f, H5FD_MEM_SUPER, sizeof(int)*(size_t)num_elements)))
FAIL_STACK_ERROR;
- if(HADDR_UNDEF == (raw_addr = H5MF_alloc(f, H5FD_MEM_DRAW, H5AC_ind_read_dxpl_id, sizeof(int)*(size_t)num_elements)))
+ if(HADDR_UNDEF == (raw_addr = H5MF_alloc(f, H5FD_MEM_DRAW, sizeof(int)*(size_t)num_elements)))
TEST_ERROR;
/* write all meta data, this would end up in page buffer since there
@@ -1326,19 +1319,19 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr)
for(i=0 ; i<100 ; i++)
data[i] = i;
- if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr, sizeof(int)*100, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr, sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*200), sizeof(int)*100, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*200), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*400), sizeof(int)*100, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*400), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*600), sizeof(int)*100, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*600), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*800), sizeof(int)*100, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*800), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
page_count += 5;
@@ -1349,19 +1342,19 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr)
TEST_ERROR;
/* write/read all raw data, this would end up in page buffer */
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr, sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr, sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*200), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*200), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*400), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*400), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_read(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*600), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_read(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*600), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_read(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*800), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_read(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*800), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
if(H5SL_count(f->shared->page_buf->slist_ptr) != page_count)
@@ -1377,19 +1370,19 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr)
* page buffer since the minimum metadata is actually the entire
* page buffer
*/
- if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*100), sizeof(int)*50, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*100), sizeof(int)*50, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*350), sizeof(int)*50, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*350), sizeof(int)*50, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_read(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*500), sizeof(int)*50, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_read(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*500), sizeof(int)*50, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_read(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*750), sizeof(int)*50, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_read(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*750), sizeof(int)*50, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_read(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*900), sizeof(int)*50, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_read(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*900), sizeof(int)*50, data) < 0)
FAIL_STACK_ERROR;
if(H5SL_count(f->shared->page_buf->slist_ptr) != page_count)
@@ -1441,39 +1434,39 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr)
if(page_buf->min_raw_count != 2)
TEST_ERROR;
- if(HADDR_UNDEF == (meta_addr = H5MF_alloc(f, H5FD_MEM_SUPER, H5AC_ind_read_dxpl_id, sizeof(int)*(size_t)num_elements)))
+ if(HADDR_UNDEF == (meta_addr = H5MF_alloc(f, H5FD_MEM_SUPER, sizeof(int)*(size_t)num_elements)))
FAIL_STACK_ERROR;
- if(HADDR_UNDEF == (raw_addr = H5MF_alloc(f, H5FD_MEM_DRAW, H5AC_ind_read_dxpl_id, sizeof(int)*(size_t)num_elements)))
+ if(HADDR_UNDEF == (raw_addr = H5MF_alloc(f, H5FD_MEM_DRAW, sizeof(int)*(size_t)num_elements)))
FAIL_STACK_ERROR;
/* intialize all the elements to have a value of -1 */
for(i=0 ; i<num_elements ; i++)
data[i] = -1;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr, sizeof(int)*(size_t)num_elements, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr, sizeof(int)*(size_t)num_elements, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr, sizeof(int)*(size_t)num_elements, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr, sizeof(int)*(size_t)num_elements, data) < 0)
FAIL_STACK_ERROR;
/* fill the page buffer with raw data */
for(i=0 ; i<100 ; i++)
data[i] = i;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr, sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr, sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*200), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*200), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*400), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*400), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*600), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*600), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*800), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*800), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
page_count += 5;
@@ -1485,13 +1478,13 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr)
TEST_ERROR;
/* add 3 meta entries evicting 3 raw entries */
- if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr, sizeof(int)*100, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr, sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*200), sizeof(int)*100, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*200), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*400), sizeof(int)*100, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*400), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
if(H5SL_count(f->shared->page_buf->slist_ptr) != page_count)
@@ -1506,10 +1499,10 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr)
/* adding more meta entires should replace meta entries since raw data
* is at its minimum
*/
- if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*600), sizeof(int)*100, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*600), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*800), sizeof(int)*100, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*800), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
if(f->shared->page_buf->meta_count != 3)
@@ -1519,13 +1512,13 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr)
TEST_ERROR;
/* bring existing raw entires up the LRU */
- if(H5F_block_read(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*750), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_read(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*750), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
/* adding 2 raw entries (even with 1 call) should only evict 1 meta
* entry and another raw entry
*/
- if(H5F_block_read(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*350), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_read(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*350), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
if(f->shared->page_buf->meta_count != 2)
@@ -1535,10 +1528,10 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr)
TEST_ERROR;
/* adding 2 meta entries should replace 2 entires at the bottom of the LRU */
- if(H5F_block_read(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*98), sizeof(int)*100, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_read(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*98), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_read(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*242), sizeof(int)*100, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_read(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*242), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
if(f->shared->page_buf->meta_count != 2)
@@ -1568,39 +1561,39 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr)
if(page_buf->min_raw_count != 0)
TEST_ERROR;
- if(HADDR_UNDEF == (meta_addr = H5MF_alloc(f, H5FD_MEM_SUPER, H5AC_ind_read_dxpl_id, sizeof(int)*(size_t)num_elements)))
+ if(HADDR_UNDEF == (meta_addr = H5MF_alloc(f, H5FD_MEM_SUPER, sizeof(int)*(size_t)num_elements)))
FAIL_STACK_ERROR;
- if(HADDR_UNDEF == (raw_addr = H5MF_alloc(f, H5FD_MEM_DRAW, H5AC_ind_read_dxpl_id, sizeof(int)*(size_t)num_elements)))
+ if(HADDR_UNDEF == (raw_addr = H5MF_alloc(f, H5FD_MEM_DRAW, sizeof(int)*(size_t)num_elements)))
FAIL_STACK_ERROR;
/* intialize all the elements to have a value of -1 */
for(i=0 ; i<num_elements ; i++)
data[i] = -1;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr, sizeof(int)*(size_t)num_elements, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr, sizeof(int)*(size_t)num_elements, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr, sizeof(int)*(size_t)num_elements, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr, sizeof(int)*(size_t)num_elements, data) < 0)
FAIL_STACK_ERROR;
/* fill the page buffer with raw data */
for(i=0 ; i<100 ; i++)
data[i] = i;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr, sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr, sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*200), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*200), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*400), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*400), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*600), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*600), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*800), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*800), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
page_count += 5;
@@ -1609,10 +1602,10 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr)
FAIL_STACK_ERROR;
/* add 2 meta entries evicting 2 raw entries */
- if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr, sizeof(int)*100, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr, sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*200), sizeof(int)*100, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*200), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
if(H5SL_count(f->shared->page_buf->slist_ptr) != page_count)
@@ -1625,17 +1618,17 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr)
TEST_ERROR;
/* bring the rest of the raw entries up the LRU */
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*500), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*500), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*700), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*700), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*900), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*900), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
/* write one more raw entry which replace one meta entry */
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*100), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*100), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
if(H5SL_count(f->shared->page_buf->slist_ptr) != page_count)
@@ -1650,7 +1643,7 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr)
/* write one more raw entry which should replace another raw entry
* keeping min threshold of meta entries
*/
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*300), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*300), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
if(H5SL_count(f->shared->page_buf->slist_ptr) != page_count)
@@ -1665,7 +1658,7 @@ test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr)
/* write a metadata entry that should replace the metadata entry
* at the bottom of the LRU
*/
- if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*500), sizeof(int)*100, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*500), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
if(H5SL_count(f->shared->page_buf->slist_ptr) != page_count)
@@ -1807,10 +1800,10 @@ test_stats_collection(hid_t orig_fapl, const char *env_h5_drvr)
if(H5Freset_page_buffering_stats(file_id) < 0)
FAIL_STACK_ERROR;
- if(HADDR_UNDEF == (meta_addr = H5MF_alloc(f, H5FD_MEM_SUPER, H5AC_ind_read_dxpl_id, sizeof(int)*(size_t)num_elements)))
+ if(HADDR_UNDEF == (meta_addr = H5MF_alloc(f, H5FD_MEM_SUPER, sizeof(int)*(size_t)num_elements)))
FAIL_STACK_ERROR;
- if(HADDR_UNDEF == (raw_addr = H5MF_alloc(f, H5FD_MEM_DRAW, H5AC_ind_read_dxpl_id, sizeof(int)*(size_t)num_elements)))
+ if(HADDR_UNDEF == (raw_addr = H5MF_alloc(f, H5FD_MEM_DRAW, sizeof(int)*(size_t)num_elements)))
FAIL_STACK_ERROR;
@@ -1818,88 +1811,88 @@ test_stats_collection(hid_t orig_fapl, const char *env_h5_drvr)
for(i=0 ; i<num_elements ; i++)
data[i] = -1;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr, sizeof(int)*(size_t)num_elements, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr, sizeof(int)*(size_t)num_elements, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr, sizeof(int)*(size_t)num_elements, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr, sizeof(int)*(size_t)num_elements, data) < 0)
FAIL_STACK_ERROR;
for(i=0 ; i<200 ; i++)
data[i] = i;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr, sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr, sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*200), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*200), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*400), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*400), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr, sizeof(int)*100, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr, sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*200), sizeof(int)*100, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*200), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*600), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*600), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*800), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*800), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*600), sizeof(int)*100, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*600), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*500), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*500), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*700), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*700), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*900), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*900), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*400), sizeof(int)*200, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*400), sizeof(int)*200, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*100), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*100), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*300), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*300), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*800), sizeof(int)*182, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_write(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*800), sizeof(int)*182, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_read(f, H5FD_MEM_DRAW, raw_addr, sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_read(f, H5FD_MEM_DRAW, raw_addr, sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_read(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*200), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_read(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*200), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_read(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*400), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_read(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*400), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_read(f, H5FD_MEM_SUPER, meta_addr, sizeof(int)*100, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_read(f, H5FD_MEM_SUPER, meta_addr, sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_read(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*200), sizeof(int)*100, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_read(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*200), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_read(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*600), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_read(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*600), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_read(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*800), sizeof(int)*100, H5AC_rawdata_dxpl_id, data) < 0)
+ if(H5F_block_read(f, H5FD_MEM_DRAW, raw_addr+(sizeof(int)*800), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_read(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*400), sizeof(int)*100, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_read(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*400), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_read(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*600), sizeof(int)*200, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_read(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*600), sizeof(int)*200, data) < 0)
FAIL_STACK_ERROR;
- if(H5F_block_read(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*800), sizeof(int)*100, H5AC_ind_read_dxpl_id, data) < 0)
+ if(H5F_block_read(f, H5FD_MEM_SUPER, meta_addr+(sizeof(int)*800), sizeof(int)*100, data) < 0)
FAIL_STACK_ERROR;
if(f->shared->page_buf->accesses[0] != 8)
@@ -2144,6 +2137,7 @@ main(void)
hid_t fapl = -1; /* File access property list for data files */
unsigned nerrors = 0; /* Cumulative error count */
const char *env_h5_drvr = NULL; /* File Driver value from environment */
+ hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
h5_reset();
@@ -2169,6 +2163,10 @@ main(void)
PUTS_ERROR("Can't get VFD-dependent fapl")
} /* end if */
+ /* Push API context */
+ if(H5CX_push() < 0) FAIL_STACK_ERROR
+ api_ctx_pushed = TRUE;
+
#ifdef H5_HAVE_PARALLEL
HDputs("Page Buffering is disabled for parallel.");
@@ -2189,12 +2187,15 @@ main(void)
if(nerrors)
goto error;
+ /* Pop API context */
+ if(api_ctx_pushed && H5CX_pop() < 0) FAIL_STACK_ERROR
+ api_ctx_pushed = FALSE;
+
HDputs("All Page Buffering tests passed.");
HDexit(EXIT_SUCCESS);
error:
-
HDprintf("***** %d Page Buffering TEST%s FAILED! *****\n",
nerrors, nerrors > 1 ? "S" : "");
@@ -2202,7 +2203,8 @@ error:
H5Pclose(fapl);
} H5E_END_TRY;
- HDexit(EXIT_FAILURE);
+ if(api_ctx_pushed) H5CX_pop();
+ HDexit(EXIT_FAILURE);
} /* main() */
diff --git a/test/plugin.c b/test/plugin.c
deleted file mode 100644
index 2939595..0000000
--- a/test/plugin.c
+++ /dev/null
@@ -1,1073 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group. *
- * All rights reserved. *
- * *
- * This file is part of HDF5. The full HDF5 copyright notice, including *
- * terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic document set and is *
- * linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have access *
- * to either file, you may request a copy from help@hdfgroup.org. *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/*
- * Programmer: Raymond Lu
- * 13 February 2013
- *
- * Purpose: Tests the plugin module (H5PL)
- */
-
-#include "h5test.h"
-#include "H5srcdir.h"
-
-/*
- * This file needs to access private datatypes from the H5Z and H5PL package.
- */
-#define H5PL_FRIEND
-#include "H5PLpkg.h"
-#define H5Z_FRIEND
-#include "H5Zpkg.h"
-
-/* Filters for HDF5 internal test */
-#define H5Z_FILTER_DYNLIB1 257
-#define H5Z_FILTER_DYNLIB2 258
-#define H5Z_FILTER_DYNLIB3 259
-#define H5Z_FILTER_DYNLIB4 260
-
-const char *FILENAME[] = {
- "plugin",
- NULL
-};
-#define FILENAME_BUF_SIZE 1024
-
-/* Dataset names for testing filters */
-#define DSET_DEFLATE_NAME "deflate"
-#define DSET_DYNLIB1_NAME "dynlib1"
-#define DSET_DYNLIB2_NAME "dynlib2"
-#define DSET_DYNLIB4_NAME "dynlib4"
-
-/* Parameters for internal filter test */
-#define FILTER_CHUNK_DIM1 2
-#define FILTER_CHUNK_DIM2 25
-#define FILTER_HS_OFFSET1 7
-#define FILTER_HS_OFFSET2 30
-#define FILTER_HS_SIZE1 4
-#define FILTER_HS_SIZE2 50
-
-/* Shared global arrays */
-#define DSET_DIM1 100
-#define DSET_DIM2 200
-
-/* Limit random number within 20000 */
-#define RANDOM_LIMIT 20000
-
-#define GROUP_ITERATION 1000
-
-int points_deflate[DSET_DIM1][DSET_DIM2],
- points_dynlib1[DSET_DIM1][DSET_DIM2],
- points_dynlib2[DSET_DIM1][DSET_DIM2],
- points_dynlib4[DSET_DIM1][DSET_DIM2],
- points_bzip2[DSET_DIM1][DSET_DIM2];
-
-
-/*-------------------------------------------------------------------------
- * Function: test_filter_internal
- *
- * Purpose: Tests writing entire data and partial data with filters
- *
- * Return: Success: 0
- * Failure: -1
- *-------------------------------------------------------------------------
- */
-static herr_t
-test_filter_internal(hid_t fid, const char *name, hid_t dcpl)
-{
- herr_t ret_value = -1;
- hid_t dataset = -1; /* Dataset ID */
- hid_t dxpl = -1; /* Dataset xfer property list ID */
- hid_t write_dxpl = -1; /* Dataset xfer property list ID for writing */
- hid_t sid = -1; /* Dataspace ID */
- const hsize_t size[2] = {DSET_DIM1, DSET_DIM2}; /* Dataspace dimensions */
- const hsize_t hs_offset[2] = {FILTER_HS_OFFSET1, FILTER_HS_OFFSET2}; /* Hyperslab offset */
- const hsize_t hs_size[2] = {FILTER_HS_SIZE1, FILTER_HS_SIZE2}; /* Hyperslab size */
- void *tconv_buf = NULL; /* Temporary conversion buffer */
- int points[DSET_DIM1][DSET_DIM2], check[DSET_DIM1][DSET_DIM2];
- size_t i, j; /* Local index variables */
- int n = 0;
-
- /* Create the data space */
- if((sid = H5Screate_simple(2, size, NULL)) < 0) TEST_ERROR
-
- /*
- * Create a small conversion buffer to test strip mining. We
- * might as well test all we can!
- */
- if((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0) TEST_ERROR
- tconv_buf = HDmalloc((size_t)1000);
- if(H5Pset_buffer(dxpl, (size_t)1000, tconv_buf, NULL) < 0) TEST_ERROR
- if((write_dxpl = H5Pcopy(dxpl)) < 0) TEST_ERROR;
-
- TESTING(" filters (setup)");
-
- /* Check if all the filters are available */
- if(H5Pall_filters_avail(dcpl) != TRUE) {
- H5_FAILED();
- HDprintf(" Line %d: Incorrect filter availability\n", __LINE__);
- TEST_ERROR
- } /* end if */
-
- /* Create the dataset */
- if((dataset = H5Dcreate2(fid, name, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) TEST_ERROR
-
- PASSED();
-
- /*----------------------------------------------------------------------
- * STEP 1: Read uninitialized data. It should be zero.
- *----------------------------------------------------------------------
- */
- TESTING(" filters (uninitialized read)");
-
- if(H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, check) < 0) TEST_ERROR;
-
- for(i=0; i<(size_t)size[0]; i++)
- for(j=0; j<(size_t)size[1]; j++)
- if(0 != check[i][j]) {
- H5_FAILED();
- HDprintf(" Read a non-zero value.\n");
- HDprintf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
- TEST_ERROR
- } /* end if */
- PASSED();
-
- /*----------------------------------------------------------------------
- * STEP 2: Test filters by setting up a chunked dataset and writing
- * to it.
- *----------------------------------------------------------------------
- */
- TESTING(" filters (write)");
-
- n = 0;
- for(i=0; i<size[0]; i++)
- for(j=0; j<size[1]; j++)
- points[i][j] = (int)(n++);
-
- if(H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, write_dxpl, points) < 0) TEST_ERROR;
-
- PASSED();
-
- /*----------------------------------------------------------------------
- * STEP 3: Try to read the data we just wrote.
- *----------------------------------------------------------------------
- */
- TESTING(" filters (read)");
-
- /* Read the dataset back */
- if(H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, check) < 0) TEST_ERROR;
-
- /* Check that the values read are the same as the values written */
- for(i=0; i<size[0]; i++)
- for(j=0; j<size[1]; j++)
- if(points[i][j] != check[i][j]) {
- H5_FAILED();
- HDfprintf(stderr," Read different values than written.\n");
- HDfprintf(stderr," At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
- HDfprintf(stderr," At original: %d\n", (int)points[i][j]);
- HDfprintf(stderr," At returned: %d\n", (int)check[i][j]);
- TEST_ERROR
- } /* end if */
-
- PASSED();
-
- /*----------------------------------------------------------------------
- * STEP 4: Write new data over the top of the old data. The new data is
- * random thus not very compressible, and will cause the chunks to move
- * around as they grow. We only change values for the left half of the
- * dataset although we rewrite the whole thing.
- *----------------------------------------------------------------------
- */
- TESTING(" filters (modify)");
-
- for(i=0; i<size[0]; i++)
- for(j=0; j<size[1]/2; j++)
- points[i][j] = (int)HDrandom () % RANDOM_LIMIT;
-
- if(H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, write_dxpl, points) < 0) TEST_ERROR;
-
- /* Read the dataset back and check it */
- if(H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, check) < 0) TEST_ERROR;
-
- /* Check that the values read are the same as the values written */
- for(i=0; i<size[0]; i++)
- for(j=0; j<size[1]; j++)
- if(points[i][j] != check[i][j]) {
- H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
- TEST_ERROR
- } /* end if */
-
- PASSED();
-
- /*----------------------------------------------------------------------
- * STEP 5: Close the dataset and then open it and read it again. This
- * insures that the filters message is picked up properly from the
- * object header.
- *----------------------------------------------------------------------
- */
- TESTING(" filters (re-open)");
-
- if(H5Dclose(dataset) < 0) TEST_ERROR;
- if((dataset = H5Dopen2(fid, name, H5P_DEFAULT)) < 0) TEST_ERROR;
-
- if(H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, check) < 0) TEST_ERROR;
-
- /* Check that the values read are the same as the values written */
- for(i = 0; i < size[0]; i++)
- for(j = 0; j < size[1]; j++)
- if(points[i][j] != check[i][j]) {
- H5_FAILED();
- HDprintf(" Read different values than written.\n");
- HDprintf(" At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
- TEST_ERROR
- } /* end if */
-
- PASSED();
-
- /*----------------------------------------------------------------------
- * STEP 6: Test partial I/O by writing to and then reading from a
- * hyperslab of the dataset. The hyperslab does not line up on chunk
- * boundaries (we know that case already works from above tests).
- *----------------------------------------------------------------------
- */
- TESTING(" filters (partial I/O)");
-
- for(i=0; i<(size_t)hs_size[0]; i++)
- for(j=0; j<(size_t)hs_size[1]; j++)
- points[(size_t)hs_offset[0]+i][(size_t)hs_offset[1]+j] = (int)HDrandom() % RANDOM_LIMIT;
-
- if(H5Sselect_hyperslab(sid, H5S_SELECT_SET, hs_offset, NULL, hs_size, NULL) < 0) TEST_ERROR;
- /* (Use the "read" DXPL because partial I/O on corrupted data test needs to ignore errors during writing) */
- if(H5Dwrite(dataset, H5T_NATIVE_INT, sid, sid, dxpl, points) < 0) TEST_ERROR;
-
- if(H5Dread(dataset, H5T_NATIVE_INT, sid, sid, dxpl, check) < 0) TEST_ERROR;
-
- /* Check that the values read are the same as the values written */
- for(i=0; i<(size_t)hs_size[0]; i++)
- for(j=0; j<(size_t)hs_size[1]; j++)
- if(points[(size_t)hs_offset[0]+i][(size_t)hs_offset[1]+j] != check[(size_t)hs_offset[0]+i][(size_t)hs_offset[1]+j]) {
- H5_FAILED();
- HDfprintf(stderr," Read different values than written.\n");
- HDfprintf(stderr," At index %lu,%lu\n", (unsigned long)((size_t)hs_offset[0]+i), (unsigned long)((size_t)hs_offset[1]+j));
- HDfprintf(stderr," At original: %d\n", (int)points[(size_t)hs_offset[0]+i][(size_t)hs_offset[1]+j]);
- HDfprintf(stderr," At returned: %d\n", (int)check[(size_t)hs_offset[0]+i][(size_t)hs_offset[1]+j]);
- TEST_ERROR
- } /* end if */
-
- PASSED();
-
- /* Save the data written to the file for later comparison when the file
- * is reopened for read test */
- for(i=0; i<size[0]; i++)
- for(j=0; j<size[1]; j++)
- if(!HDstrcmp(name, DSET_DEFLATE_NAME))
- points_deflate[i][j] = points[i][j];
- else if(!HDstrcmp(name, DSET_DYNLIB1_NAME))
- points_dynlib1[i][j] = points[i][j];
- else if(!HDstrcmp(name, DSET_DYNLIB2_NAME))
- points_dynlib2[i][j] = points[i][j];
- else if(!HDstrcmp(name, DSET_DYNLIB4_NAME))
- points_dynlib4[i][j] = points[i][j];
-
- ret_value = 0;
-
-error:
- /* Clean up objects used for this test */
- H5E_BEGIN_TRY {
- H5Dclose(dataset);
- H5Sclose(sid);
- H5Pclose(dxpl);
- } H5E_END_TRY
-
- if(tconv_buf)
- HDfree(tconv_buf);
- return ret_value;
-}
-
-/*-------------------------------------------------------------------------
- * Function: test_filters_for_datasets
- *
- * Purpose: Tests creating datasets and writing data with dynamically loaded filters
- *
- * Return: Success: 0
- * Failure: -1
- *-------------------------------------------------------------------------
- */
-static herr_t
-test_filters_for_datasets(hid_t file)
-{
- herr_t ret_value = -1;
- hid_t dc = -1; /* Dataset creation property list ID */
- const hsize_t chunk_size[2] = {FILTER_CHUNK_DIM1, FILTER_CHUNK_DIM2}; /* Chunk dimensions */
- unsigned int compress_level = 9;
- unsigned int dynlib4_values[4];
-
- /*----------------------------------------------------------
- * STEP 1: Test deflation by itself.
- *----------------------------------------------------------
- */
- HDputs("Testing deflate filter");
-#ifdef H5_HAVE_FILTER_DEFLATE
- if((dc = H5Pcreate(H5P_DATASET_CREATE)) < 0) TEST_ERROR
- if(H5Pset_chunk(dc, 2, chunk_size) < 0) TEST_ERROR
- if(H5Pset_deflate(dc, 6) < 0) TEST_ERROR
-
- if(test_filter_internal(file, DSET_DEFLATE_NAME, dc) < 0) TEST_ERROR
- /* Clean up objects used for this test */
- if(H5Pclose(dc) < 0) TEST_ERROR
-#else /* H5_HAVE_FILTER_DEFLATE */
- SKIPPED();
- HDputs(" Deflate filter not enabled");
-#endif /* H5_HAVE_FILTER_DEFLATE */
-
- /*----------------------------------------------------------
- * STEP 2: Test DYNLIB1 by itself.
- *----------------------------------------------------------
- */
- HDputs(" DYNLIB1 filter");
- if((dc = H5Pcreate(H5P_DATASET_CREATE)) < 0) TEST_ERROR
- if(H5Pset_chunk(dc, 2, chunk_size) < 0) TEST_ERROR
- if(H5Pset_filter(dc, H5Z_FILTER_DYNLIB1, H5Z_FLAG_MANDATORY, (size_t)1, &compress_level) < 0) TEST_ERROR
-
- if(test_filter_internal(file, DSET_DYNLIB1_NAME, dc) < 0) TEST_ERROR
-
- /* Clean up objects used for this test */
- if(H5Pclose(dc) < 0) TEST_ERROR
-
- /* Unregister the dynamic filter DYNLIB1 for testing purpose. The next time when this test is run for
- * the new file format, the library's H5PL code has to search in the table of loaded plugin libraries
- * for this filter. */
- if(H5Zunregister(H5Z_FILTER_DYNLIB1) < 0) TEST_ERROR
-
- /*----------------------------------------------------------
- * STEP 3: Test DYNLIB2 by itself.
- *----------------------------------------------------------
- */
- HDputs(" DYNLIB2 filter");
- if((dc = H5Pcreate(H5P_DATASET_CREATE)) < 0) TEST_ERROR
- if(H5Pset_chunk(dc, 2, chunk_size) < 0) TEST_ERROR
- if(H5Pset_filter(dc, H5Z_FILTER_DYNLIB2, H5Z_FLAG_MANDATORY, 0, NULL) < 0) TEST_ERROR
-
- if(test_filter_internal(file,DSET_DYNLIB2_NAME,dc) < 0) TEST_ERROR
-
- /* Clean up objects used for this test */
- if(H5Pclose(dc) < 0) TEST_ERROR
-
- /* Unregister the dynamic filter DYNLIB2 for testing purpose. The next time when this test is run for
- * the new file format, the library's H5PL code has to search in the table of loaded plugin libraries
- * for this filter. */
- if(H5Zunregister(H5Z_FILTER_DYNLIB2) < 0) TEST_ERROR
-
- /*----------------------------------------------------------
- * STEP 4: Test DYNLIB4 by itself.
- *----------------------------------------------------------
- */
- HDputs(" DYNLIB4 filter");
- if((dc = H5Pcreate(H5P_DATASET_CREATE)) < 0) TEST_ERROR
- if(H5Pset_chunk(dc, 2, chunk_size) < 0) TEST_ERROR
- dynlib4_values[0] = 9;
- if(H5get_libversion(&dynlib4_values[1], &dynlib4_values[2], &dynlib4_values[3]) < 0) TEST_ERROR
- if(H5Pset_filter(dc, H5Z_FILTER_DYNLIB4, H5Z_FLAG_MANDATORY, (size_t)4, dynlib4_values) < 0) TEST_ERROR
-
- if(test_filter_internal(file, DSET_DYNLIB4_NAME, dc) < 0) TEST_ERROR
-
- /* Clean up objects used for this test */
- if(H5Pclose(dc) < 0) TEST_ERROR
-
- /* Unregister the dynamic filter DYNLIB4 for testing purpose. The next time when this test is run for
- * the new file format, the library's H5PL code has to search in the table of loaded plugin libraries
- * for this filter. */
- if(H5Zunregister(H5Z_FILTER_DYNLIB4) < 0) TEST_ERROR
-
- ret_value = 0;
-
-error:
- /* Clean up objects used for this test */
- H5E_BEGIN_TRY {
- H5Pclose(dc);
- } H5E_END_TRY
-
- return ret_value;
-}
-
-/*-------------------------------------------------------------------------
- * Function: test_read_data
- *
- * Purpose: Tests reading data and compares values
- *
- * Return: Success: 0
- * Failure: -1
- *-------------------------------------------------------------------------
- */
-static herr_t
-test_read_data(hid_t dataset, int *origin_data)
-{
- herr_t ret_value = -1;
- int check[DSET_DIM1][DSET_DIM2];
- const hsize_t size[2] = {DSET_DIM1, DSET_DIM2}; /* Dataspace dimensions */
- int *data_p = origin_data;
- size_t i, j; /* Local index variables */
-
- /* Read the dataset back */
- if(H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, check) < 0) TEST_ERROR;
-
- /* Check that the values read are the same as the values written */
- for(i=0; i<size[0]; i++)
- for(j=0; j<size[1]; j++) {
- if(*data_p != check[i][j]) {
- H5_FAILED();
- HDfprintf(stderr," Read different values than written.\n");
- HDfprintf(stderr," At index %lu,%lu\n", (unsigned long)i, (unsigned long)j);
- HDfprintf(stderr," At original: %d\n", *data_p);
- HDfprintf(stderr," At returned: %d\n", (int)check[i][j]);
- TEST_ERROR
- } /* end if */
- data_p++;
- }
-
- PASSED();
- ret_value = 0;
-
-error:
- return ret_value;
-}
-
-/*-------------------------------------------------------------------------
- * Function: test_read_with_filters
- *
- * Purpose: Tests reading dataset created with dynamically loaded filters
- *
- * Return: Success: 0
- * Failure: -1
- *-------------------------------------------------------------------------
- */
-static herr_t
-test_read_with_filters(hid_t file)
-{
- herr_t ret_value = -1;
- hid_t dset = -1; /* Dataset ID */
-
- /*----------------------------------------------------------
- * STEP 1: Test deflation by itself.
- *----------------------------------------------------------
- */
- TESTING("deflate filter");
-
-#ifdef H5_HAVE_FILTER_DEFLATE
- if(H5Zfilter_avail(H5Z_FILTER_DEFLATE) != TRUE) TEST_ERROR
-
- if((dset = H5Dopen2(file,DSET_DEFLATE_NAME,H5P_DEFAULT)) < 0) TEST_ERROR
-
- if(test_read_data(dset, (int *)points_deflate) < 0) TEST_ERROR
-
- if(H5Dclose(dset) < 0) TEST_ERROR
-
- /* Clean up objects used for this test */
-#else /* H5_HAVE_FILTER_DEFLATE */
- SKIPPED();
- HDputs(" Deflate filter not enabled");
-#endif /* H5_HAVE_FILTER_DEFLATE */
-
- /*----------------------------------------------------------
- * STEP 2: Test DYNLIB1 by itself.
- *----------------------------------------------------------
- */
- TESTING(" DYNLIB1 filter");
-
- if((dset = H5Dopen2(file, DSET_DYNLIB1_NAME, H5P_DEFAULT)) < 0) TEST_ERROR
-
- if(test_read_data(dset, (int *)points_dynlib1) < 0) TEST_ERROR
-
- if(H5Dclose(dset) < 0) TEST_ERROR
-
- /*----------------------------------------------------------
- * STEP 3: Test Bogus2 by itself.
- *----------------------------------------------------------
- */
- TESTING(" DYNLIB2 filter");
-
- if((dset = H5Dopen2(file, DSET_DYNLIB2_NAME, H5P_DEFAULT)) < 0) TEST_ERROR
-
- if(test_read_data(dset, (int *)points_dynlib2) < 0) TEST_ERROR
-
- if(H5Dclose(dset) < 0) TEST_ERROR
-
- /*----------------------------------------------------------
- * STEP 4: Test DYNLIB4 by itself.
- *----------------------------------------------------------
- */
- TESTING(" DYNLIB4 filter");
-
- if((dset = H5Dopen2(file,DSET_DYNLIB4_NAME,H5P_DEFAULT)) < 0) TEST_ERROR
-
- if(test_read_data(dset, (int *)points_dynlib4) < 0) TEST_ERROR
-
- if(H5Dclose(dset) < 0) TEST_ERROR
-
- ret_value = 0;
-
-error:
- /* Clean up objects used for this test */
- H5E_BEGIN_TRY {
- H5Dclose(dset);
- } H5E_END_TRY
-
- return ret_value;
-}
-
-/*-------------------------------------------------------------------------
- * Function: test_noread_data
- *
- * Purpose: Tests not reading data
- *
- * Return: Success: 0
- * Failure: -1
- *
- *-------------------------------------------------------------------------
- */
-static herr_t
-test_noread_data(hid_t dataset)
-{
- herr_t ret_value = -1;
- int check[DSET_DIM1][DSET_DIM2];
- herr_t ret = -1;
-
- /* Read the dataset back */
- H5E_BEGIN_TRY {
- ret = H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, check);
- } H5E_END_TRY
- if(ret >= 0)
- TEST_ERROR
-
- PASSED();
- ret_value = 0;
-
-error:
- return ret_value;
-}
-
-/*-------------------------------------------------------------------------
- * Function: test_noread_with_filters
- *
- * Purpose: Tests reading dataset created with dynamically loaded filters disabled
- *
- * Return: Success: 0
- * Failure: -1
- *-------------------------------------------------------------------------
- */
-static herr_t
-test_noread_with_filters(hid_t file)
-{
- herr_t ret_value = -1;
- hid_t dset = -1; /* Dataset ID */
- unsigned plugin_state; /* status of plugins */
-
- TESTING("DYNLIB1 filter with plugins disabled");
-
- /* disable filter plugin */
- if(H5PLget_loading_state(&plugin_state) < 0) TEST_ERROR
- plugin_state = plugin_state & ~H5PL_FILTER_PLUGIN;
- if(H5PLset_loading_state(plugin_state) < 0) TEST_ERROR
-
- if((dset = H5Dopen2(file, DSET_DYNLIB1_NAME, H5P_DEFAULT)) < 0) TEST_ERROR
-
- if(test_noread_data(dset) < 0) TEST_ERROR
-
- if(H5Dclose(dset) < 0) TEST_ERROR
-
- ret_value = 0;
-
-error:
- /* re-enable filter plugin */
- plugin_state = plugin_state | H5PL_FILTER_PLUGIN;
- H5PLset_loading_state(plugin_state);
-
- /* Clean up objects used for this test */
- H5E_BEGIN_TRY {
- H5Dclose(dset);
- } H5E_END_TRY
-
- return ret_value;
-}
-
-/*-------------------------------------------------------------------------
- * Function: test_filters_for_groups
- *
- * Purpose: Tests creating group with dynamically loaded filters
- *
- * Return: Success: 0
- * Failure: -1
- *-------------------------------------------------------------------------
- */
-static herr_t
-test_filters_for_groups(hid_t file)
-{
- herr_t ret_value = -1;
- hid_t gcpl = -1;
- hid_t gid = -1;
- hid_t group = -1;
- int i;
- char gname[256];
-
- TESTING("DYNLIB3 filter for group");
-
- if((gcpl = H5Pcreate(H5P_GROUP_CREATE)) < 0) TEST_ERROR
-
- /* Use DYNLIB3 for creating groups */
- if(H5Pset_filter (gcpl, H5Z_FILTER_DYNLIB3, H5Z_FLAG_MANDATORY, (size_t)0, NULL) < 0) TEST_ERROR
-
- /* Create a group using this filter */
- if((gid = H5Gcreate2(file, "group1", H5P_DEFAULT, gcpl, H5P_DEFAULT)) < 0) TEST_ERROR
-
- /* Create multiple groups under "group1" */
- for(i=0; i < GROUP_ITERATION; i++) {
- HDsprintf(gname, "group_%d", i);
- if((group = H5Gcreate2(gid, gname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
- if(H5Gclose(group) < 0) TEST_ERROR
- }
-
- /* Close the group */
- if(H5Gclose(gid) < 0) TEST_ERROR
-
- /* Clean up objects used for this test */
- if(H5Pclose(gcpl) < 0) TEST_ERROR
-
- PASSED();
-
- ret_value = 0;
-
-error:
- /* Clean up objects used for this test */
- H5E_BEGIN_TRY {
- H5Gclose(group);
- H5Gclose(gid);
- H5Pclose(gcpl);
- } H5E_END_TRY
-
- return ret_value;
-}
-
-/*-------------------------------------------------------------------------
- * Function: test_groups_with_filters
- *
- * Purpose: Tests opening group with dynamically loaded filters
- *
- * Return: Success: 0
- * Failure: -1
- *
- * Programmer: Raymond Lu
- * 1 April 2013
- *
- *-------------------------------------------------------------------------
- */
-static herr_t
-test_groups_with_filters(hid_t file)
-{
- herr_t ret_value = -1;
- hid_t gid;
- hid_t group;
- int i;
- char gname[256];
-
- TESTING("opening groups with DYNLIB3 filter");
-
- /* Open the top group */
- if((gid = H5Gopen2(file, "group1", H5P_DEFAULT)) < 0) TEST_ERROR
-
- /* Create multiple groups under "group1" */
- for(i=0; i < GROUP_ITERATION; i++) {
- HDsprintf(gname, "group_%d", i);
- if((group = H5Gopen2(gid, gname, H5P_DEFAULT)) < 0) TEST_ERROR
- if(H5Gclose(group) < 0) TEST_ERROR
- }
-
- /* Close the group */
- if(H5Gclose(gid) < 0) TEST_ERROR
-
- PASSED();
-
- ret_value = 0;
-
-error:
- /* Clean up objects used for this test */
- H5E_BEGIN_TRY {
- H5Gclose(group);
- H5Gclose(gid);
- } H5E_END_TRY
-
- return ret_value;
-}
-
-
-/*-------------------------------------------------------------------------
- * Function: test_filter_path_apis
- *
- * Purpose: Tests accessing the path table for dynamically loaded filters
- *
- * Return: Success: 0
- * Failure: -1
- *-------------------------------------------------------------------------
- */
-static herr_t
-test_filter_path_apis(void)
-{
- herr_t ret_value = -1;
- unsigned int i;
- unsigned int ndx;
- herr_t ret;
- ssize_t pathlen = -1;
- char pathname[256];
- char tempname[256];
-
- HDputs("Testing access to the filter path table");
-
- if(H5Zfilter_avail(H5Z_FILTER_DYNLIB1) != TRUE) TEST_ERROR
-
- ndx = H5PLsize();
-
- TESTING(" remove");
- /* Remove all existing paths*/
- for(i=ndx; i > 0; i--)
- if(H5PLremove(i-1) < 0) {
- HDfprintf(stderr," at %d: %s\n", i, pathname);
- TEST_ERROR
- } /* end if */
- /* Verify the table is empty */
- if(H5PLsize() > 0) TEST_ERROR
- PASSED();
-
- TESTING(" remove (exceed min)");
- /* Exceed the min path removal */
- H5E_BEGIN_TRY {
- ret = H5PLremove(0);
- } H5E_END_TRY
- if(ret >= 0) TEST_ERROR
- PASSED();
-
- TESTING(" append");
- /* Create multiple paths to fill table */
- for(i=0; i < H5PL_MAX_PATH_NUM; i++) {
- HDsprintf(pathname, "a_path_%d", i);
- if(H5PLappend(pathname) < 0) {
- HDfprintf(stderr," at %d: %s\n", i, pathname);
- TEST_ERROR
- }
- }
- /* Verify the table is full */
- if(H5PLsize() != H5PL_MAX_PATH_NUM) TEST_ERROR
- PASSED();
-
- TESTING(" append (exceed)");
- /* Exceed the max path append */
- H5E_BEGIN_TRY {
- HDsprintf(pathname, "a_path_%d", H5PL_MAX_PATH_NUM);
- ret = H5PLappend(pathname);
- } H5E_END_TRY
- if(ret >= 0) TEST_ERROR
- PASSED();
-
- TESTING(" remove (exceed max)");
- /* Exceed the max path removal */
- H5E_BEGIN_TRY {
- ret = H5PLremove(H5PL_MAX_PATH_NUM);
- } H5E_END_TRY
- if(ret >= 0) TEST_ERROR
- PASSED();
-
- TESTING(" get (path name)");
- if((pathlen = H5PLget(0, NULL, 0)) <= 0) {
- HDfprintf(stderr," get path 0 length failed\n");
- TEST_ERROR
- }
- if(pathlen != 8) TEST_ERROR
-
- if((pathlen = H5PLget(0, pathname, 256)) <= 0) {
- HDfprintf(stderr," get 0 len: %d : %s\n", pathlen, pathname);
- TEST_ERROR
- }
- if(HDstrcmp(pathname, "a_path_0") != 0) {
- HDfprintf(stderr," get 0: %s\n", pathname);
- TEST_ERROR
- }
- PASSED();
-
- TESTING(" get (bounds)");
- if((pathlen = H5PLget(1, pathname, 256)) <= 0) TEST_ERROR
- if(HDstrcmp(pathname, "a_path_1") != 0) {
- HDfprintf(stderr," get 1: %s\n", pathname);
- TEST_ERROR
- }
- if((pathlen = H5PLget(H5PL_MAX_PATH_NUM - 1, pathname, 256)) <= 0) TEST_ERROR
- HDsprintf(tempname, "a_path_%d", H5PL_MAX_PATH_NUM - 1);
- if(HDstrcmp(pathname, tempname) != 0) {
- HDfprintf(stderr," get %d: %s\n", H5PL_MAX_PATH_NUM - 1, pathname);
- TEST_ERROR
- }
- PASSED();
-
- TESTING(" get (bounds exceed)");
- H5E_BEGIN_TRY {
- pathlen = H5PLget(H5PL_MAX_PATH_NUM, NULL, 0);
- } H5E_END_TRY
- if(pathlen > 0) TEST_ERROR
- PASSED();
-
- TESTING(" remove (verify for prepend)");
- /* Remove one path*/
- if(H5PLremove(8) < 0) TEST_ERROR
-
- /* Verify that the entries were moved */
- if((pathlen = H5PLget(8, pathname, 256)) <= 0) TEST_ERROR
- if(HDstrcmp(pathname, "a_path_9") != 0) {
- HDfprintf(stderr," get 8: %s\n", pathname);
- TEST_ERROR
- }
- PASSED();
-
- /* Verify the table is not full */
- if (H5PLsize() != H5PL_MAX_PATH_NUM - 1) TEST_ERROR
-
- TESTING(" prepend");
- /* Prepend one path*/
- HDsprintf(pathname, "a_path_%d", H5PL_MAX_PATH_NUM + 1);
- if(H5PLprepend(pathname) < 0) {
- HDfprintf(stderr," prepend %d: %s\n", H5PL_MAX_PATH_NUM + 1, pathname);
- TEST_ERROR
- }
-
- /* Verify the table is full */
- if(H5PLsize() != H5PL_MAX_PATH_NUM) TEST_ERROR
-
- /* Verify that the entries were moved */
- if(H5PLget(8, pathname, 256) <= 0) TEST_ERROR
- if(HDstrcmp(pathname, "a_path_7") != 0) {
- HDfprintf(stderr," get 8: %s\n", pathname);
- TEST_ERROR
- }
- if(H5PLget(0, pathname, 256) <= 0) TEST_ERROR
- HDsprintf(tempname, "a_path_%d", H5PL_MAX_PATH_NUM + 1);
- if(HDstrcmp(pathname, tempname) != 0) {
- HDfprintf(stderr," get 0: %s\n", pathname);
- TEST_ERROR
- }
- PASSED();
-
- TESTING(" prepend (exceed)");
- /* Exceed the max path prepend */
- H5E_BEGIN_TRY {
- HDsprintf(pathname, "a_path_%d", H5PL_MAX_PATH_NUM + 2);
- ret = H5PLprepend(pathname);
- } H5E_END_TRY
- if(ret >= 0) TEST_ERROR
- PASSED();
-
- TESTING(" replace");
- /* Replace one path*/
- HDsprintf(pathname, "a_path_%d", H5PL_MAX_PATH_NUM + 4);
- if(H5PLreplace(pathname, 1) < 0) {
- HDfprintf(stderr," replace 1: %s\n", pathname);
- TEST_ERROR
- }
-
- /* Verify the table is full */
- if(H5PLsize() != H5PL_MAX_PATH_NUM) TEST_ERROR
-
- /* Verify that the entries were not moved */
- if(H5PLget(0, pathname, 256) <= 0) TEST_ERROR
- HDsprintf(tempname, "a_path_%d", H5PL_MAX_PATH_NUM + 1);
- if(HDstrcmp(pathname, tempname) != 0) {
- HDfprintf(stderr," get 0: %s\n", pathname);
- TEST_ERROR
- }
- if(H5PLget(2, pathname, 256) <= 0) TEST_ERROR
- if(HDstrcmp(pathname, "a_path_1") != 0) {
- HDfprintf(stderr," get 2: %s\n", pathname);
- TEST_ERROR
- }
- PASSED();
-
- TESTING(" remove (verify for insert)");
- /* Remove one path*/
- if(H5PLremove(4) < 0) TEST_ERROR
-
- /* Verify that the entries were moved */
- if(H5PLget(4, pathname, 256) <= 0) TEST_ERROR
- if(HDstrcmp(pathname, "a_path_4") != 0) {
- HDfprintf(stderr," get 4: %s\n", pathname);
- TEST_ERROR
- }
- PASSED();
-
- /* Verify the table is not full */
- if(H5PLsize() != 15) TEST_ERROR
-
- TESTING(" insert");
- /* Insert one path*/
- HDsprintf(pathname, "a_path_%d", H5PL_MAX_PATH_NUM + 5);
- if(H5PLinsert(pathname, 3) < 0) {
- HDfprintf(stderr," insert 3: %s\n", pathname);
- TEST_ERROR
- }
-
- /* Verify that the entries were moved */
- if(H5PLget(4, pathname, 256) <= 0) TEST_ERROR
- if(HDstrcmp(pathname, "a_path_2") != 0) {
- HDfprintf(stderr," get 4: %s\n", pathname);
- TEST_ERROR
- }
- PASSED();
-
- /* Verify the table is full */
- if(H5PLsize() != H5PL_MAX_PATH_NUM) TEST_ERROR
-
- TESTING(" insert (exceed)");
- /* Exceed the max path insert */
- H5E_BEGIN_TRY {
- HDsprintf(pathname, "a_path_%d", H5PL_MAX_PATH_NUM + 6);
- ret = H5PLinsert(pathname, 12);
- } H5E_END_TRY
- if(ret >= 0) TEST_ERROR
-
- PASSED();
-
- ret_value = 0;
-
-error:
- return ret_value;
-}
-
-
-/*-------------------------------------------------------------------------
- * Function: main
- *
- * Purpose: Tests the plugin module (H5PL)
- *
- * Return: Success: exit(EXIT_SUCCESS)
- *
- * Failure: exit(EXIT_FAILURE)
- *
- * Programmer: Raymond Lu
- * 14 March 2013
- *
- *-------------------------------------------------------------------------
- */
-int
-main(void)
-{
- char filename[FILENAME_BUF_SIZE];
- hid_t file = -1;
- hid_t fapl = -1;
- hid_t fapl2 = -1;
- unsigned new_format;
- int mdc_nelmts;
- size_t rdcc_nelmts;
- size_t rdcc_nbytes;
- double rdcc_w0;
- int nerrors = 0;
-
- /* Testing setup */
- h5_reset();
- fapl = h5_fileaccess();
-
- /* Turn off the chunk cache, so all the chunks are immediately written to disk */
- if(H5Pget_cache(fapl, &mdc_nelmts, &rdcc_nelmts, &rdcc_nbytes, &rdcc_w0) < 0) TEST_ERROR
- rdcc_nbytes = 0;
- if(H5Pset_cache(fapl, mdc_nelmts, rdcc_nelmts, rdcc_nbytes, rdcc_w0) < 0) TEST_ERROR
-
- /* Copy the file access property list */
- if((fapl2 = H5Pcopy(fapl)) < 0) TEST_ERROR
-
- /* Set the "use the latest version of the format" bounds for creating objects in the file */
- if(H5Pset_libver_bounds(fapl2, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0) TEST_ERROR
-
- h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
-
- /* Test with old & new format groups */
- for(new_format = FALSE; new_format <= TRUE; new_format++) {
- hid_t my_fapl;
-
- /* Set the FAPL for the type of format */
- if(new_format) {
- HDputs("\nTesting with new file format:");
- my_fapl = fapl2;
- } /* end if */
- else {
- HDputs("Testing with old file format:");
- my_fapl = fapl;
- } /* end else */
-
- /* Create the file for this test */
- if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, my_fapl)) < 0) TEST_ERROR
-
- /* Test dynamically loaded filters for chunked dataset */
- nerrors += (test_filters_for_datasets(file) < 0 ? 1 : 0);
-
- /* Test dynamically loaded filters for groups */
- nerrors += (test_filters_for_groups(file) < 0 ? 1 : 0);
-
- if(H5Fclose(file) < 0) TEST_ERROR
- } /* end for */
-
- /* Close FAPL */
- if(H5Pclose(fapl2) < 0) TEST_ERROR
- if(H5Pclose(fapl) < 0) TEST_ERROR
-
- /* Restore the default error handler (set in h5_reset()) */
- h5_restore_err();
-
- HDputs("\nTesting reading data with with dynamic plugin filters:");
-
- /* Close the library so that all loaded plugin libraries are unloaded */
- h5_reset();
- fapl = h5_fileaccess();
-
- /* Reopen the file for testing data reading */
- if((file = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0) TEST_ERROR
-
- /* Read the data with filters */
- nerrors += (test_read_with_filters(file) < 0 ? 1 : 0);
-
- /* Open the groups with filters */
- nerrors += (test_groups_with_filters(file) < 0 ? 1 : 0);
-
- /* Restore the default error handler (set in h5_reset()) */
- h5_restore_err();
-
- /* Close the library so that all loaded plugin libraries are unloaded */
- h5_reset();
- fapl = h5_fileaccess();
-
- /* Reopen the file for testing data reading */
- if((file = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0) TEST_ERROR
-
- /* Read the data with disabled filters */
- nerrors += (test_noread_with_filters(file) < 0 ? 1 : 0);
-
- if(H5Fclose(file) < 0) TEST_ERROR
-
- /* Test the APIs for access to the filter plugin path table */
- nerrors += (test_filter_path_apis() < 0 ? 1 : 0);
-
- if(nerrors) TEST_ERROR
-
- HDprintf("All plugin tests passed.\n");
- h5_cleanup(FILENAME, fapl);
-
- return 0;
-
-error:
- nerrors = MAX(1, nerrors);
- HDprintf("***** %d PLUGIN TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S");
- return 1;
-}
-
diff --git a/test/pool.c b/test/pool.c
index 7d80096..1851d6e 100644
--- a/test/pool.c
+++ b/test/pool.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
diff --git a/test/reserved.c b/test/reserved.c
index bb6d328..d8d0c59 100644
--- a/test/reserved.c
+++ b/test/reserved.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include "h5test.h"
diff --git a/test/set_extent.c b/test/set_extent.c
index 949120b..5d11819 100644
--- a/test/set_extent.c
+++ b/test/set_extent.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
@@ -429,20 +427,50 @@ error:
*/
static int do_layouts( hid_t fapl )
{
+ hid_t new_fapl = -1;
+ H5F_libver_t low, high; /* Low and high bounds */
+ herr_t ret; /* Generic return value */
- TESTING("storage layout use");
+ TESTING("storage layout use - tested with all low/high library format bounds");
+ /* Loop through all the combinations of low/high library format bounds */
+ for(low = H5F_LIBVER_EARLIEST; low < H5F_LIBVER_NBOUNDS; low++) {
+ for(high = H5F_LIBVER_EARLIEST; high < H5F_LIBVER_NBOUNDS; high++) {
- if (test_layouts( H5D_COMPACT, fapl ) < 0)
- goto error;
+ /* Copy plist to use locally to avoid modifying the original */
+ new_fapl = H5Pcopy(fapl);
- if (test_layouts( H5D_CONTIGUOUS, fapl ) < 0)
- goto error;
+ /* Set version bounds */
+ H5E_BEGIN_TRY {
+ ret = H5Pset_libver_bounds(new_fapl, low, high);
+ } H5E_END_TRY;
+
+ if (ret < 0) /* Invalid low/high combinations */
+ {
+ if (H5Pclose(new_fapl) < 0)
+ goto error;
+ continue;
+ }
+
+ if (test_layouts( H5D_COMPACT, new_fapl ) < 0)
+ goto error;
+
+ if (test_layouts( H5D_CONTIGUOUS, new_fapl ) < 0)
+ goto error;
+
+ if (H5Pclose(new_fapl) < 0)
+ goto error;
+ } /* end for high */
+ } /* end for low */
PASSED();
return 0;
error:
+ H5E_BEGIN_TRY
+ {
+ H5Pclose(new_fapl);
+ } H5E_END_TRY;
return -1;
}
@@ -2603,15 +2631,6 @@ static int test_random_rank4( hid_t fapl, hid_t dcpl, hbool_t do_fillvalue,
volatile unsigned i, j, k, l, m; /* Local indices */
char filename[NAME_BUF_SIZE];
- /* *** FIXME ***
- * Skip the test if an extensible array index is requested, as resizing
- * them is broken.
- *
- * Remove these lines as appropriate when these problems are fixed.
- */
- if(index_type == RANK4_INDEX_EARRAY)
- return 0;
-
/* create a new file */
h5_fixname(FILENAME[4], fapl, filename, sizeof filename);
if ((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
@@ -2816,15 +2835,6 @@ static int test_random_rank4_vl( hid_t fapl, hid_t dcpl, hbool_t do_fillvalue,
volatile unsigned i, j, k, l, m; /* Local indices */
char filename[NAME_BUF_SIZE];
- /* *** FIXME ***
- * Skip the test if an extensible array index is requested, as resizing
- * them is broken.
- *
- * Remove these lines as appropriate when these problems are fixed.
- */
- if(index_type == RANK4_INDEX_EARRAY)
- return 0;
-
/* Initialize fill value buffers so they aren't freed in case of an error */
fill_value.len = 0;
fill_value.p = NULL;
diff --git a/test/space_overflow.c b/test/space_overflow.c
index f0e5e1d..15be9ba 100644
--- a/test/space_overflow.c
+++ b/test/space_overflow.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
diff --git a/test/stab.c b/test/stab.c
index 00aee21..331c68d 100644
--- a/test/stab.c
+++ b/test/stab.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
@@ -1143,7 +1141,7 @@ error:
} H5E_END_TRY;
return 1;
-} /* end old_api() */
+} /* end corrupt_stab_msg() */
/*-------------------------------------------------------------------------
diff --git a/test/swmr.c b/test/swmr.c
index 780eb0f..0b352e2 100644
--- a/test/swmr.c
+++ b/test/swmr.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/***********************************************************
@@ -26,7 +24,6 @@
*
*************************************************************/
-#include "hdf5.h"
#include "h5test.h"
#include "H5Iprivate.h"
@@ -118,16 +115,37 @@ static int test_multiple_same(hid_t in_fapl, hbool_t new_format);
static int
test_metadata_read_attempts(hid_t in_fapl)
{
- hid_t fapl; /* File access property list */
- hid_t file_fapl; /* The file's access property list */
- hid_t fid, fid1, fid2; /* File IDs */
- unsigned attempts; /* The # of read attempts */
- char filename[NAME_BUF_SIZE]; /* File name */
- herr_t ret; /* Generic return value */
+ hid_t fapl = -1; /* File access property list */
+ hid_t file_fapl = -1; /* The file's access property list */
+ hid_t fid = -1, fid1 = -1, fid2 = -1; /* File IDs */
+ hid_t driver_id = -1; /* ID for this VFD */
+ unsigned long driver_flags = 0; /* VFD feature flags */
+ hbool_t compat_w_default_vfd; /* current VFD compat w/ H5P_DEFAULT? */
+ unsigned attempts; /* The # of read attempts */
+ char filename[NAME_BUF_SIZE]; /* File name */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
TESTING("H5Pget/set_metadata_read_attempts()");
+ /* Check if the driver is compatible with the default VFD.
+ * Most of the tests will attempt to create and open files with both the
+ * VFD specified in the passed-in fapl and the default VFD. Since this
+ * will clearly not work with VFDs that are not compatible with the default
+ * fapl (e.g.: split/multi), we just skip this entire test.
+ */
+ if ((driver_id = H5Pget_driver(in_fapl)) < 0)
+ FAIL_STACK_ERROR
+ if (H5FDdriver_query(driver_id, &driver_flags) < 0)
+ FAIL_STACK_ERROR
+ compat_w_default_vfd = (driver_flags & H5FD_FEAT_DEFAULT_VFD_COMPATIBLE) ? TRUE : FALSE;
+
+ if (!compat_w_default_vfd) {
+ SKIPPED()
+ HDputs(" The current VFD is not compatible with the default VFD.");
+ return 0;
+ }
+
/* Get a copy of the parameter fapl */
if((fapl = H5Pcopy(in_fapl)) < 0)
FAIL_STACK_ERROR
diff --git a/test/swmr_addrem_writer.c b/test/swmr_addrem_writer.c
index d3b5829..51caa3d 100644
--- a/test/swmr_addrem_writer.c
+++ b/test/swmr_addrem_writer.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*-------------------------------------------------------------------------
diff --git a/test/swmr_check_compat_vfd.c b/test/swmr_check_compat_vfd.c
index 1bbfda3..1589f6e 100644
--- a/test/swmr_check_compat_vfd.c
+++ b/test/swmr_check_compat_vfd.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* Purpose: This is a small program that checks if the HDF5_DRIVER
diff --git a/test/swmr_common.c b/test/swmr_common.c
index ac17ddd..a0d79e3 100644
--- a/test/swmr_common.c
+++ b/test/swmr_common.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*-------------------------------------------------------------------------
diff --git a/test/swmr_common.h b/test/swmr_common.h
index a2cee71..99d1cb2 100644
--- a/test/swmr_common.h
+++ b/test/swmr_common.h
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifndef _SWMR_COMMON_H
diff --git a/test/swmr_generator.c b/test/swmr_generator.c
index a87879f..1c2ec04 100644
--- a/test/swmr_generator.c
+++ b/test/swmr_generator.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*-------------------------------------------------------------------------
diff --git a/test/swmr_reader.c b/test/swmr_reader.c
index 79ac107..e181d3a 100644
--- a/test/swmr_reader.c
+++ b/test/swmr_reader.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*-------------------------------------------------------------------------
diff --git a/test/swmr_remove_reader.c b/test/swmr_remove_reader.c
index 689b010..1fae5e7 100644
--- a/test/swmr_remove_reader.c
+++ b/test/swmr_remove_reader.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*-------------------------------------------------------------------------
@@ -229,7 +227,7 @@ read_records(const char *filename, unsigned verbose, unsigned long nseconds,
/* Determine the offset of the symbol, within level 0 symbols */
/* (level 0 symbols are the most common symbols) */
- offset = (unsigned)(HDrandom() % symbol_count[0]);
+ offset = (unsigned)HDrandom() % symbol_count[0];
sym_com[v] = &symbol_info[0][offset];
/* Emit informational message */
diff --git a/test/swmr_remove_writer.c b/test/swmr_remove_writer.c
index ddf7ede..43743d9 100644
--- a/test/swmr_remove_writer.c
+++ b/test/swmr_remove_writer.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*-------------------------------------------------------------------------
@@ -189,7 +187,7 @@ remove_records(hid_t fid, unsigned verbose, unsigned long nshrinks, unsigned lon
symbol->nrecords = 0;
else
symbol->nrecords -= remove_size;
- dim[1] = symbol->nrecords;
+ dim[1] = symbol->nrecords;
if(H5Dset_extent(symbol->dsid, dim) < 0)
return -1;
diff --git a/test/swmr_sparse_reader.c b/test/swmr_sparse_reader.c
index f755cd2..3c98f48 100644
--- a/test/swmr_sparse_reader.c
+++ b/test/swmr_sparse_reader.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*-------------------------------------------------------------------------
diff --git a/test/swmr_sparse_writer.c b/test/swmr_sparse_writer.c
index 13b21c2..e46f54c 100644
--- a/test/swmr_sparse_writer.c
+++ b/test/swmr_sparse_writer.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*-------------------------------------------------------------------------
diff --git a/test/swmr_start_write.c b/test/swmr_start_write.c
index ab639fb..af4b743 100644
--- a/test/swmr_start_write.c
+++ b/test/swmr_start_write.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*-------------------------------------------------------------------------
@@ -42,11 +40,6 @@ static hid_t create_file(const char *filename, hbool_t verbose,
FILE *verbose_file, unsigned random_seed);
static int create_datasets(hid_t fid, int comp_level, hbool_t verbose,
FILE *verbose_file, const char *index_type);
-static int create_close_datasets(hid_t fid, int comp_level, hbool_t verbose,
- FILE *verbose_file);
-static int open_datasets(hid_t fid, hbool_t verbose, FILE *verbose_file);
-static hid_t open_file(const char *filename, hbool_t verbose,
- FILE *verbose_file);
static int add_records(hid_t fid, hbool_t verbose, FILE *verbose_file,
unsigned long nrecords, unsigned long flush_count);
static void usage(void);
@@ -214,166 +207,6 @@ create_datasets(hid_t fid, int comp_level, hbool_t verbose, FILE *verbose_file,
/*-------------------------------------------------------------------------
- * Function: create_close_datasets
- *
- * Purpose: Create and close datasets which will be used for testing
- * H5Fstart_swmr_write().
- *
- * Parameters:
- * fid: file ID for the SWMR test file
- * comp_level: the compresssion level
- * verbose: whether verbose console output is desired.
- * verbose_file: file pointer for verbose output
- *
- * Return: Success: 0
- * Failure: -1
- *
- *-------------------------------------------------------------------------
- */
-static int
-create_close_datasets(hid_t fid, int comp_level, hbool_t verbose, FILE *verbose_file)
-{
- hid_t dcpl; /* Dataset creation property list */
- hid_t tid; /* Datatype for dataset elements */
- hid_t sid; /* Dataspace ID */
- hsize_t dims[2] = {1, 0}; /* Dataset starting dimensions */
- hsize_t max_dims[2] = {1, H5S_UNLIMITED}; /* Dataset maximum dimensions */
- hsize_t chunk_dims[2] = {1, CHUNK_SIZE}; /* Chunk dimensions */
- unsigned u, v; /* Local index variable */
-
- /* Create datatype for creating datasets */
- if((tid = create_symbol_datatype()) < 0)
- return -1;
-
- /* Create dataspace for creating datasets */
- if((sid = H5Screate_simple(2, dims, max_dims)) < 0)
- return -1;
-
- /* Create dataset creation property list */
- if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
- return -1;
- if(H5Pset_chunk(dcpl, 2, chunk_dims) < 0)
- return -1;
- if(comp_level >= 0) {
- if(H5Pset_deflate(dcpl, (unsigned)comp_level) < 0)
- return -1;
- } /* end if */
-
- /* Emit informational message */
- if(verbose)
- HDfprintf(verbose_file, "Creating datasets\n");
-
- /* Create the datasets */
- for(u = 0; u < NLEVELS; u++)
- for(v = 0; v < symbol_count[u]; v++) {
- hid_t dsid; /* Dataset ID */
- char name_buf[64];
-
- generate_name(name_buf, u, v);
- if((dsid = H5Dcreate2(fid, name_buf, tid, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
- return -1;
-
- if(H5Dclose(dsid) < 0)
- return -1;
- } /* end for */
-
- /* Closing */
- if(H5Pclose(dcpl) < 0)
- return -1;
- if(H5Sclose(sid) < 0)
- return -1;
- if(H5Tclose(tid) < 0)
- return -1;
-
- return 0;
-} /* create_close_datasets() */
-
-
-/*-------------------------------------------------------------------------
- * Function: open_file
- *
- * Purpose: Opens the HDF5 test file without SWMR access.
- *
- * Parameters:
- * filename: The filename of the HDF5 file to open
- * verbose: whether or not to emit verbose console messages
- * verbose_file: file pointer for verbose output
- *
- * Return: Success: The file ID of the opened SWMR file
- * Failure: -1
- *
- *-------------------------------------------------------------------------
- */
-static hid_t
-open_file(const char *filename, hbool_t verbose, FILE *verbose_file)
-{
- hid_t fid; /* File ID for new HDF5 file */
- hid_t fapl; /* File access property list */
-
- HDassert(filename);
-
- /* Create file access property list */
- if((fapl = h5_fileaccess()) < 0)
- return -1;
-
- /* Set to use the latest library format */
- if(H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
- return -1;
-
- /* Emit informational message */
- if(verbose)
- HDfprintf(verbose_file, "Opening the file without SWMR access: %s\n", filename);
-
- /* Open the file */
- if((fid = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0)
- return -1;
-
- /* Close file access property list */
- if(H5Pclose(fapl) < 0)
- return -1;
-
- return fid;
-} /* Open file() */
-
-
-
-/*-------------------------------------------------------------------------
- * Function: open_datasets
- *
- * Purpose: Opens the datasets.
- *
- * Parameters:
- * filename: the filename of the SWMR HDF5 file to open
- * verbose: whether or not to emit verbose console messages
- * verbose_file: file pointer for verbose output
- *
- * Return: Success: 0
- * Failure: -1
- *
- *-------------------------------------------------------------------------
- */
-static int
-open_datasets(hid_t fid, hbool_t verbose, FILE *verbose_file)
-{
- unsigned u, v; /* Local index variable */
-
- /* Emit informational message */
- if(verbose)
- HDfprintf(verbose_file, "Opening datasets\n");
-
- /* Open the datasets */
- for(u = 0; u < NLEVELS; u++)
- for(v = 0; v < symbol_count[u]; v++) {
- if((symbol_info[u][v].dsid = H5Dopen2(fid, symbol_info[u][v].name, H5P_DEFAULT)) < 0)
- return -1;
- symbol_info[u][v].nrecords = 0;
- } /* end for */
-
- return 0;
-} /* open_datasets() */
-
-
-/*-------------------------------------------------------------------------
* Function: add_records
*
* Purpose: Writes a specified number of records to random datasets in
diff --git a/test/swmr_writer.c b/test/swmr_writer.c
index 8f6be19..ee7e32e 100644
--- a/test/swmr_writer.c
+++ b/test/swmr_writer.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*-------------------------------------------------------------------------
diff --git a/test/tarray.c b/test/tarray.c
index 4a87981..99f7bf8 100644
--- a/test/tarray.c
+++ b/test/tarray.c
@@ -5,17 +5,15 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/***********************************************************
*
-* Test program: tarray
+* Test program: tarray
*
* Test the Array Datatype functionality
*
@@ -24,13 +22,11 @@
#include "testhdf5.h"
#include "H5srcdir.h"
-#include "hdf5.h"
-
#define FILENAME "tarray1.h5"
#define TESTFILE "tarrold.h5"
/* 1-D array datatype */
-#define ARRAY1_RANK 1
+#define ARRAY1_RANK 1
#define ARRAY1_DIM1 4
/* 3-D array datatype */
@@ -69,7 +65,7 @@ typedef struct
void *test_array_alloc_custom(size_t size, void *info);
void test_array_free_custom(void *mem, void *info);
-
+
/*-------------------------------------------------------------------------
* Function: test_array_atomic_1d
*
@@ -193,7 +189,7 @@ test_array_atomic_1d(void)
CHECK(ret, FAIL, "H5Fclose");
} /* end test_array_atomic_1d() */
-
+
/*-------------------------------------------------------------------------
* Function: test_array_funcs
*
@@ -256,7 +252,7 @@ test_array_funcs(void)
CHECK(ret, FAIL, "H5Tclose");
} /* end test_array_funcs() */
-
+
/*-------------------------------------------------------------------------
* Function: test_array_atomic_3d
*
@@ -385,7 +381,7 @@ test_array_atomic_3d(void)
} /* end test_array_atomic_3d() */
-
+
/*-------------------------------------------------------------------------
* Function: test_array_array_atomic
*
@@ -544,7 +540,7 @@ test_array_array_atomic(void)
CHECK(ret, FAIL, "H5Fclose");
} /* end test_array_array_atomic() */
-
+
/*-------------------------------------------------------------------------
* Function: test_array_compound_atomic
*
@@ -681,7 +677,7 @@ test_array_compound_atomic(void)
/* Check the 1st field's name */
mname = H5Tget_member_name(tid2, 0);
- CHECK(mname, NULL, "H5Tget_member_name");
+ CHECK_PTR(mname, "H5Tget_member_name");
if(HDstrcmp(mname, "i") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
H5free_memory(mname);
@@ -700,7 +696,7 @@ test_array_compound_atomic(void)
/* Check the 2nd field's name */
mname = H5Tget_member_name(tid2, 1);
- CHECK(mname, NULL, "H5Tget_member_name");
+ CHECK_PTR(mname, "H5Tget_member_name");
if(HDstrcmp(mname, "f") != 0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
H5free_memory(mname);
@@ -751,7 +747,7 @@ test_array_compound_atomic(void)
CHECK(ret, FAIL, "H5Fclose");
} /* end test_array_compound_atomic() */
-
+
/*-------------------------------------------------------------------------
* Function: test_array_compound_array
*
@@ -899,7 +895,7 @@ test_array_compound_array(void)
/* Check the 1st field's name */
mname=H5Tget_member_name(tid2,0);
- CHECK(mname, NULL, "H5Tget_member_name");
+ CHECK_PTR(mname, "H5Tget_member_name");
if(HDstrcmp(mname,"i")!=0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n",mname);
H5free_memory(mname);
@@ -918,7 +914,7 @@ test_array_compound_array(void)
/* Check the 2nd field's name */
mname=H5Tget_member_name(tid2,1);
- CHECK(mname, NULL, "H5Tget_member_name");
+ CHECK_PTR(mname, "H5Tget_member_name");
if(HDstrcmp(mname,"f")!=0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n",mname);
H5free_memory(mname);
@@ -1010,7 +1006,7 @@ test_array_compound_array(void)
** allocated.
**
****************************************************************/
-
+
/*-------------------------------------------------------------------------
* Function: test_array_alloc_custom
*
@@ -1049,7 +1045,7 @@ test_array_alloc_custom(size_t size, void *info)
return ret_value;
} /* end test_array_alloc_custom() */
-
+
/*-------------------------------------------------------------------------
* Function: test_array_free_custom
*
@@ -1085,7 +1081,7 @@ test_array_free_custom(void *_mem, void *info)
return;
} /* end test_array_free_custom() */
-
+
/*-------------------------------------------------------------------------
* Function: test_array_vlen_atomic
*
@@ -1300,7 +1296,7 @@ test_array_vlen_atomic(void)
} /* end test_array_vlen_atomic() */
-
+
/*-------------------------------------------------------------------------
* Function: test_array_vlen_array
*
@@ -1555,7 +1551,7 @@ test_array_vlen_array(void)
} /* end test_array_vlen_array() */
-
+
/*-------------------------------------------------------------------------
* Function: test_array_bkg
*
@@ -1584,9 +1580,9 @@ test_array_bkg(void)
unsigned ndims[3] = {1,1,1};
typedef struct {
- int a[ALEN];
- float b[ALEN];
- double c[ALEN];
+ int a[ALEN];
+ float b[ALEN];
+ double c[ALEN];
} CmpField;
CmpField cf[LENGTH];
@@ -1606,7 +1602,7 @@ test_array_bkg(void)
/* Initialize the data */
/* ------------------- */
dtsinfo = (CmpDTSinfo *)HDmalloc(sizeof(CmpDTSinfo));
- CHECK(dtsinfo, NULL, "HDmalloc");
+ CHECK_PTR(dtsinfo, "HDmalloc");
HDmemset(dtsinfo, 0, sizeof(CmpDTSinfo));
for (i = 0; i < LENGTH; i++) {
for (j = 0; j < ALEN; j++) {
@@ -1859,7 +1855,7 @@ test_array_bkg(void)
HDfree(dtsinfo);
} /* end test_array_bkg() */
-
+
/*-------------------------------------------------------------------------
* Function: test_compat
*
@@ -1929,7 +1925,7 @@ test_compat(void)
/* Check the 1st field's name */
mname=H5Tget_member_name(tid1,0);
- CHECK(mname, NULL, "H5Tget_member_name");
+ CHECK_PTR(mname, "H5Tget_member_name");
if(HDstrcmp(mname,"i")!=0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n",mname);
H5free_memory(mname);
@@ -1948,7 +1944,7 @@ test_compat(void)
/* Check the 2nd field's name */
mname=H5Tget_member_name(tid1,1);
- CHECK(mname, NULL, "H5Tget_member_name");
+ CHECK_PTR(mname, "H5Tget_member_name");
if(HDstrcmp(mname,"f")!=0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n",mname);
H5free_memory(mname);
@@ -1967,7 +1963,7 @@ test_compat(void)
/* Check the 3rd field's name */
mname=H5Tget_member_name(tid1,2);
- CHECK(mname, NULL, "H5Tget_member_name");
+ CHECK_PTR(mname, "H5Tget_member_name");
if(HDstrcmp(mname,"l")!=0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n",mname);
H5free_memory(mname);
@@ -2011,7 +2007,7 @@ test_compat(void)
/* Check the 1st field's name */
mname=H5Tget_member_name(tid1,0);
- CHECK(mname, NULL, "H5Tget_member_name");
+ CHECK_PTR(mname, "H5Tget_member_name");
if(mname && HDstrcmp(mname,"i")!=0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n",mname);
if(mname) H5free_memory(mname);
@@ -2030,7 +2026,7 @@ test_compat(void)
/* Check the 2nd field's name */
mname=H5Tget_member_name(tid1,1);
- CHECK(mname, NULL, "H5Tget_member_name");
+ CHECK_PTR(mname, "H5Tget_member_name");
if(mname && HDstrcmp(mname,"f")!=0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n",mname);
if(mname) H5free_memory(mname);
@@ -2075,7 +2071,7 @@ test_compat(void)
/* Check the 3rd field's name */
mname=H5Tget_member_name(tid1,2);
- CHECK(mname, NULL, "H5Tget_member_name");
+ CHECK_PTR(mname, "H5Tget_member_name");
if(mname && HDstrcmp(mname,"l")!=0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n",mname);
if(mname) H5free_memory(mname);
@@ -2120,7 +2116,7 @@ test_compat(void)
/* Check the 4th field's name */
mname=H5Tget_member_name(tid1,3);
- CHECK(mname, NULL, "H5Tget_member_name");
+ CHECK_PTR(mname, "H5Tget_member_name");
if(mname && HDstrcmp(mname,"d")!=0)
TestErrPrintf("Compound field name doesn't match!, mname=%s\n",mname);
if(mname) H5free_memory(mname);
@@ -2154,7 +2150,7 @@ test_compat(void)
} /* end test_compat() */
-
+
/*-------------------------------------------------------------------------
* Function: test_array
*
@@ -2187,7 +2183,7 @@ test_array(void)
} /* end test_array() */
-
+
/*-------------------------------------------------------------------------
* Function: cleanup_array
*
diff --git a/test/tattr.c b/test/tattr.c
index 6f55081..b5495de 100644
--- a/test/tattr.c
+++ b/test/tattr.c
@@ -5,49 +5,45 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/***********************************************************
*
-* Test program: tattr
+* Test program: tattr
*
* Test the attribute functionality
*
*************************************************************/
#include "testhdf5.h"
-#include "h5test.h"
-#include "hdf5.h"
/*
* This file needs to access private information from the H5O package.
* This file also needs to access the object header testing code.
*/
-#define H5O_FRIEND /*suppress error about including H5Opkg */
+#define H5O_FRIEND /*suppress error about including H5Opkg */
#define H5O_TESTING
-#include "H5Opkg.h" /* Object headers */
+#include "H5Opkg.h" /* Object headers */
/*
* This file needs to access private information from the H5A package.
* This file also needs to access the attribute testing code.
*/
-#define H5A_FRIEND /*suppress error about including H5Apkg */
+#define H5A_FRIEND /*suppress error about including H5Apkg */
#define H5A_TESTING
-#include "H5Apkg.h" /* Attributes */
+#include "H5Apkg.h" /* Attributes */
/*
* This file needs to access private information from the H5F package.
* This file also needs to access the file testing code.
*/
-#define H5F_FRIEND /*suppress error about including H5Fpkg */
+#define H5F_FRIEND /*suppress error about including H5Fpkg */
#define H5F_TESTING
-#include "H5Fpkg.h" /* File access */
+#include "H5Fpkg.h" /* File access */
#define FILENAME "tattr.h5"
#define NAME_BUF_SIZE 1024
@@ -57,10 +53,10 @@
#define CORDER_ITER_STOP 3
/* 3-D dataset with fixed dimensions */
-#define SPACE1_RANK 3
-#define SPACE1_DIM1 3
-#define SPACE1_DIM2 15
-#define SPACE1_DIM3 13
+#define SPACE1_RANK 3
+#define SPACE1_DIM1 3
+#define SPACE1_DIM2 15
+#define SPACE1_DIM3 13
/* Dataset Information */
#define DSET1_NAME "Dataset1"
@@ -78,8 +74,8 @@
/* Attribute Rank & Dimensions */
#define ATTR1_NAME "Attr1"
-#define ATTR1_RANK 1
-#define ATTR1_DIM1 3
+#define ATTR1_RANK 1
+#define ATTR1_DIM1 3
int attr_data1[ATTR1_DIM1]={512,-234,98123}; /* Test data for 1st attribute */
/* rank & dimensions for another attribute */
@@ -87,25 +83,25 @@ int attr_data1[ATTR1_DIM1]={512,-234,98123}; /* Test data for 1st attribute */
int attr_data1a[ATTR1_DIM1]={256,11945,-22107};
#define ATTR2_NAME "Attr2"
-#define ATTR2_RANK 2
-#define ATTR2_DIM1 2
-#define ATTR2_DIM2 2
+#define ATTR2_RANK 2
+#define ATTR2_DIM1 2
+#define ATTR2_DIM2 2
int attr_data2[ATTR2_DIM1][ATTR2_DIM2]={{7614,-416},{197814,-3}}; /* Test data for 2nd attribute */
#define ATTR3_NAME "Attr3"
-#define ATTR3_RANK 3
-#define ATTR3_DIM1 2
-#define ATTR3_DIM2 2
-#define ATTR3_DIM3 2
+#define ATTR3_RANK 3
+#define ATTR3_DIM1 2
+#define ATTR3_DIM2 2
+#define ATTR3_DIM3 2
double attr_data3[ATTR3_DIM1][ATTR3_DIM2][ATTR3_DIM3]={{{2.3F,-26.1F}, {0.123F,-10.0F}},{{973.23F,-0.91827F},{2.0F,23.0F}}}; /* Test data for 3rd attribute */
#define ATTR4_NAME "Attr4"
-#define ATTR4_RANK 2
-#define ATTR4_DIM1 2
-#define ATTR4_DIM2 2
-#define ATTR4_FIELDNAME1 "i"
-#define ATTR4_FIELDNAME2 "d"
-#define ATTR4_FIELDNAME3 "c"
+#define ATTR4_RANK 2
+#define ATTR4_DIM1 2
+#define ATTR4_DIM2 2
+#define ATTR4_FIELDNAME1 "i"
+#define ATTR4_FIELDNAME2 "d"
+#define ATTR4_FIELDNAME3 "c"
size_t attr4_field1_off=0;
size_t attr4_field2_off=0;
size_t attr4_field3_off=0;
@@ -117,13 +113,13 @@ struct attr4_struct {
{{-23,981724.2F,'Q'},{0,2.0F,'\n'}}}; /* Test data for 4th attribute */
#define ATTR5_NAME "Attr5"
-#define ATTR5_RANK 0
+#define ATTR5_RANK 0
float attr_data5=-5.123F; /* Test data for 5th attribute */
-#define ATTR6_RANK 3
-#define ATTR6_DIM1 100
-#define ATTR6_DIM2 100
-#define ATTR6_DIM3 100
+#define ATTR6_RANK 3
+#define ATTR6_DIM1 100
+#define ATTR6_DIM2 100
+#define ATTR6_DIM3 100
#define ATTR7_NAME "attr 1 - 000000"
#define ATTR8_NAME "attr 2"
@@ -155,7 +151,7 @@ static herr_t attr_op1(hid_t loc_id, const char *name, const H5A_info_t *ainfo,
void *op_data);
-
+
/****************************************************************
**
** test_attr_basic_write(): Test basic H5A (attribute) code.
@@ -165,21 +161,21 @@ static herr_t attr_op1(hid_t loc_id, const char *name, const H5A_info_t *ainfo,
static void
test_attr_basic_write(hid_t fapl)
{
- hid_t fid1; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t group; /* Group ID */
- hid_t sid1,sid2; /* Dataspace ID */
- hid_t attr, attr2; /* Attribute ID */
- hsize_t attr_size; /* storage size for attribute */
- ssize_t attr_name_size; /* size of attribute name */
- char *attr_name=NULL; /* name of attribute */
- hsize_t dims1[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3};
- hsize_t dims2[] = {ATTR1_DIM1};
- hsize_t dims3[] = {ATTR2_DIM1,ATTR2_DIM2};
- int read_data1[ATTR1_DIM1]={0}; /* Buffer for reading 1st attribute */
- int i;
- hid_t ret_id; /* Generic hid_t return value */
- herr_t ret; /* Generic return value */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t group; /* Group ID */
+ hid_t sid1,sid2; /* Dataspace ID */
+ hid_t attr, attr2; /* Attribute ID */
+ hsize_t attr_size; /* storage size for attribute */
+ ssize_t attr_name_size; /* size of attribute name */
+ char *attr_name=NULL; /* name of attribute */
+ hsize_t dims1[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3};
+ hsize_t dims2[] = {ATTR1_DIM1};
+ hsize_t dims3[] = {ATTR2_DIM1,ATTR2_DIM2};
+ int read_data1[ATTR1_DIM1]={0}; /* Buffer for reading 1st attribute */
+ int i;
+ hid_t ret_id; /* Generic hid_t return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Basic Scalar Attribute Writing Functions\n"));
@@ -279,8 +275,8 @@ test_attr_basic_write(hid_t fapl)
if(attr_name_size > 0) {
attr_name = (char*)HDcalloc((size_t)(attr_name_size + 1), sizeof(char));
- CHECK(attr_name, NULL, "HDcalloc");
-
+ CHECK_PTR(attr_name, "HDcalloc");
+
if(attr_name) {
ret = (herr_t)H5Aget_name(attr, (size_t)(attr_name_size + 1), attr_name);
CHECK(ret, FAIL, "H5Aget_name");
@@ -315,8 +311,8 @@ test_attr_basic_write(hid_t fapl)
if(attr_name_size > 0) {
attr_name = (char*)HDcalloc((size_t)(attr_name_size+1), sizeof(char));
- CHECK(attr_name, NULL, "HDcalloc");
-
+ CHECK_PTR(attr_name, "HDcalloc");
+
if(attr_name) {
ret = (herr_t)H5Aget_name(attr2, (size_t)(attr_name_size + 1), attr_name);
CHECK(ret, FAIL, "H5Aget_name");
@@ -395,7 +391,7 @@ test_attr_basic_write(hid_t fapl)
CHECK(ret, FAIL, "H5Fclose");
} /* test_attr_basic_write() */
-
+
/****************************************************************
**
** test_attr_basic_read(): Test basic H5A (attribute) code.
@@ -404,15 +400,15 @@ test_attr_basic_write(hid_t fapl)
static void
test_attr_basic_read(hid_t fapl)
{
- hid_t fid1; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t group; /* Group ID */
- hid_t attr; /* Attribute ID */
- H5O_info_t oinfo; /* Object info */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t group; /* Group ID */
+ hid_t attr; /* Attribute ID */
+ H5O_info_t oinfo; /* Object info */
int read_data1[ATTR1_DIM1] = {0}; /* Buffer for reading 1st attribute */
int read_data2[ATTR2_DIM1][ATTR2_DIM2] = {{0}}; /* Buffer for reading 2nd attribute */
- int i, j; /* Local index variables */
- herr_t ret; /* Generic return value */
+ int i, j; /* Local index variables */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Basic Attribute Functions\n"));
@@ -486,7 +482,7 @@ test_attr_basic_read(hid_t fapl)
CHECK(ret, FAIL, "H5Fclose");
} /* test_attr_basic_read() */
-
+
/****************************************************************
**
** test_attr_flush(): Test H5A (attribute) code for performing
@@ -502,7 +498,7 @@ test_attr_flush(hid_t fapl)
set; /* Dataset ID */
double wdata=3.14159F; /* Data to write */
double rdata; /* Data read in */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Attribute Flushing\n"));
@@ -553,7 +549,7 @@ test_attr_flush(hid_t fapl)
CHECK(ret, FAIL, "H5Fclose");
} /* test_attr_flush() */
-
+
/****************************************************************
**
** test_attr_plist(): Test Attribute Creation Property Lists
@@ -562,15 +558,15 @@ test_attr_flush(hid_t fapl)
static void
test_attr_plist(hid_t fapl)
{
- hid_t fid1; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t sid1,sid2; /* Dataspace ID */
- hid_t attr; /* Attribute ID */
- hid_t plist; /* Property list ID */
- hsize_t dims1[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3};
- hsize_t dims2[] = {ATTR1_DIM1};
- H5T_cset_t cset; /* Character set for attributes */
- herr_t ret; /* Generic return value */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid1,sid2; /* Dataspace ID */
+ hid_t attr; /* Attribute ID */
+ hid_t plist; /* Property list ID */
+ hsize_t dims1[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3};
+ hsize_t dims2[] = {ATTR1_DIM1};
+ H5T_cset_t cset; /* Character set for attributes */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Attribute Property Lists\n"));
@@ -666,7 +662,7 @@ test_attr_plist(hid_t fapl)
CHECK(ret, FAIL, "H5Fclose");
} /* test_attr_plist() */
-
+
/****************************************************************
**
** test_attr_compound_write(): Test H5A (attribute) code.
@@ -676,15 +672,15 @@ test_attr_plist(hid_t fapl)
static void
test_attr_compound_write(hid_t fapl)
{
- hid_t fid1; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t tid1; /* Attribute datatype ID */
- hid_t sid1,sid2; /* Dataspace ID */
- hid_t attr; /* Attribute ID */
- hsize_t dims1[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3};
- hsize_t dims2[] = {ATTR4_DIM1,ATTR4_DIM2};
- hid_t ret_id; /* Generic hid_t return value */
- herr_t ret; /* Generic return value */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t tid1; /* Attribute datatype ID */
+ hid_t sid1,sid2; /* Dataspace ID */
+ hid_t attr; /* Attribute ID */
+ hsize_t dims1[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3};
+ hsize_t dims2[] = {ATTR4_DIM1,ATTR4_DIM2};
+ hid_t ret_id; /* Generic hid_t return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Multiple Attribute Functions\n"));
@@ -755,7 +751,7 @@ test_attr_compound_write(hid_t fapl)
CHECK(ret, FAIL, "H5Fclose");
} /* test_attr_compound_write() */
-
+
/****************************************************************
**
** test_attr_compound_read(): Test basic H5A (attribute) code.
@@ -764,11 +760,11 @@ test_attr_compound_write(hid_t fapl)
static void
test_attr_compound_read(hid_t fapl)
{
- hid_t fid1; /* HDF5 File ID */
- hid_t dataset; /* Dataset ID */
+ hid_t fid1; /* HDF5 File ID */
+ hid_t dataset; /* Dataset ID */
hid_t space; /* Attribute dataspace */
hid_t type; /* Attribute datatype */
- hid_t attr; /* Attribute ID */
+ hid_t attr; /* Attribute ID */
char attr_name[ATTR_NAME_LEN]; /* Buffer for attribute names */
int rank; /* Attribute rank */
hsize_t dims[ATTR_MAX_DIMS]; /* Attribute dimensions */
@@ -783,7 +779,7 @@ test_attr_compound_read(hid_t fapl)
ssize_t name_len; /* Length of attribute name */
H5O_info_t oinfo; /* Object info */
int i, j; /* Local index variables */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Basic Attribute Functions\n"));
@@ -832,7 +828,7 @@ test_attr_compound_read(hid_t fapl)
HDstrcmp(fieldname, ATTR4_FIELDNAME3)))
TestErrPrintf("invalid field name for field #%d: %s\n", i, fieldname);
H5free_memory(fieldname);
- } /* end for */
+ } /* end for */
offset = H5Tget_member_offset(type, 0);
VERIFY(offset, attr4_field1_off, "H5Tget_member_offset");
offset = H5Tget_member_offset(type, 1);
@@ -880,7 +876,7 @@ test_attr_compound_read(hid_t fapl)
printf("%d: attribute data different: attr_data4[%d][%d].i=%d, read_data4[%d][%d].i=%d\n", __LINE__, i, j, attr_data4[i][j].i, i, j, read_data4[i][j].i);
printf("%d: attribute data different: attr_data4[%d][%d].d=%f, read_data4[%d][%d].d=%f\n", __LINE__, i, j, attr_data4[i][j].d, i, j, read_data4[i][j].d);
TestErrPrintf("%d: attribute data different: attr_data4[%d][%d].c=%c, read_data4[%d][%d].c=%c\n", __LINE__, i, j, attr_data4[i][j].c, i, j, read_data4[i][j].c);
- } /* end if */
+ } /* end if */
/* Verify Name */
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name);
@@ -905,7 +901,7 @@ test_attr_compound_read(hid_t fapl)
CHECK(ret, FAIL, "H5Fclose");
} /* test_attr_compound_read() */
-
+
/****************************************************************
**
** test_attr_scalar_write(): Test scalar H5A (attribute) writing code.
@@ -914,13 +910,13 @@ test_attr_compound_read(hid_t fapl)
static void
test_attr_scalar_write(hid_t fapl)
{
- hid_t fid1; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t sid1,sid2; /* Dataspace ID */
- hid_t attr; /* Attribute ID */
- hsize_t dims1[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3};
- hid_t ret_id; /* Generic hid_t return value */
- herr_t ret; /* Generic return value */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid1,sid2; /* Dataspace ID */
+ hid_t attr; /* Attribute ID */
+ hsize_t dims1[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3};
+ hid_t ret_id; /* Generic hid_t return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Basic Attribute Functions\n"));
@@ -971,7 +967,7 @@ test_attr_scalar_write(hid_t fapl)
CHECK(ret, FAIL, "H5Fclose");
} /* test_attr_scalar_write() */
-
+
/****************************************************************
**
** test_attr_scalar_read(): Test scalar H5A (attribute) reading code.
@@ -980,14 +976,14 @@ test_attr_scalar_write(hid_t fapl)
static void
test_attr_scalar_read(hid_t fapl)
{
- hid_t fid1; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t sid; /* Dataspace ID */
- hid_t attr; /* Attribute ID */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid; /* Dataspace ID */
+ hid_t attr; /* Attribute ID */
H5S_class_t stype; /* Dataspace class */
- float rdata = 0.0F; /* Buffer for reading 1st attribute */
+ float rdata = 0.0F; /* Buffer for reading 1st attribute */
H5O_info_t oinfo; /* Object info */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Basic Scalar Attribute Reading Functions\n"));
@@ -1015,8 +1011,8 @@ test_attr_scalar_read(hid_t fapl)
/* Verify the floating-poing value in this way to avoid compiler warning. */
if(!H5_FLT_ABS_EQUAL(rdata, attr_data5))
- printf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n",
- "H5Aread", (double)attr_data5, (double)rdata, (int)__LINE__, __FILE__);
+ printf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n",
+ "H5Aread", (double)attr_data5, (double)rdata, (int)__LINE__, __FILE__);
/* Get the attribute's dataspace */
sid = H5Aget_space(attr);
@@ -1042,7 +1038,7 @@ test_attr_scalar_read(hid_t fapl)
CHECK(ret, FAIL, "H5Fclose");
} /* test_attr_scalar_read() */
-
+
/****************************************************************
**
** test_attr_mult_write(): Test basic H5A (attribute) code.
@@ -1052,16 +1048,16 @@ test_attr_scalar_read(hid_t fapl)
static void
test_attr_mult_write(hid_t fapl)
{
- hid_t fid1; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t sid1,sid2; /* Dataspace ID */
- hid_t attr; /* Attribute ID */
- hsize_t dims1[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3};
- hsize_t dims2[] = {ATTR1_DIM1};
- hsize_t dims3[] = {ATTR2_DIM1,ATTR2_DIM2};
- hsize_t dims4[] = {ATTR3_DIM1,ATTR3_DIM2,ATTR3_DIM3};
- hid_t ret_id; /* Generic hid_t return value */
- herr_t ret; /* Generic return value */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid1,sid2; /* Dataspace ID */
+ hid_t attr; /* Attribute ID */
+ hsize_t dims1[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3};
+ hsize_t dims2[] = {ATTR1_DIM1};
+ hsize_t dims3[] = {ATTR2_DIM1,ATTR2_DIM2};
+ hsize_t dims4[] = {ATTR3_DIM1,ATTR3_DIM2,ATTR3_DIM3};
+ hid_t ret_id; /* Generic hid_t return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Multiple Attribute Functions\n"));
@@ -1163,7 +1159,7 @@ test_attr_mult_write(hid_t fapl)
CHECK(ret, FAIL, "H5Fclose");
} /* test_attr_mult_write() */
-
+
/****************************************************************
**
** test_attr_mult_read(): Test basic H5A (attribute) code.
@@ -1172,11 +1168,11 @@ test_attr_mult_write(hid_t fapl)
static void
test_attr_mult_read(hid_t fapl)
{
- hid_t fid1; /* HDF5 File ID */
- hid_t dataset; /* Dataset ID */
+ hid_t fid1; /* HDF5 File ID */
+ hid_t dataset; /* Dataset ID */
hid_t space; /* Attribute dataspace */
hid_t type; /* Attribute datatype */
- hid_t attr; /* Attribute ID */
+ hid_t attr; /* Attribute ID */
char attr_name[ATTR_NAME_LEN]; /* Buffer for attribute names */
char temp_name[ATTR_NAME_LEN]; /* Buffer for mangling attribute names */
int rank; /* Attribute rank */
@@ -1187,10 +1183,10 @@ test_attr_mult_read(hid_t fapl)
int read_data1[ATTR1_DIM1] = {0}; /* Buffer for reading 1st attribute */
int read_data2[ATTR2_DIM1][ATTR2_DIM2] = {{0}}; /* Buffer for reading 2nd attribute */
double read_data3[ATTR3_DIM1][ATTR3_DIM2][ATTR3_DIM3] = {{{0}}}; /* Buffer for reading 3rd attribute */
- ssize_t name_len; /* Length of attribute name */
+ ssize_t name_len; /* Length of attribute name */
H5O_info_t oinfo; /* Object info */
int i, j, k; /* Local index values */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Basic Attribute Functions\n"));
@@ -1385,7 +1381,7 @@ test_attr_mult_read(hid_t fapl)
CHECK(ret, FAIL, "H5Fclose");
} /* test_attr_mult_read() */
-
+
/****************************************************************
**
** attr_op1(): Attribute operator
@@ -1425,7 +1421,7 @@ attr_op1(hid_t H5_ATTR_UNUSED loc_id, const char *name, const H5A_info_t H5_ATTR
return(ret);
} /* end attr_op1() */
-
+
/****************************************************************
**
** test_attr_iterate(): Test H5A (attribute) iterator code.
@@ -1434,12 +1430,12 @@ attr_op1(hid_t H5_ATTR_UNUSED loc_id, const char *name, const H5A_info_t H5_ATTR
static void
test_attr_iterate(hid_t fapl)
{
- hid_t file; /* HDF5 File ID */
- hid_t dataset; /* Dataset ID */
- hid_t sid; /* Dataspace ID */
+ hid_t file; /* HDF5 File ID */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid; /* Dataspace ID */
int count; /* operator data for the iterator */
H5O_info_t oinfo; /* Object info */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Basic Attribute Functions\n"));
@@ -1497,7 +1493,7 @@ test_attr_iterate(hid_t fapl)
CHECK(ret, FAIL, "H5Fclose");
} /* test_attr_iterate() */
-
+
/****************************************************************
**
** test_attr_delete(): Test H5A (attribute) code for deleting objects.
@@ -1506,13 +1502,13 @@ test_attr_iterate(hid_t fapl)
static void
test_attr_delete(hid_t fapl)
{
- hid_t fid1; /* HDF5 File ID */
- hid_t dataset; /* Dataset ID */
- hid_t attr; /* Attribute ID */
+ hid_t fid1; /* HDF5 File ID */
+ hid_t dataset; /* Dataset ID */
+ hid_t attr; /* Attribute ID */
char attr_name[ATTR_NAME_LEN]; /* Buffer for attribute names */
ssize_t name_len; /* Length of attribute name */
H5O_info_t oinfo; /* Object info */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Basic Attribute Functions\n"));
@@ -1617,7 +1613,7 @@ test_attr_delete(hid_t fapl)
CHECK(ret, FAIL, "H5Fclose");
} /* test_attr_delete() */
-
+
/****************************************************************
**
** test_attr_dtype_shared(): Test H5A (attribute) code for using
@@ -1637,7 +1633,7 @@ test_attr_dtype_shared(hid_t fapl)
H5O_info_t oinfo; /* Object's information */
h5_stat_size_t empty_filesize; /* Size of empty file */
h5_stat_size_t filesize; /* Size of file after modifications */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Shared Datatypes with Attributes\n"));
@@ -1794,7 +1790,7 @@ test_attr_dtype_shared(hid_t fapl)
VERIFY(filesize, empty_filesize, "h5_get_file_size");
} /* test_attr_dtype_shared() */
-
+
/****************************************************************
**
** test_attr_duplicate_ids(): Test operations with more than
@@ -1804,17 +1800,17 @@ test_attr_dtype_shared(hid_t fapl)
static void
test_attr_duplicate_ids(hid_t fapl)
{
- hid_t fid1; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t gid1, gid2; /* Group ID */
- hid_t sid1,sid2; /* Dataspace ID */
- hid_t attr, attr2; /* Attribute ID */
- hsize_t dims1[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3};
- hsize_t dims2[] = {ATTR1_DIM1};
- int read_data1[ATTR1_DIM1]={0}; /* Buffer for reading 1st attribute */
- int rewrite_data[ATTR1_DIM1]={1234, -423, 9907256}; /* Test data for rewrite */
- int i;
- herr_t ret; /* Generic return value */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t gid1, gid2; /* Group ID */
+ hid_t sid1,sid2; /* Dataspace ID */
+ hid_t attr, attr2; /* Attribute ID */
+ hsize_t dims1[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3};
+ hsize_t dims2[] = {ATTR1_DIM1};
+ int read_data1[ATTR1_DIM1]={0}; /* Buffer for reading 1st attribute */
+ int rewrite_data[ATTR1_DIM1]={1234, -423, 9907256}; /* Test data for rewrite */
+ int i;
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing operations with two ID handles\n"));
@@ -1832,7 +1828,7 @@ test_attr_duplicate_ids(hid_t fapl)
/* Create a dataset */
dataset = H5Dcreate2(fid1, DSET1_NAME, H5T_NATIVE_UCHAR, sid1, H5P_DEFAULT,
- H5P_DEFAULT, H5P_DEFAULT);
+ H5P_DEFAULT, H5P_DEFAULT);
CHECK(dataset, FAIL, "H5Dcreate2");
/* Create dataspace for attribute */
@@ -2039,7 +2035,7 @@ test_attr_duplicate_ids(hid_t fapl)
CHECK(ret, FAIL, "H5Fclose");
} /* test_attr_duplicate_ids() */
-
+
/****************************************************************
**
** test_attr_dense_verify(): Test basic H5A (attribute) code.
@@ -2049,12 +2045,12 @@ test_attr_duplicate_ids(hid_t fapl)
static int
test_attr_dense_verify(hid_t loc_id, unsigned max_attr)
{
- char attrname[NAME_BUF_SIZE]; /* Name of attribute */
- hid_t attr; /* Attribute ID */
+ char attrname[NAME_BUF_SIZE]; /* Name of attribute */
+ hid_t attr; /* Attribute ID */
unsigned value; /* Attribute value */
unsigned u; /* Local index variable */
int old_nerrs; /* Number of errors when entering this check */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Retrieve the current # of reported errors */
old_nerrs = GetTestNumErrs();
@@ -2109,7 +2105,7 @@ test_attr_dense_verify(hid_t loc_id, unsigned max_attr)
return(-1);
} /* test_attr_dense_verify() */
-
+
/****************************************************************
**
** test_attr_dense_create(): Test basic H5A (attribute) code.
@@ -2119,19 +2115,19 @@ test_attr_dense_verify(hid_t loc_id, unsigned max_attr)
static void
test_attr_dense_create(hid_t fcpl, hid_t fapl)
{
- hid_t fid; /* HDF5 File ID */
- hid_t dataset; /* Dataset ID */
- hid_t sid; /* Dataspace ID */
- hid_t attr; /* Attribute ID */
- hid_t dcpl; /* Dataset creation property list ID */
- char attrname[NAME_BUF_SIZE]; /* Name of attribute */
+ hid_t fid; /* HDF5 File ID */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid; /* Dataspace ID */
+ hid_t attr; /* Attribute ID */
+ hid_t dcpl; /* Dataset creation property list ID */
+ char attrname[NAME_BUF_SIZE]; /* Name of attribute */
unsigned max_compact; /* Maximum # of attributes to store compactly */
unsigned min_dense; /* Minimum # of attributes to store "densely" */
- htri_t is_dense; /* Are attributes stored densely? */
+ htri_t is_dense; /* Are attributes stored densely? */
unsigned u; /* Local index variable */
h5_stat_size_t empty_filesize; /* Size of empty file */
h5_stat_size_t filesize; /* Size of file after modifications */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Dense Attribute Storage Creation\n"));
@@ -2240,7 +2236,7 @@ test_attr_dense_create(hid_t fcpl, hid_t fapl)
VERIFY(filesize, empty_filesize, "h5_get_file_size");
} /* test_attr_dense_create() */
-
+
/****************************************************************
**
** test_attr_dense_open(): Test basic H5A (attribute) code.
@@ -2250,19 +2246,19 @@ test_attr_dense_create(hid_t fcpl, hid_t fapl)
static void
test_attr_dense_open(hid_t fcpl, hid_t fapl)
{
- hid_t fid; /* HDF5 File ID */
- hid_t dataset; /* Dataset ID */
- hid_t sid; /* Dataspace ID */
- hid_t attr; /* Attribute ID */
- hid_t dcpl; /* Dataset creation property list ID */
- char attrname[NAME_BUF_SIZE]; /* Name of attribute */
+ hid_t fid; /* HDF5 File ID */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid; /* Dataspace ID */
+ hid_t attr; /* Attribute ID */
+ hid_t dcpl; /* Dataset creation property list ID */
+ char attrname[NAME_BUF_SIZE]; /* Name of attribute */
unsigned max_compact; /* Maximum # of attributes to store compactly */
unsigned min_dense; /* Minimum # of attributes to store "densely" */
- htri_t is_dense; /* Are attributes stored densely? */
+ htri_t is_dense; /* Are attributes stored densely? */
unsigned u; /* Local index variable */
h5_stat_size_t empty_filesize; /* Size of empty file */
h5_stat_size_t filesize; /* Size of file after modifications */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Opening Attributes in Dense Storage\n"));
@@ -2379,7 +2375,7 @@ test_attr_dense_open(hid_t fcpl, hid_t fapl)
VERIFY(filesize, empty_filesize, "h5_get_file_size");
} /* test_attr_dense_open() */
-
+
/****************************************************************
**
** test_attr_dense_delete(): Test basic H5A (attribute) code.
@@ -2389,20 +2385,20 @@ test_attr_dense_open(hid_t fcpl, hid_t fapl)
static void
test_attr_dense_delete(hid_t fcpl, hid_t fapl)
{
- hid_t fid; /* HDF5 File ID */
- hid_t dataset; /* Dataset ID */
- hid_t sid; /* Dataspace ID */
- hid_t attr; /* Attribute ID */
- hid_t dcpl; /* Dataset creation property list ID */
- char attrname[NAME_BUF_SIZE]; /* Name of attribute */
+ hid_t fid; /* HDF5 File ID */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid; /* Dataspace ID */
+ hid_t attr; /* Attribute ID */
+ hid_t dcpl; /* Dataset creation property list ID */
+ char attrname[NAME_BUF_SIZE]; /* Name of attribute */
unsigned max_compact; /* Maximum # of attributes to store compactly */
unsigned min_dense; /* Minimum # of attributes to store "densely" */
- htri_t is_dense; /* Are attributes stored densely? */
+ htri_t is_dense; /* Are attributes stored densely? */
unsigned u; /* Local index variable */
h5_stat_size_t empty_filesize; /* Size of empty file */
h5_stat_size_t filesize; /* Size of file after modifications */
H5O_info_t oinfo; /* Object info */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Deleting Attributes in Dense Storage\n"));
@@ -2557,7 +2553,7 @@ test_attr_dense_delete(hid_t fcpl, hid_t fapl)
VERIFY(filesize, empty_filesize, "h5_get_file_size");
} /* test_attr_dense_delete() */
-
+
/****************************************************************
**
** test_attr_dense_rename(): Test basic H5A (attribute) code.
@@ -2567,21 +2563,21 @@ test_attr_dense_delete(hid_t fcpl, hid_t fapl)
static void
test_attr_dense_rename(hid_t fcpl, hid_t fapl)
{
- hid_t fid; /* HDF5 File ID */
- hid_t dataset; /* Dataset ID */
- hid_t sid; /* Dataspace ID */
- hid_t attr; /* Attribute ID */
- hid_t dcpl; /* Dataset creation property list ID */
- char attrname[NAME_BUF_SIZE]; /* Name of attribute */
- char new_attrname[NAME_BUF_SIZE]; /* New name of attribute */
+ hid_t fid; /* HDF5 File ID */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid; /* Dataspace ID */
+ hid_t attr; /* Attribute ID */
+ hid_t dcpl; /* Dataset creation property list ID */
+ char attrname[NAME_BUF_SIZE]; /* Name of attribute */
+ char new_attrname[NAME_BUF_SIZE]; /* New name of attribute */
unsigned max_compact; /* Maximum # of attributes to store compactly */
unsigned min_dense; /* Minimum # of attributes to store "densely" */
- htri_t is_dense; /* Are attributes stored densely? */
+ htri_t is_dense; /* Are attributes stored densely? */
h5_stat_size_t empty_filesize; /* Size of empty file */
h5_stat_size_t filesize; /* Size of file after modifications */
H5O_info_t oinfo; /* Object info */
unsigned u; /* Local index variable */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Renaming Attributes in Dense Storage\n"));
@@ -2716,7 +2712,7 @@ test_attr_dense_rename(hid_t fcpl, hid_t fapl)
VERIFY(filesize, empty_filesize, "h5_get_file_size");
} /* test_attr_dense_rename() */
-
+
/****************************************************************
**
** test_attr_dense_unlink(): Test basic H5A (attribute) code.
@@ -2726,21 +2722,21 @@ test_attr_dense_rename(hid_t fcpl, hid_t fapl)
static void
test_attr_dense_unlink(hid_t fcpl, hid_t fapl)
{
- hid_t fid; /* HDF5 File ID */
- hid_t dataset; /* Dataset ID */
- hid_t sid; /* Dataspace ID */
- hid_t attr; /* Attribute ID */
- hid_t dcpl; /* Dataset creation property list ID */
- char attrname[NAME_BUF_SIZE]; /* Name of attribute */
+ hid_t fid; /* HDF5 File ID */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid; /* Dataspace ID */
+ hid_t attr; /* Attribute ID */
+ hid_t dcpl; /* Dataset creation property list ID */
+ char attrname[NAME_BUF_SIZE]; /* Name of attribute */
unsigned max_compact; /* Maximum # of attributes to store compactly */
unsigned min_dense; /* Minimum # of attributes to store "densely" */
- htri_t is_dense; /* Are attributes stored densely? */
+ htri_t is_dense; /* Are attributes stored densely? */
size_t mesg_count; /* # of shared messages */
h5_stat_size_t empty_filesize; /* Size of empty file */
h5_stat_size_t filesize; /* Size of file after modifications */
H5O_info_t oinfo; /* Object info */
unsigned u; /* Local index variable */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Unlinking Object with Attributes in Dense Storage\n"));
@@ -2846,7 +2842,7 @@ test_attr_dense_unlink(hid_t fcpl, hid_t fapl)
VERIFY(filesize, empty_filesize, "h5_get_file_size");
} /* test_attr_dense_unlink() */
-
+
/****************************************************************
**
** test_attr_dense_limits(): Test basic H5A (attribute) code.
@@ -2856,19 +2852,19 @@ test_attr_dense_unlink(hid_t fcpl, hid_t fapl)
static void
test_attr_dense_limits(hid_t fcpl, hid_t fapl)
{
- hid_t fid; /* HDF5 File ID */
- hid_t dataset; /* Dataset ID */
- hid_t sid; /* Dataspace ID */
- hid_t attr; /* Attribute ID */
- hid_t dcpl; /* Dataset creation property list ID */
- char attrname[NAME_BUF_SIZE]; /* Name of attribute */
+ hid_t fid; /* HDF5 File ID */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid; /* Dataspace ID */
+ hid_t attr; /* Attribute ID */
+ hid_t dcpl; /* Dataset creation property list ID */
+ char attrname[NAME_BUF_SIZE]; /* Name of attribute */
unsigned max_compact, rmax_compact; /* Maximum # of attributes to store compactly */
unsigned min_dense, rmin_dense; /* Minimum # of attributes to store "densely" */
- htri_t is_dense; /* Are attributes stored densely? */
+ htri_t is_dense; /* Are attributes stored densely? */
unsigned u; /* Local index variable */
h5_stat_size_t empty_filesize; /* Size of empty file */
h5_stat_size_t filesize; /* Size of file after modifications */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Phase Change Limits For Attributes in Dense Storage\n"));
@@ -3011,7 +3007,7 @@ test_attr_dense_limits(hid_t fcpl, hid_t fapl)
VERIFY(filesize, empty_filesize, "h5_get_file_size");
} /* test_attr_dense_limits() */
-
+
/****************************************************************
**
** test_attr_dense_dup_ids(): Test operations with multiple ID
@@ -3021,23 +3017,23 @@ test_attr_dense_limits(hid_t fcpl, hid_t fapl)
static void
test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
{
- hid_t fid; /* HDF5 File ID */
- hid_t dataset; /* Dataset ID */
- hid_t gid1, gid2; /* Group ID */
- hid_t sid, sid2; /* Dataspace ID */
- hid_t attr, attr2, add_attr; /* Attribute ID */
- hid_t dcpl; /* Dataset creation property list ID */
- char attrname[NAME_BUF_SIZE]; /* Name of attribute */
- hsize_t dims[] = {ATTR1_DIM1};
+ hid_t fid; /* HDF5 File ID */
+ hid_t dataset; /* Dataset ID */
+ hid_t gid1, gid2; /* Group ID */
+ hid_t sid, sid2; /* Dataspace ID */
+ hid_t attr, attr2, add_attr; /* Attribute ID */
+ hid_t dcpl; /* Dataset creation property list ID */
+ char attrname[NAME_BUF_SIZE]; /* Name of attribute */
+ hsize_t dims[] = {ATTR1_DIM1};
int read_data1[ATTR1_DIM1]={0}; /* Buffer for reading attribute */
int rewrite_data[ATTR1_DIM1]={1234, -423, 9907256}; /* Test data for rewrite */
unsigned scalar_data = 1317; /* scalar data for attribute */
unsigned read_scalar; /* variable for reading attribute*/
unsigned max_compact; /* Maximum # of attributes to store compactly */
unsigned min_dense; /* Minimum # of attributes to store "densely" */
- htri_t is_dense; /* Are attributes stored densely? */
+ htri_t is_dense; /* Are attributes stored densely? */
unsigned u, i; /* Local index variable */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing operations with two IDs for Dense Storage\n"));
@@ -3534,7 +3530,7 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Fclose");
} /* test_attr_dense_dup_ids() */
-
+
/****************************************************************
**
** test_attr_big(): Test basic H5A (attribute) code.
@@ -3544,24 +3540,24 @@ test_attr_dense_dup_ids(hid_t fcpl, hid_t fapl)
static void
test_attr_big(hid_t fcpl, hid_t fapl)
{
- hid_t fid; /* HDF5 File ID */
- hid_t dataset; /* Dataset ID */
- hid_t sid; /* Dataspace ID */
- hid_t big_sid; /* "Big" dataspace ID */
+ hid_t fid; /* HDF5 File ID */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid; /* Dataspace ID */
+ hid_t big_sid; /* "Big" dataspace ID */
hsize_t dims[ATTR6_RANK] = {ATTR6_DIM1, ATTR6_DIM2, ATTR6_DIM3}; /* Attribute dimensions */
- hid_t attr; /* Attribute ID */
- hid_t dcpl; /* Dataset creation property list ID */
- char attrname[NAME_BUF_SIZE]; /* Name of attribute */
+ hid_t attr; /* Attribute ID */
+ hid_t dcpl; /* Dataset creation property list ID */
+ char attrname[NAME_BUF_SIZE]; /* Name of attribute */
unsigned max_compact; /* Maximum # of attributes to store compactly */
unsigned min_dense; /* Minimum # of attributes to store "densely" */
unsigned nshared_indices; /* # of shared message indices */
H5F_libver_t low, high; /* File format bounds */
- htri_t is_empty; /* Are there any attributes? */
- htri_t is_dense; /* Are attributes stored densely? */
+ htri_t is_empty; /* Are there any attributes? */
+ htri_t is_dense; /* Are attributes stored densely? */
unsigned u; /* Local index variable */
h5_stat_size_t empty_filesize; /* Size of empty file */
h5_stat_size_t filesize; /* Size of file after modifications */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Storing 'Big' Attributes in Dense Storage\n"));
@@ -3804,7 +3800,7 @@ test_attr_big(hid_t fcpl, hid_t fapl)
VERIFY(filesize, empty_filesize, "h5_get_file_size");
} /* test_attr_big() */
-
+
/****************************************************************
**
** test_attr_null_space(): Test basic H5A (attribute) code.
@@ -3814,20 +3810,20 @@ test_attr_big(hid_t fcpl, hid_t fapl)
static void
test_attr_null_space(hid_t fcpl, hid_t fapl)
{
- hid_t fid; /* HDF5 File ID */
- hid_t dataset; /* Dataset ID */
- hid_t sid; /* Dataspace ID */
- hid_t null_sid; /* "null" dataspace ID */
- hid_t attr_sid; /* Attribute's dataspace ID */
- hid_t attr; /* Attribute ID */
- char attrname[NAME_BUF_SIZE]; /* Name of attribute */
+ hid_t fid; /* HDF5 File ID */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid; /* Dataspace ID */
+ hid_t null_sid; /* "null" dataspace ID */
+ hid_t attr_sid; /* Attribute's dataspace ID */
+ hid_t attr; /* Attribute ID */
+ char attrname[NAME_BUF_SIZE]; /* Name of attribute */
unsigned value; /* Attribute value */
htri_t cmp; /* Results of comparison */
hsize_t storage_size; /* Size of storage for attribute */
H5A_info_t ainfo; /* Attribute info */
h5_stat_size_t empty_filesize; /* Size of empty file */
h5_stat_size_t filesize; /* Size of file after modifications */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Storing Attributes with 'null' dataspace\n"));
@@ -4022,7 +4018,7 @@ test_attr_null_space(hid_t fcpl, hid_t fapl)
VERIFY(filesize, empty_filesize, "h5_get_file_size");
} /* test_attr_null_space() */
-
+
/****************************************************************
**
** test_attr_deprec(): Test basic H5A (attribute) code.
@@ -4033,11 +4029,11 @@ static void
test_attr_deprec(hid_t fcpl, hid_t fapl)
{
#ifndef H5_NO_DEPRECATED_SYMBOLS
- hid_t fid; /* HDF5 File ID */
- hid_t dataset; /* Dataset ID */
- hid_t sid; /* Dataspace ID */
- hid_t attr; /* Attribute ID */
- herr_t ret; /* Generic return value */
+ hid_t fid; /* HDF5 File ID */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid; /* Dataspace ID */
+ hid_t attr; /* Attribute ID */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Deprecated Attribute Routines\n"));
@@ -4131,7 +4127,7 @@ test_attr_deprec(hid_t fcpl, hid_t fapl)
#endif /* H5_NO_DEPRECATED_SYMBOLS */
} /* test_attr_deprec() */
-
+
/****************************************************************
**
** test_attr_many(): Test basic H5A (attribute) code.
@@ -4141,15 +4137,15 @@ test_attr_deprec(hid_t fcpl, hid_t fapl)
static void
test_attr_many(hbool_t new_format, hid_t fcpl, hid_t fapl)
{
- hid_t fid; /* HDF5 File ID */
- hid_t gid; /* Group ID */
- hid_t sid; /* Dataspace ID */
- hid_t aid; /* Attribute ID */
- char attrname[NAME_BUF_SIZE]; /* Name of attribute */
+ hid_t fid; /* HDF5 File ID */
+ hid_t gid; /* Group ID */
+ hid_t sid; /* Dataspace ID */
+ hid_t aid; /* Attribute ID */
+ char attrname[NAME_BUF_SIZE]; /* Name of attribute */
unsigned nattr = (new_format ? NATTR_MANY_NEW : NATTR_MANY_OLD); /* Number of attributes */
htri_t exists; /* Whether the attribute exists or not */
unsigned u; /* Local index variable */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Storing Many Attributes\n"));
@@ -4260,7 +4256,7 @@ test_attr_many(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Sclose");
} /* test_attr_many() */
-
+
/****************************************************************
**
** test_attr_corder_create_empty(): Test basic H5A (attribute) code.
@@ -4270,14 +4266,14 @@ test_attr_many(hbool_t new_format, hid_t fcpl, hid_t fapl)
static void
test_attr_corder_create_basic(hid_t fcpl, hid_t fapl)
{
- hid_t fid; /* HDF5 File ID */
- hid_t dataset; /* Dataset ID */
- hid_t sid; /* Dataspace ID */
- hid_t dcpl; /* Dataset creation property list ID */
+ hid_t fid; /* HDF5 File ID */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid; /* Dataspace ID */
+ hid_t dcpl; /* Dataset creation property list ID */
unsigned crt_order_flags;/* Creation order flags */
- htri_t is_empty; /* Are there any attributes? */
- htri_t is_dense; /* Are attributes stored densely? */
- herr_t ret; /* Generic return value */
+ htri_t is_empty; /* Are there any attributes? */
+ htri_t is_dense; /* Are attributes stored densely? */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Basic Code for Attributes with Creation Order Info\n"));
@@ -4376,7 +4372,7 @@ test_attr_corder_create_basic(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Fclose");
} /* test_attr_corder_create_basic() */
-
+
/****************************************************************
**
** test_attr_corder_create_compact(): Test basic H5A (attribute) code.
@@ -4386,21 +4382,21 @@ test_attr_corder_create_basic(hid_t fcpl, hid_t fapl)
static void
test_attr_corder_create_compact(hid_t fcpl, hid_t fapl)
{
- hid_t fid; /* HDF5 File ID */
- hid_t dset1, dset2, dset3; /* Dataset IDs */
- hid_t my_dataset; /* Current dataset ID */
- hid_t sid; /* Dataspace ID */
- hid_t attr; /* Attribute ID */
- hid_t dcpl; /* Dataset creation property list ID */
+ hid_t fid; /* HDF5 File ID */
+ hid_t dset1, dset2, dset3; /* Dataset IDs */
+ hid_t my_dataset; /* Current dataset ID */
+ hid_t sid; /* Dataspace ID */
+ hid_t attr; /* Attribute ID */
+ hid_t dcpl; /* Dataset creation property list ID */
unsigned max_compact; /* Maximum # of links to store in group compactly */
unsigned min_dense; /* Minimum # of links to store in group "densely" */
- htri_t is_empty; /* Are there any attributes? */
- htri_t is_dense; /* Are attributes stored densely? */
+ htri_t is_empty; /* Are there any attributes? */
+ htri_t is_dense; /* Are attributes stored densely? */
hsize_t nattrs; /* Number of attributes on object */
- char attrname[NAME_BUF_SIZE]; /* Name of attribute */
+ char attrname[NAME_BUF_SIZE]; /* Name of attribute */
unsigned curr_dset; /* Current dataset to work on */
unsigned u; /* Local index variable */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Compact Storage of Attributes with Creation Order Info\n"));
@@ -4574,7 +4570,7 @@ test_attr_corder_create_compact(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Fclose");
} /* test_attr_corder_create_compact() */
-
+
/****************************************************************
**
** test_attr_corder_create_dense(): Test basic H5A (attribute) code.
@@ -4584,23 +4580,23 @@ test_attr_corder_create_compact(hid_t fcpl, hid_t fapl)
static void
test_attr_corder_create_dense(hid_t fcpl, hid_t fapl)
{
- hid_t fid; /* HDF5 File ID */
- hid_t dset1, dset2, dset3; /* Dataset IDs */
- hid_t my_dataset; /* Current dataset ID */
- hid_t sid; /* Dataspace ID */
- hid_t attr; /* Attribute ID */
- hid_t dcpl; /* Dataset creation property list ID */
+ hid_t fid; /* HDF5 File ID */
+ hid_t dset1, dset2, dset3; /* Dataset IDs */
+ hid_t my_dataset; /* Current dataset ID */
+ hid_t sid; /* Dataspace ID */
+ hid_t attr; /* Attribute ID */
+ hid_t dcpl; /* Dataset creation property list ID */
unsigned max_compact; /* Maximum # of links to store in group compactly */
unsigned min_dense; /* Minimum # of links to store in group "densely" */
- htri_t is_empty; /* Are there any attributes? */
- htri_t is_dense; /* Are attributes stored densely? */
+ htri_t is_empty; /* Are there any attributes? */
+ htri_t is_dense; /* Are attributes stored densely? */
hsize_t nattrs; /* Number of attributes on object */
hsize_t name_count; /* # of records in name index */
hsize_t corder_count; /* # of records in creation order index */
- char attrname[NAME_BUF_SIZE]; /* Name of attribute */
+ char attrname[NAME_BUF_SIZE]; /* Name of attribute */
unsigned curr_dset; /* Current dataset to work on */
unsigned u; /* Local index variable */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Dense Storage of Attributes with Creation Order Info\n"));
@@ -4801,7 +4797,7 @@ test_attr_corder_create_dense(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Fclose");
} /* test_attr_corder_create_dense() */
-
+
/****************************************************************
**
** test_attr_corder_create_reopen(): Test basic H5A (attribute) code.
@@ -4818,7 +4814,7 @@ test_attr_corder_create_reopen(hid_t fcpl, hid_t fapl)
hid_t sid = -1; /* Dataspace ID */
hid_t aid = -1; /* Attribute ID */
int buf; /* Attribute data */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Creating Attributes w/New & Old Format\n"));
@@ -4909,7 +4905,7 @@ test_attr_corder_create_reopen(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Sclose");
} /* test_attr_corder_create_reopen() */
-
+
/****************************************************************
**
** test_attr_corder_transition(): Test basic H5A (attribute) code.
@@ -4919,23 +4915,23 @@ test_attr_corder_create_reopen(hid_t fcpl, hid_t fapl)
static void
test_attr_corder_transition(hid_t fcpl, hid_t fapl)
{
- hid_t fid; /* HDF5 File ID */
- hid_t dset1, dset2, dset3; /* Dataset IDs */
- hid_t my_dataset; /* Current dataset ID */
- hid_t sid; /* Dataspace ID */
- hid_t attr; /* Attribute ID */
- hid_t dcpl; /* Dataset creation property list ID */
+ hid_t fid; /* HDF5 File ID */
+ hid_t dset1, dset2, dset3; /* Dataset IDs */
+ hid_t my_dataset; /* Current dataset ID */
+ hid_t sid; /* Dataspace ID */
+ hid_t attr; /* Attribute ID */
+ hid_t dcpl; /* Dataset creation property list ID */
unsigned max_compact; /* Maximum # of links to store in group compactly */
unsigned min_dense; /* Minimum # of links to store in group "densely" */
- htri_t is_empty; /* Are there any attributes? */
- htri_t is_dense; /* Are attributes stored densely? */
+ htri_t is_empty; /* Are there any attributes? */
+ htri_t is_dense; /* Are attributes stored densely? */
hsize_t nattrs; /* Number of attributes on object */
hsize_t name_count; /* # of records in name index */
hsize_t corder_count; /* # of records in creation order index */
- char attrname[NAME_BUF_SIZE]; /* Name of attribute */
+ char attrname[NAME_BUF_SIZE]; /* Name of attribute */
unsigned curr_dset; /* Current dataset to work on */
unsigned u; /* Local index variable */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Storage Transitions of Attributes with Creation Order Info\n"));
@@ -5315,7 +5311,7 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Sclose");
} /* test_attr_corder_transition() */
-
+
/****************************************************************
**
** test_attr_corder_delete(): Test basic H5A (attribute) code.
@@ -5325,28 +5321,28 @@ test_attr_corder_transition(hid_t fcpl, hid_t fapl)
static void
test_attr_corder_delete(hid_t fcpl, hid_t fapl)
{
- hid_t fid; /* HDF5 File ID */
- hid_t dset1, dset2, dset3; /* Dataset IDs */
- hid_t my_dataset; /* Current dataset ID */
- hid_t sid; /* Dataspace ID */
- hid_t attr; /* Attribute ID */
- hid_t dcpl; /* Dataset creation property list ID */
+ hid_t fid; /* HDF5 File ID */
+ hid_t dset1, dset2, dset3; /* Dataset IDs */
+ hid_t my_dataset; /* Current dataset ID */
+ hid_t sid; /* Dataspace ID */
+ hid_t attr; /* Attribute ID */
+ hid_t dcpl; /* Dataset creation property list ID */
unsigned max_compact; /* Maximum # of links to store in group compactly */
unsigned min_dense; /* Minimum # of links to store in group "densely" */
- htri_t is_empty; /* Are there any attributes? */
- htri_t is_dense; /* Are attributes stored densely? */
+ htri_t is_empty; /* Are there any attributes? */
+ htri_t is_dense; /* Are attributes stored densely? */
hsize_t nattrs; /* Number of attributes on object */
hsize_t name_count; /* # of records in name index */
hsize_t corder_count; /* # of records in creation order index */
unsigned reopen_file; /* Whether to re-open the file before deleting group */
- char attrname[NAME_BUF_SIZE]; /* Name of attribute */
+ char attrname[NAME_BUF_SIZE]; /* Name of attribute */
#ifdef LATER
h5_stat_size_t empty_size; /* Size of empty file */
h5_stat_size_t file_size; /* Size of file after operating on it */
#endif /* LATER */
unsigned curr_dset; /* Current dataset to work on */
unsigned u; /* Local index variable */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Deleting Object w/Dense Attribute Storage and Creation Order Info\n"));
@@ -5516,14 +5512,14 @@ test_attr_corder_delete(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Sclose");
} /* test_attr_corder_delete() */
-
+
/*-------------------------------------------------------------------------
* Function: attr_info_by_idx_check
*
* Purpose: Support routine for attr_info_by_idx, to verify the attribute
* info is correct for a attribute
*
- * Note: This routine assumes that the attributes have been added to the
+ * Note: This routine assumes that the attributes have been added to the
* object in alphabetical order.
*
* Return: Success: 0
@@ -5541,7 +5537,7 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n,
char tmpname[NAME_BUF_SIZE]; /* Temporary attribute name */
H5A_info_t ainfo; /* Attribute info struct */
int old_nerrs; /* Number of errors when entering this check */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Retrieve the current # of reported errors */
old_nerrs = GetTestNumErrs();
@@ -5663,7 +5659,7 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n,
return(-1);
} /* end attr_info_by_idx_check() */
-
+
/****************************************************************
**
** test_attr_info_by_idx(): Test basic H5A (attribute) code.
@@ -5673,26 +5669,26 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n,
static void
test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
{
- hid_t fid; /* HDF5 File ID */
- hid_t dset1, dset2, dset3; /* Dataset IDs */
- hid_t my_dataset; /* Current dataset ID */
- hid_t sid; /* Dataspace ID */
- hid_t attr; /* Attribute ID */
- hid_t dcpl; /* Dataset creation property list ID */
+ hid_t fid; /* HDF5 File ID */
+ hid_t dset1, dset2, dset3; /* Dataset IDs */
+ hid_t my_dataset; /* Current dataset ID */
+ hid_t sid; /* Dataspace ID */
+ hid_t attr; /* Attribute ID */
+ hid_t dcpl; /* Dataset creation property list ID */
H5A_info_t ainfo; /* Attribute information */
unsigned max_compact; /* Maximum # of links to store in group compactly */
unsigned min_dense; /* Minimum # of links to store in group "densely" */
- htri_t is_empty; /* Are there any attributes? */
- htri_t is_dense; /* Are attributes stored densely? */
+ htri_t is_empty; /* Are there any attributes? */
+ htri_t is_dense; /* Are attributes stored densely? */
hsize_t nattrs; /* Number of attributes on object */
hsize_t name_count; /* # of records in name index */
hsize_t corder_count; /* # of records in creation order index */
unsigned use_index; /* Use index on creation order values */
- char attrname[NAME_BUF_SIZE]; /* Name of attribute */
+ char attrname[NAME_BUF_SIZE]; /* Name of attribute */
char tmpname[NAME_BUF_SIZE]; /* Temporary attribute name */
unsigned curr_dset; /* Current dataset to work on */
unsigned u; /* Local index variable */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Create dataspace for dataset & attributes */
sid = H5Screate(H5S_SCALAR);
@@ -5873,7 +5869,7 @@ test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Sclose");
} /* test_attr_info_by_idx() */
-
+
/****************************************************************
**
** test_attr_delete_by_idx(): Test basic H5A (attribute) code.
@@ -5883,28 +5879,28 @@ test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
static void
test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
{
- hid_t fid; /* HDF5 File ID */
- hid_t dset1, dset2, dset3; /* Dataset IDs */
- hid_t my_dataset; /* Current dataset ID */
- hid_t sid; /* Dataspace ID */
- hid_t attr; /* Attribute ID */
- hid_t dcpl; /* Dataset creation property list ID */
+ hid_t fid; /* HDF5 File ID */
+ hid_t dset1, dset2, dset3; /* Dataset IDs */
+ hid_t my_dataset; /* Current dataset ID */
+ hid_t sid; /* Dataspace ID */
+ hid_t attr; /* Attribute ID */
+ hid_t dcpl; /* Dataset creation property list ID */
H5A_info_t ainfo; /* Attribute information */
unsigned max_compact; /* Maximum # of links to store in group compactly */
unsigned min_dense; /* Minimum # of links to store in group "densely" */
- htri_t is_empty; /* Are there any attributes? */
- htri_t is_dense; /* Are attributes stored densely? */
+ htri_t is_empty; /* Are there any attributes? */
+ htri_t is_dense; /* Are attributes stored densely? */
hsize_t nattrs; /* Number of attributes on object */
hsize_t name_count; /* # of records in name index */
hsize_t corder_count; /* # of records in creation order index */
H5_index_t idx_type; /* Type of index to operate on */
H5_iter_order_t order; /* Order within in the index */
unsigned use_index; /* Use index on creation order values */
- char attrname[NAME_BUF_SIZE]; /* Name of attribute */
+ char attrname[NAME_BUF_SIZE]; /* Name of attribute */
char tmpname[NAME_BUF_SIZE]; /* Temporary attribute name */
unsigned curr_dset; /* Current dataset to work on */
unsigned u; /* Local index variable */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Create dataspace for dataset & attributes */
sid = H5Screate(H5S_SCALAR);
@@ -6405,7 +6401,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Sclose");
} /* test_attr_delete_by_idx() */
-
+
/****************************************************************
**
** attr_iterate2_cb(): Revised attribute operator
@@ -6479,7 +6475,7 @@ HDfprintf(stderr, "op_data->curr = %Hd\n", op_data->curr);
} /* end attr_iterate2_cb() */
#ifndef H5_NO_DEPRECATED_SYMBOLS
-
+
/****************************************************************
**
** attr_iterate1_cb(): Attribute operator
@@ -6492,7 +6488,7 @@ attr_iterate1_cb(hid_t loc_id, const char *attr_name, void *_op_data)
} /* end attr_iterate1_cb() */
#endif /* H5_NO_DEPRECATED_SYMBOLS */
-
+
/*-------------------------------------------------------------------------
* Function: attr_iterate2_fail_cb
*
@@ -6514,7 +6510,7 @@ attr_iterate2_fail_cb(hid_t H5_ATTR_UNUSED group_id, const char H5_ATTR_UNUSED *
return(H5_ITER_ERROR);
} /* end attr_iterate2_fail_cb() */
-
+
/*-------------------------------------------------------------------------
* Function: attr_iterate_check
*
@@ -6814,7 +6810,7 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id,
return(-1);
} /* end attr_iterate_check() */
-
+
/****************************************************************
**
** test_attr_iterate2(): Test basic H5A (attribute) code.
@@ -6824,16 +6820,16 @@ attr_iterate_check(hid_t fid, const char *dsetname, hid_t obj_id,
static void
test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
{
- hid_t fid; /* HDF5 File ID */
- hid_t dset1, dset2, dset3; /* Dataset IDs */
- hid_t my_dataset; /* Current dataset ID */
- hid_t sid; /* Dataspace ID */
- hid_t attr; /* Attribute ID */
- hid_t dcpl; /* Dataset creation property list ID */
+ hid_t fid; /* HDF5 File ID */
+ hid_t dset1, dset2, dset3; /* Dataset IDs */
+ hid_t my_dataset; /* Current dataset ID */
+ hid_t sid; /* Dataspace ID */
+ hid_t attr; /* Attribute ID */
+ hid_t dcpl; /* Dataset creation property list ID */
unsigned max_compact; /* Maximum # of links to store in group compactly */
unsigned min_dense; /* Minimum # of links to store in group "densely" */
- htri_t is_empty; /* Are there any attributes? */
- htri_t is_dense; /* Are attributes stored densely? */
+ htri_t is_empty; /* Are there any attributes? */
+ htri_t is_dense; /* Are attributes stored densely? */
hsize_t nattrs; /* Number of attributes on object */
hsize_t name_count; /* # of records in name index */
hsize_t corder_count; /* # of records in creation order index */
@@ -6844,10 +6840,10 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
hsize_t idx; /* Start index for iteration */
unsigned use_index; /* Use index on creation order values */
const char *dsetname; /* Name of dataset for attributes */
- char attrname[NAME_BUF_SIZE]; /* Name of attribute */
+ char attrname[NAME_BUF_SIZE]; /* Name of attribute */
unsigned curr_dset; /* Current dataset to work on */
unsigned u; /* Local index variable */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Create dataspace for dataset & attributes */
sid = H5Screate(H5S_SCALAR);
@@ -6864,7 +6860,7 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
/* Allocate the "visited link" array */
iter_info.max_visit = max_compact * 2;
visited = (hbool_t*)HDmalloc(sizeof(hbool_t) * iter_info.max_visit);
- CHECK(visited, NULL, "HDmalloc");
+ CHECK_PTR(visited, "HDmalloc");
iter_info.visited = visited;
/* Loop over operating on different indices on link fields */
@@ -7118,7 +7114,7 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
HDfree(visited);
} /* test_attr_iterate2() */
-
+
/*-------------------------------------------------------------------------
* Function: attr_open_by_idx_check
*
@@ -7140,7 +7136,7 @@ attr_open_by_idx_check(hid_t obj_id, H5_index_t idx_type, H5_iter_order_t order,
H5A_info_t ainfo; /* Attribute info */
int old_nerrs; /* Number of errors when entering this check */
unsigned u; /* Local index variable */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Retrieve the current # of reported errors */
old_nerrs = GetTestNumErrs();
@@ -7178,7 +7174,7 @@ attr_open_by_idx_check(hid_t obj_id, H5_index_t idx_type, H5_iter_order_t order,
return(-1);
} /* end attr_open_by_idx_check() */
-
+
/****************************************************************
**
** test_attr_open_by_idx(): Test basic H5A (attribute) code.
@@ -7188,27 +7184,27 @@ attr_open_by_idx_check(hid_t obj_id, H5_index_t idx_type, H5_iter_order_t order,
static void
test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
{
- hid_t fid; /* HDF5 File ID */
- hid_t dset1, dset2, dset3; /* Dataset IDs */
- hid_t my_dataset; /* Current dataset ID */
- hid_t sid; /* Dataspace ID */
- hid_t attr; /* Attribute ID */
- hid_t dcpl; /* Dataset creation property list ID */
+ hid_t fid; /* HDF5 File ID */
+ hid_t dset1, dset2, dset3; /* Dataset IDs */
+ hid_t my_dataset; /* Current dataset ID */
+ hid_t sid; /* Dataspace ID */
+ hid_t attr; /* Attribute ID */
+ hid_t dcpl; /* Dataset creation property list ID */
unsigned max_compact; /* Maximum # of links to store in group compactly */
unsigned min_dense; /* Minimum # of links to store in group "densely" */
- htri_t is_empty; /* Are there any attributes? */
- htri_t is_dense; /* Are attributes stored densely? */
+ htri_t is_empty; /* Are there any attributes? */
+ htri_t is_dense; /* Are attributes stored densely? */
hsize_t nattrs; /* Number of attributes on object */
hsize_t name_count; /* # of records in name index */
hsize_t corder_count; /* # of records in creation order index */
H5_index_t idx_type; /* Type of index to operate on */
H5_iter_order_t order; /* Order within in the index */
unsigned use_index; /* Use index on creation order values */
- char attrname[NAME_BUF_SIZE]; /* Name of attribute */
+ char attrname[NAME_BUF_SIZE]; /* Name of attribute */
unsigned curr_dset; /* Current dataset to work on */
unsigned u; /* Local index variable */
- hid_t ret_id; /* Generic hid_t return value */
- herr_t ret; /* Generic return value */
+ hid_t ret_id; /* Generic hid_t return value */
+ herr_t ret; /* Generic return value */
/* Create dataspace for dataset & attributes */
sid = H5Screate(H5S_SCALAR);
@@ -7440,7 +7436,7 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Sclose");
} /* test_attr_open_by_idx() */
-
+
/*-------------------------------------------------------------------------
* Function: attr_open_check
*
@@ -7460,10 +7456,10 @@ attr_open_check(hid_t fid, const char *dsetname, hid_t obj_id,
{
hid_t attr_id; /* ID of attribute to test */
H5A_info_t ainfo; /* Attribute info */
- char attrname[NAME_BUF_SIZE]; /* Name of attribute */
+ char attrname[NAME_BUF_SIZE]; /* Name of attribute */
int old_nerrs; /* Number of errors when entering this check */
unsigned u; /* Local index variable */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Retrieve the current # of reported errors */
old_nerrs = GetTestNumErrs();
@@ -7526,7 +7522,7 @@ attr_open_check(hid_t fid, const char *dsetname, hid_t obj_id,
return(-1);
} /* end attr_open_check() */
-
+
/****************************************************************
**
** test_attr_open_by_name(): Test basic H5A (attribute) code.
@@ -7536,26 +7532,26 @@ attr_open_check(hid_t fid, const char *dsetname, hid_t obj_id,
static void
test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
{
- hid_t fid; /* HDF5 File ID */
- hid_t dset1, dset2, dset3; /* Dataset IDs */
- hid_t my_dataset; /* Current dataset ID */
- hid_t sid; /* Dataspace ID */
- hid_t attr; /* Attribute ID */
- hid_t dcpl; /* Dataset creation property list ID */
+ hid_t fid; /* HDF5 File ID */
+ hid_t dset1, dset2, dset3; /* Dataset IDs */
+ hid_t my_dataset; /* Current dataset ID */
+ hid_t sid; /* Dataspace ID */
+ hid_t attr; /* Attribute ID */
+ hid_t dcpl; /* Dataset creation property list ID */
unsigned max_compact; /* Maximum # of links to store in group compactly */
unsigned min_dense; /* Minimum # of links to store in group "densely" */
- htri_t is_empty; /* Are there any attributes? */
- htri_t is_dense; /* Are attributes stored densely? */
+ htri_t is_empty; /* Are there any attributes? */
+ htri_t is_dense; /* Are attributes stored densely? */
hsize_t nattrs; /* Number of attributes on object */
hsize_t name_count; /* # of records in name index */
hsize_t corder_count; /* # of records in creation order index */
unsigned use_index; /* Use index on creation order values */
const char *dsetname; /* Name of dataset for attributes */
- char attrname[NAME_BUF_SIZE]; /* Name of attribute */
+ char attrname[NAME_BUF_SIZE]; /* Name of attribute */
unsigned curr_dset; /* Current dataset to work on */
unsigned u; /* Local index variable */
- hid_t ret_id; /* Generic hid_t return value */
- herr_t ret; /* Generic return value */
+ hid_t ret_id; /* Generic hid_t return value */
+ herr_t ret; /* Generic return value */
/* Create dataspace for dataset & attributes */
sid = H5Screate(H5S_SCALAR);
@@ -7781,7 +7777,7 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Sclose");
} /* test_attr_open_by_name() */
-
+
/****************************************************************
**
** test_attr_create_by_name(): Test basic H5A (attribute) code.
@@ -7791,25 +7787,25 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
static void
test_attr_create_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
{
- hid_t fid; /* HDF5 File ID */
- hid_t dset1, dset2, dset3; /* Dataset IDs */
- hid_t my_dataset; /* Current dataset ID */
- hid_t sid; /* Dataspace ID */
- hid_t attr; /* Attribute ID */
- hid_t dcpl; /* Dataset creation property list ID */
+ hid_t fid; /* HDF5 File ID */
+ hid_t dset1, dset2, dset3; /* Dataset IDs */
+ hid_t my_dataset; /* Current dataset ID */
+ hid_t sid; /* Dataspace ID */
+ hid_t attr; /* Attribute ID */
+ hid_t dcpl; /* Dataset creation property list ID */
unsigned max_compact; /* Maximum # of links to store in group compactly */
unsigned min_dense; /* Minimum # of links to store in group "densely" */
- htri_t is_empty; /* Are there any attributes? */
- htri_t is_dense; /* Are attributes stored densely? */
+ htri_t is_empty; /* Are there any attributes? */
+ htri_t is_dense; /* Are attributes stored densely? */
hsize_t nattrs; /* Number of attributes on object */
hsize_t name_count; /* # of records in name index */
hsize_t corder_count; /* # of records in creation order index */
unsigned use_index; /* Use index on creation order values */
const char *dsetname; /* Name of dataset for attributes */
- char attrname[NAME_BUF_SIZE]; /* Name of attribute */
+ char attrname[NAME_BUF_SIZE]; /* Name of attribute */
unsigned curr_dset; /* Current dataset to work on */
unsigned u; /* Local index variable */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Create dataspace for dataset & attributes */
sid = H5Screate(H5S_SCALAR);
@@ -8014,35 +8010,35 @@ test_attr_create_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
static void
test_attr_shared_write(hid_t fcpl, hid_t fapl)
{
- hid_t fid; /* File ID */
- hid_t my_fcpl; /* File creation property list ID */
- hid_t dataset, dataset2; /* Dataset IDs */
- hid_t attr_tid; /* Attribute's datatype ID */
- hid_t sid, big_sid; /* Dataspace IDs */
- hsize_t big_dims[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3}; /* Dimensions for "big" attribute */
- hid_t attr; /* Attribute ID */
- hid_t dcpl; /* Dataset creation property list ID */
- char attrname[NAME_BUF_SIZE]; /* Name of attribute */
+ hid_t fid; /* File ID */
+ hid_t my_fcpl; /* File creation property list ID */
+ hid_t dataset, dataset2; /* Dataset IDs */
+ hid_t attr_tid; /* Attribute's datatype ID */
+ hid_t sid, big_sid; /* Dataspace IDs */
+ hsize_t big_dims[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3}; /* Dimensions for "big" attribute */
+ hid_t attr; /* Attribute ID */
+ hid_t dcpl; /* Dataset creation property list ID */
+ char attrname[NAME_BUF_SIZE]; /* Name of attribute */
unsigned max_compact; /* Maximum # of attributes to store compactly */
unsigned min_dense; /* Minimum # of attributes to store "densely" */
- htri_t is_dense; /* Are attributes stored densely? */
- htri_t is_shared; /* Is attributes shared? */
+ htri_t is_dense; /* Are attributes stored densely? */
+ htri_t is_shared; /* Is attributes shared? */
hsize_t shared_refcount; /* Reference count of shared attribute */
unsigned attr_value; /* Attribute value */
- unsigned *big_value; /* Data for "big" attribute */
+ unsigned *big_value; /* Data for "big" attribute */
size_t mesg_count; /* # of shared messages */
unsigned test_shared; /* Index over shared component type */
unsigned u; /* Local index variable */
h5_stat_size_t empty_filesize; /* Size of empty file */
h5_stat_size_t filesize; /* Size of file after modifications */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Writing Shared & Unshared Attributes in Compact & Dense Storage\n"));
/* Allocate & initialize "big" attribute data */
big_value = (unsigned *)HDmalloc((size_t)(SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3) * sizeof(unsigned));
- CHECK(big_value, NULL, "HDmalloc");
+ CHECK_PTR(big_value, "HDmalloc");
HDmemset(big_value, 1, sizeof(unsigned) * (size_t)(SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3));
/* Create dataspace for dataset */
@@ -8165,8 +8161,8 @@ test_attr_shared_write(hid_t fcpl, hid_t fapl)
CHECK(attr, FAIL, "H5Acreate2");
/* Check that attribute is not shared */
- is_shared = H5A_is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A_is_shared_test");
+ is_shared = H5A__is_shared_test(attr);
+ VERIFY(is_shared, FALSE, "H5A__is_shared_test");
/* Write data into the attribute */
attr_value = u + 1;
@@ -8179,13 +8175,13 @@ test_attr_shared_write(hid_t fcpl, hid_t fapl)
CHECK(attr, FAIL, "H5Acreate2");
/* Check that attribute is shared */
- is_shared = H5A_is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A_is_shared_test");
+ is_shared = H5A__is_shared_test(attr);
+ VERIFY(is_shared, TRUE, "H5A__is_shared_test");
/* Check refcount for attribute */
- ret = H5A_get_shared_rc_test(attr, &shared_refcount);
- CHECK(ret, FAIL, "H5A_get_shared_rc_test");
- VERIFY(shared_refcount, 1, "H5A_get_shared_rc_test");
+ ret = H5A__get_shared_rc_test(attr, &shared_refcount);
+ CHECK(ret, FAIL, "H5A__get_shared_rc_test");
+ VERIFY(shared_refcount, 1, "H5A__get_shared_rc_test");
/* Write data into the attribute */
big_value[0] = u + 1;
@@ -8193,9 +8189,9 @@ test_attr_shared_write(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Awrite");
/* Check refcount for attribute */
- ret = H5A_get_shared_rc_test(attr, &shared_refcount);
- CHECK(ret, FAIL, "H5A_get_shared_rc_test");
- VERIFY(shared_refcount, 1, "H5A_get_shared_rc_test");
+ ret = H5A__get_shared_rc_test(attr, &shared_refcount);
+ CHECK(ret, FAIL, "H5A__get_shared_rc_test");
+ VERIFY(shared_refcount, 1, "H5A__get_shared_rc_test");
} /* end else */
/* Close attribute */
@@ -8217,8 +8213,8 @@ test_attr_shared_write(hid_t fcpl, hid_t fapl)
CHECK(attr, FAIL, "H5Acreate2");
/* Check that attribute is not shared */
- is_shared = H5A_is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A_is_shared_test");
+ is_shared = H5A__is_shared_test(attr);
+ VERIFY(is_shared, FALSE, "H5A__is_shared_test");
/* Write data into the attribute */
attr_value = u + 1;
@@ -8231,13 +8227,13 @@ test_attr_shared_write(hid_t fcpl, hid_t fapl)
CHECK(attr, FAIL, "H5Acreate2");
/* Check that attribute is shared */
- is_shared = H5A_is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A_is_shared_test");
+ is_shared = H5A__is_shared_test(attr);
+ VERIFY(is_shared, TRUE, "H5A__is_shared_test");
/* Check refcount for attribute */
- ret = H5A_get_shared_rc_test(attr, &shared_refcount);
- CHECK(ret, FAIL, "H5A_get_shared_rc_test");
- VERIFY(shared_refcount, 1, "H5A_get_shared_rc_test");
+ ret = H5A__get_shared_rc_test(attr, &shared_refcount);
+ CHECK(ret, FAIL, "H5A__get_shared_rc_test");
+ VERIFY(shared_refcount, 1, "H5A__get_shared_rc_test");
/* Write data into the attribute */
big_value[0] = u + 1;
@@ -8245,9 +8241,9 @@ test_attr_shared_write(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Awrite");
/* Check refcount for attribute */
- ret = H5A_get_shared_rc_test(attr, &shared_refcount);
- CHECK(ret, FAIL, "H5A_get_shared_rc_test");
- VERIFY(shared_refcount, 2, "H5A_get_shared_rc_test");
+ ret = H5A__get_shared_rc_test(attr, &shared_refcount);
+ CHECK(ret, FAIL, "H5A__get_shared_rc_test");
+ VERIFY(shared_refcount, 2, "H5A__get_shared_rc_test");
} /* end else */
/* Close attribute */
@@ -8344,36 +8340,36 @@ test_attr_shared_write(hid_t fcpl, hid_t fapl)
static void
test_attr_shared_rename(hid_t fcpl, hid_t fapl)
{
- hid_t fid; /* HDF5 File ID */
- hid_t my_fcpl; /* File creation property list ID */
- hid_t dataset, dataset2; /* Dataset ID2 */
- hid_t attr_tid; /* Attribute's datatype ID */
- hid_t sid, big_sid; /* Dataspace IDs */
- hsize_t big_dims[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3}; /* Dimensions for "big" attribute */
- hid_t attr; /* Attribute ID */
- hid_t dcpl; /* Dataset creation property list ID */
- char attrname[NAME_BUF_SIZE]; /* Name of attribute on first dataset */
- char attrname2[NAME_BUF_SIZE]; /* Name of attribute on second dataset */
+ hid_t fid; /* HDF5 File ID */
+ hid_t my_fcpl; /* File creation property list ID */
+ hid_t dataset, dataset2; /* Dataset ID2 */
+ hid_t attr_tid; /* Attribute's datatype ID */
+ hid_t sid, big_sid; /* Dataspace IDs */
+ hsize_t big_dims[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3}; /* Dimensions for "big" attribute */
+ hid_t attr; /* Attribute ID */
+ hid_t dcpl; /* Dataset creation property list ID */
+ char attrname[NAME_BUF_SIZE]; /* Name of attribute on first dataset */
+ char attrname2[NAME_BUF_SIZE]; /* Name of attribute on second dataset */
unsigned max_compact; /* Maximum # of attributes to store compactly */
unsigned min_dense; /* Minimum # of attributes to store "densely" */
- htri_t is_dense; /* Are attributes stored densely? */
- htri_t is_shared; /* Is attributes shared? */
+ htri_t is_dense; /* Are attributes stored densely? */
+ htri_t is_shared; /* Is attributes shared? */
hsize_t shared_refcount; /* Reference count of shared attribute */
unsigned attr_value; /* Attribute value */
- unsigned *big_value; /* Data for "big" attribute */
+ unsigned *big_value; /* Data for "big" attribute */
size_t mesg_count; /* # of shared messages */
unsigned test_shared; /* Index over shared component type */
unsigned u; /* Local index variable */
h5_stat_size_t empty_filesize; /* Size of empty file */
h5_stat_size_t filesize; /* Size of file after modifications */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Renaming Shared & Unshared Attributes in Compact & Dense Storage\n"));
/* Allocate & initialize "big" attribute data */
big_value = (unsigned *)HDmalloc((size_t)(SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3) * sizeof(unsigned));
- CHECK(big_value, NULL, "HDmalloc");
+ CHECK_PTR(big_value, "HDmalloc");
HDmemset(big_value, 1, sizeof(unsigned) * (size_t)(SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3));
/* Create dataspace for dataset */
@@ -8496,8 +8492,8 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
CHECK(attr, FAIL, "H5Acreate2");
/* Check that attribute is not shared */
- is_shared = H5A_is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A_is_shared_test");
+ is_shared = H5A__is_shared_test(attr);
+ VERIFY(is_shared, FALSE, "H5A__is_shared_test");
/* Write data into the attribute */
attr_value = u + 1;
@@ -8510,13 +8506,13 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
CHECK(attr, FAIL, "H5Acreate2");
/* Check that attribute is shared */
- is_shared = H5A_is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A_is_shared_test");
+ is_shared = H5A__is_shared_test(attr);
+ VERIFY(is_shared, TRUE, "H5A__is_shared_test");
/* Check refcount for attribute */
- ret = H5A_get_shared_rc_test(attr, &shared_refcount);
- CHECK(ret, FAIL, "H5A_get_shared_rc_test");
- VERIFY(shared_refcount, 1, "H5A_get_shared_rc_test");
+ ret = H5A__get_shared_rc_test(attr, &shared_refcount);
+ CHECK(ret, FAIL, "H5A__get_shared_rc_test");
+ VERIFY(shared_refcount, 1, "H5A__get_shared_rc_test");
/* Write data into the attribute */
big_value[0] = u + 1;
@@ -8524,9 +8520,9 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Awrite");
/* Check refcount for attribute */
- ret = H5A_get_shared_rc_test(attr, &shared_refcount);
- CHECK(ret, FAIL, "H5A_get_shared_rc_test");
- VERIFY(shared_refcount, 1, "H5A_get_shared_rc_test");
+ ret = H5A__get_shared_rc_test(attr, &shared_refcount);
+ CHECK(ret, FAIL, "H5A__get_shared_rc_test");
+ VERIFY(shared_refcount, 1, "H5A__get_shared_rc_test");
} /* end else */
/* Close attribute */
@@ -8548,8 +8544,8 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
CHECK(attr, FAIL, "H5Acreate2");
/* Check that attribute is not shared */
- is_shared = H5A_is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A_is_shared_test");
+ is_shared = H5A__is_shared_test(attr);
+ VERIFY(is_shared, FALSE, "H5A__is_shared_test");
/* Write data into the attribute */
attr_value = u + 1;
@@ -8562,13 +8558,13 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
CHECK(attr, FAIL, "H5Acreate2");
/* Check that attribute is shared */
- is_shared = H5A_is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A_is_shared_test");
+ is_shared = H5A__is_shared_test(attr);
+ VERIFY(is_shared, TRUE, "H5A__is_shared_test");
/* Check refcount for attribute */
- ret = H5A_get_shared_rc_test(attr, &shared_refcount);
- CHECK(ret, FAIL, "H5A_get_shared_rc_test");
- VERIFY(shared_refcount, 1, "H5A_get_shared_rc_test");
+ ret = H5A__get_shared_rc_test(attr, &shared_refcount);
+ CHECK(ret, FAIL, "H5A__get_shared_rc_test");
+ VERIFY(shared_refcount, 1, "H5A__get_shared_rc_test");
/* Write data into the attribute */
big_value[0] = u + 1;
@@ -8576,9 +8572,9 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Awrite");
/* Check refcount for attribute */
- ret = H5A_get_shared_rc_test(attr, &shared_refcount);
- CHECK(ret, FAIL, "H5A_get_shared_rc_test");
- VERIFY(shared_refcount, 2, "H5A_get_shared_rc_test");
+ ret = H5A__get_shared_rc_test(attr, &shared_refcount);
+ CHECK(ret, FAIL, "H5A__get_shared_rc_test");
+ VERIFY(shared_refcount, 2, "H5A__get_shared_rc_test");
} /* end else */
/* Close attribute */
@@ -8609,18 +8605,18 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
if(u % 2) {
/* Check that attribute is not shared */
- is_shared = H5A_is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A_is_shared_test");
+ is_shared = H5A__is_shared_test(attr);
+ VERIFY(is_shared, FALSE, "H5A__is_shared_test");
} /* end if */
else {
/* Check that attribute is shared */
- is_shared = H5A_is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A_is_shared_test");
+ is_shared = H5A__is_shared_test(attr);
+ VERIFY(is_shared, TRUE, "H5A__is_shared_test");
/* Check refcount for attribute */
- ret = H5A_get_shared_rc_test(attr, &shared_refcount);
- CHECK(ret, FAIL, "H5A_get_shared_rc_test");
- VERIFY(shared_refcount, 1, "H5A_get_shared_rc_test");
+ ret = H5A__get_shared_rc_test(attr, &shared_refcount);
+ CHECK(ret, FAIL, "H5A__get_shared_rc_test");
+ VERIFY(shared_refcount, 1, "H5A__get_shared_rc_test");
} /* end else */
/* Close attribute */
@@ -8633,18 +8629,18 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
if(u % 2) {
/* Check that attribute is not shared */
- is_shared = H5A_is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A_is_shared_test");
+ is_shared = H5A__is_shared_test(attr);
+ VERIFY(is_shared, FALSE, "H5A__is_shared_test");
} /* end if */
else {
/* Check that attribute is shared */
- is_shared = H5A_is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A_is_shared_test");
+ is_shared = H5A__is_shared_test(attr);
+ VERIFY(is_shared, TRUE, "H5A__is_shared_test");
/* Check refcount for attribute */
- ret = H5A_get_shared_rc_test(attr, &shared_refcount);
- CHECK(ret, FAIL, "H5A_get_shared_rc_test");
- VERIFY(shared_refcount, 1, "H5A_get_shared_rc_test");
+ ret = H5A__get_shared_rc_test(attr, &shared_refcount);
+ CHECK(ret, FAIL, "H5A__get_shared_rc_test");
+ VERIFY(shared_refcount, 1, "H5A__get_shared_rc_test");
} /* end else */
/* Close attribute */
@@ -8665,18 +8661,18 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
if(u % 2) {
/* Check that attribute is not shared */
- is_shared = H5A_is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A_is_shared_test");
+ is_shared = H5A__is_shared_test(attr);
+ VERIFY(is_shared, FALSE, "H5A__is_shared_test");
} /* end if */
else {
/* Check that attribute is shared */
- is_shared = H5A_is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A_is_shared_test");
+ is_shared = H5A__is_shared_test(attr);
+ VERIFY(is_shared, TRUE, "H5A__is_shared_test");
/* Check refcount for attribute */
- ret = H5A_get_shared_rc_test(attr, &shared_refcount);
- CHECK(ret, FAIL, "H5A_get_shared_rc_test");
- VERIFY(shared_refcount, 2, "H5A_get_shared_rc_test");
+ ret = H5A__get_shared_rc_test(attr, &shared_refcount);
+ CHECK(ret, FAIL, "H5A__get_shared_rc_test");
+ VERIFY(shared_refcount, 2, "H5A__get_shared_rc_test");
} /* end else */
/* Close attribute */
@@ -8689,18 +8685,18 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
if(u % 2) {
/* Check that attribute is not shared */
- is_shared = H5A_is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A_is_shared_test");
+ is_shared = H5A__is_shared_test(attr);
+ VERIFY(is_shared, FALSE, "H5A__is_shared_test");
} /* end if */
else {
/* Check that attribute is shared */
- is_shared = H5A_is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A_is_shared_test");
+ is_shared = H5A__is_shared_test(attr);
+ VERIFY(is_shared, TRUE, "H5A__is_shared_test");
/* Check refcount for attribute */
- ret = H5A_get_shared_rc_test(attr, &shared_refcount);
- CHECK(ret, FAIL, "H5A_get_shared_rc_test");
- VERIFY(shared_refcount, 2, "H5A_get_shared_rc_test");
+ ret = H5A__get_shared_rc_test(attr, &shared_refcount);
+ CHECK(ret, FAIL, "H5A__get_shared_rc_test");
+ VERIFY(shared_refcount, 2, "H5A__get_shared_rc_test");
} /* end else */
/* Close attribute */
@@ -8791,35 +8787,35 @@ test_attr_shared_rename(hid_t fcpl, hid_t fapl)
static void
test_attr_shared_delete(hid_t fcpl, hid_t fapl)
{
- hid_t fid; /* File ID */
- hid_t my_fcpl; /* File creation property list ID */
- hid_t dataset, dataset2; /* Dataset IDs */
- hid_t attr_tid; /* Attribute's datatype ID */
- hid_t sid, big_sid; /* Dataspace IDs */
- hsize_t big_dims[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3}; /* Dimensions for "big" attribute */
- hid_t attr; /* Attribute ID */
- hid_t dcpl; /* Dataset creation property list ID */
- char attrname[NAME_BUF_SIZE]; /* Name of attribute on first dataset */
+ hid_t fid; /* File ID */
+ hid_t my_fcpl; /* File creation property list ID */
+ hid_t dataset, dataset2; /* Dataset IDs */
+ hid_t attr_tid; /* Attribute's datatype ID */
+ hid_t sid, big_sid; /* Dataspace IDs */
+ hsize_t big_dims[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3}; /* Dimensions for "big" attribute */
+ hid_t attr; /* Attribute ID */
+ hid_t dcpl; /* Dataset creation property list ID */
+ char attrname[NAME_BUF_SIZE]; /* Name of attribute on first dataset */
unsigned max_compact; /* Maximum # of attributes to store compactly */
unsigned min_dense; /* Minimum # of attributes to store "densely" */
- htri_t is_dense; /* Are attributes stored densely? */
- htri_t is_shared; /* Is attributes shared? */
+ htri_t is_dense; /* Are attributes stored densely? */
+ htri_t is_shared; /* Is attributes shared? */
hsize_t shared_refcount; /* Reference count of shared attribute */
unsigned attr_value; /* Attribute value */
- unsigned *big_value; /* Data for "big" attribute */
+ unsigned *big_value; /* Data for "big" attribute */
size_t mesg_count; /* # of shared messages */
unsigned test_shared; /* Index over shared component type */
unsigned u; /* Local index variable */
h5_stat_size_t empty_filesize; /* Size of empty file */
h5_stat_size_t filesize; /* Size of file after modifications */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Deleting Shared & Unshared Attributes in Compact & Dense Storage\n"));
/* Allocate & initialize "big" attribute data */
big_value = (unsigned *)HDmalloc((size_t)(SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3) * sizeof(unsigned));
- CHECK(big_value, NULL, "HDmalloc");
+ CHECK_PTR(big_value, "HDmalloc");
HDmemset(big_value, 1, sizeof(unsigned) * (size_t)(SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3));
/* Create dataspace for dataset */
@@ -8942,8 +8938,8 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
CHECK(attr, FAIL, "H5Acreate2");
/* Check that attribute is not shared */
- is_shared = H5A_is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A_is_shared_test");
+ is_shared = H5A__is_shared_test(attr);
+ VERIFY(is_shared, FALSE, "H5A__is_shared_test");
/* Write data into the attribute */
attr_value = u + 1;
@@ -8956,13 +8952,13 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
CHECK(attr, FAIL, "H5Acreate2");
/* Check that attribute is shared */
- is_shared = H5A_is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A_is_shared_test");
+ is_shared = H5A__is_shared_test(attr);
+ VERIFY(is_shared, TRUE, "H5A__is_shared_test");
/* Check refcount for attribute */
- ret = H5A_get_shared_rc_test(attr, &shared_refcount);
- CHECK(ret, FAIL, "H5A_get_shared_rc_test");
- VERIFY(shared_refcount, 1, "H5A_get_shared_rc_test");
+ ret = H5A__get_shared_rc_test(attr, &shared_refcount);
+ CHECK(ret, FAIL, "H5A__get_shared_rc_test");
+ VERIFY(shared_refcount, 1, "H5A__get_shared_rc_test");
/* Write data into the attribute */
big_value[0] = u + 1;
@@ -8970,9 +8966,9 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Awrite");
/* Check refcount for attribute */
- ret = H5A_get_shared_rc_test(attr, &shared_refcount);
- CHECK(ret, FAIL, "H5A_get_shared_rc_test");
- VERIFY(shared_refcount, 1, "H5A_get_shared_rc_test");
+ ret = H5A__get_shared_rc_test(attr, &shared_refcount);
+ CHECK(ret, FAIL, "H5A__get_shared_rc_test");
+ VERIFY(shared_refcount, 1, "H5A__get_shared_rc_test");
} /* end else */
/* Close attribute */
@@ -8994,8 +8990,8 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
CHECK(attr, FAIL, "H5Acreate2");
/* Check that attribute is not shared */
- is_shared = H5A_is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A_is_shared_test");
+ is_shared = H5A__is_shared_test(attr);
+ VERIFY(is_shared, FALSE, "H5A__is_shared_test");
/* Write data into the attribute */
attr_value = u + 1;
@@ -9008,13 +9004,13 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
CHECK(attr, FAIL, "H5Acreate2");
/* Check that attribute is shared */
- is_shared = H5A_is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A_is_shared_test");
+ is_shared = H5A__is_shared_test(attr);
+ VERIFY(is_shared, TRUE, "H5A__is_shared_test");
/* Check refcount for attribute */
- ret = H5A_get_shared_rc_test(attr, &shared_refcount);
- CHECK(ret, FAIL, "H5A_get_shared_rc_test");
- VERIFY(shared_refcount, 1, "H5A_get_shared_rc_test");
+ ret = H5A__get_shared_rc_test(attr, &shared_refcount);
+ CHECK(ret, FAIL, "H5A__get_shared_rc_test");
+ VERIFY(shared_refcount, 1, "H5A__get_shared_rc_test");
/* Write data into the attribute */
big_value[0] = u + 1;
@@ -9022,8 +9018,8 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Awrite");
/* Check refcount for attribute */
- ret = H5A_get_shared_rc_test(attr, &shared_refcount);
- CHECK(ret, FAIL, "H5A_get_shared_rc_test");
+ ret = H5A__get_shared_rc_test(attr, &shared_refcount);
+ CHECK(ret, FAIL, "H5A__get_shared_rc_test");
VERIFY(shared_refcount, 2, "H5A_get_shared_rc_test");
} /* end else */
@@ -9058,18 +9054,18 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
if(u % 2) {
/* Check that attribute is not shared */
- is_shared = H5A_is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A_is_shared_test");
+ is_shared = H5A__is_shared_test(attr);
+ VERIFY(is_shared, FALSE, "H5A__is_shared_test");
} /* end if */
else {
/* Check that attribute is shared */
- is_shared = H5A_is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A_is_shared_test");
+ is_shared = H5A__is_shared_test(attr);
+ VERIFY(is_shared, TRUE, "H5A__is_shared_test");
/* Check refcount for attribute */
- ret = H5A_get_shared_rc_test(attr, &shared_refcount);
- CHECK(ret, FAIL, "H5A_get_shared_rc_test");
- VERIFY(shared_refcount, 1, "H5A_get_shared_rc_test");
+ ret = H5A__get_shared_rc_test(attr, &shared_refcount);
+ CHECK(ret, FAIL, "H5A__get_shared_rc_test");
+ VERIFY(shared_refcount, 1, "H5A__get_shared_rc_test");
} /* end else */
/* Close attribute */
@@ -9160,35 +9156,35 @@ test_attr_shared_delete(hid_t fcpl, hid_t fapl)
static void
test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
{
- hid_t fid; /* File ID */
- hid_t my_fcpl; /* File creation property list ID */
- hid_t dataset, dataset2; /* Dataset IDs */
- hid_t attr_tid; /* Attribute's datatype ID */
- hid_t sid, big_sid; /* Dataspace IDs */
- hsize_t big_dims[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3}; /* Dimensions for "big" attribute */
- hid_t attr; /* Attribute ID */
- hid_t dcpl; /* Dataset creation property list ID */
- char attrname[NAME_BUF_SIZE]; /* Name of attribute on first dataset */
+ hid_t fid; /* File ID */
+ hid_t my_fcpl; /* File creation property list ID */
+ hid_t dataset, dataset2; /* Dataset IDs */
+ hid_t attr_tid; /* Attribute's datatype ID */
+ hid_t sid, big_sid; /* Dataspace IDs */
+ hsize_t big_dims[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3}; /* Dimensions for "big" attribute */
+ hid_t attr; /* Attribute ID */
+ hid_t dcpl; /* Dataset creation property list ID */
+ char attrname[NAME_BUF_SIZE]; /* Name of attribute on first dataset */
unsigned max_compact; /* Maximum # of attributes to store compactly */
unsigned min_dense; /* Minimum # of attributes to store "densely" */
- htri_t is_dense; /* Are attributes stored densely? */
- htri_t is_shared; /* Is attributes shared? */
+ htri_t is_dense; /* Are attributes stored densely? */
+ htri_t is_shared; /* Is attributes shared? */
hsize_t shared_refcount; /* Reference count of shared attribute */
unsigned attr_value; /* Attribute value */
- unsigned *big_value; /* Data for "big" attribute */
+ unsigned *big_value; /* Data for "big" attribute */
size_t mesg_count; /* # of shared messages */
unsigned test_shared; /* Index over shared component type */
unsigned u; /* Local index variable */
h5_stat_size_t empty_filesize; /* Size of empty file */
h5_stat_size_t filesize; /* Size of file after modifications */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Unlinking Object with Shared Attributes in Compact & Dense Storage\n"));
/* Allocate & initialize "big" attribute data */
big_value = (unsigned *)HDmalloc((size_t)(SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3) * sizeof(unsigned));
- CHECK(big_value, NULL, "HDmalloc");
+ CHECK_PTR(big_value, "HDmalloc");
HDmemset(big_value, 1, sizeof(unsigned) * (size_t)(SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3));
/* Create dataspace for dataset */
@@ -9311,8 +9307,8 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
CHECK(attr, FAIL, "H5Acreate2");
/* Check that attribute is not shared */
- is_shared = H5A_is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A_is_shared_test");
+ is_shared = H5A__is_shared_test(attr);
+ VERIFY(is_shared, FALSE, "H5A__is_shared_test");
/* Write data into the attribute */
attr_value = u + 1;
@@ -9325,13 +9321,13 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
CHECK(attr, FAIL, "H5Acreate2");
/* ChecFk that attribute is shared */
- is_shared = H5A_is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A_is_shared_test");
+ is_shared = H5A__is_shared_test(attr);
+ VERIFY(is_shared, TRUE, "H5A__is_shared_test");
/* Check refcount for attribute */
- ret = H5A_get_shared_rc_test(attr, &shared_refcount);
- CHECK(ret, FAIL, "H5A_get_shared_rc_test");
- VERIFY(shared_refcount, 1, "H5A_get_shared_rc_test");
+ ret = H5A__get_shared_rc_test(attr, &shared_refcount);
+ CHECK(ret, FAIL, "H5A__get_shared_rc_test");
+ VERIFY(shared_refcount, 1, "H5A__get_shared_rc_test");
/* Write data into the attribute */
big_value[0] = u + 1;
@@ -9339,9 +9335,9 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Awrite");
/* Check refcount for attribute */
- ret = H5A_get_shared_rc_test(attr, &shared_refcount);
- CHECK(ret, FAIL, "H5A_get_shared_rc_test");
- VERIFY(shared_refcount, 1, "H5A_get_shared_rc_test");
+ ret = H5A__get_shared_rc_test(attr, &shared_refcount);
+ CHECK(ret, FAIL, "H5A__get_shared_rc_test");
+ VERIFY(shared_refcount, 1, "H5A__get_shared_rc_test");
} /* end else */
/* Close attribute */
@@ -9363,8 +9359,8 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
CHECK(attr, FAIL, "H5Acreate2");
/* Check that attribute is not shared */
- is_shared = H5A_is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A_is_shared_test");
+ is_shared = H5A__is_shared_test(attr);
+ VERIFY(is_shared, FALSE, "H5A__is_shared_test");
/* Write data into the attribute */
attr_value = u + 1;
@@ -9377,13 +9373,13 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
CHECK(attr, FAIL, "H5Acreate2");
/* Check that attribute is shared */
- is_shared = H5A_is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A_is_shared_test");
+ is_shared = H5A__is_shared_test(attr);
+ VERIFY(is_shared, TRUE, "H5A__is_shared_test");
/* Check refcount for attribute */
- ret = H5A_get_shared_rc_test(attr, &shared_refcount);
- CHECK(ret, FAIL, "H5A_get_shared_rc_test");
- VERIFY(shared_refcount, 1, "H5A_get_shared_rc_test");
+ ret = H5A__get_shared_rc_test(attr, &shared_refcount);
+ CHECK(ret, FAIL, "H5A__get_shared_rc_test");
+ VERIFY(shared_refcount, 1, "H5A__get_shared_rc_test");
/* Write data into the attribute */
big_value[0] = u + 1;
@@ -9391,9 +9387,9 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Awrite");
/* Check refcount for attribute */
- ret = H5A_get_shared_rc_test(attr, &shared_refcount);
- CHECK(ret, FAIL, "H5A_get_shared_rc_test");
- VERIFY(shared_refcount, 2, "H5A_get_shared_rc_test");
+ ret = H5A__get_shared_rc_test(attr, &shared_refcount);
+ CHECK(ret, FAIL, "H5A__get_shared_rc_test");
+ VERIFY(shared_refcount, 2, "H5A__get_shared_rc_test");
} /* end else */
/* Close attribute */
@@ -9437,18 +9433,18 @@ test_attr_shared_unlink(hid_t fcpl, hid_t fapl)
if(u % 2) {
/* Check that attribute is not shared */
- is_shared = H5A_is_shared_test(attr);
- VERIFY(is_shared, FALSE, "H5A_is_shared_test");
+ is_shared = H5A__is_shared_test(attr);
+ VERIFY(is_shared, FALSE, "H5A__is_shared_test");
} /* end if */
else {
/* Check that attribute is shared */
- is_shared = H5A_is_shared_test(attr);
- VERIFY(is_shared, TRUE, "H5A_is_shared_test");
+ is_shared = H5A__is_shared_test(attr);
+ VERIFY(is_shared, TRUE, "H5A__is_shared_test");
/* Check refcount for attribute */
- ret = H5A_get_shared_rc_test(attr, &shared_refcount);
- CHECK(ret, FAIL, "H5A_get_shared_rc_test");
- VERIFY(shared_refcount, 1, "H5A_get_shared_rc_test");
+ ret = H5A__get_shared_rc_test(attr, &shared_refcount);
+ CHECK(ret, FAIL, "H5A__get_shared_rc_test");
+ VERIFY(shared_refcount, 1, "H5A__get_shared_rc_test");
} /* end else */
/* Close attribute */
@@ -10580,14 +10576,110 @@ test_attr_bug8(hid_t fcpl, hid_t fapl)
/****************************************************************
**
+** test_attr_bug9(): Test basic H5A (attribute) code.
+** (Really tests object header code).
+** Tests adding several large attributes to an object until
+** they convert to dense storage. The total size of all
+** attributes is larger than 64K, causing the internal
+** object header code to, after merging the deleted
+** messages in to a NULL message, shrink the object header
+** chunk. Do this twice: once with only attributes in the
+** object header chunk and once with a (small) soft link in
+** the chunk as well. In both cases, the shrunk chunk will
+** initally be too small and a new NULL message must be
+** created.
+**
+****************************************************************/
+static void
+test_attr_bug9(hid_t fcpl, hid_t fapl)
+{
+ hid_t fid = -1; /* File ID */
+ hid_t gid = -1; /* Group ID */
+ hid_t aid = -1; /* Attribute ID */
+ hid_t sid = -1; /* Dataspace ID */
+ hsize_t dims[1] = {32768}; /* Attribute dimensions */
+ int create_link; /* Whether to create a soft link */
+ unsigned max_compact; /* Setting from fcpl */
+ unsigned min_dense; /* Setting from fcpl */
+ char aname[11]; /* Attribute name */
+ unsigned i; /* Local index variable */
+ herr_t ret; /* Generic return status */
+
+ /* Output message about test being performed */
+ MESSAGE(5, ("Testing that attributes can always be added to named datatypes\n"));
+
+ /* Create dataspace */
+ sid = H5Screate_simple(1, dims, NULL);
+ CHECK(sid, FAIL, "H5Screate_simple");
+
+ /* Obtain attribute phase change settings */
+ ret = H5Pget_attr_phase_change(fcpl, &max_compact, &min_dense);
+ CHECK(ret, FAIL, "H5Pget_attr_phase_change");
+
+ /* Run with and without the soft link */
+ for(create_link = 0; create_link < 2; create_link++) {
+ /* Create file */
+ fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, fcpl, fapl);
+ CHECK(fid, FAIL, "H5Fcreate");
+
+ /* Create second group */
+ gid = H5Gcreate2(fid, "group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(gid, FAIL, "H5Gcreate2");
+
+ /* Close second group */
+ ret = H5Gclose(gid);
+ CHECK(ret, FAIL, "H5Gclose");
+
+ /* Open root group */
+ gid = H5Gopen2(fid, "/", H5P_DEFAULT);
+ CHECK(gid, FAIL, "H5Gopen2");
+
+ /* Create enough attributes to cause a change to dense storage */
+ for(i = 0; i < max_compact + 1; i++) {
+ /* Create attribute */
+ HDsnprintf(aname, sizeof(aname), "%u", i);
+ aid = H5Acreate2(gid, aname, H5T_NATIVE_CHAR, sid, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(aid, FAIL, "H5Acreate2");
+
+ /* Close attribute */
+ ret = H5Aclose(aid);
+ CHECK(ret, FAIL, "H5Aclose");
+
+ /* Create enough soft links that exactly one goes into chunk 1 if
+ * requested */
+ if(i == 0 && create_link) {
+ ret = H5Lcreate_soft("b", gid, "a", H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(ret, FAIL, "H5Lcreate_soft");
+ ret = H5Lcreate_soft("d", gid, "c", H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(ret, FAIL, "H5Lcreate_soft");
+ ret = H5Lcreate_soft("f", gid, "e", H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(ret, FAIL, "H5Lcreate_soft");
+ } /* end if */
+ } /* end for */
+
+ /* Close IDs */
+ ret = H5Gclose(gid);
+ CHECK(ret, FAIL, "H5Gclose");
+
+ ret = H5Fclose(fid);
+ CHECK(ret, FAIL, "H5Fclose");
+ } /* end for */
+
+ /* Close dataspace */
+ ret = H5Sclose(sid);
+ CHECK(ret, FAIL, "H5Sclose");
+} /* test_attr_bug9() */
+
+/****************************************************************
+**
** test_attr(): Main H5A (attribute) testing routine.
**
****************************************************************/
void
test_attr(void)
{
- hid_t fapl = (-1), fapl2 = (-1); /* File access property lists */
- hid_t fcpl = (-1), fcpl2 = (-1); /* File creation property lists */
+ hid_t fapl = (-1), fapl2 = (-1); /* File access property lists */
+ hid_t fcpl = (-1), fcpl2 = (-1); /* File creation property lists */
unsigned new_format; /* Whether to use the new format or not */
unsigned use_shared; /* Whether to use shared attributes or not */
herr_t ret; /* Generic return value */
@@ -10726,6 +10818,7 @@ test_attr(void)
test_attr_bug6(my_fcpl, my_fapl); /* Test reading empty attribute */
test_attr_bug7(my_fcpl, my_fapl); /* Test creating and deleting large attributes in ohdr chunk 0 */
test_attr_bug8(my_fcpl, my_fapl); /* Test attribute expanding object header with undecoded messages */
+ test_attr_bug9(my_fcpl, my_fapl); /* Test large attributes converting to dense storage */
} /* end for */
} /* end if */
else {
@@ -10754,6 +10847,7 @@ test_attr(void)
* header format and in fact fails if used with the old format, due
* to the attributes being larger than 64K */
test_attr_bug8(fcpl, my_fapl); /* Test attribute expanding object header with undecoded messages */
+ test_attr_bug9(fcpl, my_fapl); /* Test large attributes converting to dense storage */
} /* end else */
} /* end for */
@@ -10770,15 +10864,15 @@ test_attr(void)
CHECK(ret, FAIL, "H5Pclose");
} /* test_attr() */
-
+
/*-------------------------------------------------------------------------
- * Function: cleanup_attr
+ * Function: cleanup_attr
*
- * Purpose: Cleanup temporary test files
+ * Purpose: Cleanup temporary test files
*
- * Return: none
+ * Return: none
*
- * Programmer: Albert Cheng
+ * Programmer: Albert Cheng
* July 2, 1998
*
* Modifications:
diff --git a/test/tcheck_version.c b/test/tcheck_version.c
index 5808680..574d7c9 100644
--- a/test/tcheck_version.c
+++ b/test/tcheck_version.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
diff --git a/test/tchecksum.c b/test/tchecksum.c
index cf519c0..ffbab45 100644
--- a/test/tchecksum.c
+++ b/test/tchecksum.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*-------------------------------------------------------------------------
@@ -189,7 +187,7 @@ test_chksum_large(void)
/* Allocate the buffer */
large_buf = (uint8_t *)HDmalloc((size_t)BUF_LEN);
- CHECK(large_buf, NULL, "HDmalloc");
+ CHECK_PTR(large_buf, "HDmalloc");
/* Initialize buffer w/known data */
for(u = 0; u < BUF_LEN; u++)
diff --git a/test/tconfig.c b/test/tconfig.c
index 1604c61..b652ca4 100644
--- a/test/tconfig.c
+++ b/test/tconfig.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/***********************************************************
@@ -21,7 +19,6 @@
*
*************************************************************/
-#include "hdf5.h"
#include "testhdf5.h"
/* macros definitions */
@@ -42,22 +39,22 @@
/* Needs this extra step so that we can print the macro name. */
#define vrfy_macrosize(type, macro, macroname) \
if (sizeof(type) != macro) \
- TestErrPrintf("Error: sizeof(%s) is %zu but %s is %d\n", \
- #type, sizeof(type), macroname, (int)macro);
+ TestErrPrintf("Error: sizeof(%s) is %zu but %s is %d\n", \
+ #type, sizeof(type), macroname, (int)macro);
/* local routine prototypes */
void test_config_ctypes(void);
void test_exit_definitions(void);
-
+
/*-------------------------------------------------------------------------
- * Function: test_configure
+ * Function: test_configure
*
- * Purpose: Main configure definitions testing routine
+ * Purpose: Main configure definitions testing routine
*
- * Return: none (error is fed back via global variable num_errs)
+ * Return: none (error is fed back via global variable num_errs)
*
- * Programmer: Albert Cheng
+ * Programmer: Albert Cheng
* September 25, 2001
*
*-------------------------------------------------------------------------
@@ -71,15 +68,15 @@ test_configure(void)
test_exit_definitions();
}
-
+
/*-------------------------------------------------------------------------
- * Function: cleanup_configure
+ * Function: cleanup_configure
*
- * Purpose: Cleanup temporary test files
+ * Purpose: Cleanup temporary test files
*
- * Return: none
+ * Return: none
*
- * Programmer: Albert Cheng
+ * Programmer: Albert Cheng
* September 25, 2001
*
* Modifications:
@@ -92,20 +89,20 @@ cleanup_configure(void)
/* no file to clean */
}
-
+
/*-------------------------------------------------------------------------
- * Function: test_config_ctypes
+ * Function: test_config_ctypes
*
- * Purpose: test C language data type sizes
+ * Purpose: test C language data type sizes
*
- * Return: none (error is fed back via global variable num_errs)
+ * Return: none (error is fed back via global variable num_errs)
*
- * Programmer: Albert Cheng
+ * Programmer: Albert Cheng
* September 25, 2001
*
* Modifications:
- * Albert Cheng, 2004/10/14
- * Verified both signed and unsigned int types.
+ * Albert Cheng, 2004/10/14
+ * Verified both signed and unsigned int types.
*
*-------------------------------------------------------------------------
*/
@@ -203,15 +200,15 @@ test_config_ctypes(void)
}
-
+
/*-------------------------------------------------------------------------
- * Function: test_exit_definitions
+ * Function: test_exit_definitions
*
- * Purpose: test the exit macros values
+ * Purpose: test the exit macros values
*
- * Return: none (error is fed back via global variable num_errs)
+ * Return: none (error is fed back via global variable num_errs)
*
- * Programmer: Albert Cheng
+ * Programmer: Albert Cheng
* October 12, 2009
*
* Modifications:
@@ -224,9 +221,9 @@ test_exit_definitions(void)
/* Verify the EXIT_SUCCESS and EXIT_FAILURE are 0 and 1 respectively. */
/* This should be true for POSIX compliant systems. */
if (EXIT_SUCCESS != 0) \
- TestErrPrintf("Error: EXIT_SUCCESS is %d, should be %d\n", \
- EXIT_SUCCESS, 0);
+ TestErrPrintf("Error: EXIT_SUCCESS is %d, should be %d\n", \
+ EXIT_SUCCESS, 0);
if (EXIT_FAILURE != 1) \
- TestErrPrintf("Error: EXIT_FAILURE is %d, should be %d\n", \
- EXIT_FAILURE, 1);
+ TestErrPrintf("Error: EXIT_FAILURE is %d, should be %d\n", \
+ EXIT_FAILURE, 1);
}
diff --git a/test/tcoords.c b/test/tcoords.c
index 306c6b2..f639d4b 100644
--- a/test/tcoords.c
+++ b/test/tcoords.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/***********************************************************
@@ -671,22 +669,22 @@ static void test_multiple_ends(hid_t file, hbool_t is_chunked)
void test_coords(void)
{
hid_t fid;
+ hbool_t is_chunk[2] = {TRUE, FALSE};
int i;
- hbool_t is_chunk;
herr_t ret; /* Generic error return */
fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
CHECK(fid, FAIL, "H5Fcreate");
- for(i=0, is_chunk=FALSE; i<2; i++, is_chunk++) {
+ for (i = 0; i < 2; i++) {
/* Test H5Sselect_elements with selection of one block of data */
- test_singleEnd_selElements(fid, is_chunk);
+ test_singleEnd_selElements(fid, is_chunk[i]);
/* Test H5Sselect_hyperslab with selection of one block of data */
- test_singleEnd_selHyperslab(fid, is_chunk);
+ test_singleEnd_selHyperslab(fid, is_chunk[i]);
/* Test H5Sselect_hyperslab with selection of multiple blocks of data */
- test_multiple_ends(fid, is_chunk);
+ test_multiple_ends(fid, is_chunk[i]);
}
ret = H5Fclose(fid);
diff --git a/test/test_filenotclosed.sh.in b/test/test_filenotclosed.sh.in
new file mode 100644
index 0000000..0b43c5b
--- /dev/null
+++ b/test/test_filenotclosed.sh.in
@@ -0,0 +1,41 @@
+#! /bin/sh
+#
+# Copyright by The HDF Group.
+# Copyright by the Board of Trustees of the University of Illinois.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+#
+# Test to verify that the assertion/abort failure is fixed when the application
+# does not close the file. (See HDFFV-10160)
+
+srcdir=@srcdir@
+
+nerrors=0
+
+##############################################################################
+##############################################################################
+### T H E T E S T ###
+##############################################################################
+##############################################################################
+
+echo "Testing file not closed assertion/abort failure"
+TEST_NAME=filenotclosed # The test name
+TEST_BIN=`pwd`/$TEST_NAME # The path of the test binary
+#
+# Run the test
+#$RUNSERIAL $TEST_BIN >/dev/null 2>&1
+$RUNSERIAL $TEST_BIN 2>&1
+exitcode=$?
+if [ $exitcode -eq 0 ]; then
+ echo "Test PASSED"
+else
+ nerrors="`expr $nerrors + 1`"
+ echo "***Error encountered***"
+fi
+exit $nerrors
diff --git a/test/test_filter_plugin.sh.in b/test/test_filter_plugin.sh.in
new file mode 100644
index 0000000..0a45c0f
--- /dev/null
+++ b/test/test_filter_plugin.sh.in
@@ -0,0 +1,113 @@
+#! /bin/sh
+#
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+#
+srcdir=@srcdir@
+TOP_BUILDDIR=@top_builddir@
+
+# Determine if backward compatibility options enabled
+DEPRECATED_SYMBOLS="@DEPRECATED_SYMBOLS@"
+
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+
+nerrors=0
+verbose=yes
+exit_code=$EXIT_SUCCESS
+
+TEST_NAME=filter_plugin
+TEST_BIN=`pwd`/$TEST_NAME
+FROM_DIR=`pwd`/.libs
+case $(uname) in
+ CYGWIN* )
+ PLUGINS_FOR_DIR1="$FROM_DIR/cygfilter_plugin1* $FROM_DIR/cygfilter_plugin3*"
+ PLUGINS_FOR_DIR2="$FROM_DIR/cygfilter_plugin2* $FROM_DIR/cygfilter_plugin4*"
+ ;;
+ *)
+ PLUGINS_FOR_DIR1="$FROM_DIR/libfilter_plugin1* $FROM_DIR/libfilter_plugin3*"
+ PLUGINS_FOR_DIR2="$FROM_DIR/libfilter_plugin2* $FROM_DIR/libfilter_plugin4*"
+ ;;
+esac
+PLUGIN_DIR1=filter_plugin_dir1
+PLUGIN_DIR2=filter_plugin_dir2
+CP="cp -p" # Use -p to preserve mode,ownership,timestamps
+RM="rm -rf"
+
+# Print a line-line message left justified in a field of 70 characters
+# beginning with the word "Testing".
+#
+TESTING() {
+ SPACES=" "
+ echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012'
+}
+
+# Main Body
+# Create test directories if necessary.
+test -d $PLUGIN_DIR1 || mkdir -p $PLUGIN_DIR1
+if [ $? != 0 ]; then
+ echo "Failed to create filter plugin test directory ($PLUGIN_DIR1)"
+ exit $EXIT_FAILURE
+fi
+
+test -d $PLUGIN_DIR2 || mkdir -p $PLUGIN_DIR2
+if [ $? != 0 ]; then
+ echo "Failed to create filter plugin test directory ($PLUGIN_DIR2)"
+ exit $EXIT_FAILURE
+fi
+
+# Copy plugins for the tests.
+$CP $PLUGINS_FOR_DIR1 $PLUGIN_DIR1
+if [ $? != 0 ]; then
+ echo "Failed to copy filter plugins ($PLUGINS_FOR_DIR1) to test directory."
+ exit $EXIT_FAILURE
+fi
+
+$CP $PLUGINS_FOR_DIR2 $PLUGIN_DIR2
+if [ $? != 0 ]; then
+ echo "Failed to copy filter plugins ($PLUGINS_FOR_DIR2) to test directory."
+ exit $EXIT_FAILURE
+fi
+
+# setup plugin path
+ENVCMD="env HDF5_PLUGIN_PATH=${PLUGIN_DIR1}:${PLUGIN_DIR2}"
+
+# Run the test
+$ENVCMD $TEST_BIN
+if [ $? != 0 ]; then
+ nerrors=`expr $nerrors + 1`
+fi
+
+############################################
+# HDFFV-9655 test for relative path disabled
+# setup filter plugin path relative to test
+# actual executable is in the .libs folder
+#ENVCMD="env HDF5_PLUGIN_PATH=@/../${PLUGIN_DIR1}:@/../${PLUGIN_DIR2}"
+#
+# Run the test
+#$ENVCMD $TEST_BIN
+#if [ $? != 0 ]; then
+# nerrors=`expr $nerrors + 1`
+#fi
+#############################################
+
+# print results
+if test $nerrors -ne 0 ; then
+ echo "$nerrors errors encountered"
+ exit_code=$EXIT_FAILURE
+else
+ echo "All filter plugin tests passed."
+ exit_code=$EXIT_SUCCESS
+fi
+
+# Clean up temporary files/directories and leave
+$RM $PLUGIN_DIR1 $PLUGIN_DIR2
+
+exit $exit_code
diff --git a/test/test_plugin.sh.in b/test/test_plugin.sh.in
deleted file mode 100644
index 1cd87e3..0000000
--- a/test/test_plugin.sh.in
+++ /dev/null
@@ -1,102 +0,0 @@
-#! /bin/sh
-#
-# Copyright by The HDF Group.
-# All rights reserved.
-#
-# This file is part of HDF5. The full HDF5 copyright notice, including
-# terms governing use, modification, and redistribution, is contained in
-# the files COPYING and Copyright.html. COPYING can be found at the root
-# of the source code distribution tree; Copyright.html can be found at the
-# root level of an installed copy of the electronic document set and is
-# linked from the top-level documents page. It can also be found at
-# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have access
-# to either file, you may request a copy from help@hdfgroup.org.
-#
-srcdir=@srcdir@
-TOP_BUILDDIR=@top_builddir@
-
-# Determine backward compatibility options enabled
-DEPRECATED_SYMBOLS="@DEPRECATED_SYMBOLS@"
-
-EXIT_SUCCESS=0
-EXIT_FAILURE=1
-
-nerrors=0
-verbose=yes
-exit_code=$EXIT_SUCCESS
-
-TEST_NAME=plugin
-TEST_BIN=`pwd`/$TEST_NAME
-FROM_DIR=`pwd`/.libs
-case $(uname) in
- CYGWIN* )
- PLUGIN_LIB1="$FROM_DIR/cygdynlib1* $FROM_DIR/cygdynlib3*"
- PLUGIN_LIB2="$FROM_DIR/cygdynlib2* $FROM_DIR/cygdynlib4*"
- ;;
- *)
- PLUGIN_LIB1="$FROM_DIR/libdynlib1.* $FROM_DIR/libdynlib3.*"
- PLUGIN_LIB2="$FROM_DIR/libdynlib2.* $FROM_DIR/libdynlib4.*"
- ;;
-esac
-PLUGIN_LIBDIR1=testdir1
-PLUGIN_LIBDIR2=testdir2
-CP="cp -p" # Use -p to preserve mode,ownership,timestamps
-RM="rm -rf"
-
-# Print a line-line message left justified in a field of 70 characters
-# beginning with the word "Testing".
-#
-TESTING() {
- SPACES=" "
- echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012'
-}
-
-# Main Body
-# Create test directories if not exists yet.
-test -d $PLUGIN_LIBDIR1 || mkdir -p $PLUGIN_LIBDIR1
-if [ $? != 0 ]; then
- echo "Failed to create test directory($PLUGIN_LIBDIR1)"
- exit $EXIT_FAILURE
-fi
-
-test -d $PLUGIN_LIBDIR2 || mkdir -p $PLUGIN_LIBDIR2
-if [ $? != 0 ]; then
- echo "Failed to create test directory($PLUGIN_LIBDIR2)"
- exit $EXIT_FAILURE
-fi
-
-# copy plugin library for test
-$CP $PLUGIN_LIB1 $PLUGIN_LIBDIR1
-if [ $? != 0 ]; then
- echo "Failed to copy plugin library ($PLUGIN_LIB1) for test."
- exit $EXIT_FAILURE
-fi
-
-$CP $PLUGIN_LIB2 $PLUGIN_LIBDIR2
-if [ $? != 0 ]; then
- echo "Failed to copy plugin library ($PLUGIN_LIB2) for test."
- exit $EXIT_FAILURE
-fi
-
-# setup plugin path
-ENVCMD="env HDF5_PLUGIN_PATH=${PLUGIN_LIBDIR1}:${PLUGIN_LIBDIR2}"
-
-# Run the test
-$ENVCMD $TEST_BIN
-if [ $? != 0 ]; then
- nerrors=`expr $nerrors + 1`
-fi
-
-# print results
-if test $nerrors -ne 0 ; then
- echo "$nerrors errors encountered"
- exit_code=$EXIT_FAILURE
-else
- echo "All Plugin API tests passed."
- exit_code=$EXIT_SUCCESS
-fi
-
-# Clean up temporary files/directories and leave
-$RM $PLUGIN_LIBDIR1 $PLUGIN_LIBDIR2
-
-exit $exit_code
diff --git a/test/test_usecases.sh.in b/test/test_usecases.sh.in
index a1fda0e..8bc2078 100644
--- a/test/test_usecases.sh.in
+++ b/test/test_usecases.sh.in
@@ -5,12 +5,10 @@
#
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
-# the files COPYING and Copyright.html. COPYING can be found at the root
-# of the source code distribution tree; Copyright.html can be found at the
-# root level of an installed copy of the electronic HDF5 document set and
-# is linked from the top-level documents page. It can also be found at
-# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have
-# access to either file, you may request a copy from help@hdfgroup.org.
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
#
# Tests the use cases of swmr features.
#
diff --git a/test/testcheck_version.sh.in b/test/testcheck_version.sh.in
index ed9845e..a5641f5 100644
--- a/test/testcheck_version.sh.in
+++ b/test/testcheck_version.sh.in
@@ -6,12 +6,10 @@
#
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
-# the files COPYING and Copyright.html. COPYING can be found at the root
-# of the source code distribution tree; Copyright.html can be found at the
-# root level of an installed copy of the electronic HDF5 document set and
-# is linked from the top-level documents page. It can also be found at
-# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have
-# access to either file, you may request a copy from help@hdfgroup.org.
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
#
# Tests for the H5check_version function.
diff --git a/test/testerror.sh.in b/test/testerror.sh.in
index 7c03414..734b051 100644
--- a/test/testerror.sh.in
+++ b/test/testerror.sh.in
@@ -6,12 +6,10 @@
#
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
-# the files COPYING and Copyright.html. COPYING can be found at the root
-# of the source code distribution tree; Copyright.html can be found at the
-# root level of an installed copy of the electronic HDF5 document set and
-# is linked from the top-level documents page. It can also be found at
-# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have
-# access to either file, you may request a copy from help@hdfgroup.org.
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
#
# Tests for test_error and err_compat
diff --git a/test/testfiles/error_test_1 b/test/testfiles/error_test_1
index 0acd288..b0b5085 100644
--- a/test/testfiles/error_test_1
+++ b/test/testfiles/error_test_1
@@ -48,12 +48,12 @@ HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
major: Low-level I/O
minor: Read failed
#003: (file name) line (number) in H5D__chunk_lock(): data pipeline read failed
- major: Data filters
+ major: Dataset
minor: Filter operation failed
#004: (file name) line (number) in H5Z_pipeline(): required filter 'bogus' is not registered
major: Data filters
minor: Read failed
- #005: (file name) line (number) in H5PL_load(): required dynamically loaded plugin filter '305' is not available
+ #005: (file name) line (number) in H5PL_load(): filter plugins disabled
major: Plugin for dynamically loaded library
minor: Unable to load metadata into cache
diff --git a/test/testfiles/plist_files/dapl_32be b/test/testfiles/plist_files/dapl_32be
index 4dedda2..8dcf239 100644
--- a/test/testfiles/plist_files/dapl_32be
+++ b/test/testfiles/plist_files/dapl_32be
Binary files differ
diff --git a/test/testfiles/plist_files/dapl_32le b/test/testfiles/plist_files/dapl_32le
index 4dedda2..8dcf239 100644
--- a/test/testfiles/plist_files/dapl_32le
+++ b/test/testfiles/plist_files/dapl_32le
Binary files differ
diff --git a/test/testfiles/plist_files/dapl_64be b/test/testfiles/plist_files/dapl_64be
index 4dedda2..8dcf239 100644
--- a/test/testfiles/plist_files/dapl_64be
+++ b/test/testfiles/plist_files/dapl_64be
Binary files differ
diff --git a/test/testfiles/plist_files/dapl_64le b/test/testfiles/plist_files/dapl_64le
index 4dedda2..8dcf239 100644
--- a/test/testfiles/plist_files/dapl_64le
+++ b/test/testfiles/plist_files/dapl_64le
Binary files differ
diff --git a/test/testfiles/plist_files/def_dapl_32be b/test/testfiles/plist_files/def_dapl_32be
index 3df7289..880eae5 100644
--- a/test/testfiles/plist_files/def_dapl_32be
+++ b/test/testfiles/plist_files/def_dapl_32be
Binary files differ
diff --git a/test/testfiles/plist_files/def_dapl_32le b/test/testfiles/plist_files/def_dapl_32le
index 3df7289..880eae5 100644
--- a/test/testfiles/plist_files/def_dapl_32le
+++ b/test/testfiles/plist_files/def_dapl_32le
Binary files differ
diff --git a/test/testfiles/plist_files/def_dapl_64be b/test/testfiles/plist_files/def_dapl_64be
index 3df7289..880eae5 100644
--- a/test/testfiles/plist_files/def_dapl_64be
+++ b/test/testfiles/plist_files/def_dapl_64be
Binary files differ
diff --git a/test/testfiles/plist_files/def_dapl_64le b/test/testfiles/plist_files/def_dapl_64le
index 3df7289..880eae5 100644
--- a/test/testfiles/plist_files/def_dapl_64le
+++ b/test/testfiles/plist_files/def_dapl_64le
Binary files differ
diff --git a/test/testfiles/plist_files/def_dxpl_32be b/test/testfiles/plist_files/def_dxpl_32be
index 3b77a32..b13f456 100644
--- a/test/testfiles/plist_files/def_dxpl_32be
+++ b/test/testfiles/plist_files/def_dxpl_32be
Binary files differ
diff --git a/test/testfiles/plist_files/def_dxpl_32le b/test/testfiles/plist_files/def_dxpl_32le
index 3b77a32..b13f456 100644
--- a/test/testfiles/plist_files/def_dxpl_32le
+++ b/test/testfiles/plist_files/def_dxpl_32le
Binary files differ
diff --git a/test/testfiles/plist_files/def_dxpl_64be b/test/testfiles/plist_files/def_dxpl_64be
index 3b77a32..b13f456 100644
--- a/test/testfiles/plist_files/def_dxpl_64be
+++ b/test/testfiles/plist_files/def_dxpl_64be
Binary files differ
diff --git a/test/testfiles/plist_files/def_dxpl_64le b/test/testfiles/plist_files/def_dxpl_64le
index 3b77a32..b13f456 100644
--- a/test/testfiles/plist_files/def_dxpl_64le
+++ b/test/testfiles/plist_files/def_dxpl_64le
Binary files differ
diff --git a/test/testfiles/plist_files/def_fapl_32be b/test/testfiles/plist_files/def_fapl_32be
index 3b35501..6e94011 100644
--- a/test/testfiles/plist_files/def_fapl_32be
+++ b/test/testfiles/plist_files/def_fapl_32be
Binary files differ
diff --git a/test/testfiles/plist_files/def_fapl_32le b/test/testfiles/plist_files/def_fapl_32le
index 3b35501..6e94011 100644
--- a/test/testfiles/plist_files/def_fapl_32le
+++ b/test/testfiles/plist_files/def_fapl_32le
Binary files differ
diff --git a/test/testfiles/plist_files/def_fapl_64be b/test/testfiles/plist_files/def_fapl_64be
index 3b35501..6e94011 100644
--- a/test/testfiles/plist_files/def_fapl_64be
+++ b/test/testfiles/plist_files/def_fapl_64be
Binary files differ
diff --git a/test/testfiles/plist_files/def_fapl_64le b/test/testfiles/plist_files/def_fapl_64le
index 3b35501..6e94011 100644
--- a/test/testfiles/plist_files/def_fapl_64le
+++ b/test/testfiles/plist_files/def_fapl_64le
Binary files differ
diff --git a/test/testfiles/plist_files/dxpl_32be b/test/testfiles/plist_files/dxpl_32be
index 22fbdc8..5ff2ea0 100644
--- a/test/testfiles/plist_files/dxpl_32be
+++ b/test/testfiles/plist_files/dxpl_32be
Binary files differ
diff --git a/test/testfiles/plist_files/dxpl_32le b/test/testfiles/plist_files/dxpl_32le
index 22fbdc8..5ff2ea0 100644
--- a/test/testfiles/plist_files/dxpl_32le
+++ b/test/testfiles/plist_files/dxpl_32le
Binary files differ
diff --git a/test/testfiles/plist_files/dxpl_64be b/test/testfiles/plist_files/dxpl_64be
index 22fbdc8..5ff2ea0 100644
--- a/test/testfiles/plist_files/dxpl_64be
+++ b/test/testfiles/plist_files/dxpl_64be
Binary files differ
diff --git a/test/testfiles/plist_files/dxpl_64le b/test/testfiles/plist_files/dxpl_64le
index 22fbdc8..5ff2ea0 100644
--- a/test/testfiles/plist_files/dxpl_64le
+++ b/test/testfiles/plist_files/dxpl_64le
Binary files differ
diff --git a/test/testfiles/plist_files/fapl_32be b/test/testfiles/plist_files/fapl_32be
index 43e5e67..237b291 100644
--- a/test/testfiles/plist_files/fapl_32be
+++ b/test/testfiles/plist_files/fapl_32be
Binary files differ
diff --git a/test/testfiles/plist_files/fapl_32le b/test/testfiles/plist_files/fapl_32le
index 43e5e67..237b291 100644
--- a/test/testfiles/plist_files/fapl_32le
+++ b/test/testfiles/plist_files/fapl_32le
Binary files differ
diff --git a/test/testfiles/plist_files/fapl_64be b/test/testfiles/plist_files/fapl_64be
index 43e5e67..237b291 100644
--- a/test/testfiles/plist_files/fapl_64be
+++ b/test/testfiles/plist_files/fapl_64be
Binary files differ
diff --git a/test/testfiles/plist_files/fapl_64le b/test/testfiles/plist_files/fapl_64le
index 43e5e67..237b291 100644
--- a/test/testfiles/plist_files/fapl_64le
+++ b/test/testfiles/plist_files/fapl_64le
Binary files differ
diff --git a/test/testfiles/plist_files/lapl_32be b/test/testfiles/plist_files/lapl_32be
index f3e9865..9d81759 100644
--- a/test/testfiles/plist_files/lapl_32be
+++ b/test/testfiles/plist_files/lapl_32be
Binary files differ
diff --git a/test/testfiles/plist_files/lapl_32le b/test/testfiles/plist_files/lapl_32le
index f3e9865..9d81759 100644
--- a/test/testfiles/plist_files/lapl_32le
+++ b/test/testfiles/plist_files/lapl_32le
Binary files differ
diff --git a/test/testfiles/plist_files/lapl_64be b/test/testfiles/plist_files/lapl_64be
index f3e9865..9d81759 100644
--- a/test/testfiles/plist_files/lapl_64be
+++ b/test/testfiles/plist_files/lapl_64be
Binary files differ
diff --git a/test/testfiles/plist_files/lapl_64le b/test/testfiles/plist_files/lapl_64le
index f3e9865..9d81759 100644
--- a/test/testfiles/plist_files/lapl_64le
+++ b/test/testfiles/plist_files/lapl_64le
Binary files differ
diff --git a/test/testflushrefresh.sh.in b/test/testflushrefresh.sh.in
index d894cee..ca46dcb 100644
--- a/test/testflushrefresh.sh.in
+++ b/test/testflushrefresh.sh.in
@@ -6,12 +6,10 @@
#
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
-# the files COPYING and Copyright.html. COPYING can be found at the root
-# of the source code distribution tree; Copyright.html can be found at the
-# root level of an installed copy of the electronic HDF5 document set and
-# is linked from the top-level documents page. It can also be found at
-# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have
-# access to either file, you may request a copy from help@hdfgroup.org.
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
#
#
# Test script for the flush/evict single objects feature.
diff --git a/test/testframe.c b/test/testframe.c
index c2db235..21f9ea3 100644
--- a/test/testframe.c
+++ b/test/testframe.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
diff --git a/test/testhdf5.c b/test/testhdf5.c
index 0e7303e..713cccf 100644
--- a/test/testhdf5.c
+++ b/test/testhdf5.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
diff --git a/test/testhdf5.h b/test/testhdf5.h
index 62dadde..1f3f6a0 100644
--- a/test/testhdf5.h
+++ b/test/testhdf5.h
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
@@ -20,142 +18,152 @@
#ifndef TESTHDF5_H
#define TESTHDF5_H
-/*
- * Include required headers. This file tests internal library functions,
- * so we include the private headers here.
- */
-#include "H5private.h"
-#include "H5Eprivate.h"
-
/* Include generic testing header also */
#include "h5test.h"
/* Use %ld to print the value because long should cover most cases. */
/* Used to make certain a return value _is_not_ a value */
-#define CHECK(ret, val, where) do { \
- if (VERBOSE_HI) print_func(" Call to routine: %15s at line %4d " \
- "in %s returned %ld \n", \
- where, (int)__LINE__, __FILE__, \
- (long)(ret)); \
- if ((ret) == (val)) { \
- TestErrPrintf("*** UNEXPECTED RETURN from %s is %ld at line %4d " \
- "in %s\n", where, (long)(ret), (int)__LINE__, __FILE__); \
- H5Eprint2(H5E_DEFAULT, stdout); \
- } \
+#define CHECK(ret, val, where) do { \
+ if (VERBOSE_HI) { \
+ print_func(" Call to routine: %15s at line %4d " \
+ "in %s returned %ld \n", \
+ where, (int)__LINE__, __FILE__, \
+ (long)(ret)); \
+ } \
+ if ((ret) == (val)) { \
+ TestErrPrintf("*** UNEXPECTED RETURN from %s is %ld at line %4d " \
+ "in %s\n", where, (long)(ret), (int)__LINE__, __FILE__); \
+ H5Eprint2(H5E_DEFAULT, stdout); \
+ } \
} while(0)
-#define CHECK_I(ret,where) { \
- if (VERBOSE_HI) { \
- print_func(" Call to routine: %15s at line %4d in %s returned %ld\n", \
- (where), (int)__LINE__, __FILE__, (long)(ret)); \
- } \
- if ((ret)<0) { \
- TestErrPrintf ("*** UNEXPECTED RETURN from %s is %ld line %4d in %s\n", \
- (where), (long)(ret), (int)__LINE__, __FILE__); \
- H5Eprint2(H5E_DEFAULT, stdout); \
- } \
+#define CHECK_I(ret,where) { \
+ if (VERBOSE_HI) { \
+ print_func(" Call to routine: %15s at line %4d in %s returned %ld\n", \
+ (where), (int)__LINE__, __FILE__, (long)(ret)); \
+ } \
+ if ((ret)<0) { \
+ TestErrPrintf ("*** UNEXPECTED RETURN from %s is %ld line %4d in %s\n", \
+ (where), (long)(ret), (int)__LINE__, __FILE__); \
+ H5Eprint2(H5E_DEFAULT, stdout); \
+ } \
+}
+
+/* Check that a pointer is valid (i.e.: not NULL) */
+#define CHECK_PTR(ret,where) { \
+ if (VERBOSE_HI) { \
+ print_func(" Call to routine: %15s at line %4d in %s returned %p\n", \
+ (where), (int)__LINE__, __FILE__, (ret)); \
+ } \
+ if (!(ret)) { \
+ TestErrPrintf ("*** UNEXPECTED RETURN from %s is NULL line %4d in %s\n", \
+ (where), (int)__LINE__, __FILE__); \
+ H5Eprint2(H5E_DEFAULT, stdout); \
+ } \
}
-#define CHECK_PTR(ret,where) { \
- if (VERBOSE_HI) { \
- print_func(" Call to routine: %15s at line %4d in %s returned %p\n", \
- (where), (int)__LINE__, __FILE__, (ret)); \
- } \
- if (!(ret)) { \
- TestErrPrintf ("*** UNEXPECTED RETURN from %s is NULL line %4d in %s\n", \
- (where), (int)__LINE__, __FILE__); \
- H5Eprint2(H5E_DEFAULT, stdout); \
- } \
+/* Check that a pointer is NULL */
+#define CHECK_PTR_NULL(ret,where) { \
+ if (VERBOSE_HI) { \
+ print_func(" Call to routine: %15s at line %4d in %s returned %p\n", \
+ (where), (int)__LINE__, __FILE__, (ret)); \
+ } \
+ if (ret) { \
+ TestErrPrintf ("*** UNEXPECTED RETURN from %s is not NULL line %4d in %s\n", \
+ (where), (int)__LINE__, __FILE__); \
+ H5Eprint2(H5E_DEFAULT, stdout); \
+ } \
}
-#define CHECK_PTR_NULL(ret,where) { \
- if (VERBOSE_HI) { \
- print_func(" Call to routine: %15s at line %4d in %s returned %p\n", \
- (where), (int)__LINE__, __FILE__, (ret)); \
- } \
- if (ret) { \
- TestErrPrintf ("*** UNEXPECTED RETURN from %s is not NULL line %4d in %s\n", \
- (where), (int)__LINE__, __FILE__); \
- H5Eprint2(H5E_DEFAULT, stdout); \
- } \
+/* Check that two pointers are equal */
+#define CHECK_PTR_EQ(ret, val, where) { \
+ if (VERBOSE_HI) { \
+ print_func(" Call to routine: %15s at line %4d in %s returned %p\n", \
+ (where), (int)__LINE__, __FILE__, (const void *)(ret)); \
+ } \
+ if (ret != val) { \
+ TestErrPrintf ("*** UNEXPECTED RETURN from %s: returned value of %p is not equal to %p line %4d in %s\n", \
+ (where), (const void *)(ret), (const void *)(val), (int)__LINE__, __FILE__); \
+ H5Eprint2(H5E_DEFAULT, stdout); \
+ } \
}
/* Used to make certain a return value _is_ a value */
-#define VERIFY(_x, _val, where) do { \
- long __x = (long)_x, __val = (long)_val; \
- if(VERBOSE_HI) { \
- print_func(" Call to routine: %15s at line %4d in %s had value " \
- "%ld \n", (where), (int)__LINE__, __FILE__, __x); \
- } \
- if((__x) != (__val)) { \
- TestErrPrintf("*** UNEXPECTED VALUE from %s should be %ld, but is %ld at line %4d " \
- "in %s\n", (where), __val, __x, (int)__LINE__, __FILE__); \
- H5Eprint2(H5E_DEFAULT, stdout); \
- } \
+#define VERIFY(_x, _val, where) do { \
+ long __x = (long)_x, __val = (long)_val; \
+ if(VERBOSE_HI) { \
+ print_func(" Call to routine: %15s at line %4d in %s had value " \
+ "%ld \n", (where), (int)__LINE__, __FILE__, __x); \
+ } \
+ if((__x) != (__val)) { \
+ TestErrPrintf("*** UNEXPECTED VALUE from %s should be %ld, but is %ld at line %4d " \
+ "in %s\n", (where), __val, __x, (int)__LINE__, __FILE__); \
+ H5Eprint2(H5E_DEFAULT, stdout); \
+ } \
} while(0)
/* Used to make certain a (non-'long' type's) return value _is_ a value */
-#define VERIFY_TYPE(_x, _val, _type, _format, where) do { \
- _type __x = (_type)_x, __val = (_type)_val; \
- if(VERBOSE_HI) { \
- print_func(" Call to routine: %15s at line %4d in %s had value " \
- _format " \n", (where), (int)__LINE__, __FILE__, __x); \
- } \
- if((__x) != (__val)) { \
- TestErrPrintf("*** UNEXPECTED VALUE from %s should be " _format ", but is " _format " at line %4d " \
- "in %s\n", (where), __val, __x, (int)__LINE__, __FILE__); \
- H5Eprint2(H5E_DEFAULT, stdout); \
- } \
+#define VERIFY_TYPE(_x, _val, _type, _format, where) do { \
+ _type __x = (_type)_x, __val = (_type)_val; \
+ if(VERBOSE_HI) { \
+ print_func(" Call to routine: %15s at line %4d in %s had value " \
+ _format " \n", (where), (int)__LINE__, __FILE__, __x); \
+ } \
+ if((__x) != (__val)) { \
+ TestErrPrintf("*** UNEXPECTED VALUE from %s should be " _format ", but is " _format " at line %4d " \
+ "in %s\n", (where), __val, __x, (int)__LINE__, __FILE__); \
+ H5Eprint2(H5E_DEFAULT, stdout); \
+ } \
} while(0)
/* Used to make certain a string return value _is_ a value */
-#define VERIFY_STR(x, val, where) do { \
- if (VERBOSE_HI) { \
- print_func(" Call to routine: %15s at line %4d in %s had value " \
- "%s \n", (where), (int)__LINE__, __FILE__, x); \
- } \
- if (HDstrcmp(x, val)) { \
- TestErrPrintf("*** UNEXPECTED VALUE from %s should be %s, but is %s at line %4d " \
- "in %s\n", where, val, x, (int)__LINE__, __FILE__); \
- H5Eprint2(H5E_DEFAULT, stdout); \
- } \
+#define VERIFY_STR(x, val, where) do { \
+ if (VERBOSE_HI) { \
+ print_func(" Call to routine: %15s at line %4d in %s had value " \
+ "%s \n", (where), (int)__LINE__, __FILE__, x); \
+ } \
+ if (HDstrcmp(x, val)) { \
+ TestErrPrintf("*** UNEXPECTED VALUE from %s should be %s, but is %s at line %4d " \
+ "in %s\n", where, val, x, (int)__LINE__, __FILE__); \
+ H5Eprint2(H5E_DEFAULT, stdout); \
+ } \
} while(0)
/* Used to document process through a test and to check for errors */
-#define RESULT(ret,func) do { \
- if (VERBOSE_MED) { \
- print_func(" Call to routine: %15s at line %4d in %s returned " \
- "%ld\n", func, (int)__LINE__, __FILE__, (long)(ret)); \
- } \
- if (VERBOSE_HI) \
- H5Eprint2(H5E_DEFAULT, stdout); \
- if ((ret) == FAIL) { \
- TestErrPrintf("*** UNEXPECTED RETURN from %s is %ld at line %4d " \
- "in %s\n", func, (long)(ret), (int)__LINE__, __FILE__); \
- H5Eprint2(H5E_DEFAULT, stdout); \
- } \
+#define RESULT(ret,func) do { \
+ if (VERBOSE_MED) { \
+ print_func(" Call to routine: %15s at line %4d in %s returned " \
+ "%ld\n", func, (int)__LINE__, __FILE__, (long)(ret)); \
+ } \
+ if (VERBOSE_HI) \
+ H5Eprint2(H5E_DEFAULT, stdout); \
+ if ((ret) == FAIL) { \
+ TestErrPrintf("*** UNEXPECTED RETURN from %s is %ld at line %4d " \
+ "in %s\n", func, (long)(ret), (int)__LINE__, __FILE__); \
+ H5Eprint2(H5E_DEFAULT, stdout); \
+ } \
} while(0)
/* Used to document process through a test */
#if defined(H5_HAVE_PARALLEL) && defined(H5_PARALLEL_TEST)
-#define MESSAGE(V,A) { \
- int mpi_rank; \
- \
- MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); \
- if(mpi_rank == 0 && HDGetTestVerbosity() > (V)) \
- print_func A ; \
+#define MESSAGE(V,A) { \
+ int mpi_rank; \
+ \
+ MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); \
+ if(mpi_rank == 0 && HDGetTestVerbosity() > (V)) \
+ print_func A ; \
}
#else /* H5_HAVE_PARALLEL */
#define MESSAGE(V,A) {if (HDGetTestVerbosity() > (V)) print_func A;}
#endif /* H5_HAVE_PARALLEL */
/* Used to indicate an error that is complex to check for */
-#define ERROR(where) do { \
- if(VERBOSE_HI) \
- print_func(" Call to routine: %15s at line %4d in %s returned " \
- "invalid result\n", where, (int)__LINE__, __FILE__); \
- TestErrPrintf("*** UNEXPECTED RESULT from %s at line %4d in %s\n", \
- where, (int)__LINE__, __FILE__); \
+#define ERROR(where) do { \
+ if(VERBOSE_HI) \
+ print_func(" Call to routine: %15s at line %4d in %s returned " \
+ "invalid result\n", where, (int)__LINE__, __FILE__); \
+ TestErrPrintf("*** UNEXPECTED RESULT from %s at line %4d in %s\n", \
+ where, (int)__LINE__, __FILE__); \
} while(0)
/* definitions for command strings */
@@ -189,12 +197,12 @@ void test_vlstrings(void);
void test_iterate(void);
void test_array(void);
void test_genprop(void);
-void test_configure(void);
-void test_misc(void);
-void test_ids(void);
-void test_skiplist(void);
-void test_sohm(void);
-void test_unicode(void);
+void test_configure(void);
+void test_misc(void);
+void test_ids(void);
+void test_skiplist(void);
+void test_sohm(void);
+void test_unicode(void);
/* Prototypes for the cleanup routines */
void cleanup_metadata(void);
@@ -212,10 +220,10 @@ void cleanup_vlstrings(void);
void cleanup_iterate(void);
void cleanup_array(void);
void cleanup_genprop(void);
-void cleanup_configure(void);
-void cleanup_sohm(void);
-void cleanup_misc(void);
-void cleanup_unicode(void);
+void cleanup_configure(void);
+void cleanup_sohm(void);
+void cleanup_misc(void);
+void cleanup_unicode(void);
#ifdef __cplusplus
}
diff --git a/test/testlibinfo.sh.in b/test/testlibinfo.sh.in
index b7aa6c4..1dd744b 100644
--- a/test/testlibinfo.sh.in
+++ b/test/testlibinfo.sh.in
@@ -6,12 +6,10 @@
#
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
-# the files COPYING and Copyright.html. COPYING can be found at the root
-# of the source code distribution tree; Copyright.html can be found at the
-# root level of an installed copy of the electronic HDF5 document set and
-# is linked from the top-level documents page. It can also be found at
-# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have
-# access to either file, you may request a copy from help@hdfgroup.org.
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
#
diff --git a/test/testlinks_env.sh.in b/test/testlinks_env.sh.in
index 7120430..94e6c7e 100644
--- a/test/testlinks_env.sh.in
+++ b/test/testlinks_env.sh.in
@@ -6,12 +6,10 @@
#
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
-# the files COPYING and Copyright.html. COPYING can be found at the root
-# of the source code distribution tree; Copyright.html can be found at the
-# root level of an installed copy of the electronic HDF5 document set and
-# is linked from the top-level documents page. It can also be found at
-# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have
-# access to either file, you may request a copy from help@hdfgroup.org.
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
#
# Test for external link with environment variable: HDF5_EXT_PREFIX
diff --git a/test/testmeta.c b/test/testmeta.c
index e1d12e6..b97eb68 100644
--- a/test/testmeta.c
+++ b/test/testmeta.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
diff --git a/test/testswmr.sh.in b/test/testswmr.sh.in
index f70d083..f81a7d7 100644
--- a/test/testswmr.sh.in
+++ b/test/testswmr.sh.in
@@ -6,12 +6,10 @@
#
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
-# the files COPYING and Copyright.html. COPYING can be found at the root
-# of the source code distribution tree; Copyright.html can be found at the
-# root level of an installed copy of the electronic HDF5 document set and
-# is linked from the top-level documents page. It can also be found at
-# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have
-# access to either file, you may request a copy from help@hdfgroup.org.
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
#
# Tests for the swmr feature.
#
diff --git a/test/testvdsswmr.sh.in b/test/testvdsswmr.sh.in
index 3ada67b..32af072 100644
--- a/test/testvdsswmr.sh.in
+++ b/test/testvdsswmr.sh.in
@@ -6,12 +6,10 @@
#
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
-# the files COPYING and Copyright.html. COPYING can be found at the root
-# of the source code distribution tree; Copyright.html can be found at the
-# root level of an installed copy of the electronic HDF5 document set and
-# is linked from the top-level documents page. It can also be found at
-# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have
-# access to either file, you may request a copy from help@hdfgroup.org.
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
#
# Tests for the swmr feature using virtual datasets.
#
diff --git a/test/tfile.c b/test/tfile.c
index 7edc40c..677fd06 100644
--- a/test/tfile.c
+++ b/test/tfile.c
@@ -5,36 +5,49 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/***********************************************************
*
-* Test program: tfile
+* Test program: tfile
*
* Test the low-level file I/O features.
*
*************************************************************/
-#include "hdf5.h"
#include "testhdf5.h"
#include "H5srcdir.h"
#include "H5Bprivate.h"
+#include "H5Iprivate.h"
#include "H5Pprivate.h"
/*
* This file needs to access private information from the H5F package.
* This file also needs to access the file testing code.
*/
-#define H5F_FRIEND /*suppress error about including H5Fpkg */
+#define H5F_FRIEND /*suppress error about including H5Fpkg */
#define H5F_TESTING
-#include "H5Fpkg.h" /* File access */
+#include "H5Fpkg.h" /* File access */
+
+#define H5D_FRIEND /*suppress error about including H5Dpkg */
+#include "H5Dpkg.h" /* Dataset access */
+
+#define H5S_FRIEND /*suppress error about including H5Spkg */
+#include "H5Spkg.h" /* Dataspace */
+
+#define H5T_FRIEND /*suppress error about including H5Tpkg */
+#include "H5Tpkg.h" /* Datatype */
+
+#define H5A_FRIEND /*suppress error about including H5Apkg */
+#include "H5Apkg.h" /* Attributes */
+
+#define H5O_FRIEND /*suppress error about including H5Opkg */
+#include "H5Opkg.h" /* Object headers */
#define BAD_USERBLOCK_SIZE1 (hsize_t)1
#define BAD_USERBLOCK_SIZE2 (hsize_t)2
@@ -45,46 +58,46 @@
#define BAD_USERBLOCK_SIZE7 (hsize_t)6144
#define F1_USERBLOCK_SIZE (hsize_t)0
-#define F1_OFFSET_SIZE sizeof(haddr_t)
-#define F1_LENGTH_SIZE sizeof(hsize_t)
-#define F1_SYM_LEAF_K 4
-#define F1_SYM_INTERN_K 16
-#define FILE1 "tfile1.h5"
-#define SFILE1 "sys_file1"
+#define F1_OFFSET_SIZE sizeof(haddr_t)
+#define F1_LENGTH_SIZE sizeof(hsize_t)
+#define F1_SYM_LEAF_K 4
+#define F1_SYM_INTERN_K 16
+#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
-#define F2_SYM_LEAF_K 8
-#define F2_SYM_INTERN_K 32
+#define F2_OFFSET_SIZE 8
+#define F2_LENGTH_SIZE 8
+#define F2_SYM_LEAF_K 8
+#define F2_SYM_INTERN_K 32
#define F2_RANK 2
#define F2_DIM0 4
#define F2_DIM1 6
#define F2_DSET "dset"
-#define FILE2 "tfile2.h5"
+#define FILE2 "tfile2.h5"
#define F3_USERBLOCK_SIZE (hsize_t)0
-#define F3_OFFSET_SIZE F2_OFFSET_SIZE
-#define F3_LENGTH_SIZE F2_LENGTH_SIZE
-#define F3_SYM_LEAF_K F2_SYM_LEAF_K
-#define F3_SYM_INTERN_K F2_SYM_INTERN_K
-#define FILE3 "tfile3.h5"
+#define F3_OFFSET_SIZE F2_OFFSET_SIZE
+#define F3_LENGTH_SIZE F2_LENGTH_SIZE
+#define F3_SYM_LEAF_K F2_SYM_LEAF_K
+#define F3_SYM_INTERN_K F2_SYM_INTERN_K
+#define FILE3 "tfile3.h5"
#define GRP_NAME "/group"
#define DSET_NAME "dataset"
#define ATTR_NAME "attr"
#define TYPE_NAME "type"
-#define FILE4 "tfile4.h5"
+#define FILE4 "tfile4.h5"
#define OBJ_ID_COUNT_0 0
#define OBJ_ID_COUNT_1 1
#define OBJ_ID_COUNT_2 2
#define OBJ_ID_COUNT_3 3
#define OBJ_ID_COUNT_4 4
-#define OBJ_ID_COUNT_6 6
+#define OBJ_ID_COUNT_6 6
#define OBJ_ID_COUNT_8 8
#define GROUP1 "Group1"
@@ -111,24 +124,28 @@
#define TEST_THRESHOLD10 10 /* Free space section threshold */
#define FSP_SIZE_DEF 4096 /* File space page size default */
#define FSP_SIZE512 512 /* File space page size */
+#define FSP_SIZE1G 1024*1024*1024 /* File space page size */
/* Declaration for test_libver_macros2() */
-#define FILE6 "tfile6.h5" /* Test file */
+#define FILE6 "tfile6.h5" /* Test file */
/* Declaration for test_get_obj_ids() */
-#define FILE7 "tfile7.h5" /* Test file */
-#define NGROUPS 2
-#define NDSETS 4
+#define FILE7 "tfile7.h5" /* Test file */
+#define NGROUPS 2
+#define NDSETS 4
+
+/* Declaration for test_incr_filesize() */
+#define FILE8 "tfile8.h5" /* Test file */
/* Files created under 1.6 branch and 1.8 branch--used in test_filespace_compatible() */
-const char *OLD_FILENAME[] = {
- "filespace_1_6.h5", /* 1.6 HDF5 file */
- "filespace_1_8.h5" /* 1.8 HDF5 file */
+const char *OLD_FILENAME[] = {
+ "filespace_1_6.h5", /* 1.6 HDF5 file */
+ "filespace_1_8.h5" /* 1.8 HDF5 file */
};
/* Files created in 1.10.0 release --used in test_filespace_1.10.0_compatible() */
/* These files are copied from release 1.10.0 tools/h5format_convert/testfiles */
-const char *OLD_1_10_0_FILENAME[] = {
+const char *OLD_1_10_0_FILENAME[] = {
"h5fc_ext1_i.h5", /* 0 */
"h5fc_ext1_f.h5", /* 1 */
"h5fc_ext2_if.h5", /* 2 */
@@ -152,6 +169,23 @@ const char *FILESPACE_NAME[] = {
NULL
};
+/* Local test function declarations for version bounds */
+static void test_libver_bounds_low_high(void);
+static void test_libver_bounds_super(hid_t fapl);
+static void test_libver_bounds_super_create(hid_t fapl, hid_t fcpl, htri_t is_swmr);
+static void test_libver_bounds_super_open(hid_t fapl, hid_t fcpl, htri_t is_swmr);
+static void test_libver_bounds_obj(hid_t fapl);
+static void test_libver_bounds_dataset(hid_t fapl);
+static void test_libver_bounds_dataspace(hid_t fapl);
+static void test_libver_bounds_datatype(hid_t fapl);
+static void test_libver_bounds_datatype_check(hid_t fapl, hid_t tid);
+static void test_libver_bounds_attributes(hid_t fapl);
+
+#define DSET_NULL "DSET_NULL"
+#define DSET "DSET"
+#define DSETA "DSETA"
+#define DSETB "DSETB"
+#define DSETC "DSETC"
static void
create_objects(hid_t, hid_t, hid_t *, hid_t *, hid_t *, hid_t *);
@@ -173,14 +207,14 @@ static void test_rw_noupdate(void);
static void
test_file_create(void)
{
- hid_t fid1, fid2, fid3; /* HDF5 File IDs */
- hid_t tmpl1, tmpl2; /*file creation templates */
- hsize_t ublock; /*sizeof userblock */
- size_t parm; /*file-creation parameters */
- size_t parm2; /*file-creation parameters */
- unsigned iparm;
- unsigned iparm2;
- herr_t ret; /*generic return value */
+ hid_t fid1, fid2, fid3; /* HDF5 File IDs */
+ hid_t tmpl1, tmpl2; /*file creation templates */
+ hsize_t ublock; /*sizeof userblock */
+ size_t parm; /*file-creation parameters */
+ size_t parm2; /*file-creation parameters */
+ unsigned iparm;
+ unsigned iparm2;
+ herr_t ret; /*generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Low-Level File Creation I/O\n"));
@@ -432,7 +466,7 @@ test_file_create(void)
/* Close third file */
ret = H5Fclose(fid3);
CHECK(ret, FAIL, "H5Fclose");
-} /* test_file_create() */
+} /* test_file_create() */
/****************************************************************
**
@@ -442,17 +476,17 @@ test_file_create(void)
static void
test_file_open(void)
{
- hid_t fid1, fid2; /*HDF5 File IDs */
+ hid_t fid1, fid2; /*HDF5 File IDs */
hid_t did; /*dataset ID */
hid_t fapl_id; /*file access property list ID */
- hid_t tmpl1; /*file creation templates */
- hsize_t ublock; /*sizeof user block */
- size_t parm; /*file-creation parameters */
- size_t parm2; /*file-creation parameters */
- unsigned iparm;
- unsigned iparm2;
- unsigned intent;
- herr_t ret; /*generic return value */
+ hid_t tmpl1; /*file creation templates */
+ hsize_t ublock; /*sizeof user block */
+ size_t parm; /*file-creation parameters */
+ size_t parm2; /*file-creation parameters */
+ unsigned iparm;
+ unsigned iparm2;
+ unsigned intent;
+ herr_t ret; /*generic return value */
/*
* Test single file open
@@ -616,7 +650,7 @@ test_file_close(void)
{
hid_t fid1, fid2;
hid_t fapl_id, access_id;
- hid_t dataset_id, group_id1, group_id2, group_id3;
+ hid_t dataset_id, group_id1, group_id2, group_id3;
H5F_close_degree_t fc_degree;
herr_t ret;
@@ -806,7 +840,7 @@ test_file_close(void)
/* Create more new files and test object count and ID list functions */
test_obj_count_and_id(fid1, fid2, dataset_id, group_id1,
- group_id2, group_id3);
+ group_id2, group_id3);
/* Close first open */
ret = H5Fclose(fid1);
@@ -862,22 +896,22 @@ test_file_close(void)
CHECK(ret, FAIL, "H5Pget_fclose_degree");
switch(fc_degree) {
- case H5F_CLOSE_STRONG:
- /* Close first open */
- ret = H5Fclose(fid1);
- CHECK(ret, FAIL, "H5Fclose");
- /* Close second open */
- ret = H5Fclose(fid2);
- CHECK(ret, FAIL, "H5Fclose");
- break;
- case H5F_CLOSE_SEMI:
+ case H5F_CLOSE_STRONG:
+ /* Close first open */
+ ret = H5Fclose(fid1);
+ CHECK(ret, FAIL, "H5Fclose");
+ /* Close second open */
+ ret = H5Fclose(fid2);
+ CHECK(ret, FAIL, "H5Fclose");
+ break;
+ case H5F_CLOSE_SEMI:
/* Close first open */
ret = H5Fclose(fid1);
CHECK(ret, FAIL, "H5Fclose");
- ret = H5Dclose(dataset_id);
+ ret = H5Dclose(dataset_id);
CHECK(ret, FAIL, "H5Dclose");
ret = H5Gclose(group_id1);
- CHECK(ret, FAIL, "H5Gclose");
+ CHECK(ret, FAIL, "H5Gclose");
ret = H5Gclose(group_id2);
CHECK(ret, FAIL, "H5Gclose");
ret = H5Gclose(group_id3);
@@ -885,8 +919,8 @@ test_file_close(void)
/* Close second open */
ret = H5Fclose(fid2);
CHECK(ret, FAIL, "H5Fclose");
- break;
- case H5F_CLOSE_WEAK:
+ break;
+ case H5F_CLOSE_WEAK:
/* Close first open */
ret = H5Fclose(fid1);
CHECK(ret, FAIL, "H5Fclose");
@@ -901,7 +935,7 @@ test_file_close(void)
CHECK(ret, FAIL, "H5Gclose");
ret = H5Gclose(group_id3);
CHECK(ret, FAIL, "H5Gclose");
- break;
+ break;
case H5F_CLOSE_DEFAULT:
default:
CHECK(fc_degree, H5F_CLOSE_DEFAULT, "H5Pget_fclose_degree");
@@ -923,10 +957,10 @@ test_file_close(void)
****************************************************************/
static void
create_objects(hid_t fid1, hid_t fid2, hid_t *ret_did, hid_t *ret_gid1,
- hid_t *ret_gid2, hid_t *ret_gid3)
+ hid_t *ret_gid2, hid_t *ret_gid3)
{
- ssize_t oid_count;
- herr_t ret;
+ ssize_t oid_count;
+ herr_t ret;
/* Check reference counts of file IDs and opened object IDs.
* The verification is hard-coded. If in any case, this testing
@@ -1028,7 +1062,7 @@ create_objects(hid_t fid1, hid_t fid2, hid_t *ret_did, hid_t *ret_gid1,
/****************************************************************
**
** test_get_obj_ids(): Test the bug and the fix for Jira 8528.
-** H5Fget_obj_ids overfilled the list of
+** H5Fget_obj_ids overfilled the list of
** object IDs by one. This is an enhancement
** for test_obj_count_and_id().
**
@@ -1073,16 +1107,16 @@ test_get_obj_ids(void)
VERIFY(oid_count, (NGROUPS + NDSETS + 1), "H5Fget_obj_count");
oid_list = (hid_t *)HDcalloc((size_t)oid_list_size, sizeof(hid_t));
- CHECK(oid_list, NULL, "HDcalloc");
+ CHECK_PTR(oid_list, "HDcalloc");
- /* Call the public function H5F_get_obj_ids to use H5F_get_objects. User reported having problem here.
- * that the returned size (ret_count) from H5Fget_obj_ids is one greater than the size passed in
+ /* Call the public function H5F_get_obj_ids to use H5F_get_objects. User reported having problem here.
+ * that the returned size (ret_count) from H5Fget_obj_ids is one greater than the size passed in
* (oid_list_size) */
ret_count = H5Fget_obj_ids(fid, H5F_OBJ_ALL, (size_t)oid_list_size, oid_list);
CHECK(ret_count, FAIL, "H5Fget_obj_ids");
VERIFY(ret_count, oid_list_size, "H5Fget_obj_count");
- /* Close all object IDs on the list except the file ID. The first ID is supposed to be file ID according
+ /* Close all object IDs on the list except the file ID. The first ID is supposed to be file ID according
* to the library design */
for(i = 0; i< ret_count; i++) {
if(fid != oid_list[i]) {
@@ -1097,7 +1131,7 @@ test_get_obj_ids(void)
CHECK(oid_count, FAIL, "H5Fget_obj_count");
VERIFY(oid_count, NGROUPS + 2, "H5Fget_obj_count");
- /* Get the IDs of the left opend objects */
+ /* Get the IDs of the left opend objects */
ret_count = H5Fget_obj_ids(fid, H5F_OBJ_ALL, (size_t)oid_list_size, oid_list);
CHECK(ret_count, FAIL, "H5Fget_obj_ids");
VERIFY(ret_count, oid_list_size, "H5Fget_obj_count");
@@ -1109,14 +1143,14 @@ test_get_obj_ids(void)
CHECK(ret, FAIL, "H5Oclose");
}
}
-
+
H5Sclose(filespace);
H5Fclose(fid);
HDfree(oid_list);
- /* Reopen the file to check whether H5Fget_obj_count and H5Fget_obj_ids still works
- * when the file is closed first */
+ /* Reopen the file to check whether H5Fget_obj_count and H5Fget_obj_ids still works
+ * when the file is closed first */
fid = H5Fopen(FILE7, H5F_ACC_RDONLY, H5P_DEFAULT);
CHECK(fid, FAIL, "H5Fopen");
@@ -1136,7 +1170,7 @@ test_get_obj_ids(void)
VERIFY(oid_count, NDSETS, "H5Fget_obj_count");
oid_list = (hid_t *)HDcalloc((size_t)oid_count, sizeof(hid_t));
- CHECK(oid_list, NULL, "HDcalloc");
+ CHECK_PTR(oid_list, "HDcalloc");
/* Get the list of all opened objects */
ret_count = H5Fget_obj_ids((hid_t)H5F_OBJ_ALL, H5F_OBJ_ALL, (size_t)oid_count, oid_list);
@@ -1159,7 +1193,7 @@ static void
test_get_file_id(void)
{
hid_t fid, fid2, fid3;
- hid_t datatype_id, dataset_id, dataspace_id, group_id, attr_id;
+ hid_t datatype_id, dataset_id, dataspace_id, group_id, attr_id;
hid_t plist;
hsize_t dims[F2_RANK];
unsigned intent;
@@ -1317,7 +1351,7 @@ check_file_id(hid_t fid, hid_t object_id)
****************************************************************/
static void
test_obj_count_and_id(hid_t fid1, hid_t fid2, hid_t did, hid_t gid1,
- hid_t gid2, hid_t gid3)
+ hid_t gid2, hid_t gid3)
{
hid_t fid3, fid4;
ssize_t oid_count, ret_count;
@@ -1358,7 +1392,7 @@ test_obj_count_and_id(hid_t fid1, hid_t fid2, hid_t did, hid_t gid1,
oid_count = H5Fget_obj_count((hid_t)H5F_OBJ_ALL, H5F_OBJ_ALL);
CHECK(oid_count, FAIL, "H5Fget_obj_count");
VERIFY(oid_count, OBJ_ID_COUNT_8, "H5Fget_obj_count");
-
+
if(oid_count > 0) {
hid_t *oid_list;
@@ -1366,8 +1400,8 @@ test_obj_count_and_id(hid_t fid1, hid_t fid2, hid_t did, hid_t gid1,
if(oid_list != NULL) {
int i;
- ret_count = H5Fget_obj_ids((hid_t)H5F_OBJ_ALL, H5F_OBJ_ALL, (size_t)oid_count, oid_list);
- CHECK(ret_count, FAIL, "H5Fget_obj_ids");
+ ret_count = H5Fget_obj_ids((hid_t)H5F_OBJ_ALL, H5F_OBJ_ALL, (size_t)oid_count, oid_list);
+ CHECK(ret_count, FAIL, "H5Fget_obj_ids");
for(i = 0; i < oid_count; i++) {
H5I_type_t id_type;
@@ -1481,11 +1515,11 @@ test_file_perm(void)
/****************************************************************
**
** test_file_perm2(): low-level file test routine.
-** This test verifies that no object can be created in a
+** This test verifies that no object can be created in a
** file that is opened for read-only.
**
*****************************************************************/
-static void
+static void
test_file_perm2(void)
{
hid_t file; /* File opened with read-write permission */
@@ -1495,7 +1529,7 @@ test_file_perm2(void)
hid_t dset; /* Dataset ID */
hid_t type; /* Datatype ID */
hid_t attr; /* Attribute ID */
- herr_t ret;
+ herr_t ret;
/* Output message about test being performed */
MESSAGE(5, ("Testing Low-Level File Permissions again\n"));
@@ -1613,7 +1647,7 @@ test_file_ishdf5(void)
/* Create non-HDF5 file and check it */
- fd=HDopen(FILE1, O_RDWR|O_CREAT|O_TRUNC, 0666);
+ fd = HDopen(FILE1, O_RDWR|O_CREAT|O_TRUNC, H5_POSIX_CREATE_MODE_RW);
CHECK(fd, FAIL, "HDopen");
/* Initialize information to write */
@@ -2087,35 +2121,35 @@ test_file_double_dataset_open(void)
/****************************************************************
**
** test_file_double_file_dataset_open():
-** This test checks multi-opens of files & datasets:
-** It simulates the multi-thread test program from DLS
-** which exposes the file pointer segmentation fault failure.
-** NOTE: The order on when the files and datasets are open/close
-** is important.
+** This test checks multi-opens of files & datasets:
+** It simulates the multi-thread test program from DLS
+** which exposes the file pointer segmentation fault failure.
+** NOTE: The order on when the files and datasets are open/close
+** is important.
**
*****************************************************************/
static void
test_file_double_file_dataset_open(hbool_t new_format)
{
- hid_t fapl = -1; /* File access property list */
- hid_t dcpl = -1; /* Dataset creation property list */
- hid_t fid1 = -1, fid2 = -1; /* File IDs */
- hid_t did1 = -1, did2 = -1; /* Dataset IDs */
- hid_t sid1 = -1, sid2 = -1; /* Dataspace IDs */
- hid_t tid1 = -1, tid2 = -1; /* Datatype IDs */
- hsize_t dims[1] = {5}, dims2[2] = {1, 4}; /* Dimension sizes */
- hsize_t e_ext_dims[1] = {7}; /* Expanded dimension sizes */
- hsize_t s_ext_dims[1] = {3}; /* Shrunk dimension sizes */
- hsize_t max_dims0[1] = {8}; /* Maximum dimension sizes */
- hsize_t max_dims1[1] = {H5S_UNLIMITED}; /* Maximum dimesion sizes for extensible array index */
- hsize_t max_dims2[2] = {H5S_UNLIMITED, H5S_UNLIMITED}; /* Maximum dimension sizes for v2 B-tree index */
- hsize_t chunks[1] = {2}, chunks2[2] = {4, 5}; /* Chunk dimension sizes */
+ hid_t fapl = -1; /* File access property list */
+ hid_t dcpl = -1; /* Dataset creation property list */
+ hid_t fid1 = -1, fid2 = -1; /* File IDs */
+ hid_t did1 = -1, did2 = -1; /* Dataset IDs */
+ hid_t sid1 = -1, sid2 = -1; /* Dataspace IDs */
+ hid_t tid1 = -1, tid2 = -1; /* Datatype IDs */
+ hsize_t dims[1] = {5}, dims2[2] = {1, 4}; /* Dimension sizes */
+ hsize_t e_ext_dims[1] = {7}; /* Expanded dimension sizes */
+ hsize_t s_ext_dims[1] = {3}; /* Shrunk dimension sizes */
+ hsize_t max_dims0[1] = {8}; /* Maximum dimension sizes */
+ hsize_t max_dims1[1] = {H5S_UNLIMITED}; /* Maximum dimesion sizes for extensible array index */
+ hsize_t max_dims2[2] = {H5S_UNLIMITED, H5S_UNLIMITED}; /* Maximum dimension sizes for v2 B-tree index */
+ hsize_t chunks[1] = {2}, chunks2[2] = {4, 5}; /* Chunk dimension sizes */
hsize_t size; /* File size */
- const char* data[] = {"String 1", "String 2", "String 3", "String 4", "String 5"}; /* Input Data */
- const char* e_data[] = {"String 1", "String 2", "String 3", "String 4", "String 5", "String 6", "String 7"}; /* Input Data */
- char* buffer[5]; /* Output buffer */
- int wbuf[4] = {1, 2, 3, 4}; /* Input data */
- herr_t ret; /* Generic return value */
+ const char* data[] = {"String 1", "String 2", "String 3", "String 4", "String 5"}; /* Input Data */
+ const char* e_data[] = {"String 1", "String 2", "String 3", "String 4", "String 5", "String 6", "String 7"}; /* Input Data */
+ char* buffer[5]; /* Output buffer */
+ int wbuf[4] = {1, 2, 3, 4}; /* Input data */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing double file and dataset open/close\n"));
@@ -2136,7 +2170,7 @@ test_file_double_file_dataset_open(hbool_t new_format)
/* Create a chunked dataset with fixed array indexing */
sid1 = H5Screate_simple(1, dims, max_dims0);
- CHECK(sid1, FAIL, "H5Screate");
+ CHECK(sid1, FAIL, "H5Screate_simple");
tid1 = H5Tcopy(H5T_C_S1);
CHECK(tid1, FAIL, "H5Tcopy");
ret = H5Tset_size(tid1, H5T_VARIABLE);
@@ -2162,7 +2196,7 @@ test_file_double_file_dataset_open(hbool_t new_format)
/* Create a chunked dataset with extensible array indexing */
sid1 = H5Screate_simple(1, dims, max_dims1);
- CHECK(sid1, FAIL, "H5Screate");
+ CHECK(sid1, FAIL, "H5Screate_simple");
tid1 = H5Tcopy(H5T_C_S1);
CHECK(tid1, FAIL, "H5Tcopy");
ret = H5Tset_size(tid1, H5T_VARIABLE);
@@ -2191,7 +2225,7 @@ test_file_double_file_dataset_open(hbool_t new_format)
/* Create a chunked dataset with v2 btree indexing */
sid2 = H5Screate_simple(2, dims2, max_dims2);
- CHECK(sid2, FAIL, "H5Screate");
+ CHECK(sid2, FAIL, "H5Screate_simple");
dcpl = H5Pcreate(H5P_DATASET_CREATE);
CHECK(dcpl, FAIL, "H5Pcreate");
@@ -2218,8 +2252,8 @@ test_file_double_file_dataset_open(hbool_t new_format)
ret = H5Fclose(fid1);
CHECK(ret, FAIL, "H5Fclose");
- /*
- * Scenario 1
+ /*
+ * Scenario 1
*/
/* First file open */
@@ -2274,8 +2308,8 @@ test_file_double_file_dataset_open(hbool_t new_format)
ret = H5Tclose(tid2);
CHECK(ret, FAIL, "H5Tclose");
- /*
- * Scenario 2
+ /*
+ * Scenario 2
*/
/* First file open */
@@ -2339,7 +2373,7 @@ test_file_double_file_dataset_open(hbool_t new_format)
ret = H5Tclose(tid2);
CHECK(ret, FAIL, "H5Tclose");
- /*
+ /*
* Scenario 3
*/
@@ -2383,10 +2417,10 @@ test_file_double_file_dataset_open(hbool_t new_format)
ret = H5Fclose(fid2);
CHECK(ret, FAIL, "H5Fclose");
- /*
+ /*
* Scenario 4
* --trigger H5AC_protect: Assertion `f->shared' failed
- * from second call to H5Dset_extent->...H5D__earray_idx_remove->H5EA_get...H5EA__iblock_protect...H5AC_protect
+ * from second call to H5Dset_extent->...H5D__earray_idx_remove->H5EA_get...H5EA__iblock_protect...H5AC_protect
*/
/* First file open */
fid1 = H5Fopen(FILE1, H5F_ACC_RDWR, H5P_DEFAULT);
@@ -2659,7 +2693,7 @@ cal_chksum(const char *file, uint32_t *chksum)
herr_t ret; /* Generic return value */
/* Open the file */
- fdes = HDopen(file, O_RDONLY, 0);
+ fdes = HDopen(file, O_RDONLY);
CHECK(fdes, FAIL, "HDopen");
/* Retrieve the file's size */
@@ -2668,7 +2702,7 @@ cal_chksum(const char *file, uint32_t *chksum)
/* Allocate space for the file data */
file_data = HDmalloc((size_t)sb.st_size);
- CHECK(file_data, NULL, "HDmalloc");
+ CHECK_PTR(file_data, "HDmalloc");
if(file_data) {
/* Read file's data into memory */
@@ -2695,9 +2729,9 @@ cal_chksum(const char *file, uint32_t *chksum)
** This test checks to ensure that opening and closing a file
** with read/write permissions does not write anything to the
** file if the file does not change.
-** Due to the implementation of file locking (status_flags in
-** the superblock is used), this test is changed to use checksum
-** instead of timestamp to verify the file is not changed.
+** Due to the implementation of file locking (status_flags in
+** the superblock is used), this test is changed to use checksum
+** instead of timestamp to verify the file is not changed.
**
** Programmer: Vailin Choi; July 2013
**
@@ -2706,8 +2740,8 @@ static void
test_rw_noupdate(void)
{
herr_t ret; /* Generic return value */
- hid_t fid; /* File ID */
- uint32_t chksum1, chksum2; /* Checksum value */
+ hid_t fid; /* File ID */
+ uint32_t chksum1, chksum2; /* Checksum value */
/* Output message about test being performed */
MESSAGE(5, ("Testing to verify that nothing is written if nothing is changed.\n"));
@@ -2722,7 +2756,7 @@ test_rw_noupdate(void)
/* Calculate checksum for the file */
ret = cal_chksum(FILE1, &chksum1);
- CHECK(ret, FAIL, "HDopen");
+ CHECK(ret, FAIL, "cal_chksum");
/* Open and close File With Read/Write Permission */
fid = H5Fopen(FILE1, H5F_ACC_RDWR, H5P_DEFAULT);
@@ -2734,7 +2768,7 @@ test_rw_noupdate(void)
/* Calculate checksum for the file */
ret = cal_chksum(FILE1, &chksum2);
- CHECK(ret, FAIL, "HDopen");
+ CHECK(ret, FAIL, "cal_chksum");
/* The two checksums are the same, i.e. the file is not changed */
VERIFY(chksum1, chksum2, "Checksum");
@@ -3096,8 +3130,8 @@ test_userblock_alignment(void)
** test_userblock_alignment_paged(): low-level file test routine.
** This test checks to ensure that files with both a userblock and
** alignment interact properly:
-** -- alignment via H5Pset_alignment
-** -- alignment via paged aggregation
+** -- alignment via H5Pset_alignment
+** -- alignment via paged aggregation
**
** Programmer: Vailin Choi; March 2013
**
@@ -3113,14 +3147,14 @@ test_userblock_alignment_paged(void)
/* Output message about test being performed */
MESSAGE(5, ("Testing interaction between userblock and alignment (via paged aggregation and H5Pset_alignment)\n"));
- /*
+ /*
* Case 1:
* Userblock size = 0
* Alignment in use = 4096
* Strategy = H5F_FILE_SPACE_PAGE; fsp_size = alignment = 4096
* Outcome:
- * Should succeed:
- * userblock is 0 and alignment != 0
+ * Should succeed:
+ * userblock is 0 and alignment != 0
*/
/* Create file creation property list with user block */
fcpl = H5Pcreate(H5P_FILE_CREATE);
@@ -3151,14 +3185,14 @@ test_userblock_alignment_paged(void)
ret = H5Pclose(fapl);
CHECK(ret, FAIL, "H5Pclose");
- /*
+ /*
* Case 2a:
* Userblock size = 1024
* Alignment in use = 512
- * Strategy = H5F_FILE_SPACE_PAGE; fsp_size = alignment = 512
+ * Strategy = H5F_FILE_SPACE_PAGE; fsp_size = alignment = 512
* H5Pset_alignment() is 3
* Outcome:
- * Should succeed:
+ * Should succeed:
* userblock (1024) is integral mult. of alignment (512)
*/
/* Create file creation property list with user block */
@@ -3187,16 +3221,16 @@ test_userblock_alignment_paged(void)
ret = H5Pclose(fapl);
CHECK(ret, FAIL, "H5Pclose");
- /*
+ /*
* Case 2b:
* Userblock size = 1024
* Alignment in use = 3
- * Strategy = H5F_FILE_SPACE_AGGR; fsp_size = 512
- * (via default file creation property)
+ * Strategy = H5F_FILE_SPACE_AGGR; fsp_size = 512
+ * (via default file creation property)
* H5Pset_alignment() is 3
* Outcome:
- * Should fail at file creation:
- * userblock (1024) is non-integral mult. of alignment (3)
+ * Should fail at file creation:
+ * userblock (1024) is non-integral mult. of alignment (3)
*/
/* Create file creation property list with user block */
fcpl = H5Pcreate(H5P_FILE_CREATE);
@@ -3223,15 +3257,15 @@ test_userblock_alignment_paged(void)
ret = H5Pclose(fapl);
CHECK(ret, FAIL, "H5Pclose");
- /*
+ /*
* Case 3a:
* Userblock size = 512
* Alignment in use = 512
- * Strategy is H5F_FILE_SPACE_PAGE; fsp_size = alignment = 512
+ * Strategy is H5F_FILE_SPACE_PAGE; fsp_size = alignment = 512
* H5Pset_alignment() is 3
* Outcome:
- * Should succeed:
- * userblock (512) is equal to alignment (512)
+ * Should succeed:
+ * userblock (512) is equal to alignment (512)
*/
/* Create file creation property list with user block */
fcpl = H5Pcreate(H5P_FILE_CREATE);
@@ -3261,15 +3295,15 @@ test_userblock_alignment_paged(void)
ret = H5Pclose(fapl);
CHECK(ret, FAIL, "H5Pclose");
- /*
+ /*
* Case 3b:
* Userblock size = 512
* Alignment in use = 3
- * Strategy is H5F_FILE_SPACE_NONE; fsp_size = 512
+ * Strategy is H5F_FILE_SPACE_NONE; fsp_size = 512
* H5Pset_alignment() is 3
* Outcome:
- * Should fail at file creation:
- * userblock (512) is non-integral mult. of alignment (3)
+ * Should fail at file creation:
+ * userblock (512) is non-integral mult. of alignment (3)
*/
/* Create file creation property list with user block */
fcpl = H5Pcreate(H5P_FILE_CREATE);
@@ -3299,15 +3333,15 @@ test_userblock_alignment_paged(void)
ret = H5Pclose(fapl);
CHECK(ret, FAIL, "H5Pclose");
- /*
+ /*
* Case 4a:
* Userblock size = 1024
* Alignment in use = 1023
* Strategy is H5F_FILE_SPACE_PAGE; fsp_size = alignment = 1023
* H5Pset_alignment() is 16
* Outcome:
- * Should fail at file creation:
- * userblock (1024) is non-integral multiple of alignment (1023)
+ * Should fail at file creation:
+ * userblock (1024) is non-integral multiple of alignment (1023)
*/
/* Create file creation property list with user block */
fcpl = H5Pcreate(H5P_FILE_CREATE);
@@ -3337,15 +3371,15 @@ test_userblock_alignment_paged(void)
ret = H5Pclose(fapl);
CHECK(ret, FAIL, "H5Pclose");
- /*
+ /*
* Case 4b:
* Userblock size = 1024
* Alignment in use = 16
* Strategy is H5F_FILE_SPACE_FSM_AGGR; fsp_size = 1023
* H5Pset_alignment() is 16
* Outcome:
- * Should succeed:
- * userblock (512) is integral multiple of alignment (16)
+ * Should succeed:
+ * userblock (512) is integral multiple of alignment (16)
*/
/* Create file creation property list with user block */
fcpl = H5Pcreate(H5P_FILE_CREATE);
@@ -3375,15 +3409,15 @@ test_userblock_alignment_paged(void)
ret = H5Pclose(fapl);
CHECK(ret, FAIL, "H5Pclose");
- /*
+ /*
* Case 5a:
* Userblock size = 512
* Alignment in use = 1024
* Strategy is H5F_FILE_SPACE_PAGE; fsp_size = alignment = 1024
* H5Pset_alignment() is 16
* Outcome:
- * Should fail at file creation:
- * userblock (512) is less than alignment (1024)
+ * Should fail at file creation:
+ * userblock (512) is less than alignment (1024)
*/
/* Create file creation property list with user block */
fcpl = H5Pcreate(H5P_FILE_CREATE);
@@ -3413,7 +3447,7 @@ test_userblock_alignment_paged(void)
ret = H5Pclose(fapl);
CHECK(ret, FAIL, "H5Pclose");
- /*
+ /*
* Case 5b:
* Userblock size = 512
* Alignment in use = 16
@@ -3421,7 +3455,7 @@ test_userblock_alignment_paged(void)
* H5Pset_alignment() is 16
* Outcome:
* Should succed:
- * userblock (512) is integral multiple of alignment (16)
+ * userblock (512) is integral multiple of alignment (16)
*/
/* Create file creation property list with user block */
fcpl = H5Pcreate(H5P_FILE_CREATE);
@@ -3451,16 +3485,16 @@ test_userblock_alignment_paged(void)
ret = H5Pclose(fapl);
CHECK(ret, FAIL, "H5Pclose");
- /*
+ /*
* Case 6:
* Userblock size = 512
* Alignment in use = 512
* Strategy is H5F_FILE_SPACE_PAGE; fsp_size = alignment = 512
* H5Pset_alignment() is 3
- * Reopen the file; H5Pset_alignment() is 1024
+ * Reopen the file; H5Pset_alignment() is 1024
* Outcome:
* Should succed:
- * Userblock (512) is the same as alignment (512);
+ * Userblock (512) is the same as alignment (512);
* The H5Pset_alignment() calls have no effect
*/
/* Create file creation property list with user block */
@@ -3504,19 +3538,19 @@ test_userblock_alignment_paged(void)
/****************************************************************
**
** test_filespace_info():
-** Verify the following public routines retrieve and set file space
-** information correctly:
-** (1) H5Pget/set_file_space_strategy():
-** Retrieve and set file space strategy, persisting free-space,
-** and free-space section threshold as specified
-** (2) H5Pget/set_file_space_page_size():
-** Retrieve and set the page size for paged aggregation
+** Verify the following public routines retrieve and set file space
+** information correctly:
+** (1) H5Pget/set_file_space_strategy():
+** Retrieve and set file space strategy, persisting free-space,
+** and free-space section threshold as specified
+** (2) H5Pget/set_file_space_page_size():
+** Retrieve and set the page size for paged aggregation
**
****************************************************************/
static void
test_filespace_info(const char *env_h5_drvr)
{
- hid_t fid; /* File IDs */
+ hid_t fid; /* File IDs */
hid_t fapl, new_fapl; /* File access property lists */
hid_t fcpl, fcpl1, fcpl2; /* File creation property lists */
H5F_fspace_strategy_t strategy; /* File space strategy */
@@ -3529,7 +3563,7 @@ test_filespace_info(const char *env_h5_drvr)
hsize_t fsp_size; /* File space page size */
char filename[FILENAME_LEN]; /* Filename to use */
hbool_t contig_addr_vfd; /* Whether VFD used has a contigous address space */
- herr_t ret; /* Return value */
+ herr_t ret; /* Return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing file creation public routines: H5Pget/set_file_space_strategy & H5Pget/set_file_space_page_size\n"));
@@ -3547,14 +3581,14 @@ test_filespace_info(const char *env_h5_drvr)
ret = H5Pset_libver_bounds(new_fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST);
CHECK(ret, FAIL, "H5Pset_libver_bounds");
- /*
+ /*
* Case (1)
* Check file space information from a default file creation property list.
* Values expected:
- * strategy--H5F_FILE_SPACE_AGGR
- * persist--FALSE
- * threshold--1
- * file space page size--4096
+ * strategy--H5F_FILE_SPACE_AGGR
+ * persist--FALSE
+ * threshold--1
+ * file space page size--4096
*/
/* Create file creation property list template */
fcpl = H5Pcreate(H5P_FILE_CREATE);
@@ -3577,12 +3611,15 @@ test_filespace_info(const char *env_h5_drvr)
/* Close property list */
H5Pclose(fcpl);
- /*
+ /*
* Case (2)
* File space page size has a minimum size of 512.
* Setting value less than 512 will return an error;
* --setting file space page size to 0
* --setting file space page size to 511
+ *
+ * File space page size has a maximum size of 1 gigabyte.
+ * Setting value greater than 1 gigabyte will return an error.
*/
/* Create file creation property list template */
fcpl = H5Pcreate(H5P_FILE_CREATE);
@@ -3600,6 +3637,12 @@ test_filespace_info(const char *env_h5_drvr)
} H5E_END_TRY;
VERIFY(ret, FAIL, "H5Pset_file_space_page_size");
+ /* Setting to 1GB+1: should fail */
+ H5E_BEGIN_TRY {
+ ret = H5Pset_file_space_page_size(fcpl, FSP_SIZE1G+1);
+ } H5E_END_TRY;
+ VERIFY(ret, FAIL, "H5Pset_file_space_page_size");
+
/* Setting to 512: should succeed */
ret = H5Pset_file_space_page_size(fcpl, FSP_SIZE512);
CHECK(ret, FAIL, "H5Pset_file_space_page_size");
@@ -3607,17 +3650,24 @@ test_filespace_info(const char *env_h5_drvr)
CHECK(ret, FAIL, "H5Pget_file_space_page_size");
VERIFY(fsp_size, FSP_SIZE512, "H5Pget_file_space_page_size");
+ /* Setting to 1GB: should succeed */
+ ret = H5Pset_file_space_page_size(fcpl, FSP_SIZE1G);
+ CHECK(ret, FAIL, "H5Pset_file_space_page_size");
+ ret = H5Pget_file_space_page_size(fcpl, &fsp_size);
+ CHECK(ret, FAIL, "H5Pget_file_space_page_size");
+ VERIFY(fsp_size, FSP_SIZE1G, "H5Pget_file_space_page_size");
+
/* Close property list */
H5Pclose(fcpl);
- /*
+ /*
* Case (3)
* Check file space information when creating a file with default properties.
* Values expected:
- * strategy--H5F_FILE_SPACE_AGGR
- * persist--FALSE
- * threshold--1
- * file space page size--4096
+ * strategy--H5F_FILE_SPACE_AGGR
+ * persist--FALSE
+ * threshold--1
+ * file space page size--4096
*/
/* Create a file with default file creation and access property lists */
fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -3647,15 +3697,15 @@ test_filespace_info(const char *env_h5_drvr)
ret = H5Pclose(fcpl1);
CHECK(ret, FAIL, "H5Pclose");
- /*
+ /*
* Case (4)
* Check file space information when creating a file with the
* latest library format and default properties.
* Values expected:
- * strategy--H5F_FILE_SPACE_AGGR
- * persist--FALSE
- * threshold--1
- * file space page size--4096
+ * strategy--H5F_FILE_SPACE_AGGR
+ * persist--FALSE
+ * threshold--1
+ * file space page size--4096
*/
/* Create a file with the latest library format */
fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, new_fapl);
@@ -3685,21 +3735,21 @@ test_filespace_info(const char *env_h5_drvr)
ret = H5Pclose(fcpl1);
CHECK(ret, FAIL, "H5Pclose");
- /*
+ /*
* Case (5)
* Check file space information with the following combinations:
- * Create file with --
- * New or old format
- * Persist or not persist free-space
- * Different sizes for free-space section threshold (0 to 10)
- * The four file space strategies:
- * H5F_FSPACE_STRATEGY_FSM_AGGR, H5F_FSPACE_STRATEGY_PAGE,
+ * Create file with --
+ * New or old format
+ * Persist or not persist free-space
+ * Different sizes for free-space section threshold (0 to 10)
+ * The four file space strategies:
+ * H5F_FSPACE_STRATEGY_FSM_AGGR, H5F_FSPACE_STRATEGY_PAGE,
* H5F_FSPACE_STRATEGY_AGGR, H5F_FSPACE_STRATEGY_NONE
- * File space page size: set to 512
- *
+ * File space page size: set to 512
+ *
*/
for(new_format = FALSE; new_format <= TRUE; new_format++) {
- hid_t my_fapl;
+ hid_t my_fapl;
/* Set the FAPL for the type of format */
if(new_format) {
@@ -3733,7 +3783,7 @@ test_filespace_info(const char *env_h5_drvr)
ret = H5Pset_file_space_page_size(fcpl, FSP_SIZE512);
CHECK(ret, FAIL, "H5Pset_file_space_strategy");
-
+
/* Retrieve file space information */
ret = H5Pget_file_space_strategy(fcpl, &strategy, &persist, &threshold);
CHECK(ret, FAIL, "H5Pget_file_space_strategy");
@@ -3892,13 +3942,13 @@ error:
** returned by the public routine H5Fget_freespace().
**
** Modifications:
-** Vailin Choi; July 2012
-** Remove datasets in reverse order so that all file spaces are shrunk.
-** (A change due to H5FD_FLMAP_DICHOTOMY.)
+** Vailin Choi; July 2012
+** Remove datasets in reverse order so that all file spaces are shrunk.
+** (A change due to H5FD_FLMAP_DICHOTOMY.)
**
-** Vailin Choi; Dec 2012
-** Add changes due to paged aggregation via new format:
-** the amount of freespace is different.
+** Vailin Choi; Dec 2012
+** Add changes due to paged aggregation via new format:
+** the amount of freespace is different.
**
*****************************************************************/
static void
@@ -4038,9 +4088,9 @@ test_file_freespace(const char *env_h5_drvr)
/* Check that there is the right amount of free space in the file */
free_space = H5Fget_freespace(file);
CHECK(free_space, FAIL, "H5Fget_freespace");
- if(new_format)
+ if(new_format)
VERIFY(free_space, expected_fs_del, "H5Fget_freespace");
- else
+ else
VERIFY(free_space, expected_fs_del, "H5Fget_freespace");
/* Close file */
@@ -4064,7 +4114,7 @@ test_file_freespace(const char *env_h5_drvr)
**
** test_sects_freespace():
** This routine checks free-space section information for the
-** file as returned by the public routine H5Fget_free_sections().
+** file as returned by the public routine H5Fget_free_sections().
**
*****************************************************************/
static void
@@ -4086,9 +4136,9 @@ test_sects_freespace(const char *env_h5_drvr, hbool_t new_format)
H5F_sect_info_t all_sect_info[15]; /* Array to hold free-space information for all types of data */
H5F_sect_info_t meta_sect_info[15]; /* Array to hold free-space information for metadata */
H5F_sect_info_t raw_sect_info[15]; /* Array to hold free-space information for raw data */
- hsize_t total = 0; /* sum of the free-space section sizes */
+ hsize_t total = 0; /* sum of the free-space section sizes */
hsize_t tmp_tot = 0; /* Sum of the free-space section sizes */
- hsize_t last_size; /* Size of last free-space section */
+ hsize_t last_size; /* Size of last free-space section */
hsize_t dims[1]; /* Dimension sizes */
unsigned u; /* Local index variable */
H5FD_mem_t type;
@@ -4127,7 +4177,7 @@ test_sects_freespace(const char *env_h5_drvr, hbool_t new_format)
} else {
ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, TRUE, (hsize_t)1);
CHECK(ret, FAIL, "H5Pget_file_space_strategy");
- }
+ }
/* Create the file */
file = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl);
@@ -4251,7 +4301,7 @@ test_sects_freespace(const char *env_h5_drvr, hbool_t new_format)
HDmemset(meta_sect_info, 0, sizeof(meta_sect_info));
if(multi_vfd) {
- hssize_t ntmp;
+ hssize_t ntmp;
for(type = H5FD_MEM_SUPER; type < H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t, type)) {
if(type == H5FD_MEM_DRAW || type == H5FD_MEM_GHEAP)
@@ -4303,7 +4353,7 @@ test_sects_freespace(const char *env_h5_drvr, hbool_t new_format)
CHECK(fcpl, FAIL, "H5Pclose");
h5_clean_files(FILESPACE_NAME, fapl);
- }
+ }
} /* end test_sects_freespace() */
@@ -4311,29 +4361,29 @@ test_sects_freespace(const char *env_h5_drvr, hbool_t new_format)
/****************************************************************
**
** test_filespace_compatible():
-** Verify that the trunk with the latest file space management
-** can open, read and modify 1.6 HDF5 file and 1.8 HDF5 file.
-** Also verify the correct file space handling information
-** and the amount of free space.
+** Verify that the trunk with the latest file space management
+** can open, read and modify 1.6 HDF5 file and 1.8 HDF5 file.
+** Also verify the correct file space handling information
+** and the amount of free space.
**
****************************************************************/
static void
test_filespace_compatible(void)
{
int fd_old = (-1), fd_new = (-1); /* File descriptors for copying data */
- hid_t fid = -1; /* File id */
- hid_t did = -1; /* Dataset id */
- hid_t fcpl; /* File creation property list template */
- int check[100]; /* Temporary buffer for verifying dataset data */
- int rdbuf[100]; /* Temporary buffer for reading in dataset data */
- uint8_t buf[READ_OLD_BUFSIZE]; /* temporary buffer for reading */
- ssize_t nread; /* Number of bytes read in */
- unsigned i, j; /* Local index variable */
- hssize_t free_space; /* Amount of free-space in the file */
- hbool_t persist; /* Persist free-space or not */
- hsize_t threshold; /* Free-space section threshold */
- H5F_fspace_strategy_t strategy; /* File space handling strategy */
- herr_t ret; /* Return value */
+ hid_t fid = -1; /* File id */
+ hid_t did = -1; /* Dataset id */
+ hid_t fcpl; /* File creation property list template */
+ int check[100]; /* Temporary buffer for verifying dataset data */
+ int rdbuf[100]; /* Temporary buffer for reading in dataset data */
+ uint8_t buf[READ_OLD_BUFSIZE]; /* temporary buffer for reading */
+ ssize_t nread; /* Number of bytes read in */
+ unsigned i, j; /* Local index variable */
+ hssize_t free_space; /* Amount of free-space in the file */
+ hbool_t persist; /* Persist free-space or not */
+ hsize_t threshold; /* Free-space section threshold */
+ H5F_fspace_strategy_t strategy; /* File space handling strategy */
+ herr_t ret; /* Return value */
/* Output message about test being performed */
MESSAGE(5, ("File space compatibility testing for 1.6 and 1.8 files\n"));
@@ -4342,31 +4392,31 @@ test_filespace_compatible(void)
const char *filename = H5_get_srcdir_filename(OLD_FILENAME[j]); /* Corrected test file name */
/* Open and copy the test file into a temporary file */
- fd_old = HDopen(filename, O_RDONLY, 0666);
- CHECK(fd_old, FAIL, "HDopen");
- fd_new = HDopen(FILE5, O_RDWR|O_CREAT|O_TRUNC, 0666);
- CHECK(fd_new, FAIL, "HDopen");
+ fd_old = HDopen(filename, O_RDONLY);
+ CHECK(fd_old, FAIL, "HDopen");
+ fd_new = HDopen(FILE5, O_RDWR|O_CREAT|O_TRUNC, H5_POSIX_CREATE_MODE_RW);
+ CHECK(fd_new, FAIL, "HDopen");
- /* Copy data */
+ /* Copy data */
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);
- CHECK(ret, FAIL, "HDclose");
- ret = HDclose(fd_new);
- CHECK(ret, FAIL, "HDclose");
+ /* Close the files */
+ ret = HDclose(fd_old);
+ CHECK(ret, FAIL, "HDclose");
+ ret = HDclose(fd_new);
+ CHECK(ret, FAIL, "HDclose");
/* Open the temporary test file */
- fid = H5Fopen(FILE5, H5F_ACC_RDWR, H5P_DEFAULT);
- CHECK(fid, FAIL, "H5Fopen");
+ fid = H5Fopen(FILE5, H5F_ACC_RDWR, H5P_DEFAULT);
+ CHECK(fid, FAIL, "H5Fopen");
- /* There should not be any free space in the file */
- free_space = H5Fget_freespace(fid);
- CHECK(free_space, FAIL, "H5Fget_freespace");
- VERIFY(free_space, (hssize_t)0, "H5Fget_freespace");
+ /* There should not be any free space in the file */
+ free_space = H5Fget_freespace(fid);
+ CHECK(free_space, FAIL, "H5Fget_freespace");
+ VERIFY(free_space, (hssize_t)0, "H5Fget_freespace");
/* Get the file's file creation property list */
fcpl = H5Fget_create_plist(fid);
@@ -4383,27 +4433,27 @@ test_filespace_compatible(void)
VERIFY(persist, FALSE, "H5Pget_file_space_strategy");
VERIFY(threshold, 1, "H5Pget_file_space_strategy");
- /* Generate raw data */
- for(i = 0; i < 100; i++)
- check[i] = (int)i;
+ /* Generate raw data */
+ for(i = 0; i < 100; i++)
+ check[i] = (int)i;
- /* Open and read the dataset */
- did = H5Dopen2(fid, DSETNAME, H5P_DEFAULT);
- CHECK(did, FAIL, "H5Dopen");
- ret = H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &rdbuf);
- CHECK(ret, FAIL, "H5Dread");
+ /* Open and read the dataset */
+ did = H5Dopen2(fid, DSETNAME, H5P_DEFAULT);
+ CHECK(did, FAIL, "H5Dopen");
+ ret = H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &rdbuf);
+ CHECK(ret, FAIL, "H5Dread");
- /* Verify the data read is correct */
- for(i = 0; i < 100; i++)
- VERIFY(rdbuf[i], check[i], "test_compatible");
+ /* Verify the data read is correct */
+ for(i = 0; i < 100; i++)
+ VERIFY(rdbuf[i], check[i], "test_compatible");
- /* Close the dataset */
- ret = H5Dclose(did);
- CHECK(ret, FAIL, "H5Dclose");
+ /* Close the dataset */
+ ret = H5Dclose(did);
+ CHECK(ret, FAIL, "H5Dclose");
- /* Remove the dataset */
- ret = H5Ldelete(fid, DSETNAME, H5P_DEFAULT);
- CHECK(ret, FAIL, "H5Ldelete");
+ /* Remove the dataset */
+ ret = H5Ldelete(fid, DSETNAME, H5P_DEFAULT);
+ CHECK(ret, FAIL, "H5Ldelete");
/* Close the plist */
ret = H5Pclose(fcpl);
@@ -4413,30 +4463,30 @@ test_filespace_compatible(void)
ret = H5Fclose(fid);
CHECK(ret, FAIL, "H5Fclose");
- /* Re-Open the file */
- fid = H5Fopen(FILE5, H5F_ACC_RDONLY, H5P_DEFAULT);
- CHECK(fid, FAIL, "H5Fopen");
+ /* Re-Open the file */
+ fid = H5Fopen(FILE5, H5F_ACC_RDONLY, H5P_DEFAULT);
+ CHECK(fid, FAIL, "H5Fopen");
- /* The dataset should not be there */
- did = H5Dopen2(fid, DSETNAME, H5P_DEFAULT);
- VERIFY(did, FAIL, "H5Dopen");
+ /* The dataset should not be there */
+ did = H5Dopen2(fid, DSETNAME, H5P_DEFAULT);
+ VERIFY(did, FAIL, "H5Dopen");
- /* There should not be any free space in the file */
- free_space = H5Fget_freespace(fid);
- CHECK(free_space, FAIL, "H5Fget_freespace");
- VERIFY(free_space, (hssize_t)0, "H5Fget_freespace");
+ /* There should not be any free space in the file */
+ free_space = H5Fget_freespace(fid);
+ CHECK(free_space, FAIL, "H5Fget_freespace");
+ VERIFY(free_space, (hssize_t)0, "H5Fget_freespace");
- /* Close the file */
- ret = H5Fclose(fid);
- CHECK(ret, FAIL, "H5Fclose");
+ /* Close the file */
+ ret = H5Fclose(fid);
+ CHECK(ret, FAIL, "H5Fclose");
} /* end for */
} /* test_filespace_compatible */
/****************************************************************
**
** test_filespace_1.10.0_compatible():
-** Verify that the latest file space management can open, read and
-** modify 1.10.0 HDF5 files :
+** Verify that the latest file space management can open, read and
+** modify 1.10.0 HDF5 files :
** h5fc_ext1_i.h5: H5F_FILE_SPACE_ALL, default threshold; has superblock extension but no fsinfo message
** h5fc_ext1_f.h5: H5F_FILE_SPACE_ALL_PERSIST, default threshold; has superblock extension with fsinfo message
** h5fc_ext2_if.h5: H5F_FILE_SPACE_ALL, non-default threshold; has superblock extension with fsinfo message
@@ -4450,16 +4500,16 @@ static void
test_filespace_1_10_0_compatible(void)
{
hid_t fid = -1; /* File id */
- hid_t did = -1; /* Dataset id */
+ hid_t did = -1; /* Dataset id */
hid_t fcpl; /* File creation property list */
- hbool_t persist; /* Persist free-space or not */
- hsize_t threshold; /* Free-space section threshold */
+ hbool_t persist; /* Persist free-space or not */
+ hsize_t threshold; /* Free-space section threshold */
H5F_fspace_strategy_t strategy; /* File space handling strategy */
- int wbuf[24]; /* Buffer for dataset data */
- int rdbuf[24]; /* Buffer for dataset data */
+ int wbuf[24]; /* Buffer for dataset data */
+ int rdbuf[24]; /* Buffer for dataset data */
int status; /* Status from copying the existing file */
unsigned i, j; /* Local index variable */
- herr_t ret; /* Return value */
+ herr_t ret; /* Return value */
/* Output message about test being performed */
MESSAGE(5, ("File space compatibility testing for 1.10.0 files\n"));
@@ -4467,7 +4517,7 @@ test_filespace_1_10_0_compatible(void)
for(j = 0; j < NELMTS(OLD_1_10_0_FILENAME); j++) {
/* Make a copy of the test file */
status = h5_make_local_copy(OLD_1_10_0_FILENAME[j], FILE5);
- CHECK(status, FAIL, "h5_make_local_copy");
+ CHECK(status, FAIL, "h5_make_local_copy");
/* Open the temporary test file */
fid = H5Fopen(FILE5, H5F_ACC_RDWR, H5P_DEFAULT);
@@ -4501,7 +4551,7 @@ test_filespace_1_10_0_compatible(void)
/* Close the dataset */
ret = H5Dclose(did);
CHECK(ret, FAIL, "H5Dclose");
- break;
+ break;
case 1:
VERIFY(strategy, H5F_FSPACE_STRATEGY_FSM_AGGR, "H5Pget_file_space_strategy");
@@ -4522,7 +4572,7 @@ test_filespace_1_10_0_compatible(void)
/* Close the dataset */
ret = H5Dclose(did);
CHECK(ret, FAIL, "H5Dclose");
- break;
+ break;
case 2:
VERIFY(strategy, H5F_FSPACE_STRATEGY_FSM_AGGR, "H5Pget_file_space_strategy");
@@ -4543,7 +4593,7 @@ test_filespace_1_10_0_compatible(void)
/* Close the dataset */
ret = H5Dclose(did);
CHECK(ret, FAIL, "H5Dclose");
- break;
+ break;
case 3:
VERIFY(strategy, H5F_FSPACE_STRATEGY_NONE, "H5Pget_file_space_strategy");
@@ -4564,7 +4614,7 @@ test_filespace_1_10_0_compatible(void)
/* Close the dataset */
ret = H5Dclose(did);
CHECK(ret, FAIL, "H5Dclose");
- break;
+ break;
case 4:
VERIFY(strategy, H5F_FSPACE_STRATEGY_AGGR, "H5Pget_file_space_strategy");
@@ -4585,7 +4635,7 @@ test_filespace_1_10_0_compatible(void)
/* Close the dataset */
ret = H5Dclose(did);
CHECK(ret, FAIL, "H5Dclose");
- break;
+ break;
case 5:
VERIFY(strategy, H5F_FSPACE_STRATEGY_FSM_AGGR, "H5Pget_file_space_strategy");
VERIFY(persist, H5F_FREE_SPACE_PERSIST_DEF, "H5Pget_file_space_strategy");
@@ -4605,10 +4655,10 @@ test_filespace_1_10_0_compatible(void)
/* Close the dataset */
ret = H5Dclose(did);
CHECK(ret, FAIL, "H5Dclose");
- break;
+ break;
default:
- break;
+ break;
}
/* Close the plist */
@@ -4639,7 +4689,7 @@ test_filespace_1_10_0_compatible(void)
/* Close the dataset */
ret = H5Dclose(did);
CHECK(ret, FAIL, "H5Dclose");
- break;
+ break;
case 1:
/* Open and read the dataset */
@@ -4656,7 +4706,7 @@ test_filespace_1_10_0_compatible(void)
/* Close the dataset */
ret = H5Dclose(did);
CHECK(ret, FAIL, "H5Dclose");
- break;
+ break;
case 2:
/* Open and read the dataset */
@@ -4673,7 +4723,7 @@ test_filespace_1_10_0_compatible(void)
/* Close the dataset */
ret = H5Dclose(did);
CHECK(ret, FAIL, "H5Dclose");
- break;
+ break;
case 3:
/* Open and read the dataset */
@@ -4690,7 +4740,7 @@ test_filespace_1_10_0_compatible(void)
/* Close the dataset */
ret = H5Dclose(did);
CHECK(ret, FAIL, "H5Dclose");
- break;
+ break;
case 4:
@@ -4708,7 +4758,7 @@ test_filespace_1_10_0_compatible(void)
/* Close the dataset */
ret = H5Dclose(did);
CHECK(ret, FAIL, "H5Dclose");
- break;
+ break;
case 5:
@@ -4726,10 +4776,10 @@ test_filespace_1_10_0_compatible(void)
/* Close the dataset */
ret = H5Dclose(did);
CHECK(ret, FAIL, "H5Dclose");
- break;
+ break;
default:
- break;
+ break;
}
/* Close the file */
@@ -4742,36 +4792,36 @@ test_filespace_1_10_0_compatible(void)
/****************************************************************
**
** test_filespace_round_compatible():
-** Verify that the trunk can open, read and modify these files--
-** 1) They are initially created (via gen_filespace.c) in the trunk
-** with combinations of file space strategies, default/non-default
-** threshold, and file spacing paging enabled/disbled.
-** The library creates the file space info message with
-** "mark if unknown" in these files.
-** 2) They are copied to the 1.8 branch, and are opened/read/modified
-** there via test_filespace_compatible() in test/tfile.c.
-** The 1.8 library marks the file space info message as "unknown"
-** in these files.
-** 3) They are then copied back from the 1.8 branch to the trunk for
-** compatibility testing via this routine.
-** 4) Upon encountering the file space info message which is marked
-** as "unknown", the library will use the default file space management
-** from then on: non-persistent free-space managers, default threshold,
-** and non-paging file space.
+** Verify that the trunk can open, read and modify these files--
+** 1) They are initially created (via gen_filespace.c) in the trunk
+** with combinations of file space strategies, default/non-default
+** threshold, and file spacing paging enabled/disbled.
+** The library creates the file space info message with
+** "mark if unknown" in these files.
+** 2) They are copied to the 1.8 branch, and are opened/read/modified
+** there via test_filespace_compatible() in test/tfile.c.
+** The 1.8 library marks the file space info message as "unknown"
+** in these files.
+** 3) They are then copied back from the 1.8 branch to the trunk for
+** compatibility testing via this routine.
+** 4) Upon encountering the file space info message which is marked
+** as "unknown", the library will use the default file space management
+** from then on: non-persistent free-space managers, default threshold,
+** and non-paging file space.
**
****************************************************************/
static void
test_filespace_round_compatible(void)
{
- hid_t fid = -1; /* File id */
- hid_t fcpl = -1; /* File creation property list ID */
- unsigned j; /* Local index variable */
- H5F_fspace_strategy_t strategy; /* File space strategy */
- hbool_t persist; /* Persist free-space or not */
- hsize_t threshold; /* Free-space section threshold */
- hssize_t free_space; /* Amount of free space in the file */
+ hid_t fid = -1; /* File id */
+ hid_t fcpl = -1; /* File creation property list ID */
+ unsigned j; /* Local index variable */
+ H5F_fspace_strategy_t strategy; /* File space strategy */
+ hbool_t persist; /* Persist free-space or not */
+ hsize_t threshold; /* Free-space section threshold */
+ hssize_t free_space; /* Amount of free space in the file */
int status; /* Status from copying the existing file */
- herr_t ret; /* Return value */
+ herr_t ret; /* Return value */
/* Output message about test being performed */
MESSAGE(5, ("File space compatibility testing for files from trunk to 1_8 to trunk\n"));
@@ -4779,31 +4829,31 @@ test_filespace_round_compatible(void)
for(j = 0; j < NELMTS(FSPACE_FILENAMES); j++) {
/* Make a copy of the test file */
status = h5_make_local_copy(FSPACE_FILENAMES[j], FILE5);
- CHECK(status, FAIL, "h5_make_local_copy");
-
- /* Open the temporary test file */
- fid = H5Fopen(FILE5, H5F_ACC_RDWR, H5P_DEFAULT);
- CHECK(fid, FAIL, "H5Fopen");
-
- /* Get the file's creation property list */
- fcpl = H5Fget_create_plist(fid);
- CHECK(fcpl, FAIL, "H5Fget_create_plist");
-
- ret = H5Pget_file_space_strategy(fcpl, &strategy, &persist, &threshold);
- CHECK(ret, FAIL, "H5Pget_file_space_strategy");
- VERIFY(strategy, H5F_FSPACE_STRATEGY_FSM_AGGR, "H5Pget_file_space_strategy");
- VERIFY(persist, FALSE, "H5Pget_file_space_strategy");
- VERIFY(threshold, 1, "H5Pget_file_space_strategy");
-
- /* There should not be any free space in the file */
- free_space = H5Fget_freespace(fid);
- CHECK(free_space, FAIL, "H5Fget_freespace");
- VERIFY(free_space, (hssize_t)0, "H5Fget_freespace");
-
- /* Closing */
- ret = H5Fclose(fid);
- ret = H5Pclose(fcpl);
- CHECK(ret, FAIL, "H5Fclose");
+ CHECK(status, FAIL, "h5_make_local_copy");
+
+ /* Open the temporary test file */
+ fid = H5Fopen(FILE5, H5F_ACC_RDWR, H5P_DEFAULT);
+ CHECK(fid, FAIL, "H5Fopen");
+
+ /* Get the file's creation property list */
+ fcpl = H5Fget_create_plist(fid);
+ CHECK(fcpl, FAIL, "H5Fget_create_plist");
+
+ ret = H5Pget_file_space_strategy(fcpl, &strategy, &persist, &threshold);
+ CHECK(ret, FAIL, "H5Pget_file_space_strategy");
+ VERIFY(strategy, H5F_FSPACE_STRATEGY_FSM_AGGR, "H5Pget_file_space_strategy");
+ VERIFY(persist, FALSE, "H5Pget_file_space_strategy");
+ VERIFY(threshold, 1, "H5Pget_file_space_strategy");
+
+ /* There should not be any free space in the file */
+ free_space = H5Fget_freespace(fid);
+ CHECK(free_space, FAIL, "H5Fget_freespace");
+ VERIFY(free_space, (hssize_t)0, "H5Fget_freespace");
+
+ /* Closing */
+ ret = H5Fclose(fid);
+ ret = H5Pclose(fcpl);
+ CHECK(ret, FAIL, "H5Fclose");
} /* end for */
} /* test_filespace_round_compatible */
@@ -4869,8 +4919,8 @@ test_libver_bounds_real(H5F_libver_t libver_create, unsigned oh_vers_create,
CHECK(group, FAIL, "H5Gcreate");
ret = H5Oget_info(group, &oinfo);
- CHECK(ret, FAIL, "H5Oget_info_by_name");
- VERIFY(oinfo.hdr.version, oh_vers_mod, "H5Oget_info_by_name");
+ CHECK(ret, FAIL, "H5Oget_info");
+ VERIFY(oinfo.hdr.version, oh_vers_mod, "H5Oget_info");
ret = H5Gclose(group);
CHECK(ret, FAIL, "H5Gclose");
@@ -4903,6 +4953,134 @@ test_libver_bounds_real(H5F_libver_t libver_create, unsigned oh_vers_create,
CHECK(ret, FAIL, "H5Pclose");
} /* end test_libver_bounds_real() */
+
+/*-------------------------------------------------------------------------
+ * Function: test_libver_bounds_open
+ *
+ * Purpose: Tests opening latest file with various low/high bounds.
+ *
+ * Return: Success: 0
+ * Failure: number of errors
+ *
+ *-------------------------------------------------------------------------
+ */
+#define VERBFNAME "tverbounds_dspace.h5"
+#define VERBDSNAME "dataset 1"
+#define SPACE1_DIM1 3
+static void
+test_libver_bounds_open(void)
+{
+ hid_t file = -1; /* File ID */
+ hid_t space = -1; /* Dataspace ID */
+ hid_t dset = -1; /* Dataset ID */
+ hid_t fapl = -1; /* File access property list ID */
+ hid_t new_fapl = -1;/* File access property list ID for reopened file */
+ hid_t dcpl = -1; /* Dataset creation property list ID */
+ hsize_t dim[1] = {SPACE1_DIM1}; /* Dataset dimensions */
+ H5F_libver_t low, high; /* File format bounds */
+ hsize_t chunk_dim[1] = {SPACE1_DIM1}; /* Chunk dimensions */
+ herr_t ret; /* Generic return value */
+
+ /* Output message about test being performed */
+ MESSAGE(5, ("Testing Opening File in Various Version Bounds\n"));
+
+ /* Create a file access property list */
+ fapl = H5Pcreate(H5P_FILE_ACCESS);
+ CHECK(fapl, FAIL, "H5Pcreate");
+
+ /* Create dataspace */
+ space = H5Screate_simple(1, dim, NULL);
+ CHECK(space, FAIL, "H5Screate_simple");
+
+ /* Create a dataset creation property list */
+ dcpl = H5Pcreate(H5P_DATASET_CREATE);
+ CHECK(dcpl, FAIL, "H5Pcreate");
+
+ /* Create and set chunk plist */
+ ret = H5Pset_chunk(dcpl, 1, chunk_dim);
+ CHECK(ret, FAIL, "H5Pset_chunk");
+ ret = H5Pset_deflate(dcpl, 9);
+ CHECK(ret, FAIL, "H5Pset_deflate");
+ ret = H5Pset_chunk_opts(dcpl, H5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS);
+ CHECK(ret, FAIL, "H5Pset_chunk_opts");
+
+ /* Create a file with (LATEST, LATEST) bounds, create a layout version 4
+ dataset, then close the file */
+
+ /* Set version bounds to (LATEST, LATEST) */
+ low = H5F_LIBVER_LATEST;
+ high = H5F_LIBVER_LATEST;
+ ret = H5Pset_libver_bounds(fapl, low, high);
+ CHECK(ret, FAIL, "H5Pset_libver_bounds");
+
+ /* Create the file */
+ file = H5Fcreate(VERBFNAME, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
+ CHECK(file, FAIL, "H5Fcreate");
+
+ /* Create dataset */
+ dset = H5Dcreate2(file, VERBDSNAME, H5T_NATIVE_INT, space, H5P_DEFAULT, dcpl, H5P_DEFAULT);
+ CHECK(dset, FAIL, "H5Dcreate2");
+
+ /* Close dataset and file */
+ ret = H5Dclose(dset);
+ CHECK(ret, FAIL, "H5Dclose");
+ ret = H5Fclose(file);
+ CHECK(ret, FAIL, "H5Fclose");
+
+ /* Attempt to open latest file with (earliest, v18), should fail */
+ ret = H5Pset_libver_bounds(fapl, H5F_LIBVER_EARLIEST, H5F_LIBVER_V18);
+ H5E_BEGIN_TRY {
+ file = H5Fopen(VERBFNAME, H5F_ACC_RDONLY, fapl);
+ } H5E_END_TRY;
+ VERIFY(file, FAIL, "Attempted to open latest file with earliest version");
+
+ /* Attempt to open latest file with (v18, v18), should fail */
+ ret = H5Pset_libver_bounds(fapl, H5F_LIBVER_V18, H5F_LIBVER_V18);
+ H5E_BEGIN_TRY {
+ file = H5Fopen(VERBFNAME, H5F_ACC_RDONLY, fapl);
+ } H5E_END_TRY;
+ VERIFY(file, FAIL, "Attempted to open latest file with v18 bounds");
+
+ /* Opening VERBFNAME in these combination should succeed.
+ For each low bound, verify that it is upgraded properly */
+ high = H5F_LIBVER_LATEST;
+ for (low = H5F_LIBVER_EARLIEST; low < H5F_LIBVER_NBOUNDS; low++)
+ {
+ H5F_libver_t new_low = H5F_LIBVER_EARLIEST;
+
+ /* Set version bounds for opening file */
+ ret = H5Pset_libver_bounds(fapl, low, high);
+ CHECK(ret, FAIL, "H5Pset_libver_bounds");
+
+ /* Open the file */
+ file = H5Fopen(VERBFNAME, H5F_ACC_RDONLY, fapl);
+ CHECK(file, FAIL, "H5Fopen");
+
+ /* Get the new file access property */
+ new_fapl = H5Fget_access_plist(file);
+ CHECK(new_fapl, FAIL, "H5Fget_access_plist");
+
+ /* Get new low bound and verify that it has been upgraded properly */
+ ret = H5Pget_libver_bounds(new_fapl, &new_low, NULL);
+ CHECK(ret, FAIL, "H5Pget_libver_bounds");
+ VERIFY(new_low, H5F_LIBVER_LATEST, "Low bound should be upgraded to H5F_LIBVER_LATEST");
+
+ ret = H5Pclose(new_fapl);
+ CHECK(ret, FAIL, "H5Pclose");
+ ret = H5Fclose(file);
+ CHECK(ret, FAIL, "H5Fclose");
+ } /* for low */
+
+ /* Close dataspace and property lists */
+ ret = H5Sclose(space);
+ CHECK(ret, FAIL, "H5Sclose");
+ ret = H5Pclose(dcpl);
+ CHECK(ret, FAIL, "H5Pclose");
+ ret = H5Pclose(fapl);
+ CHECK(ret, FAIL, "H5Pclose");
+} /* end test_libver_bounds_open() */
+
+
/****************************************************************
**
** test_libver_bounds():
@@ -4920,20 +5098,1732 @@ test_libver_bounds(void)
/* Run the tests */
test_libver_bounds_real(H5F_LIBVER_EARLIEST, 1, H5F_LIBVER_LATEST, 2);
test_libver_bounds_real(H5F_LIBVER_LATEST, 2, H5F_LIBVER_EARLIEST, 2);
+ test_libver_bounds_open();
} /* end test_libver_bounds() */
+/**************************************************************************************
+**
+** test_libver_bounds_low_high():
+** Tests to verify that format versions are correct with the following five
+** pairs of low/high version bounds set in fapl via H5Pset_libver_bounds():
+** (1) (earliest, v18)
+** (2) (earliest, v110)
+** (3) (v18, v18)
+** (4) (v18, v110)
+** (5) (v110, v110)
+**
+** For each pair of setting in fapl, verify format versions with the following
+** six tests:
+** (1) test_libver_bounds_super(fapl): superblock versions
+** (2) test_libver_bounds_obj(fapl): object header versions
+** (3) test_libver_bounds_dataset(fapl): message versions associated with dataset
+** (4) test_libver_bounds_dataspace(fapl): dataspace message versions
+** (5) test_libver_bounds_datatype(fapl): datatype message versions
+** (6) test_libver_bounds_attributes(fapl): attribute message versions
+**
+**************************************************************************************/
+static void
+test_libver_bounds_low_high(void)
+{
+ hid_t fapl = -1; /* File access property list */
+ H5F_libver_t low, high; /* Low and high bounds */
+ herr_t ret; /* The return value */
+
+ /* Output message about test being performed */
+ MESSAGE(5, ("Testing setting (low, high) format version bounds\n"));
+
+ /* Create a file access property list */
+ fapl = H5Pcreate(H5P_FILE_ACCESS);
+ CHECK(fapl, FAIL, "H5Pcreate");
+
+ /* Loop through all the combinations of low/high version bounds */
+ for(low = H5F_LIBVER_EARLIEST; low < H5F_LIBVER_NBOUNDS; low++)
+ for(high = H5F_LIBVER_EARLIEST; high < H5F_LIBVER_NBOUNDS; high++) {
+
+ H5E_BEGIN_TRY {
+ /* Set the low/high version bounds */
+ ret = H5Pset_libver_bounds(fapl, low, high);
+ } H5E_END_TRY;
+
+ /* Should fail: invalid combinations */
+ if(high == H5F_LIBVER_EARLIEST) {
+ VERIFY(ret, FAIL, "H5Pset_libver_bounds");
+ continue;
+ }
+
+ /* Should fail: invalid combinations */
+ if(high < low) {
+ VERIFY(ret, FAIL, "H5Pset_libver_bounds");
+ continue;
+ }
+
+ /* All other combinations are valid and should succeed */
+ VERIFY(ret, SUCCEED, "H5Pset_libver_bounds");
+
+ /* Tests to verify version bounds */
+ test_libver_bounds_super(fapl);
+ test_libver_bounds_obj(fapl);
+ test_libver_bounds_dataset(fapl);
+ test_libver_bounds_dataspace(fapl);
+ test_libver_bounds_datatype(fapl);
+ test_libver_bounds_attributes(fapl);
+ }
+
+ ret = H5Pclose(fapl);
+ CHECK(ret, FAIL, "H5Pclose");
+
+} /* end test_libver_bounds_low_high() */
+
+
+/***********************************************************************
+**
+** test_libver_bounds_super():
+** Verify superblock version with the following two tests:
+** (1) test_libver_bounds_super_create():
+** --when creating a file with the input fapl and the fcpl
+** that has the following feature enabled:
+** (A) default fcpl
+** (B) fcpl with v1-btee K value enabled
+** (C) fcpl with shared messages enabled
+** (D) fcpl with persistent free-space manager enabled
+**
+** (2) test_libver_bounds_super_open():
+** --when opening a file which is created with the input fapl
+** and the fcpl setting as #A to #D above.
+**
+** These two tests are run with or without SWMR file access.
+**
+*************************************************************************/
+static void
+test_libver_bounds_super(hid_t fapl)
+{
+ hid_t fcpl = -1; /* File creation property list */
+ herr_t ret; /* The return value */
+
+ /* Create a default fcpl: #A */
+ /* This will result in superblock version 0 */
+ fcpl = H5Pcreate(H5P_FILE_CREATE);
+ CHECK(fcpl, FAIL, "H5Pcreate");
+
+ /* Verify superblock version when creating a file with input fapl,
+ fcpl #A and with/without SWMR access */
+ test_libver_bounds_super_create(fapl, fcpl, TRUE);
+ test_libver_bounds_super_create(fapl, fcpl, FALSE);
+
+ /* Verify superblock version when opening a file which is created
+ with input fapl, fcpl #A and with/without SWMR access */
+ test_libver_bounds_super_open(fapl, fcpl, TRUE);
+ test_libver_bounds_super_open(fapl, fcpl, FALSE);
+
+ /* Close the fcpl */
+ ret = H5Pclose(fcpl);
+ CHECK(ret, FAIL, "H5Pclose");
+
+ /* Create a fcpl with v1-btree K value enabled: #B */
+ /* This will result in superblock version 1 */
+ fcpl = H5Pcreate(H5P_FILE_CREATE);
+ CHECK(fcpl, FAIL, "H5Pcreate");
+ ret = H5Pset_istore_k(fcpl, 64);
+ CHECK(ret, FAIL, "H5Pset_istore_k");
+
+ /* Verify superblock version when creating a file with input fapl,
+ fcpl #B and with/without SWMR access */
+ test_libver_bounds_super_create(fapl, fcpl, TRUE);
+ test_libver_bounds_super_create(fapl, fcpl, FALSE);
+
+ /* Verify superblock version when opening a file which is created
+ with input fapl, fcpl #B and with/without SWMR access */
+ test_libver_bounds_super_open(fapl, fcpl, TRUE);
+ test_libver_bounds_super_open(fapl, fcpl, FALSE);
+
+ /* Close the fcpl */
+ ret = H5Pclose(fcpl);
+ CHECK(ret, FAIL, "H5Pclose");
+
+ /* Create a fcpl with shared messages enabled: #C */
+ /* This will result in superblock version 2 */
+ fcpl = H5Pcreate(H5P_FILE_CREATE);
+ CHECK(fcpl, FAIL, "H5Pcreate");
+ ret = H5Pset_shared_mesg_nindexes(fcpl, 1);
+ CHECK(ret, FAIL, "H5Pset_shared_mesg_nindexes");
+ ret = H5Pset_shared_mesg_index(fcpl, 0, H5O_SHMESG_ATTR_FLAG, 2);
+ CHECK(ret, FAIL, "H5Pset_shared_mesg_index");
+
+ /* Verify superblock version when creating a file with input fapl,
+ fcpl #C and with/without SWMR access */
+ test_libver_bounds_super_create(fapl, fcpl, TRUE);
+ test_libver_bounds_super_create(fapl, fcpl, FALSE);
+
+ /* Verify superblock version when opening a file which is created
+ with input fapl, fcpl #C and with/without SWMR access */
+ test_libver_bounds_super_open(fapl, fcpl, TRUE);
+ test_libver_bounds_super_open(fapl, fcpl, FALSE);
+
+ /* Close the fcpl */
+ ret = H5Pclose(fcpl);
+ CHECK(ret, FAIL, "H5Pclose");
+
+ /* Create a fcpl with persistent free-space manager enabled: #D */
+ /* This will result in superblock version 2 */
+ fcpl = H5Pcreate(H5P_FILE_CREATE);
+ CHECK(fcpl, FAIL, "H5Pcreate");
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, 1, (hsize_t)1);
+ CHECK(ret, FAIL, "H5Pset_file_space");
+
+ /* Verify superblock version when creating a file with input fapl,
+ fcpl #D and with/without SWMR access */
+ test_libver_bounds_super_create(fapl, fcpl, TRUE);
+ test_libver_bounds_super_create(fapl, fcpl, FALSE);
+
+ /* Verify superblock version when opening a file which is created
+ with input fapl, fcpl #D and with/without SWMR access */
+ test_libver_bounds_super_open(fapl, fcpl, TRUE);
+ test_libver_bounds_super_open(fapl, fcpl, FALSE);
+
+ /* Close the fcpl */
+ ret = H5Pclose(fcpl);
+ CHECK(ret, FAIL, "H5Pclose");
+
+} /* end test_libver_bounds_super() */
+
+
+/**************************************************************************************************
+**
+** test_libver_bounds_super_create():
+** Verify the following when the file is created with the input fapl, fcpl, and
+** with/without SWMR access:
+** (a) the superblock version #
+** (b) the file's low bound setting
+** (c) fail or succeed in creating the file
+**
+** For file creation, the bounds setting in fapl, the feature enabled in fcpl,
+** and with/without SWMR file access will determine the results for #a to #c.
+**
+** The first row for the following two tables is the 5 pairs of low/high bounds setting
+** in the input fapl. The next three rows list the expected results for #a to #c.
+** "-->" indicates "upgrade to"
+**
+** Creating a file with write access
+** --------------------------------------------------------------------------------
+** | (earliest, v18) | (earliest, v110) | (v18, v18) | (v18, v110) | (v110, v110) |
+** |______________________________________________________________________________|
+** Superblock version | vers 0, 1, 2 | vers 0, 1, 2 | vers 2 | vers 2 | vers 3 |
+** |------------------------------------------------------------------------------|
+** File's low bound | no change |
+** |------------------------------------------------------------------------------|
+** File creation | succeed |
+** |______________________________________________________________________________|
+**
+** Creating a file with SWMR-write access
+** --------------------------------------------------------------------------------
+** | (earliest, v18) | (earliest, v110) | (v18, v18) | (v18, v110) | (v110, v110) |
+** |______________________________________________________________________________|
+** Superblock version | -- | vers 3 | -- | vers 3 | vers 3 |
+** |------------------------------------------------------------------------------|
+** File's low bound | -- | ->v110 | -- | ->v110 | no change |
+** |------------------------------------------------------------------------------|
+** File creation | fail | succeed | fail | succeed | succed |
+** |______________________________________________________________________________|
+**
+******************************************************************************************************/
+static void
+test_libver_bounds_super_create(hid_t fapl, hid_t fcpl, htri_t is_swmr)
+{
+ hid_t fid = -1; /* File ID */
+ H5F_t *f = NULL; /* Internal file pointer */
+ H5F_libver_t low, high; /* Low and high bounds */
+ hbool_t ok; /* The result is ok or not */
+ herr_t ret; /* The return value */
+
+ /* Try to create the file */
+ H5E_BEGIN_TRY {
+ fid = H5Fcreate(FILE8, H5F_ACC_TRUNC | (is_swmr ? H5F_ACC_SWMR_WRITE : 0), fcpl, fapl);
+ } H5E_END_TRY;
+
+ /* Get the internal file pointer if the create succeeds */
+ if((ok = fid >= 0)) {
+ f = (H5F_t *)H5I_object(fid);
+ CHECK(f, NULL, "H5I_object");
+ }
+
+ /* Retrieve the low/high bounds */
+ ret = H5Pget_libver_bounds(fapl, &low, &high);
+ CHECK(ret, FAIL, "H5Pget_libver_bounds");
+
+ if(is_swmr) { /* SWMR is enabled */
+
+ if(high == H5F_LIBVER_LATEST) { /* Should succeed */
+ VERIFY(ok, TRUE, "H5Fcreate");
+ VERIFY(HDF5_SUPERBLOCK_VERSION_3, f->shared->sblock->super_vers, "HDF5_superblock_ver_bounds");
+ VERIFY(H5F_LIBVER_V110, f->shared->low_bound, "HDF5_superblock_ver_bounds");
+
+ } else /* Should fail */
+ VERIFY(ok, FALSE, "H5Fcreate");
+
+ } else { /* Should succeed */
+ VERIFY(ok, TRUE, "H5Fcreate");
+ VERIFY(low, f->shared->low_bound, "HDF5_superblock_ver_bounds");
+
+ switch(low) {
+ case H5F_LIBVER_EARLIEST:
+ ok = (f->shared->sblock->super_vers == 0 ||
+ f->shared->sblock->super_vers == 1 ||
+ f->shared->sblock->super_vers == 2);
+ VERIFY(ok, TRUE, "HDF5_superblock_ver_bounds");
+ break;
+
+ case H5F_LIBVER_V18:
+ ok = (f->shared->sblock->super_vers == 2);
+ VERIFY(ok, TRUE, "HDF5_superblock_ver_bounds");
+ break;
+
+ case H5F_LIBVER_V110:
+ ok = (f->shared->sblock->super_vers == 3);
+ VERIFY(ok, TRUE, "HDF5_superblock_ver_bounds");
+ break;
+
+ case H5F_LIBVER_ERROR:
+ case H5F_LIBVER_NBOUNDS:
+ default:
+ ERROR("H5Pget_libver_bounds");
+
+ } /* end switch */
+ }
+
+ if(ok) { /* Close the file */
+ ret = H5Fclose(fid);
+ CHECK(ret, FAIL, "H5Fclose");
+ }
+
+} /* end test_libver_bounds_super_create() */
+
+/**************************************************************************************************
+**
+** test_libver_bounds_super_open():
+** Verify the following when opening a file which is created with the input fapl, fcpl,
+** and with/without SWMR access:
+** (a) the file's low bound setting
+** (b) fail or succeed in opening the file
+**
+** (1) Create a file with the input fapl, fcpl and with/without SWMR access
+** (2) Close the file
+** (3) Reopen the file with a new fapl that is set to the 5 pairs of low/high bounds
+** in a for loop. For each pair of setting in the new fapl:
+** --Verify the expected results for #a and #b above.
+** --Close the file.
+**
+** For file open, the file's superblock version, the low/high bounds setting in fapl,
+** and with/without SWMR file access will determine the results for #a and #b.
+**
+** The first row for the following tables is the 5 pairs of low/high bounds setting
+** in the input fapl. The next two rows list the expected results for #a and #b.
+** "-->" indicates "upgrade to"
+**
+** Opening a file with write access
+**
+** Superblock version 0, 1
+** --------------------------------------------------------------------------------
+** | (earliest, v18) | (earliest, v110) | (v18, v18) | (v18, v110) | (v110, v110) |
+** |______________________________________________________________________________|
+** File's low bound | no change |
+** |------------------------------------------------------------------------------|
+** File open | succeed |
+** |______________________________________________________________________________|
+**
+**
+** Superblock version 2
+** --------------------------------------------------------------------------------
+** | (earliest, v18) | (earliest, v110) | (v18, v18) | (v18, v110) | (v110, v110) |
+** |______________________________________________________________________________|
+** File's low bound | -->v18 | no change |
+** |------------------------------------------------------------------------------|
+** File open | succeed |
+** |______________________________________________________________________________|
+**
+** Superblock version 3
+** --------------------------------------------------------------------------------
+** | (earliest, v18) | (earliest, v110) | (v18, v18) | (v18, v110) | (v110, v110) |
+** |______________________________________________________________________________|
+** File's low bound | -- | -->v110 | -- | -->v110 | no change |
+** |------------------------------------------------------------------------------|
+** File open | fail | succeed | fail | succeed | succeed |
+** |______________________________________________________________________________|
+**
+**
+**
+** Opening a file with SWMR-write access
+**
+** Superblock version 0, 1, 2
+** -------------------------------------------------------------------------------
+** | (earliest, v18) | (earliest, v10) | (v18, v18) | (v18, v110) | (v110, v110) |
+** |_____________________________________________________________________________|
+** File's low bound | ----
+** |-----------------------------------------------------------------------------|
+** File open | fail
+** |_____________________________________________________________________________|
+**
+**
+** Superblock version 3
+** -------------------------------------------------------------------------------
+** | (earliest, v18) | (earliest, v10) | (v18, v18) | (v18, v110) | (v110, v110) |
+** |_____________________________________________________________________________|
+** File's low bound | -- | -->v110 | -- | -->v110 | no change |
+** |-----------------------------------------------------------------------------|
+** File open | fail | succeed | fail | succeed | succeed |
+** |_____________________________________________________________________________|
+**
+**
+******************************************************************************************************/
+static void
+test_libver_bounds_super_open(hid_t fapl, hid_t fcpl, htri_t is_swmr)
+{
+ hid_t fid = -1; /* File ID */
+ H5F_t *f = NULL; /* Internal file pointer */
+ hid_t new_fapl = -1; /* File access property list */
+ unsigned super_vers; /* Superblock version */
+ H5F_libver_t low, high; /* Low and high bounds */
+ hbool_t ok; /* The result is ok or not */
+ herr_t ret; /* Return value */
+
+ /* Create the file with the input fcpl and fapl */
+ fid = H5Fcreate(FILE8, H5F_ACC_TRUNC, fcpl, fapl);
+ CHECK(fid, FAIL, "H5Fcreate");
+
+ /* Get the internal file pointer */
+ f = (H5F_t *)H5I_object(fid);
+ CHECK(f, NULL, "H5I_object");
+
+ /* The file's superblock version */
+ super_vers = f->shared->sblock->super_vers;
+
+ /* Close the file */
+ ret = H5Fclose(fid);
+ CHECK(ret, FAIL, "H5Fclose");
+
+ /* Create a default file access property list */
+ new_fapl = H5Pcreate(H5P_FILE_ACCESS);
+ CHECK(new_fapl, FAIL, "H5Pcreate");
+
+ /* Loop through all the combinations of low/high bounds in new_fapl */
+ for(low = H5F_LIBVER_EARLIEST; low < H5F_LIBVER_NBOUNDS; low++) {
+ for(high = H5F_LIBVER_EARLIEST; high < H5F_LIBVER_NBOUNDS; high++) {
+ H5E_BEGIN_TRY {
+ ret = H5Pset_libver_bounds(new_fapl, low, high);
+ } H5E_END_TRY;
+
+ /* Invalid combinations */
+ if (ret < 0)
+ continue;
+
+ /* Open the file with or without SWMR access */
+ H5E_BEGIN_TRY {
+ fid = H5Fopen(FILE8, H5F_ACC_RDWR | (is_swmr ? H5F_ACC_SWMR_WRITE : 0), new_fapl);
+ } H5E_END_TRY;
+
+ /* Get the internal file pointer if the open succeeds */
+ if((ok = fid >= 0)) {
+ f = (H5F_t *)H5I_object(fid);
+ CHECK(f, NULL, "H5I_object");
+ }
+
+ /* Verify the file open succeeds or fails */
+ switch(super_vers) {
+ case 3:
+ if(high == H5F_LIBVER_LATEST) {
+ /* Should succeed */
+ VERIFY(ok, TRUE, "H5Fopen");
+ VERIFY(H5F_LIBVER_V110, f->shared->low_bound, "HDF5_superblock_ver_bounds");
+
+ /* Close the file */
+ ret = H5Fclose(fid);
+ CHECK(ret, FAIL, "H5Fclose");
+ } else /* Should fail */
+ VERIFY(ok, FALSE, "H5Fopen");
+ break;
+
+ case 2:
+ if(is_swmr) /* Should fail */
+ VERIFY(ok, FALSE, "H5Fopen");
+ else { /* Should succeed */
+ VERIFY(ok, TRUE, "H5Fopen");
+
+ ok = f->shared->low_bound >= H5F_LIBVER_V18;
+ VERIFY(ok, TRUE, "HDF5_superblock_ver_bounds");
+
+ /* Close the file */
+ ret = H5Fclose(fid);
+ CHECK(ret, FAIL, "H5Fclose");
+ }
+ break;
+
+ case 1:
+ case 0:
+ if(is_swmr) /* Should fail */
+ VERIFY(ok, FALSE, "H5Fopen");
+ else { /* Should succeed */
+ VERIFY(ok, TRUE, "H5Fopen");
+ VERIFY(low, f->shared->low_bound, "HDF5_superblock_ver_bounds");
+
+ ret = H5Fclose(fid);
+ CHECK(ret, FAIL, "H5Fclose");
+ }
+ break;
+
+ default:
+ break;
+ } /* end switch */
+ } /* end for */
+ } /* end for */
+
+ /* Close the file access property list */
+ ret = H5Pclose(new_fapl);
+ CHECK(ret, FAIL, "H5Pclose");
+
+} /* end test_libver_bounds_super_open() */
+
+/****************************************************************
+**
+** test_libver_bounds_obj():
+** Verify object header versions:
+**
+** (a) Create a file with:
+** --the input fapl
+** --a fcpl that has shared message enabled
+** Verify the root group's object header version.
+** Close the file.
+**
+** (b) Create another file with:
+** --the input fapl
+** --a default fcpl
+** Verify the root group's object header version.
+** Close the file.
+**
+** (c) Reopen the same file in (b) with a new fapl.
+** The new fapl is set to the 5 pairs of low/high
+** bounds in a "for" loop. For each setting in fapl:
+** --Create a group in the file
+** --Verify the group's object header version
+** --Close and delete the group
+** --Close the file
+**
+****************************************************************/
+static void
+test_libver_bounds_obj(hid_t fapl)
+{
+ hid_t fid = -1; /* File ID */
+ hid_t gid = -1; /* Group ID */
+ hid_t fcpl = -1; /* File creation property list */
+ hid_t new_fapl = -1; /* File access property list */
+ H5F_t *f = NULL; /* Internal file pointer */
+ H5F_libver_t low, high; /* Low and high bounds */
+ H5O_info_t oinfo; /* Object info */
+ H5G_info_t ginfo; /* Group info */
+ herr_t ret; /* Return value */
+
+ /* Retrieve the low/high bounds from the input fapl */
+ ret = H5Pget_libver_bounds(fapl, &low, &high);
+ CHECK(ret, FAIL, "H5Pget_libver_bounds");
+
+ /* Create a default file creation property list */
+ fcpl = H5Pcreate(H5P_FILE_CREATE);
+ CHECK(fcpl, FAIL, "H5Pcreate");
+
+ /* Enable shared message in the fcpl */
+ /* This will result in a version 2 object header */
+ ret = H5Pset_shared_mesg_nindexes(fcpl, 1);
+ CHECK(ret, FAIL, "H5Pset_shared_mesg_nindexes");
+ ret = H5Pset_shared_mesg_index(fcpl, 0, H5O_SHMESG_ATTR_FLAG, 2);
+ CHECK(ret, FAIL, "H5Pset_shared_mesg_index");
+
+ /* Create the file with the fcpl and the input fapl */
+ fid = H5Fcreate(FILE8, H5F_ACC_TRUNC, fcpl, fapl);
+ CHECK(fid, FAIL, "H5Fcreate");
+
+ /* Get root group's object info */
+ ret = H5Oget_info_by_name(fid, "/", &oinfo, H5P_DEFAULT);
+ CHECK(ret, FAIL, "H5Oget_info_by_name");
+
+ /* Verify object header version is 2 because shared message is enabled */
+ VERIFY(oinfo.hdr.version, H5O_VERSION_2, "H5O_obj_ver_bounds");
+
+ /* Close the file */
+ ret = H5Fclose(fid);
+ CHECK(ret, FAIL, "H5Fclose");
+
+ /* Close the file creation property list */
+ ret = H5Pclose(fcpl);
+ CHECK(ret, FAIL, "H5Pclose");
+
+ /* Create a file with the default fcpl and input fapl */
+ fid = H5Fcreate(FILE8, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
+ CHECK(fid, FAIL, "H5Fcreate");
+
+ /* Get root group's object info */
+ ret = H5Oget_info_by_name(fid, "/", &oinfo, H5P_DEFAULT);
+ CHECK(ret, FAIL, "H5Oget_info_by_name");
+
+ /* Verify object header version is as indicated by low_bound */
+ VERIFY(oinfo.hdr.version, H5O_obj_ver_bounds[low], "H5O_obj_ver_bounds");
+
+ /* Close the file */
+ ret = H5Fclose(fid);
+ CHECK(ret, FAIL, "H5Fclose");
+
+ /* Create a new default file access property list which
+ is used to open the file in the "for" loop */
+ new_fapl = H5Pcreate(H5P_FILE_ACCESS);
+ CHECK(new_fapl, FAIL, "H5Pcreate");
+
+ /* Loop through all the combinations of low/high bounds in new_fapl */
+ /* Open the file with the fapl; create a group and verify the
+ object header version, then delete the group and close the file.*/
+ for(low = H5F_LIBVER_EARLIEST; low < H5F_LIBVER_NBOUNDS; low++) {
+ for(high = H5F_LIBVER_EARLIEST; high < H5F_LIBVER_NBOUNDS; high++) {
+ H5E_BEGIN_TRY {
+ ret = H5Pset_libver_bounds(new_fapl, low, high);
+ } H5E_END_TRY;
+
+ if (ret < 0) /* Invalid combinations */
+ continue;
+
+ /* Open the file */
+ H5E_BEGIN_TRY {
+ fid = H5Fopen(FILE8, H5F_ACC_RDWR, new_fapl);
+ } H5E_END_TRY;
+
+ if(fid >=0 ) { /* The file open succeeds */
+
+ /* Get the internal file pointer */
+ f = (H5F_t *)H5I_object(fid);
+ CHECK(f, NULL, "H5I_object");
+
+ /* Create a group in the file */
+ gid = H5Gcreate2(fid, GRP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(gid, FAIL, "H5Gcreate2");
+
+ /* Get group information */
+ ret = H5Gget_info(gid, &ginfo);
+ CHECK(ret, FAIL, "H5Gget_info");
+
+ /* Verify group storage type */
+ if(f->shared->low_bound >= H5F_LIBVER_V18)
+ /* Links in group are stored in object header */
+ VERIFY(ginfo.storage_type, H5G_STORAGE_TYPE_COMPACT, "H5Gget_info");
+ else
+ /* Links in group are stored with a "symbol table" */
+ VERIFY(ginfo.storage_type, H5G_STORAGE_TYPE_SYMBOL_TABLE, "H5Gget_info");
+
+ /* Get object header information */
+ ret = H5Oget_info_by_name(gid, GRP_NAME, &oinfo, H5P_DEFAULT);
+ CHECK(ret, FAIL, "H5Oget_info_by_name");
+
+ /* Verify object header version as indicated by low_bound */
+ VERIFY(oinfo.hdr.version, H5O_obj_ver_bounds[f->shared->low_bound], "H5O_obj_ver_bounds");
+
+ /* Close the group */
+ ret = H5Gclose(gid);
+ CHECK(ret, FAIL, "H5Gclose");
+
+ /* Delete the group */
+ ret = H5Ldelete(fid, GRP_NAME, H5P_DEFAULT);
+ CHECK(ret, FAIL, "H5Ldelete");
+
+ /* Close the file */
+ ret = H5Fclose(fid);
+ CHECK(ret, FAIL, "H5Fclose");
+
+ } /* end if */
+ } /* end for */
+ } /* end for */
+
+ /* Close the file access property list */
+ ret = H5Pclose(new_fapl);
+ CHECK(ret, FAIL, "H5Pclose");
+
+} /* end test_libver_bounds_obj() */
+
+/****************************************************************
+**
+** test_libver_bounds_dataset():
+** Verify message versions associated with datasets:
+**
+** (a) Create a file with default fcpl and the input fapl.
+** Create the following two datasets:
+** --A contiguous dataset
+** --A chunked dataset with "no filter edge chunks"
+** For both datasets, verify the versions for the layout,
+** fill value and filter pipeline messages.
+** Close the file.
+**
+** (b) Create a new fapl that is set to the 5 pairs of low/high
+** bounds in a "for" loop. For each pair of setting in the
+** new fapl:
+** --Open the same file in (a) with the fapl
+** --Create a chunked dataset with 2 unlimited
+** dimensions
+** --Verify the versions for the layout, fill value
+** and filter pipeline messages
+** --Close and delete the dataset
+** --Close the file
+**
+****************************************************************/
+static void
+test_libver_bounds_dataset(hid_t fapl)
+{
+ hid_t fid = -1; /* File ID */
+ hid_t new_fapl = -1; /* File access property list */
+ hid_t did = -1; /* Dataset ID */
+ hid_t sid = -1; /* Dataspace ID */
+ hid_t dcpl = -1; /* Dataset creation property list */
+ H5D_t *dset = NULL; /* Internal dataset pointer */
+ H5F_t *f = NULL; /* Internal file pointer */
+ H5F_libver_t low, high; /* Low and high bounds */
+ herr_t ret; /* Return value */
+ hsize_t fix_dims2[2] = {10, 4}; /* Dimension sizes */
+ hsize_t fix_chunks2[2] = {4, 3}; /* Chunk dimension sizes */
+ hsize_t dims2[2] = {1, 4}; /* Dimension sizes */
+ hsize_t max_dims2[2] = {H5S_UNLIMITED, H5S_UNLIMITED}; /* Maximum dimension sizes */
+ hsize_t chunks2[2] = {4, 5}; /* Chunk dimension sizes */
+
+ /* Retrieve the low/high bounds from the input fapl */
+ ret = H5Pget_libver_bounds(fapl, &low, &high);
+ CHECK(ret, FAIL, "H5Pget_libver_bounds");
+
+ /* Create the file with the input fapl */
+ fid = H5Fcreate(FILE8, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
+ CHECK(fid, FAIL, "H5Fcreate");
+
+ /* Create the dataspace */
+ sid = H5Screate(H5S_SCALAR);
+ CHECK(sid, FAIL, "H5Screate");
+
+ /* Create a contiguous dataset */
+ did = H5Dcreate2(fid, DSETA, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(did, FAIL, "H5Dcreate");
+
+ /* Get the internal dataset pointer */
+ dset = (H5D_t *)H5I_object(did);
+ CHECK(dset, NULL, "H5I_object");
+
+ /* Verify version for layout and fill value messages */
+ if(low == H5F_LIBVER_EARLIEST) {
+ /* For layout message: the earliest version the library will set is 3 */
+ /* For fill value message: the earliest version the library will set is 2 */
+ VERIFY(dset->shared->layout.version, H5O_LAYOUT_VERSION_DEFAULT, "H5O_layout_ver_bounds");
+ VERIFY(dset->shared->dcpl_cache.fill.version, H5O_FILL_VERSION_2, "H5O_fill_ver_bounds");
+ } else {
+ VERIFY(dset->shared->layout.version, H5O_layout_ver_bounds[low], "H5O_layout_ver_bounds");
+ VERIFY(dset->shared->dcpl_cache.fill.version, H5O_fill_ver_bounds[low], "H5O_fill_ver_bounds");
+ }
+
+ /* Verify filter pipleline message version */
+ VERIFY(dset->shared->dcpl_cache.pline.version, H5O_pline_ver_bounds[low], "H5O_pline_ver_bounds");
+
+ /* Close the dataset */
+ ret = H5Dclose(did);
+ CHECK(ret, FAIL, "H5Dclose");
+
+ /* Close the dataspace */
+ ret = H5Sclose(sid);
+ CHECK(ret, FAIL, "H5Sclose");
+
+ /* Set up dataspace and dcpl for creating a chunked dataset
+ with "no filter edge chunks" enabled.
+ This will result in a version 4 layout message */
+ sid = H5Screate_simple(2, fix_dims2, NULL);
+ CHECK(sid, FAIL, "H5Screate_simple");
+ dcpl = H5Pcreate(H5P_DATASET_CREATE);
+ CHECK(dcpl, FAIL, "H5Pcreate");
+ ret = H5Pset_chunk(dcpl, 2, fix_chunks2);
+ CHECK(ret, FAIL, "H5Pset_chunk");
+ ret = H5Pset_chunk_opts(dcpl, H5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS);
+ CHECK(ret, FAIL, "H5Pset_chunk_opts");
+
+ /* Create the chunked dataset */
+ H5E_BEGIN_TRY {
+ did = H5Dcreate2(fid, DSETB, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT);
+ } H5E_END_TRY;
+
+ if(did >= 0) {
+
+ /* Get the internal dataset pointer */
+ dset = (H5D_t *)H5I_object(did);
+ CHECK(dset, NULL, "H5I_object");
+
+ /* Verify layout message version and chunk indexing type */
+ VERIFY(dset->shared->layout.version, H5O_LAYOUT_VERSION_4, "H5O_layout_ver_bounds");
+ VERIFY(dset->shared->layout.u.chunk.idx_type, H5D_CHUNK_IDX_FARRAY, "chunk_index_type");
+
+ /* Close the dataset */
+ ret = H5Dclose(did);
+ CHECK(ret, FAIL, "H5Dclose");
+ }
+
+ /* Close the file */
+ ret = H5Fclose(fid);
+ CHECK(ret, FAIL, "H5Fclose");
+
+ /* Close the dataspace */
+ ret = H5Sclose(sid);
+ CHECK(ret, FAIL, "H5Sclose");
+
+ /* Close the datset creation property list */
+ ret = H5Pclose(dcpl);
+ CHECK(ret, FAIL, "H5Pclose");
+
+ /* Create a default file access property list which is used
+ to open the file in the 'for' loop */
+ new_fapl = H5Pcreate(H5P_FILE_ACCESS);
+ CHECK(new_fapl, FAIL, "H5Pcreate");
+
+ /* Set up dataspace and dcpl for creating a chunked dataset with
+ 2 unlimited dimensions in the 'for' loop */
+ sid = H5Screate_simple(2, dims2, max_dims2);
+ CHECK(sid, FAIL, "H5Screate_simple");
+ dcpl = H5Pcreate(H5P_DATASET_CREATE);
+ CHECK(dcpl, FAIL, "H5Pcreate");
+ ret = H5Pset_chunk(dcpl, 2, chunks2);
+ CHECK(ret, FAIL, "H5Pset_chunk");
+
+ /* Loop through all the combinations of low/high bounds in new_fapl */
+ /* Open the file with the fapl and create the chunked dataset */
+ /* Verify the dataset's layout, fill value and filter pipleline message versions */
+ for(low = H5F_LIBVER_EARLIEST; low < H5F_LIBVER_NBOUNDS; low++) {
+ for(high = H5F_LIBVER_EARLIEST; high < H5F_LIBVER_NBOUNDS; high++) {
+ H5E_BEGIN_TRY {
+ ret = H5Pset_libver_bounds(new_fapl, low, high);
+ } H5E_END_TRY;
+
+ if (ret < 0) /* Invalid low/high combinations */
+ continue;
+
+ /* Open the file */
+ H5E_BEGIN_TRY {
+ fid = H5Fopen(FILE8, H5F_ACC_RDWR, new_fapl);
+ } H5E_END_TRY;
+
+ if(fid >=0 ) { /* The file open succeeds */
+
+ /* Get the internal file pointer */
+ f = (H5F_t *)H5I_object(fid);
+ CHECK(f, NULL, "H5I_object");
+
+ /* Create the chunked dataset */
+ did = H5Dcreate2(fid, DSETC, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT);
+ CHECK(did, FAIL, "H5Dcreate2");
+
+ /* Get the internal file pointer */
+ dset = (H5D_t *)H5I_object(did);
+ CHECK(dset, NULL, "H5I_object");
+
+ /* Verify the dataset's layout, fill value and filter pipeline message versions */
+ /* Also verify the chunk indexing type */
+ if(f->shared->low_bound == H5F_LIBVER_EARLIEST) {
+ /* For layout message: the earliest version the library will set is 3 */
+ /* For fill value message: the earliest version the library will set is 2 */
+ VERIFY(dset->shared->layout.version, H5O_LAYOUT_VERSION_DEFAULT, "H5O_layout_ver_bounds");
+ VERIFY(dset->shared->dcpl_cache.fill.version, H5O_FILL_VERSION_2, "H5O_fill_ver_bounds");
+ } else {
+ VERIFY(dset->shared->layout.version, H5O_layout_ver_bounds[f->shared->low_bound], "H5O_layout_ver_bounds");
+ VERIFY(dset->shared->dcpl_cache.fill.version, H5O_fill_ver_bounds[f->shared->low_bound], "H5O_fill_ver_bounds");
+ }
+
+ /* Verify the filter pipeline message version */
+ VERIFY(dset->shared->dcpl_cache.pline.version, H5O_pline_ver_bounds[f->shared->low_bound], "H5O_pline_ver_bounds");
+
+ /* Verify the dataset's chunk indexing type */
+ if(dset->shared->layout.version == H5O_LAYOUT_VERSION_LATEST)
+ VERIFY(dset->shared->layout.u.chunk.idx_type, H5D_CHUNK_IDX_BT2, "chunk_index_type");
+ else
+ VERIFY(dset->shared->layout.u.chunk.idx_type, H5D_CHUNK_IDX_BTREE, "chunk_index_type");
+
+ /* Close the dataset */
+ ret = H5Dclose(did);
+ CHECK(ret, FAIL, "H5Dclose");
+
+ /* Delete the dataset */
+ ret = H5Ldelete(fid, DSETC, H5P_DEFAULT);
+ CHECK(ret, FAIL, "H5Ldelete");
+
+ /* Close the file */
+ ret = H5Fclose(fid);
+ CHECK(ret, FAIL, "H5Fclose");
+
+ } /* end if */
+ } /* end for */
+ } /* end for */
+
+ /* Close the file access property list */
+ ret = H5Pclose(new_fapl);
+ CHECK(ret, FAIL, "H5Pclose");
+
+ /* Close the dataspace */
+ ret = H5Sclose(sid);
+ CHECK(ret, FAIL, "H5Sclose");
+
+ /* Close the dataset creation property list */
+ ret = H5Pclose(dcpl);
+ CHECK(ret, FAIL, "H5Pclose");
+
+} /* end test_libver_bounds_dataset() */
+
+/****************************************************************
+**
+** test_libver_bounds_dataspace():
+** Verify dataspace message versions:
+**
+** (a) Create a file with default fcpl and the input fapl.
+** Create the following two datasets:
+** --A dataset with scalar dataspace
+** --A dataset with null dataspace
+** For both datasets, verify the dataspace message versions.
+** Close the file.
+**
+** (b) Create a new fapl that is set to the 5 pairs of low/high
+** bounds in a "for" loop. For each pair of setting in the
+** new fapl:
+** --Open the same file in (a) with the fapl
+** --Create a chunked dataset, a compact dataset and
+** a contigous dataset
+** --Verify the dataspace message version for these
+** three datasets
+** --Delete the three datasets and the dataspaces
+** --Close the file
+**
+****************************************************************/
+static void
+test_libver_bounds_dataspace(hid_t fapl)
+{
+ hid_t fid = -1; /* File ID */
+ hid_t new_fapl = -1; /* File access property list */
+ hid_t did = -1, did_null = -1; /* Dataset IDs */
+ hid_t did_compact = -1, did_contig = -1; /* Dataset IDs */
+ hid_t sid = -1, sid_null = -1; /* Dataspace IDs */
+ hid_t sid_compact = -1, sid_contig = -1; /* Dataspace IDs */
+ hid_t dcpl = -1; /* Dataset creation property list */
+ hid_t dcpl_compact = -1, dcpl_contig = -1; /* Dataset creation property lists */
+ H5S_t *space = NULL, *space_null = NULL; /* Internal dataspace pointers */
+ H5F_t *f = NULL; /* Internal file pointer */
+ H5F_libver_t low, high; /* Low and high bounds */
+ hsize_t dims[1] = {1}; /* Dimension sizes */
+ hsize_t dims2[2] = {5, 4}; /* Dimension sizes */
+ hsize_t max_dims[1] = {H5S_UNLIMITED}; /* Maximum dimension sizes */
+ hsize_t chunks[1] = {4}; /* Chunk dimension sizes */
+ herr_t ret; /* Return value */
+
+ /* Retrieve the low/high bounds from the input fapl */
+ ret = H5Pget_libver_bounds(fapl, &low, &high);
+ CHECK(ret, FAIL, "H5Pget_libver_bounds");
+
+ /* Create the file with the input fapl */
+ fid = H5Fcreate(FILE8, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
+ CHECK(fid, FAIL, "H5Fcreate");
+
+ /* Create scalar dataspace */
+ sid = H5Screate(H5S_SCALAR);
+ CHECK(sid, FAIL, "H5Screate");
+
+ /* Create a dataset with the scalar dataspace */
+ did = H5Dcreate2(fid, DSET, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(did, FAIL, "H5Dcreate");
+
+ /* Get the internal dataspace pointer */
+ sid = H5Dget_space(did);
+ CHECK(sid, FAIL, "H5Dget_space");
+ space = (H5S_t *)H5I_object(sid);
+ CHECK(space, NULL, "H5I_object");
+
+ /* Verify the dataspace version */
+ VERIFY(space->extent.version, H5O_sdspace_ver_bounds[low], "H5O_sdspace_ver_bounds");
+
+ /* Create null dataspace */
+ sid_null = H5Screate(H5S_NULL);
+ CHECK(sid_null, FAIL, "H5Screate");
+
+ /* Create a dataset with the null dataspace */
+ did_null = H5Dcreate2(fid, DSET_NULL, H5T_NATIVE_INT, sid_null, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(did_null, FAIL, "H5Dcreate");
+
+ /* Get the internal dataspace pointer */
+ sid_null = H5Dget_space(did_null);
+ CHECK(sid_null, FAIL, "H5Dget_space");
+ space_null = (H5S_t *)H5I_object(sid_null);
+ CHECK(space_null, NULL, "H5I_object");
+
+ /* Verify the dataspace version */
+ VERIFY(space_null->extent.version, H5O_SDSPACE_VERSION_2, "H5O_sdspace_ver_bounds");
+
+ /* Close the datasets */
+ ret = H5Dclose(did);
+ CHECK(ret, FAIL, "H5Dclose");
+ ret = H5Dclose(did_null);
+ CHECK(ret, FAIL, "H5Dclose");
+
+ /* Close the dataspaces */
+ ret = H5Sclose(sid);
+ CHECK(ret, FAIL, "H5Sclose");
+ ret = H5Sclose(sid_null);
+ CHECK(ret, FAIL, "H5Sclose");
+
+ /* Close the file */
+ ret = H5Fclose(fid);
+ CHECK(ret, FAIL, "H5Fclose");
+
+ /* Create a default file access property list which is used
+ to open the file in the 'for' loop */
+ new_fapl = H5Pcreate(H5P_FILE_ACCESS);
+ CHECK(new_fapl, FAIL, "H5Pcreate");
+
+ /* Set up dataspace and dcpl for creating a chunked dataset */
+ sid = H5Screate_simple(1, dims, max_dims);
+ CHECK(sid, FAIL, "H5Screate_simple");
+ dcpl = H5Pcreate(H5P_DATASET_CREATE);
+ CHECK(dcpl, FAIL, "H5Pcreate");
+ ret = H5Pset_chunk(dcpl, 1, chunks);
+ CHECK(ret, FAIL, "H5Pset_chunk");
+
+ /* Set up dataspace and dcpl for creating a compact dataset */
+ sid_compact = H5Screate_simple(1, dims, NULL);
+ CHECK(sid_compact, FAIL, "H5Screate_simple");
+ dcpl_compact = H5Pcreate(H5P_DATASET_CREATE);
+ CHECK(dcpl_compact, FAIL, "H5Pcreate");
+ ret = H5Pset_layout(dcpl_compact, H5D_COMPACT);
+ CHECK(ret, FAIL, "H5Pset_layout");
+
+ /* Set up dataspace and dcpl for creating a contiguous dataset */
+ sid_contig = H5Screate_simple(2, dims2, NULL);
+ CHECK(sid_contig, FAIL, "H5Screate_simple");
+ dcpl_contig = H5Pcreate(H5P_DATASET_CREATE);
+ CHECK(dcpl_contig, FAIL, "H5Pcreate");
+ ret = H5Pset_layout(dcpl_contig, H5D_CONTIGUOUS);
+ CHECK(ret, FAIL, "H5Pset_layout");
+
+ /* Loop through all the combinations of low/high bounds in new_fapl */
+ /* Open the file and create the chunked/compact/contiguous datasets */
+ /* Verify the dataspace message version for the three datasets */
+ for(low = H5F_LIBVER_EARLIEST; low < H5F_LIBVER_NBOUNDS; low++) {
+ for(high = H5F_LIBVER_EARLIEST; high < H5F_LIBVER_NBOUNDS; high++) {
+ hid_t tmp_sid, tmp_sid_compact, tmp_sid_contig; /* Dataspace IDs */
+ H5S_t *tmp_space, *tmp_space_compact, *tmp_space_contig; /* Internal dataspace pointers */
+
+ H5E_BEGIN_TRY {
+ ret = H5Pset_libver_bounds(new_fapl, low, high);
+ } H5E_END_TRY;
+
+ if (ret < 0) /* Invalid low/high combinations */
+ continue;
+
+ /* Open the file */
+ H5E_BEGIN_TRY {
+ fid = H5Fopen(FILE8, H5F_ACC_RDWR, new_fapl);
+ } H5E_END_TRY;
+
+ if(fid >=0 ) { /* The file open succeeds */
+
+ /* Get the internal file pointer */
+ f = (H5F_t *)H5I_object(fid);
+ CHECK(f, NULL, "H5I_object");
+
+ /* Create the chunked dataset */
+ did = H5Dcreate2(fid, DSETA, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT);
+ CHECK(did, FAIL, "H5Dcreate2");
+
+ /* Get the internal dataspace pointer for the chunked dataset */
+ tmp_sid = H5Dget_space(did);
+ CHECK(tmp_sid, FAIL, "H5Dget_space");
+ tmp_space = (H5S_t *)H5I_object(tmp_sid);
+ CHECK(tmp_space, NULL, "H5I_object");
+
+ /* Create the compact dataset */
+ did_compact = H5Dcreate2(fid, DSETB, H5T_NATIVE_INT, sid_compact, H5P_DEFAULT, dcpl_compact, H5P_DEFAULT);
+ CHECK(did_compact, FAIL, "H5Dcreate2");
+
+ /* Get the internal dataspace pointer for the compact dataset */
+ tmp_sid_compact = H5Dget_space(did_compact);
+ CHECK(tmp_sid_compact, FAIL, "H5Dget_space");
+ tmp_space_compact = (H5S_t *)H5I_object(tmp_sid_compact);
+ CHECK(tmp_space_compact, NULL, "H5I_object");
+
+ /* Create the contiguous dataset */
+ did_contig = H5Dcreate2(fid, DSETC, H5T_NATIVE_INT, sid_contig, H5P_DEFAULT, dcpl_contig, H5P_DEFAULT);
+ CHECK(did_contig, FAIL, "H5Dcreate2");
+
+ /* Get the internal dataspace pointer for the contiguous dataset */
+ tmp_sid_contig = H5Dget_space(did_contig);
+ CHECK(tmp_sid_contig, FAIL, "H5Dget_space");
+ tmp_space_contig = (H5S_t *)H5I_object(tmp_sid_contig);
+ CHECK(tmp_space_contig, NULL, "H5I_object");
+
+ /* Verify versions for the three dataspaces */
+ VERIFY(tmp_space->extent.version, H5O_sdspace_ver_bounds[f->shared->low_bound], "H5O_sdspace_ver_bounds");
+ VERIFY(tmp_space_compact->extent.version, H5O_sdspace_ver_bounds[f->shared->low_bound], "H5O_sdspace_ver_bounds");
+ VERIFY(tmp_space_contig->extent.version, H5O_sdspace_ver_bounds[f->shared->low_bound], "H5O_sdspace_ver_bounds");
+
+ /* Close the three datasets */
+ ret = H5Dclose(did);
+ CHECK(ret, FAIL, "H5Dclose");
+ ret = H5Dclose(did_compact);
+ CHECK(ret, FAIL, "H5Dclose");
+ ret = H5Dclose(did_contig);
+ CHECK(ret, FAIL, "H5Dclose");
+
+ /* Close the three dataspaces */
+ ret = H5Sclose(tmp_sid);
+ CHECK(ret, FAIL, "H5Sclose");
+ ret = H5Sclose(tmp_sid_compact);
+ CHECK(ret, FAIL, "H5Sclose");
+ ret = H5Sclose(tmp_sid_contig);
+ CHECK(ret, FAIL, "H5Sclose");
+
+ /* Delete the three datasets */
+ ret = H5Ldelete(fid, DSETA, H5P_DEFAULT);
+ CHECK(ret, FAIL, "H5Ldelete");
+ ret = H5Ldelete(fid, DSETB, H5P_DEFAULT);
+ CHECK(ret, FAIL, "H5Ldelete");
+ ret = H5Ldelete(fid, DSETC, H5P_DEFAULT);
+ CHECK(ret, FAIL, "H5Ldelete");
+
+ /* Close the file */
+ ret = H5Fclose(fid);
+ CHECK(ret, FAIL, "H5Fclose");
+
+ } /* end if */
+ } /* end for */
+ } /* end for */
+
+ /* Close the file access property list */
+ ret = H5Pclose(new_fapl);
+ CHECK(ret, FAIL, "H5Pclose");
+
+ /* Close the three dataspaces */
+ ret = H5Sclose(sid);
+ CHECK(ret, FAIL, "H5Sclose");
+ ret = H5Sclose(sid_compact);
+ CHECK(ret, FAIL, "H5Sclose");
+ ret = H5Sclose(sid_contig);
+ CHECK(ret, FAIL, "H5Sclose");
+
+ /* Close the three dataset creation property lists */
+ ret = H5Pclose(dcpl);
+ CHECK(ret, FAIL, "H5Pclose");
+ ret = H5Pclose(dcpl_compact);
+ CHECK(ret, FAIL, "H5Pclose");
+ ret = H5Pclose(dcpl_contig);
+ CHECK(ret, FAIL, "H5Pclose");
+
+} /* end test_libver_bounds_dataspace() */
+
+
+/****************************************************************
+**
+** test_libver_bounds_datatype():
+** Verify the datatype message version:
+**
+** (a) Create the following datatypes:
+** 1) integer
+** 2) enum
+** 3) array
+** 4) compound
+** 5) vlen
+** (b) Call test_libver_bounds_datatype_check() for each
+** datatype in (a) to verify the datatype message version.
+**
+****************************************************************/
+static void
+test_libver_bounds_datatype(hid_t fapl)
+{
+ hid_t tid = -1, tid_enum = -1, tid_array = -1; /* Datatype IDs */
+ hid_t tid_compound = -1, tid_vlen = -1; /* Datatype IDs */
+ int enum_value; /* Value for enum datatype */
+ typedef struct s1 { /* Data structure for compound datatype */
+ char c;
+ int i;
+ } s1;
+ hsize_t dims[1] = {1}; /* Dimension sizes */
+ herr_t ret; /* Return value */
+
+ /* Create integer datatype */
+ tid = H5Tcopy(H5T_NATIVE_INT);
+
+ /* Verify datatype message version */
+ test_libver_bounds_datatype_check(fapl, tid);
+
+ /* Create enum datatype */
+ tid_enum = H5Tenum_create(tid);
+ enum_value = 0;
+ H5Tenum_insert(tid_enum, "val1", &enum_value);
+ enum_value = 1;
+ H5Tenum_insert(tid_enum, "val2", &enum_value);
+
+ /* Verify datatype message version */
+ test_libver_bounds_datatype_check(fapl, tid_enum);
+
+ /* Create array datatype */
+ tid_array = H5Tarray_create2(tid, 1, dims);
+
+ /* Verify datatype message version */
+ test_libver_bounds_datatype_check(fapl, tid_array);
+
+ /* Create compound datatype */
+ tid_compound = H5Tcreate(H5T_COMPOUND, sizeof(s1));
+ H5Tinsert(tid_compound, "c", HOFFSET(s1, c), H5T_STD_U8LE);
+ H5Tinsert(tid_compound, "i", HOFFSET(s1, i), H5T_NATIVE_INT);
+
+ /* Verify datatype message version */
+ test_libver_bounds_datatype_check(fapl, tid_compound);
+
+ /* Create vlen datatype */
+ tid_vlen = H5Tvlen_create(tid);
+
+ /* Verify datatype message version */
+ test_libver_bounds_datatype_check(fapl, tid_vlen);
+
+ /* Close the datatypes */
+ ret = H5Tclose(tid);
+ CHECK(ret, FAIL, "H5Tclose");
+
+ ret = H5Tclose(tid_enum);
+ CHECK(ret, FAIL, "H5Tclose");
+
+ ret = H5Tclose(tid_array);
+ CHECK(ret, FAIL, "H5Tclose");
+
+ ret = H5Tclose(tid_compound);
+ CHECK(ret, FAIL, "H5Tclose");
+
+ ret = H5Tclose(tid_vlen);
+ CHECK(ret, FAIL, "H5Tclose");
+
+} /* end test_libver_bounds_datatype() */
+
+/****************************************************************
+**
+** test_libver_bounds_datatype_check():
+** Helper routine called by test_libver_bounds_datatype()
+** to verify the datatype message version for the input tid:
+**
+** (a) Create a file with default fcpl and the input fapl.
+** Create a contiguous dataset with the input tid.
+** Verify the datatype message version.
+** Create a committed datatype of string to be
+** used later.
+** Close the file.
+**
+** (b) Create a new fapl that is set to the 5 pairs of low/high
+** bounds in a "for" loop. For each pair of setting in
+** the new fapl:
+** --Open the same file in (a) with the fapl
+** --Verify the message version for the committed
+** datatype created earlier
+** --Create a chunked dataset with the input tid
+** --Verify the datatype message version
+** --Close and delete the dataset
+** --Close the file
+**
+****************************************************************/
+static void
+test_libver_bounds_datatype_check(hid_t fapl, hid_t tid)
+{
+ hid_t fid = -1; /* File ID */
+ hid_t new_fapl = -1; /* File acess property list */
+ hid_t dcpl = -1; /* Dataset creation property list */
+ hid_t dtid = -1; /* Datatype ID for the dataset */
+ hid_t str_tid = -1; /* String datatype ID */
+ hid_t did = -1; /* Dataset ID */
+ hid_t sid = -1; /* Dataspace ID */
+ hsize_t dims[1] = {1}; /* Dimension sizes */
+ hsize_t dims2[2] = {5, 4}; /* Dimension sizes */
+ hsize_t max_dims2[2] = {H5S_UNLIMITED, H5S_UNLIMITED}; /* Maximum dimension sizes */
+ hsize_t chunks[2] = {2, 3}; /* Chunk dimension sizes */
+ H5T_t *dtype = NULL; /* Internal datatype pointer */
+ H5T_t *str_dtype = NULL; /* Internal datatype pointer for the string datatype */
+ H5F_t *f = NULL; /* Internal file pointer */
+ H5F_libver_t low, high; /* Low and high bounds */
+ herr_t ret; /* Return value */
+
+ /* Retrieve the low/high version bounds from the input fapl */
+ ret = H5Pget_libver_bounds(fapl, &low, &high);
+ CHECK(ret, FAIL, "H5Pget_libver_bounds");
+
+ /* Create the file with the input fapl */
+ fid = H5Fcreate(FILE8, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
+ CHECK(fid, FAIL, "H5Fcreate");
+
+ /* Create a committed datatype of string which will be used
+ later inside the 'for' loop */
+ str_tid = H5Tcopy(H5T_C_S1);
+ CHECK(str_tid, FAIL, "H5Tcopy");
+ ret = H5Tset_size(str_tid, (size_t)10);
+ CHECK(ret, FAIL, "H5Tset_size");
+ ret = H5Tcommit2(fid, "datatype", str_tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(ret, FAIL, "H5Tcommit2");
+ ret = H5Tclose(str_tid);
+ CHECK(ret, FAIL, "H5Tclose");
+
+ /* Create dataspace */
+ sid = H5Screate_simple(1, dims, NULL);
+ CHECK(sid, FAIL, "H5Screate_simple");
+
+ /* Create a dataset with the input tid */
+ did = H5Dcreate2(fid, DSET1, tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(did, FAIL, "H5Dcreate2");
+
+ /* Get the dataset's datatype */
+ dtid = H5Dget_type(did);
+ CHECK(dtid, FAIL, "H5Dget_type");
+
+ /* Get the internal datatype pointer */
+ dtype = (H5T_t *)H5I_object(dtid);
+ CHECK(dtype, NULL, "H5I_object");
+
+ /* Verify the datatype message version */
+ /* H5T_COMPOUND, H5T_ENUM, H5T_ARRAY:
+ * --the library will set version according to low_bound
+ * --H5T_ARRAY: the earliest version the library will set is 2
+ * H5T_INTEGER, H5T_FLOAT, H5T_TIME, H5T_STRING, H5T_BITFIELD, H5T_OPAQUE, H5T_REFERENCE:
+ * --the library will only use basic version
+ */
+
+ if(dtype->shared->type == H5T_COMPOUND ||
+ dtype->shared->type == H5T_ENUM ||
+ dtype->shared->type == H5T_ARRAY) {
+ if(dtype->shared->type == H5T_ARRAY && low == H5F_LIBVER_EARLIEST)
+ VERIFY(dtype->shared->version, H5O_DTYPE_VERSION_2, "H5O_dtype_ver_bounds");
+ else
+ VERIFY(dtype->shared->version, H5O_dtype_ver_bounds[low], "H5O_dtype_ver_bounds");
+ } else
+ VERIFY(dtype->shared->version, H5O_dtype_ver_bounds[H5F_LIBVER_EARLIEST], "H5O_dtype_ver_bounds");
+
+ /* Close the dataset */
+ ret = H5Dclose(did);
+ CHECK(ret, FAIL, "H5Dclose");
+
+ /* Close the dataspace */
+ ret = H5Sclose(sid);
+ CHECK(ret, FAIL, "H5Dclose");
+
+ /* Close the datatype */
+ ret = H5Tclose(dtid);
+ CHECK(ret, FAIL, "H5Fclose");
+
+ /* Close the file */
+ ret = H5Fclose(fid);
+ CHECK(ret, FAIL, "H5Fclose");
+
+ /* Create a default file access property list */
+ new_fapl = H5Pcreate(H5P_FILE_ACCESS);
+ CHECK(new_fapl, FAIL, "H5Pcreate");
+
+ /* Set up dataspace and dcpl for creating a chunked dataset */
+ sid = H5Screate_simple(2, dims2, max_dims2);
+ CHECK(sid, FAIL, "H5Screate_simple");
+ dcpl = H5Pcreate(H5P_DATASET_CREATE);
+ CHECK(dcpl, FAIL, "H5Pcreate");
+ ret = H5Pset_chunk(dcpl, 2, chunks);
+ CHECK(ret, FAIL, "H5Pset_chunk");
+
+ /* Loop through all the combinations of low/high bounds */
+ /* Open the file and create the chunked dataset with the input tid */
+ /* Verify the dataset's datatype message version */
+ /* Also verify the committed atatype message version */
+ for(low = H5F_LIBVER_EARLIEST; low < H5F_LIBVER_NBOUNDS; low++) {
+ for(high = H5F_LIBVER_EARLIEST; high < H5F_LIBVER_NBOUNDS; high++) {
+ H5E_BEGIN_TRY {
+ ret = H5Pset_libver_bounds(new_fapl, low, high);
+ } H5E_END_TRY;
+
+ if (ret < 0) /* Invalid low/high combinations */
+ continue;
+
+ /* Open the file */
+ H5E_BEGIN_TRY {
+ fid = H5Fopen(FILE8, H5F_ACC_RDWR, new_fapl);
+ } H5E_END_TRY;
+
+ if(fid >= 0 ) { /* The file open succeeds */
+
+ /* Get the internal file pointer */
+ f = (H5F_t *)H5I_object(fid);
+ CHECK(f, NULL, "H5I_object");
+
+ /* Open the committed datatype */
+ str_tid = H5Topen2(fid, "datatype", H5P_DEFAULT);
+ CHECK(str_tid, FAIL, "H5Topen2");
+ str_dtype = (H5T_t *)H5I_object(str_tid);
+ CHECK(str_dtype, NULL, "H5I_object");
+
+ /* Verify the committed datatype message version */
+ VERIFY(str_dtype->shared->version, H5O_dtype_ver_bounds[H5F_LIBVER_EARLIEST], "H5O_dtype_ver_bounds");
+
+ /* Close the committed datatype */
+ ret = H5Tclose(str_tid);
+ CHECK(ret, FAIL, "H5Tclose");
+
+
+ /* Create the chunked dataset */
+ did = H5Dcreate2(fid, DSETNAME, tid, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT);
+ CHECK(did, FAIL, "H5Dcreate2");
+
+ /* Get the dataset's datatype */
+ dtid = H5Dget_type(did);
+ CHECK(dtid, FAIL, "H5Dget_type");
+
+ /* Get the internal datatype pointer */
+ dtype = (H5T_t *)H5I_object(dtid);
+ CHECK(dtype, NULL, "H5I_object");
+
+ /* Verify the dataset's datatype message version */
+ /* H5T_COMPOUND, H5T_ENUM, H5T_ARRAY:
+ * --the library will set version according to low_bound
+ * --H5T_ARRAY: the earliest version the library will set is 2
+ * H5T_INTEGER, H5T_FLOAT, H5T_TIME, H5T_STRING, H5T_BITFIELD, H5T_OPAQUE, H5T_REFERENCE:
+ * --the library will only use basic version
+ */
+ if(dtype->shared->type == H5T_COMPOUND ||
+ dtype->shared->type == H5T_ENUM ||
+ dtype->shared->type == H5T_ARRAY) {
+ if(dtype->shared->type == H5T_ARRAY &&
+ f->shared->low_bound == H5F_LIBVER_EARLIEST)
+ VERIFY(dtype->shared->version, H5O_DTYPE_VERSION_2, "H5O_dtype_ver_bounds");
+ else
+ VERIFY(dtype->shared->version, H5O_dtype_ver_bounds[f->shared->low_bound], "H5O_dtype_ver_bounds");
+ } else
+ VERIFY(dtype->shared->version, H5O_dtype_ver_bounds[H5F_LIBVER_EARLIEST], "H5O_dtype_ver_bounds");
+
+ /* Close the dataset */
+ ret = H5Dclose(did);
+ CHECK(ret, FAIL, "H5Dclose");
+
+ /* Close the dataset's datatype */
+ ret = H5Tclose(dtid);
+ CHECK(ret, FAIL, "H5Tclose");
+
+ /* Delete the dataset */
+ ret = H5Ldelete(fid, DSETNAME, H5P_DEFAULT);
+ CHECK(ret, FAIL, "H5Ldelete");
+
+ /* Close the file */
+ ret = H5Fclose(fid);
+ CHECK(ret, FAIL, "H5Fclose");
+
+ } /* end if */
+ } /* end for */
+ } /* end for */
+
+ /* Close the file access property list */
+ ret = H5Pclose(new_fapl);
+ CHECK(ret, FAIL, "H5Pclose");
+
+ /* Close the dataspace */
+ ret = H5Sclose(sid);
+ CHECK(ret, FAIL, "H5Sclose");
+
+ /* Close the dataset creation property list */
+ ret = H5Pclose(dcpl);
+ CHECK(ret, FAIL, "H5Pclose");
+
+} /* end test_libver_bounds_datatype_check() */
+
+/****************************************************************
+**
+** test_libver_bounds_attributes():
+** Verify the attribute message versions:
+**
+** (a) Create a file with default fcpl and the input fapl.
+** Create a group and attach the following three attributes
+** to the group:
+** (1) Attribute with a committed datatype
+** (2) Attribute with integer type
+** (3) Attribute with character encoding set
+** Verify the three attributes' message versions.
+** Close the file.
+**
+** (b) Create a fcpl that has shared datatype message enabled.
+** Create a file with the fcpl and the input fapl.
+** Create a group and attach an attribute with shared
+** integer type to the group.
+** Verify the attribute message version.
+** Close the file
+**
+** (b) Create a new fapl that is set to the 5 pairs of low/high
+** bounds in a "for" loop. For each pair of setting in
+** the new fapl:
+** --Open the same file in (b) with the fapl
+** --Open the group and attach an attribute with integer
+** type to the group
+** --Verify the attribute message version
+** --Delete the attribute
+** --Close the group and the file
+**
+****************************************************************/
+static void
+test_libver_bounds_attributes(hid_t fapl)
+{
+ hid_t fid = -1; /* File ID */
+ hid_t fcpl = -1; /* File creation property list */
+ hid_t new_fapl = -1; /* File access property list */
+ hid_t tid = -1; /* Datatype ID */
+ hid_t gid = -1; /* Group ID */
+ hid_t sid = -1; /* Dataspace ID */
+ hid_t aid = -1; /* Attribute ID */
+ hid_t attr_cpl = -1; /* Attribute creation property list */
+ H5A_t *attr = NULL; /* Internal attribute pointer */
+ H5F_t *f = NULL; /* Internal file pointer */
+ H5F_libver_t low, high; /* Low and high bounds */
+ herr_t ret; /* Return value */
+
+ /* Retrieve the low/high bounds from the input fapl */
+ ret = H5Pget_libver_bounds(fapl, &low, &high);
+ CHECK(ret, FAIL, "H5Pget_libver_bounds");
+
+ /* Create the file */
+ fid = H5Fcreate(FILE8, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
+ CHECK(fid, FAIL, "H5Fcreate");
+
+ /* Integer datatpye */
+ tid = H5Tcopy(H5T_NATIVE_INT);
+ CHECK(tid, FAIL, "H5Tcopy");
+
+ /* Create a committed datatype */
+ ret = H5Tcommit2(fid, "datatype", tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(ret, FAIL, "H5Tcommit2");
+
+ /* Create dataspace */
+ sid = H5Screate(H5S_SCALAR);
+ CHECK(sid, FAIL, "H5Screate");
+
+ /* Create a group */
+ gid = H5Gcreate2(fid, GRP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(gid, FAIL, "H5Gcreate2");
+
+ /* Attach an attribute to the group with the committed datatype */
+ aid = H5Acreate2(gid, "attr1", tid, sid, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(aid, FAIL, "H5Acreate2");
+
+ /* Get the internal attribute pointer */
+ attr = (H5A_t *)H5I_object(aid);
+ CHECK(attr, NULL, "H5I_object");
+
+ /* Verify the attribute version */
+ if(low == H5F_LIBVER_EARLIEST)
+ /* The earliest version the library can set for an attribute with committed datatype is 2 */
+ VERIFY(attr->shared->version, H5O_ATTR_VERSION_2, "H5O_attr_ver_bounds");
+ else
+ VERIFY(attr->shared->version, H5O_attr_ver_bounds[low], "H5O_attr_ver_bounds");
+
+ /* Close the attribute */
+ ret = H5Aclose(aid);
+ CHECK(ret, FAIL, "H5Aclose");
+
+ /* Create an attribute to the group with integer type */
+ aid = H5Acreate2(gid, "attr2", H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(aid, FAIL, "H5Acreate2");
+
+ /* Get the internal attribute pointer */
+ attr = (H5A_t *)H5I_object(aid);
+ CHECK(attr, NULL, "H5I_object");
+
+ /* Verify attribute version */
+ VERIFY(attr->shared->version, H5O_attr_ver_bounds[low], "H5O_attr_ver_bounds");
+
+ /* Close the attribute */
+ ret = H5Aclose(aid);
+ CHECK(ret, FAIL, "H5Aclose");
+
+ /* Enable character encoding in attribute creation property list */
+ attr_cpl = H5Pcreate(H5P_ATTRIBUTE_CREATE);
+ CHECK(attr_cpl, FAIL, "H5Pcreate");
+ ret = H5Pset_char_encoding(attr_cpl, H5T_CSET_UTF8);
+ CHECK(ret, FAIL, "H5Pset_char_encoding");
+
+ /* Attach an attribute to the group with character encoding set */
+ aid = H5Acreate2(gid, "attr3", H5T_NATIVE_INT, sid, attr_cpl, H5P_DEFAULT);
+ CHECK(aid, FAIL, "H5Acreate2");
+
+ /* Get internal attribute pointer */
+ attr = (H5A_t *)H5I_object(aid);
+ CHECK(attr, NULL, "H5I_object");
+
+ /* Verify attribute version */
+ if(low == H5F_LIBVER_EARLIEST)
+ /* The earliest version the library can set for an attribute with character encoding is 3 */
+ VERIFY(attr->shared->version, H5O_ATTR_VERSION_3, "H5O_attr_ver_bounds");
+ else
+ VERIFY(attr->shared->version, H5O_attr_ver_bounds[low], "H5O_attr_ver_bounds");
+
+ /* Close the attribute */
+ ret = H5Aclose(aid);
+ CHECK(ret, FAIL, "H5Aclose");
+
+ /* Close the attribute creation property list */
+ ret = H5Pclose(attr_cpl);
+ CHECK(ret, FAIL, "H5Pclose");
+
+ /* Close the group */
+ ret = H5Gclose(gid);
+ CHECK(ret, FAIL, "H5Gclose");
+
+ /* Close the dataspace */
+ ret = H5Sclose(sid);
+ CHECK(ret, FAIL, "H5Sclose");
+
+ /* Close the datatype */
+ ret = H5Tclose(tid);
+ CHECK(ret, FAIL, "H5Tclose");
+
+ /* Close the file */
+ ret = H5Fclose(fid);
+ CHECK(ret, FAIL, "H5Fclose");
+
+ /* Create a copy of the file creation property list */
+ fcpl = H5Pcreate(H5P_FILE_CREATE);
+ CHECK(fcpl, FAIL, "H5Pcreate");
+
+ /* Enable shared datatype message */
+ ret = H5Pset_shared_mesg_nindexes(fcpl, 1);
+ CHECK(ret, FAIL, "H5Pset_shared_mesg_nindexes");
+ ret = H5Pset_shared_mesg_index(fcpl, 0, H5O_SHMESG_DTYPE_FLAG, 2);
+ CHECK(ret, FAIL, "H5Pset_shared_mesg_index");
+
+ /* Create the file with shared datatype message enabled */
+ fid = H5Fcreate(FILE8, H5F_ACC_TRUNC, fcpl, fapl);
+ CHECK(fid, FAIL, "H5Fcreate");
+
+ /* Create an integer datatye */
+ tid = H5Tcopy(H5T_NATIVE_INT);
+ CHECK(tid, FAIL, "H5Tcopy");
+
+ /* Create dataspace */
+ sid = H5Screate(H5S_SCALAR);
+ CHECK(sid, FAIL, "H5Screate");
+
+ /* Create a group */
+ gid = H5Gcreate2(fid, GRP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(gid, FAIL, "H5Gcreate2");
+
+ /* Attach an attribute to the group with shared integer datatype */
+ aid = H5Acreate2(gid, ATTR_NAME, tid, sid, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(aid, FAIL, "H5Acreate2");
+
+ /* Get the internal attribute pointer */
+ attr = (H5A_t *)H5I_object(aid);
+ CHECK(attr, NULL, "H5I_object");
+
+ /* Verify the attribute version */
+ if(low == H5F_LIBVER_EARLIEST)
+ /* The earliest version the library can set for an attribute with shared datatype is 2 */
+ VERIFY(attr->shared->version, H5O_ATTR_VERSION_2, "H5O_attr_ver_bounds");
+ else
+ VERIFY(attr->shared->version, H5O_attr_ver_bounds[low], "H5O_attr_ver_bounds");
+
+ /* Close the attribute */
+ ret = H5Aclose(aid);
+ CHECK(ret, FAIL, "H5Aclose");
+
+ /* Close the group */
+ ret = H5Gclose(gid);
+ CHECK(ret, FAIL, "H5Gclose");
+
+ /* Close the dataspace */
+ ret = H5Sclose(sid);
+ CHECK(ret, FAIL, "H5Sclose");
+
+ /* Close the datatype */
+ ret = H5Tclose(tid);
+ CHECK(ret, FAIL, "H5Tclose");
+
+ /* Close the file */
+ ret = H5Fclose(fid);
+ CHECK(ret, FAIL, "H5Fclose");
+
+ /* Create a default file access property list */
+ new_fapl = H5Pcreate(H5P_FILE_ACCESS);
+ CHECK(new_fapl, FAIL, "H5Pcreate");
+
+ /* Create a scalar dataspace to be used later for the attribute */
+ sid = H5Screate(H5S_SCALAR);
+ CHECK(sid, FAIL, "H5Screate");
+
+ /* Loop through all the combinations of low/high bounds */
+ /* Open the file and group and attach an attribute to the group */
+ /* Verify the attribute version */
+ for(low = H5F_LIBVER_EARLIEST; low < H5F_LIBVER_NBOUNDS; low++) {
+ for(high = H5F_LIBVER_EARLIEST; high < H5F_LIBVER_NBOUNDS; high++) {
+ H5E_BEGIN_TRY {
+ ret = H5Pset_libver_bounds(new_fapl, low, high);
+ } H5E_END_TRY;
+
+ if(ret < 0) /* Invalid low/high combinations */
+ continue;
+
+ /* Open the file */
+ H5E_BEGIN_TRY {
+ fid = H5Fopen(FILE8, H5F_ACC_RDWR, new_fapl);
+ } H5E_END_TRY;
+
+ if(fid >=0 ) { /* The file open succeeds */
+
+ /* Get the internal file pointer */
+ f = (H5F_t *)H5I_object(fid);
+ CHECK(f, NULL, "H5I_object");
+
+ /* Open the group */
+ gid = H5Gopen2(fid, GRP_NAME, H5P_DEFAULT);
+ CHECK(gid, FAIL, "H5Gopen2");
+
+ /* Attach an attribute to the group */
+ aid = H5Acreate2(gid, "attr1", H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(aid, FAIL, "H5Acreate2");
+
+ /* Get the internal attribute pointer */
+ attr = (H5A_t *)H5I_object(aid);
+ CHECK(attr, NULL, "H5I_object");
+
+ /* Verify the attribute message version */
+ VERIFY(attr->shared->version, H5O_attr_ver_bounds[f->shared->low_bound], "H5O_attr_ver_bounds");
+
+ /* Close the attribute */
+ ret = H5Aclose(aid);
+ CHECK(ret, FAIL, "H5Aclose");
+
+ /* Delete the attribute */
+ ret = H5Adelete(gid, "attr1");
+ CHECK(ret, FAIL, "H5Adelete");
+
+ /* Close the group */
+ ret = H5Gclose(gid);
+ CHECK(ret, FAIL, "H5Gclose");
+
+ /* Close the file */
+ ret = H5Fclose(fid);
+ CHECK(ret, FAIL, "H5Fclose");
+
+ } /* end if */
+ } /* end for */
+ } /* end for */
+
+ /* Close the file access property list */
+ ret = H5Pclose(new_fapl);
+ CHECK(ret, FAIL, "H5Pclose");
+
+ /* Close the dataspace */
+ ret = H5Sclose(sid);
+ CHECK(ret, FAIL, "H5Sclose");
+
+} /* end test_libver_bounds_attributes() */
+
/****************************************************************
**
** test_libver_macros():
-** Verify that H5_VERSION_GE and H5_VERSION_LE work correactly.
+** Verify that H5_VERSION_GE and H5_VERSION_LE work correactly.
**
****************************************************************/
static void
test_libver_macros(void)
{
- unsigned major = H5_VERS_MAJOR;
- unsigned minor = H5_VERS_MINOR;
- unsigned release = H5_VERS_RELEASE;
+ int major = H5_VERS_MAJOR;
+ int minor = H5_VERS_MINOR;
+ int release = H5_VERS_RELEASE;
/* Output message about test being performed */
MESSAGE(5, ("Testing macros for library version comparison\n"));
@@ -4974,7 +6864,7 @@ test_libver_macros(void)
/****************************************************************
**
** test_libver_macros2():
-** Verify that H5_VERSION_GE works correactly and show how
+** Verify that H5_VERSION_GE works correactly and show how
** to use it.
**
****************************************************************/
@@ -5007,9 +6897,9 @@ test_libver_macros2(void)
ret = H5Gclose(grp);
CHECK(ret, FAIL, "H5Gclose");
- /*
+ /*
* Delete the group using different function based on the library version.
- * And verify the action.
+ * And verify the action.
*/
#if H5_VERSION_GE(1,8,0)
ret = H5Ldelete(file, "Group", H5P_DEFAULT);
@@ -5037,8 +6927,132 @@ test_libver_macros2(void)
/****************************************************************
**
+** test_filesize():
+** Verify H5Fincrement_filesize() and H5Fget_eoa() works as
+** indicated in the "RFC: Enhancement to the tool h5clear".
+**
+****************************************************************/
+static void
+test_incr_filesize(void)
+{
+ hid_t fid; /* File opened with read-write permission */
+ h5_stat_size_t filesize; /* Size of file when empty */
+ hid_t fcpl; /* File creation property list */
+ hid_t fapl; /* File access property list */
+ hid_t dspace; /* Dataspace ID */
+ hid_t dset; /* Dataset ID */
+ hid_t dcpl; /* Dataset creation property list */
+ unsigned u; /* Local index variable */
+ char filename[FILENAME_LEN]; /* Filename to use */
+ char name[32]; /* Dataset name */
+ haddr_t stored_eoa; /* The stored EOA value */
+ hid_t driver_id = -1; /* ID for this VFD */
+ unsigned long driver_flags = 0; /* VFD feature flags */
+ herr_t ret; /* Return value */
+
+ /* Output message about test being performed */
+ MESSAGE(5, ("Testing H5Fincrement_filesize() and H5Fget_eoa())\n"));
+
+ fapl = h5_fileaccess();
+ h5_fixname(FILE8, fapl, filename, sizeof filename);
+
+ /* Get the VFD feature flags */
+ driver_id = H5Pget_driver(fapl);
+ CHECK(driver_id, FAIL, "H5Pget_driver");
+
+ ret = H5FDdriver_query(driver_id, &driver_flags);
+ CHECK(ret, FAIL, "H5PDdriver_query");
+
+ /* Check whether the VFD feature flag supports these two public routines */
+ if(driver_flags & H5FD_FEAT_SUPPORTS_SWMR_IO) {
+
+ fcpl = H5Pcreate(H5P_FILE_CREATE);
+ CHECK(fcpl, FAIL, "H5Pcreate");
+
+ /* Set file space strategy */
+ ret = H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, FALSE, (hsize_t)1);
+ CHECK(ret, FAIL, "H5P_set_file_space_strategy");
+
+ /* Create the test file */
+ fid = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl);
+ CHECK(fid, FAIL, "H5Fcreate");
+
+ /* Create dataspace for datasets */
+ dspace = H5Screate(H5S_SCALAR);
+ CHECK(dspace, FAIL, "H5Screate");
+
+ /* Create a dataset creation property list */
+ dcpl = H5Pcreate(H5P_DATASET_CREATE);
+ CHECK(dcpl, FAIL, "H5Pcreate");
+
+ /* Set the space allocation time to early */
+ ret = H5Pset_alloc_time(dcpl, H5D_ALLOC_TIME_EARLY);
+ CHECK(ret, FAIL, "H5Pset_alloc_time");
+
+ /* Create datasets in file */
+ for(u = 0; u < 10; u++) {
+ sprintf(name, "Dataset %u", u);
+ dset = H5Dcreate2(fid, name, H5T_STD_U32LE, dspace, H5P_DEFAULT, dcpl, H5P_DEFAULT);
+ CHECK(dset, FAIL, "H5Dcreate2");
+
+ ret = H5Dclose(dset);
+ CHECK(ret, FAIL, "H5Dclose");
+ } /* end for */
+
+ /* Close dataspace */
+ ret = H5Sclose(dspace);
+ CHECK(ret, FAIL, "H5Sclose");
+
+ /* Close dataset creation property list */
+ ret = H5Pclose(dcpl);
+ CHECK(ret, FAIL, "H5Pclose");
+
+ /* Close file */
+ ret = H5Fclose(fid);
+ CHECK(ret, FAIL, "H5Fclose");
+
+ /* Get the file size */
+ filesize = h5_get_file_size(filename, fapl);
+
+ /* Open the file */
+ fid = H5Fopen(filename, H5F_ACC_RDWR, fapl);
+ CHECK(fid, FAIL, "H5Fopen");
+
+ /* Get the stored EOA */
+ ret = H5Fget_eoa(fid, &stored_eoa);
+ CHECK(ret, FAIL, "H5Fget_eoa");
+
+ /* Verify the stored EOA is the same as filesize */
+ VERIFY(filesize, stored_eoa, "file size");
+
+ /* Set the EOA to the MAX(EOA, EOF) + 512 */
+ ret = H5Fincrement_filesize(fid, 512);
+ CHECK(ret, FAIL, "H5Fincrement_filesize");
+
+ /* Close file */
+ ret = H5Fclose(fid);
+ CHECK(ret, FAIL, "H5Fclose");
+
+ /* Get the file size */
+ filesize = h5_get_file_size(filename, fapl);
+
+ /* Verify the filesize is the previous stored_eoa + 512 */
+ VERIFY(filesize, stored_eoa+512, "file size");
+
+ /* Close the file access property list */
+ ret = H5Pclose(fapl);
+ CHECK(ret, FAIL, "H5Pclose");
+
+ /* Close the file creation property list */
+ ret = H5Pclose(fcpl);
+ CHECK(ret, FAIL, "H5Pclose");
+ }
+} /* end test_incr_filesize() */
+
+/****************************************************************
+**
** test_deprec():
-** Test deprecated functionality.
+** Test deprecated functionality.
**
****************************************************************/
#ifndef H5_NO_DEPRECATED_SYMBOLS
@@ -5054,7 +7068,7 @@ test_deprec(void)
unsigned freelist; /* Free list version # */
unsigned stab; /* Symbol table entry version # */
unsigned shhdr; /* Shared object header version # */
- H5F_info1_t finfo; /* global information about file */
+ H5F_info1_t finfo; /* global information about file */
herr_t ret; /* Generic return value */
/* Output message about test being performed */
@@ -5270,7 +7284,7 @@ test_deprec(void)
void
test_file(void)
{
- const char *env_h5_drvr; /* File Driver value from environment */
+ const char *env_h5_drvr; /* File Driver value from environment */
/* Output message about test being performed */
MESSAGE(5, ("Testing Low-Level File I/O\n"));
@@ -5318,22 +7332,24 @@ test_file(void)
test_filespace_round_compatible(); /* Testing file space compatibility for files from trunk to 1_8 to trunk */
test_filespace_1_10_0_compatible(); /* Testing file space compatibility for files from release 1.10.0 */
test_libver_bounds(); /* Test compatibility for file space management */
+ test_libver_bounds_low_high();
test_libver_macros(); /* Test the macros for library version comparison */
test_libver_macros2(); /* Test the macros for library version comparison */
+ test_incr_filesize(); /* Test H5Fincrement_filesize() and H5Fget_eoa() */
#ifndef H5_NO_DEPRECATED_SYMBOLS
test_deprec(); /* Test deprecated routines */
#endif /* H5_NO_DEPRECATED_SYMBOLS */
} /* test_file() */
-
+
/*-------------------------------------------------------------------------
- * Function: cleanup_file
+ * Function: cleanup_file
*
- * Purpose: Cleanup temporary test files
+ * Purpose: Cleanup temporary test files
*
- * Return: none
+ * Return: none
*
- * Programmer: Albert Cheng
+ * Programmer: Albert Cheng
* July 2, 1998
*
* Modifications:
diff --git a/test/tgenprop.c b/test/tgenprop.c
index e6f9692..5031846 100644
--- a/test/tgenprop.c
+++ b/test/tgenprop.c
@@ -5,31 +5,29 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/***********************************************************
*
-* Test program: tgenprop
+* Test program: tgenprop
*
* Test the Generic Property functionality
*
*************************************************************/
-#define H5P_FRIEND /*suppress error about including H5Ppkg */
+#define H5P_FRIEND /*suppress error about including H5Ppkg */
/* Define this macro to indicate that the testing APIs should be available */
#define H5P_TESTING
#include "testhdf5.h"
-#include "hdf5.h"
+
#include "H5Dprivate.h" /* For Dataset creation property list names */
-#include "H5Ppkg.h" /* Generic Properties */
+#include "H5Ppkg.h" /* Generic Properties */
#define FILENAME "tgenprop.h5"
@@ -82,11 +80,11 @@ typedef struct count_data_t {
static void
test_genprop_basic_class(void)
{
- hid_t cid1; /* Generic Property class ID */
- hid_t cid2; /* Generic Property class ID */
- hid_t cid3; /* Generic Property class ID */
+ hid_t cid1; /* Generic Property class ID */
+ hid_t cid2; /* Generic Property class ID */
+ hid_t cid3; /* Generic Property class ID */
char *name; /* Name of class */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Basic Generic Property List Class Creation Functionality\n"));
@@ -171,10 +169,10 @@ test_genprop_basic_class(void)
static void
test_genprop_basic_class_prop(void)
{
- hid_t cid1; /* Generic Property class ID */
- size_t size; /* Size of property */
- size_t nprops; /* Number of properties in class */
- herr_t ret; /* Generic return value */
+ hid_t cid1; /* Generic Property class ID */
+ size_t size; /* Size of property */
+ size_t nprops; /* Number of properties in class */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Basic Generic Property List Class Properties Functionality\n"));
@@ -313,8 +311,8 @@ test_genprop_iter1(hid_t H5_ATTR_UNUSED id, const char *name,
static void
test_genprop_class_iter(void)
{
- hid_t cid1; /* Generic Property class ID */
- size_t nprops; /* Number of properties in class */
+ hid_t cid1; /* Generic Property class ID */
+ size_t nprops; /* Number of properties in class */
int idx; /* Index to start iteration at */
struct { /* Struct for iterations */
int iter_count;
@@ -325,7 +323,7 @@ test_genprop_class_iter(void)
PROP2_NAME,
PROP3_NAME,
PROP4_NAME};
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Basic Generic Property List Class Property Iteration Functionality\n"));
@@ -419,17 +417,17 @@ test_genprop_cls_cls_cb1(hid_t list_id, void *create_data)
static void
test_genprop_class_callback(void)
{
- hid_t cid1; /* Generic Property class ID */
- hid_t cid2; /* Generic Property class ID */
- hid_t lid1; /* Generic Property list ID */
- hid_t lid2; /* Generic Property list ID */
- hid_t lid3; /* Generic Property list ID */
- size_t nprops; /* Number of properties in class */
+ hid_t cid1; /* Generic Property class ID */
+ hid_t cid2; /* Generic Property class ID */
+ hid_t lid1; /* Generic Property list ID */
+ hid_t lid2; /* Generic Property list ID */
+ hid_t lid3; /* Generic Property list ID */
+ size_t nprops; /* Number of properties in class */
struct { /* Struct for callbacks */
int count;
hid_t id;
} crt_cb_struct, cpy_cb_struct, cls_cb_struct;
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Basic Generic Property List Class Callback Functionality\n"));
@@ -598,14 +596,14 @@ test_genprop_class_callback(void)
static void
test_genprop_basic_list(void)
{
- hid_t cid1; /* Generic Property class ID */
- hid_t cid2; /* Generic Property class ID */
- hid_t lid1; /* Generic Property list ID */
- size_t nprops; /* Number of properties */
- size_t size; /* Size of property */
+ hid_t cid1; /* Generic Property class ID */
+ hid_t cid2; /* Generic Property class ID */
+ hid_t lid1; /* Generic Property list ID */
+ size_t nprops; /* Number of properties */
+ size_t size; /* Size of property */
int prop1_value; /* Value for property #1 */
float prop2_value; /* Value for property #2 */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Basic Generic Property List Creation Functionality\n"));
@@ -680,8 +678,8 @@ test_genprop_basic_list(void)
CHECK_I(ret, "H5Pget");
/* Verify the floating-poing value in this way to avoid compiler warning. */
if(!H5_FLT_ABS_EQUAL(prop2_value,*PROP2_DEF_VALUE))
- printf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n",
- "H5Pget", (double)*PROP2_DEF_VALUE, (double)prop2_value, (int)__LINE__, __FILE__);
+ printf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n",
+ "H5Pget", (double)*PROP2_DEF_VALUE, (double)prop2_value, (int)__LINE__, __FILE__);
/* Close list */
@@ -704,14 +702,14 @@ test_genprop_basic_list(void)
static void
test_genprop_basic_list_prop(void)
{
- hid_t cid1; /* Generic Property class ID */
- hid_t lid1; /* Generic Property list ID */
- size_t nprops; /* Number of properties */
+ hid_t cid1; /* Generic Property class ID */
+ hid_t lid1; /* Generic Property list ID */
+ size_t nprops; /* Number of properties */
int prop1_value; /* Value for property #1 */
float prop2_value; /* Value for property #2 */
char prop3_value[10];/* Property #3 value */
double prop4_value; /* Property #4 value */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Basic Generic Property List Property Functionality\n"));
@@ -772,8 +770,8 @@ test_genprop_basic_list_prop(void)
CHECK_I(ret, "H5Pget");
/* Verify the floating-poing value in this way to avoid compiler warning. */
if(!H5_FLT_ABS_EQUAL(prop2_value,*PROP2_DEF_VALUE))
- printf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n",
- "H5Pget", (double)*PROP2_DEF_VALUE, (double)prop2_value, (int)__LINE__, __FILE__);
+ printf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n",
+ "H5Pget", (double)*PROP2_DEF_VALUE, (double)prop2_value, (int)__LINE__, __FILE__);
/* Check values of temporary properties (set with regular values) */
@@ -785,8 +783,8 @@ test_genprop_basic_list_prop(void)
CHECK_I(ret, "H5Pget");
/* Verify the floating-poing value in this way to avoid compiler warning. */
if(!H5_DBL_ABS_EQUAL(prop4_value, *PROP4_DEF_VALUE))
- printf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n",
- "H5Pget", *PROP4_DEF_VALUE, prop4_value, (int)__LINE__, __FILE__);
+ printf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n",
+ "H5Pget", *PROP4_DEF_VALUE, prop4_value, (int)__LINE__, __FILE__);
/* Delete permanent property */
ret = H5Premove(lid1, PROP2_NAME);
@@ -822,8 +820,8 @@ test_genprop_basic_list_prop(void)
CHECK_I(ret, "H5Pget");
/* Verify the floating-poing value in this way to avoid compiler warning. */
if(!H5_DBL_ABS_EQUAL(prop4_value, *PROP4_DEF_VALUE))
- printf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n",
- "H5Pget", *PROP4_DEF_VALUE, prop4_value, (int)__LINE__, __FILE__);
+ printf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n",
+ "H5Pget", *PROP4_DEF_VALUE, prop4_value, (int)__LINE__, __FILE__);
/* Close list */
ret = H5Pclose(lid1);
@@ -858,9 +856,9 @@ test_genprop_iter2(hid_t H5_ATTR_UNUSED id, const char *name,
static void
test_genprop_list_iter(void)
{
- hid_t cid1; /* Generic Property class ID */
- hid_t lid1; /* Generic Property list ID */
- size_t nprops; /* Number of properties */
+ hid_t cid1; /* Generic Property class ID */
+ hid_t lid1; /* Generic Property list ID */
+ size_t nprops; /* Number of properties */
int idx; /* Index to start iteration at */
struct { /* Struct for iterations */
int iter_count;
@@ -872,7 +870,7 @@ test_genprop_list_iter(void)
PROP1_NAME,
PROP2_NAME
};
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Generic Property List Iteration Functionality\n"));
@@ -1146,10 +1144,10 @@ test_genprop_prop_del_cb2(hid_t plist_id, const char *name, size_t size, void *v
static void
test_genprop_list_callback(void)
{
- hid_t cid1; /* Generic Property class ID */
- hid_t lid1; /* Generic Property list ID */
- hid_t lid2; /* 2nd Generic Property list ID */
- size_t nprops; /* Number of properties in class */
+ hid_t cid1; /* Generic Property class ID */
+ hid_t lid1; /* Generic Property list ID */
+ hid_t lid2; /* 2nd Generic Property list ID */
+ size_t nprops; /* Number of properties in class */
int prop1_value; /* Value for property #1 */
int prop1_new_value=20; /* Property #1 new value */
float prop2_value; /* Value for property #2 */
@@ -1160,7 +1158,7 @@ test_genprop_list_callback(void)
int count;
hid_t id;
} cop_cb_struct;
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Basic Generic Property List Property Callback Functionality\n"));
@@ -1227,8 +1225,8 @@ test_genprop_list_callback(void)
CHECK_I(ret, "H5Pget");
/* Verify the floating-poing value in this way to avoid compiler warning. */
if(!H5_FLT_ABS_EQUAL(prop2_value,*PROP2_DEF_VALUE))
- printf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n",
- "H5Pget", (double)*PROP2_DEF_VALUE, (double)prop2_value, (int)__LINE__, __FILE__);
+ printf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n",
+ "H5Pget", (double)*PROP2_DEF_VALUE, (double)prop2_value, (int)__LINE__, __FILE__);
/* Check values of temporary properties (set with regular values) */
ret = H5Pget(lid1, PROP3_NAME,&prop3_value);
@@ -1242,8 +1240,8 @@ test_genprop_list_callback(void)
CHECK_I(ret, "H5Pget");
/* Verify the floating-poing value in this way to avoid compiler warning. */
if(!H5_DBL_ABS_EQUAL(prop4_value, *PROP4_DEF_VALUE))
- printf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n",
- "H5Pget", *PROP4_DEF_VALUE, prop4_value, (int)__LINE__, __FILE__);
+ printf("*** UNEXPECTED VALUE from %s should be %f, but is %f at line %4d in %s\n",
+ "H5Pget", *PROP4_DEF_VALUE, prop4_value, (int)__LINE__, __FILE__);
/* Verify get callback information for properties tracked */
VERIFY(prop1_cb_info.get_count, 1, "H5Pget");
@@ -1375,7 +1373,7 @@ test_genprop_list_addprop(void)
hid_t sid; /* Dataspace ID */
hid_t pid; /* Property List ID */
int prop1_value; /* Value for property #1 */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Create file */
fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -1450,7 +1448,7 @@ test_genprop_class_addprop(void)
hid_t cid; /* Property Class ID */
hid_t pid; /* Property List ID */
int prop1_value; /* Value for property #1 */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Create file */
fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -1572,7 +1570,7 @@ static void
test_genprop_list_add_remove_prop(void)
{
hid_t pid; /* Property List ID */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Create a dataset creation property list */
pid = H5Pcreate(H5P_DATASET_CREATE);
@@ -1609,11 +1607,11 @@ test_genprop_list_add_remove_prop(void)
static void
test_genprop_equal(void)
{
- hid_t cid1; /* Generic Property class ID */
- hid_t lid1; /* Generic Property list ID */
- hid_t lid2; /* Generic Property list ID */
+ hid_t cid1; /* Generic Property class ID */
+ hid_t lid1; /* Generic Property list ID */
+ hid_t lid2; /* Generic Property list ID */
int prop1_new_value = 20; /* Property #1 new value */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Basic Generic Property List Equal Functionality\n"));
@@ -1758,11 +1756,11 @@ test_genprop_equal(void)
static void
test_genprop_path(void)
{
- hid_t cid1; /* Generic Property class ID */
- hid_t cid2; /* Generic Property class ID */
- hid_t cid3; /* Generic Property class ID */
+ hid_t cid1; /* Generic Property class ID */
+ hid_t cid2; /* Generic Property class ID */
+ hid_t cid3; /* Generic Property class ID */
char *path; /* Class path */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Generic Property List Class Path Functionality\n"));
@@ -1830,10 +1828,10 @@ test_genprop_path(void)
static void
test_genprop_refcount(void)
{
- hid_t cid1; /* Generic Property class ID */
- hid_t lid1; /* Generic Property class ID */
+ hid_t cid1; /* Generic Property class ID */
+ hid_t lid1; /* Generic Property class ID */
char *name; /* Name of class */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Generic Property List Reference Count Functionality\n"));
@@ -1903,10 +1901,10 @@ test_genprop_refcount(void)
static void
test_genprop_deprec_class(void)
{
- hid_t cid1; /* Generic Property class ID */
- size_t size; /* Size of property */
- size_t nprops; /* Number of properties in class */
- herr_t ret; /* Generic return value */
+ hid_t cid1; /* Generic Property class ID */
+ size_t size; /* Size of property */
+ size_t nprops; /* Number of properties in class */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Deprecated Generic Property List Functions\n"));
@@ -2036,7 +2034,7 @@ test_genprop_deprec_list(void)
hid_t sid; /* Dataspace ID */
hid_t pid; /* Property List ID */
int prop1_value; /* Value for property #1 */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Create file */
fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -2132,15 +2130,15 @@ test_genprop(void)
} /* test_genprop() */
-
+
/*-------------------------------------------------------------------------
- * Function: cleanup_genprop
+ * Function: cleanup_genprop
*
- * Purpose: Cleanup temporary test files
+ * Purpose: Cleanup temporary test files
*
- * Return: none
+ * Return: none
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* June 8, 1999
*
* Modifications:
diff --git a/test/th5o.c b/test/th5o.c
index c2c4034..00d706c 100644
--- a/test/th5o.c
+++ b/test/th5o.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/***********************************************************
@@ -776,7 +774,7 @@ test_h5o_link(void)
hid_t lcpl_id=-1;
hsize_t dims[2] = {TEST6_DIM1, TEST6_DIM2};
htri_t committed; /* Whether the named datatype is committed */
- unsigned new_format; /* Whether to use the new format or not */
+ H5F_libver_t low, high; /* File format bounds */
int *wdata;
int *rdata;
int i, n;
@@ -785,9 +783,9 @@ test_h5o_link(void)
/* Allocate memory buffers */
/* (These are treated as 2-D buffers) */
wdata = (int *)HDmalloc((size_t)(TEST6_DIM1 * TEST6_DIM2) * sizeof(int));
- CHECK(wdata, NULL, "HDmalloc");
+ CHECK_PTR(wdata, "HDmalloc");
rdata = (int *)HDmalloc((size_t)(TEST6_DIM1 * TEST6_DIM2) * sizeof(int));
- CHECK(rdata, NULL, "HDmalloc");
+ CHECK_PTR(rdata, "HDmalloc");
/* Initialize the raw data */
for(i = n = 0; i < (TEST6_DIM1 * TEST6_DIM2); i++)
@@ -803,98 +801,103 @@ test_h5o_link(void)
ret = H5Pset_create_intermediate_group(lcpl_id, TRUE);
CHECK(ret, FAIL, "H5Pset_create_intermediate_group");
- /* Loop over using new group format */
- for(new_format = FALSE; new_format <= TRUE; new_format++) {
-
- /* Make a FAPL that uses the "use the latest version of the format" bounds */
- fapl_id = H5Pcreate(H5P_FILE_ACCESS);
- CHECK(fapl_id, FAIL, "H5Pcreate");
-
- /* Set the "use the latest version of the format" bounds for creating objects in the file */
- ret = H5Pset_libver_bounds(fapl_id, (new_format ? H5F_LIBVER_LATEST : H5F_LIBVER_EARLIEST), H5F_LIBVER_LATEST);
- CHECK(ret, FAIL, "H5Pset_libver_bounds");
-
- /* Create a new HDF5 file */
- file_id = H5Fcreate(TEST_FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id);
- CHECK(file_id, FAIL, "H5Fcreate");
-
- /* Close the FAPL */
- ret = H5Pclose(fapl_id);
- CHECK(ret, FAIL, "H5Pclose");
-
-
- /* Create and commit a datatype with no name */
- type_id = H5Tcopy(H5T_NATIVE_INT);
- CHECK(type_id, FAIL, "H5Fcreate");
- ret = H5Tcommit_anon(file_id, type_id, H5P_DEFAULT, H5P_DEFAULT);
- CHECK(ret, FAIL, "H5Tcommit_anon");
- committed = H5Tcommitted(type_id);
- VERIFY(committed, TRUE, "H5Tcommitted");
-
- /* Create a dataset with no name using the committed datatype*/
- dset_id = H5Dcreate_anon(file_id, type_id, space_id, H5P_DEFAULT, H5P_DEFAULT);
- CHECK(dset_id, FAIL, "H5Dcreate_anon");
-
- /* Verify that we can write to and read from the dataset */
-
- /* Write the data to the dataset */
- ret = H5Dwrite(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata);
- CHECK(ret, FAIL, "H5Dwrite");
-
- /* Read the data back */
- ret = H5Dread(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rdata);
- CHECK(ret, FAIL, "H5Dread");
-
- /* Verify the data */
- for(i = 0; i < (TEST6_DIM1 * TEST6_DIM2); i++)
- VERIFY(wdata[i], rdata[i], "H5Dread");
-
- /* Create a group with no name*/
- group_id = H5Gcreate_anon(file_id, H5P_DEFAULT, H5P_DEFAULT);
- CHECK(group_id, FAIL, "H5Gcreate_anon");
-
- /* Link nameless datatype into nameless group */
- ret = H5Olink(type_id, group_id, "datatype", H5P_DEFAULT, H5P_DEFAULT);
- CHECK(ret, FAIL, "H5Olink");
-
- /* Link nameless dataset into nameless group with intermediate group */
- ret = H5Olink(dset_id, group_id, "inter_group/dataset", lcpl_id, H5P_DEFAULT);
- CHECK(ret, FAIL, "H5Olink");
-
- /* Close IDs for dataset and datatype */
- ret = H5Dclose(dset_id);
- CHECK(ret, FAIL, "H5Dclose");
- ret = H5Tclose(type_id);
- CHECK(ret, FAIL, "H5Tclose");
-
- /* Re-open datatype using new link */
- type_id = H5Topen2(group_id, "datatype", H5P_DEFAULT);
- CHECK(type_id, FAIL, "H5Topen2");
-
- /* Link nameless group to root group and close the group ID*/
- ret = H5Olink(group_id, file_id, "/group", H5P_DEFAULT, H5P_DEFAULT);
- CHECK(ret, FAIL, "H5Olink");
- ret = H5Gclose(group_id);
- CHECK(ret, FAIL, "H5Gclose");
-
- /* Open dataset through root group and verify its data */
- dset_id = H5Dopen2(file_id, "/group/inter_group/dataset", H5P_DEFAULT);
- CHECK(dset_id, FAIL, "H5Dopen2");
-
- /* Read data from dataset */
- ret = H5Dread(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rdata);
- CHECK(ret, FAIL, "H5Dread");
- for(i = 0; i < (TEST6_DIM1 * TEST6_DIM2); i++)
- VERIFY(wdata[i], rdata[i], "H5Dread");
-
- /* Close open IDs */
- ret = H5Dclose(dset_id);
- CHECK(ret, FAIL, "H5Dclose");
- ret = H5Tclose(type_id);
- CHECK(ret, FAIL, "H5Tclose");
- ret = H5Fclose(file_id);
- CHECK(ret, FAIL, "H5Fclose");
- } /* end for */
+ /* Create a file access property list */
+ fapl_id = H5Pcreate(H5P_FILE_ACCESS);
+ CHECK(fapl_id, FAIL, "H5Pcreate");
+
+ /* Loop through all the combinations of low/high library format bounds */
+ for(low = H5F_LIBVER_EARLIEST; low < H5F_LIBVER_NBOUNDS; low++) {
+ for(high = H5F_LIBVER_EARLIEST; high < H5F_LIBVER_NBOUNDS; high++) {
+
+ /* Set version bounds */
+ H5E_BEGIN_TRY {
+ ret = H5Pset_libver_bounds(fapl_id, low, high);
+ } H5E_END_TRY;
+
+ if (ret < 0) /* Invalid low/high combinations */
+ continue;
+
+ /* Create a new HDF5 file */
+ file_id = H5Fcreate(TEST_FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id);
+ CHECK(file_id, FAIL, "H5Fcreate");
+
+ /* Close the FAPL */
+ ret = H5Pclose(fapl_id);
+ CHECK(ret, FAIL, "H5Pclose");
+
+ /* Create and commit a datatype with no name */
+ type_id = H5Tcopy(H5T_NATIVE_INT);
+ CHECK(type_id, FAIL, "H5Fcreate");
+ ret = H5Tcommit_anon(file_id, type_id, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(ret, FAIL, "H5Tcommit_anon");
+ committed = H5Tcommitted(type_id);
+ VERIFY(committed, TRUE, "H5Tcommitted");
+
+ /* Create a dataset with no name using the committed datatype*/
+ dset_id = H5Dcreate_anon(file_id, type_id, space_id, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(dset_id, FAIL, "H5Dcreate_anon");
+
+ /* Verify that we can write to and read from the dataset */
+
+ /* Write the data to the dataset */
+ ret = H5Dwrite(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata);
+ CHECK(ret, FAIL, "H5Dwrite");
+
+ /* Read the data back */
+ ret = H5Dread(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rdata);
+ CHECK(ret, FAIL, "H5Dread");
+
+ /* Verify the data */
+ for(i = 0; i < (TEST6_DIM1 * TEST6_DIM2); i++)
+ VERIFY(wdata[i], rdata[i], "H5Dread");
+
+ /* Create a group with no name*/
+ group_id = H5Gcreate_anon(file_id, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(group_id, FAIL, "H5Gcreate_anon");
+
+ /* Link nameless datatype into nameless group */
+ ret = H5Olink(type_id, group_id, "datatype", H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(ret, FAIL, "H5Olink");
+
+ /* Link nameless dataset into nameless group with intermediate group */
+ ret = H5Olink(dset_id, group_id, "inter_group/dataset", lcpl_id, H5P_DEFAULT);
+ CHECK(ret, FAIL, "H5Olink");
+
+ /* Close IDs for dataset and datatype */
+ ret = H5Dclose(dset_id);
+ CHECK(ret, FAIL, "H5Dclose");
+ ret = H5Tclose(type_id);
+ CHECK(ret, FAIL, "H5Tclose");
+
+ /* Re-open datatype using new link */
+ type_id = H5Topen2(group_id, "datatype", H5P_DEFAULT);
+ CHECK(type_id, FAIL, "H5Topen2");
+
+ /* Link nameless group to root group and close the group ID*/
+ ret = H5Olink(group_id, file_id, "/group", H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(ret, FAIL, "H5Olink");
+ ret = H5Gclose(group_id);
+ CHECK(ret, FAIL, "H5Gclose");
+
+ /* Open dataset through root group and verify its data */
+ dset_id = H5Dopen2(file_id, "/group/inter_group/dataset", H5P_DEFAULT);
+ CHECK(dset_id, FAIL, "H5Dopen2");
+
+ /* Read data from dataset */
+ ret = H5Dread(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rdata);
+ CHECK(ret, FAIL, "H5Dread");
+ for(i = 0; i < (TEST6_DIM1 * TEST6_DIM2); i++)
+ VERIFY(wdata[i], rdata[i], "H5Dread");
+
+ /* Close open IDs */
+ ret = H5Dclose(dset_id);
+ CHECK(ret, FAIL, "H5Dclose");
+ ret = H5Tclose(type_id);
+ CHECK(ret, FAIL, "H5Tclose");
+ ret = H5Fclose(file_id);
+ CHECK(ret, FAIL, "H5Fclose");
+ } /* for high */
+ } /* for low */
/* Close remaining IDs */
ret = H5Sclose(space_id);
diff --git a/test/th5s.c b/test/th5s.c
index 664c23a..0619571 100644
--- a/test/th5s.c
+++ b/test/th5s.c
@@ -5,17 +5,15 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/***********************************************************
*
-* Test program: th5s
+* Test program: th5s
*
* Test the dataspace functionality
*
@@ -24,11 +22,25 @@
#include "testhdf5.h"
#include "H5srcdir.h"
-#include "H5private.h"
#include "H5Bprivate.h"
-#include "H5Sprivate.h"
+#include "H5Iprivate.h"
#include "H5Pprivate.h"
+/*
+ * This file needs to access private information from the H5S package.
+ * This file also needs to access the dataspace testing code.
+ */
+#define H5S_FRIEND /*suppress error about including H5Spkg */
+#include "H5Spkg.h" /* Dataspaces */
+
+/*
+ * This file needs to access private information from the H5O package.
+ * This file also needs to access the dataspace testing code.
+ */
+#define H5O_FRIEND /*suppress error about including H5Opkg */
+#define H5O_TESTING
+#include "H5Opkg.h" /* Object header */
+
#define TESTFILE "th5s.h5"
#define DATAFILE "th5s1.h5"
#define NULLFILE "th5s2.h5"
@@ -45,31 +57,31 @@
#define EXTFILE_NAME "ext_file"
/* 3-D dataset with fixed dimensions */
-#define SPACE1_RANK 3
-#define SPACE1_DIM1 3
-#define SPACE1_DIM2 15
-#define SPACE1_DIM3 13
+#define SPACE1_RANK 3
+#define SPACE1_DIM1 3
+#define SPACE1_DIM2 15
+#define SPACE1_DIM3 13
/* 4-D dataset with one unlimited dimension */
-#define SPACE2_RANK 4
-#define SPACE2_DIM1 0
-#define SPACE2_DIM2 15
-#define SPACE2_DIM3 13
-#define SPACE2_DIM4 23
-#define SPACE2_MAX1 H5S_UNLIMITED
-#define SPACE2_MAX2 15
-#define SPACE2_MAX3 13
-#define SPACE2_MAX4 23
+#define SPACE2_RANK 4
+#define SPACE2_DIM1 0
+#define SPACE2_DIM2 15
+#define SPACE2_DIM3 13
+#define SPACE2_DIM4 23
+#define SPACE2_MAX1 H5S_UNLIMITED
+#define SPACE2_MAX2 15
+#define SPACE2_MAX3 13
+#define SPACE2_MAX4 23
/* Scalar dataset with simple datatype */
-#define SPACE3_RANK 0
+#define SPACE3_RANK 0
unsigned space3_data=65;
/* Scalar dataset with compound datatype */
-#define SPACE4_FIELDNAME1 "c1"
-#define SPACE4_FIELDNAME2 "u"
-#define SPACE4_FIELDNAME3 "f"
-#define SPACE4_FIELDNAME4 "c2"
+#define SPACE4_FIELDNAME1 "c1"
+#define SPACE4_FIELDNAME2 "u"
+#define SPACE4_FIELDNAME3 "f"
+#define SPACE4_FIELDNAME4 "c2"
size_t space4_field1_off=0;
size_t space4_field2_off=0;
size_t space4_field3_off=0;
@@ -89,21 +101,21 @@ struct space4_struct {
static void
test_h5s_basic(void)
{
- hid_t fid1; /* HDF5 File IDs */
- hid_t sid1, sid2; /* Dataspace ID */
- hid_t dset1; /* Dataset ID */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t sid1, sid2; /* Dataspace ID */
+ hid_t dset1; /* Dataset ID */
hid_t aid1; /* Attribute ID */
- int rank; /* Logical rank of dataspace */
- hsize_t dims1[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3};
- hsize_t dims2[] = {SPACE2_DIM1, SPACE2_DIM2, SPACE2_DIM3,
- SPACE2_DIM4};
- hsize_t dims3[H5S_MAX_RANK+1];
- hsize_t max2[] = {SPACE2_MAX1, SPACE2_MAX2, SPACE2_MAX3,
- SPACE2_MAX4};
- hsize_t tdims[4]; /* Dimension array to test with */
- hsize_t tmax[4];
- hssize_t n; /* Number of dataspace elements */
- herr_t ret; /* Generic return value */
+ int rank; /* Logical rank of dataspace */
+ hsize_t dims1[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3};
+ hsize_t dims2[] = {SPACE2_DIM1, SPACE2_DIM2, SPACE2_DIM3,
+ SPACE2_DIM4};
+ hsize_t dims3[H5S_MAX_RANK+1];
+ hsize_t max2[] = {SPACE2_MAX1, SPACE2_MAX2, SPACE2_MAX3,
+ SPACE2_MAX4};
+ hsize_t tdims[4]; /* Dimension array to test with */
+ hsize_t tmax[4];
+ hssize_t n; /* Number of dataspace elements */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Dataspace Manipulation\n"));
@@ -114,7 +126,7 @@ test_h5s_basic(void)
n = H5Sget_simple_extent_npoints(sid1);
CHECK(n, FAIL, "H5Sget_simple_extent_npoints");
VERIFY(n, SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3,
- "H5Sget_simple_extent_npoints");
+ "H5Sget_simple_extent_npoints");
rank = H5Sget_simple_extent_ndims(sid1);
CHECK(rank, FAIL, "H5Sget_simple_extent_ndims");
@@ -123,7 +135,7 @@ test_h5s_basic(void)
rank = H5Sget_simple_extent_dims(sid1, tdims, NULL);
CHECK(rank, FAIL, "H5Sget_simple_extent_dims");
VERIFY(HDmemcmp(tdims, dims1, SPACE1_RANK * sizeof(hsize_t)), 0,
- "H5Sget_simple_extent_dims");
+ "H5Sget_simple_extent_dims");
sid2 = H5Screate_simple(SPACE2_RANK, dims2, max2);
CHECK(sid2, FAIL, "H5Screate_simple");
@@ -131,7 +143,7 @@ test_h5s_basic(void)
n = H5Sget_simple_extent_npoints(sid2);
CHECK(n, FAIL, "H5Sget_simple_extent_npoints");
VERIFY(n, SPACE2_DIM1 * SPACE2_DIM2 * SPACE2_DIM3 * SPACE2_DIM4,
- "H5Sget_simple_extent_npoints");
+ "H5Sget_simple_extent_npoints");
rank = H5Sget_simple_extent_ndims(sid2);
CHECK(rank, FAIL, "H5Sget_simple_extent_ndims");
@@ -140,9 +152,9 @@ test_h5s_basic(void)
rank = H5Sget_simple_extent_dims(sid2, tdims, tmax);
CHECK(rank, FAIL, "H5Sget_simple_extent_dims");
VERIFY(HDmemcmp(tdims, dims2, SPACE2_RANK * sizeof(hsize_t)), 0,
- "H5Sget_simple_extent_dims");
+ "H5Sget_simple_extent_dims");
VERIFY(HDmemcmp(tmax, max2, SPACE2_RANK * sizeof(hsize_t)), 0,
- "H5Sget_simple_extent_dims");
+ "H5Sget_simple_extent_dims");
/* Change max dims to be equal to the dimensions */
ret = H5Sset_extent_simple(sid1, SPACE1_RANK, dims1, NULL);
@@ -150,9 +162,9 @@ test_h5s_basic(void)
rank = H5Sget_simple_extent_dims(sid1, tdims, tmax);
CHECK(rank, FAIL, "H5Sget_simple_extent_dims");
VERIFY(HDmemcmp(tdims, dims1, SPACE1_RANK * sizeof(hsize_t)), 0,
- "H5Sget_simple_extent_dims");
+ "H5Sget_simple_extent_dims");
VERIFY(HDmemcmp(tmax, dims1, SPACE1_RANK * sizeof(hsize_t)), 0,
- "H5Sget_simple_extent_dims");
+ "H5Sget_simple_extent_dims");
ret = H5Sclose(sid1);
CHECK(ret, FAIL, "H5Sclose");
@@ -165,7 +177,7 @@ test_h5s_basic(void)
* dimensions.
*/
H5E_BEGIN_TRY {
- sid1 = H5Screate_simple(H5S_MAX_RANK+1, dims3, NULL);
+ sid1 = H5Screate_simple(H5S_MAX_RANK+1, dims3, NULL);
} H5E_END_TRY;
VERIFY(sid1, FAIL, "H5Screate_simple");
@@ -288,7 +300,7 @@ test_h5s_basic(void)
CHECK(ret, FAIL, "H5Sclose");
ret = H5Fclose(fid1);
CHECK(ret, FAIL, "H5Fclose");
-} /* test_h5s_basic() */
+} /* test_h5s_basic() */
/****************************************************************
**
@@ -348,16 +360,16 @@ test_h5s_null(void)
hsize_t start[1]={0};
hsize_t count[1]={0};
- ret = H5Sselect_hyperslab(sid, H5S_SELECT_SET, start, NULL, count, NULL);
+ ret = H5Sselect_hyperslab(sid, H5S_SELECT_SET, start, NULL, count, NULL);
} H5E_END_TRY;
VERIFY(ret, FAIL, "H5Sselect_hyperslab");
/* Check to be sure we can't set a point selection on a null dataspace */
H5E_BEGIN_TRY {
- hsize_t coord[1][1]; /* Coordinates for point selection */
+ hsize_t coord[1][1]; /* Coordinates for point selection */
coord[0][0]=0;
- ret = H5Sselect_elements(sid, H5S_SELECT_SET, (size_t)1, (const hsize_t *)coord);
+ ret = H5Sselect_elements(sid, H5S_SELECT_SET, (size_t)1, (const hsize_t *)coord);
} H5E_END_TRY;
VERIFY(ret, FAIL, "H5Sselect_elements");
@@ -518,18 +530,18 @@ test_h5s_null(void)
static void
test_h5s_zero_dim(void)
{
- hid_t fid1; /* HDF5 File IDs */
- hid_t sid1, attr_sid; /* Dataspace ID */
- hid_t sid_chunk; /* Dataspace ID for chunked dataset */
- hid_t dset1; /* Dataset ID */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t sid1, attr_sid; /* Dataspace ID */
+ hid_t sid_chunk; /* Dataspace ID for chunked dataset */
+ hid_t dset1; /* Dataset ID */
hid_t plist_id; /* Dataset creation property list */
hid_t attr; /* Attribute ID */
- int rank; /* Logical rank of dataspace */
- hsize_t dims1[] = {0, SPACE1_DIM2, SPACE1_DIM3};
- hsize_t max_dims[] = {SPACE1_DIM1+1, SPACE1_DIM2, SPACE1_DIM3};
- hsize_t extend_dims[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3};
+ int rank; /* Logical rank of dataspace */
+ hsize_t dims1[] = {0, SPACE1_DIM2, SPACE1_DIM3};
+ hsize_t max_dims[] = {SPACE1_DIM1+1, SPACE1_DIM2, SPACE1_DIM3};
+ hsize_t extend_dims[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3};
hsize_t chunk_dims[] = {SPACE1_DIM1, SPACE1_DIM2/3, SPACE1_DIM3};
- hsize_t tdims[SPACE1_RANK]; /* Dimension array to test with */
+ hsize_t tdims[SPACE1_RANK]; /* Dimension array to test with */
int wdata[SPACE1_DIM2][SPACE1_DIM3];
int rdata[SPACE1_DIM2][SPACE1_DIM3];
short wdata_short[SPACE1_DIM2][SPACE1_DIM3];
@@ -539,12 +551,12 @@ test_h5s_zero_dim(void)
int val = 3;
hsize_t start[] = {0, 0, 0};
hsize_t count[] = {3, 15, 13};
- hsize_t coord[1][3]; /* Coordinates for point selection */
+ hsize_t coord[1][3]; /* Coordinates for point selection */
hssize_t nelem; /* Number of elements */
H5S_sel_type sel_type; /* Type of selection currently */
H5S_class_t stype; /* dataspace type */
H5D_alloc_time_t alloc_time; /* Space allocation time */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
unsigned int i, j, k;
/* Output message about test being performed */
@@ -620,8 +632,8 @@ test_h5s_zero_dim(void)
CHECK(sid_chunk, FAIL, "H5Screate_simple");
/*============================================
- * Make sure we can use 0-dimension to create
- * contiguous, chunked, compact, and external
+ * Make sure we can use 0-dimension to create
+ * contiguous, chunked, compact, and external
* datasets, and also attribute.
*============================================
*/
@@ -685,7 +697,7 @@ test_h5s_zero_dim(void)
}
}
- /* Select a hyperslab beyond its current dimension sizes, then try to write
+ /* Select a hyperslab beyond its current dimension sizes, then try to write
* the data. It should fail. */
ret = H5Sselect_hyperslab(sid1, H5S_SELECT_SET, start, NULL, count, NULL);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
@@ -699,7 +711,7 @@ test_h5s_zero_dim(void)
ret = H5Sselect_none(sid1);
CHECK(ret, FAIL, "H5Sselect_none");
- /* Select a point beyond the dimension size, then try to write the data.
+ /* Select a point beyond the dimension size, then try to write the data.
* It should fail. */
coord[0][0]=2; coord[0][1]=5; coord[0][2]=3;
ret = H5Sselect_elements(sid1, H5S_SELECT_SET, (size_t)1, (const hsize_t *)coord);
@@ -751,8 +763,8 @@ test_h5s_zero_dim(void)
}
}
- /* Now extend the dataset to SPACE1_DIM1*SPACE1_DIM2*SPACE1_DIM3 and make sure
- * we can write data to it */
+ /* Now extend the dataset to SPACE1_DIM1*SPACE1_DIM2*SPACE1_DIM3 and make sure
+ * we can write data to it */
extend_dims[0] = SPACE1_DIM1;
ret = H5Dset_extent(dset1, extend_dims);
CHECK(ret, FAIL, "H5Dset_extent");
@@ -952,10 +964,10 @@ test_h5s_zero_dim(void)
CHECK(ret, FAIL, "H5Aclose");
/*===============================================================
- * Extend the dimension to make it a normal dataspace (3x15x13).
- * Verify that data can be written to and read from the chunked
- * dataset now.
- *===============================================================
+ * Extend the dimension to make it a normal dataspace (3x15x13).
+ * Verify that data can be written to and read from the chunked
+ * dataset now.
+ *===============================================================
*/
dims1[0]=SPACE1_DIM1;
ret = H5Sset_extent_simple(sid_chunk,SPACE1_RANK,dims1,max_dims);
@@ -1156,14 +1168,14 @@ test_h5s_zero_dim(void)
static void
test_h5s_encode(void)
{
- hid_t sid1, sid2, sid3; /* Dataspace ID */
+ hid_t sid1, sid2, sid3; /* Dataspace ID */
hid_t decoded_sid1, decoded_sid2, decoded_sid3;
- int rank; /* Logical rank of dataspace */
- hsize_t dims1[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3};
+ int rank; /* Logical rank of dataspace */
+ hsize_t dims1[] = {SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3};
size_t sbuf_size=0, null_size=0, scalar_size=0;
unsigned char *sbuf=NULL, *null_sbuf=NULL, *scalar_buf=NULL;
- hsize_t tdims[4]; /* Dimension array to test with */
- hssize_t n; /* Number of dataspace elements */
+ hsize_t tdims[4]; /* Dimension array to test with */
+ hssize_t n; /* Number of dataspace elements */
hsize_t start[] = {0, 0, 0};
hsize_t stride[] = {2, 5, 3};
hsize_t count[] = {2, 2, 2};
@@ -1171,8 +1183,8 @@ test_h5s_encode(void)
H5S_sel_type sel_type;
H5S_class_t space_type;
hssize_t nblocks;
- hid_t ret_id; /* Generic hid_t return value */
- herr_t ret; /* Generic return value */
+ hid_t ret_id; /* Generic hid_t return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Dataspace Encoding and Decoding\n"));
@@ -1196,7 +1208,7 @@ test_h5s_encode(void)
/* Try decoding bogus buffer */
H5E_BEGIN_TRY {
- ret_id = H5Sdecode(sbuf);
+ ret_id = H5Sdecode(sbuf);
} H5E_END_TRY;
VERIFY(ret_id, FAIL, "H5Sdecode");
@@ -1211,7 +1223,7 @@ test_h5s_encode(void)
n = H5Sget_simple_extent_npoints(decoded_sid1);
CHECK(n, FAIL, "H5Sget_simple_extent_npoints");
VERIFY(n, SPACE1_DIM1 * SPACE1_DIM2 * SPACE1_DIM3,
- "H5Sget_simple_extent_npoints");
+ "H5Sget_simple_extent_npoints");
rank = H5Sget_simple_extent_ndims(decoded_sid1);
CHECK(rank, FAIL, "H5Sget_simple_extent_ndims");
@@ -1220,7 +1232,7 @@ test_h5s_encode(void)
rank = H5Sget_simple_extent_dims(decoded_sid1, tdims, NULL);
CHECK(rank, FAIL, "H5Sget_simple_extent_dims");
VERIFY(HDmemcmp(tdims, dims1, SPACE1_RANK * sizeof(hsize_t)), 0,
- "H5Sget_simple_extent_dims");
+ "H5Sget_simple_extent_dims");
/* Verify hyperslabe selection */
sel_type = H5Sget_select_type(decoded_sid1);
@@ -1310,7 +1322,7 @@ test_h5s_encode(void)
HDfree(sbuf);
HDfree(null_sbuf);
HDfree(scalar_buf);
-} /* test_h5s_encode() */
+} /* test_h5s_encode() */
/****************************************************************
**
@@ -1320,14 +1332,14 @@ test_h5s_encode(void)
static void
test_h5s_scalar_write(void)
{
- hid_t fid1; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t sid1; /* Dataspace ID */
- int rank; /* Logical rank of dataspace */
- hsize_t tdims[4]; /* Dimension array to test with */
- hssize_t n; /* Number of dataspace elements */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid1; /* Dataspace ID */
+ int rank; /* Logical rank of dataspace */
+ hsize_t tdims[4]; /* Dimension array to test with */
+ hssize_t n; /* Number of dataspace elements */
H5S_class_t ext_type; /* Extent type */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Scalar Dataspace Manipulation during Writing\n"));
@@ -1379,7 +1391,7 @@ test_h5s_scalar_write(void)
/* Close file */
ret = H5Fclose(fid1);
CHECK(ret, FAIL, "H5Fclose");
-} /* test_h5s_scalar_write() */
+} /* test_h5s_scalar_write() */
/****************************************************************
**
@@ -1389,14 +1401,14 @@ test_h5s_scalar_write(void)
static void
test_h5s_scalar_read(void)
{
- hid_t fid1; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t sid1; /* Dataspace ID */
- int rank; /* Logical rank of dataspace */
- hsize_t tdims[4]; /* Dimension array to test with */
- hssize_t n; /* Number of dataspace elements */
- unsigned rdata; /* Scalar data read in */
- herr_t ret; /* Generic return value */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid1; /* Dataspace ID */
+ int rank; /* Logical rank of dataspace */
+ hsize_t tdims[4]; /* Dimension array to test with */
+ hssize_t n; /* Number of dataspace elements */
+ unsigned rdata; /* Scalar data read in */
+ herr_t ret; /* Generic return value */
H5S_class_t ext_type; /* Extent type */
/* Output message about test being performed */
@@ -1443,7 +1455,7 @@ test_h5s_scalar_read(void)
/* Close file */
ret = H5Fclose(fid1);
CHECK(ret, FAIL, "H5Fclose");
-} /* test_h5s_scalar_read() */
+} /* test_h5s_scalar_read() */
/****************************************************************
**
@@ -1454,14 +1466,14 @@ test_h5s_scalar_read(void)
static void
test_h5s_compound_scalar_write(void)
{
- hid_t fid1; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t tid1; /* Attribute datatype ID */
- hid_t sid1; /* Dataspace ID */
- int rank; /* Logical rank of dataspace */
- hsize_t tdims[4]; /* Dimension array to test with */
- hssize_t n; /* Number of dataspace elements */
- herr_t ret; /* Generic return value */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t tid1; /* Attribute datatype ID */
+ hid_t sid1; /* Dataspace ID */
+ int rank; /* Logical rank of dataspace */
+ hsize_t tdims[4]; /* Dimension array to test with */
+ hssize_t n; /* Number of dataspace elements */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Scalar Dataspace Manipulation for Writing Compound Datatypes\n"));
@@ -1475,19 +1487,19 @@ test_h5s_compound_scalar_write(void)
CHECK(tid1, FAIL, "H5Tcreate");
space4_field1_off=HOFFSET(struct space4_struct, c1);
ret = H5Tinsert(tid1, SPACE4_FIELDNAME1, space4_field1_off,
- H5T_NATIVE_SCHAR);
+ H5T_NATIVE_SCHAR);
CHECK(ret, FAIL, "H5Tinsert");
space4_field2_off=HOFFSET(struct space4_struct, u);
ret = H5Tinsert(tid1, SPACE4_FIELDNAME2, space4_field2_off,
- H5T_NATIVE_UINT);
+ H5T_NATIVE_UINT);
CHECK(ret, FAIL, "H5Tinsert");
space4_field3_off=HOFFSET(struct space4_struct, f);
ret = H5Tinsert(tid1, SPACE4_FIELDNAME3, space4_field3_off,
- H5T_NATIVE_FLOAT);
+ H5T_NATIVE_FLOAT);
CHECK(ret, FAIL, "H5Tinsert");
space4_field4_off=HOFFSET(struct space4_struct, c2);
ret = H5Tinsert(tid1, SPACE4_FIELDNAME4, space4_field4_off,
- H5T_NATIVE_SCHAR);
+ H5T_NATIVE_SCHAR);
CHECK(ret, FAIL, "H5Tinsert");
/* Create scalar dataspace */
@@ -1527,7 +1539,7 @@ test_h5s_compound_scalar_write(void)
/* Close file */
ret = H5Fclose(fid1);
CHECK(ret, FAIL, "H5Fclose");
-} /* test_h5s_compound_scalar_write() */
+} /* test_h5s_compound_scalar_write() */
/****************************************************************
**
@@ -1538,15 +1550,15 @@ test_h5s_compound_scalar_write(void)
static void
test_h5s_compound_scalar_read(void)
{
- hid_t fid1; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t sid1; /* Dataspace ID */
- hid_t type; /* Datatype */
- int rank; /* Logical rank of dataspace */
- hsize_t tdims[4]; /* Dimension array to test with */
- hssize_t n; /* Number of dataspace elements */
- struct space4_struct rdata; /* Scalar data read in */
- herr_t ret; /* Generic return value */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid1; /* Dataspace ID */
+ hid_t type; /* Datatype */
+ int rank; /* Logical rank of dataspace */
+ hsize_t tdims[4]; /* Dimension array to test with */
+ hssize_t n; /* Number of dataspace elements */
+ struct space4_struct rdata; /* Scalar data read in */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Scalar Dataspace Manipulation for Reading Compound Datatypes\n"));
@@ -1600,7 +1612,7 @@ test_h5s_compound_scalar_read(void)
/* Close file */
ret = H5Fclose(fid1);
CHECK(ret, FAIL, "H5Fclose");
-} /* test_h5s_compound_scalar_read() */
+} /* test_h5s_compound_scalar_read() */
/* Data arrays for chunk test */
double chunk_data_dbl[50000][3];
@@ -2366,6 +2378,130 @@ test_h5s_bug1(void)
CHECK(ret, FAIL, "H5Sclose");
} /* test_h5s_bug1() */
+
+/*-------------------------------------------------------------------------
+ * Function: test_versionbounds
+ *
+ * Purpose: Tests version bounds with dataspace.
+ *
+ * Description:
+ * This function creates a file with lower bounds then later
+ * reopens it with higher bounds to show that the dataspace
+ * version is upgraded appropriately.
+ *
+ * Return: Success: 0
+ * Failure: number of errors
+ *
+ *-------------------------------------------------------------------------
+ */
+#define VERBFNAME "tverbounds_dspace.h5"
+#define BASIC_DSET "Basic Dataset"
+#define LATEST_DSET "Latest Dataset"
+static void
+test_versionbounds(void)
+{
+ hid_t file = -1; /* File ID */
+ hid_t space = -1; /* Dataspace ID */
+ hid_t dset = -1; /* Dataset ID */
+ hid_t fapl = -1; /* File access property list ID */
+ hid_t dset_space = -1; /* Retrieved dataset's dataspace ID */
+ hsize_t dim[1]; /* Dataset dimensions */
+ H5F_libver_t low, high; /* File format bounds */
+ H5S_t *spacep = NULL; /* Pointer to internal dataspace */
+ herr_t ret = 0; /* Generic return value */
+
+ /* Output message about test being performed */
+ MESSAGE(5, ("Testing Version Bounds\n"));
+
+ /* Create a file access property list */
+ fapl = H5Pcreate(H5P_FILE_ACCESS);
+ CHECK(fapl, FAIL, "H5Pcreate");
+
+ /* Create dataspace */
+ dim[0] = 10;
+ space = H5Screate_simple(1, dim, NULL);
+ CHECK(space, FAIL, "H5Screate");
+
+ /* Its version should be H5O_SDSPACE_VERSION_1 */
+ spacep = (H5S_t *)H5I_object(space);
+ CHECK(spacep, NULL, "H5I_object");
+ VERIFY(spacep->extent.version, H5O_SDSPACE_VERSION_1, "basic dataspace version bound");
+
+ /* Set high bound to V18 */
+ low = H5F_LIBVER_EARLIEST;
+ high = H5F_LIBVER_V18;
+ ret = H5Pset_libver_bounds(fapl, low, high);
+ CHECK(ret, FAIL, "H5Pset_libver_bounds");
+
+ /* Create the file */
+ file = H5Fcreate(VERBFNAME, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
+ CHECK(file, FAIL, "H5Fcreate");
+
+ /* Create a basic dataset */
+ dset = H5Dcreate2(file, BASIC_DSET, H5T_NATIVE_INT, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ if (dset > 0) /* dataset created successfully */
+ {
+ /* Get the internal dataspace pointer */
+ dset_space = H5Dget_space(dset);
+ CHECK(dset_space, FAIL, "H5Dget_space");
+ spacep = (H5S_t *)H5I_object(dset_space);
+ CHECK(spacep, NULL, "H5I_object");
+
+ /* Dataspace version should remain as H5O_SDSPACE_VERSION_1 */
+ VERIFY(spacep->extent.version, H5O_SDSPACE_VERSION_1, "basic dataspace version bound");
+
+ /* Close dataspace */
+ ret = H5Sclose(dset_space);
+ CHECK(ret, FAIL, "H5Sclose");
+ }
+
+ /* Close basic dataset and the file */
+ ret = H5Dclose(dset);
+ CHECK(ret, FAIL, "H5Dclose");
+ ret = H5Fclose(file);
+ CHECK(ret, FAIL, "H5Fclose");
+
+ /* Set low and high bounds to latest to trigger the increment of the
+ dataspace version */
+ low = H5F_LIBVER_LATEST;
+ high = H5F_LIBVER_LATEST;
+ ret = H5Pset_libver_bounds(fapl, low, high);
+ CHECK(ret, FAIL, "H5Pset_libver_bounds");
+
+ /* Reopen the file with new version bounds, LATEST/LATEST */
+ file = H5Fopen(VERBFNAME, H5F_ACC_RDWR, fapl);
+
+ /* Create another dataset using the same dspace as the previous dataset */
+ dset = H5Dcreate2(file, LATEST_DSET, H5T_NATIVE_INT, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(dset, FAIL, "H5Dcreate2");
+
+ /* Dataset created successfully. Verify that dataspace version has been
+ upgraded per the low bound */
+
+ /* Get the internal dataspace pointer */
+ dset_space = H5Dget_space(dset);
+ CHECK(dset_space, FAIL, "H5Dget_space");
+ spacep = (H5S_t *)H5I_object(dset_space);
+ CHECK(spacep, NULL, "H5I_object");
+
+ /* Verify the dataspace version */
+ VERIFY(spacep->extent.version, H5O_sdspace_ver_bounds[low], "upgraded dataspace version");
+
+ /* Close everything */
+ ret = H5Sclose(dset_space);
+ CHECK(ret, FAIL, "H5Sclose");
+ ret = H5Dclose(dset);
+ CHECK(ret, FAIL, "H5Dclose");
+
+ ret = H5Sclose(space);
+ CHECK(ret, FAIL, "H5Sclose");
+ ret = H5Pclose(fapl);
+ CHECK(ret, FAIL, "H5Pclose");
+ ret = H5Fclose(file);
+ CHECK(ret, FAIL, "H5Fclose");
+} /* end test_versionbounds() */
+
+
/****************************************************************
**
** test_h5s(): Main H5S (dataspace) testing routine.
@@ -2377,33 +2513,34 @@ test_h5s(void)
/* Output message about test being performed */
MESSAGE(5, ("Testing Dataspaces\n"));
- test_h5s_basic(); /* Test basic H5S code */
- test_h5s_null(); /* Test Null dataspace H5S code */
+ test_h5s_basic(); /* Test basic H5S code */
+ test_h5s_null(); /* Test Null dataspace H5S code */
test_h5s_zero_dim(); /* Test dataspace with zero dimension size */
test_h5s_encode(); /* Test encoding and decoding */
- test_h5s_scalar_write(); /* Test scalar H5S writing code */
- test_h5s_scalar_read(); /* Test scalar H5S reading code */
+ test_h5s_scalar_write(); /* Test scalar H5S writing code */
+ test_h5s_scalar_read(); /* Test scalar H5S reading code */
- test_h5s_compound_scalar_write(); /* Test compound datatype scalar H5S writing code */
- test_h5s_compound_scalar_read(); /* Test compound datatype scalar H5S reading code */
+ test_h5s_compound_scalar_write(); /* Test compound datatype scalar H5S writing code */
+ test_h5s_compound_scalar_read(); /* Test compound datatype scalar H5S reading code */
/* This test was added later to exercise a bug in chunked I/O */
- test_h5s_chunk(); /* Exercise bug fix for chunked I/O */
+ test_h5s_chunk(); /* Exercise bug fix for chunked I/O */
- test_h5s_extent_equal(); /* Test extent comparison code */
+ test_h5s_extent_equal(); /* Test extent comparison code */
test_h5s_extent_copy(); /* Test extent copy code */
test_h5s_bug1(); /* Test bug in offset initialization */
+ test_versionbounds(); /* Test version bounds with dataspace */
} /* test_h5s() */
-
+
/*-------------------------------------------------------------------------
- * Function: cleanup_h5s
+ * Function: cleanup_h5s
*
- * Purpose: Cleanup temporary test files
+ * Purpose: Cleanup temporary test files
*
- * Return: none
+ * Return: none
*
- * Programmer: Albert Cheng
+ * Programmer: Albert Cheng
* July 2, 1998
*
* Modifications:
@@ -2417,4 +2554,5 @@ cleanup_h5s(void)
remove(NULLFILE);
remove(BASICFILE);
remove(ZEROFILE);
+ remove(VERBFNAME);
}
diff --git a/test/theap.c b/test/theap.c
index 9c509a1..7b2fadb 100644
--- a/test/theap.c
+++ b/test/theap.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
@@ -90,11 +88,11 @@ test_heap_init(void)
/* Allocate arrays */
rand_num = (test_obj *)HDmalloc(sizeof(test_obj) * NUM_ELEMS);
- CHECK(rand_num, NULL, "HDmalloc");
+ CHECK_PTR(rand_num, "HDmalloc");
inc_sort_num = (test_obj *)HDmalloc(sizeof(test_obj) * NUM_ELEMS);
- CHECK(inc_sort_num, NULL, "HDmalloc");
+ CHECK_PTR(inc_sort_num, "HDmalloc");
dec_sort_num = (test_obj *)HDmalloc(sizeof(test_obj) * NUM_ELEMS);
- CHECK(dec_sort_num, NULL, "HDmalloc");
+ CHECK_PTR(dec_sort_num, "HDmalloc");
/* Create randomized set of numbers */
curr_time = HDtime(NULL);
@@ -129,7 +127,7 @@ test_heap_create(void)
/* Try creating a maximum Heap */
heap=H5HP_create(H5HP_MAX_HEAP);
- CHECK(heap, NULL, "H5HP_create");
+ CHECK_PTR(heap, "H5HP_create");
/* Try closing the heap */
ret=H5HP_close(heap);
@@ -137,7 +135,7 @@ test_heap_create(void)
/* Try creating a minimum Heap */
heap=H5HP_create(H5HP_MIN_HEAP);
- CHECK(heap, NULL, "H5HP_create");
+ CHECK_PTR(heap, "H5HP_create");
/* Try closing the heap */
ret=H5HP_close(heap);
@@ -165,7 +163,7 @@ test_heap_insert_min(void)
/* Create a Heap */
heap=H5HP_create(H5HP_MIN_HEAP);
- CHECK(heap, NULL, "H5HP_create");
+ CHECK_PTR(heap, "H5HP_create");
/* Check that the heap has no elements */
num=H5HP_count(heap);
@@ -239,7 +237,7 @@ test_heap_insert_max(void)
/* Create a Heap */
heap=H5HP_create(H5HP_MAX_HEAP);
- CHECK(heap, NULL, "H5HP_create");
+ CHECK_PTR(heap, "H5HP_create");
/* Check that the heap has no elements */
num=H5HP_count(heap);
@@ -327,7 +325,7 @@ test_heap_insert_many_core(H5HP_type_t heap_type, test_obj *arr, size_t nelem, i
/* Create a Heap */
heap=H5HP_create(heap_type);
- CHECK(heap, NULL, "H5HP_create");
+ CHECK_PTR(heap, "H5HP_create");
/* Check that the heap has no elements */
num=H5HP_count(heap);
@@ -407,7 +405,7 @@ test_heap_remove_min(void)
/* Create a Heap */
heap=H5HP_create(H5HP_MIN_HEAP);
- CHECK(heap, NULL, "H5HP_create");
+ CHECK_PTR(heap, "H5HP_create");
/* Check that the heap has no elements */
num=H5HP_count(heap);
@@ -436,19 +434,19 @@ test_heap_remove_min(void)
ret=H5HP_remove(heap,&val,&ptr);
CHECK(ret, FAIL, "H5HP_remove");
VERIFY(val, 5, "H5HP_remove");
- VERIFY(ptr, &obj2, "H5HP_remove");
+ CHECK_PTR_EQ(ptr, &obj2, "H5HP_remove");
/* Remove second maximum value from heap */
ret=H5HP_remove(heap,&val,&ptr);
CHECK(ret, FAIL, "H5HP_remove");
VERIFY(val, 10, "H5HP_remove");
- VERIFY(ptr, &obj1, "H5HP_remove");
+ CHECK_PTR_EQ(ptr, &obj1, "H5HP_remove");
/* Remove third maximum value from heap */
ret=H5HP_remove(heap,&val,&ptr);
CHECK(ret, FAIL, "H5HP_remove");
VERIFY(val, 20, "H5HP_remove");
- VERIFY(ptr, &obj3, "H5HP_remove");
+ CHECK_PTR_EQ(ptr, &obj3, "H5HP_remove");
/* Try removing an object from an empty heap */
ret=H5HP_remove(heap,&val,&ptr);
@@ -481,7 +479,7 @@ test_heap_remove_max(void)
/* Create a Heap */
heap=H5HP_create(H5HP_MAX_HEAP);
- CHECK(heap, NULL, "H5HP_create");
+ CHECK_PTR(heap, "H5HP_create");
/* Check that the heap has no elements */
num=H5HP_count(heap);
@@ -510,19 +508,19 @@ test_heap_remove_max(void)
ret=H5HP_remove(heap,&val,&ptr);
CHECK(ret, FAIL, "H5HP_remove");
VERIFY(val, 20, "H5HP_remove");
- VERIFY(ptr, &obj3, "H5HP_remove");
+ CHECK_PTR_EQ(ptr, &obj3, "H5HP_remove");
/* Remove second maximum value from heap */
ret=H5HP_remove(heap,&val,&ptr);
CHECK(ret, FAIL, "H5HP_remove");
VERIFY(val, 10, "H5HP_remove");
- VERIFY(ptr, &obj1, "H5HP_remove");
+ CHECK_PTR_EQ(ptr, &obj1, "H5HP_remove");
/* Remove third maximum value from heap */
ret=H5HP_remove(heap,&val,&ptr);
CHECK(ret, FAIL, "H5HP_remove");
VERIFY(val, 5, "H5HP_remove");
- VERIFY(ptr, &obj2, "H5HP_remove");
+ CHECK_PTR_EQ(ptr, &obj2, "H5HP_remove");
/* Try removing an object from an empty heap */
ret=H5HP_remove(heap,&val,&ptr);
@@ -569,7 +567,7 @@ static void test_heap_remove_many_core(H5HP_type_t heap_type, test_obj *arr, siz
/* Create a Heap */
heap=H5HP_create(heap_type);
- CHECK(heap, NULL, "H5HP_create");
+ CHECK_PTR(heap, "H5HP_create");
/* Check that the heap has no elements */
num=H5HP_count(heap);
@@ -716,7 +714,7 @@ test_heap_change_min(void)
/* Create a Heap */
heap=H5HP_create(H5HP_MIN_HEAP);
- CHECK(heap, NULL, "H5HP_create");
+ CHECK_PTR(heap, "H5HP_create");
/* Check that the heap has no elements */
num=H5HP_count(heap);
@@ -790,7 +788,7 @@ test_heap_change_max(void)
/* Create a Heap */
heap=H5HP_create(H5HP_MAX_HEAP);
- CHECK(heap, NULL, "H5HP_create");
+ CHECK_PTR(heap, "H5HP_create");
/* Check that the heap has no elements */
num=H5HP_count(heap);
@@ -882,7 +880,7 @@ test_heap_incdec_min(void)
/* Create a Heap */
heap=H5HP_create(H5HP_MIN_HEAP);
- CHECK(heap, NULL, "H5HP_create");
+ CHECK_PTR(heap, "H5HP_create");
/* Check that the heap has no elements */
num=H5HP_count(heap);
@@ -957,7 +955,7 @@ test_heap_incdec_max(void)
/* Create a Heap */
heap=H5HP_create(H5HP_MAX_HEAP);
- CHECK(heap, NULL, "H5HP_create");
+ CHECK_PTR(heap, "H5HP_create");
/* Check that the heap has no elements */
num=H5HP_count(heap);
diff --git a/test/tid.c b/test/tid.c
index 6570b1c..8a27c3b 100644
--- a/test/tid.c
+++ b/test/tid.c
@@ -5,330 +5,329 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* Test user-created identifiers (hid_t's) and identifier types. */
#include "testhdf5.h"
-#include "hdf5.h"
- /* Include H5Ipkg.h to calculate max number of groups */
-#define H5I_FRIEND /*suppress error about including H5Ipkg */
+/* Include H5Ipkg.h to calculate max number of groups */
+#define H5I_FRIEND /*suppress error about including H5Ipkg */
#include "H5Ipkg.h"
- /* Test basic functionality of registering and deleting types and IDs */
+/* Test basic functionality of registering and deleting types and IDs */
static int basic_id_test(void)
{
- H5I_type_t myType = H5I_BADID;
- hid_t arrayID = H5I_INVALID_HID;
- void* testObj = NULL;
- void* testPtr = NULL;
- char nameString[10];
- hid_t testID;
- ssize_t testSize = -1;
- herr_t err;
- int num_ref;
- hsize_t num_members;
-
-
- /* Try to register an ID with ficticious types */
- H5E_BEGIN_TRY
- arrayID = H5Iregister((H5I_type_t) 420, testObj);
- H5E_END_TRY
-
- VERIFY(arrayID, H5I_INVALID_HID, "H5Iregister");
- if(arrayID != H5I_INVALID_HID)
- goto out;
-
- H5E_BEGIN_TRY
- arrayID = H5Iregister((H5I_type_t) -1, testObj);
- H5E_END_TRY
-
- VERIFY(arrayID, H5I_INVALID_HID, "H5Iregister");
- if(arrayID != H5I_INVALID_HID)
- goto out;
-
- /* Try to access IDs with ficticious types */
- H5E_BEGIN_TRY
- testPtr = H5Iobject_verify((hid_t)100, (H5I_type_t) 0);
- H5E_END_TRY
-
- VERIFY(testPtr, NULL, "H5Iobject_verify");
- if(testPtr != NULL)
- goto out;
-
- H5E_BEGIN_TRY
- testPtr = H5Iobject_verify((hid_t)700, (H5I_type_t) 700);
- H5E_END_TRY
-
- VERIFY(testPtr, NULL, "H5Iobject_verify");
- if(testPtr != NULL)
- goto out;
-
- /* Register a type */
- myType = H5Iregister_type((size_t)64, 0, (H5I_free_t) free );
-
- CHECK(myType, H5I_BADID, "H5Iregister_type");
- if(myType == H5I_BADID)
- goto out;
-
- /* Register an ID and retrieve the object it points to.
- * Once the ID has been registered, testObj will be freed when
- * its ID type is destroyed. */
- testObj = HDmalloc(7 * sizeof(int));
- arrayID = H5Iregister(myType, testObj);
-
- CHECK(arrayID, H5I_INVALID_HID, "H5Iregister");
- if(arrayID == H5I_INVALID_HID)
- {
- HDfree(testObj);
- goto out;
- }
-
- testPtr = (int *) H5Iobject_verify(arrayID, myType);
-
- VERIFY(testPtr, testObj, "H5Iobject_verify");
- if(testPtr != testObj)
- goto out;
-
- /* Ensure that H5Iget_file_id and H5Iget_name() fail, since this
- * is an hid_t for the wrong kind of object */
- H5E_BEGIN_TRY
- testID = H5Iget_file_id(arrayID);
- H5E_END_TRY
-
- VERIFY(testID, H5I_INVALID_HID, "H5Iget_file_id");
- if(testID != H5I_INVALID_HID)
- goto out;
-
- H5E_BEGIN_TRY
- testSize = H5Iget_name(arrayID, nameString, (size_t)9);
- H5E_END_TRY
-
- VERIFY(testSize, -1, "H5Iget_name");
- if(testSize != -1)
- goto out;
-
- /* Make sure H5Iremove_verify catches objects of the wrong type */
- H5E_BEGIN_TRY
- testPtr = (int*) H5Iremove_verify(arrayID, (H5I_type_t) 0);
- H5E_END_TRY
-
- VERIFY(testPtr, NULL, "H5Iremove_verify");
- if(testPtr != NULL)
- goto out;
-
- H5E_BEGIN_TRY
- testPtr = (int*) H5Iremove_verify(arrayID, (H5I_type_t) ((int) myType-1));
- H5E_END_TRY
-
- VERIFY(testPtr, NULL, "H5Iremove_verify");
- if(testPtr != NULL)
- goto out;
-
- /* Remove an ID and make sure we can't access it */
- testPtr = (int*) H5Iremove_verify(arrayID, myType);
-
- CHECK(testPtr, NULL, "H5Iremove_verify");
- if(testPtr == NULL)
- goto out;
-
- H5E_BEGIN_TRY
- testPtr = (int*) H5Iobject_verify(arrayID, myType);
- H5E_END_TRY
-
- VERIFY(testPtr, NULL, "H5Iobject_verify");
- if(testPtr != NULL)
- goto out;
-
- /* Delete the type and make sure we can't access objects within it */
- arrayID = H5Iregister(myType, testObj);
-
- err = H5Idestroy_type(myType);
- VERIFY(err, 0, "H5Idestroy_type");
- if( err != 0)
- goto out;
- VERIFY(H5Itype_exists(myType), 0, "H5Itype_exists");
- if(H5Itype_exists(myType) != 0)
- goto out;
+ H5I_type_t myType = H5I_BADID;
+ hid_t arrayID = H5I_INVALID_HID;
+ void* testObj = NULL;
+ void* testPtr = NULL;
+ char nameString[10];
+ hid_t testID;
+ ssize_t testSize = -1;
+ herr_t err;
+ int num_ref;
+ hsize_t num_members;
+
+
+ /* Try to register an ID with ficticious types */
+ H5E_BEGIN_TRY
+ arrayID = H5Iregister((H5I_type_t) 420, testObj);
+ H5E_END_TRY
- H5E_BEGIN_TRY
- VERIFY(H5Inmembers(myType, NULL), -1, "H5Inmembers");
- if(H5Inmembers(myType, NULL) != -1)
- goto out;
- H5E_END_TRY
-
- /* Register another type and another object in that type */
- myType = H5Iregister_type((size_t)64, 0, (H5I_free_t) free );
-
- CHECK(myType, H5I_BADID, "H5Iregister_type");
- if(myType == H5I_BADID)
- goto out;
-
- /* The memory that testObj pointed to should already have been
- * freed when the previous type was destroyed. Allocate new
- * memory for it.
- */
- testObj = HDmalloc(7 * sizeof(int));
- arrayID = H5Iregister(myType, testObj);
-
- CHECK(arrayID, H5I_INVALID_HID, "H5Iregister");
- if(arrayID == H5I_INVALID_HID)
- {
- HDfree(testObj);
- goto out;
- }
-
- err = H5Inmembers(myType, &num_members);
- CHECK(err, -1, "H5Inmembers");
- if (err < 0)
- goto out;
- VERIFY(num_members, 1, "H5Inmembers");
- if(num_members != 1)
- goto out;
-
- /* Increment references to type and ensure that dec_type_ref
- doesn't destroy the type */
- num_ref = H5Iinc_type_ref(myType);
- VERIFY(num_ref, 2, "H5Iinc_type_ref");
- if( num_ref != 2)
- goto out;
- num_ref = H5Idec_type_ref(myType);
- VERIFY(num_ref, 1, "H5Idec_type_ref");
- if(num_ref != 1)
- goto out;
- err = H5Inmembers(myType, &num_members);
- CHECK(err, -1, "H5Inmembers");
- if (err < 0)
- goto out;
- VERIFY(num_members, 1, "H5Inmembers");
- if(num_members != 1)
- goto out;
-
- /* This call to dec_type_ref should destroy the type */
- num_ref = H5Idec_type_ref(myType);
- VERIFY(num_ref, 0, "H5Idec_type_ref");
- if(num_ref != 0)
- goto out;
- VERIFY(H5Itype_exists(myType), 0, "H5Itype_exists");
- if (H5Itype_exists(myType) != 0)
+ VERIFY(arrayID, H5I_INVALID_HID, "H5Iregister");
+ if(arrayID != H5I_INVALID_HID)
+ goto out;
+
+ H5E_BEGIN_TRY
+ arrayID = H5Iregister((H5I_type_t) -1, testObj);
+ H5E_END_TRY
+
+ VERIFY(arrayID, H5I_INVALID_HID, "H5Iregister");
+ if(arrayID != H5I_INVALID_HID)
+ goto out;
+
+ /* Try to access IDs with ficticious types */
+ H5E_BEGIN_TRY
+ testPtr = H5Iobject_verify((hid_t)100, (H5I_type_t) 0);
+ H5E_END_TRY
+
+ CHECK_PTR_NULL(testPtr, "H5Iobject_verify");
+ if(testPtr != NULL)
+ goto out;
+
+ H5E_BEGIN_TRY
+ testPtr = H5Iobject_verify((hid_t)700, (H5I_type_t) 700);
+ H5E_END_TRY
+
+ CHECK_PTR_NULL(testPtr, "H5Iobject_verify");
+ if(testPtr != NULL)
+ goto out;
+
+ /* Register a type */
+ myType = H5Iregister_type((size_t)64, 0, (H5I_free_t) free );
+
+ CHECK(myType, H5I_BADID, "H5Iregister_type");
+ if(myType == H5I_BADID)
+ goto out;
+
+ /* Register an ID and retrieve the object it points to.
+ * Once the ID has been registered, testObj will be freed when
+ * its ID type is destroyed.
+ */
+ testObj = HDmalloc(7 * sizeof(int));
+ arrayID = H5Iregister(myType, testObj);
+
+ CHECK(arrayID, H5I_INVALID_HID, "H5Iregister");
+ if(arrayID == H5I_INVALID_HID) {
+ HDfree(testObj);
+ goto out;
+ }
+
+ testPtr = (int *)H5Iobject_verify(arrayID, myType);
+
+ CHECK_PTR_EQ(testPtr, testObj, "H5Iobject_verify");
+ if(testPtr != testObj)
+ goto out;
+
+ /* Ensure that H5Iget_file_id and H5Iget_name() fail, since this
+ * is an hid_t for the wrong kind of object
+ */
+ H5E_BEGIN_TRY
+ testID = H5Iget_file_id(arrayID);
+ H5E_END_TRY
+
+ VERIFY(testID, H5I_INVALID_HID, "H5Iget_file_id");
+ if(testID != H5I_INVALID_HID)
+ goto out;
+
+ H5E_BEGIN_TRY
+ testSize = H5Iget_name(arrayID, nameString, (size_t)9);
+ H5E_END_TRY
+
+ VERIFY(testSize, -1, "H5Iget_name");
+ if(testSize != -1)
+ goto out;
+
+ /* Make sure H5Iremove_verify catches objects of the wrong type */
+ H5E_BEGIN_TRY
+ testPtr = (int*) H5Iremove_verify(arrayID, (H5I_type_t) 0);
+ H5E_END_TRY
+
+ CHECK_PTR_NULL(testPtr, "H5Iremove_verify");
+ if(testPtr != NULL)
+ goto out;
+
+ H5E_BEGIN_TRY
+ testPtr = (int*) H5Iremove_verify(arrayID, (H5I_type_t) ((int) myType-1));
+ H5E_END_TRY
+
+ CHECK_PTR_NULL(testPtr, "H5Iremove_verify");
+ if(testPtr != NULL)
+ goto out;
+
+ /* Remove an ID and make sure we can't access it */
+ testPtr = (int*) H5Iremove_verify(arrayID, myType);
+
+ CHECK_PTR(testPtr, "H5Iremove_verify");
+ if(testPtr == NULL)
+ goto out;
+
+ H5E_BEGIN_TRY
+ testPtr = (int*) H5Iobject_verify(arrayID, myType);
+ H5E_END_TRY
+
+ CHECK_PTR_NULL(testPtr, "H5Iobject_verify");
+ if(testPtr != NULL)
+ goto out;
+
+ /* Delete the type and make sure we can't access objects within it */
+ arrayID = H5Iregister(myType, testObj);
+
+ err = H5Idestroy_type(myType);
+ VERIFY(err, 0, "H5Idestroy_type");
+ if( err != 0)
+ goto out;
+ VERIFY(H5Itype_exists(myType), 0, "H5Itype_exists");
+ if(H5Itype_exists(myType) != 0)
+ goto out;
+
+ H5E_BEGIN_TRY
+ VERIFY(H5Inmembers(myType, NULL), -1, "H5Inmembers");
+ if(H5Inmembers(myType, NULL) != -1)
goto out;
+ H5E_END_TRY
+
+ /* Register another type and another object in that type */
+ myType = H5Iregister_type((size_t)64, 0, (H5I_free_t) free );
- H5E_BEGIN_TRY
+ CHECK(myType, H5I_BADID, "H5Iregister_type");
+ if(myType == H5I_BADID)
+ goto out;
+
+ /* The memory that testObj pointed to should already have been
+ * freed when the previous type was destroyed. Allocate new
+ * memory for it.
+ */
+ testObj = HDmalloc(7 * sizeof(int));
+ arrayID = H5Iregister(myType, testObj);
+
+ CHECK(arrayID, H5I_INVALID_HID, "H5Iregister");
+ if(arrayID == H5I_INVALID_HID) {
+ HDfree(testObj);
+ goto out;
+ }
+
+ err = H5Inmembers(myType, &num_members);
+ CHECK(err, -1, "H5Inmembers");
+ if (err < 0)
+ goto out;
+ VERIFY(num_members, 1, "H5Inmembers");
+ if(num_members != 1)
+ goto out;
+
+ /* Increment references to type and ensure that dec_type_ref
+ * doesn't destroy the type
+ */
+ num_ref = H5Iinc_type_ref(myType);
+ VERIFY(num_ref, 2, "H5Iinc_type_ref");
+ if( num_ref != 2)
+ goto out;
+ num_ref = H5Idec_type_ref(myType);
+ VERIFY(num_ref, 1, "H5Idec_type_ref");
+ if(num_ref != 1)
+ goto out;
+ err = H5Inmembers(myType, &num_members);
+ CHECK(err, -1, "H5Inmembers");
+ if (err < 0)
+ goto out;
+ VERIFY(num_members, 1, "H5Inmembers");
+ if(num_members != 1)
+ goto out;
+
+ /* This call to dec_type_ref should destroy the type */
+ num_ref = H5Idec_type_ref(myType);
+ VERIFY(num_ref, 0, "H5Idec_type_ref");
+ if(num_ref != 0)
+ goto out;
+ VERIFY(H5Itype_exists(myType), 0, "H5Itype_exists");
+ if (H5Itype_exists(myType) != 0)
+ goto out;
+
+ H5E_BEGIN_TRY
err = H5Inmembers(myType, &num_members);
- if(err >= 0)
- goto out;
- H5E_END_TRY
+ if(err >= 0)
+ goto out;
+ H5E_END_TRY
- return 0;
+ return 0;
out:
- /* Clean up type if it has been allocated and free memory used
- * by testObj */
- if(myType >= 0)
- H5Idestroy_type(myType);
+ /* Clean up type if it has been allocated and free memory used
+ * by testObj
+ */
+ if(myType >= 0)
+ H5Idestroy_type(myType);
- return -1;
+ return -1;
}
- /* A dummy search function for the next test */
+ /* A dummy search function for the next test */
static int test_search_func(void H5_ATTR_UNUSED * ptr1, void H5_ATTR_UNUSED * ptr2) { return 0; }
- /* Ensure that public functions cannot access "predefined" ID types */
+ /* Ensure that public functions cannot access "predefined" ID types */
static int id_predefined_test(void )
{
- void * testObj;
- hid_t testID;
- hid_t typeID = H5I_INVALID_HID;
- void * testPtr;
- herr_t testErr;
+ void * testObj;
+ hid_t testID;
+ hid_t typeID = H5I_INVALID_HID;
+ void * testPtr;
+ herr_t testErr;
- testObj = HDmalloc(sizeof(int));
+ testObj = HDmalloc(sizeof(int));
- /* Try to perform illegal functions on various predefined types */
- H5E_BEGIN_TRY
- testID = H5Iregister(H5I_FILE, testObj);
- H5E_END_TRY
+ /* Try to perform illegal functions on various predefined types */
+ H5E_BEGIN_TRY
+ testID = H5Iregister(H5I_FILE, testObj);
+ H5E_END_TRY
- VERIFY(testID, H5I_INVALID_HID, "H5Iregister");
- if(testID != H5I_INVALID_HID)
- goto out;
+ VERIFY(testID, H5I_INVALID_HID, "H5Iregister");
+ if(testID != H5I_INVALID_HID)
+ goto out;
- H5E_BEGIN_TRY
- testPtr = H5Isearch(H5I_GENPROP_LST, (H5I_search_func_t) test_search_func, testObj);
- H5E_END_TRY
+ H5E_BEGIN_TRY
+ testPtr = H5Isearch(H5I_GENPROP_LST, (H5I_search_func_t) test_search_func, testObj);
+ H5E_END_TRY
- VERIFY(testPtr, NULL, "H5Isearch");
- if(testPtr != NULL)
- goto out;
+ CHECK_PTR_NULL(testPtr, "H5Isearch");
+ if(testPtr != NULL)
+ goto out;
- H5E_BEGIN_TRY
- testErr = H5Inmembers(H5I_ERROR_STACK, NULL);
- H5E_END_TRY
+ H5E_BEGIN_TRY
+ testErr = H5Inmembers(H5I_ERROR_STACK, NULL);
+ H5E_END_TRY
- VERIFY(testErr, -1, "H5Inmembers");
- if(testErr != -1)
- goto out;
+ VERIFY(testErr, -1, "H5Inmembers");
+ if(testErr != -1)
+ goto out;
- H5E_BEGIN_TRY
- testErr = H5Iclear_type(H5I_FILE, 0);
- H5E_END_TRY
+ H5E_BEGIN_TRY
+ testErr = H5Iclear_type(H5I_FILE, 0);
+ H5E_END_TRY
- VERIFY((testErr >= 0), 0, "H5Iclear_type");
- if(testErr >= 0)
- goto out;
+ VERIFY((testErr >= 0), 0, "H5Iclear_type");
+ if(testErr >= 0)
+ goto out;
- H5E_BEGIN_TRY
- testErr = H5Idestroy_type(H5I_DATASET);
- H5E_END_TRY
+ H5E_BEGIN_TRY
+ testErr = H5Idestroy_type(H5I_DATASET);
+ H5E_END_TRY
- VERIFY((testErr >= 0), 0, "H5Idestroy_type");
- if(testErr >= 0)
- goto out;
+ VERIFY((testErr >= 0), 0, "H5Idestroy_type");
+ if(testErr >= 0)
+ goto out;
- /* Create a datatype ID and try to perform illegal functions on it */
- typeID = H5Tcreate(H5T_OPAQUE, (size_t)42);
- CHECK(typeID, H5I_INVALID_HID, "H5Tcreate");
- if(typeID == H5I_INVALID_HID)
- goto out;
+ /* Create a datatype ID and try to perform illegal functions on it */
+ typeID = H5Tcreate(H5T_OPAQUE, (size_t)42);
+ CHECK(typeID, H5I_INVALID_HID, "H5Tcreate");
+ if(typeID == H5I_INVALID_HID)
+ goto out;
- H5E_BEGIN_TRY
- testPtr = H5Iremove_verify(typeID, H5I_DATATYPE);
- H5E_END_TRY
+ H5E_BEGIN_TRY
+ testPtr = H5Iremove_verify(typeID, H5I_DATATYPE);
+ H5E_END_TRY
- VERIFY(testPtr, NULL, "H5Iremove_verify");
- if(testPtr != NULL)
- goto out;
+ CHECK_PTR_NULL(testPtr, "H5Iremove_verify");
+ if(testPtr != NULL)
+ goto out;
- H5E_BEGIN_TRY
- testPtr = H5Iobject_verify(typeID, H5I_DATATYPE);
- H5E_END_TRY
+ H5E_BEGIN_TRY
+ testPtr = H5Iobject_verify(typeID, H5I_DATATYPE);
+ H5E_END_TRY
- VERIFY(testPtr, NULL, "H5Iobject_verify");
- if(testPtr != NULL)
- goto out;
+ CHECK_PTR_NULL(testPtr, "H5Iobject_verify");
+ if(testPtr != NULL)
+ goto out;
- H5Tclose(typeID);
+ H5Tclose(typeID);
- /* testObj was never registered as an atom, so it will not be
+ /* testObj was never registered as an atom, so it will not be
* automatically freed. */
- HDfree(testObj);
- return 0;
+ HDfree(testObj);
+ return 0;
out:
- if(typeID != H5I_INVALID_HID)
- H5Tclose(typeID);
- if(testObj != NULL)
- HDfree(testObj);
+ if(typeID != H5I_INVALID_HID)
+ H5Tclose(typeID);
+ if(testObj != NULL)
+ HDfree(testObj);
- return -1;
+ return -1;
}
@@ -444,12 +443,12 @@ static int test_get_type(void)
out:
if(dtype != H5I_INVALID_HID)
- H5Tclose(dtype);
+ H5Tclose(dtype);
return -1;
}
- /* Test boundary cases with lots of types */
+ /* Test boundary cases with lots of types */
/* Type IDs range from H5I_NTYPES to H5I_MAX_NUM_TYPES. The system will assign */
/* IDs in sequential order until H5I_MAX_NUM_TYPES IDs have been given out, at which */
@@ -459,78 +458,78 @@ out:
/* to low values successfully, ensure that an error is thrown when all possible */
/* type IDs are taken, then ensure that deleting types frees up their IDs. */
/* Note that this test depends on the implementation of IDs, so may break */
-/* if the implementation changes. */
+/* if the implementation changes. */
/* Also note that if someone else registered a user-defined type and forgot to */
/* destroy it, this test will mysteriously fail (because it will expect there to */
/* be one more "free" type ID than there is). */
/* H5I_NTYPES is defined in h5public.h, H5I_MAX_NUM_TYPES is defined in h5pkg.h */
static int test_id_type_list(void)
{
- H5I_type_t startType; /* The first type ID we were assigned in this test */
- H5I_type_t currentType;
- H5I_type_t testType;
- int i; /* Just a counter variable */
-
- startType = H5Iregister_type((size_t)8, 0, (H5I_free_t) free );
- CHECK(startType, H5I_BADID, "H5Iregister_type");
- if(startType == H5I_BADID)
- goto out;
-
- /* Sanity check */
- if(startType >= H5I_MAX_NUM_TYPES || startType < H5I_NTYPES)
- {
- /* Error condition, throw an error */
- CHECK(1, 1, "H5Iregister_type");
- goto out;
- }
- /* Create types up to H5I_MAX_NUM_TYPES */
- for(i = startType + 1; i < H5I_MAX_NUM_TYPES; i++)
- {
- currentType = H5Iregister_type((size_t)8, 0, (H5I_free_t) free );
- CHECK(currentType, H5I_BADID, "H5Iregister_type");
- if(currentType == H5I_BADID)
- goto out;
- }
-
- /* Wrap around to low type ID numbers */
- for(i = H5I_NTYPES; i < startType; i++)
- {
- currentType = H5Iregister_type((size_t)8, 0, (H5I_free_t) free );
- CHECK(currentType, H5I_BADID, "H5Iregister_type");
- if(currentType == H5I_BADID)
- goto out;
- }
-
- /* There should be no room at the inn for a new ID type*/
- H5E_BEGIN_TRY
- testType = H5Iregister_type((size_t)8, 0, (H5I_free_t) free );
- H5E_END_TRY
-
- VERIFY(testType, H5I_BADID, "H5Iregister_type");
- if(testType != H5I_BADID)
- goto out;
-
- /* Now delete a type and try to insert again */
- H5Idestroy_type(H5I_NTYPES);
- testType = H5Iregister_type((size_t)8, 0, (H5I_free_t) free );
-
- VERIFY(testType, H5I_NTYPES, "H5Iregister_type");
- if(testType != H5I_NTYPES)
- goto out;
-
- /* Cleanup. Destroy all types. */
- for(i = H5I_NTYPES; i < H5I_MAX_NUM_TYPES; i++)
- H5Idestroy_type((H5I_type_t) i);
-
- return 0;
+ H5I_type_t startType; /* The first type ID we were assigned in this test */
+ H5I_type_t currentType;
+ H5I_type_t testType;
+ int i; /* Just a counter variable */
+
+ startType = H5Iregister_type((size_t)8, 0, (H5I_free_t) free );
+ CHECK(startType, H5I_BADID, "H5Iregister_type");
+ if(startType == H5I_BADID)
+ goto out;
+
+ /* Sanity check */
+ if(startType >= H5I_MAX_NUM_TYPES || startType < H5I_NTYPES)
+ {
+ /* Error condition, throw an error */
+ CHECK(1, 1, "H5Iregister_type");
+ goto out;
+ }
+ /* Create types up to H5I_MAX_NUM_TYPES */
+ for(i = startType + 1; i < H5I_MAX_NUM_TYPES; i++)
+ {
+ currentType = H5Iregister_type((size_t)8, 0, (H5I_free_t) free );
+ CHECK(currentType, H5I_BADID, "H5Iregister_type");
+ if(currentType == H5I_BADID)
+ goto out;
+ }
+
+ /* Wrap around to low type ID numbers */
+ for(i = H5I_NTYPES; i < startType; i++)
+ {
+ currentType = H5Iregister_type((size_t)8, 0, (H5I_free_t) free );
+ CHECK(currentType, H5I_BADID, "H5Iregister_type");
+ if(currentType == H5I_BADID)
+ goto out;
+ }
+
+ /* There should be no room at the inn for a new ID type*/
+ H5E_BEGIN_TRY
+ testType = H5Iregister_type((size_t)8, 0, (H5I_free_t) free );
+ H5E_END_TRY
+
+ VERIFY(testType, H5I_BADID, "H5Iregister_type");
+ if(testType != H5I_BADID)
+ goto out;
+
+ /* Now delete a type and try to insert again */
+ H5Idestroy_type(H5I_NTYPES);
+ testType = H5Iregister_type((size_t)8, 0, (H5I_free_t) free );
+
+ VERIFY(testType, H5I_NTYPES, "H5Iregister_type");
+ if(testType != H5I_NTYPES)
+ goto out;
+
+ /* Cleanup. Destroy all types. */
+ for(i = H5I_NTYPES; i < H5I_MAX_NUM_TYPES; i++)
+ H5Idestroy_type((H5I_type_t) i);
+
+ return 0;
out:
/* Cleanup. For simplicity, just destroy all types and ignore errors. */
- H5E_BEGIN_TRY
- for(i = H5I_NTYPES; i < H5I_MAX_NUM_TYPES; i++)
- H5Idestroy_type((H5I_type_t) i);
- H5E_END_TRY
- return -1;
+ H5E_BEGIN_TRY
+ for(i = H5I_NTYPES; i < H5I_MAX_NUM_TYPES; i++)
+ H5Idestroy_type((H5I_type_t) i);
+ H5E_END_TRY
+ return -1;
}
/* Test removing ids in callback for H5Iclear_type */
@@ -733,11 +732,11 @@ void test_ids(void)
/* Set the random # seed */
HDsrandom((unsigned)HDtime(NULL));
- if (basic_id_test() < 0) TestErrPrintf("Basic ID test failed\n");
- if (id_predefined_test() < 0) TestErrPrintf("Predefined ID type test failed\n");
- if (test_is_valid() < 0) TestErrPrintf("H5Iis_valid test failed\n");
- if (test_get_type() < 0) TestErrPrintf("H5Iget_type test failed\n");
- if (test_id_type_list() < 0) TestErrPrintf("ID type list test failed\n");
- if (test_remove_clear_type() < 0) TestErrPrintf("ID remove during H5Iclear_type test failed\n");
+ if (basic_id_test() < 0) TestErrPrintf("Basic ID test failed\n");
+ if (id_predefined_test() < 0) TestErrPrintf("Predefined ID type test failed\n");
+ if (test_is_valid() < 0) TestErrPrintf("H5Iis_valid test failed\n");
+ if (test_get_type() < 0) TestErrPrintf("H5Iget_type test failed\n");
+ if (test_id_type_list() < 0) TestErrPrintf("ID type list test failed\n");
+ if (test_remove_clear_type() < 0) TestErrPrintf("ID remove during H5Iclear_type test failed\n");
}
diff --git a/test/titerate.c b/test/titerate.c
index 3004d62..82c26eb 100644
--- a/test/titerate.c
+++ b/test/titerate.c
@@ -5,17 +5,15 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/***********************************************************
*
-* Test program: titerate
+* Test program: titerate
*
* Test the Group & Attribute functionality
*
@@ -23,8 +21,6 @@
#include "testhdf5.h"
-#include "hdf5.h"
-
#define DATAFILE "titerate.h5"
/* Number of datasets for group iteration test */
@@ -40,8 +36,8 @@
#define NAMELEN 80
/* 1-D dataset with fixed dimensions */
-#define SPACE1_RANK 1
-#define SPACE1_DIM1 4
+#define SPACE1_RANK 1
+#define SPACE1_DIM1 4
typedef enum {
RET_ZERO,
@@ -133,7 +129,7 @@ test_iter_group(hid_t fapl, hbool_t new_format)
char dataset_name[NAMELEN]; /* dataset name */
iter_info info; /* Custom iteration information */
H5G_info_t ginfo; /* Buffer for querying object's info */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Group Iteration Functionality\n"));
@@ -161,7 +157,7 @@ test_iter_group(hid_t fapl, hbool_t new_format)
/* Keep a copy of the dataset names around for later */
lnames[i] = HDstrdup(name);
- CHECK(lnames[i], NULL, "strdup");
+ CHECK_PTR(lnames[i], "strdup");
ret = H5Dclose(dataset);
CHECK(ret, FAIL, "H5Dclose");
@@ -172,13 +168,13 @@ test_iter_group(hid_t fapl, hbool_t new_format)
CHECK(ret, FAIL, "H5Gcreate2");
lnames[NDATASETS] = HDstrdup("grp");
- CHECK(lnames[NDATASETS], NULL, "strdup");
+ CHECK_PTR(lnames[NDATASETS], "strdup");
ret = H5Tcommit2(file, "dtype", datatype, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Tcommit2");
lnames[NDATASETS + 1] = HDstrdup("dtype");
- CHECK(lnames[NDATASETS], NULL, "strdup");
+ CHECK_PTR(lnames[NDATASETS], "strdup");
/* Close everything up */
ret = H5Tclose(datatype);
@@ -392,7 +388,7 @@ static void test_iter_attr(hid_t fapl, hbool_t new_format)
char name[NAMELEN]; /* temporary name buffer */
char *anames[NATTR]; /* Names of the attributes created */
iter_info info; /* Custom iteration information */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Attribute Iteration Functionality\n"));
@@ -414,7 +410,7 @@ static void test_iter_attr(hid_t fapl, hbool_t new_format)
/* Keep a copy of the attribute names around for later */
anames[i] = HDstrdup(name);
- CHECK(anames[i], NULL, "strdup");
+ CHECK_PTR(anames[i], "strdup");
ret = H5Aclose(attribute);
CHECK(ret, FAIL, "H5Aclose");
@@ -547,7 +543,7 @@ liter_cb2(hid_t loc_id, const char *name, const H5L_info_t H5_ATTR_UNUSED *link_
{
const iter_info *test_info = (const iter_info *)opdata;
H5O_info_t oinfo;
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
if(HDstrcmp(name, test_info->name)) {
TestErrPrintf("name = '%s', test_info = '%s'\n", name, test_info->name);
@@ -577,13 +573,13 @@ liter_cb2(hid_t loc_id, const char *name, const H5L_info_t H5_ATTR_UNUSED *link_
static void
test_iter_group_large(hid_t fapl)
{
- hid_t file; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t group; /* Group ID */
- hid_t sid; /* Dataspace ID */
- hid_t tid; /* Datatype ID */
- hsize_t dims[] = {SPACE1_DIM1};
- herr_t ret; /* Generic return value */
+ hid_t file; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t group; /* Group ID */
+ hid_t sid; /* Dataspace ID */
+ hid_t tid; /* Datatype ID */
+ hsize_t dims[] = {SPACE1_DIM1};
+ herr_t ret; /* Generic return value */
char gname[20]; /* Temporary group name */
iter_info *names; /* Names of objects in the root group */
iter_info *curr_name; /* Pointer to the current name in the root group */
@@ -598,7 +594,7 @@ test_iter_group_large(hid_t fapl)
/* Allocate & initialize array */
names = (iter_info *)HDcalloc(sizeof(iter_info), (ITER_NGROUPS + 2));
- CHECK(names, NULL, "HDcalloc");
+ CHECK_PTR(names, "HDcalloc");
/* Output message about test being performed */
MESSAGE(5, ("Testing Large Group Iteration Functionality\n"));
@@ -713,7 +709,7 @@ static void test_grp_memb_funcs(hid_t fapl)
char dataset_name[NAMELEN]; /* dataset name */
ssize_t name_len; /* Length of object's name */
H5G_info_t ginfo; /* Buffer for querying object's info */
- herr_t ret = SUCCEED; /* Generic return value */
+ herr_t ret = SUCCEED; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Group Member Information Functionality\n"));
@@ -735,7 +731,7 @@ static void test_grp_memb_funcs(hid_t fapl)
/* Keep a copy of the dataset names around for later */
dnames[i] = HDstrdup(name);
- CHECK(dnames[i], NULL, "strdup");
+ CHECK_PTR(dnames[i], "strdup");
ret = H5Dclose(dataset);
CHECK(ret, FAIL, "H5Dclose");
@@ -746,13 +742,13 @@ static void test_grp_memb_funcs(hid_t fapl)
CHECK(ret, FAIL, "H5Gcreate2");
dnames[NDATASETS] = HDstrdup("grp");
- CHECK(dnames[NDATASETS], NULL, "strdup");
+ CHECK_PTR(dnames[NDATASETS], "strdup");
ret = H5Tcommit2(file, "dtype", datatype, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Tcommit2");
dnames[NDATASETS + 1] = HDstrdup("dtype");
- CHECK(dnames[NDATASETS], NULL, "strdup");
+ CHECK_PTR(dnames[NDATASETS], "strdup");
/* Close everything up */
ret = H5Tclose(datatype);
@@ -799,7 +795,7 @@ static void test_grp_memb_funcs(hid_t fapl)
/* Keep a copy of the dataset names around for later */
obj_names[i] = HDstrdup(dataset_name);
- CHECK(obj_names[i], NULL, "strdup");
+ CHECK_PTR(obj_names[i], "strdup");
ret = H5Oget_info_by_idx(root_group, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)i, &oinfo, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Oget_info_by_idx");
@@ -853,7 +849,7 @@ static void test_links(hid_t fapl)
hid_t gid, gid1;
H5G_info_t ginfo; /* Buffer for querying object's info */
hsize_t i;
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Soft and Hard Link Iteration Functionality\n"));
@@ -929,7 +925,7 @@ test_iterate(void)
{
hid_t fapl, fapl2; /* File access property lists */
unsigned new_format; /* Whether to use the new format or not */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Iteration Operations\n"));
@@ -962,15 +958,15 @@ test_iterate(void)
CHECK(ret, FAIL, "H5Pclose");
} /* test_iterate() */
-
+
/*-------------------------------------------------------------------------
- * Function: cleanup_iterate
+ * Function: cleanup_iterate
*
- * Purpose: Cleanup temporary test files
+ * Purpose: Cleanup temporary test files
*
- * Return: none
+ * Return: none
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* April 5, 2000
*
* Modifications:
diff --git a/test/tmeta.c b/test/tmeta.c
index 43fdeac..7eeb493 100644
--- a/test/tmeta.c
+++ b/test/tmeta.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/***********************************************************
diff --git a/test/tmisc.c b/test/tmisc.c
index 6012588..4a77b51 100644
--- a/test/tmisc.c
+++ b/test/tmisc.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/***********************************************************
@@ -23,15 +21,15 @@
*
*************************************************************/
-#define H5D_FRIEND /*suppress error about including H5Dpkg */
+#define H5D_FRIEND /*suppress error about including H5Dpkg */
/* Define this macro to indicate that the testing APIs should be available */
#define H5D_TESTING
-#include "hdf5.h"
#include "testhdf5.h"
#include "H5srcdir.h"
-#include "H5Dpkg.h" /* Datasets */
+#include "H5Dpkg.h" /* Datasets */
+#include "H5MMprivate.h" /* Memory */
/* Definitions for misc. test #1 */
#define MISC1_FILE "tmisc1.h5"
@@ -180,17 +178,12 @@ typedef struct
#define MISC13_GROUP1_NAME "Group1"
#define MISC13_GROUP2_NAME "Group2"
#define MISC13_DTYPE_NAME "Datatype"
-#define MISC13_RANK 2
-#define MISC13_DIM1 20
-#define MISC13_DIM2 30
+#define MISC13_RANK 1
+#define MISC13_DIM1 600
#define MISC13_CHUNK_DIM1 10
-#define MISC13_CHUNK_DIM2 15
#define MISC13_USERBLOCK_SIZE 512
#define MISC13_COPY_BUF_SIZE 4096
-unsigned m13_data[MISC13_DIM1][MISC13_DIM2]; /* Data to write to dataset */
-unsigned m13_rdata[MISC13_DIM1][MISC13_DIM2]; /* Data read from dataset */
-
/* Definitions for misc. test #14 */
#define MISC14_FILE "tmisc14.h5"
#define MISC14_DSET1_NAME "Dataset1"
@@ -325,6 +318,11 @@ unsigned m13_rdata[MISC13_DIM1][MISC13_DIM2]; /* Data read from dataset
#define MISC31_PROPNAME "misc31_prop"
#define MISC31_DTYPENAME "dtype"
+/* Definitions for misc. test #33 */
+/* Note that this test file is generated by "gen_bad_offset.c" */
+/* and bad offset values are written to that file for testing */
+#define MISC33_FILE "bad_offset.h5"
+
/****************************************************************
**
** test_misc1(): test unlinking a dataset from a group and immediately
@@ -724,7 +722,7 @@ create_struct3(void)
herr_t ret; /* For error checking */
str3hndl = (misc5_struct3_hndl *)HDmalloc(sizeof(misc5_struct3_hndl));
- CHECK(str3hndl,NULL,"malloc");
+ CHECK_PTR(str3hndl, "malloc");
str3hndl->st3h_base = H5Tcreate(H5T_COMPOUND, sizeof(misc5_struct3));
CHECK(str3hndl->st3h_base, FAIL, "H5Tcreate");
@@ -767,7 +765,7 @@ create_struct2(void)
herr_t ret; /* For error checking */
str2hndl = (misc5_struct2_hndl *)HDmalloc(sizeof(misc5_struct2_hndl));
- CHECK(str2hndl, NULL, "malloc");
+ CHECK_PTR(str2hndl, "HDmalloc");
str2hndl->st2h_base = H5Tcreate(H5T_COMPOUND, sizeof(misc5_struct2));
CHECK(str2hndl->st2h_base, FAIL, "H5Tcreate");
@@ -776,7 +774,7 @@ create_struct2(void)
CHECK(ret, FAIL, "H5Tinsert");
str2hndl->st2h_st3hndl = create_struct3();
- CHECK(str2hndl->st2h_st3hndl,NULL,"create_struct3");
+ CHECK_PTR(str2hndl->st2h_st3hndl, "create_struct3");
ret = H5Tinsert(str2hndl->st2h_base, "st2_el2", HOFFSET(misc5_struct2, st2_el2), str2hndl->st2h_st3hndl->st3h_id);
CHECK(ret,FAIL,"H5Tinsert");
@@ -812,7 +810,7 @@ set_struct2(misc5_struct2 *buf)
buf->st2_el2.len = MISC5_DBGNELM3;
buf->st2_el2.p = HDmalloc((buf->st2_el2.len)*sizeof(misc5_struct3));
- CHECK(buf->st2_el2.p,NULL,"malloc");
+ CHECK_PTR(buf->st2_el2.p, "HDmalloc");
for(i=0; i<(buf->st2_el2.len); i++)
set_struct3(&(((misc5_struct3 *)(buf->st2_el2.p))[i]));
@@ -833,7 +831,7 @@ create_struct1(void)
herr_t ret; /* For error checking */
str1hndl = (misc5_struct1_hndl *)HDmalloc(sizeof(misc5_struct1_hndl));
- CHECK(str1hndl, NULL, "malloc");
+ CHECK_PTR(str1hndl, "HDmalloc");
str1hndl->st1h_base = H5Tcreate(H5T_COMPOUND, sizeof(misc5_struct1));
CHECK(str1hndl->st1h_base, FAIL, "H5Tcreate");
@@ -842,7 +840,7 @@ create_struct1(void)
CHECK(ret, FAIL, "H5Tinsert");
str1hndl->st1h_st2hndl=create_struct2();
- CHECK(str1hndl->st1h_st2hndl,NULL,"create_struct2");
+ CHECK_PTR(str1hndl->st1h_st2hndl, "create_struct2");
ret = H5Tinsert(str1hndl->st1h_base, "st1_el2", HOFFSET(misc5_struct1, st1_el2), str1hndl->st1h_st2hndl->st2h_id);
CHECK(ret,FAIL,"H5Tinsert");
@@ -878,7 +876,7 @@ set_struct1(misc5_struct1 *buf)
buf->st1_el2.len=MISC5_DBGNELM2;
buf->st1_el2.p=HDmalloc((buf->st1_el2.len)*sizeof(misc5_struct2));
- CHECK(buf->st1_el2.p,NULL,"malloc");
+ CHECK_PTR(buf->st1_el2.p, "HDmalloc");
for(i=0; i<(buf->st1_el2.len); i++)
set_struct2(&(((misc5_struct2 *)(buf->st1_el2.p))[i]));
@@ -914,7 +912,7 @@ test_misc5(void)
/* Create the memory structure to write */
str1hndl = create_struct1();
- CHECK(str1hndl, NULL, "create_struct1");
+ CHECK_PTR(str1hndl, "create_struct1");
/* Create the dataspace */
dims[0] = MISC5_NELMTOPLVL;
@@ -928,7 +926,7 @@ test_misc5(void)
/* Create the variable-length buffer */
buf.len = MISC5_DBGNELM1;
buf.p = HDmalloc((buf.len) * sizeof(misc5_struct1));
- CHECK(buf.p, NULL, "malloc");
+ CHECK_PTR(buf.p, "HDmalloc");
/* Create the top-level VL information */
for(i = 0; i < MISC5_DBGNELM1; i++)
@@ -1254,10 +1252,10 @@ test_misc8(void)
/* Allocate space for the data to write & read */
wdata = (int *)HDmalloc(sizeof(int) * MISC8_DIM0 * MISC8_DIM1);
- CHECK(wdata,NULL,"malloc");
+ CHECK_PTR(wdata, "HDmalloc");
#ifdef VERIFY_DATA
rdata = (int *)HDmalloc(sizeof(int) * MISC8_DIM0 * MISC8_DIM1);
- CHECK(rdata,NULL,"malloc");
+ CHECK_PTR(rdata, "HDmalloc");
#endif /* VERIFY_DATA */
/* Initialize values */
@@ -1817,11 +1815,11 @@ test_misc11(void)
unsigned sym_ik; /* Symbol table B-tree initial 'K' value */
unsigned istore_ik; /* Indexed storage B-tree initial 'K' value */
unsigned sym_lk; /* Symbol table B-tree leaf 'K' value */
- unsigned nindexes; /* Shared message number of indexes */
+ unsigned nindexes; /* Shared message number of indexes */
H5F_info2_t finfo; /* global information about file */
H5F_fspace_strategy_t strategy; /* File space strategy */
- hsize_t threshold; /* Free-space section threshold */
- hbool_t persist; /* To persist free-space or not */
+ hsize_t threshold; /* Free-space section threshold */
+ hbool_t persist; /* To persist free-space or not */
herr_t ret; /* Generic return value */
/* Output message about test being performed */
@@ -1860,7 +1858,7 @@ test_misc11(void)
/* This should fail as (32770*2) will exceed ^16 - 2 bytes for storing btree entries */
H5E_BEGIN_TRY {
- ret=H5Pset_sym_k(fcpl, 32770, 0);
+ ret=H5Pset_sym_k(fcpl, 32770, 0);
} H5E_END_TRY;
VERIFY(ret, FAIL, "H5Pset_sym_k");
@@ -1869,7 +1867,7 @@ test_misc11(void)
/* This should fail as (32770*2) will exceed ^16 - 2 bytes for storing btree entries */
H5E_BEGIN_TRY {
- ret=H5Pset_istore_k(fcpl, 32770);
+ ret=H5Pset_istore_k(fcpl, 32770);
} H5E_END_TRY;
VERIFY(ret, FAIL, "H5Pset_istore_k");
@@ -1981,19 +1979,19 @@ test_misc12(void)
"las palabras del que murio en la cruz."
};
char *rdata [MISC12_SPACE1_DIM1+MISC12_APPEND_SIZE]; /* Information read in */
- hid_t fid1;
- hid_t dataset;
- hid_t sid1, space, memspace;
- hid_t tid1, cparms;
- hsize_t dims1[] = {MISC12_SPACE1_DIM1};
- hsize_t dimsn[] = {MISC12_APPEND_SIZE};
- hsize_t maxdims1[1] = {H5S_UNLIMITED};
- hsize_t chkdims1[1] = {MISC12_CHUNK_SIZE};
+ hid_t fid1;
+ hid_t dataset;
+ hid_t sid1, space, memspace;
+ hid_t tid1, cparms;
+ hsize_t dims1[] = {MISC12_SPACE1_DIM1};
+ hsize_t dimsn[] = {MISC12_APPEND_SIZE};
+ hsize_t maxdims1[1] = {H5S_UNLIMITED};
+ hsize_t chkdims1[1] = {MISC12_CHUNK_SIZE};
hsize_t newsize[1] = {MISC12_SPACE1_DIM1+MISC12_APPEND_SIZE};
- hsize_t offset[1] = {MISC12_SPACE1_DIM1};
+ hsize_t offset[1] = {MISC12_SPACE1_DIM1};
hsize_t count[1] = {MISC12_APPEND_SIZE};
int i; /* counting variable */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing VL-type in chunked dataset\n"));
@@ -2085,38 +2083,36 @@ test_misc12(void)
/* Various routines for misc. 13 test */
static void
-init_data(void)
+misc13_init_data(unsigned *original_data)
{
- unsigned u,v; /* Local index variables */
+ unsigned u;
- for(u=0; u<MISC13_DIM1; u++)
- for(v=0; v<MISC13_DIM2; v++)
- m13_data[u][v]=(u*MISC13_DIM2)+v;
+ for(u = 0; u < MISC13_DIM1; u++)
+ original_data[u] = u;
}
-static int
-verify_data(void)
+static hbool_t
+misc13_verify_data_match(const unsigned *original_data, const unsigned *read_data)
{
- unsigned u,v; /* Local index variables */
+ unsigned u;
- for(u=0; u<MISC13_DIM1; u++)
- for(v=0; v<MISC13_DIM2; v++)
- if(m13_data[u][v]!=m13_rdata[u][v])
- return(-1);
- return(0);
+ for(u = 0; u < MISC13_DIM1; u++)
+ if(original_data[u] != read_data[u])
+ return FALSE;
+
+ return TRUE;
}
static void
-create_dataset(hid_t loc_id, const char *name, hid_t dcpl)
+misc13_create_dataset(hid_t loc_id, const char *name, hid_t dcpl, const unsigned *data)
{
- hid_t dsid; /* Dataset ID */
- hid_t sid; /* Dataspace ID */
- hsize_t dims[MISC13_RANK]; /* Dataset dimensions */
- herr_t ret; /* Generic return value */
+ hid_t dsid = -1; /* Dataset ID */
+ hid_t sid = -1; /* Dataspace ID */
+ hsize_t dims[MISC13_RANK]; /* Dataset dimensions */
+ herr_t ret; /* Generic return value */
/* Create dataspace for use with dataset */
dims[0] = MISC13_DIM1;
- dims[1] = MISC13_DIM2;
sid = H5Screate_simple(MISC13_RANK, dims, NULL);
CHECK(sid, FAIL, "H5Screate_simple");
@@ -2125,7 +2121,7 @@ create_dataset(hid_t loc_id, const char *name, hid_t dcpl)
CHECK(dsid, FAIL, "H5Dcreate2");
/* Write some data to dataset */
- ret = H5Dwrite(dsid, H5T_NATIVE_UINT, H5S_ALL, H5S_ALL, H5P_DEFAULT, m13_data);
+ ret = H5Dwrite(dsid, H5T_NATIVE_UINT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data);
CHECK(ret, FAIL, "H5Dwrite");
/* Close the contiguous dataset */
@@ -2135,64 +2131,74 @@ create_dataset(hid_t loc_id, const char *name, hid_t dcpl)
/* Close the dataspace */
ret = H5Sclose(sid);
CHECK(ret, FAIL, "H5Sclose");
-}
+
+} /* end misc13_create_dataset() */
static void
-verify_dataset(hid_t loc_id, const char *name)
+misc13_verify_dataset(hid_t loc_id, const char *name, const unsigned *data)
{
- hid_t dsid; /* Dataset ID */
- herr_t ret; /* Generic return value */
+ unsigned *read_data = NULL; /* Data to write to dataset */
+ hid_t dsid = -1; /* Dataset ID */
+ herr_t ret; /* Generic return value */
+
+ /* Create a data buffer for the dataset read */
+ read_data = (unsigned *)HDcalloc(MISC13_DIM1, sizeof(unsigned));
+ CHECK_PTR(read_data, "HDcalloc");
/* Open the contiguous dataset in the root group */
dsid = H5Dopen2(loc_id, name, H5P_DEFAULT);
CHECK(dsid, FAIL, "H5Dopen2");
/* Read the data */
- ret = H5Dread(dsid, H5T_NATIVE_UINT, H5S_ALL, H5S_ALL, H5P_DEFAULT, m13_rdata);
+ ret = H5Dread(dsid, H5T_NATIVE_UINT, H5S_ALL, H5S_ALL, H5P_DEFAULT, read_data);
CHECK(ret, FAIL, "H5Dread");
- /* Verify that the data is correct */
- ret=verify_data();
- CHECK(ret, FAIL, "verify_data");
+ /* Verify that the data are correct */
+ ret = misc13_verify_data_match(data, read_data);
+ CHECK(ret, FAIL, "misc13_verify_data_match");
/* Close the contiguous dataset */
ret = H5Dclose(dsid);
CHECK(ret, FAIL, "H5Dclose");
-}
+
+ /* Free the dataset read buffer */
+ HDfree(read_data);
+
+} /* end misc13_verify_dataset() */
static void
-create_hdf_file(const char *name)
+misc13_create_hdf_file(const char *name, const unsigned *data)
{
- hid_t fid; /* File ID */
- hid_t gid,gid2; /* Group IDs */
- hid_t tid; /* Datatype ID */
- hid_t dcpl; /* Dataset creation property list ID */
- hsize_t chunk_dims[MISC13_RANK]; /* Chunk dimensions */
- herr_t ret; /* Generic return value */
+ hid_t fid = -1; /* File ID */
+ hid_t gid1 = -1; /* Group ID (level 1) */
+ hid_t gid2 = -1; /* Group ID (level 2) */
+ hid_t tid = -1; /* Datatype ID */
+ hid_t dcplid = -1; /* Dataset creation property list ID */
+ hsize_t chunk_dims[MISC13_RANK]; /* Chunk dimensions */
+ herr_t ret; /* Generic return value */
/* Create file */
- fid=H5Fcreate(name, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ fid = H5Fcreate(name, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
CHECK(fid, FAIL, "H5Fcreate");
/* Create DCPL for use with datasets */
- dcpl = H5Pcreate(H5P_DATASET_CREATE);
- CHECK(dcpl, FAIL, "H5Pcreate");
+ dcplid = H5Pcreate(H5P_DATASET_CREATE);
+ CHECK(dcplid, FAIL, "H5Pcreate");
/* Set the DCPL to be chunked */
- ret = H5Pset_layout(dcpl, H5D_CHUNKED);
+ ret = H5Pset_layout(dcplid, H5D_CHUNKED);
CHECK(ret, FAIL, "H5Pset_layout");
/* Use chunked storage for this DCPL */
chunk_dims[0] = MISC13_CHUNK_DIM1;
- chunk_dims[1] = MISC13_CHUNK_DIM2;
- ret = H5Pset_chunk(dcpl, MISC13_RANK, chunk_dims);
+ ret = H5Pset_chunk(dcplid, MISC13_RANK, chunk_dims);
CHECK(ret, FAIL, "H5Pset_chunk");
/* Create contiguous dataset in root group */
- create_dataset(fid, MISC13_DSET1_NAME, H5P_DEFAULT);
+ misc13_create_dataset(fid, MISC13_DSET1_NAME, H5P_DEFAULT, data);
/* Create chunked dataset in root group */
- create_dataset(fid, MISC13_DSET2_NAME, dcpl);
+ misc13_create_dataset(fid, MISC13_DSET2_NAME, dcplid, data);
/* Create a datatype to commit to the file */
tid = H5Tcopy(H5T_NATIVE_INT);
@@ -2207,11 +2213,11 @@ create_hdf_file(const char *name)
CHECK(ret, FAIL, "H5Tclose");
/* Create a group in the root group */
- gid = H5Gcreate2(fid, MISC13_GROUP1_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
- CHECK(gid, FAIL, "H5Gcreate2");
+ gid1 = H5Gcreate2(fid, MISC13_GROUP1_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ CHECK(gid1, FAIL, "H5Gcreate2");
/* Create another group in the new group */
- gid2 = H5Gcreate2(gid, MISC13_GROUP2_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ gid2 = H5Gcreate2(gid1, MISC13_GROUP2_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(gid2, FAIL, "H5Gcreate2");
/* Close the second group */
@@ -2219,17 +2225,17 @@ create_hdf_file(const char *name)
CHECK(ret, FAIL, "H5Gclose");
/* Create contiguous dataset in new group */
- create_dataset(gid, MISC13_DSET1_NAME, H5P_DEFAULT);
+ misc13_create_dataset(gid1, MISC13_DSET1_NAME, H5P_DEFAULT, data);
/* Create chunked dataset in new group */
- create_dataset(gid, MISC13_DSET2_NAME, dcpl);
+ misc13_create_dataset(gid1, MISC13_DSET2_NAME, dcplid, data);
/* Create a datatype to commit to the new group */
tid = H5Tcopy(H5T_NATIVE_INT);
CHECK(tid, FAIL, "H5Tcopy");
/* Create a named datatype in the new group */
- ret = H5Tcommit2(gid, MISC13_DTYPE_NAME, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ ret = H5Tcommit2(gid1, MISC13_DTYPE_NAME, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Tcommit2");
/* Close named datatype */
@@ -2237,65 +2243,66 @@ create_hdf_file(const char *name)
CHECK(ret, FAIL, "H5Tclose");
/* Close the first group */
- ret = H5Gclose(gid);
+ ret = H5Gclose(gid1);
CHECK(ret, FAIL, "H5Gclose");
/* Close the DCPL */
- ret = H5Pclose(dcpl);
+ ret = H5Pclose(dcplid);
CHECK(ret, FAIL, "H5Pclose");
/* Close the file */
ret = H5Fclose(fid);
- HDassert(ret >= 0);
CHECK(ret, FAIL, "H5Fclose");
-}
+
+} /* end misc13_create_hdf_file() */
static void
-insert_user_block(const char *old_name, const char *new_name,const char *str,size_t size)
+misc13_insert_user_block(const char *old_name, const char *new_name, const char *str, size_t size)
{
- FILE *new_fp, *old_fp; /* Pointers to new & old files */
- void *user_block; /* Pointer to user block to write to file */
- void *copy_buf; /* Pointer to buffer for copying data */
+ FILE *new_fp = NULL; /* Pointers to new & old files */
+ FILE *old_fp = NULL;
+ void *user_block = NULL; /* Pointer to user block to write to file */
+ void *copy_buf = NULL; /* Pointer to buffer for copying data */
size_t written; /* Amount of data written to new file */
size_t read_in; /* Amount of data read in from old file */
int ret; /* Generic status value */
/* Allocate space for the user block */
user_block = HDcalloc(size, (size_t)1);
- CHECK(user_block, NULL, "HDcalloc");
+ CHECK_PTR(user_block, "HDcalloc");
/* Copy in the user block data */
- HDmemcpy(user_block,str,strlen(str));
+ HDmemcpy(user_block, str, strlen(str));
/* Open the new file */
- new_fp=HDfopen(new_name,"wb");
- CHECK(new_fp, NULL, "HDfopen");
+ new_fp = HDfopen(new_name,"wb");
+ CHECK_PTR(new_fp, "HDfopen");
/* Write the user block to the new file */
written = HDfwrite(user_block, (size_t)1, size, new_fp);
VERIFY(written, size, "HDfwrite");
/* Open the old file */
- old_fp=HDfopen(old_name,"rb");
- CHECK(old_fp, NULL, "HDfopen");
+ old_fp = HDfopen(old_name,"rb");
+ CHECK_PTR(old_fp, "HDfopen");
/* Allocate space for the copy buffer */
copy_buf = HDmalloc((size_t)MISC13_COPY_BUF_SIZE);
- CHECK(copy_buf, NULL, "HDmalloc");
+ CHECK_PTR(copy_buf, "HDmalloc");
/* Copy data from the old file to the new file */
while((read_in = HDfread(copy_buf, (size_t)1, (size_t)MISC13_COPY_BUF_SIZE, old_fp)) > 0) {
/* Write the data to the new file */
written = HDfwrite(copy_buf, (size_t)1, read_in, new_fp);
VERIFY(written, read_in, "HDfwrite");
- } /* end while */
+ }
/* Close the old file */
- ret=HDfclose(old_fp);
+ ret = HDfclose(old_fp);
VERIFY(ret, 0, "HDfclose");
/* Close the new file */
- ret=HDfclose(new_fp);
+ ret = HDfclose(new_fp);
VERIFY(ret, 0, "HDfclose");
/* Free the copy buffer */
@@ -2303,81 +2310,84 @@ insert_user_block(const char *old_name, const char *new_name,const char *str,siz
/* Free the user block */
HDfree(user_block);
-}
+
+} /* end misc13_insert_user_block() */
static void
-verify_file(const char *name, hsize_t blk_size, unsigned check_new_data)
+misc13_verify_file(const char *name, const unsigned *data, hsize_t userblock_size,
+ hbool_t check_for_new_dataset)
{
- hid_t fid; /* File ID */
- hid_t gid,gid2; /* Group IDs */
- hid_t tid; /* Datatype ID */
- hid_t fcpl; /* File creation property list ID */
- hsize_t userblock; /* Userblock size retrieved from FCPL */
- herr_t ret; /* Generic return value */
+ hid_t fid = -1; /* File ID */
+ hid_t gid1 = -1; /* Group IDs */
+ hid_t gid2 = -1; /* Group IDs */
+ hid_t tid = -1; /* Datatype ID */
+ hid_t fcplid = -1; /* File creation property list ID */
+ hsize_t ub_size_out; /* Userblock size retrieved from FCPL */
+ herr_t ret; /* Generic return value */
/* Open the file */
- fid=H5Fopen(name, H5F_ACC_RDONLY, H5P_DEFAULT);
+ fid = H5Fopen(name, H5F_ACC_RDONLY, H5P_DEFAULT);
CHECK(fid, FAIL, "H5Fopen");
/* Get the file's FCPL */
- fcpl=H5Fget_create_plist(fid);
- CHECK(fcpl, FAIL, "H5Fget_create_plist");
+ fcplid = H5Fget_create_plist(fid);
+ CHECK(fcplid, FAIL, "H5Fget_create_plist");
/* Get the user block size for the file */
- ret=H5Pget_userblock(fcpl,&userblock);
+ ret = H5Pget_userblock(fcplid, &ub_size_out);
CHECK(ret, FAIL, "H5Pget_userblock");
/* Check the userblock size */
- VERIFY(userblock, blk_size, "H5Pget_userblock");
+ VERIFY(userblock_size, ub_size_out, "H5Pget_userblock");
/* Close the FCPL */
- ret = H5Pclose(fcpl);
+ ret = H5Pclose(fcplid);
CHECK(ret, FAIL, "H5Pclose");
/* Verify the contiguous dataset in the root group */
- verify_dataset(fid,MISC13_DSET1_NAME);
+ misc13_verify_dataset(fid, MISC13_DSET1_NAME, data);
/* Verify the chunked dataset in the root group */
- verify_dataset(fid,MISC13_DSET2_NAME);
+ misc13_verify_dataset(fid, MISC13_DSET2_NAME, data);
/* Verify the "new" contiguous dataset in the root group, if asked */
- if(check_new_data)
- verify_dataset(fid,MISC13_DSET3_NAME);
+ if(check_for_new_dataset)
+ misc13_verify_dataset(fid, MISC13_DSET3_NAME, data);
/* Open the named datatype in the root group */
tid = H5Topen2(fid, MISC13_DTYPE_NAME, H5P_DEFAULT);
CHECK(tid, FAIL, "H5Topen2");
/* Verify the type is correct */
- VERIFY(H5Tequal(tid,H5T_NATIVE_INT), TRUE, "H5Tequal");
+ VERIFY(H5Tequal(tid, H5T_NATIVE_INT), TRUE, "H5Tequal");
/* Close named datatype */
- ret=H5Tclose(tid);
+ ret = H5Tclose(tid);
CHECK(ret, FAIL, "H5Tclose");
/* Open the first group */
- gid = H5Gopen2(fid, MISC13_GROUP1_NAME, H5P_DEFAULT);
- CHECK(gid, FAIL, "H5Gopen2");
+ gid1 = H5Gopen2(fid, MISC13_GROUP1_NAME, H5P_DEFAULT);
+ CHECK(gid1, FAIL, "H5Gopen2");
/* Verify the contiguous dataset in the first group */
- verify_dataset(gid,MISC13_DSET1_NAME);
+ misc13_verify_dataset(gid1, MISC13_DSET1_NAME, data);
/* Verify the chunked dataset in the first group */
- verify_dataset(gid,MISC13_DSET2_NAME);
+ misc13_verify_dataset(gid1, MISC13_DSET2_NAME, data);
/* Open the named datatype in the first group */
- tid = H5Topen2(gid,MISC13_DTYPE_NAME, H5P_DEFAULT);
+ tid = H5Topen2(gid1, MISC13_DTYPE_NAME, H5P_DEFAULT);
CHECK(tid, FAIL, "H5Topen2");
/* Verify the type is correct */
- VERIFY(H5Tequal(tid,H5T_NATIVE_INT), TRUE, "H5Tequal");
+ VERIFY(H5Tequal(tid, H5T_NATIVE_INT), TRUE, "H5Tequal");
/* Close named datatype */
- ret=H5Tclose(tid);
+ ret = H5Tclose(tid);
CHECK(ret, FAIL, "H5Tclose");
/* Open the second group */
- gid2 = H5Gopen2(gid, MISC13_GROUP2_NAME, H5P_DEFAULT);
+ gid2 = H5Gopen2(gid1, MISC13_GROUP2_NAME, H5P_DEFAULT);
CHECK(gid2, FAIL, "H5Gopen2");
/* Close the second group */
@@ -2385,31 +2395,33 @@ verify_file(const char *name, hsize_t blk_size, unsigned check_new_data)
CHECK(ret, FAIL, "H5Gclose");
/* Close the first group */
- ret = H5Gclose(gid);
+ ret = H5Gclose(gid1);
CHECK(ret, FAIL, "H5Gclose");
/* Close the file */
ret = H5Fclose(fid);
CHECK(ret, FAIL, "H5Fclose");
-}
+
+} /* end misc13_verify_file() */
static void
-add_to_new_file(const char *name)
+misc13_add_to_new_file(const char *name, const unsigned *data)
{
- hid_t fid; /* File ID */
+ hid_t fid = -1; /* File ID */
herr_t ret; /* Generic return value */
/* Open the file */
- fid=H5Fopen(name, H5F_ACC_RDWR, H5P_DEFAULT);
+ fid = H5Fopen(name, H5F_ACC_RDWR, H5P_DEFAULT);
CHECK(fid, FAIL, "H5Fopen");
/* Create new contiguous dataset in root group */
- create_dataset(fid, MISC13_DSET3_NAME, H5P_DEFAULT);
+ misc13_create_dataset(fid, MISC13_DSET3_NAME, H5P_DEFAULT, data);
/* Close the file */
ret = H5Fclose(fid);
CHECK(ret, FAIL, "H5Fclose");
-}
+
+} /* end misc13_add_to_new_file() */
/****************************************************************
**
@@ -2420,26 +2432,44 @@ add_to_new_file(const char *name)
static void
test_misc13(void)
{
+ unsigned *data = NULL; /* Data to write to dataset */
+ hsize_t userblock_size; /* Correct size of userblock */
+ hbool_t check_for_new_dataset; /* Whether to check for the post-userblock-creation dataset */
+
+ /* Create a data buffer for the datasets */
+ data = (unsigned *)HDcalloc(MISC13_DIM1, sizeof(unsigned));
+ CHECK_PTR(data, "HDcalloc");
+
/* Initialize data to write */
- init_data();
+ misc13_init_data(data);
/* Create first file, with no user block */
- create_hdf_file(MISC13_FILE_1);
+ misc13_create_hdf_file(MISC13_FILE_1, data);
/* Verify file contents are correct */
- verify_file(MISC13_FILE_1,(hsize_t)0,0);
+ userblock_size = 0;
+ check_for_new_dataset = FALSE;
+ misc13_verify_file(MISC13_FILE_1, data, userblock_size, check_for_new_dataset);
/* Create a new file by inserting a user block in front of the first file */
- insert_user_block(MISC13_FILE_1, MISC13_FILE_2, "Test String", (size_t)MISC13_USERBLOCK_SIZE);
+ misc13_insert_user_block(MISC13_FILE_1, MISC13_FILE_2, "Test String", (size_t)MISC13_USERBLOCK_SIZE);
/* Verify file contents are still correct */
- verify_file(MISC13_FILE_2,(hsize_t)MISC13_USERBLOCK_SIZE,0);
+ userblock_size = MISC13_USERBLOCK_SIZE;
+ check_for_new_dataset = FALSE;
+ misc13_verify_file(MISC13_FILE_2, data, userblock_size, check_for_new_dataset);
/* Make certain we can modify the new file */
- add_to_new_file(MISC13_FILE_2);
+ misc13_add_to_new_file(MISC13_FILE_2, data);
/* Verify file contents are still correct */
- verify_file(MISC13_FILE_2,(hsize_t)MISC13_USERBLOCK_SIZE,1);
+ userblock_size = MISC13_USERBLOCK_SIZE;
+ check_for_new_dataset = TRUE;
+ misc13_verify_file(MISC13_FILE_2, data, userblock_size, check_for_new_dataset);
+
+ /* Free the dataset buffer */
+ HDfree(data);
+
} /* end test_misc13() */
/****************************************************************
@@ -2715,10 +2745,10 @@ test_misc16(void)
herr_t ret; /* Generic return value */
char wdata[MISC16_SPACE_DIM][MISC16_STR_SIZE];
char rdata[MISC16_SPACE_DIM][MISC16_STR_SIZE]; /* Information read in */
- hid_t dataset; /* Dataset ID */
- hid_t sid; /* Dataspace ID */
- hid_t tid; /* Datatype ID */
- hsize_t dims[] = {MISC16_SPACE_DIM};
+ hid_t dataset; /* Dataset ID */
+ hid_t sid; /* Dataspace ID */
+ hid_t tid; /* Datatype ID */
+ hsize_t dims[] = {MISC16_SPACE_DIM};
int i;
/* Initialize the data */
@@ -2800,10 +2830,10 @@ test_misc17(void)
herr_t ret; /* Generic return value */
char wdata[MISC17_SPACE_DIM1][MISC17_SPACE_DIM2];
char rdata[MISC17_SPACE_DIM1][MISC17_SPACE_DIM2]; /* Information read in */
- hid_t dataset; /* Dataset ID */
- hid_t sid; /* Dataspace ID */
- hid_t tid; /* Datatype ID */
- hsize_t dims[] = {MISC17_SPACE_DIM1, MISC17_SPACE_DIM2};
+ hid_t dataset; /* Dataset ID */
+ hid_t sid; /* Dataspace ID */
+ hid_t tid; /* Datatype ID */
+ hsize_t dims[] = {MISC17_SPACE_DIM1, MISC17_SPACE_DIM2};
int i;
/* Initialize the data */
@@ -2986,19 +3016,21 @@ test_misc18(void)
static void
test_misc19(void)
{
- hid_t fid; /* File ID */
- hid_t sid; /* 'Space ID */
- hid_t did; /* Dataset ID */
- hid_t tid; /* 'Type ID */
- hid_t aid; /* Attribute ID */
- hid_t plid; /* Property List ID */
- hid_t pcid; /* Property Class ID */
- hid_t gid; /* Group ID */
- hid_t ecid; /* Error Class ID */
- hid_t emid; /* Error Message ID */
- hid_t esid; /* Error Stack ID */
- int rc; /* Reference count */
- herr_t ret; /* Generic return value */
+ hid_t fid = -1; /* File ID */
+ hid_t sid = -1; /* Dataspace ID */
+ hid_t did = -1; /* Dataset ID */
+ hid_t tid = -1; /* Datatype ID */
+ hid_t aid = -1; /* Attribute ID */
+ hid_t plid = -1; /* Property List ID */
+ hid_t pcid = -1; /* Property Class ID */
+ hid_t gid = -1; /* Group ID */
+ hid_t ecid = -1; /* Error Class ID */
+ hid_t emid = -1; /* Error Message ID */
+ hid_t esid = -1; /* Error Stack ID */
+ hid_t vfdid = -1; /* Virtual File Driver ID */
+ H5FD_class_t *vfd_cls = NULL; /* VFD class */
+ int rc; /* Reference count */
+ herr_t ret; /* Generic return value */
/* Check H5I operations on files */
@@ -3408,6 +3440,45 @@ test_misc19(void)
} H5E_END_TRY;
VERIFY(ret, FAIL, "H5Eclose_stack");
+
+/* Check H5I operations on virtual file drivers */
+
+ /* Get a VFD class to register */
+ vfd_cls = h5_get_dummy_vfd_class();
+ CHECK_PTR(vfd_cls, "h5_get_dummy_vfd_class");
+
+ /* Register a virtual file driver */
+ vfdid = H5FDregister(vfd_cls);
+ CHECK(vfdid, FAIL, "H5FDregister");
+
+ /* Check the reference count */
+ rc = H5Iget_ref(vfdid);
+ VERIFY(rc, 1, "H5Iget_ref");
+
+ /* Increment the reference count */
+ rc = H5Iinc_ref(vfdid);
+ VERIFY(rc, 2, "H5Iinc_ref");
+
+ /* Unregister the VFD normally */
+ ret = H5FDunregister(vfdid);
+ CHECK(ret, FAIL, "H5FDunregister");
+
+ /* Check the reference count */
+ rc = H5Iget_ref(vfdid);
+ VERIFY(rc, 1, "H5Iget_ref");
+
+ /* Unregister the VFD by decrementing the reference count */
+ rc = H5Idec_ref(vfdid);
+ VERIFY(rc, 0, "H5Idec_ref");
+
+ /* Try unregistering the VFD again (should fail) */
+ H5E_BEGIN_TRY {
+ ret = H5FDunregister(vfdid);
+ } H5E_END_TRY;
+ VERIFY(ret, FAIL, "H5FDunregister");
+
+ HDfree(vfd_cls);
+
} /* end test_misc19() */
/****************************************************************
@@ -3726,13 +3797,13 @@ test_misc22(void)
/* compute the correct PPB that should be set by SZIP */
if(offsets[k] == 0)
- correct = prec[j];
+ correct = prec[j];
else
correct = H5Tget_size(idts[i]) * 8;
if(correct > 24) {
- if(correct <= 32)
+ if(correct <= 32)
correct = 32;
- else if(correct <= 64)
+ else if(correct <= 64)
correct = 64;
} /* end if */
@@ -4685,7 +4756,7 @@ test_misc25b(void)
CHECK(ret, FAIL, "H5Fclose");
} /* end test_misc25b() */
-
+
/****************************************************************
**
** test_misc25c(): Exercise another null object header message merge bug.
@@ -4819,7 +4890,7 @@ test_misc25c(void)
CHECK(ret, FAIL, "H5Fclose");
} /* end test_misc25c() */
-
+
/****************************************************************
**
** test_misc26(): Regression test: ensure that copying filter
@@ -4905,7 +4976,7 @@ test_misc26(void)
CHECK_I(ret, "H5Pclose");
}
-
+
/****************************************************************
**
** test_misc27(): Ensure that objects with incorrect # of object
@@ -4950,7 +5021,7 @@ test_misc27(void)
CHECK(ret, FAIL, "H5Fclose");
} /* end test_misc27() */
-
+
/****************************************************************
**
** test_misc28(): Ensure that the dataset chunk cache will hold
@@ -5127,7 +5198,7 @@ test_misc28(void)
CHECK_I(ret, "H5Pclose");
} /* end test_misc28() */
-
+
/****************************************************************
**
** test_misc29(): Ensure that speculative metadata reads don't
@@ -5167,7 +5238,7 @@ test_misc30_get_info_cb(hid_t loc_id, const char *name, const H5L_info_t H5_ATTR
{
H5O_info_t object_info;
- return H5Oget_info_by_name(loc_id, name, &object_info, H5P_DEFAULT);
+ return H5Oget_info_by_name(loc_id, name, &object_info, H5P_DEFAULT);
}
static int
@@ -5176,7 +5247,7 @@ test_misc30_get_info(hid_t loc_id)
return H5Literate(loc_id, H5_INDEX_NAME, H5_ITER_INC, NULL, test_misc30_get_info_cb, NULL);
}
-
+
/****************************************************************
**
** test_misc30(): Exercise local heap code that loads prefix
@@ -5208,15 +5279,15 @@ test_misc30(void)
CHECK(ret, FAIL, "H5Gclose");
ret = H5Fclose(fid);
CHECK(ret, FAIL, "H5Fclose");
-
+
for(i = 0; i < 20; i++) {
char gname[32];
fid = H5Fopen(MISC30_FILE, H5F_ACC_RDWR, H5P_DEFAULT);
CHECK(fid, FAIL, "H5Fopen");
-
+
if(get_info) {
- ret = test_misc30_get_info(fid);
+ ret = test_misc30_get_info(fid);
CHECK(ret, FAIL, "test_misc30_get_info");
}
@@ -5228,20 +5299,20 @@ test_misc30(void)
CHECK(ret, FAIL, "H5Gclose");
ret = H5Fclose(fid);
CHECK(ret, FAIL, "H5Fclose");
- }
-
+ }
+
fid = H5Fopen(MISC30_FILE, H5F_ACC_RDONLY, H5P_DEFAULT);
CHECK(fid, FAIL, "H5Fopen");
ret = H5Fget_filesize(fid, &file_size[get_info]);
CHECK(fid, FAIL, "H5Fget_filesize");
ret = H5Fclose(fid);
CHECK(ret, FAIL, "H5Fclose");
- }
-
+ }
+
VERIFY(file_size[0], file_size[1], "test_misc30");
} /* end test_misc30() */
-
+
/****************************************************************
**
** test_misc31(): Test reentering library through deprecated
@@ -5332,14 +5403,14 @@ test_misc31(void)
CHECK(ret, FAIL, "H5Fclose");
ret = H5Tclose(dtype_id);
CHECK(ret, FAIL, "H5Tclose");
-
+
#else /* H5_NO_DEPRECATED_SYMBOLS */
/* Output message about test being skipped */
MESSAGE(5, (" ...Skipped"));
#endif /* H5_NO_DEPRECATED_SYMBOLS */
} /* end test_misc31() */
-
+
/****************************************************************
*
* test_misc32(): Simple test of filter memory allocation
@@ -5403,10 +5474,117 @@ test_misc32(void)
resized = H5resize_memory(NULL, 0);
CHECK_PTR_NULL(resized, "H5resize_memory"); /*BAD*/
#endif /* NDEBUG */
-
+
} /* end test_misc32() */
-
+/****************************************************************
+**
+** test_misc33(): Test for H5FFV-10216
+** --verify that H5HL_offset_into() returns error if the
+** input parameter "offset" exceeds heap data block size.
+** --case (1), (2), (3) are scenarios that will traverse to the
+** the 3 locations in the file having bad offset values to
+** the heap. (See description in gen_bad_offset.c)
+**
+****************************************************************/
+static void
+test_misc33(void)
+{
+ hid_t fid = -1; /* File ID */
+ const char *testfile = H5_get_srcdir_filename(MISC33_FILE); /* Corrected test file name */
+ H5O_info_t oinfo; /* Structure for object metadata information */
+ herr_t ret; /* Generic return value */
+
+ /* Output message about test being performed */
+ MESSAGE(5, ("Testing that bad offset into the heap returns error"));
+
+ /* Open the test file */
+ fid = H5Fopen(testfile, H5F_ACC_RDWR, H5P_DEFAULT);
+ CHECK(fid, FAIL, "H5Fopen");
+
+ /* Case (1) */
+ H5E_BEGIN_TRY {
+ ret = H5Oget_info_by_name(fid, "/soft_two", &oinfo, H5P_DEFAULT);
+ } H5E_END_TRY;
+ VERIFY(ret, FAIL, "H5Oget_info_by_name");
+
+ /* Case (2) */
+ H5E_BEGIN_TRY {
+ ret = H5Oget_info_by_name(fid, "/dsetA", &oinfo, H5P_DEFAULT);
+ } H5E_END_TRY;
+ VERIFY(ret, FAIL, "H5Oget_info_by_name");
+
+ /* Case (3) */
+ H5E_BEGIN_TRY {
+ ret = H5Oget_info_by_name(fid, "/soft_one", &oinfo, H5P_DEFAULT);
+ } H5E_END_TRY;
+ VERIFY(ret, FAIL, "H5Oget_info_by_name");
+
+ /* Close the file */
+ ret = H5Fclose(fid);
+ CHECK(fid, FAIL, "H5Fclose");
+
+} /* end test_misc33() */
+
+/****************************************************************
+**
+** test_misc34(): Ensure zero-size memory allocations work
+**
+****************************************************************/
+static void
+test_misc34(void)
+{
+ void *mem = NULL; /* allocated buffer */
+ char *dup = NULL; /* 'duplicated' string */
+ size_t sz = 0; /* buffer size */
+
+ /* Output message about test being performed */
+ MESSAGE(5, ("Testing O and NULL behavior in H5MM API calls"));
+
+ /* H5MM_xfree(): Ensure that passing NULL is allowed and returns NULL */
+ mem = H5MM_xfree(mem);
+ CHECK_PTR_NULL(mem, "H5MM_xfree");
+
+ /* H5MM_malloc(): Ensure that size 0 returns NULL */
+ mem = H5MM_malloc(sz);
+ CHECK_PTR_NULL(mem, "H5MM_malloc");
+ mem = H5MM_xfree(mem);
+
+ /* H5MM_calloc(): Ensure that size 0 returns NULL */
+ mem = H5MM_calloc(sz);
+ CHECK_PTR_NULL(mem, "H5MM_calloc");
+ mem = H5MM_xfree(mem);
+
+ /* H5MM_realloc(): Check behavior:
+ *
+ * H5MM_realloc(NULL, size) <==> H5MM_malloc(size)
+ * H5MM_realloc(ptr, 0) <==> H5MM_xfree(ptr)
+ * H5MM_realloc(NULL, 0) <==> NULL
+ */
+ mem = H5MM_xfree(mem);
+
+ sz = 1024;
+ mem = H5MM_realloc(mem, sz);
+ CHECK_PTR(mem, "H5MM_realloc (case 1)");
+ /* Don't free mem here! */
+
+ sz = 0;
+ mem = H5MM_realloc(mem, sz);
+ CHECK_PTR_NULL(mem, "H5MM_realloc (case 2)");
+ mem = H5MM_xfree(mem);
+
+ mem = H5MM_realloc(mem, sz);
+ CHECK_PTR_NULL(mem, "H5MM_realloc (case 3)");
+ mem = H5MM_xfree(mem);
+
+ /* H5MM_xstrdup(): Ensure NULL returns NULL */
+ dup = H5MM_xstrdup((const char *)mem);
+ CHECK_PTR_NULL(dup, "H5MM_xstrdup");
+ dup = (char *)H5MM_xfree((void *)dup);
+
+} /* end test_misc34() */
+
+
/****************************************************************
**
** test_misc(): Main misc. test routine.
@@ -5454,18 +5632,20 @@ test_misc(void)
test_misc30(); /* Exercise local heap loading bug where free lists were getting dropped */
test_misc31(); /* Test Reentering library through deprecated routines after H5close() */
test_misc32(); /* Test filter memory allocation functions */
+ test_misc33(); /* Test to verify that H5HL_offset_into() returns error if offset exceeds heap block */
+ test_misc34(); /* Test behavior of 0 and NULL in H5MM API calls */
} /* test_misc() */
-
+
/*-------------------------------------------------------------------------
- * Function: cleanup_misc
+ * Function: cleanup_misc
*
- * Purpose: Cleanup temporary test files
+ * Purpose: Cleanup temporary test files
*
- * Return: none
+ * Return: none
*
- * Programmer: Albert Cheng
+ * Programmer: Albert Cheng
* July 2, 1998
*
* Modifications:
@@ -5511,5 +5691,5 @@ cleanup_misc(void)
HDremove(MISC29_COPY_FILE);
HDremove(MISC30_FILE);
HDremove(MISC31_FILE);
-}
+} /* end cleanup_misc() */
diff --git a/test/trefer.c b/test/trefer.c
index 433239a..7cbb77f 100644
--- a/test/trefer.c
+++ b/test/trefer.c
@@ -5,17 +5,15 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/***********************************************************
*
-* Test program: trefer
+* Test program: trefer
*
* Test the Reference functionality
*
@@ -23,24 +21,22 @@
#include "testhdf5.h"
-#include "hdf5.h"
-
#define FILE1 "trefer1.h5"
-#define FILE2 "trefer2.h5"
-#define FILE3 "trefer3.h5"
+#define FILE2 "trefer2.h5"
+#define FILE3 "trefer3.h5"
/* 1-D dataset with fixed dimensions */
-#define SPACE1_RANK 1
-#define SPACE1_DIM1 4
+#define SPACE1_RANK 1
+#define SPACE1_DIM1 4
/* 2-D dataset with fixed dimensions */
-#define SPACE2_RANK 2
-#define SPACE2_DIM1 10
-#define SPACE2_DIM2 10
+#define SPACE2_RANK 2
+#define SPACE2_DIM1 10
+#define SPACE2_DIM2 10
/* Larger 1-D dataset with fixed dimensions */
-#define SPACE3_RANK 1
-#define SPACE3_DIM1 100
+#define SPACE3_RANK 1
+#define SPACE3_DIM1 100
/* Element selection information */
#define POINT1_NPOINTS 10
@@ -83,7 +79,7 @@ test_reference_params(void)
unsigned *tu32; /* Temporary pointer to uint32 data */
int i; /* counting variables */
const char *write_comment = "Foo!"; /* Comments for group */
- hid_t ret_id; /* Generic hid_t return value */
+ hid_t ret_id; /* Generic hid_t return value */
ssize_t name_size; /* Size of reference name */
herr_t ret; /* Generic return value */
@@ -106,7 +102,7 @@ test_reference_params(void)
/* Create dataset access property list */
dapl_id = H5Pcreate(H5P_DATASET_ACCESS);
CHECK(dapl_id, FAIL, "H5Pcreate");
-
+
/* Create a group */
group = H5Gcreate2(fid1, "Group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(group, FAIL, "H5Gcreate2");
@@ -249,13 +245,13 @@ test_reference_params(void)
static void
test_reference_obj(void)
{
- hid_t fid1; /* HDF5 File IDs */
- hid_t dataset, /* Dataset ID */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset, /* Dataset ID */
dset2; /* Dereferenced dataset ID */
- hid_t group; /* Group ID */
- hid_t sid1; /* Dataspace ID */
- hid_t tid1; /* Datatype ID */
- hsize_t dims1[] = {SPACE1_DIM1};
+ hid_t group; /* Group ID */
+ hid_t sid1; /* Dataspace ID */
+ hid_t tid1; /* Datatype ID */
+ hsize_t dims1[] = {SPACE1_DIM1};
hid_t dapl_id; /* Dataset access property list */
hobj_ref_t *wbuf, /* buffer to write to disk */
*rbuf, /* buffer read from disk */
@@ -267,7 +263,7 @@ test_reference_obj(void)
char read_comment[10];
H5O_type_t obj_type; /* Object type */
ssize_t size; /* Comment length */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Object Reference Functions\n"));
@@ -288,7 +284,7 @@ test_reference_obj(void)
/* Create dataset access property list */
dapl_id = H5Pcreate(H5P_DATASET_ACCESS);
CHECK(dapl_id, FAIL, "H5Pcreate");
-
+
/* Create a group */
group = H5Gcreate2(fid1, "Group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(group, FAIL, "H5Gcreate2");
@@ -498,23 +494,23 @@ test_reference_obj(void)
static void
test_reference_region(void)
{
- hid_t fid1; /* HDF5 File IDs */
- hid_t dset1, /* Dataset ID */
- dset2; /* Dereferenced dataset ID */
- hid_t sid1, /* Dataspace ID #1 */
- sid2; /* Dataspace ID #2 */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dset1, /* Dataset ID */
+ dset2; /* Dereferenced dataset ID */
+ hid_t sid1, /* Dataspace ID #1 */
+ sid2; /* Dataspace ID #2 */
hid_t dapl_id; /* Dataset access property list */
- hsize_t dims1[] = {SPACE1_DIM1},
- dims2[] = {SPACE2_DIM1, SPACE2_DIM2};
- hsize_t start[SPACE2_RANK]; /* Starting location of hyperslab */
- hsize_t stride[SPACE2_RANK]; /* Stride of hyperslab */
- hsize_t count[SPACE2_RANK]; /* Element count of hyperslab */
- hsize_t block[SPACE2_RANK]; /* Block size of hyperslab */
- hsize_t coord1[POINT1_NPOINTS][SPACE2_RANK]; /* Coordinates for point selection */
- hsize_t * coords; /* Coordinate buffer */
- hsize_t low[SPACE2_RANK]; /* Selection bounds */
- hsize_t high[SPACE2_RANK]; /* Selection bounds */
- hdset_reg_ref_t *wbuf, /* buffer to write to disk */
+ hsize_t dims1[] = {SPACE1_DIM1},
+ dims2[] = {SPACE2_DIM1, SPACE2_DIM2};
+ hsize_t start[SPACE2_RANK]; /* Starting location of hyperslab */
+ hsize_t stride[SPACE2_RANK]; /* Stride of hyperslab */
+ hsize_t count[SPACE2_RANK]; /* Element count of hyperslab */
+ hsize_t block[SPACE2_RANK]; /* Block size of hyperslab */
+ hsize_t coord1[POINT1_NPOINTS][SPACE2_RANK]; /* Coordinates for point selection */
+ hsize_t * coords; /* Coordinate buffer */
+ hsize_t low[SPACE2_RANK]; /* Selection bounds */
+ hsize_t high[SPACE2_RANK]; /* Selection bounds */
+ hdset_reg_ref_t *wbuf, /* buffer to write to disk */
*rbuf; /* buffer read from disk */
hdset_reg_ref_t nvrbuf[3]={{0},{101},{255}}; /* buffer with non-valid refs */
uint8_t *dwbuf, /* Buffer for writing numeric data to disk */
@@ -524,7 +520,7 @@ test_reference_region(void)
int i, j; /* counting variables */
hssize_t hssize_ret; /* hssize_t return value */
htri_t tri_ret; /* htri_t return value */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
haddr_t addr = HADDR_UNDEF; /* test for undefined reference */
hid_t dset_NA; /* Dataset id for undefined reference */
hid_t space_NA; /* Dataspace id for undefined reference */
@@ -552,7 +548,7 @@ test_reference_region(void)
/* Create dataset access property list */
dapl_id = H5Pcreate(H5P_DATASET_ACCESS);
CHECK(dapl_id, FAIL, "H5Pcreate");
-
+
/* Create a dataset */
dset2 = H5Dcreate2(fid1, "Dataset2", H5T_STD_U8LE, sid2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(dset2, FAIL, "H5Dcreate2");
@@ -661,7 +657,7 @@ test_reference_region(void)
/* Close and release resources for undefined region reference tests */
ret = H5Dclose(dset_NA);
CHECK(ret, FAIL, "H5Dclose");
- ret = H5Sclose(space_NA);
+ ret = H5Sclose(space_NA);
CHECK(ret, FAIL, "H5Sclose");
/* Close disk dataspace */
@@ -684,10 +680,10 @@ test_reference_region(void)
fid1 = H5Fopen(FILE2, H5F_ACC_RDWR, H5P_DEFAULT);
CHECK(fid1, FAIL, "H5Fopen");
- /*
- * Start the test of an undefined reference
+ /*
+ * Start the test of an undefined reference
*/
-
+
/* Open the dataset of the undefined references */
dset_NA = H5Dopen2(fid1, "DS_NA", H5P_DEFAULT);
CHECK(dset_NA, FAIL, "H5Dopen2");
@@ -695,28 +691,28 @@ test_reference_region(void)
/* Read the data */
ret = H5Dread(dset_NA, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT, rdata_NA);
CHECK(ret, FAIL, "H5Dread");
-
+
/*
* Dereference an undefined reference (should fail)
*/
H5E_BEGIN_TRY {
dset2 = H5Rdereference2(dset_NA, H5P_DEFAULT, H5R_DATASET_REGION, &rdata_NA[0]);
- } H5E_END_TRY;
- VERIFY(dset2, FAIL, "H5Rdereference2");
+ } H5E_END_TRY;
+ VERIFY(dset2, FAIL, "H5Rdereference2");
/* Close and release resources. */
ret = H5Dclose(dset_NA);
CHECK(ret, FAIL, "H5Dclose");
- /* This close should fail since H5Rdereference2 never created
+ /* This close should fail since H5Rdereference2 never created
* the id of the referenced object. */
H5E_BEGIN_TRY {
ret = H5Dclose(dset2);
- } H5E_END_TRY;
- VERIFY(ret, FAIL, "H5Dclose");
+ } H5E_END_TRY;
+ VERIFY(ret, FAIL, "H5Dclose");
- /*
- * End the test of an undefined reference
+ /*
+ * End the test of an undefined reference
*/
/* Open the dataset */
@@ -895,22 +891,22 @@ test_reference_region(void)
static void
test_reference_region_1D(void)
{
- hid_t fid1; /* HDF5 File IDs */
- hid_t dset1, /* Dataset ID */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dset1, /* Dataset ID */
dset3; /* Dereferenced dataset ID */
- hid_t sid1, /* Dataspace ID #1 */
- sid3; /* Dataspace ID #3 */
+ hid_t sid1, /* Dataspace ID #1 */
+ sid3; /* Dataspace ID #3 */
hid_t dapl_id; /* Dataset access property list */
- hsize_t dims1[] = {SPACE1_DIM1},
- dims3[] = {SPACE3_DIM1};
- hsize_t start[SPACE3_RANK]; /* Starting location of hyperslab */
- hsize_t stride[SPACE3_RANK]; /* Stride of hyperslab */
- hsize_t count[SPACE3_RANK]; /* Element count of hyperslab */
- hsize_t block[SPACE3_RANK]; /* Block size of hyperslab */
- hsize_t coord1[POINT1_NPOINTS][SPACE3_RANK]; /* Coordinates for point selection */
+ hsize_t dims1[] = {SPACE1_DIM1},
+ dims3[] = {SPACE3_DIM1};
+ hsize_t start[SPACE3_RANK]; /* Starting location of hyperslab */
+ hsize_t stride[SPACE3_RANK]; /* Stride of hyperslab */
+ hsize_t count[SPACE3_RANK]; /* Element count of hyperslab */
+ hsize_t block[SPACE3_RANK]; /* Block size of hyperslab */
+ hsize_t coord1[POINT1_NPOINTS][SPACE3_RANK]; /* Coordinates for point selection */
hsize_t * coords; /* Coordinate buffer */
- hsize_t low[SPACE3_RANK]; /* Selection bounds */
- hsize_t high[SPACE3_RANK]; /* Selection bounds */
+ hsize_t low[SPACE3_RANK]; /* Selection bounds */
+ hsize_t high[SPACE3_RANK]; /* Selection bounds */
hdset_reg_ref_t *wbuf, /* buffer to write to disk */
*rbuf; /* buffer read from disk */
uint8_t *dwbuf, /* Buffer for writing numeric data to disk */
@@ -918,7 +914,7 @@ test_reference_region_1D(void)
uint8_t *tu8; /* Temporary pointer to uint8 data */
H5O_type_t obj_type; /* Object type */
int i; /* counting variables */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing 1-D Dataset Region Reference Functions\n"));
@@ -940,7 +936,7 @@ test_reference_region_1D(void)
/* Create dataset access property list */
dapl_id = H5Pcreate(H5P_DATASET_ACCESS);
CHECK(dapl_id, FAIL, "H5Pcreate");
-
+
/* Create a dataset */
dset3 = H5Dcreate2(fid1, "Dataset2", H5T_STD_U8LE, sid3, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
CHECK(dset3, FAIL, "H5Dcreate2");
@@ -1180,14 +1176,14 @@ test_reference_region_1D(void)
static void
test_reference_obj_deleted(void)
{
- hid_t fid1; /* HDF5 File IDs */
- hid_t dataset, /* Dataset ID */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset, /* Dataset ID */
dset2; /* Dereferenced dataset ID */
- hid_t sid1; /* Dataspace ID */
+ hid_t sid1; /* Dataspace ID */
hobj_ref_t oref; /* Object Reference to test */
H5O_type_t obj_type; /* Object type */
- haddr_t addr = HADDR_UNDEF; /* test for undefined reference */
- herr_t ret; /* Generic return value */
+ haddr_t addr = HADDR_UNDEF; /* test for undefined reference */
+ herr_t ret; /* Generic return value */
/* Create file */
fid1 = H5Fcreate(FILE3, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -1446,25 +1442,25 @@ test_reference_group(void)
static void
test_reference_compat(void)
{
- hid_t fid1; /* HDF5 File IDs */
- hid_t dataset, dset2; /* Dataset ID */
- hid_t group, group2; /* Group ID */
- hid_t sid1, /* Dataspace IDs */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset, dset2; /* Dataset ID */
+ hid_t group, group2; /* Group ID */
+ hid_t sid1, /* Dataspace IDs */
sid2;
- hid_t tid1, tid2; /* Datatype ID */
- hsize_t dims1[] = {SPACE1_DIM1},
- dims2[] = {SPACE2_DIM1, SPACE2_DIM2};
- hsize_t start[SPACE2_RANK]; /* Starting location of hyperslab */
- hsize_t stride[SPACE2_RANK]; /* Stride of hyperslab */
- hsize_t count[SPACE2_RANK]; /* Element count of hyperslab */
- hsize_t block[SPACE2_RANK]; /* Block size of hyperslab */
- hsize_t coord1[POINT1_NPOINTS][SPACE2_RANK]; /* Coordinates for point selection */
+ hid_t tid1, tid2; /* Datatype ID */
+ hsize_t dims1[] = {SPACE1_DIM1},
+ dims2[] = {SPACE2_DIM1, SPACE2_DIM2};
+ hsize_t start[SPACE2_RANK]; /* Starting location of hyperslab */
+ hsize_t stride[SPACE2_RANK]; /* Stride of hyperslab */
+ hsize_t count[SPACE2_RANK]; /* Element count of hyperslab */
+ hsize_t block[SPACE2_RANK]; /* Block size of hyperslab */
+ hsize_t coord1[POINT1_NPOINTS][SPACE2_RANK]; /* Coordinates for point selection */
hobj_ref_t *wbuf_obj, /* Buffer to write to disk */
*rbuf_obj; /* Buffer read from disk */
hdset_reg_ref_t *wbuf_reg, /* Buffer to write to disk */
*rbuf_reg; /* Buffer read from disk */
H5G_obj_t obj_type; /* Object type */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Deprecated Object Reference Functions\n"));
@@ -1752,15 +1748,15 @@ test_reference(void)
} /* test_reference() */
-
+
/*-------------------------------------------------------------------------
- * Function: cleanup_reference
+ * Function: cleanup_reference
*
- * Purpose: Cleanup temporary test files
+ * Purpose: Cleanup temporary test files
*
- * Return: none
+ * Return: none
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* September 8, 1998
*
* Modifications:
diff --git a/test/trefstr.c b/test/trefstr.c
index dd76cc1..83e2951 100644
--- a/test/trefstr.c
+++ b/test/trefstr.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
@@ -69,7 +67,7 @@ test_refstr_create(void)
/* Try creating a ref-counted string */
rs=H5RS_create("foo");
- CHECK(rs, NULL, "H5RS_create");
+ CHECK_PTR(rs, "H5RS_create");
/* Get the reference count on the string */
count=H5RS_get_count(rs);
@@ -99,7 +97,7 @@ test_refstr_count(void)
/* Try creating a ref-counted string */
rs=H5RS_create("foo");
- CHECK(rs, NULL, "H5RS_create");
+ CHECK_PTR(rs, "H5RS_create");
/* Get the reference count on the string */
count=H5RS_get_count(rs);
@@ -146,7 +144,7 @@ test_refstr_dup(void)
/* Try creating a ref-counted string */
rs1=H5RS_create("foo");
- CHECK(rs1, NULL, "H5RS_create");
+ CHECK_PTR(rs1, "H5RS_create");
/* Get the reference count on the string */
count=H5RS_get_count(rs1);
@@ -154,7 +152,7 @@ test_refstr_dup(void)
/* Duplicate r-string */
rs2=H5RS_dup(rs1);
- CHECK(rs2, NULL, "H5RS_dup");
+ CHECK_PTR(rs2, "H5RS_dup");
/* Get the reference count on the strings */
count=H5RS_get_count(rs1);
@@ -196,11 +194,11 @@ test_refstr_cmp(void)
/* Create first reference counted string */
rs1=H5RS_create("foo");
- CHECK(rs1, NULL, "H5RS_create");
+ CHECK_PTR(rs1, "H5RS_create");
/* Create second reference counted string */
rs2=H5RS_create("foo2");
- CHECK(rs2, NULL, "H5RS_create");
+ CHECK_PTR(rs2, "H5RS_create");
/* Compare the strings in various ways */
cmp=H5RS_cmp(rs1,rs1);
@@ -248,12 +246,12 @@ test_refstr_wrap(void)
/* Wrap ref-counted string around existing buffer */
rs=H5RS_wrap(buf);
- CHECK(rs, NULL, "H5RS_wrap");
+ CHECK_PTR(rs, "H5RS_wrap");
/* Get pointer to raw string in ref-counted string */
s=H5RS_get_str(rs);
- CHECK(s, NULL, "H5RS_get_str");
- VERIFY(s, buf, "wrapping");
+ CHECK_PTR(s, "H5RS_get_str");
+ CHECK_PTR_EQ(s, buf, "wrapping");
cmp=HDstrcmp(s,buf);
VERIFY(cmp, 0, "HDstrcmp");
@@ -266,7 +264,7 @@ test_refstr_wrap(void)
/* Get pointer to raw string in ref-counted string */
s=H5RS_get_str(rs);
- CHECK(s, NULL, "H5RS_get_str");
+ CHECK_PTR(s, "H5RS_get_str");
CHECK(s, buf, "wrapping");
cmp=HDstrcmp(s,buf);
if(cmp<=0)
@@ -301,17 +299,17 @@ test_refstr_own(void)
/* Initialize buffer */
s = (char *)H5FL_BLK_MALLOC(str_buf,HDstrlen("foo") + 1);
- CHECK(s, NULL, "H5FL_BLK_MALLOC");
+ CHECK_PTR(s, "H5FL_BLK_MALLOC");
HDstrcpy(s, "foo");
/* Transfer ownership of dynamically allocated string to ref-counted string */
rs=H5RS_own(s);
- CHECK(rs, NULL, "H5RS_own");
+ CHECK_PTR(rs, "H5RS_own");
/* Get pointer to raw string in ref-counted string */
t=H5RS_get_str(rs);
- CHECK(t, NULL, "H5RS_get_str");
- VERIFY(t, s, "transferring");
+ CHECK_PTR(t, "H5RS_get_str");
+ CHECK_PTR_EQ(t, s, "transferring");
cmp=HDstrcmp(s,t);
VERIFY(cmp, 0, "HDstrcmp");
@@ -324,8 +322,8 @@ test_refstr_own(void)
/* Get pointer to raw string in ref-counted string */
t=H5RS_get_str(rs);
- CHECK(t, NULL, "H5RS_get_str");
- VERIFY(t, s, "transferring");
+ CHECK_PTR(t, "H5RS_get_str");
+ CHECK_PTR_EQ(t, s, "transferring");
cmp=HDstrcmp(t,s);
VERIFY(cmp, 0, "HDstrcmp");
diff --git a/test/tselect.c b/test/tselect.c
index 08018c6..3c93e7a 100644
--- a/test/tselect.c
+++ b/test/tselect.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/***********************************************************
@@ -230,9 +228,9 @@ test_select_hyper(hid_t xfer_plist)
/* Allocate write & read buffers */
wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
- CHECK(wbuf, NULL, "HDmalloc");
+ CHECK_PTR(wbuf, "HDmalloc");
rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
- CHECK(rbuf, NULL, "HDcalloc");
+ CHECK_PTR(rbuf, "HDcalloc");
/* Initialize write buffer */
for(i=0, tbuf=wbuf; i<SPACE2_DIM1; i++)
@@ -434,9 +432,9 @@ test_select_point(hid_t xfer_plist)
/* Allocate write & read buffers */
wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
- CHECK(wbuf, NULL, "HDmalloc");
+ CHECK_PTR(wbuf, "HDmalloc");
rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
- CHECK(rbuf, NULL, "HDcalloc");
+ CHECK_PTR(rbuf, "HDcalloc");
/* Initialize write buffer */
for(i=0, tbuf=wbuf; i<SPACE2_DIM1; i++)
@@ -712,9 +710,9 @@ test_select_all(hid_t xfer_plist)
/* Allocate write & read buffers */
wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE4_DIM1 * SPACE4_DIM2 * SPACE4_DIM3);
- CHECK(wbuf, NULL, "HDmalloc");
+ CHECK_PTR(wbuf, "HDmalloc");
rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE4_DIM1 * SPACE4_DIM2 * SPACE4_DIM3));
- CHECK(rbuf, NULL, "HDcalloc");
+ CHECK_PTR(rbuf, "HDcalloc");
/* Initialize write buffer */
for(i=0, tbuf=wbuf; i<SPACE4_DIM1; i++)
@@ -799,9 +797,9 @@ test_select_all_hyper(hid_t xfer_plist)
/* Allocate write & read buffers */
wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
- CHECK(wbuf, NULL, "HDmalloc");
+ CHECK_PTR(wbuf, "HDmalloc");
rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
- CHECK(rbuf, NULL, "HDcalloc");
+ CHECK_PTR(rbuf, "HDcalloc");
/* Initialize write buffer */
for(i=0, tbuf=wbuf; i<SPACE2_DIM1; i++)
@@ -941,9 +939,9 @@ test_select_combo(void)
/* Allocate write & read buffers */
wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
- CHECK(wbuf, NULL, "HDmalloc");
+ CHECK_PTR(wbuf, "HDmalloc");
rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
- CHECK(rbuf, NULL, "HDcalloc");
+ CHECK_PTR(rbuf, "HDcalloc");
/* Initialize write buffer */
for(i=0, tbuf=wbuf; i<SPACE2_DIM1; i++)
@@ -1108,9 +1106,9 @@ test_select_hyper_stride(hid_t xfer_plist)
/* Allocate write & read buffers */
wbuf = (uint16_t *)HDmalloc(sizeof(uint16_t) * SPACE2_DIM1 * SPACE2_DIM2);
- CHECK(wbuf, NULL, "HDmalloc");
+ CHECK_PTR(wbuf, "HDmalloc");
rbuf = (uint16_t *)HDcalloc(sizeof(uint16_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
- CHECK(rbuf, NULL, "HDcalloc");
+ CHECK_PTR(rbuf, "HDcalloc");
/* Initialize write buffer */
for(i=0, tbuf=wbuf; i<SPACE2_DIM1; i++)
@@ -1236,9 +1234,9 @@ test_select_hyper_contig(hid_t dset_type, hid_t xfer_plist)
/* Allocate write & read buffers */
wbuf = (uint16_t *)HDmalloc(sizeof(uint16_t) * SPACE2_DIM1 * SPACE2_DIM2);
- CHECK(wbuf, NULL, "HDmalloc");
+ CHECK_PTR(wbuf, "HDmalloc");
rbuf = (uint16_t *)HDcalloc(sizeof(uint16_t), (size_t)(SPACE2_DIM1 * SPACE2_DIM2));
- CHECK(rbuf, NULL, "HDcalloc");
+ CHECK_PTR(rbuf, "HDcalloc");
/* Initialize write buffer */
for(i=0, tbuf=wbuf; i<SPACE2_DIM1; i++)
@@ -1366,9 +1364,9 @@ test_select_hyper_contig2(hid_t dset_type, hid_t xfer_plist)
/* Allocate write & read buffers */
wbuf = (uint16_t *)HDmalloc(sizeof(uint16_t) * SPACE8_DIM1 * SPACE8_DIM2 * SPACE8_DIM3 * SPACE8_DIM4);
- CHECK(wbuf, NULL, "HDmalloc");
+ CHECK_PTR(wbuf, "HDmalloc");
rbuf = (uint16_t *)HDcalloc(sizeof(uint16_t), (size_t)(SPACE8_DIM1 * SPACE8_DIM2 * SPACE8_DIM3 * SPACE8_DIM4));
- CHECK(rbuf, NULL, "HDcalloc");
+ CHECK_PTR(rbuf, "HDcalloc");
/* Initialize write buffer */
for(i=0, tbuf=wbuf; i<SPACE8_DIM1; i++)
@@ -1493,9 +1491,9 @@ test_select_hyper_contig3(hid_t dset_type, hid_t xfer_plist)
/* Allocate write & read buffers */
wbuf = (uint16_t *)HDmalloc(sizeof(uint16_t) * SPACE8_DIM1 * SPACE8_DIM2 * SPACE8_DIM3 * SPACE8_DIM4);
- CHECK(wbuf, NULL, "HDmalloc");
+ CHECK_PTR(wbuf, "HDmalloc");
rbuf = (uint16_t *)HDcalloc(sizeof(uint16_t), (size_t)(SPACE8_DIM1 * SPACE8_DIM2 * SPACE8_DIM3 * SPACE8_DIM4));
- CHECK(rbuf, NULL, "HDcalloc");
+ CHECK_PTR(rbuf, "HDcalloc");
/* Initialize write buffer */
for(i=0, tbuf=wbuf; i<SPACE8_DIM4; i++)
@@ -1737,9 +1735,9 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf,
/* Allocate buffers */
small_cube_buf_1 = (uint16_t *)HDcalloc(sizeof(uint16_t), small_cube_size);
- CHECK(small_cube_buf_1, NULL, "HDcalloc");
+ CHECK_PTR(small_cube_buf_1, "HDcalloc");
large_cube_buf_1 = (uint16_t *)HDcalloc(sizeof(uint16_t), large_cube_size);
- CHECK(large_cube_buf_1, NULL, "HDcalloc");
+ CHECK_PTR(large_cube_buf_1, "HDcalloc");
/* Create a dataset transfer property list */
fapl = H5Pcreate(H5P_FILE_ACCESS);
@@ -2344,7 +2342,7 @@ test_select_hyper_contig_dr(hid_t dset_type, hid_t xfer_plist)
/* Allocate cube buffer for writing values */
cube_buf = (uint16_t *)HDmalloc(sizeof(uint16_t) * max_cube_size);
- CHECK(cube_buf, NULL, "HDmalloc");
+ CHECK_PTR(cube_buf, "HDmalloc");
/* Initialize the cube buffer */
cube_ptr = cube_buf;
@@ -2353,7 +2351,7 @@ test_select_hyper_contig_dr(hid_t dset_type, hid_t xfer_plist)
/* Allocate cube buffer for zeroing values on disk */
zero_buf = (uint16_t *)HDcalloc(sizeof(uint16_t), max_cube_size);
- CHECK(zero_buf, NULL, "HDcalloc");
+ CHECK_PTR(zero_buf, "HDcalloc");
for(large_rank = 1; large_rank <= max_rank; large_rank++) {
for(small_rank = 1; small_rank < large_rank; small_rank++) {
@@ -2813,9 +2811,9 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
/* Allocate & initialize buffers */
small_cube_buf_1 = (uint16_t *)HDcalloc(sizeof(uint16_t), small_cube_size);
- CHECK(small_cube_buf_1, NULL, "HDcalloc");
+ CHECK_PTR(small_cube_buf_1, "HDcalloc");
large_cube_buf_1 = (uint16_t *)HDcalloc(sizeof(uint16_t), large_cube_size);
- CHECK(large_cube_buf_1, NULL, "HDcalloc");
+ CHECK_PTR(large_cube_buf_1, "HDcalloc");
/* Create a dataset transfer property list */
@@ -3576,7 +3574,7 @@ test_select_hyper_checker_board_dr(hid_t dset_type, hid_t xfer_plist)
/* Allocate cube buffer for writing values */
cube_buf = (uint16_t *)HDmalloc(sizeof(uint16_t) * max_cube_size);
- CHECK(cube_buf, NULL, "HDmalloc");
+ CHECK_PTR(cube_buf, "HDmalloc");
/* Initialize the cube buffer */
cube_ptr = cube_buf;
@@ -3585,7 +3583,7 @@ test_select_hyper_checker_board_dr(hid_t dset_type, hid_t xfer_plist)
/* Allocate cube buffer for zeroing values on disk */
zero_buf = (uint16_t *)HDcalloc(sizeof(uint16_t), max_cube_size);
- CHECK(zero_buf, NULL, "HDcalloc");
+ CHECK_PTR(zero_buf, "HDcalloc");
for(large_rank = 1; large_rank <= max_rank; large_rank++) {
for(small_rank = 1; small_rank < large_rank; small_rank++) {
@@ -3653,11 +3651,11 @@ test_select_hyper_copy(void)
/* Allocate write & read buffers */
wbuf = (uint16_t *)HDmalloc(sizeof(uint16_t) * SPACE2_DIM1 * SPACE2_DIM2);
- CHECK(wbuf, NULL, "HDmalloc");
+ CHECK_PTR(wbuf, "HDmalloc");
rbuf = (uint16_t *)HDcalloc(sizeof(uint16_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
- CHECK(rbuf, NULL, "HDcalloc");
+ CHECK_PTR(rbuf, "HDcalloc");
rbuf2 = (uint16_t *)HDcalloc(sizeof(uint16_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
- CHECK(rbuf2, NULL, "HDcalloc");
+ CHECK_PTR(rbuf2, "HDcalloc");
/* Initialize write buffer */
for(i=0, tbuf=wbuf; i<SPACE2_DIM1; i++)
@@ -3815,11 +3813,11 @@ test_select_point_copy(void)
/* Allocate write & read buffers */
wbuf = (uint16_t *)HDmalloc(sizeof(uint16_t) * SPACE2_DIM1 * SPACE2_DIM2);
- CHECK(wbuf, NULL, "HDmalloc");
+ CHECK_PTR(wbuf, "HDmalloc");
rbuf = (uint16_t *)HDcalloc(sizeof(uint16_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
- CHECK(rbuf, NULL, "HDcalloc");
+ CHECK_PTR(rbuf, "HDcalloc");
rbuf2 = (uint16_t *)HDcalloc(sizeof(uint16_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
- CHECK(rbuf2, NULL, "HDcalloc");
+ CHECK_PTR(rbuf2, "HDcalloc");
/* Initialize write buffer */
for(i=0, tbuf=wbuf; i<SPACE2_DIM1; i++)
@@ -3993,9 +3991,9 @@ test_select_hyper_offset(void)
/* Allocate write & read buffers */
wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
- CHECK(wbuf, NULL, "HDmalloc");
+ CHECK_PTR(wbuf, "HDmalloc");
rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
- CHECK(rbuf, NULL, "HDcalloc");
+ CHECK_PTR(rbuf, "HDcalloc");
/* Initialize write buffer */
for(i=0, tbuf=wbuf; i<SPACE2_DIM1; i++)
@@ -4151,9 +4149,9 @@ test_select_hyper_offset2(void)
/* Allocate write & read buffers */
wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE7_DIM1 * SPACE7_DIM2);
- CHECK(wbuf, NULL, "HDmalloc");
+ CHECK_PTR(wbuf, "HDmalloc");
rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE7_DIM1 * SPACE7_DIM2));
- CHECK(rbuf, NULL, "HDcalloc");
+ CHECK_PTR(rbuf, "HDcalloc");
/* Initialize write buffer */
for(i=0, tbuf=wbuf; i<SPACE7_DIM1; i++)
@@ -4274,9 +4272,9 @@ test_select_point_offset(void)
/* Allocate write & read buffers */
wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
- CHECK(wbuf, NULL, "HDmalloc");
+ CHECK_PTR(wbuf, "HDmalloc");
rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
- CHECK(rbuf, NULL, "HDcalloc");
+ CHECK_PTR(rbuf, "HDcalloc");
/* Initialize write buffer */
for(i=0, tbuf=wbuf; i<SPACE2_DIM1; i++)
@@ -4454,9 +4452,9 @@ test_select_hyper_union(void)
/* Allocate write & read buffers */
wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
- CHECK(wbuf, NULL, "HDmalloc");
+ CHECK_PTR(wbuf, "HDmalloc");
rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2));
- CHECK(rbuf, NULL, "HDcalloc");
+ CHECK_PTR(rbuf, "HDcalloc");
/* Initialize write buffer */
for(i=0, tbuf=wbuf; i<SPACE2_DIM1; i++)
@@ -5321,9 +5319,9 @@ test_select_hyper_and_2d(void)
/* Allocate write & read buffers */
wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
- CHECK(wbuf, NULL, "HDmalloc");
+ CHECK_PTR(wbuf, "HDmalloc");
rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE2_DIM1 * SPACE2_DIM2));
- CHECK(rbuf, NULL, "HDcalloc");
+ CHECK_PTR(rbuf, "HDcalloc");
/* Initialize write buffer */
for(i=0, tbuf=wbuf; i<SPACE2_DIM1; i++)
@@ -5450,9 +5448,9 @@ test_select_hyper_xor_2d(void)
/* Allocate write & read buffers */
wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
- CHECK(wbuf, NULL, "HDmalloc");
+ CHECK_PTR(wbuf, "HDmalloc");
rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE2_DIM1 * SPACE2_DIM2));
- CHECK(rbuf, NULL, "HDcalloc");
+ CHECK_PTR(rbuf, "HDcalloc");
/* Initialize write buffer */
for(i=0, tbuf=wbuf; i<SPACE2_DIM1; i++)
@@ -5581,9 +5579,9 @@ test_select_hyper_notb_2d(void)
/* Allocate write & read buffers */
wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
- CHECK(wbuf, NULL, "HDmalloc");
+ CHECK_PTR(wbuf, "HDmalloc");
rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE2_DIM1 * SPACE2_DIM2));
- CHECK(rbuf, NULL, "HDcalloc");
+ CHECK_PTR(rbuf, "HDcalloc");
/* Initialize write buffer */
for(i=0, tbuf=wbuf; i<SPACE2_DIM1; i++)
@@ -5711,9 +5709,9 @@ test_select_hyper_nota_2d(void)
/* Allocate write & read buffers */
wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2);
- CHECK(wbuf, NULL, "HDmalloc");
+ CHECK_PTR(wbuf, "HDmalloc");
rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE2_DIM1 * SPACE2_DIM2));
- CHECK(rbuf, NULL, "HDcalloc");
+ CHECK_PTR(rbuf, "HDcalloc");
/* Initialize write buffer */
for(i=0, tbuf=wbuf; i<SPACE2_DIM1; i++)
@@ -5871,9 +5869,9 @@ test_select_hyper_union_random_5d(hid_t read_plist)
/* Allocate write & read buffers */
wbuf = (int *)HDmalloc(sizeof(int) * SPACE5_DIM1 * SPACE5_DIM2 * SPACE5_DIM3 * SPACE5_DIM4 * SPACE5_DIM5);
- CHECK(wbuf, NULL, "HDmalloc");
+ CHECK_PTR(wbuf, "HDmalloc");
rbuf = (int *)HDcalloc(sizeof(int), (size_t)(SPACE5_DIM1 * SPACE5_DIM2 * SPACE5_DIM3 * SPACE5_DIM4 * SPACE5_DIM5));
- CHECK(rbuf, NULL, "HDcalloc");
+ CHECK_PTR(rbuf, "HDcalloc");
/* Initialize write buffer */
for(i=0, tbuf=wbuf; i<SPACE5_DIM1; i++)
@@ -6063,9 +6061,9 @@ test_select_hyper_chunk(hid_t fapl_plist, hid_t xfer_plist)
/* Allocate the transfer buffers */
data = (short *)HDmalloc(sizeof(short) * X * Y * Z);
- CHECK(data, NULL, "HDmalloc");
+ CHECK_PTR(data, "HDmalloc");
data_out = (short *)HDcalloc((size_t)(NX * NY * NZ), sizeof(short));
- CHECK(data_out, NULL, "HDcalloc");
+ CHECK_PTR(data_out, "HDcalloc");
/*
* Data buffer initialization.
@@ -6298,9 +6296,9 @@ test_select_point_chunk(void)
/* Allocate the transfer buffers */
data = (unsigned *)HDmalloc(sizeof(unsigned) * SPACE7_DIM1 * SPACE7_DIM2);
- CHECK(data, NULL, "HDmalloc");
+ CHECK_PTR(data, "HDmalloc");
data_out = (unsigned *)HDcalloc((size_t)(SPACE7_DIM1 * SPACE7_DIM2), sizeof(unsigned));
- CHECK(data_out, NULL, "HDcalloc");
+ CHECK_PTR(data_out, "HDcalloc");
/*
* Data buffer initialization.
@@ -7059,7 +7057,7 @@ test_select_fill_all(void)
/* Allocate memory buffer */
wbuf = (unsigned *)HDmalloc(sizeof(unsigned) * SPACE7_DIM1 * SPACE7_DIM2);
- CHECK(wbuf, NULL, "HDmalloc");
+ CHECK_PTR(wbuf, "HDmalloc");
/* Initialize memory buffer */
for(u = 0, tbuf = wbuf; u < SPACE7_DIM1; u++)
@@ -7135,7 +7133,7 @@ test_select_fill_point(hssize_t *offset)
/* Allocate memory buffer */
wbuf = (unsigned *)HDmalloc(sizeof(unsigned) * SPACE7_DIM1 * SPACE7_DIM2);
- CHECK(wbuf, NULL, "HDmalloc");
+ CHECK_PTR(wbuf, "HDmalloc");
/* Initialize memory buffer */
for(u = 0, tbuf = wbuf; u < SPACE7_DIM1; u++)
@@ -7232,7 +7230,7 @@ test_select_fill_hyper_simple(hssize_t *offset)
/* Allocate memory buffer */
wbuf = (unsigned *)HDmalloc(sizeof(unsigned) * SPACE7_DIM1 * SPACE7_DIM2);
- CHECK(wbuf, NULL, "HDmalloc");
+ CHECK_PTR(wbuf, "HDmalloc");
/* Initialize memory buffer */
for(u = 0, tbuf = wbuf; u < SPACE7_DIM1; u++)
@@ -7339,7 +7337,7 @@ test_select_fill_hyper_regular(hssize_t *offset)
/* Allocate memory buffer */
wbuf = (unsigned *)HDmalloc(sizeof(unsigned) * SPACE7_DIM1 * SPACE7_DIM2);
- CHECK(wbuf, NULL, "HDmalloc");
+ CHECK_PTR(wbuf, "HDmalloc");
/* Initialize memory buffer */
for(u = 0, tbuf = wbuf; u < SPACE7_DIM1; u++)
@@ -7458,7 +7456,7 @@ test_select_fill_hyper_irregular(hssize_t *offset)
/* Allocate memory buffer */
wbuf = (unsigned *)HDmalloc(sizeof(unsigned) * SPACE7_DIM1 * SPACE7_DIM2);
- CHECK(wbuf, NULL, "HDmalloc");
+ CHECK_PTR(wbuf, "HDmalloc");
/* Initialize memory buffer */
for(u = 0, tbuf = wbuf; u < SPACE7_DIM1; u++)
@@ -7560,9 +7558,9 @@ test_select_none(void)
/* Allocate write & read buffers */
wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE7_DIM1 * SPACE7_DIM2);
- CHECK(wbuf, NULL, "HDmalloc");
+ CHECK_PTR(wbuf, "HDmalloc");
rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), SPACE7_DIM1 * SPACE7_DIM2);
- CHECK(rbuf, NULL, "HDcalloc");
+ CHECK_PTR(rbuf, "HDcalloc");
/* Initialize write buffer */
for(i=0, tbuf=wbuf; i<SPACE7_DIM1; i++)
@@ -7663,9 +7661,9 @@ test_scalar_select(void)
/* Allocate write & read buffers */
wbuf_uint8 = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE7_DIM1 * SPACE7_DIM2);
- CHECK(wbuf_uint8, NULL, "HDmalloc");
+ CHECK_PTR(wbuf_uint8, "HDmalloc");
wbuf_ushort = (unsigned short *)HDmalloc(sizeof(unsigned short) * SPACE7_DIM1 * SPACE7_DIM2);
- CHECK(wbuf_ushort, NULL, "HDmalloc");
+ CHECK_PTR(wbuf_ushort, "HDmalloc");
/* Initialize write buffers */
for(i=0, tbuf_uint8=wbuf_uint8, tbuf_ushort=wbuf_ushort; i<SPACE7_DIM1; i++)
@@ -12584,9 +12582,9 @@ test_select_hyper_chunk_offset(void)
/* Allocate buffers */
wbuf = (int *)HDmalloc(sizeof(int) * SPACE10_DIM1);
- CHECK(wbuf, NULL, "HDmalloc");
+ CHECK_PTR(wbuf, "HDmalloc");
rbuf = (int *)HDcalloc(sizeof(int), SPACE10_DIM1);
- CHECK(rbuf, NULL, "HDcalloc");
+ CHECK_PTR(rbuf, "HDcalloc");
/* Initialize the write buffer */
for(i=0; i<SPACE10_DIM1; i++)
diff --git a/test/tskiplist.c b/test/tskiplist.c
index f30948e..2806afe 100644
--- a/test/tskiplist.c
+++ b/test/tskiplist.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
@@ -68,11 +66,11 @@ test_skiplist_init(void)
/* Allocate arrays */
rand_num = (int *)HDmalloc(sizeof(int) * NUM_ELEMS);
- CHECK(rand_num, NULL, "HDmalloc");
+ CHECK_PTR(rand_num, "HDmalloc");
sort_rand_num = (int *)HDmalloc(sizeof(int) * NUM_ELEMS);
- CHECK(sort_rand_num, NULL, "HDmalloc");
+ CHECK_PTR(sort_rand_num, "HDmalloc");
rev_sort_rand_num = (int *)HDmalloc(sizeof(int) * NUM_ELEMS);
- CHECK(rev_sort_rand_num, NULL, "HDmalloc");
+ CHECK_PTR(rev_sort_rand_num, "HDmalloc");
/* Initialize random number seed */
curr_time = HDtime(NULL);
@@ -127,7 +125,7 @@ test_skiplist_create(void)
/* Try creating a skip list */
slist = H5SL_create(H5SL_TYPE_INT, NULL);
- CHECK(slist, NULL, "H5SL_create");
+ CHECK_PTR(slist, "H5SL_create");
/* Try closing the skip list */
ret=H5SL_close(slist);
@@ -157,7 +155,7 @@ test_skiplist_insert(void)
/* Create a skip list */
slist = H5SL_create(H5SL_TYPE_INT, NULL);
- CHECK(slist, NULL, "H5SL_create");
+ CHECK_PTR(slist, "H5SL_create");
/* Check that the skip list has no elements */
num=H5SL_count(slist);
@@ -166,7 +164,7 @@ test_skiplist_insert(void)
/* Try searching for item in empty skip list */
key=37;
found_item=(int *)H5SL_search(slist,&key);
- VERIFY(found_item, NULL, "H5SL_search");
+ CHECK_PTR_NULL(found_item, "H5SL_search");
/* Insert an object into the skip list */
key=2; item=10;
@@ -179,13 +177,13 @@ test_skiplist_insert(void)
/* Search for the item just inserted */
found_item=(int *)H5SL_search(slist,&key);
- CHECK(found_item, NULL, "H5SL_search");
- VERIFY(*found_item,item,"H5SL_search");
+ CHECK_PTR(found_item, "H5SL_search");
+ VERIFY(*found_item, item, "H5SL_search");
/* Search for an item not in list */
search_key=37;
found_item=(int *)H5SL_search(slist,&search_key);
- VERIFY(found_item, NULL, "H5SL_search");
+ CHECK_PTR_NULL(found_item, "H5SL_search");
/* Attempt to insert duplicate key (should fail) */
search_key=2;
@@ -218,7 +216,7 @@ test_skiplist_insert_many(void)
/* Create a skip list */
slist = H5SL_create(H5SL_TYPE_INT, NULL);
- CHECK(slist, NULL, "H5SL_create");
+ CHECK_PTR(slist, "H5SL_create");
/* Check that the skip list has no elements */
num=H5SL_count(slist);
@@ -237,7 +235,7 @@ test_skiplist_insert_many(void)
/* Search for all objects in the skip list */
for(u=0; u<NUM_ELEMS; u++) {
found_item=(int *)H5SL_search(slist,&rand_num[u]);
- CHECK(found_item, NULL, "H5SL_search");
+ CHECK_PTR(found_item, "H5SL_search");
VERIFY(*found_item,rand_num[u],"H5SL_search");
} /* end for */
@@ -292,7 +290,7 @@ test_skiplist_remove(void)
/* Create a skip list */
slist = H5SL_create(H5SL_TYPE_INT, NULL);
- CHECK(slist, NULL, "H5SL_create");
+ CHECK_PTR(slist, "H5SL_create");
/* Check that the skip list has no elements */
num=H5SL_count(slist);
@@ -301,7 +299,7 @@ test_skiplist_remove(void)
/* Try removing an item in empty skip list */
search_key=37;
found_item=(int *)H5SL_remove(slist,&search_key);
- VERIFY(found_item, NULL, "H5SL_remove");
+ CHECK_PTR_NULL(found_item, "H5SL_remove");
/* Insert three objects into the skip list */
key1=15;
@@ -323,18 +321,18 @@ test_skiplist_remove(void)
/* Try removing items from skip list */
search_key=key1;
found_item=(int *)H5SL_remove(slist,&search_key);
- CHECK(found_item, NULL, "H5SL_remove");
- VERIFY(found_item, &key1, "H5SL_remove");
+ CHECK_PTR(found_item, "H5SL_remove");
+ CHECK_PTR_EQ(found_item, &key1, "H5SL_remove");
search_key=key2;
found_item=(int *)H5SL_remove(slist,&search_key);
- CHECK(found_item, NULL, "H5SL_remove");
- VERIFY(found_item, &key2, "H5SL_remove");
+ CHECK_PTR(found_item, "H5SL_remove");
+ CHECK_PTR_EQ(found_item, &key2, "H5SL_remove");
search_key=key3;
found_item=(int *)H5SL_remove(slist,&search_key);
- CHECK(found_item, NULL, "H5SL_remove");
- VERIFY(found_item, &key3, "H5SL_remove");
+ CHECK_PTR(found_item, "H5SL_remove");
+ CHECK_PTR_EQ(found_item, &key3, "H5SL_remove");
/* Check that the skip list has no elements */
num=H5SL_count(slist);
@@ -343,7 +341,7 @@ test_skiplist_remove(void)
/* Try removing items from empty skip list (after its been worked on) */
search_key=key1;
found_item=(int *)H5SL_remove(slist,&search_key);
- VERIFY(found_item, NULL, "H5SL_remove");
+ CHECK_PTR_NULL(found_item, "H5SL_remove");
/* Close the skip list */
ret=H5SL_close(slist);
@@ -371,7 +369,7 @@ test_skiplist_remove_many(void)
/* Create a skip list */
slist = H5SL_create(H5SL_TYPE_INT, NULL);
- CHECK(slist, NULL, "H5SL_create");
+ CHECK_PTR(slist, "H5SL_create");
/* Check that the skip list has no elements */
num=H5SL_count(slist);
@@ -390,7 +388,7 @@ test_skiplist_remove_many(void)
/* Remove all objects from the skip list (in random order) */
for(u=0; u<NUM_ELEMS; u++) {
found_item=(int *)H5SL_remove(slist,&rand_num[u]);
- CHECK(found_item, NULL, "H5SL_remove");
+ CHECK_PTR(found_item, "H5SL_remove");
VERIFY(*found_item,rand_num[u],"H5SL_remove");
} /* end for */
@@ -413,7 +411,7 @@ test_skiplist_remove_many(void)
/* Remove all objects from the skip list */
for(u=0; u<NUM_ELEMS; u++) {
found_item=(int *)H5SL_remove(slist,&sort_rand_num[u]);
- CHECK(found_item, NULL, "H5SL_remove");
+ CHECK_PTR(found_item, "H5SL_remove");
VERIFY(*found_item,sort_rand_num[u],"H5SL_remove");
} /* end for */
@@ -436,7 +434,7 @@ test_skiplist_remove_many(void)
/* Remove all objects from the skip list */
for(u=0; u<NUM_ELEMS; u++) {
found_item=(int *)H5SL_remove(slist,&rev_sort_rand_num[u]);
- CHECK(found_item, NULL, "H5SL_remove");
+ CHECK_PTR(found_item, "H5SL_remove");
VERIFY(*found_item,rev_sort_rand_num[u],"H5SL_remove");
} /* end for */
@@ -471,7 +469,7 @@ test_skiplist_firstnext(void)
/* Create a skip list */
slist = H5SL_create(H5SL_TYPE_INT, NULL);
- CHECK(slist, NULL, "H5SL_create");
+ CHECK_PTR(slist, "H5SL_create");
/* Check that the skip list has no elements */
num=H5SL_count(slist);
@@ -479,7 +477,7 @@ test_skiplist_firstnext(void)
VERIFY(num, 0, "H5SL_count");
/* Check that the list appears empty */
node=H5SL_first(slist);
- VERIFY(node, NULL, "H5SL_first");
+ CHECK_PTR_NULL(node, "H5SL_first");
/* Insert many objects into the skip list */
for(u=0; u<NUM_ELEMS; u++) {
@@ -493,7 +491,7 @@ test_skiplist_firstnext(void)
/* Iterate over all the nodes in the skip list */
node=H5SL_first(slist);
- CHECK(node, NULL, "H5SL_first");
+ CHECK_PTR(node, "H5SL_first");
u=0;
while(node!=NULL) {
found_item=(int *)H5SL_item(node);
@@ -508,7 +506,7 @@ test_skiplist_firstnext(void)
/* Check that the list appears empty again */
node=H5SL_first(slist);
- VERIFY(node, NULL, "H5SL_first");
+ CHECK_PTR_NULL(node, "H5SL_first");
/* Close the skip list */
ret=H5SL_close(slist);
@@ -564,7 +562,7 @@ test_skiplist_string(void)
/* Create a skip list */
slist = H5SL_create(H5SL_TYPE_STR, NULL);
- CHECK(slist, NULL, "H5SL_create");
+ CHECK_PTR(slist, "H5SL_create");
/* Check that the skip list has no elements */
num=H5SL_count(slist);
@@ -626,7 +624,7 @@ test_skiplist_iterate(void)
/* Create a skip list */
slist = H5SL_create(H5SL_TYPE_INT, NULL);
- CHECK(slist, NULL, "H5SL_create");
+ CHECK_PTR(slist, "H5SL_create");
/* Check that the skip list has no elements */
num=H5SL_count(slist);
@@ -676,7 +674,7 @@ test_skiplist_hsize(void)
/* Create a skip list */
slist = H5SL_create(H5SL_TYPE_HSIZE, NULL);
- CHECK(slist, NULL, "H5SL_create");
+ CHECK_PTR(slist, "H5SL_create");
/* Check that the skip list has no elements */
num=H5SL_count(slist);
@@ -731,7 +729,7 @@ test_skiplist_unsigned(void)
/* Create a skip list */
slist = H5SL_create(H5SL_TYPE_UNSIGNED, NULL);
- CHECK(slist, NULL, "H5SL_create");
+ CHECK_PTR(slist, "H5SL_create");
/* Check that the skip list has no elements */
num=H5SL_count(slist);
@@ -786,7 +784,7 @@ test_skiplist_obj(void)
/* Create a skip list */
slist = H5SL_create(H5SL_TYPE_OBJ, NULL);
- CHECK(slist, NULL, "H5SL_create");
+ CHECK_PTR(slist, "H5SL_create");
/* Check that the skip list has no elements */
num=H5SL_count(slist);
@@ -864,7 +862,7 @@ test_skiplist_generic(void)
/* Create a skip list */
slist = H5SL_create(H5SL_TYPE_GENERIC, test_skiplist_generic_cmp);
- CHECK(slist, NULL, "H5SL_create");
+ CHECK_PTR(slist, "H5SL_create");
/* Check that the skip list has no elements */
num=H5SL_count(slist);
@@ -918,7 +916,7 @@ test_skiplist_lastprev(void)
/* Create a skip list */
slist = H5SL_create(H5SL_TYPE_INT, NULL);
- CHECK(slist, NULL, "H5SL_create");
+ CHECK_PTR(slist, "H5SL_create");
/* Check that the skip list has no elements */
num=H5SL_count(slist);
@@ -926,7 +924,7 @@ test_skiplist_lastprev(void)
/* Check that the list appears empty */
node=H5SL_last(slist);
- VERIFY(node, NULL, "H5SL_last");
+ CHECK_PTR_NULL(node, "H5SL_last");
/* Insert many objects into the skip list */
for(u=0; u<NUM_ELEMS; u++) {
@@ -940,7 +938,7 @@ test_skiplist_lastprev(void)
/* Iterate over all the nodes in the skip list */
node=H5SL_last(slist);
- CHECK(node, NULL, "H5SL_last");
+ CHECK_PTR(node, "H5SL_last");
u=NUM_ELEMS-1;
while(node!=NULL) {
found_item=(int *)H5SL_item(node);
@@ -955,7 +953,7 @@ test_skiplist_lastprev(void)
/* Check that the list appears empty again */
node=H5SL_last(slist);
- VERIFY(node, NULL, "H5SL_last");
+ CHECK_PTR_NULL(node, "H5SL_last");
/* Close the skip list */
ret=H5SL_close(slist);
@@ -986,7 +984,7 @@ test_skiplist_find(void)
/* Create a skip list */
slist = H5SL_create(H5SL_TYPE_UNSIGNED, NULL);
- CHECK(slist, NULL, "H5SL_create");
+ CHECK_PTR(slist, "H5SL_create");
/* Insert objects into the skip list */
for(u=0; u<10; u++) {
@@ -997,7 +995,7 @@ test_skiplist_find(void)
/* Find the element with key==30 in the skip list */
find_item=30;
node=H5SL_find(slist,&find_item);
- CHECK(node, NULL, "H5SL_find");
+ CHECK_PTR(node, "H5SL_find");
/* Iterate over the rest of the nodes in the skip list */
u=4;
@@ -1011,7 +1009,7 @@ test_skiplist_find(void)
/* Check for trying to locate non-existent item */
find_item=81;
node=H5SL_find(slist,&find_item);
- VERIFY(node, NULL, "H5SL_find");
+ CHECK_PTR_NULL(node, "H5SL_find");
/* Close the skip list */
ret=H5SL_close(slist);
@@ -1042,7 +1040,7 @@ test_skiplist_add(void)
/* Create a skip list */
slist = H5SL_create(H5SL_TYPE_UNSIGNED, NULL);
- CHECK(slist, NULL, "H5SL_create");
+ CHECK_PTR(slist, "H5SL_create");
/* Insert objects into the skip list */
for(u=0; u<10; u++) {
@@ -1053,11 +1051,11 @@ test_skiplist_add(void)
/* Add the element with key==12 in the skip list */
new_item=12;
node=H5SL_add(slist,&new_item,&new_item);
- CHECK(node, NULL, "H5SL_add");
+ CHECK_PTR(node, "H5SL_add");
/* Advance to next node in list */
node=H5SL_next(node);
- CHECK(node, NULL, "H5SL_next");
+ CHECK_PTR(node, "H5SL_next");
/* Iterate over the rest of the nodes in the skip list */
u=2;
@@ -1104,7 +1102,7 @@ test_skiplist_destroy(void)
/* Create a skip list */
slist = H5SL_create(H5SL_TYPE_INT, NULL);
- CHECK(slist, NULL, "H5SL_create");
+ CHECK_PTR(slist, "H5SL_create");
/* Insert objects into the skip list */
for(u=0; u<NUM_ELEMS; u++) {
@@ -1140,7 +1138,7 @@ test_skiplist_free(void)
/* Create a skip list */
slist = H5SL_create(H5SL_TYPE_INT, NULL);
- CHECK(slist, NULL, "H5SL_create");
+ CHECK_PTR(slist, "H5SL_create");
/* Insert objects into the skip list */
for(u=0; u<NUM_ELEMS; u++) {
@@ -1212,8 +1210,8 @@ static herr_t test_tfs_iter(void *_obj, void *key, void *_udata) {
test_tfs_it_ud_t *udata = (test_tfs_it_ud_t *)_udata;
/* Check consistency */
- VERIFY((void *)&obj->idx, key, "obj->idx");
- VERIFY(obj, &udata->obj_list->list[obj->idx], "obj_list->list[obj->idx]");
+ CHECK_PTR_EQ((void *)&obj->idx, key, "obj->idx");
+ CHECK_PTR_EQ(obj, &udata->obj_list->list[obj->idx], "obj_list->list[obj->idx]");
/* Increment number of calls */
udata->ncalls++;
@@ -1238,8 +1236,8 @@ static htri_t test_tfs_free(void *_obj, void *key, void *_obj_list) {
htri_t ret_value;
/* Check consistency */
- VERIFY((void *)&obj->idx, key, "obj->idx");
- VERIFY(obj, &obj_list->list[obj->idx], "obj_list->list[obj->idx]");
+ CHECK_PTR_EQ((void *)&obj->idx, key, "obj->idx");
+ CHECK_PTR_EQ(obj, &obj_list->list[obj->idx], "obj_list->list[obj->idx]");
/* Mark this object as freed (to make sure it isn't recursively freed, that
* is not something we support, we will undo this if we decide later not to
@@ -1271,7 +1269,7 @@ static htri_t test_tfs_free(void *_obj, void *key, void *_obj_list) {
else {
/* Remove the object */
obj_ret = (test_tfs_obj_t *)H5SL_remove(obj_list->slist, &j);
- CHECK(obj_ret, NULL, "H5SL_remove");
+ CHECK_PTR(obj_ret, "H5SL_remove");
obj_ret->nfrees++;
obj_list->nobjs_rem--;
} /* end else */
@@ -1326,7 +1324,7 @@ test_skiplist_try_free_safe(void)
/* Create a skip list */
obj_list.slist = H5SL_create(H5SL_TYPE_INT, NULL);
- CHECK(obj_list.slist, NULL, "H5SL_create");
+ CHECK_PTR(obj_list.slist, "H5SL_create");
/* Init obj_list.list */
obj_list.list = list;
@@ -1398,7 +1396,7 @@ test_skiplist_less(void)
/* Create a skip list */
slist = H5SL_create(H5SL_TYPE_UNSIGNED, NULL);
- CHECK(slist, NULL, "H5SL_create");
+ CHECK_PTR(slist, "H5SL_create");
/* Insert objects into the skip list */
for(u=0; u<10; u++) {
@@ -1432,7 +1430,7 @@ test_skiplist_less(void)
VERIFY(*found_item,5,"H5SL_less");
find_item=4;
found_item=(unsigned *)H5SL_less(slist,&find_item);
- VERIFY(found_item,NULL,"H5SL_less");
+ CHECK_PTR_NULL(found_item, "H5SL_less");
/* Close the skip list */
ret=H5SL_close(slist);
@@ -1462,7 +1460,7 @@ test_skiplist_greater(void)
/* Create a skip list */
slist = H5SL_create(H5SL_TYPE_UNSIGNED, NULL);
- CHECK(slist, NULL, "H5SL_create");
+ CHECK_PTR(slist, "H5SL_create");
/* Insert objects into the skip list */
for(u = 0; u < 10; u++) {
@@ -1490,7 +1488,7 @@ test_skiplist_greater(void)
VERIFY(*found_item, 90, "H5SL_greater");
find_item = 100;
found_item = (unsigned *)H5SL_greater(slist, &find_item);
- VERIFY(found_item, NULL, "H5SL_greater");
+ CHECK_PTR_NULL(found_item, "H5SL_greater");
find_item = 6;
found_item = (unsigned *)H5SL_greater(slist, &find_item);
VERIFY(*found_item, 10, "H5SL_greater");
@@ -1527,7 +1525,7 @@ test_skiplist_below(void)
/* Create a skip list */
slist = H5SL_create(H5SL_TYPE_UNSIGNED, NULL);
- CHECK(slist, NULL, "H5SL_create");
+ CHECK_PTR(slist, "H5SL_create");
/* Insert objects into the skip list */
for(u = 0; u < 10; u++) {
@@ -1538,44 +1536,44 @@ test_skiplist_below(void)
/* Check for exact match of items in various positions */
find_item = 20;
node = H5SL_below(slist, &find_item);
- CHECK(node, NULL, "H5SL_below");
+ CHECK_PTR(node, "H5SL_below");
found_item = (unsigned *)H5SL_item(node);
VERIFY(*found_item, find_item, "H5SL_below");
find_item = 90;
node = H5SL_below(slist, &find_item);
- CHECK(node, NULL, "H5SL_below");
+ CHECK_PTR(node, "H5SL_below");
found_item = (unsigned *)H5SL_item(node);
VERIFY(*found_item, find_item, "H5SL_below");
find_item = 5;
node = H5SL_below(slist, &find_item);
- CHECK(node, NULL, "H5SL_below");
+ CHECK_PTR(node, "H5SL_below");
found_item = (unsigned *)H5SL_item(node);
VERIFY(*found_item, find_item, "H5SL_below");
/* Find item less than a missing key, in various positions */
find_item = 19;
node = H5SL_below(slist, &find_item);
- CHECK(node, NULL, "H5SL_below");
+ CHECK_PTR(node, "H5SL_below");
found_item = (unsigned *)H5SL_item(node);
VERIFY(*found_item, 15, "H5SL_below");
find_item = 89;
node = H5SL_below(slist, &find_item);
- CHECK(node, NULL, "H5SL_below");
+ CHECK_PTR(node, "H5SL_below");
found_item = (unsigned *)H5SL_item(node);
VERIFY(*found_item, 80, "H5SL_below");
find_item = 100;
node = H5SL_below(slist, &find_item);
- CHECK(node, NULL, "H5SL_below");
+ CHECK_PTR(node, "H5SL_below");
found_item = (unsigned *)H5SL_item(node);
VERIFY(*found_item, 90, "H5SL_below");
find_item = 9;
node = H5SL_below(slist, &find_item);
- CHECK(node, NULL, "H5SL_below");
+ CHECK_PTR(node, "H5SL_below");
found_item = (unsigned *)H5SL_item(node);
VERIFY(*found_item, 5, "H5SL_below");
find_item = 4;
node = (H5SL_node_t *)H5SL_less(slist, &find_item);
- VERIFY(node, NULL, "H5SL_below");
+ CHECK_PTR_NULL(node, "H5SL_below");
/* Close the skip list */
ret = H5SL_close(slist);
@@ -1606,7 +1604,7 @@ test_skiplist_above(void)
/* Create a skip list */
slist = H5SL_create(H5SL_TYPE_UNSIGNED, NULL);
- CHECK(slist, NULL, "H5SL_create");
+ CHECK_PTR(slist, "H5SL_create");
/* Insert objects into the skip list */
for(u = 0; u < 10; u++) {
@@ -1617,42 +1615,42 @@ test_skiplist_above(void)
/* Check for exact match of items in various positions */
find_item = 20;
node = H5SL_above(slist, &find_item);
- CHECK(node, NULL, "H5SL_above");
+ CHECK_PTR(node, "H5SL_above");
found_item = (unsigned *)H5SL_item(node);
VERIFY(*found_item, find_item, "H5SL_above");
find_item = 90;
node = H5SL_above(slist, &find_item);
- CHECK(node, NULL, "H5SL_above");
+ CHECK_PTR(node, "H5SL_above");
found_item = (unsigned *)H5SL_item(node);
VERIFY(*found_item, find_item, "H5SL_above");
find_item = 5;
node = H5SL_above(slist, &find_item);
- CHECK(node, NULL, "H5SL_above");
+ CHECK_PTR(node, "H5SL_above");
found_item = (unsigned *)H5SL_item(node);
VERIFY(*found_item, find_item, "H5SL_above");
/* Find item greater than a missing key, in various positions */
find_item = 19;
node = H5SL_above(slist, &find_item);
- CHECK(node, NULL, "H5SL_above");
+ CHECK_PTR(node, "H5SL_above");
found_item = (unsigned *)H5SL_item(node);
VERIFY(*found_item, 20, "H5SL_above");
find_item = 89;
node = H5SL_above(slist, &find_item);
- CHECK(node, NULL, "H5SL_above");
+ CHECK_PTR(node, "H5SL_above");
found_item = (unsigned *)H5SL_item(node);
VERIFY(*found_item, 90, "H5SL_above");
find_item = 100;
node = H5SL_above(slist, &find_item);
- VERIFY(node, NULL, "H5SL_above");
+ CHECK_PTR_NULL(node, "H5SL_above");
find_item = 6;
node = H5SL_above(slist, &find_item);
- CHECK(node, NULL, "H5SL_above");
+ CHECK_PTR(node, "H5SL_above");
found_item = (unsigned *)H5SL_item(node);
VERIFY(*found_item, 10, "H5SL_above");
find_item = 4;
node = H5SL_above(slist, &find_item);
- CHECK(node, NULL, "H5SL_above");
+ CHECK_PTR(node, "H5SL_above");
found_item = (unsigned *)H5SL_item(node);
VERIFY(*found_item, 5, "H5SL_above");
@@ -1683,7 +1681,7 @@ test_skiplist_remove_first(void)
/* Create a skip list */
slist = H5SL_create(H5SL_TYPE_UNSIGNED, NULL);
- CHECK(slist, NULL, "H5SL_create");
+ CHECK_PTR(slist, "H5SL_create");
/* Insert objects into the skip list */
for(u = 0; u < 10; u++) {
@@ -1699,7 +1697,7 @@ test_skiplist_remove_first(void)
/* Check for removing object from empty list */
found_item = (unsigned *)H5SL_remove_first(slist);
- VERIFY(found_item, NULL, "H5SL_remove_first");
+ CHECK_PTR_NULL(found_item, "H5SL_remove_first");
/* Close the skip list */
ret = H5SL_close(slist);
@@ -1727,7 +1725,7 @@ test_skiplist_remove_first_many(void)
/* Create a skip list */
slist = H5SL_create(H5SL_TYPE_INT, NULL);
- CHECK(slist, NULL, "H5SL_create");
+ CHECK_PTR(slist, "H5SL_create");
/* Insert objects into the skip list */
for(u = 0; u < NUM_ELEMS; u++) {
@@ -1744,7 +1742,7 @@ test_skiplist_remove_first_many(void)
/* Check for removing object from empty list */
found_item = (int *)H5SL_remove_first(slist);
- VERIFY(found_item, NULL, "H5SL_remove_first");
+ CHECK_PTR_NULL(found_item, "H5SL_remove_first");
/* Close the skip list */
ret = H5SL_close(slist);
diff --git a/test/tsohm.c b/test/tsohm.c
index 9d56fcc..133b196 100644
--- a/test/tsohm.c
+++ b/test/tsohm.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/***********************************************************
diff --git a/test/ttime.c b/test/ttime.c
index 16acd3e..48c9ba8 100644
--- a/test/ttime.c
+++ b/test/ttime.c
@@ -5,17 +5,15 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/***********************************************************
*
-* Test program: ttime
+* Test program: ttime
*
* Test the Time Datatype functionality
*
@@ -23,8 +21,6 @@
#include "testhdf5.h"
-#include "hdf5.h"
-
#define DATAFILE "ttime.h5"
#ifdef NOT_YET
#define DATASETNAME "Dataset"
@@ -217,15 +213,15 @@ test_time(void)
} /* test_time() */
-
+
/*-------------------------------------------------------------------------
- * Function: cleanup_time
+ * Function: cleanup_time
*
- * Purpose: Cleanup temporary test files
+ * Purpose: Cleanup temporary test files
*
- * Return: none
+ * Return: none
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* October 19, 2000
*
* Modifications:
diff --git a/test/ttsafe.c b/test/ttsafe.c
index bfd24ba..ae4d7c5 100644
--- a/test/ttsafe.c
+++ b/test/ttsafe.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
diff --git a/test/ttsafe.h b/test/ttsafe.h
index f2e9e86..c29fadc 100644
--- a/test/ttsafe.h
+++ b/test/ttsafe.h
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
@@ -24,9 +22,6 @@
* Include required headers. This file tests internal library functions,
* so we include the private headers here.
*/
-#include "hdf5.h"
-#include "H5private.h"
-#include "H5Eprivate.h"
#include "testhdf5.h"
diff --git a/test/ttsafe_acreate.c b/test/ttsafe_acreate.c
index cc3f405..42d0851 100644
--- a/test/ttsafe_acreate.c
+++ b/test/ttsafe_acreate.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/********************************************************************
diff --git a/test/ttsafe_cancel.c b/test/ttsafe_cancel.c
index 7f8cd53..4bbb326 100644
--- a/test/ttsafe_cancel.c
+++ b/test/ttsafe_cancel.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/********************************************************************
diff --git a/test/ttsafe_dcreate.c b/test/ttsafe_dcreate.c
index df51f72..65051c7 100644
--- a/test/ttsafe_dcreate.c
+++ b/test/ttsafe_dcreate.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/********************************************************************
diff --git a/test/ttsafe_error.c b/test/ttsafe_error.c
index a2f25db..f88e77d 100644
--- a/test/ttsafe_error.c
+++ b/test/ttsafe_error.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/********************************************************************
@@ -91,7 +89,7 @@ void tts_error(void)
expected[2].maj_num = H5E_LINK;
expected[2].min_num = H5E_CANTINIT;
- expected[3].maj_num = H5E_SYM;
+ expected[3].maj_num = H5E_LINK;
expected[3].min_num = H5E_CANTINSERT;
expected[4].maj_num = H5E_SYM;
@@ -100,7 +98,7 @@ void tts_error(void)
expected[5].maj_num = H5E_SYM;
expected[5].min_num = H5E_CALLBACK;
- expected[6].maj_num = H5E_SYM;
+ expected[6].maj_num = H5E_LINK;
expected[6].min_num = H5E_EXISTS;
/* set up mutex for global count of errors */
diff --git a/test/ttst.c b/test/ttst.c
index a7c43a2..c5912c5 100644
--- a/test/ttst.c
+++ b/test/ttst.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
@@ -159,7 +157,7 @@ test_tst_create(void)
/* Try creating a TST */
tree=H5ST_create();
- CHECK(tree, NULL, "H5ST_create");
+ CHECK_PTR(tree, "H5ST_create");
/* Try closing a real tree */
ret=H5ST_close(tree);
@@ -188,7 +186,7 @@ test_tst_insert(void)
/* Create the TST */
tree=H5ST_create();
- CHECK(tree, NULL, "H5ST_create");
+ CHECK_PTR(tree, "H5ST_create");
/* Insert unique words into TST, in random order */
for(u=0; u<num_uniq_words; u++) {
@@ -204,13 +202,13 @@ test_tst_insert(void)
/* Check that the value "payloads" are correct */
found=H5ST_find(tree,uniq_words[u]);
- CHECK(found, NULL, "H5ST_find");
+ CHECK_PTR(found, "H5ST_find");
if(HDstrcmp((const char *)found->eqkid,uniq_words[u]))
TestErrPrintf("%d: TST node values don't match!, found->eqkid=%s, uniq_words[%u]=%s\n",__LINE__,(char *)found->eqkid,(unsigned)u,uniq_words[u]);
obj=H5ST_locate(tree,uniq_words[u]);
- CHECK(obj, NULL, "H5ST_locate");
+ CHECK_PTR(obj, "H5ST_locate");
if(HDstrcmp((const char *)obj,uniq_words[u]))
TestErrPrintf("%d: TST objects don't match!, obj=%s, uniq_words[%u]=%s\n",__LINE__,(char *)obj,(unsigned)u,uniq_words[u]);
@@ -248,7 +246,7 @@ test_tst_iterate(void)
/* Create the TST */
tree=H5ST_create();
- CHECK(tree, NULL, "H5ST_create");
+ CHECK_PTR(tree, "H5ST_create");
/* Insert unique words into TST, in random order */
for(u=0; u<num_uniq_words; u++) {
@@ -258,7 +256,7 @@ test_tst_iterate(void)
/* Use findfirst/findnext calls to iterate through TST */
found=H5ST_findfirst(tree);
- CHECK(found, NULL, "H5ST_findfirst");
+ CHECK_PTR(found, "H5ST_findfirst");
u=0;
do {
/* Check that the strings in the TST are in the correct order */
@@ -296,7 +294,7 @@ test_tst_remove(void)
/* Create the TST */
tree=H5ST_create();
- CHECK(tree, NULL, "H5ST_create");
+ CHECK_PTR(tree, "H5ST_create");
/* Insert unique words into TST, in random order */
for(u=0; u<num_uniq_words; u++) {
@@ -307,7 +305,7 @@ test_tst_remove(void)
/* Remove strings from TST in random order */
for(u=0; u<num_uniq_words; u++) {
obj=H5ST_remove(tree,rand_uniq_words[u]);
- CHECK(obj, NULL, "H5ST_remove");
+ CHECK_PTR(obj, "H5ST_remove");
/* Check that the correct string was removed from TST */
if(HDstrcmp((const char *)obj,rand_uniq_words[u]))
@@ -328,7 +326,7 @@ test_tst_remove(void)
for(u=0; u<num_uniq_words; u++) {
/* Get the pointer to the node to delete */
found=H5ST_find(tree,rand_uniq_words[u]);
- CHECK(found, NULL, "H5ST_find");
+ CHECK_PTR(found, "H5ST_find");
/* Check that the correct object will be removed from TST */
if(HDstrcmp((const char *)found->eqkid,rand_uniq_words[u]))
diff --git a/test/tunicode.c b/test/tunicode.c
index 2bba9ae..85f5af0 100644
--- a/test/tunicode.c
+++ b/test/tunicode.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* Unicode test */
diff --git a/test/tvlstr.c b/test/tvlstr.c
index dbc3083..3315d68 100644
--- a/test/tvlstr.c
+++ b/test/tvlstr.c
@@ -5,17 +5,15 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/***********************************************************
*
-* Test program: tvlstr
+* Test program: tvlstr
*
* Test the Variable-Length String functionality
*
@@ -23,14 +21,12 @@
#include "testhdf5.h"
-#include "hdf5.h"
-
#define DATAFILE "tvlstr.h5"
#define DATAFILE2 "tvlstr2.h5"
/* 1-D dataset with fixed dimensions */
-#define SPACE1_RANK 1
-#define SPACE1_DIM1 4
+#define SPACE1_RANK 1
+#define SPACE1_DIM1 4
#define VLSTR_TYPE "vl_string_type"
@@ -117,17 +113,17 @@ test_vlstrings_basic(void)
char *rdata[SPACE1_DIM1]; /* Information read in */
char *wdata2;
hid_t dataspace, dataset2;
- hid_t fid1; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t sid1; /* Dataspace ID */
- hid_t tid1; /* Datatype ID */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid1; /* Dataspace ID */
+ hid_t tid1; /* Datatype ID */
hid_t xfer_pid; /* Dataset transfer property list ID */
- hsize_t dims1[] = {SPACE1_DIM1};
+ hsize_t dims1[] = {SPACE1_DIM1};
hsize_t size; /* Number of bytes which will be used */
unsigned i; /* counting variable */
size_t str_used; /* String data in memory */
size_t mem_used=0; /* Memory used during allocation */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Basic VL String Functionality\n"));
@@ -249,14 +245,14 @@ test_vlstrings_special(void)
const char *wdata2[SPACE1_DIM1] = {NULL, NULL, NULL, NULL};
char *rdata[SPACE1_DIM1]; /* Information read in */
char *fill; /* Fill value */
- hid_t fid1; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t sid1; /* Dataspace ID */
- hid_t tid1; /* Datatype ID */
- hid_t dcpl; /* Dataset creation property list ID */
- hsize_t dims1[] = {SPACE1_DIM1};
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid1; /* Dataspace ID */
+ hid_t tid1; /* Datatype ID */
+ hid_t dcpl; /* Dataset creation property list ID */
+ hsize_t dims1[] = {SPACE1_DIM1};
unsigned i; /* counting variable */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Special VL Strings\n"));
@@ -479,14 +475,14 @@ test_compact_vlstring(void)
{
const char *wdata[SPACE1_DIM1] = {"one", "two", "three", "four"};
char *rdata[SPACE1_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 */
- hid_t plist; /* Dataset creation property list */
- hsize_t dims1[] = {SPACE1_DIM1};
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid1; /* Dataspace ID */
+ hid_t tid1; /* Datatype ID */
+ hid_t plist; /* Dataset creation property list */
+ hsize_t dims1[] = {SPACE1_DIM1};
unsigned i; /* counting variable */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing VL Strings in compact dataset\n"));
@@ -875,15 +871,15 @@ test_vlstrings(void)
test_vl_rewrite();
} /* test_vlstrings() */
-
+
/*-------------------------------------------------------------------------
- * Function: cleanup_vlstrings
+ * Function: cleanup_vlstrings
*
- * Purpose: Cleanup temporary test files
+ * Purpose: Cleanup temporary test files
*
- * Return: none
+ * Return: none
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* September 10, 1999
*
* Modifications:
diff --git a/test/tvltypes.c b/test/tvltypes.c
index d00519d..e5a3d34 100644
--- a/test/tvltypes.c
+++ b/test/tvltypes.c
@@ -5,17 +5,15 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/***********************************************************
*
-* Test program: tvltypes
+* Test program: tvltypes
*
* Test the Variable-Length Datatype functionality
*
@@ -23,24 +21,23 @@
#include "testhdf5.h"
-#include "hdf5.h"
#include "H5Dprivate.h"
#define FILENAME "tvltypes.h5"
/* 1-D dataset with fixed dimensions */
-#define SPACE1_RANK 1
+#define SPACE1_RANK 1
#define SPACE1_DIM1 4
/* 1-D dataset with fixed dimensions */
-#define SPACE3_RANK 1
+#define SPACE3_RANK 1
#define SPACE3_DIM1 128
#define L1_INCM 16
#define L2_INCM 8
#define L3_INCM 3
/* 1-D dataset with fixed dimensions */
-#define SPACE4_RANK 1
+#define SPACE4_RANK 1
#define SPACE4_DIM_SMALL 128
#define SPACE4_DIM_LARGE (H5D_TEMP_BUF_SIZE / 64)
@@ -106,7 +103,7 @@ static void
test_vltypes_dataset_create(void)
{
hid_t fid1; /* HDF5 File IDs */
- hid_t dcpl; /* Dataset Property list */
+ hid_t dcpl; /* Dataset Property list */
hid_t dataset; /* Dataset ID */
hsize_t dims1[] = {SPACE1_DIM1};
hid_t sid1; /* Dataspace ID */
@@ -138,7 +135,7 @@ test_vltypes_dataset_create(void)
/* Create a dataset, supposed to fail */
H5E_BEGIN_TRY {
- dataset = H5Dcreate2(fid1, "Dataset1", tid1, sid1, H5P_DEFAULT, dcpl, H5P_DEFAULT);
+ dataset = H5Dcreate2(fid1, "Dataset1", tid1, sid1, H5P_DEFAULT, dcpl, H5P_DEFAULT);
} H5E_END_TRY;
VERIFY(dataset, FAIL, "H5Dcreate2");
@@ -232,18 +229,18 @@ test_vltypes_vlen_atomic(void)
hvl_t wdata2[SPACE1_DIM1]; /* Information to write */
hvl_t rdata[SPACE1_DIM1]; /* Information read in */
hvl_t fill; /* Fill value */
- hid_t fid1; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t sid1; /* Dataspace ID */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid1; /* Dataspace ID */
hid_t sid2; /* ID of bad dataspace (no extent set) */
- hid_t tid1; /* Datatype ID */
+ hid_t tid1; /* Datatype ID */
hid_t dcpl_pid; /* Dataset creation property list ID */
hid_t xfer_pid; /* Dataset transfer property list ID */
hsize_t dims1[] = {SPACE1_DIM1};
hsize_t size; /* Number of bytes which will be used */
unsigned i,j; /* counting variables */
size_t mem_used=0; /* Memory used during allocation */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Basic Atomic VL Datatype Functionality\n"));
@@ -558,7 +555,7 @@ rewrite_vltypes_vlen_atomic(void)
hsize_t size; /* Number of bytes which will be used */
unsigned i,j; /* counting variables */
size_t mem_used=0; /* Memory used during allocation */
- unsigned increment=4;
+ unsigned increment=4;
herr_t ret; /* Generic return value */
/* Output message about test being performed */
@@ -711,16 +708,16 @@ test_vltypes_vlen_compound(void)
} s1;
hvl_t wdata[SPACE1_DIM1]; /* Information to write */
hvl_t rdata[SPACE1_DIM1]; /* Information read in */
- hid_t fid1; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t sid1; /* Dataspace ID */
- hid_t tid1, tid2; /* Datatype IDs */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid1; /* Dataspace ID */
+ hid_t tid1, tid2; /* Datatype IDs */
hid_t xfer_pid; /* Dataset transfer property list ID */
- hsize_t dims1[] = {SPACE1_DIM1};
+ hsize_t dims1[] = {SPACE1_DIM1};
hsize_t size; /* Number of bytes which will be used */
unsigned i,j; /* counting variables */
size_t mem_used=0; /* Memory used during allocation */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Basic Compound VL Datatype Functionality\n"));
@@ -865,7 +862,7 @@ rewrite_vltypes_vlen_compound(void)
hsize_t size; /* Number of bytes which will be used */
unsigned i,j; /* counting variables */
size_t mem_used=0; /* Memory used during allocation */
- unsigned increment=4;
+ unsigned increment=4;
herr_t ret; /* Generic return value */
/* Output message about test being performed */
@@ -1003,23 +1000,23 @@ test_vltypes_compound_vlen_vlen(void)
} s1;
s1 *wdata; /* data to write */
s1 *rdata; /* data to read */
- hid_t fid1; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t sid1; /* Dataspace ID */
- hid_t tid1, tid2, tid3; /* Datatype IDs */
- hsize_t dims1[] = {SPACE3_DIM1};
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid1; /* Dataspace ID */
+ hid_t tid1, tid2, tid3; /* Datatype IDs */
+ hsize_t dims1[] = {SPACE3_DIM1};
unsigned i,j,k; /* counting variables */
hvl_t *t1, *t2; /* Temporary pointer to VL information */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Compound Datatypes with VL Atomic Datatype Component Functionality\n"));
/* Allocate and initialize VL data to write */
wdata = (s1 *)HDmalloc(sizeof(s1) * SPACE3_DIM1);
- CHECK(wdata, NULL, "HDmalloc");
+ CHECK_PTR(wdata, "HDmalloc");
rdata = (s1 *)HDmalloc(sizeof(s1) * SPACE3_DIM1);
- CHECK(rdata, NULL, "HDmalloc");
+ CHECK_PTR(rdata, "HDmalloc");
for(i = 0; i < SPACE3_DIM1; i++) {
wdata[i].i = (int)(i * 10);
wdata[i].f = (float)(i * 20) / 3.0F;
@@ -1184,21 +1181,21 @@ test_vltypes_compound_vlstr(void)
s1 wdata2[SPACE1_DIM1]; /* data to write */
s1 rdata[SPACE1_DIM1]; /* data to read */
s1 rdata2[SPACE1_DIM1]; /* data to read */
- char str[64] = "a\0";
- hid_t fid1; /* HDF5 File IDs */
- hid_t dataset, dset2; /* Dataset ID */
- hid_t sid1, sid2, filespace, filespace2; /* Dataspace ID */
- hid_t tid1, tid2, tid3, tid4, tid5; /* Datatype IDs */
- hid_t cparms;
- hsize_t dims1[] = {SPACE1_DIM1};
- hsize_t chunk_dims[] = {SPACE1_DIM1/2};
- hsize_t maxdims[] = {H5S_UNLIMITED};
- hsize_t size[] = {SPACE1_DIM1};
- hsize_t offset[] = {0};
+ char str[64] = "a\0";
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset, dset2; /* Dataset ID */
+ hid_t sid1, sid2, filespace, filespace2; /* Dataspace ID */
+ hid_t tid1, tid2, tid3, tid4, tid5; /* Datatype IDs */
+ hid_t cparms;
+ hsize_t dims1[] = {SPACE1_DIM1};
+ hsize_t chunk_dims[] = {SPACE1_DIM1/2};
+ hsize_t maxdims[] = {H5S_UNLIMITED};
+ hsize_t size[] = {SPACE1_DIM1};
+ hsize_t offset[] = {0};
unsigned i,j; /* counting variables */
s2 *t1, *t2; /* Temporary pointer to VL information */
- int val;
- herr_t ret; /* Generic return value */
+ int val;
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing VL Datatype of Compound Datatype with VL String Functionality\n"));
@@ -1376,10 +1373,10 @@ test_vltypes_compound_vlstr(void)
wdata2[i].v.p=(s2*)HDmalloc((i+1)*sizeof(s2));
wdata2[i].v.len=i+1;
for(t1=(s2*)(wdata2[i].v).p, j=0; j<i+1; j++, t1++) {
- strcat(str, "pp");
- t1->string = (char*)HDmalloc(strlen(str)*sizeof(char)+1);
+ strcat(str, "pp");
+ t1->string = (char*)HDmalloc(strlen(str)*sizeof(char)+1);
strcpy(t1->string, str);
- t1->color = green;
+ t1->color = green;
}
} /* end for */
@@ -1469,17 +1466,17 @@ test_vltypes_compound_vlen_atomic(void)
s1 wdata[SPACE1_DIM1]; /* Information to write */
s1 rdata[SPACE1_DIM1]; /* Information read in */
s1 fill; /* Fill value */
- hid_t fid1; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t sid1; /* Dataspace ID */
- hid_t tid1, tid2; /* Datatype IDs */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid1; /* Dataspace ID */
+ hid_t tid1, tid2; /* Datatype IDs */
hid_t xfer_pid; /* Dataset transfer property list ID */
hid_t dcpl_pid; /* Dataset creation property list ID */
- hsize_t dims1[] = {SPACE1_DIM1};
+ hsize_t dims1[] = {SPACE1_DIM1};
hsize_t size; /* Number of bytes which will be used */
unsigned i,j; /* counting variables */
size_t mem_used=0; /* Memory used during allocation */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing Compound Datatypes with VL Atomic Datatype Component Functionality\n"));
@@ -1673,9 +1670,9 @@ test_vltypes_compound_vlen_atomic(void)
/****************************************************************
**
** rewrite_vltypes_compound_vlen_atomic(): Check memory leak for
-** basic VL datatype code.
+** basic VL datatype code.
** Check memory leak for compound datatypes with VL datatypes
-** of atomic datatypes.
+** of atomic datatypes.
**
****************************************************************/
static void
@@ -1696,7 +1693,7 @@ rewrite_vltypes_compound_vlen_atomic(void)
hsize_t size; /* Number of bytes which will be used */
unsigned i,j; /* counting variables */
size_t mem_used=0; /* Memory used during allocation */
- unsigned increment=4;
+ unsigned increment=4;
herr_t ret; /* Generic return value */
/* Output message about test being performed */
@@ -1857,16 +1854,16 @@ test_vltypes_vlen_vlen_atomic(void)
hvl_t wdata[SPACE1_DIM1]; /* Information to write */
hvl_t rdata[SPACE1_DIM1]; /* Information read in */
hvl_t *t1, *t2; /* Temporary pointer to VL information */
- hid_t fid1; /* HDF5 File IDs */
- hid_t dataset; /* Dataset ID */
- hid_t sid1; /* Dataspace ID */
- hid_t tid1, tid2; /* Datatype IDs */
+ hid_t fid1; /* HDF5 File IDs */
+ hid_t dataset; /* Dataset ID */
+ hid_t sid1; /* Dataspace ID */
+ hid_t tid1, tid2; /* Datatype IDs */
hid_t xfer_pid; /* Dataset transfer property list ID */
- hsize_t dims1[] = {SPACE1_DIM1};
+ hsize_t dims1[] = {SPACE1_DIM1};
hsize_t size; /* Number of bytes which will be used */
unsigned i,j,k; /* counting variables */
size_t mem_used=0; /* Memory used during allocation */
- herr_t ret; /* Generic return value */
+ herr_t ret; /* Generic return value */
/* Output message about test being performed */
MESSAGE(5, ("Testing VL Datatypes with VL Atomic Datatype Component Functionality\n"));
@@ -2051,12 +2048,12 @@ rewrite_longer_vltypes_vlen_vlen_atomic(void)
hid_t fid1; /* HDF5 File IDs */
hid_t dataset; /* Dataset ID */
hid_t sid1; /* Dataspace ID */
- hid_t tid2; /* Datatype IDs */
+ hid_t tid2; /* Datatype IDs */
hid_t xfer_pid; /* Dataset transfer property list ID */
hsize_t size; /* Number of bytes which will be used */
unsigned i,j,k; /* counting variables */
size_t mem_used=0; /* Memory used during allocation */
- unsigned increment=1;
+ unsigned increment=1;
herr_t ret; /* Generic return value */
/* Output message about test being performed */
@@ -2505,7 +2502,7 @@ test_vltypes_fill_value(void)
/* Allocate space for the buffer to read data */
rbuf = (dtype1_struct *)HDmalloc(SPACE4_DIM_LARGE * sizeof(dtype1_struct));
- CHECK(rbuf, NULL, "HDmalloc");
+ CHECK_PTR(rbuf, "HDmalloc");
/* Create the small & large dataspaces to use */
@@ -3173,15 +3170,15 @@ test_vltypes(void)
/* These next tests use the same file */
test_vltypes_dataset_create(); /* Check dataset of VL when fill value
- * won't be rewritten to it.*/
+ * won't be rewritten to it.*/
test_vltypes_funcs(); /* Test functions with VL types */
test_vltypes_vlen_atomic(); /* Test VL atomic datatypes */
- rewrite_vltypes_vlen_atomic(); /* Check VL memory leak */
+ rewrite_vltypes_vlen_atomic(); /* Check VL memory leak */
test_vltypes_vlen_compound(); /* Test VL compound datatypes */
- rewrite_vltypes_vlen_compound(); /* Check VL memory leak */
+ rewrite_vltypes_vlen_compound(); /* Check VL memory leak */
test_vltypes_compound_vlen_atomic(); /* Test compound datatypes with VL atomic components */
- rewrite_vltypes_compound_vlen_atomic();/* Check VL memory leak */
- test_vltypes_vlen_vlen_atomic(); /* Test VL datatype with VL atomic components */
+ rewrite_vltypes_compound_vlen_atomic();/* Check VL memory leak */
+ test_vltypes_vlen_vlen_atomic(); /* Test VL datatype with VL atomic components */
rewrite_longer_vltypes_vlen_vlen_atomic(); /*overwrite with VL data of longer sequence*/
rewrite_shorter_vltypes_vlen_vlen_atomic(); /*overwrite with VL data of shorted sequence*/
test_vltypes_compound_vlen_vlen();/* Test compound datatypes with VL atomic components */
@@ -3189,15 +3186,15 @@ test_vltypes(void)
test_vltypes_fill_value(); /* Test fill value for VL data */
} /* test_vltypes() */
-
+
/*-------------------------------------------------------------------------
- * Function: cleanup_vltypes
+ * Function: cleanup_vltypes
*
- * Purpose: Cleanup temporary test files
+ * Purpose: Cleanup temporary test files
*
- * Return: none
+ * Return: none
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* June 8, 1999
*
* Modifications:
diff --git a/test/twriteorder.c b/test/twriteorder.c
index 58690f6..4c86636 100644
--- a/test/twriteorder.c
+++ b/test/twriteorder.c
@@ -4,12 +4,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/***********************************************************
@@ -233,9 +231,9 @@ int create_wo_file(void)
int ret_code;
/* Create the data file */
- if ((write_fd_g = HDopen(DATAFILE, O_RDWR|O_TRUNC|O_CREAT, 0664)) < 0) {
- printf("WRITER: error from open\n");
- return -1;
+ if ((write_fd_g = HDopen(DATAFILE, O_RDWR|O_TRUNC|O_CREAT, H5_POSIX_CREATE_MODE_RW)) < 0) {
+ HDprintf("WRITER: error from open\n");
+ return -1;
}
blkaddr=0;
/* write it to partition 0 */
@@ -299,9 +297,9 @@ int read_wo_file(void)
char buffer[BLOCKSIZE_DFT];
/* Open the data file */
- if ((read_fd = HDopen(DATAFILE, O_RDONLY, 0)) < 0) {
- printf("READER: error from open\n");
- return -1;
+ if ((read_fd = HDopen(DATAFILE, O_RDONLY)) < 0) {
+ HDprintf("READER: error from open\n");
+ return -1;
}
/* keep reading the initial block address until it is non-zero before proceeding. */
while (blkaddr == 0){
diff --git a/test/unlink.c b/test/unlink.c
index e52699a..f5754f8 100644
--- a/test/unlink.c
+++ b/test/unlink.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
diff --git a/test/unregister.c b/test/unregister.c
index 878270f..dbf6293 100644
--- a/test/unregister.c
+++ b/test/unregister.c
@@ -4,12 +4,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic document set and is *
- * linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have access *
- * to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* Programmer: Raymond Lu
@@ -18,6 +16,7 @@
* Purpose: Tests H5Zunregister function
*/
#include "h5test.h"
+#include "H5CXprivate.h" /* API Contexts */
const char *FILENAME[] = {
"unregister_filter_1",
@@ -232,17 +231,27 @@ main(void)
{
hid_t fapl;
int nerrors = 0;
+ hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
/* Testing setup */
h5_reset();
fapl = h5_fileaccess();
+ /* Push API context */
+ if(H5CX_push() < 0) FAIL_STACK_ERROR
+ api_ctx_pushed = TRUE;
+
/* Test unregistering filter in its own file */
nerrors += (test_unregister_filters(fapl) < 0 ? 1 : 0);
if(nerrors)
goto error;
printf("All filter unregistration tests passed.\n");
+
+ /* Pop API context */
+ if(api_ctx_pushed && H5CX_pop() < 0) FAIL_STACK_ERROR
+ api_ctx_pushed = FALSE;
+
h5_cleanup(FILENAME, fapl);
return 0;
@@ -251,6 +260,9 @@ error:
nerrors = MAX(1, nerrors);
printf("***** %d FILTER UNREGISTRATION TEST%s FAILED! *****\n",
nerrors, 1 == nerrors ? "" : "S");
+
+ if(api_ctx_pushed) H5CX_pop();
+
return 1;
}
diff --git a/test/use.h b/test/use.h
index 6664610..0885cc5 100644
--- a/test/use.h
+++ b/test/use.h
@@ -4,12 +4,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
diff --git a/test/use_append_chunk.c b/test/use_append_chunk.c
index 2b1b631..005eb51 100644
--- a/test/use_append_chunk.c
+++ b/test/use_append_chunk.c
@@ -4,12 +4,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
diff --git a/test/use_append_mchunks.c b/test/use_append_mchunks.c
index f9ce41b..9ee37cb 100644
--- a/test/use_append_mchunks.c
+++ b/test/use_append_mchunks.c
@@ -4,12 +4,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
diff --git a/test/use_common.c b/test/use_common.c
index a18601c..5aa6692 100644
--- a/test/use_common.c
+++ b/test/use_common.c
@@ -4,12 +4,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include "h5test.h"
@@ -50,6 +48,8 @@ parse_option(int argc, char * const argv[])
{
int ret_value=0;
int c;
+ int use_swmr; /* Need an int to detect errors */
+
/* command line options: See function usage for a description */
const char *nagg_options = "f:hi:l:n:s:y:z:";
@@ -98,11 +98,13 @@ parse_option(int argc, char * const argv[])
};
break;
case 's': /* use swmr file open mode */
- if ((UC_opts.use_swmr = HDatoi(optarg)) < 0) {
- fprintf(stderr, "swmr value should be 0(no) or 1(yes)\n");
- usage(progname_g);
- Hgoto_error(-1);
- };
+ use_swmr = HDatoi(optarg);
+ if (use_swmr != 0 && use_swmr != 1) {
+ HDfprintf(stderr, "swmr value should be 0(no) or 1(yes)\n");
+ usage(progname_g);
+ Hgoto_error(-1);
+ }
+ UC_opts.use_swmr = (hbool_t)use_swmr;
break;
case 'y': /* Number of planes per chunk */
if ((UC_opts.chunkplanes = HDstrtoul(optarg, NULL, 0)) <= 0) {
diff --git a/test/use_disable_mdc_flushes.c b/test/use_disable_mdc_flushes.c
index 2915cc3..340f578 100644
--- a/test/use_disable_mdc_flushes.c
+++ b/test/use_disable_mdc_flushes.c
@@ -4,12 +4,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
diff --git a/test/vds.c b/test/vds.c
index e6bfeb3..7a659cb 100644
--- a/test/vds.c
+++ b/test/vds.c
@@ -4,12 +4,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
@@ -38,6 +36,12 @@ const char *FILENAME[] = {
"vds_src_1",
"vds%%_src",
"vds_dapl",
+ "vds_virt_2",
+ "vds_virt_3",
+ "vds_src_2",
+ "vds_src_3",
+ "vds%%_src2",
+ "vds_dapl2",
NULL
};
@@ -51,6 +55,8 @@ const char *FILENAME[] = {
#define FILENAME_BUF_SIZE 1024
+#define TMPDIR "tmp/"
+
/*-------------------------------------------------------------------------
* Function: vds_select_equal
@@ -59,14 +65,7 @@ const char *FILENAME[] = {
* provided dataspaces are the same.
*
* Return: Success: 0
- *
* Failure: -1
- *
- * Programmer: Neil Fortner
- * Monday, March 2, 2015
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static htri_t
@@ -132,7 +131,7 @@ vds_select_equal(hid_t space1, hid_t space2)
if(buf1[i] != buf2[i]) {
ret_value = FALSE;
break;
- } /* end if */
+ }
/* Free buffers */
HDfree(buf1);
@@ -182,7 +181,7 @@ vds_select_equal(hid_t space1, hid_t space2)
if(buf1[i] != buf2[i]) {
ret_value = FALSE;
break;
- } /* end if */
+ }
/* Free buffers */
HDfree(buf1);
@@ -219,14 +218,7 @@ error:
* parameters.
*
* Return: Success: 0
- *
* Failure: -1
- *
- * Programmer: Neil Fortner
- * Monday, March 2, 2015
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
@@ -300,8 +292,7 @@ vds_check_mapping(hid_t dcpl, size_t i, hid_t vspace, hid_t srcspace,
error:
H5E_BEGIN_TRY {
- if(space_out >= 0)
- (void)H5Sclose(space_out);
+ H5Sclose(space_out);
} H5E_END_TRY
return -1;
@@ -314,14 +305,7 @@ error:
* Purpose: Tests API functions related to virtual datasets.
*
* Return: Success: 0
- *
* Failure: number of errors
- *
- * Programmer: Neil Fortner
- * Monday, February 16, 2015
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
/* Helper function to get DCPL for examination depending on config */
@@ -372,12 +356,12 @@ test_api_get_ex_dcpl(test_api_config_t config, hid_t fapl, hid_t dcpl,
file = -1;
if((file = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Open dataset */
if((dset = H5Dopen2(file, "vdset", H5P_DEFAULT)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Get DCPL from dataset */
if((*ex_dcpl = H5Dget_create_plist(dset)) < 0)
@@ -396,8 +380,8 @@ test_api_get_ex_dcpl(test_api_config_t config, hid_t fapl, hid_t dcpl,
if(oinfo.meta_size.obj.heap_size != exp_meta_size) {
printf("VDS metadata size: %llu Expected: %llu\n", (long long unsigned)oinfo.meta_size.obj.heap_size, (long long unsigned)exp_meta_size);
TEST_ERROR
- } /* end if */
- } /* end if */
+ }
+ }
else
if((oinfo.meta_size.obj.heap_size != exp_meta_size)
&& (oinfo.meta_size.obj.heap_size != (hsize_t)0))
@@ -426,12 +410,12 @@ test_api_get_ex_dcpl(test_api_config_t config, hid_t fapl, hid_t dcpl,
if(H5Fclose(file) < 0)
TEST_ERROR
file = -1;
- } /* end if */
+ }
else if(config == TEST_API_COPY_PLIST) {
/* Copy property list */
if((*ex_dcpl = H5Pcopy(dcpl)) < 0)
TEST_ERROR
- } /* end if */
+ }
else if(config == TEST_API_ENCDEC_PLIST) {
size_t plist_buf_size;
@@ -450,14 +434,14 @@ test_api_get_ex_dcpl(test_api_config_t config, hid_t fapl, hid_t dcpl,
/* Free plist_buf */
HDfree(plist_buf);
plist_buf = NULL;
- } /* end if */
+ }
else {
/* Simply copy the id to ex_dcpl and increment the ref count so ex_dcpl
* can be closed */
if(H5Iinc_ref(dcpl) < 0)
TEST_ERROR
*ex_dcpl = dcpl;
- } /* end else */
+ }
/* Verify examination DCPL is equal to original DCPL. Do not compare the
* plist to itself, and do not do the comparison if we reopened the file,
@@ -468,16 +452,14 @@ test_api_get_ex_dcpl(test_api_config_t config, hid_t fapl, hid_t dcpl,
TEST_ERROR
if(!tri_ret)
TEST_ERROR
- } /* end if */
+ }
return 0;
error:
H5E_BEGIN_TRY {
- if(file >= 0)
- (void)H5Fclose(file);
- if(dset >= 0)
- (void)H5Dclose(dset);
+ H5Fclose(file);
+ H5Dclose(dset);
} H5E_END_TRY;
if(plist_buf)
HDfree(plist_buf);
@@ -534,7 +516,7 @@ test_api(test_api_config_t config, hid_t fapl)
case TEST_API_NTESTS:
default:
TEST_ERROR
- } /* end switch */
+ }
h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
@@ -820,7 +802,7 @@ test_api(test_api_config_t config, hid_t fapl)
/* Create virtual dataspace */
if((vspace[i] = H5Screate_simple(2, dims, NULL)) < 0)
TEST_ERROR
- } /* end for */
+ }
/* Select all (should not be necessary, but just to be sure) */
if(H5Sselect_all(srcspace[0]) < 0)
@@ -934,7 +916,7 @@ test_api(test_api_config_t config, hid_t fapl)
if(H5Sclose(vspace[i]) < 0)
TEST_ERROR
vspace[i] = -1;
- } /* end for */
+ }
if(H5Pclose(ex_dcpl) < 0)
TEST_ERROR
ex_dcpl = -1;
@@ -1040,7 +1022,7 @@ test_api(test_api_config_t config, hid_t fapl)
/* Add virtual layout mapping */
if(H5Pset_virtual(dcpl, vspace[i], tmp_filename, tmp_dsetname, srcspace[0]) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Get examination DCPL */
if(test_api_get_ex_dcpl(config, fapl, dcpl, &ex_dcpl, vspace[0], filename, (hsize_t)697) < 0)
@@ -1065,7 +1047,7 @@ test_api(test_api_config_t config, hid_t fapl)
/* Check that the mapping in the DCPL is correct */
if(vds_check_mapping(ex_dcpl, (size_t)i, vspace[i], srcspace[0], tmp_filename, tmp_dsetname) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Close */
if(H5Sclose(srcspace[0]) < 0)
@@ -1075,7 +1057,7 @@ test_api(test_api_config_t config, hid_t fapl)
if(H5Sclose(vspace[i]) < 0)
TEST_ERROR
vspace[i] = -1;
- } /* end for */
+ }
if(H5Pclose(ex_dcpl) < 0)
TEST_ERROR
ex_dcpl = -1;
@@ -1125,23 +1107,451 @@ test_api(test_api_config_t config, hid_t fapl)
error:
H5E_BEGIN_TRY {
- for(i = 0; i < (sizeof(srcspace) / sizeof(srcspace[0])); i++) {
- if(srcspace[i] >= 0)
- (void)H5Sclose(srcspace[i]);
- } /* end for */
- for(i = 0; i < (sizeof(vspace) / sizeof(vspace[0])); i++) {
- if(vspace[i] >= 0)
- (void)H5Sclose(vspace[i]);
- } /* end for */
- if(dcpl >= 0)
- (void)H5Pclose(dcpl);
- if(ex_dcpl >= 0)
- (void)H5Pclose(ex_dcpl);
+ for(i = 0; i < (sizeof(srcspace) / sizeof(srcspace[0])); i++)
+ H5Sclose(srcspace[i]);
+ for(i = 0; i < (sizeof(vspace) / sizeof(vspace[0])); i++)
+ H5Sclose(vspace[i]);
+ H5Pclose(dcpl);
+ H5Pclose(ex_dcpl);
} H5E_END_TRY;
return 1;
} /* end test_api() */
+/*-------------------------------------------------------------------------
+ * Function: vds_link_prefix
+ *
+ * Purpose: Set up vds link prefix via H5Pset_virtual_prefix() to be "tmp"
+ * Should be able to access the target source files in tmp directory via the prefix set
+ * by H5Pset_virtual_prefix()
+ *
+ * Return: Success: 0
+ * Failure: -1
+ *-------------------------------------------------------------------------
+ */
+static int
+test_vds_prefix(unsigned config, hid_t fapl)
+{
+ char srcfilename[FILENAME_BUF_SIZE];
+ char srcfilename_map[FILENAME_BUF_SIZE];
+ char vfilename[FILENAME_BUF_SIZE];
+ char vfilename2[FILENAME_BUF_SIZE];
+ char srcfilenamepct[FILENAME_BUF_SIZE];
+ char srcfilenamepct_map[FILENAME_BUF_SIZE];
+ const char *srcfilenamepct_map_orig = "vds%%%%_src";
+ hid_t srcfile[4] = {-1, -1, -1, -1}; /* Files with source dsets */
+ hid_t vfile = -1; /* File with virtual dset */
+ hid_t vfile2 = -1; /* File with copied virtual dset */
+ hid_t dcpl = -1; /* Dataset creation property list */
+ hid_t dapl = -1; /* Dataset access property list */
+ hid_t srcspace[4] = {-1, -1, -1, -1}; /* Source dataspaces */
+ hid_t vspace[4] = {-1, -1, -1, -1}; /* Virtual dset dataspaces */
+ hid_t memspace = -1; /* Memory dataspace */
+ hid_t srcdset[4] = {-1, -1, -1, -1}; /* Source datsets */
+ hid_t vdset = -1; /* Virtual dataset */
+ hsize_t dims[4] = {10, 26, 0, 0}; /* Data space current size */
+ int buf[10][26]; /* Write and expected read buffer */
+ int rbuf[10][26]; /* Read buffer */
+ int fill = -1; /* Fill value */
+ int i, j;
+ char buffer[1024]; /* buffer to read vds_prefix */
+
+ TESTING("basic virtual dataset I/O via H5Pset_vds_prefix()")
+
+ h5_fixname(FILENAME[0], fapl, vfilename, sizeof vfilename);
+ h5_fixname(FILENAME[7], fapl, vfilename2, sizeof vfilename2);
+ h5_fixname(FILENAME[8], fapl, srcfilename, sizeof srcfilename);
+ h5_fixname_printf(FILENAME[8], fapl, srcfilename_map, sizeof srcfilename_map);
+ h5_fixname(FILENAME[10], fapl, srcfilenamepct, sizeof srcfilenamepct);
+ h5_fixname_printf(srcfilenamepct_map_orig, fapl, srcfilenamepct_map, sizeof srcfilenamepct_map);
+
+ /* create tmp directory and get current working directory path */
+ if (HDmkdir(TMPDIR, (mode_t)0755) < 0 && errno != EEXIST)
+ TEST_ERROR
+
+ /* Create DCPL */
+ if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ TEST_ERROR
+
+ /* Set fill value */
+ if(H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fill) < 0)
+ TEST_ERROR
+
+ /* Initialize VDS prefix items */
+ if((dapl = H5Pcreate(H5P_DATASET_ACCESS)) < 0)
+ TEST_ERROR
+
+ if(H5Pset_virtual_prefix(dapl, TMPDIR) < 0)
+ TEST_ERROR
+ if(H5Pget_virtual_prefix(dapl, buffer, sizeof(buffer)) < 0)
+ TEST_ERROR
+
+ if(HDstrcmp(buffer, TMPDIR) != 0)
+ FAIL_PUTS_ERROR("vds prefix not set correctly");
+
+ /*
+ * Test 1: All - all selection
+ */
+ /* Create source dataspace */
+ if((srcspace[0] = H5Screate_simple(2, dims, NULL)) < 0)
+ TEST_ERROR
+
+ /* Create virtual dataspace */
+ if((vspace[0] = H5Screate_simple(2, dims, NULL)) < 0)
+ TEST_ERROR
+
+ /* Select all (should not be necessary, but just to be sure) */
+ if(H5Sselect_all(srcspace[0]) < 0)
+ TEST_ERROR
+ if(H5Sselect_all(vspace[0]) < 0)
+ TEST_ERROR
+
+ /* Add virtual layout mapping */
+ if(H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset", srcspace[0]) < 0)
+ TEST_ERROR
+
+ /* Create virtual file */
+ if((vfile = H5Fcreate(vfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
+ TEST_ERROR
+
+ /* Create source file if requested */
+ if(config & TEST_IO_DIFFERENT_FILE) {
+ HDgetcwd(buffer, 1024);
+ HDchdir(TMPDIR);
+ if((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
+ TEST_ERROR
+ HDchdir(buffer);
+ }
+ else {
+ srcfile[0] = vfile;
+ if(H5Iinc_ref(srcfile[0]) < 0)
+ TEST_ERROR
+ }
+
+ /* Create source dataset */
+ if((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ TEST_ERROR
+
+ /* Create virtual dataset */
+ if((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0)
+ TEST_ERROR
+
+ /* Populate write buffer */
+ for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
+ for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
+ buf[i][j] = (i * (int)(sizeof(buf[0]) / sizeof(buf[0][0]))) + j;
+
+ /* Write data directly to source dataset */
+ if(H5Dwrite(srcdset[0], H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
+ TEST_ERROR
+
+ /* Close srcdset and srcfile if config option specified */
+ if(config & TEST_IO_CLOSE_SRC) {
+ if(H5Dclose(srcdset[0]) < 0)
+ TEST_ERROR
+ srcdset[0] = -1;
+
+ if(config & TEST_IO_DIFFERENT_FILE) {
+ if(H5Fclose(srcfile[0]) < 0)
+ TEST_ERROR
+ srcfile[0] = -1;
+ }
+ }
+
+ /* Reopen virtual dataset and file if config option specified */
+ if(config & TEST_IO_REOPEN_VIRT) {
+ if(H5Dclose(vdset) < 0)
+ TEST_ERROR
+ vdset = -1;
+ if(H5Fclose(vfile) < 0)
+ TEST_ERROR
+ vfile = -1;
+ if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
+ TEST_ERROR
+ if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
+ TEST_ERROR
+ }
+
+ /* Read data through virtual dataset */
+ HDmemset(rbuf[0], 0, sizeof(rbuf));
+ if(H5Dread(vdset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
+ TEST_ERROR
+
+ /* Verify read data */
+ for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) {
+ for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
+ if(rbuf[i][j] != buf[i][j]) {
+ TEST_ERROR
+ }
+ }
+
+ /* Adjust write buffer */
+ for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
+ for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
+ buf[i][j] += (int)(sizeof(buf) / sizeof(buf[0][0]));
+
+ /* Write data through virtual dataset */
+ if(H5Dwrite(vdset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
+ TEST_ERROR
+
+ /* Reopen srcdset and srcfile if config option specified */
+ if(config & TEST_IO_CLOSE_SRC) {
+ if(config & TEST_IO_DIFFERENT_FILE) {
+ HDgetcwd(buffer, 1024);
+ HDchdir(TMPDIR);
+ if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0)
+ TEST_ERROR
+ HDchdir(buffer);
+ }
+ if((srcdset[0] = H5Dopen2(srcfile[0], "src_dset", H5P_DEFAULT)) < 0)
+ TEST_ERROR
+ }
+
+ /* Read data directly from source dataset */
+ HDmemset(rbuf[0], 0, sizeof(rbuf));
+ if(H5Dread(srcdset[0], H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
+ TEST_ERROR
+
+ /* Verify read data */
+ for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
+ for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
+ if(rbuf[i][j] != buf[i][j])
+ TEST_ERROR
+
+ /* Close */
+ if(H5Dclose(srcdset[0]) < 0)
+ TEST_ERROR
+ srcdset[0] = -1;
+ if(H5Dclose(vdset) < 0)
+ TEST_ERROR
+ vdset = -1;
+ if(H5Fclose(srcfile[0]) < 0)
+ TEST_ERROR
+ srcfile[0] = -1;
+ if(H5Fclose(vfile) < 0)
+ TEST_ERROR
+ vfile = -1;
+ if(H5Sclose(srcspace[0]) < 0)
+ TEST_ERROR
+ srcspace[0] = -1;
+ if(H5Sclose(vspace[0]) < 0)
+ TEST_ERROR
+ vspace[0] = -1;
+ if(H5Pclose(dapl) < 0)
+ TEST_ERROR
+ dapl = -1;
+ if(H5Pclose(dcpl) < 0)
+ TEST_ERROR
+ dcpl = -1;
+
+ /*
+ * Test 2: All - all selection with ENV prefix
+ */
+ if(HDsetenv("HDF5_VDS_PREFIX", "${ORIGIN}/tmp", 1))
+ TEST_ERROR
+
+ /* Create DCPL */
+ if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ TEST_ERROR
+
+ /* Set fill value */
+ if(H5Pset_fill_value(dcpl, H5T_NATIVE_INT, &fill) < 0)
+ TEST_ERROR
+
+ /* Set prefix to a nonexistent directory, will be overwritten by environment variable */
+ if((dapl = H5Pcreate(H5P_DATASET_ACCESS)) < 0)
+ TEST_ERROR
+
+ if(H5Pset_virtual_prefix(dapl, "someprefix") < 0)
+ TEST_ERROR
+ if(H5Pget_virtual_prefix(dapl, buffer, sizeof(buffer)) < 0)
+ TEST_ERROR
+
+ if(HDstrcmp(buffer, "someprefix") != 0)
+ FAIL_PUTS_ERROR("vds prefix not set correctly");
+
+ /* Create source dataspace */
+ if((srcspace[0] = H5Screate_simple(2, dims, NULL)) < 0)
+ TEST_ERROR
+
+ /* Create virtual dataspace */
+ if((vspace[0] = H5Screate_simple(2, dims, NULL)) < 0)
+ TEST_ERROR
+
+ /* Select all (should not be necessary, but just to be sure) */
+ if(H5Sselect_all(srcspace[0]) < 0)
+ TEST_ERROR
+ if(H5Sselect_all(vspace[0]) < 0)
+ TEST_ERROR
+
+ /* Add virtual layout mapping */
+ if(H5Pset_virtual(dcpl, vspace[0], config & TEST_IO_DIFFERENT_FILE ? srcfilename_map : ".", "src_dset", srcspace[0]) < 0)
+ TEST_ERROR
+
+ /* Create virtual file */
+ if((vfile = H5Fcreate(vfilename2, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
+ TEST_ERROR
+
+ /* Create source file if requested */
+ if(config & TEST_IO_DIFFERENT_FILE) {
+ HDgetcwd(buffer, 1024);
+ HDchdir(TMPDIR);
+ if((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
+ TEST_ERROR
+ HDchdir(buffer);
+ }
+ else {
+ srcfile[0] = vfile;
+ if(H5Iinc_ref(srcfile[0]) < 0)
+ TEST_ERROR
+ }
+
+ /* Create source dataset */
+ if((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ TEST_ERROR
+
+ /* Create virtual dataset */
+ if((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0)
+ TEST_ERROR
+
+ /* Populate write buffer */
+ for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
+ for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
+ buf[i][j] = (i * (int)(sizeof(buf[0]) / sizeof(buf[0][0]))) + j;
+
+ /* Write data directly to source dataset */
+ if(H5Dwrite(srcdset[0], H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
+ TEST_ERROR
+
+ /* Close srcdset and srcfile if config option specified */
+ if(config & TEST_IO_CLOSE_SRC) {
+ if(H5Dclose(srcdset[0]) < 0)
+ TEST_ERROR
+ srcdset[0] = -1;
+
+ if(config & TEST_IO_DIFFERENT_FILE) {
+ if(H5Fclose(srcfile[0]) < 0)
+ TEST_ERROR
+ srcfile[0] = -1;
+ }
+ }
+
+ /* Reopen virtual dataset and file if config option specified */
+ if(config & TEST_IO_REOPEN_VIRT) {
+ if(H5Dclose(vdset) < 0)
+ TEST_ERROR
+ vdset = -1;
+ if(H5Fclose(vfile) < 0)
+ TEST_ERROR
+ vfile = -1;
+ if((vfile = H5Fopen(vfilename2, H5F_ACC_RDWR, fapl)) < 0)
+ TEST_ERROR
+ if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
+ TEST_ERROR
+ }
+
+ /* Read data through virtual dataset */
+ HDmemset(rbuf[0], 0, sizeof(rbuf));
+ if(H5Dread(vdset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
+ TEST_ERROR
+
+ /* Verify read data */
+ for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++) {
+ for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
+ if(rbuf[i][j] != buf[i][j]) {
+ TEST_ERROR
+ }
+ }
+
+ /* Adjust write buffer */
+ for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
+ for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
+ buf[i][j] += (int)(sizeof(buf) / sizeof(buf[0][0]));
+
+ /* Write data through virtual dataset */
+ if(H5Dwrite(vdset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf[0]) < 0)
+ TEST_ERROR
+
+ /* Reopen srcdset and srcfile if config option specified */
+ if(config & TEST_IO_CLOSE_SRC) {
+ if(config & TEST_IO_DIFFERENT_FILE) {
+ HDgetcwd(buffer, 1024);
+ HDchdir(TMPDIR);
+ if((srcfile[0] = H5Fopen(srcfilename, H5F_ACC_RDONLY, fapl)) < 0)
+ TEST_ERROR
+ HDchdir(buffer);
+ }
+ if((srcdset[0] = H5Dopen2(srcfile[0], "src_dset", H5P_DEFAULT)) < 0)
+ TEST_ERROR
+ }
+
+ /* Read data directly from source dataset */
+ HDmemset(rbuf[0], 0, sizeof(rbuf));
+ if(H5Dread(srcdset[0], H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf[0]) < 0)
+ TEST_ERROR
+
+ /* Verify read data */
+ for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
+ for(j = 0; j < (int)(sizeof(buf[0]) / sizeof(buf[0][0])); j++)
+ if(rbuf[i][j] != buf[i][j])
+ TEST_ERROR
+
+ /* Close */
+ if(H5Dclose(vdset) < 0)
+ TEST_ERROR
+ vdset = -1;
+ if(H5Dclose(srcdset[0]) < 0)
+ TEST_ERROR
+ srcdset[0] = -1;
+ if(H5Fclose(srcfile[0]) < 0)
+ TEST_ERROR
+ srcfile[0] = -1;
+ if(H5Fclose(vfile) < 0)
+ TEST_ERROR
+ vfile = -1;
+ if(H5Sclose(srcspace[0]) < 0)
+ TEST_ERROR
+ srcspace[0] = -1;
+ if(H5Sclose(vspace[0]) < 0)
+ TEST_ERROR
+ vspace[0] = -1;
+ if(H5Pclose(dapl) < 0)
+ TEST_ERROR
+ dapl = -1;
+ if(H5Pclose(dcpl) < 0)
+ TEST_ERROR
+ dcpl = -1;
+
+ if(HDsetenv("HDF5_VDS_PREFIX", "", 1) < 0)
+ TEST_ERROR
+
+ PASSED();
+ return 0;
+
+ error:
+ H5E_BEGIN_TRY {
+ for(i = 0; i < (int)(sizeof(srcdset) / sizeof(srcdset[0])); i++)
+ H5Dclose(srcdset[i]);
+ H5Dclose(vdset);
+ for(i = 0; i < (int)(sizeof(srcfile) / sizeof(srcfile[0])); i++)
+ H5Fclose(srcfile[i]);
+ H5Fclose(vfile);
+ H5Fclose(vfile2);
+ for(i = 0; i < (int)(sizeof(srcspace) / sizeof(srcspace[0])); i++)
+ H5Sclose(srcspace[i]);
+ for(i = 0; i < (int)(sizeof(vspace) / sizeof(vspace[0])); i++)
+ H5Sclose(vspace[i]);
+ H5Sclose(memspace);
+ H5Pclose(dapl);
+ H5Pclose(dcpl);
+ } H5E_END_TRY;
+
+ if(HDsetenv("HDF5_VDS_PREFIX", "", 1) < 0)
+ TEST_ERROR
+
+ return 1;
+} /* end vds_link_prefix() */
+
/*-------------------------------------------------------------------------
* Function: test_basic_io
@@ -1150,14 +1560,7 @@ error:
* pattern-matching file/dataset strings
*
* Return: Success: 0
- *
* Failure: number of errors
- *
- * Programmer: Neil Fortner
- * Tuesday, March 3, 2015
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
@@ -1240,12 +1643,12 @@ test_basic_io(unsigned config, hid_t fapl)
if(config & TEST_IO_DIFFERENT_FILE) {
if((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
else {
srcfile[0] = vfile;
if(H5Iinc_ref(srcfile[0]) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Create source dataset */
if((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -1274,8 +1677,8 @@ test_basic_io(unsigned config, hid_t fapl)
if(H5Fclose(srcfile[0]) < 0)
TEST_ERROR
srcfile[0] = -1;
- } /* end if */
- } /* end if */
+ }
+ }
/* Reopen virtual dataset and file if config option specified */
if(config & TEST_IO_REOPEN_VIRT) {
@@ -1289,7 +1692,7 @@ test_basic_io(unsigned config, hid_t fapl)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Read data through virtual dataset */
HDmemset(rbuf[0], 0, sizeof(rbuf));
@@ -1318,7 +1721,7 @@ test_basic_io(unsigned config, hid_t fapl)
TEST_ERROR
if((srcdset[0] = H5Dopen2(srcfile[0], "src_dset", H5P_DEFAULT)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Read data directly from source dataset */
HDmemset(rbuf[0], 0, sizeof(rbuf));
@@ -1402,12 +1805,12 @@ test_basic_io(unsigned config, hid_t fapl)
if(config & TEST_IO_DIFFERENT_FILE) {
if((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
else {
srcfile[0] = vfile;
if(H5Iinc_ref(srcfile[0]) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Create source datasets */
if((srcdset[0] = H5Dcreate2(srcfile[0], "%src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -1443,8 +1846,8 @@ test_basic_io(unsigned config, hid_t fapl)
if(H5Fclose(srcfile[0]) < 0)
TEST_ERROR
srcfile[0] = -1;
- } /* end if */
- } /* end if */
+ }
+ }
/* Reopen virtual dataset and file if config option specified */
if(config & TEST_IO_REOPEN_VIRT) {
@@ -1458,7 +1861,7 @@ test_basic_io(unsigned config, hid_t fapl)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Read data through virtual dataset */
HDmemset(rbuf[0], 0, sizeof(rbuf));
@@ -1489,7 +1892,7 @@ test_basic_io(unsigned config, hid_t fapl)
TEST_ERROR
if((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2%", H5P_DEFAULT)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Read data directly from source datasets */
HDmemset(rbuf[0], 0, sizeof(rbuf));
@@ -1538,8 +1941,8 @@ test_basic_io(unsigned config, hid_t fapl)
if(H5Fclose(srcfile[0]) < 0)
TEST_ERROR
srcfile[0] = -1;
- } /* end if */
- } /* end if */
+ }
+ }
/* Reopen virtual file if config option specified */
if(config & TEST_IO_REOPEN_VIRT) {
@@ -1548,7 +1951,7 @@ test_basic_io(unsigned config, hid_t fapl)
vfile = -1;
if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Open v_dset2 */
if((vdset = H5Dopen2(vfile, "v_dset2", H5P_DEFAULT)) < 0)
@@ -1574,7 +1977,7 @@ test_basic_io(unsigned config, hid_t fapl)
TEST_ERROR
if((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2%", H5P_DEFAULT)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Only copy to a different file if the source datasets are in a different
* file */
@@ -1616,8 +2019,8 @@ test_basic_io(unsigned config, hid_t fapl)
if(H5Fclose(srcfile[0]) < 0)
TEST_ERROR
srcfile[0] = -1;
- } /* end if */
- } /* end if */
+ }
+ }
/* Reopen copied virtual file if config option specified */
if(config & TEST_IO_REOPEN_VIRT) {
@@ -1626,7 +2029,7 @@ test_basic_io(unsigned config, hid_t fapl)
vfile2 = -1;
if((vfile2 = H5Fopen(vfilename2, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Open v_dset3 */
if((vdset = H5Dopen2(vfile2, "v_dset3", H5P_DEFAULT)) < 0)
@@ -1652,13 +2055,13 @@ test_basic_io(unsigned config, hid_t fapl)
TEST_ERROR
if((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2%", H5P_DEFAULT)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Close copied virtual file */
if(H5Fclose(vfile2) < 0)
TEST_ERROR
vfile2 = -1;
- } /* end if */
+ }
/* Close */
if(H5Dclose(srcdset[0]) < 0)
@@ -1737,12 +2140,12 @@ test_basic_io(unsigned config, hid_t fapl)
if(config & TEST_IO_DIFFERENT_FILE) {
if((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
else {
srcfile[0] = vfile;
if(H5Iinc_ref(srcfile[0]) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Create source datasets */
if((srcdset[0] = H5Dcreate2(srcfile[0], "%src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -1784,8 +2187,8 @@ test_basic_io(unsigned config, hid_t fapl)
if(H5Fclose(srcfile[0]) < 0)
TEST_ERROR
srcfile[0] = -1;
- } /* end if */
- } /* end if */
+ }
+ }
/* Reopen virtual dataset and file if config option specified */
if(config & TEST_IO_REOPEN_VIRT) {
@@ -1799,7 +2202,7 @@ test_basic_io(unsigned config, hid_t fapl)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Read data through virtual dataset */
HDmemset(rbuf[0], 0, sizeof(rbuf));
@@ -1830,7 +2233,7 @@ test_basic_io(unsigned config, hid_t fapl)
TEST_ERROR
if((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2%", H5P_DEFAULT)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Read data directly from source datasets */
HDmemset(rbuf[0], 0, sizeof(rbuf));
@@ -1925,12 +2328,12 @@ test_basic_io(unsigned config, hid_t fapl)
if(config & TEST_IO_DIFFERENT_FILE) {
if((srcfile[0] = H5Fcreate(srcfilenamepct, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
else {
srcfile[0] = vfile;
if(H5Iinc_ref(srcfile[0]) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Create source datasets */
if((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -1966,8 +2369,8 @@ test_basic_io(unsigned config, hid_t fapl)
if(H5Fclose(srcfile[0]) < 0)
TEST_ERROR
srcfile[0] = -1;
- } /* end if */
- } /* end if */
+ }
+ }
/* Reopen virtual dataset and file if config option specified */
if(config & TEST_IO_REOPEN_VIRT) {
@@ -1981,7 +2384,7 @@ test_basic_io(unsigned config, hid_t fapl)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Read first source dataset through virtual dataset */
HDmemset(rbuf[0], 0, sizeof(rbuf));
@@ -2034,7 +2437,7 @@ test_basic_io(unsigned config, hid_t fapl)
TEST_ERROR
if((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2", H5P_DEFAULT)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Read data directly from source datasets */
HDmemset(rbuf[0], 0, sizeof(rbuf));
@@ -2133,12 +2536,12 @@ test_basic_io(unsigned config, hid_t fapl)
if(config & TEST_IO_DIFFERENT_FILE) {
if((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
else {
srcfile[0] = vfile;
if(H5Iinc_ref(srcfile[0]) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Create source datasets */
if((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -2166,7 +2569,7 @@ test_basic_io(unsigned config, hid_t fapl)
evbuf[i][j] = buf[2 * i][j];
for(/* j = 13 */; j < 26; j++)
evbuf[i][j] = buf[2 * i + 1][j - 13];
- } /* end for */
+ }
/* Adjust write buffer */
for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
@@ -2183,7 +2586,7 @@ test_basic_io(unsigned config, hid_t fapl)
evbuf[i + 5][j] = buf[2 * i][j + 13];
for(/* j = 13 */; j < 26; j++)
evbuf[i + 5][j] = buf[2 * i + 1][j];
- } /* end for */
+ }
/* Close srcdsets and srcfile if config option specified */
if(config & TEST_IO_CLOSE_SRC) {
@@ -2198,8 +2601,8 @@ test_basic_io(unsigned config, hid_t fapl)
if(H5Fclose(srcfile[0]) < 0)
TEST_ERROR
srcfile[0] = -1;
- } /* end if */
- } /* end if */
+ }
+ }
/* Reopen virtual dataset and file if config option specified */
if(config & TEST_IO_REOPEN_VIRT) {
@@ -2213,7 +2616,7 @@ test_basic_io(unsigned config, hid_t fapl)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Read data through virtual dataset by hyperslab */
/* Reset rbuf */
@@ -2229,7 +2632,7 @@ test_basic_io(unsigned config, hid_t fapl)
erbuf[i][j] = evbuf[2 * i][j];
for(/* j = 13 */; j < 26; j++)
erbuf[i][j] = evbuf[2 * i + 1][j - 13];
- } /* end for */
+ }
/* Read second slice */
if(H5Dread(vdset, H5T_NATIVE_INT, vspace[1], srcspace[1], H5P_DEFAULT, rbuf[0]) < 0)
@@ -2241,7 +2644,7 @@ test_basic_io(unsigned config, hid_t fapl)
erbuf[i + 5][j] = evbuf[2 * i][j + 13];
for(/* j = 13 */; j < 26; j++)
erbuf[i + 5][j] = evbuf[2 * i + 1][j];
- } /* end for */
+ }
/* Verify read data */
for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
@@ -2265,7 +2668,7 @@ test_basic_io(unsigned config, hid_t fapl)
evbuf[2 * i][j] = buf[i][j];
for(/* j = 13 */; j < 26; j++)
evbuf[2 * i + 1][j - 13] = buf[i][j];
- } /* end for */
+ }
/* Adjust write buffer */
for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
@@ -2282,7 +2685,7 @@ test_basic_io(unsigned config, hid_t fapl)
evbuf[2 * i][j + 13] = buf[i + 5][j];
for(/* j = 13 */; j < 26; j++)
evbuf[2 * i + 1][j] = buf[i + 5][j];
- } /* end for */
+ }
/* Reopen srcdsets and srcfile if config option specified */
if(config & TEST_IO_CLOSE_SRC) {
@@ -2293,7 +2696,7 @@ test_basic_io(unsigned config, hid_t fapl)
TEST_ERROR
if((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2", H5P_DEFAULT)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Read data directly from source datasets */
/* Reset rbuf */
@@ -2309,7 +2712,7 @@ test_basic_io(unsigned config, hid_t fapl)
erbuf[2 * i][j] = evbuf[i][j];
for(/* j = 13 */; j < 26; j++)
erbuf[2 * i + 1][j - 13] = evbuf[i][j];
- } /* end for */
+ }
/* Read second dataset */
if(H5Dread(srcdset[1], H5T_NATIVE_INT, srcspace[1], srcspace[1], H5P_DEFAULT, rbuf[0]) < 0)
@@ -2321,7 +2724,7 @@ test_basic_io(unsigned config, hid_t fapl)
erbuf[2 * i][j + 13] = evbuf[i + 5][j];
for(/* j = 13 */; j < 26; j++)
erbuf[2 * i + 1][j] = evbuf[i + 5][j];
- } /* end for */
+ }
/* Verify read data */
for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
@@ -2441,12 +2844,12 @@ test_basic_io(unsigned config, hid_t fapl)
if(config & TEST_IO_DIFFERENT_FILE) {
if((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
else {
srcfile[0] = vfile;
if(H5Iinc_ref(srcfile[0]) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Create source datasets */
if((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -2500,8 +2903,8 @@ test_basic_io(unsigned config, hid_t fapl)
if(H5Fclose(srcfile[0]) < 0)
TEST_ERROR
srcfile[0] = -1;
- } /* end if */
- } /* end if */
+ }
+ }
/* Reopen virtual dataset and file if config option specified */
if(config & TEST_IO_REOPEN_VIRT) {
@@ -2515,7 +2918,7 @@ test_basic_io(unsigned config, hid_t fapl)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Read data through virtual dataset by hyperslab */
/* Reset rbuf */
@@ -2540,7 +2943,7 @@ test_basic_io(unsigned config, hid_t fapl)
for(j = 0; j < 26; j++) {
erbuf[i][j] += (int)(sizeof(buf) / sizeof(buf[0][0]));
erbuf[i + 1][j] -= (int)(sizeof(buf) / sizeof(buf[0][0]));
- } /* end for */
+ }
/* Verify read data */
for(i = 0; i < (int)(sizeof(buf) / sizeof(buf[0])); i++)
@@ -2586,7 +2989,7 @@ test_basic_io(unsigned config, hid_t fapl)
TEST_ERROR
if((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2", H5P_DEFAULT)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Read data directly from source datasets */
/* Reset rbuf */
@@ -2607,7 +3010,7 @@ test_basic_io(unsigned config, hid_t fapl)
for(j = 0; j < 26; j++) {
erbuf[i][j] += (int)(sizeof(buf) / sizeof(buf[0][0]));
erbuf[i + 1][j] -= (int)(sizeof(buf) / sizeof(buf[0][0]));
- } /* end for */
+ }
/* Read second dataset */
if(H5Dread(srcdset[1], H5T_NATIVE_INT, memspace, srcspace[0], H5P_DEFAULT, rbuf[0]) < 0)
@@ -2782,12 +3185,12 @@ test_basic_io(unsigned config, hid_t fapl)
if(config & TEST_IO_DIFFERENT_FILE) {
if((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
else {
srcfile[0] = vfile;
if(H5Iinc_ref(srcfile[0]) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Create source dataset */
if((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -2824,8 +3227,8 @@ test_basic_io(unsigned config, hid_t fapl)
if(H5Fclose(srcfile[0]) < 0)
TEST_ERROR
srcfile[0] = -1;
- } /* end if */
- } /* end if */
+ }
+ }
/* Reopen virtual dataset and file if config option specified */
if(config & TEST_IO_REOPEN_VIRT) {
@@ -2839,7 +3242,7 @@ test_basic_io(unsigned config, hid_t fapl)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Read data through virtual dataset */
/* Reset rbuf */
@@ -2945,7 +3348,7 @@ test_basic_io(unsigned config, hid_t fapl)
if((j >= 3) && (j < 6)) {
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != 0)
TEST_ERROR
@@ -2998,7 +3401,7 @@ test_basic_io(unsigned config, hid_t fapl)
if((j >= 6) && (j < 9)) {
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != 0)
TEST_ERROR
@@ -3216,7 +3619,7 @@ test_basic_io(unsigned config, hid_t fapl)
TEST_ERROR
if((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Read data directly from source dataset */
/* Select hyperslab in memory space */
@@ -3291,32 +3694,19 @@ test_basic_io(unsigned config, hid_t fapl)
error:
H5E_BEGIN_TRY {
- for(i = 0; i < (int)(sizeof(srcdset) / sizeof(srcdset[0])); i++) {
- if(srcdset[i] >= 0)
- (void)H5Dclose(srcdset[i]);
- } /* end for */
- if(vdset >= 0)
- (void)H5Dclose(vdset);
- for(i = 0; i < (int)(sizeof(srcfile) / sizeof(srcfile[0])); i++) {
- if(srcfile[i] >= 0)
- (void)H5Fclose(srcfile[i]);
- } /* end for */
- if(vfile >= 0)
- (void)H5Fclose(vfile);
- if(vfile2 >= 0)
- (void)H5Fclose(vfile2);
- for(i = 0; i < (int)(sizeof(srcspace) / sizeof(srcspace[0])); i++) {
- if(srcspace[i] >= 0)
- (void)H5Sclose(srcspace[i]);
- } /* end for */
- for(i = 0; i < (int)(sizeof(vspace) / sizeof(vspace[0])); i++) {
- if(vspace[i] >= 0)
- (void)H5Sclose(vspace[i]);
- } /* end for */
- if(memspace >= 0)
- (void)H5Sclose(memspace);
- if(dcpl >= 0)
- (void)H5Pclose(dcpl);
+ for(i = 0; i < (int)(sizeof(srcdset) / sizeof(srcdset[0])); i++)
+ H5Dclose(srcdset[i]);
+ H5Dclose(vdset);
+ for(i = 0; i < (int)(sizeof(srcfile) / sizeof(srcfile[0])); i++)
+ H5Fclose(srcfile[i]);
+ H5Fclose(vfile);
+ H5Fclose(vfile2);
+ for(i = 0; i < (int)(sizeof(srcspace) / sizeof(srcspace[0])); i++)
+ H5Sclose(srcspace[i]);
+ for(i = 0; i < (int)(sizeof(vspace) / sizeof(vspace[0])); i++)
+ H5Sclose(vspace[i]);
+ H5Sclose(memspace);
+ H5Pclose(dcpl);
} H5E_END_TRY;
return 1;
@@ -3329,14 +3719,7 @@ error:
* Purpose: Tests VDS with unlimited selections
*
* Return: Success: 0
- *
* Failure: number of errors
- *
- * Programmer: Neil Fortner
- * Thursday, April 30, 2015
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
@@ -3449,12 +3832,12 @@ test_unlim(unsigned config, hid_t fapl)
if(config & TEST_IO_DIFFERENT_FILE) {
if((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
else {
srcfile[0] = vfile;
if(H5Iinc_ref(srcfile[0]) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Create source datasets */
if((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, srcdcpl, H5P_DEFAULT)) < 0)
@@ -3519,8 +3902,8 @@ test_unlim(unsigned config, hid_t fapl)
if(H5Fclose(srcfile[0]) < 0)
TEST_ERROR
srcfile[0] = -1;
- } /* end if */
- } /* end if */
+ }
+ }
/* Reopen virtual dataset and file if config option specified */
if(config & TEST_IO_REOPEN_VIRT) {
@@ -3534,7 +3917,7 @@ test_unlim(unsigned config, hid_t fapl)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Get VDS space */
if((filespace = H5Dget_space(vdset)) < 0)
@@ -3579,11 +3962,11 @@ test_unlim(unsigned config, hid_t fapl)
if(j >= (int)dims[1]) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
+ }
/* Test H5Pget_virtual_view() */
if(H5Pget_virtual_view(dapl, &virtual_view) < 0)
@@ -3603,7 +3986,7 @@ test_unlim(unsigned config, hid_t fapl)
vfile = -1;
if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
@@ -3651,11 +4034,11 @@ test_unlim(unsigned config, hid_t fapl)
if(j >= (int)dims[1]) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
+ }
/* Reopen srcdset[0] and srcfile if config option specified */
if(config & TEST_IO_CLOSE_SRC) {
@@ -3664,7 +4047,7 @@ test_unlim(unsigned config, hid_t fapl)
TEST_ERROR
if((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Extend srcdset[0] */
dims[0] = 5;
@@ -3701,8 +4084,8 @@ test_unlim(unsigned config, hid_t fapl)
if(H5Fclose(srcfile[0]) < 0)
TEST_ERROR
srcfile[0] = -1;
- } /* end if */
- } /* end if */
+ }
+ }
/* Reopen virtual dataset and file if config option specified */
if(config & TEST_IO_REOPEN_VIRT) {
@@ -3716,7 +4099,7 @@ test_unlim(unsigned config, hid_t fapl)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Get VDS space */
if((filespace = H5Dget_space(vdset)) < 0)
@@ -3763,11 +4146,11 @@ test_unlim(unsigned config, hid_t fapl)
if(j >= (int)dims[1]) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
+ }
/* Close VDS and reopen with view set to H5D_VDS_LAST_AVAILABLE, reopen file
* as well if config option specified */
@@ -3781,7 +4164,7 @@ test_unlim(unsigned config, hid_t fapl)
vfile = -1;
if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
@@ -3834,11 +4217,11 @@ test_unlim(unsigned config, hid_t fapl)
if(j >= (int)dims[1]) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
+ }
/* Reopen srcdset[1] and srcfile if config option specified */
if(config & TEST_IO_CLOSE_SRC) {
@@ -3847,7 +4230,7 @@ test_unlim(unsigned config, hid_t fapl)
TEST_ERROR
if((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2", H5P_DEFAULT)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Extend srcdset[1] */
dims[0] = 5;
@@ -3889,8 +4272,8 @@ test_unlim(unsigned config, hid_t fapl)
if(H5Fclose(srcfile[0]) < 0)
TEST_ERROR
srcfile[0] = -1;
- } /* end if */
- } /* end if */
+ }
+ }
/* Reopen virtual dataset and file if config option specified */
if(config & TEST_IO_REOPEN_VIRT) {
@@ -3904,7 +4287,7 @@ test_unlim(unsigned config, hid_t fapl)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Get VDS space */
if((filespace = H5Dget_space(vdset)) < 0)
@@ -3966,7 +4349,7 @@ test_unlim(unsigned config, hid_t fapl)
if((i == 4) || (i == 5)) {
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != 0)
TEST_ERROR
@@ -4031,11 +4414,11 @@ test_unlim(unsigned config, hid_t fapl)
if(j >= (int)dims[1]) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
+ }
/* Shrink to 15 */
dims[1] = 15;
@@ -4062,12 +4445,12 @@ test_unlim(unsigned config, hid_t fapl)
if(j >= (int)dims[1]) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
- } /* end if */
+ }
+ }
/* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file
* as well if config option specified */
@@ -4081,7 +4464,7 @@ test_unlim(unsigned config, hid_t fapl)
vfile = -1;
if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
@@ -4129,11 +4512,11 @@ test_unlim(unsigned config, hid_t fapl)
if(j >= (int)dims[1]) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
+ }
/* Now test reopening virtual dataset without calling H5Dget_space, if
* REOPEN_VIRT flag set */
@@ -4168,11 +4551,11 @@ test_unlim(unsigned config, hid_t fapl)
if(j >= (int)dims[1]) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
+ }
/* Now try setting extent manually */
/* Grow to 18 */
@@ -4200,11 +4583,11 @@ test_unlim(unsigned config, hid_t fapl)
if(j >= (int)dims[1]) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
+ }
/* Grow to 20 */
dims[1] = 20;
@@ -4230,7 +4613,7 @@ test_unlim(unsigned config, hid_t fapl)
for(j = 0; j < (int)mdims[1]; j++)
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end if */
+ }
/* Close */
if(!(config & TEST_IO_CLOSE_SRC)) {
@@ -4243,12 +4626,12 @@ test_unlim(unsigned config, hid_t fapl)
if(H5Fclose(srcfile[0]) < 0)
TEST_ERROR
srcfile[0] = -1;
- } /* end if */
+ }
else if(!(config & TEST_IO_DIFFERENT_FILE)) {
if(H5Fclose(srcfile[0]) < 0)
TEST_ERROR
srcfile[0] = -1;
- } /* end if */
+ }
if(H5Dclose(vdset) < 0)
TEST_ERROR
vdset = -1;
@@ -4324,12 +4707,12 @@ test_unlim(unsigned config, hid_t fapl)
if(config & TEST_IO_DIFFERENT_FILE) {
if((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
else {
srcfile[0] = vfile;
if(H5Iinc_ref(srcfile[0]) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Create source datasets */
if((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, srcdcpl, H5P_DEFAULT)) < 0)
@@ -4394,8 +4777,8 @@ test_unlim(unsigned config, hid_t fapl)
if(H5Fclose(srcfile[0]) < 0)
TEST_ERROR
srcfile[0] = -1;
- } /* end if */
- } /* end if */
+ }
+ }
/* Reopen virtual dataset and file if config option specified */
if(config & TEST_IO_REOPEN_VIRT) {
@@ -4409,7 +4792,7 @@ test_unlim(unsigned config, hid_t fapl)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Get VDS space */
if((filespace = H5Dget_space(vdset)) < 0)
@@ -4453,11 +4836,11 @@ test_unlim(unsigned config, hid_t fapl)
if(j >= (int)dims[1]) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
+ }
/* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file
* as well if config option specified */
@@ -4471,7 +4854,7 @@ test_unlim(unsigned config, hid_t fapl)
vfile = -1;
if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
@@ -4513,11 +4896,11 @@ test_unlim(unsigned config, hid_t fapl)
if(j >= (int)dims[1]) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
+ }
/* Reopen srcdset[0] and srcfile if config option specified */
if(config & TEST_IO_CLOSE_SRC) {
@@ -4526,7 +4909,7 @@ test_unlim(unsigned config, hid_t fapl)
TEST_ERROR
if((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Extend srcdset[0] */
dims[1] = 7;
@@ -4568,8 +4951,8 @@ test_unlim(unsigned config, hid_t fapl)
if(H5Fclose(srcfile[0]) < 0)
TEST_ERROR
srcfile[0] = -1;
- } /* end if */
- } /* end if */
+ }
+ }
/* Reopen virtual dataset and file if config option specified */
if(config & TEST_IO_REOPEN_VIRT) {
@@ -4583,7 +4966,7 @@ test_unlim(unsigned config, hid_t fapl)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Get VDS space */
if((filespace = H5Dget_space(vdset)) < 0)
@@ -4629,11 +5012,11 @@ test_unlim(unsigned config, hid_t fapl)
if(j >= (int)dims[1]) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
+ }
/* Close VDS and reopen with view set to H5D_VDS_LAST_AVAILABLE, reopen file
* as well if config option specified */
@@ -4647,7 +5030,7 @@ test_unlim(unsigned config, hid_t fapl)
vfile = -1;
if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
@@ -4698,11 +5081,11 @@ test_unlim(unsigned config, hid_t fapl)
if(j >= (int)dims[1]) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
+ }
/* Reopen srcdset[1] and srcfile if config option specified */
if(config & TEST_IO_CLOSE_SRC) {
@@ -4711,7 +5094,7 @@ test_unlim(unsigned config, hid_t fapl)
TEST_ERROR
if((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2", H5P_DEFAULT)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Extend srcdset[1] */
dims[1] = 10;
@@ -4753,8 +5136,8 @@ test_unlim(unsigned config, hid_t fapl)
if(H5Fclose(srcfile[0]) < 0)
TEST_ERROR
srcfile[0] = -1;
- } /* end if */
- } /* end if */
+ }
+ }
/* Reopen virtual dataset and file if config option specified */
if(config & TEST_IO_REOPEN_VIRT) {
@@ -4768,7 +5151,7 @@ test_unlim(unsigned config, hid_t fapl)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Get VDS space */
if((filespace = H5Dget_space(vdset)) < 0)
@@ -4830,7 +5213,7 @@ test_unlim(unsigned config, hid_t fapl)
if((i == 4) || (i == 5)) {
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != 0)
TEST_ERROR
@@ -4847,7 +5230,7 @@ test_unlim(unsigned config, hid_t fapl)
vfile = -1;
if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
@@ -4899,11 +5282,11 @@ test_unlim(unsigned config, hid_t fapl)
if(j >= (int)dims[1]) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
+ }
/* Close */
if(!(config & TEST_IO_CLOSE_SRC)) {
@@ -4916,12 +5299,12 @@ test_unlim(unsigned config, hid_t fapl)
if(H5Fclose(srcfile[0]) < 0)
TEST_ERROR
srcfile[0] = -1;
- } /* end if */
+ }
else if(!(config & TEST_IO_DIFFERENT_FILE)) {
if(H5Fclose(srcfile[0]) < 0)
TEST_ERROR
srcfile[0] = -1;
- } /* end if */
+ }
if(H5Dclose(vdset) < 0)
TEST_ERROR
vdset = -1;
@@ -5016,12 +5399,12 @@ test_unlim(unsigned config, hid_t fapl)
if(config & TEST_IO_DIFFERENT_FILE) {
if((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
else {
srcfile[0] = vfile;
if(H5Iinc_ref(srcfile[0]) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Create source datasets */
if((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, srcdcpl, H5P_DEFAULT)) < 0)
@@ -5061,7 +5444,7 @@ test_unlim(unsigned config, hid_t fapl)
for(j = 0; j < 2; j++) {
erbuf[i][6 * j] = buf[i][2 * j];
erbuf[i][(6 * j) + 1] = buf[i][(2 * j) + 1];
- } /* end for */
+ }
/* Adjust write buffer */
for(i = 0; i < (int)mdims[0]; i++)
@@ -5077,7 +5460,7 @@ test_unlim(unsigned config, hid_t fapl)
for(j = 0; j < 2; j++) {
erbuf[i][(6 * j) + 2] = buf[i][2 * j];
erbuf[i][(6 * j) + 3] = buf[i][(2 * j) + 1];
- } /* end for */
+ }
/* Adjust write buffer */
for(i = 0; i < (int)mdims[0]; i++)
@@ -5098,7 +5481,7 @@ test_unlim(unsigned config, hid_t fapl)
for(i = 0; i < 10; i++) {
erbuf[i][4] = buf[i][0];
erbuf[i][5] = buf[i][1];
- } /* end for */
+ }
/* Close srcdsets and srcfile if config option specified */
if(config & TEST_IO_CLOSE_SRC) {
@@ -5116,8 +5499,8 @@ test_unlim(unsigned config, hid_t fapl)
if(H5Fclose(srcfile[0]) < 0)
TEST_ERROR
srcfile[0] = -1;
- } /* end if */
- } /* end if */
+ }
+ }
/* Reopen virtual dataset and file if config option specified */
if(config & TEST_IO_REOPEN_VIRT) {
@@ -5131,7 +5514,7 @@ test_unlim(unsigned config, hid_t fapl)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Get VDS space */
if((filespace = H5Dget_space(vdset)) < 0)
@@ -5175,11 +5558,11 @@ test_unlim(unsigned config, hid_t fapl)
if(j >= (int)dims[1]) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
+ }
/* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file
* as well if config option specified */
@@ -5193,7 +5576,7 @@ test_unlim(unsigned config, hid_t fapl)
vfile = -1;
if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
@@ -5235,11 +5618,11 @@ test_unlim(unsigned config, hid_t fapl)
if(j >= (int)dims[1]) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
+ }
/* Reopen srcdset[0] and srcfile if config option specified */
if(config & TEST_IO_CLOSE_SRC) {
@@ -5248,7 +5631,7 @@ test_unlim(unsigned config, hid_t fapl)
TEST_ERROR
if((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Extend srcdset[0] */
dims[1] = 7;
@@ -5285,8 +5668,8 @@ test_unlim(unsigned config, hid_t fapl)
if(H5Fclose(srcfile[0]) < 0)
TEST_ERROR
srcfile[0] = -1;
- } /* end if */
- } /* end if */
+ }
+ }
/* Reopen virtual dataset and file if config option specified */
if(config & TEST_IO_REOPEN_VIRT) {
@@ -5300,7 +5683,7 @@ test_unlim(unsigned config, hid_t fapl)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Get VDS space */
if((filespace = H5Dget_space(vdset)) < 0)
@@ -5345,11 +5728,11 @@ test_unlim(unsigned config, hid_t fapl)
if(j >= (int)dims[1]) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
+ }
/* Close VDS and reopen with view set to H5D_VDS_LAST_AVAILABLE, reopen file
* as well if config option specified */
@@ -5363,7 +5746,7 @@ test_unlim(unsigned config, hid_t fapl)
vfile = -1;
if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
@@ -5373,7 +5756,7 @@ test_unlim(unsigned config, hid_t fapl)
erbuf[i][12] = buf[i][0];
erbuf[i][13] = buf[i][1];
erbuf[i][18] = buf[i][2];
- } /* end for */
+ }
/* Get VDS space */
if((filespace = H5Dget_space(vdset)) < 0)
@@ -5417,11 +5800,11 @@ test_unlim(unsigned config, hid_t fapl)
if(j >= (int)dims[1]) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
+ }
/* Reopen srcdset[2] and srcfile if config option specified */
if(config & TEST_IO_CLOSE_SRC) {
@@ -5430,7 +5813,7 @@ test_unlim(unsigned config, hid_t fapl)
TEST_ERROR
if((srcdset[2] = H5Dopen2(srcfile[0], "src_dset3", H5P_DEFAULT)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Extend srcdset[2] */
dims[1] = 5;
@@ -5462,7 +5845,7 @@ test_unlim(unsigned config, hid_t fapl)
erbuf[i][10] = buf[i][0];
erbuf[i][11] = buf[i][1];
erbuf[i][16] = buf[i][2];
- } /* end for */
+ }
/* Close srcdset[2] and srcfile if config option specified */
if(config & TEST_IO_CLOSE_SRC) {
@@ -5474,8 +5857,8 @@ test_unlim(unsigned config, hid_t fapl)
if(H5Fclose(srcfile[0]) < 0)
TEST_ERROR
srcfile[0] = -1;
- } /* end if */
- } /* end if */
+ }
+ }
/* Reopen virtual dataset and file if config option specified */
if(config & TEST_IO_REOPEN_VIRT) {
@@ -5489,7 +5872,7 @@ test_unlim(unsigned config, hid_t fapl)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Get VDS space */
if((filespace = H5Dget_space(vdset)) < 0)
@@ -5534,11 +5917,11 @@ test_unlim(unsigned config, hid_t fapl)
if(j >= (int)dims[1]) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
+ }
/* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file
* as well if config option specified */
@@ -5552,7 +5935,7 @@ test_unlim(unsigned config, hid_t fapl)
vfile = -1;
if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
@@ -5598,11 +5981,11 @@ test_unlim(unsigned config, hid_t fapl)
if(j >= (int)dims[1]) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
+ }
/* Reopen srcdset[1] and srcfile if config option specified */
if(config & TEST_IO_CLOSE_SRC) {
@@ -5611,7 +5994,7 @@ test_unlim(unsigned config, hid_t fapl)
TEST_ERROR
if((srcdset[1] = H5Dopen2(srcfile[0], "src_dset2", H5P_DEFAULT)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Extend srcdset[1] */
dims[1] = 6;
@@ -5642,7 +6025,7 @@ test_unlim(unsigned config, hid_t fapl)
for(i = 0; i < 10; i++) {
erbuf[i][14] = buf[i][0];
erbuf[i][15] = buf[i][1];
- } /* end for */
+ }
/* Close srcdset[1] and srcfile if config option specified */
if(config & TEST_IO_CLOSE_SRC) {
@@ -5654,8 +6037,8 @@ test_unlim(unsigned config, hid_t fapl)
if(H5Fclose(srcfile[0]) < 0)
TEST_ERROR
srcfile[0] = -1;
- } /* end if */
- } /* end if */
+ }
+ }
/* Reopen virtual dataset and file if config option specified */
if(config & TEST_IO_REOPEN_VIRT) {
@@ -5669,7 +6052,7 @@ test_unlim(unsigned config, hid_t fapl)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Get VDS space */
if((filespace = H5Dget_space(vdset)) < 0)
@@ -5713,11 +6096,11 @@ test_unlim(unsigned config, hid_t fapl)
if(j >= (int)dims[1]) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
+ }
/* Close VDS and reopen with view set to H5D_VDS_LAST_AVAILABLE, reopen file
* as well if config option specified */
@@ -5731,7 +6114,7 @@ test_unlim(unsigned config, hid_t fapl)
vfile = -1;
if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
@@ -5773,11 +6156,11 @@ test_unlim(unsigned config, hid_t fapl)
if(j >= (int)dims[1]) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
+ }
/* Now just read middle 2 rows */
HDmemset(rbuf[0], 0, sizeof(rbuf));
@@ -5803,11 +6186,11 @@ test_unlim(unsigned config, hid_t fapl)
if(j >= (int)dims[1]) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else if((i == 4) || (i == 5)) {
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != 0)
TEST_ERROR
@@ -5826,12 +6209,12 @@ test_unlim(unsigned config, hid_t fapl)
if(H5Fclose(srcfile[0]) < 0)
TEST_ERROR
srcfile[0] = -1;
- } /* end if */
+ }
else if(!(config & TEST_IO_DIFFERENT_FILE)) {
if(H5Fclose(srcfile[0]) < 0)
TEST_ERROR
srcfile[0] = -1;
- } /* end if */
+ }
if(H5Dclose(vdset) < 0)
TEST_ERROR
vdset = -1;
@@ -5912,12 +6295,12 @@ test_unlim(unsigned config, hid_t fapl)
if(config & TEST_IO_DIFFERENT_FILE) {
if((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
else {
srcfile[0] = vfile;
if(H5Iinc_ref(srcfile[0]) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Create source datasets */
if((srcdset[0] = H5Dcreate2(srcfile[0], "src_dset1", H5T_NATIVE_INT, srcspace[0], H5P_DEFAULT, srcdcpl, H5P_DEFAULT)) < 0)
@@ -5970,8 +6353,8 @@ test_unlim(unsigned config, hid_t fapl)
if(H5Fclose(srcfile[0]) < 0)
TEST_ERROR
srcfile[0] = -1;
- } /* end if */
- } /* end if */
+ }
+ }
/* Reopen virtual dataset and file if config option specified */
if(config & TEST_IO_REOPEN_VIRT) {
@@ -5985,7 +6368,7 @@ test_unlim(unsigned config, hid_t fapl)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Get VDS space */
if((filespace = H5Dget_space(vdset)) < 0)
@@ -6031,11 +6414,11 @@ test_unlim(unsigned config, hid_t fapl)
if(j >= (int)dims[1]) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
+ }
/* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file
* as well if config option specified */
@@ -6049,7 +6432,7 @@ test_unlim(unsigned config, hid_t fapl)
vfile = -1;
if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
@@ -6091,11 +6474,11 @@ test_unlim(unsigned config, hid_t fapl)
if(j >= (int)dims[1]) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
+ }
/* Reopen srcdset[0] and srcfile if config option specified */
if(config & TEST_IO_CLOSE_SRC) {
@@ -6104,7 +6487,7 @@ test_unlim(unsigned config, hid_t fapl)
TEST_ERROR
if((srcdset[0] = H5Dopen2(srcfile[0], "src_dset1", H5P_DEFAULT)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Extend srcdset[0] */
dims[0] = 5;
@@ -6142,8 +6525,8 @@ test_unlim(unsigned config, hid_t fapl)
if(H5Fclose(srcfile[0]) < 0)
TEST_ERROR
srcfile[0] = -1;
- } /* end if */
- } /* end if */
+ }
+ }
/* Reopen virtual dataset and file if config option specified */
if(config & TEST_IO_REOPEN_VIRT) {
@@ -6157,7 +6540,7 @@ test_unlim(unsigned config, hid_t fapl)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Get VDS space */
if((filespace = H5Dget_space(vdset)) < 0)
@@ -6203,11 +6586,11 @@ test_unlim(unsigned config, hid_t fapl)
if(j >= (int)dims[1]) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
+ }
/* Close VDS and reopen with view set to H5D_VDS_LAST_AVAILABLE, reopen file
* as well if config option specified */
@@ -6221,7 +6604,7 @@ test_unlim(unsigned config, hid_t fapl)
vfile = -1;
if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
@@ -6269,11 +6652,11 @@ test_unlim(unsigned config, hid_t fapl)
if(j >= (int)dims[1]) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
+ }
/* Close */
if(!(config & TEST_IO_CLOSE_SRC)) {
@@ -6286,12 +6669,12 @@ test_unlim(unsigned config, hid_t fapl)
if(H5Fclose(srcfile[0]) < 0)
TEST_ERROR
srcfile[0] = -1;
- } /* end if */
+ }
else if(!(config & TEST_IO_DIFFERENT_FILE)) {
if(H5Fclose(srcfile[0]) < 0)
TEST_ERROR
srcfile[0] = -1;
- } /* end if */
+ }
if(H5Dclose(vdset) < 0)
TEST_ERROR
vdset = -1;
@@ -6331,36 +6714,21 @@ test_unlim(unsigned config, hid_t fapl)
error:
H5E_BEGIN_TRY {
- for(i = 0; i < (int)(sizeof(srcdset) / sizeof(srcdset[0])); i++) {
- if(srcdset[i] >= 0)
- (void)H5Dclose(srcdset[i]);
- } /* end for */
- if(vdset >= 0)
- (void)H5Dclose(vdset);
- for(i = 0; i < (int)(sizeof(srcfile) / sizeof(srcfile[0])); i++) {
- if(srcfile[i] >= 0)
- (void)H5Fclose(srcfile[i]);
- } /* end for */
- if(vfile >= 0)
- (void)H5Fclose(vfile);
- for(i = 0; i < (int)(sizeof(srcspace) / sizeof(srcspace[0])); i++) {
- if(srcspace[i] >= 0)
- (void)H5Sclose(srcspace[i]);
- } /* end for */
- for(i = 0; i < (int)(sizeof(vspace) / sizeof(vspace[0])); i++) {
- if(vspace[i] >= 0)
- (void)H5Sclose(vspace[i]);
- } /* end for */
- if(filespace >= 0)
- (void)H5Sclose(filespace);
- if(memspace >= 0)
- (void)H5Sclose(memspace);
- if(dcpl >= 0)
- (void)H5Pclose(dcpl);
- if(srcdcpl >= 0)
- (void)H5Pclose(srcdcpl);
- if(dapl >= 0)
- (void)H5Pclose(dapl);
+ for(i = 0; i < (int)(sizeof(srcdset) / sizeof(srcdset[0])); i++)
+ H5Dclose(srcdset[i]);
+ H5Dclose(vdset);
+ for(i = 0; i < (int)(sizeof(srcfile) / sizeof(srcfile[0])); i++)
+ H5Fclose(srcfile[i]);
+ H5Fclose(vfile);
+ for(i = 0; i < (int)(sizeof(srcspace) / sizeof(srcspace[0])); i++)
+ H5Sclose(srcspace[i]);
+ for(i = 0; i < (int)(sizeof(vspace) / sizeof(vspace[0])); i++)
+ H5Sclose(vspace[i]);
+ H5Sclose(filespace);
+ H5Sclose(memspace);
+ H5Pclose(dcpl);
+ H5Pclose(srcdcpl);
+ H5Pclose(dapl);
} H5E_END_TRY;
return 1;
@@ -6374,14 +6742,7 @@ error:
* source dataset resolution
*
* Return: Success: 0
- *
* Failure: number of errors
- *
- * Programmer: Neil Fortner
- * Tuesday, May 26, 2015
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
@@ -6487,12 +6848,12 @@ test_printf(unsigned config, hid_t fapl)
if(config & TEST_IO_DIFFERENT_FILE) {
if((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
else {
srcfile[0] = vfile;
if(H5Iinc_ref(srcfile[0]) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Create virtual dataset */
if((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0)
@@ -6504,7 +6865,7 @@ test_printf(unsigned config, hid_t fapl)
if(H5Fclose(srcfile[0]) < 0)
TEST_ERROR
srcfile[0] = -1;
- } /* end if */
+ }
/* Reopen virtual dataset and file if config option specified */
if(config & TEST_IO_REOPEN_VIRT) {
@@ -6518,7 +6879,7 @@ test_printf(unsigned config, hid_t fapl)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Get VDS space */
if((filespace = H5Dget_space(vdset)) < 0)
@@ -6604,8 +6965,8 @@ test_printf(unsigned config, hid_t fapl)
if(H5Fclose(srcfile[0]) < 0)
TEST_ERROR
srcfile[0] = -1;
- } /* end if */
- } /* end if */
+ }
+ }
/* Reopen virtual dataset and file if config option specified */
if(config & TEST_IO_REOPEN_VIRT) {
@@ -6619,7 +6980,7 @@ test_printf(unsigned config, hid_t fapl)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Get VDS space */
if((filespace = H5Dget_space(vdset)) < 0)
@@ -6663,11 +7024,11 @@ test_printf(unsigned config, hid_t fapl)
if(j >= (int)dims[1]) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
+ }
/* Reopen srcfile if config option specified */
if((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE))
@@ -6704,8 +7065,8 @@ test_printf(unsigned config, hid_t fapl)
if(H5Fclose(srcfile[0]) < 0)
TEST_ERROR
srcfile[0] = -1;
- } /* end if */
- } /* end if */
+ }
+ }
/* Reopen virtual dataset and file if config option specified */
if(config & TEST_IO_REOPEN_VIRT) {
@@ -6719,7 +7080,7 @@ test_printf(unsigned config, hid_t fapl)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Get VDS space */
if((filespace = H5Dget_space(vdset)) < 0)
@@ -6759,11 +7120,11 @@ test_printf(unsigned config, hid_t fapl)
if(j >= (int)dims[1]) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
+ }
/* Now try with different selections */
count[0] = 10;
@@ -6790,12 +7151,12 @@ test_printf(unsigned config, hid_t fapl)
if((j < (int)start[1]) || (j >= (int)(start[1] + count[1]))) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
- } /* end for */
+ }
+ }
start[1] = 0;
/* Now try writing through VDS */
@@ -6831,7 +7192,7 @@ test_printf(unsigned config, hid_t fapl)
TEST_ERROR
if((srcdset[2] = H5Dopen2(srcfile[0], "src_dset2", H5P_DEFAULT)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Read srcdset[0] */
count[0] = 10;
@@ -6933,12 +7294,12 @@ test_printf(unsigned config, hid_t fapl)
if(config & TEST_IO_DIFFERENT_FILE) {
if((srcfile[0] = H5Fcreate(srcfilenamepct, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
else {
srcfile[0] = vfile;
if(H5Iinc_ref(srcfile[0]) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Create virtual dataset */
if((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0)
@@ -6950,7 +7311,7 @@ test_printf(unsigned config, hid_t fapl)
if(H5Fclose(srcfile[0]) < 0)
TEST_ERROR
srcfile[0] = -1;
- } /* end if */
+ }
/* Reopen virtual dataset and file if config option specified */
if(config & TEST_IO_REOPEN_VIRT) {
@@ -6964,7 +7325,7 @@ test_printf(unsigned config, hid_t fapl)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Get VDS space */
if((filespace = H5Dget_space(vdset)) < 0)
@@ -7102,14 +7463,14 @@ test_printf(unsigned config, hid_t fapl)
if(H5Dclose(srcdset[i]) < 0)
TEST_ERROR
srcdset[i] = -1;
- } /* end for */
+ }
if(config & TEST_IO_DIFFERENT_FILE) {
if(H5Fclose(srcfile[0]) < 0)
TEST_ERROR
srcfile[0] = -1;
- } /* end if */
- } /* end if */
+ }
+ }
/* Reopen virtual dataset and file if config option specified */
if(config & TEST_IO_REOPEN_VIRT) {
@@ -7123,7 +7484,7 @@ test_printf(unsigned config, hid_t fapl)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Get VDS space */
if((filespace = H5Dget_space(vdset)) < 0)
@@ -7167,11 +7528,11 @@ test_printf(unsigned config, hid_t fapl)
if(j >= (int)dims[1]) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
+ }
/* Test H5Pget_virtual_printf_gap() */
if(H5Pget_virtual_printf_gap(dapl, &gap_size) < 0)
@@ -7191,7 +7552,7 @@ test_printf(unsigned config, hid_t fapl)
vfile = -1;
if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
@@ -7243,11 +7604,11 @@ test_printf(unsigned config, hid_t fapl)
if(j >= (int)dims[1]) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
+ }
/* Close VDS and reopen with printf gap set to 2, reopen file as well if
* config option specified */
@@ -7261,7 +7622,7 @@ test_printf(unsigned config, hid_t fapl)
vfile = -1;
if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
@@ -7313,11 +7674,11 @@ test_printf(unsigned config, hid_t fapl)
if(j >= (int)dims[1]) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
+ }
/* Close VDS and reopen with printf gap set to 3, reopen file as well if
* config option specified */
@@ -7331,7 +7692,7 @@ test_printf(unsigned config, hid_t fapl)
vfile = -1;
if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
@@ -7383,11 +7744,11 @@ test_printf(unsigned config, hid_t fapl)
if(j >= (int)dims[1]) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
+ }
/* Close VDS and reopen with printf gap set to 4, reopen file as well if
* config option specified */
@@ -7401,7 +7762,7 @@ test_printf(unsigned config, hid_t fapl)
vfile = -1;
if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
@@ -7453,11 +7814,11 @@ test_printf(unsigned config, hid_t fapl)
if(j >= (int)dims[1]) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
+ }
/* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file
* as well if config option specified */
@@ -7471,7 +7832,7 @@ test_printf(unsigned config, hid_t fapl)
vfile = -1;
if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
@@ -7517,11 +7878,11 @@ test_printf(unsigned config, hid_t fapl)
if(j >= (int)dims[1]) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
+ }
/* Reset dapl */
if(H5Pset_virtual_printf_gap(dapl, (hsize_t)0) < 0)
@@ -7535,16 +7896,16 @@ test_printf(unsigned config, hid_t fapl)
if(H5Dclose(srcdset[i]) < 0)
TEST_ERROR
srcdset[i] = -1;
- } /* end for */
+ }
if(H5Fclose(srcfile[0]) < 0)
TEST_ERROR
srcfile[0] = -1;
- } /* end if */
+ }
else if(!(config & TEST_IO_DIFFERENT_FILE)) {
if(H5Fclose(srcfile[0]) < 0)
TEST_ERROR
srcfile[0] = -1;
- } /* end if */
+ }
if(H5Dclose(vdset) < 0)
TEST_ERROR
vdset = -1;
@@ -7617,7 +7978,7 @@ test_printf(unsigned config, hid_t fapl)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Get VDS space */
if((filespace = H5Dget_space(vdset)) < 0)
@@ -7683,7 +8044,7 @@ test_printf(unsigned config, hid_t fapl)
if(H5Fclose(srcfile[1]) < 0)
TEST_ERROR
srcfile[1] = -1;
- } /* end if */
+ }
/* Reopen virtual dataset and file if config option specified */
if(config & TEST_IO_REOPEN_VIRT) {
@@ -7697,7 +8058,7 @@ test_printf(unsigned config, hid_t fapl)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Get VDS space */
if((filespace = H5Dget_space(vdset)) < 0)
@@ -7741,11 +8102,11 @@ test_printf(unsigned config, hid_t fapl)
if(j >= (int)dims[1]) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
+ }
/* Reopen srcfile[1] if config option specified */
if(config & TEST_IO_CLOSE_SRC)
@@ -7780,7 +8141,7 @@ test_printf(unsigned config, hid_t fapl)
if(H5Fclose(srcfile[1]) < 0)
TEST_ERROR
srcfile[1] = -1;
- } /* end if */
+ }
/* Reopen virtual dataset and file if config option specified */
if(config & TEST_IO_REOPEN_VIRT) {
@@ -7794,7 +8155,7 @@ test_printf(unsigned config, hid_t fapl)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Get VDS space */
if((filespace = H5Dget_space(vdset)) < 0)
@@ -7838,11 +8199,11 @@ test_printf(unsigned config, hid_t fapl)
if(j >= (int)dims[1]) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
+ }
/* Close */
if(!(config & TEST_IO_CLOSE_SRC)) {
@@ -7858,7 +8219,7 @@ test_printf(unsigned config, hid_t fapl)
if(H5Fclose(srcfile[1]) < 0)
TEST_ERROR
srcfile[1] = -1;
- } /* end if */
+ }
if(H5Dclose(vdset) < 0)
TEST_ERROR
vdset = -1;
@@ -7928,7 +8289,7 @@ test_printf(unsigned config, hid_t fapl)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Get VDS space */
if((filespace = H5Dget_space(vdset)) < 0)
@@ -7994,7 +8355,7 @@ test_printf(unsigned config, hid_t fapl)
if(H5Fclose(srcfile[1]) < 0)
TEST_ERROR
srcfile[1] = -1;
- } /* end if */
+ }
/* Reopen virtual dataset and file if config option specified */
if(config & TEST_IO_REOPEN_VIRT) {
@@ -8008,7 +8369,7 @@ test_printf(unsigned config, hid_t fapl)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Get VDS space */
if((filespace = H5Dget_space(vdset)) < 0)
@@ -8052,11 +8413,11 @@ test_printf(unsigned config, hid_t fapl)
if(j >= (int)dims[1]) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
+ }
/* Reopen srcfile[1] if config option specified */
if(config & TEST_IO_CLOSE_SRC)
@@ -8091,7 +8452,7 @@ test_printf(unsigned config, hid_t fapl)
if(H5Fclose(srcfile[1]) < 0)
TEST_ERROR
srcfile[1] = -1;
- } /* end if */
+ }
/* Reopen virtual dataset and file if config option specified */
if(config & TEST_IO_REOPEN_VIRT) {
@@ -8105,7 +8466,7 @@ test_printf(unsigned config, hid_t fapl)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Get VDS space */
if((filespace = H5Dget_space(vdset)) < 0)
@@ -8149,11 +8510,11 @@ test_printf(unsigned config, hid_t fapl)
if(j >= (int)dims[1]) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
+ }
/* Close */
if(!(config & TEST_IO_CLOSE_SRC)) {
@@ -8169,7 +8530,7 @@ test_printf(unsigned config, hid_t fapl)
if(H5Fclose(srcfile[1]) < 0)
TEST_ERROR
srcfile[1] = -1;
- } /* end if */
+ }
if(H5Dclose(vdset) < 0)
TEST_ERROR
vdset = -1;
@@ -8182,7 +8543,7 @@ test_printf(unsigned config, hid_t fapl)
if(H5Sclose(vspace[0]) < 0)
TEST_ERROR
vspace[0] = -1;
- } /* end if */
+ }
/*
@@ -8240,12 +8601,12 @@ test_printf(unsigned config, hid_t fapl)
if(config & TEST_IO_DIFFERENT_FILE) {
if((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
else {
srcfile[0] = vfile;
if(H5Iinc_ref(srcfile[0]) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Create virtual dataset */
if((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0)
@@ -8257,7 +8618,7 @@ test_printf(unsigned config, hid_t fapl)
if(H5Fclose(srcfile[0]) < 0)
TEST_ERROR
srcfile[0] = -1;
- } /* end if */
+ }
/* Reopen virtual dataset and file if config option specified */
if(config & TEST_IO_REOPEN_VIRT) {
@@ -8271,7 +8632,7 @@ test_printf(unsigned config, hid_t fapl)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Get VDS space */
if((filespace = H5Dget_space(vdset)) < 0)
@@ -8357,8 +8718,8 @@ test_printf(unsigned config, hid_t fapl)
if(H5Fclose(srcfile[0]) < 0)
TEST_ERROR
srcfile[0] = -1;
- } /* end if */
- } /* end if */
+ }
+ }
/* Reopen virtual dataset and file if config option specified */
if(config & TEST_IO_REOPEN_VIRT) {
@@ -8372,7 +8733,7 @@ test_printf(unsigned config, hid_t fapl)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Get VDS space */
if((filespace = H5Dget_space(vdset)) < 0)
@@ -8416,11 +8777,11 @@ test_printf(unsigned config, hid_t fapl)
if(j >= (int)dims[1]) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
+ }
/* Reopen srcfile if config option specified */
if((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE))
@@ -8456,8 +8817,8 @@ test_printf(unsigned config, hid_t fapl)
if(H5Fclose(srcfile[0]) < 0)
TEST_ERROR
srcfile[0] = -1;
- } /* end if */
- } /* end if */
+ }
+ }
/* Reopen virtual dataset and file if config option specified */
if(config & TEST_IO_REOPEN_VIRT) {
@@ -8471,7 +8832,7 @@ test_printf(unsigned config, hid_t fapl)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Get VDS space */
if((filespace = H5Dget_space(vdset)) < 0)
@@ -8515,11 +8876,11 @@ test_printf(unsigned config, hid_t fapl)
if(j >= (int)dims[1]) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
+ }
/* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file
* as well if config option specified */
@@ -8533,7 +8894,7 @@ test_printf(unsigned config, hid_t fapl)
vfile = -1;
if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
@@ -8580,11 +8941,11 @@ test_printf(unsigned config, hid_t fapl)
if(j >= (int)dims[1]) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
+ }
/* Reopen srcfile if config option specified */
if((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE))
@@ -8620,8 +8981,8 @@ test_printf(unsigned config, hid_t fapl)
if(H5Fclose(srcfile[0]) < 0)
TEST_ERROR
srcfile[0] = -1;
- } /* end if */
- } /* end if */
+ }
+ }
/* Reopen virtual dataset and file if config option specified */
if(config & TEST_IO_REOPEN_VIRT) {
@@ -8635,7 +8996,7 @@ test_printf(unsigned config, hid_t fapl)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Get VDS space */
if((filespace = H5Dget_space(vdset)) < 0)
@@ -8679,11 +9040,11 @@ test_printf(unsigned config, hid_t fapl)
if(j >= (int)dims[1]) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
+ }
/* Close VDS and reopen with view set to H5D_VDS_LAST_AVAILABLE, reopen file
* as well if config option specified */
@@ -8697,7 +9058,7 @@ test_printf(unsigned config, hid_t fapl)
vfile = -1;
if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
@@ -8744,11 +9105,11 @@ test_printf(unsigned config, hid_t fapl)
if(j >= (int)dims[1]) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
+ }
/* Close VDS and reopen with printf_gap set to 1, reopen file as well if
* config option specified */
@@ -8762,7 +9123,7 @@ test_printf(unsigned config, hid_t fapl)
vfile = -1;
if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
@@ -8809,11 +9170,11 @@ test_printf(unsigned config, hid_t fapl)
if(j >= (int)dims[1]) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
+ }
/* Reset dapl */
if(H5Pset_virtual_printf_gap(dapl, (hsize_t)0) < 0)
@@ -8827,16 +9188,16 @@ test_printf(unsigned config, hid_t fapl)
if(H5Dclose(srcdset[i]) < 0)
TEST_ERROR
srcdset[i] = -1;
- } /* end for */
+ }
if(H5Fclose(srcfile[0]) < 0)
TEST_ERROR
srcfile[0] = -1;
- } /* end if */
+ }
else if(!(config & TEST_IO_DIFFERENT_FILE)) {
if(H5Fclose(srcfile[0]) < 0)
TEST_ERROR
srcfile[0] = -1;
- } /* end if */
+ }
if(H5Dclose(vdset) < 0)
TEST_ERROR
vdset = -1;
@@ -8912,12 +9273,12 @@ test_printf(unsigned config, hid_t fapl)
if(config & TEST_IO_DIFFERENT_FILE) {
if((srcfile[0] = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
else {
srcfile[0] = vfile;
if(H5Iinc_ref(srcfile[0]) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Create virtual dataset */
if((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0)
@@ -8929,7 +9290,7 @@ test_printf(unsigned config, hid_t fapl)
if(H5Fclose(srcfile[0]) < 0)
TEST_ERROR
srcfile[0] = -1;
- } /* end if */
+ }
/* Reopen virtual dataset and file if config option specified */
if(config & TEST_IO_REOPEN_VIRT) {
@@ -8943,7 +9304,7 @@ test_printf(unsigned config, hid_t fapl)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Get VDS space */
if((filespace = H5Dget_space(vdset)) < 0)
@@ -9039,8 +9400,8 @@ test_printf(unsigned config, hid_t fapl)
if(H5Fclose(srcfile[0]) < 0)
TEST_ERROR
srcfile[0] = -1;
- } /* end if */
- } /* end if */
+ }
+ }
/* Reopen virtual dataset and file if config option specified */
if(config & TEST_IO_REOPEN_VIRT) {
@@ -9054,7 +9415,7 @@ test_printf(unsigned config, hid_t fapl)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Get VDS space */
if((filespace = H5Dget_space(vdset)) < 0)
@@ -9098,11 +9459,11 @@ test_printf(unsigned config, hid_t fapl)
if(j >= (int)dims[1]) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
+ }
/* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file
* as well if config option specified */
@@ -9116,7 +9477,7 @@ test_printf(unsigned config, hid_t fapl)
vfile = -1;
if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
@@ -9163,11 +9524,11 @@ test_printf(unsigned config, hid_t fapl)
if(j >= (int)dims[1]) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
+ }
/* Reopen srcfile if config option specified */
if((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE))
@@ -9207,8 +9568,8 @@ test_printf(unsigned config, hid_t fapl)
if(H5Fclose(srcfile[0]) < 0)
TEST_ERROR
srcfile[0] = -1;
- } /* end if */
- } /* end if */
+ }
+ }
/* Reopen virtual dataset and file if config option specified */
if(config & TEST_IO_REOPEN_VIRT) {
@@ -9222,7 +9583,7 @@ test_printf(unsigned config, hid_t fapl)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Get VDS space */
if((filespace = H5Dget_space(vdset)) < 0)
@@ -9266,11 +9627,11 @@ test_printf(unsigned config, hid_t fapl)
if(j >= (int)dims[1]) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
+ }
/* Close VDS and reopen with view set to H5D_VDS_LAST_AVAILABLE, reopen file
* as well if config option specified */
@@ -9284,7 +9645,7 @@ test_printf(unsigned config, hid_t fapl)
vfile = -1;
if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
@@ -9330,11 +9691,11 @@ test_printf(unsigned config, hid_t fapl)
if(j >= (int)dims[1]) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
+ }
/* Reopen srcfile if config option specified */
if((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE))
@@ -9371,8 +9732,8 @@ test_printf(unsigned config, hid_t fapl)
if(H5Fclose(srcfile[0]) < 0)
TEST_ERROR
srcfile[0] = -1;
- } /* end if */
- } /* end if */
+ }
+ }
/* Reopen virtual dataset and file if config option specified */
if(config & TEST_IO_REOPEN_VIRT) {
@@ -9386,7 +9747,7 @@ test_printf(unsigned config, hid_t fapl)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Get VDS space */
if((filespace = H5Dget_space(vdset)) < 0)
@@ -9430,11 +9791,11 @@ test_printf(unsigned config, hid_t fapl)
if(j >= (int)dims[1]) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
+ }
/* Now test reopening virtual dataset without calling H5Dget_space, if
* REOPEN_VIRT flag set */
@@ -9468,11 +9829,11 @@ test_printf(unsigned config, hid_t fapl)
if(j >= (int)dims[1]) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
+ }
/* Now try setting extent manually */
/* Shrink to 12 */
@@ -9498,11 +9859,11 @@ test_printf(unsigned config, hid_t fapl)
if(j >= (int)dims[1]) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
+ }
/* Shrink to 10 */
dims[1] = 12;
@@ -9527,12 +9888,12 @@ test_printf(unsigned config, hid_t fapl)
if(j >= (int)dims[1]) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
- } /* end if */
+ }
+ }
/* Close VDS and reopen with view set to H5D_VDS_FIRST_MISSING, reopen file
* as well if config option specified */
@@ -9546,7 +9907,7 @@ test_printf(unsigned config, hid_t fapl)
vfile = -1;
if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
@@ -9592,11 +9953,11 @@ test_printf(unsigned config, hid_t fapl)
if(j >= (int)dims[1]) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
+ }
/* Now test reopening virtual dataset without calling H5Dget_space, if
* REOPEN_VIRT flag set */
@@ -9630,11 +9991,11 @@ test_printf(unsigned config, hid_t fapl)
if(j >= (int)dims[1]) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
+ }
/* Now try setting extent manually */
/* Grow to 12 */
@@ -9660,11 +10021,11 @@ test_printf(unsigned config, hid_t fapl)
if(j >= (int)dims[1]) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
+ }
/* Grow to 15 */
dims[1] = 15;
@@ -9689,12 +10050,12 @@ test_printf(unsigned config, hid_t fapl)
if(j >= (int)dims[1]) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
- } /* end if */
+ }
+ }
/* Reset dapl */
if(H5Pset_virtual_view(dapl, H5D_VDS_LAST_AVAILABLE) < 0)
@@ -9706,16 +10067,16 @@ test_printf(unsigned config, hid_t fapl)
if(H5Dclose(srcdset[i]) < 0)
TEST_ERROR
srcdset[i] = -1;
- } /* end for */
+ }
if(H5Fclose(srcfile[0]) < 0)
TEST_ERROR
srcfile[0] = -1;
- } /* end if */
+ }
else if(!(config & TEST_IO_DIFFERENT_FILE)) {
if(H5Fclose(srcfile[0]) < 0)
TEST_ERROR
srcfile[0] = -1;
- } /* end if */
+ }
if(H5Dclose(vdset) < 0)
TEST_ERROR
vdset = -1;
@@ -9772,12 +10133,12 @@ test_printf(unsigned config, hid_t fapl)
if(config & TEST_IO_DIFFERENT_FILE) {
if((srcfile[0] = H5Fcreate(srcfilenamepct, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
else {
srcfile[0] = vfile;
if(H5Iinc_ref(srcfile[0]) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Create virtual dataset */
if((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, dapl)) < 0)
@@ -9789,7 +10150,7 @@ test_printf(unsigned config, hid_t fapl)
if(H5Fclose(srcfile[0]) < 0)
TEST_ERROR
srcfile[0] = -1;
- } /* end if */
+ }
/* Reopen virtual dataset and file if config option specified */
if(config & TEST_IO_REOPEN_VIRT) {
@@ -9803,7 +10164,7 @@ test_printf(unsigned config, hid_t fapl)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Get VDS space */
if((filespace = H5Dget_space(vdset)) < 0)
@@ -9869,8 +10230,8 @@ test_printf(unsigned config, hid_t fapl)
if(H5Fclose(srcfile[0]) < 0)
TEST_ERROR
srcfile[0] = -1;
- } /* end if */
- } /* end if */
+ }
+ }
/* Reopen virtual dataset and file if config option specified */
if(config & TEST_IO_REOPEN_VIRT) {
@@ -9884,7 +10245,7 @@ test_printf(unsigned config, hid_t fapl)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Get VDS space */
if((filespace = H5Dget_space(vdset)) < 0)
@@ -9928,11 +10289,11 @@ test_printf(unsigned config, hid_t fapl)
if(j >= (int)dims[1]) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
+ }
/* Close VDS and reopen with printf gap set to 127, reopen file as well if
* config option specified */
@@ -9946,7 +10307,7 @@ test_printf(unsigned config, hid_t fapl)
vfile = -1;
if((vfile = H5Fopen(vfilename, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
if((vdset = H5Dopen2(vfile, "v_dset", dapl)) < 0)
TEST_ERROR
@@ -9992,11 +10353,11 @@ test_printf(unsigned config, hid_t fapl)
if(j >= (int)dims[1]) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
+ }
/* Reset dapl */
if(H5Pset_virtual_printf_gap(dapl, (hsize_t)0) < 0)
@@ -10010,12 +10371,12 @@ test_printf(unsigned config, hid_t fapl)
if(H5Fclose(srcfile[0]) < 0)
TEST_ERROR
srcfile[0] = -1;
- } /* end if */
+ }
else if(!(config & TEST_IO_DIFFERENT_FILE)) {
if(H5Fclose(srcfile[0]) < 0)
TEST_ERROR
srcfile[0] = -1;
- } /* end if */
+ }
if(H5Dclose(vdset) < 0)
TEST_ERROR
vdset = -1;
@@ -10046,32 +10407,19 @@ test_printf(unsigned config, hid_t fapl)
error:
H5E_BEGIN_TRY {
- for(i = 0; i < (int)(sizeof(srcdset) / sizeof(srcdset[0])); i++) {
- if(srcdset[i] >= 0)
- (void)H5Dclose(srcdset[i]);
- } /* end for */
- if(vdset >= 0)
- (void)H5Dclose(vdset);
- for(i = 0; i < (int)(sizeof(srcfile) / sizeof(srcfile[0])); i++) {
- if(srcfile[i] >= 0)
- (void)H5Fclose(srcfile[i]);
- } /* end for */
- if(vfile >= 0)
- (void)H5Fclose(vfile);
- if(srcspace >= 0)
- (void)H5Sclose(srcspace);
- for(i = 0; i < (int)(sizeof(vspace) / sizeof(vspace[0])); i++) {
- if(vspace[i] >= 0)
- (void)H5Sclose(vspace[i]);
- } /* end for */
- if(filespace >= 0)
- (void)H5Sclose(filespace);
- if(memspace >= 0)
- (void)H5Sclose(memspace);
- if(dcpl >= 0)
- (void)H5Pclose(dcpl);
- if(dapl >= 0)
- (void)H5Pclose(dapl);
+ for(i = 0; i < (int)(sizeof(srcdset) / sizeof(srcdset[0])); i++)
+ H5Dclose(srcdset[i]);
+ H5Dclose(vdset);
+ for(i = 0; i < (int)(sizeof(srcfile) / sizeof(srcfile[0])); i++)
+ H5Fclose(srcfile[i]);
+ H5Fclose(vfile);
+ H5Sclose(srcspace);
+ for(i = 0; i < (int)(sizeof(vspace) / sizeof(vspace[0])); i++)
+ H5Sclose(vspace[i]);
+ H5Sclose(filespace);
+ H5Sclose(memspace);
+ H5Pclose(dcpl);
+ H5Pclose(dapl);
} H5E_END_TRY;
return 1;
@@ -10085,14 +10433,7 @@ error:
* VDS
*
* Return: Success: 0
- *
* Failure: number of errors
- *
- * Programmer: Neil Fortner
- * Friday, August 14, 2015
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static int
@@ -10214,12 +10555,12 @@ test_all(unsigned config, hid_t fapl)
if(config & TEST_IO_DIFFERENT_FILE) {
if((srcfile = H5Fcreate(srcfilename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
TEST_ERROR
- } /* end if */
+ }
else {
srcfile = vfile;
if(H5Iinc_ref(srcfile) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Create virtual dataset */
if((vdset = H5Dcreate2(vfile, "v_dset", H5T_NATIVE_INT, vspace[0], H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
@@ -10231,7 +10572,7 @@ test_all(unsigned config, hid_t fapl)
if(H5Fclose(srcfile) < 0)
TEST_ERROR
srcfile = -1;
- } /* end if */
+ }
/* Reopen virtual dataset and file if config option specified */
if(config & TEST_IO_REOPEN_VIRT) {
@@ -10245,7 +10586,7 @@ test_all(unsigned config, hid_t fapl)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Get VDS space */
if((filespace = H5Dget_space(vdset)) < 0)
@@ -10316,14 +10657,14 @@ test_all(unsigned config, hid_t fapl)
if(H5Dclose(srcdset[i]) < 0)
TEST_ERROR
srcdset[i] = -1;
- } /* end for */
+ }
if(config & TEST_IO_DIFFERENT_FILE) {
if(H5Fclose(srcfile) < 0)
TEST_ERROR
srcfile = -1;
- } /* end if */
- } /* end if */
+ }
+ }
/* Reopen virtual dataset and file if config option specified */
if(config & TEST_IO_REOPEN_VIRT) {
@@ -10337,7 +10678,7 @@ test_all(unsigned config, hid_t fapl)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Get VDS space */
if((filespace = H5Dget_space(vdset)) < 0)
@@ -10383,11 +10724,11 @@ test_all(unsigned config, hid_t fapl)
if((i >= (int)dims[0]) || (j >= (int)dims[1])) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
+ }
/* Reopen srcdset[1] and srcfile if config option specified */
if(config & TEST_IO_CLOSE_SRC) {
@@ -10396,7 +10737,7 @@ test_all(unsigned config, hid_t fapl)
TEST_ERROR
if((srcdset[1] = H5Dopen2(srcfile, "src_dset_unlim", H5P_DEFAULT)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Extend srcdset[1] */
dims[0] = 2;
@@ -10431,8 +10772,8 @@ test_all(unsigned config, hid_t fapl)
if(H5Fclose(srcfile) < 0)
TEST_ERROR
srcfile = -1;
- } /* end if */
- } /* end if */
+ }
+ }
/* Reopen virtual dataset and file if config option specified */
if(config & TEST_IO_REOPEN_VIRT) {
@@ -10446,7 +10787,7 @@ test_all(unsigned config, hid_t fapl)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Get VDS space */
if((filespace = H5Dget_space(vdset)) < 0)
@@ -10492,11 +10833,11 @@ test_all(unsigned config, hid_t fapl)
if((i >= (int)dims[0]) || (j >= (int)dims[1])) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
+ }
/* Reopen srcfile if config option specified */
if((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE))
@@ -10536,8 +10877,8 @@ test_all(unsigned config, hid_t fapl)
if(H5Fclose(srcfile) < 0)
TEST_ERROR
srcfile = -1;
- } /* end if */
- } /* end if */
+ }
+ }
/* Reopen virtual dataset and file if config option specified */
if(config & TEST_IO_REOPEN_VIRT) {
@@ -10551,7 +10892,7 @@ test_all(unsigned config, hid_t fapl)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Get VDS space */
if((filespace = H5Dget_space(vdset)) < 0)
@@ -10597,11 +10938,11 @@ test_all(unsigned config, hid_t fapl)
if((i >= (int)dims[0]) || (j >= (int)dims[1])) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
+ }
/* Reopen srcdset[1] and srcfile if config option specified */
if(config & TEST_IO_CLOSE_SRC) {
@@ -10610,7 +10951,7 @@ test_all(unsigned config, hid_t fapl)
TEST_ERROR
if((srcdset[1] = H5Dopen2(srcfile, "src_dset_unlim", H5P_DEFAULT)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Extend srcdset[1] */
dims[0] = 3;
@@ -10654,8 +10995,8 @@ test_all(unsigned config, hid_t fapl)
if(H5Fclose(srcfile) < 0)
TEST_ERROR
srcfile = -1;
- } /* end if */
- } /* end if */
+ }
+ }
/* Reopen virtual dataset and file if config option specified */
if(config & TEST_IO_REOPEN_VIRT) {
@@ -10669,7 +11010,7 @@ test_all(unsigned config, hid_t fapl)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Get VDS space */
if((filespace = H5Dget_space(vdset)) < 0)
@@ -10715,11 +11056,11 @@ test_all(unsigned config, hid_t fapl)
if((i >= (int)dims[0]) || (j >= (int)dims[1])) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
+ }
/* Reopen srcfile if config option specified */
if((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE))
@@ -10759,8 +11100,8 @@ test_all(unsigned config, hid_t fapl)
if(H5Fclose(srcfile) < 0)
TEST_ERROR
srcfile = -1;
- } /* end if */
- } /* end if */
+ }
+ }
/* Reopen virtual dataset and file if config option specified */
if(config & TEST_IO_REOPEN_VIRT) {
@@ -10774,7 +11115,7 @@ test_all(unsigned config, hid_t fapl)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Get VDS space */
if((filespace = H5Dget_space(vdset)) < 0)
@@ -10820,11 +11161,11 @@ test_all(unsigned config, hid_t fapl)
if((i >= (int)dims[0]) || (j >= (int)dims[1])) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
+ }
/* Reopen srcdset[1] and srcfile if config option specified */
if(config & TEST_IO_CLOSE_SRC) {
@@ -10833,7 +11174,7 @@ test_all(unsigned config, hid_t fapl)
TEST_ERROR
if((srcdset[1] = H5Dopen2(srcfile, "src_dset_unlim", H5P_DEFAULT)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Extend srcdset[1] */
dims[0] = 7;
@@ -10878,8 +11219,8 @@ test_all(unsigned config, hid_t fapl)
if(H5Fclose(srcfile) < 0)
TEST_ERROR
srcfile = -1;
- } /* end if */
- } /* end if */
+ }
+ }
/* Reopen virtual dataset and file if config option specified */
if(config & TEST_IO_REOPEN_VIRT) {
@@ -10893,7 +11234,7 @@ test_all(unsigned config, hid_t fapl)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Get VDS space */
if((filespace = H5Dget_space(vdset)) < 0)
@@ -10939,11 +11280,11 @@ test_all(unsigned config, hid_t fapl)
if(j >= (int)dims[1]) {
if(rbuf[i][j] != 0)
TEST_ERROR
- } /* end if */
+ }
else
if(rbuf[i][j] != erbuf[i][j])
TEST_ERROR
- } /* end for */
+ }
/* Reopen srcfile if config option specified */
if((config & TEST_IO_CLOSE_SRC) && (config & TEST_IO_DIFFERENT_FILE))
@@ -10983,8 +11324,8 @@ test_all(unsigned config, hid_t fapl)
if(H5Fclose(srcfile) < 0)
TEST_ERROR
srcfile = -1;
- } /* end if */
- } /* end if */
+ }
+ }
/* Reopen virtual dataset and file if config option specified */
if(config & TEST_IO_REOPEN_VIRT) {
@@ -10998,7 +11339,7 @@ test_all(unsigned config, hid_t fapl)
TEST_ERROR
if((vdset = H5Dopen2(vfile, "v_dset", H5P_DEFAULT)) < 0)
TEST_ERROR
- } /* end if */
+ }
/* Get VDS space */
if((filespace = H5Dget_space(vdset)) < 0)
@@ -11050,16 +11391,16 @@ test_all(unsigned config, hid_t fapl)
if(H5Dclose(srcdset[i]) < 0)
TEST_ERROR
srcdset[i] = -1;
- } /* end for */
+ }
if(H5Fclose(srcfile) < 0)
TEST_ERROR
srcfile = -1;
- } /* end if */
+ }
else if(!(config & TEST_IO_DIFFERENT_FILE)) {
if(H5Fclose(srcfile) < 0)
TEST_ERROR
srcfile = -1;
- } /* end if */
+ }
if(H5Dclose(vdset) < 0)
TEST_ERROR
vdset = -1;
@@ -11070,12 +11411,12 @@ test_all(unsigned config, hid_t fapl)
if(H5Sclose(srcspace[i]) < 0)
TEST_ERROR
srcspace[i] = -1;
- } /* end for */
+ }
for(i = 0; i < (int)(sizeof(vspace) / sizeof(vspace[0])); i++) {
if(H5Sclose(vspace[i]) < 0)
TEST_ERROR
vspace[i] = -1;
- } /* end for */
+ }
if(H5Pclose(dcpl) < 0)
TEST_ERROR
dcpl = -1;
@@ -11091,32 +11432,19 @@ test_all(unsigned config, hid_t fapl)
error:
H5E_BEGIN_TRY {
- for(i = 0; i < (int)(sizeof(srcdset) / sizeof(srcdset[0])); i++) {
- if(srcdset[i] >= 0)
- (void)H5Dclose(srcdset[i]);
- } /* end for */
- if(vdset >= 0)
- (void)H5Dclose(vdset);
- if(srcfile >= 0)
- (void)H5Fclose(srcfile);
- if(vfile >= 0)
- (void)H5Fclose(vfile);
- for(i = 0; i < (int)(sizeof(srcspace) / sizeof(srcspace[0])); i++) {
- if(srcspace[i] >= 0)
- (void)H5Sclose(srcspace[i]);
- } /* end for */
- for(i = 0; i < (int)(sizeof(vspace) / sizeof(vspace[0])); i++) {
- if(vspace[i] >= 0)
- (void)H5Sclose(vspace[i]);
- } /* end for */
- if(filespace >= 0)
- (void)H5Sclose(filespace);
- if(memspace >= 0)
- (void)H5Sclose(memspace);
- if(dcpl >= 0)
- (void)H5Pclose(dcpl);
- if(srcdcpl >= 0)
- (void)H5Pclose(srcdcpl);
+ for(i = 0; i < (int)(sizeof(srcdset) / sizeof(srcdset[0])); i++)
+ H5Dclose(srcdset[i]);
+ H5Dclose(vdset);
+ H5Fclose(srcfile);
+ H5Fclose(vfile);
+ for(i = 0; i < (int)(sizeof(srcspace) / sizeof(srcspace[0])); i++)
+ H5Sclose(srcspace[i]);
+ for(i = 0; i < (int)(sizeof(vspace) / sizeof(vspace[0])); i++)
+ H5Sclose(vspace[i]);
+ H5Sclose(filespace);
+ H5Sclose(memspace);
+ H5Pclose(dcpl);
+ H5Pclose(srcdcpl);
} H5E_END_TRY;
return 1;
@@ -11130,10 +11458,6 @@ error:
*
* Return: Success: 0
* Failure: 1
- *
- * Programmer: Dana Robinson
- * March 2016
- *
*-------------------------------------------------------------------------
*/
static int
@@ -11275,10 +11599,6 @@ test_dapl_values(hid_t fapl_id)
* Purpose: Tests datasets with virtual layout
*
* Return: EXIT_SUCCESS/EXIT_FAILURE
- *
- * Programmer: Neil Fortner
- * Tuesday, February 17, 2015
- *
*-------------------------------------------------------------------------
*/
int
@@ -11301,10 +11621,11 @@ main(void)
for(bit_config = 0; bit_config < TEST_IO_NTESTS; bit_config++) {
printf("Config: %s%s%s\n", bit_config & TEST_IO_CLOSE_SRC ? "closed source dataset, " : "", bit_config & TEST_IO_DIFFERENT_FILE ? "different source file" : "same source file", bit_config & TEST_IO_REOPEN_VIRT ? ", reopen virtual file" : "");
nerrors += test_basic_io(bit_config, fapl);
+ nerrors += test_vds_prefix(bit_config, fapl);
nerrors += test_unlim(bit_config, fapl);
nerrors += test_printf(bit_config, fapl);
nerrors += test_all(bit_config, fapl);
- } /* end for */
+ }
nerrors += test_dapl_values(fapl);
diff --git a/test/vds_swmr.h b/test/vds_swmr.h
index c043fd6..a8e4d50 100644
--- a/test/vds_swmr.h
+++ b/test/vds_swmr.h
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifndef VDS_SWMR_H
diff --git a/test/vds_swmr_gen.c b/test/vds_swmr_gen.c
index 60f081e..24c6131 100644
--- a/test/vds_swmr_gen.c
+++ b/test/vds_swmr_gen.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include "h5test.h"
diff --git a/test/vds_swmr_reader.c b/test/vds_swmr_reader.c
index 7ef2e90..42721d5 100644
--- a/test/vds_swmr_reader.c
+++ b/test/vds_swmr_reader.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include "h5test.h"
@@ -34,8 +32,6 @@ main(void)
hsize_t dims[RANK]; /* current size of dataset */
hsize_t max_dims[RANK]; /* max size of dataset */
- hbool_t has_errors = FALSE;/* if the read data contains errors */
-
/* Open the VDS file and dataset */
if((fid = H5Fopen(VDS_FILE_NAME, H5F_ACC_RDONLY | H5F_ACC_SWMR_READ, H5P_DEFAULT)) < 0)
diff --git a/test/vds_swmr_writer.c b/test/vds_swmr_writer.c
index abf0124..7824aa0 100644
--- a/test/vds_swmr_writer.c
+++ b/test/vds_swmr_writer.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
diff --git a/test/vfd.c b/test/vfd.c
index a215264..5d5ebfc 100644
--- a/test/vfd.c
+++ b/test/vfd.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
@@ -88,6 +86,8 @@ test_sec2(void)
hid_t fid = -1; /* file ID */
hid_t fapl_id = -1; /* file access property list ID */
hid_t fapl_id_out = -1; /* from H5Fget_access_plist */
+ hid_t driver_id = -1; /* ID for this VFD */
+ unsigned long driver_flags = 0; /* VFD feature flags */
char filename[1024]; /* filename */
void *os_file_handle = NULL; /* OS file handle */
hsize_t file_size; /* file size */
@@ -101,6 +101,28 @@ test_sec2(void)
TEST_ERROR;
h5_fixname(FILENAME[0], fapl_id, filename, sizeof(filename));
+ /* Check that the VFD feature flags are correct */
+ if ((driver_id = H5Pget_driver(fapl_id)) < 0)
+ TEST_ERROR
+ if (H5FDdriver_query(driver_id, &driver_flags) < 0)
+ TEST_ERROR
+ if(!(driver_flags & H5FD_FEAT_AGGREGATE_METADATA)) TEST_ERROR
+ if(!(driver_flags & H5FD_FEAT_ACCUMULATE_METADATA)) TEST_ERROR
+ if(!(driver_flags & H5FD_FEAT_DATA_SIEVE)) TEST_ERROR
+ if(!(driver_flags & H5FD_FEAT_AGGREGATE_SMALLDATA)) TEST_ERROR
+ if(!(driver_flags & H5FD_FEAT_POSIX_COMPAT_HANDLE)) TEST_ERROR
+ if(!(driver_flags & H5FD_FEAT_SUPPORTS_SWMR_IO)) TEST_ERROR
+ if(!(driver_flags & H5FD_FEAT_DEFAULT_VFD_COMPATIBLE)) TEST_ERROR
+ /* Check for extra flags not accounted for above */
+ if(driver_flags != (H5FD_FEAT_AGGREGATE_METADATA
+ | H5FD_FEAT_ACCUMULATE_METADATA
+ | H5FD_FEAT_DATA_SIEVE
+ | H5FD_FEAT_AGGREGATE_SMALLDATA
+ | H5FD_FEAT_POSIX_COMPAT_HANDLE
+ | H5FD_FEAT_SUPPORTS_SWMR_IO
+ | H5FD_FEAT_DEFAULT_VFD_COMPATIBLE))
+ TEST_ERROR
+
if((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id)) < 0)
TEST_ERROR;
@@ -176,6 +198,8 @@ test_core(void)
hid_t fid = -1; /* file ID */
hid_t fapl_id = -1; /* file access property list ID */
hid_t fapl_id_out = -1; /* from H5Fget_access_plist */
+ hid_t driver_id = -1; /* ID for this VFD */
+ unsigned long driver_flags = 0; /* VFD feature flags */
hid_t did = -1; /* dataset ID */
hid_t sid = -1; /* dataspace ID */
char filename[1024]; /* filename */
@@ -210,9 +234,34 @@ test_core(void)
if(HDaccess(filename, F_OK) != -1)
if(HDremove(filename) < 0)
FAIL_PUTS_ERROR("unable to remove backing store file");
+
/* Create and close file w/ backing store off */
if(H5Pset_fapl_core(fapl_id, (size_t)CORE_INCREMENT, FALSE) < 0)
TEST_ERROR;
+
+ /* Check that the VFD feature flags are correct.
+ * Note that the H5FDdriver_query() API call does not require a file
+ * so backing-store related flags will not be returned here.
+ */
+ if ((driver_id = H5Pget_driver(fapl_id)) < 0)
+ TEST_ERROR
+ if (H5FDdriver_query(driver_id, &driver_flags) < 0)
+ TEST_ERROR
+ if(!(driver_flags & H5FD_FEAT_AGGREGATE_METADATA)) TEST_ERROR
+ if(!(driver_flags & H5FD_FEAT_ACCUMULATE_METADATA)) TEST_ERROR
+ if(!(driver_flags & H5FD_FEAT_DATA_SIEVE)) TEST_ERROR
+ if(!(driver_flags & H5FD_FEAT_AGGREGATE_SMALLDATA)) TEST_ERROR
+ if(!(driver_flags & H5FD_FEAT_ALLOW_FILE_IMAGE)) TEST_ERROR
+ if(!(driver_flags & H5FD_FEAT_CAN_USE_FILE_IMAGE_CALLBACKS)) TEST_ERROR
+ /* Check for extra flags not accounted for above */
+ if(driver_flags != (H5FD_FEAT_AGGREGATE_METADATA
+ | H5FD_FEAT_ACCUMULATE_METADATA
+ | H5FD_FEAT_DATA_SIEVE
+ | H5FD_FEAT_AGGREGATE_SMALLDATA
+ | H5FD_FEAT_ALLOW_FILE_IMAGE
+ | H5FD_FEAT_CAN_USE_FILE_IMAGE_CALLBACKS))
+ TEST_ERROR
+
if((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id)) < 0)
TEST_ERROR;
if(H5Fclose(fid) < 0)
@@ -221,7 +270,6 @@ test_core(void)
if(HDaccess(filename, F_OK) != -1)
FAIL_PUTS_ERROR("file created when backing store set to FALSE");
-
/************************************************************************
* Check basic core VFD operation and properties. This is done with the
* backing store on so a file will be created for later use.
@@ -797,6 +845,8 @@ test_family(void)
{
hid_t file=-1, fapl=-1, fapl2=-1, space=-1, dset=-1;
hid_t access_fapl = -1;
+ hid_t driver_id = -1; /* ID for this VFD */
+ unsigned long driver_flags = 0; /* VFD feature flags */
char filename[1024];
char dname[]="dataset";
unsigned int i, j;
@@ -814,6 +864,22 @@ test_family(void)
TEST_ERROR;
h5_fixname(FILENAME[2], fapl, filename, sizeof(filename));
+ /* Check that the VFD feature flags are correct */
+ if ((driver_id = H5Pget_driver(fapl)) < 0)
+ TEST_ERROR
+ if (H5FDdriver_query(driver_id, &driver_flags) < 0)
+ TEST_ERROR
+ if(!(driver_flags & H5FD_FEAT_AGGREGATE_METADATA)) TEST_ERROR
+ if(!(driver_flags & H5FD_FEAT_ACCUMULATE_METADATA)) TEST_ERROR
+ if(!(driver_flags & H5FD_FEAT_DATA_SIEVE)) TEST_ERROR
+ if(!(driver_flags & H5FD_FEAT_AGGREGATE_SMALLDATA)) TEST_ERROR
+ /* Check for extra flags not accounted for above */
+ if(driver_flags != (H5FD_FEAT_AGGREGATE_METADATA
+ | H5FD_FEAT_ACCUMULATE_METADATA
+ | H5FD_FEAT_DATA_SIEVE
+ | H5FD_FEAT_AGGREGATE_SMALLDATA))
+ TEST_ERROR
+
if((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
TEST_ERROR;
@@ -1098,6 +1164,8 @@ test_multi(void)
hid_t file=-1, fapl=-1, fapl2=-1, dset=-1, space=-1;
hid_t root=-1, attr=-1, aspace=-1, atype=-1;
hid_t access_fapl = -1;
+ hid_t driver_id = -1; /* ID for this VFD */
+ unsigned long driver_flags = 0; /* VFD feature flags */
char filename[1024];
int *fhandle2=NULL, *fhandle=NULL;
hsize_t file_size;
@@ -1154,6 +1222,22 @@ test_multi(void)
TEST_ERROR;
h5_fixname(FILENAME[4], fapl, filename, sizeof filename);
+ /* Check that the VFD feature flags are correct */
+ if ((driver_id = H5Pget_driver(fapl)) < 0)
+ TEST_ERROR
+ if (H5FDdriver_query(driver_id, &driver_flags) < 0)
+ TEST_ERROR
+ if(!(driver_flags & H5FD_FEAT_DATA_SIEVE)) TEST_ERROR
+ if(!(driver_flags & H5FD_FEAT_AGGREGATE_SMALLDATA)) TEST_ERROR
+ if(!(driver_flags & H5FD_FEAT_USE_ALLOC_SIZE)) TEST_ERROR
+ if(!(driver_flags & H5FD_FEAT_PAGED_AGGR)) TEST_ERROR
+ /* Check for extra flags not accounted for above */
+ if(driver_flags != (H5FD_FEAT_DATA_SIEVE
+ | H5FD_FEAT_AGGREGATE_SMALLDATA
+ | H5FD_FEAT_USE_ALLOC_SIZE
+ | H5FD_FEAT_PAGED_AGGR))
+ TEST_ERROR
+
if((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
TEST_ERROR;
@@ -1486,6 +1570,8 @@ test_log(void)
hid_t file = -1;
hid_t fapl = -1;
hid_t access_fapl = -1;
+ hid_t driver_id = -1; /* ID for this VFD */
+ unsigned long driver_flags = 0; /* VFD feature flags */
char filename[1024];
int *fhandle = NULL;
hsize_t file_size = 0;
@@ -1501,6 +1587,28 @@ test_log(void)
TEST_ERROR;
h5_fixname(FILENAME[6], fapl, filename, sizeof filename);
+ /* Check that the VFD feature flags are correct */
+ if ((driver_id = H5Pget_driver(fapl)) < 0)
+ TEST_ERROR
+ if (H5FDdriver_query(driver_id, &driver_flags) < 0)
+ TEST_ERROR
+ if(!(driver_flags & H5FD_FEAT_AGGREGATE_METADATA)) TEST_ERROR
+ if(!(driver_flags & H5FD_FEAT_ACCUMULATE_METADATA)) TEST_ERROR
+ if(!(driver_flags & H5FD_FEAT_DATA_SIEVE)) TEST_ERROR
+ if(!(driver_flags & H5FD_FEAT_AGGREGATE_SMALLDATA)) TEST_ERROR
+ if(!(driver_flags & H5FD_FEAT_POSIX_COMPAT_HANDLE)) TEST_ERROR
+ if(!(driver_flags & H5FD_FEAT_SUPPORTS_SWMR_IO)) TEST_ERROR
+ if(!(driver_flags & H5FD_FEAT_DEFAULT_VFD_COMPATIBLE)) TEST_ERROR
+ /* Check for extra flags not accounted for above */
+ if(driver_flags != (H5FD_FEAT_AGGREGATE_METADATA
+ | H5FD_FEAT_ACCUMULATE_METADATA
+ | H5FD_FEAT_DATA_SIEVE
+ | H5FD_FEAT_AGGREGATE_SMALLDATA
+ | H5FD_FEAT_POSIX_COMPAT_HANDLE
+ | H5FD_FEAT_SUPPORTS_SWMR_IO
+ | H5FD_FEAT_DEFAULT_VFD_COMPATIBLE))
+ TEST_ERROR
+
/* Create the test file */
if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
TEST_ERROR;
@@ -1573,6 +1681,8 @@ test_stdio(void)
hid_t file = -1;
hid_t fapl = -1;
hid_t access_fapl = -1;
+ hid_t driver_id = -1; /* ID for this VFD */
+ unsigned long driver_flags = 0; /* VFD feature flags */
char filename[1024];
FILE *fhandle = NULL;
hsize_t file_size = 0;
@@ -1586,6 +1696,24 @@ test_stdio(void)
TEST_ERROR;
h5_fixname(FILENAME[7], fapl, filename, sizeof filename);
+ /* Check that the VFD feature flags are correct */
+ if ((driver_id = H5Pget_driver(fapl)) < 0)
+ TEST_ERROR
+ if (H5FDdriver_query(driver_id, &driver_flags) < 0)
+ TEST_ERROR
+ if(!(driver_flags & H5FD_FEAT_AGGREGATE_METADATA)) TEST_ERROR
+ if(!(driver_flags & H5FD_FEAT_ACCUMULATE_METADATA)) TEST_ERROR
+ if(!(driver_flags & H5FD_FEAT_DATA_SIEVE)) TEST_ERROR
+ if(!(driver_flags & H5FD_FEAT_AGGREGATE_SMALLDATA)) TEST_ERROR
+ if(!(driver_flags & H5FD_FEAT_DEFAULT_VFD_COMPATIBLE)) TEST_ERROR
+ /* Check for extra flags not accounted for above */
+ if(driver_flags != (H5FD_FEAT_AGGREGATE_METADATA
+ | H5FD_FEAT_ACCUMULATE_METADATA
+ | H5FD_FEAT_DATA_SIEVE
+ | H5FD_FEAT_AGGREGATE_SMALLDATA
+ | H5FD_FEAT_DEFAULT_VFD_COMPATIBLE))
+ TEST_ERROR
+
if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
TEST_ERROR;
@@ -1660,6 +1788,8 @@ test_windows(void)
hid_t file = -1;
hid_t fapl = -1;
hid_t access_fapl = -1;
+ hid_t driver_id = -1; /* ID for this VFD */
+ unsigned long driver_flags = 0; /* VFD feature flags */
char filename[1024];
int *fhandle = NULL;
hsize_t file_size = 0;
@@ -1682,6 +1812,28 @@ test_windows(void)
TEST_ERROR;
h5_fixname(FILENAME[8], fapl, filename, sizeof filename);
+ /* Check that the VFD feature flags are correct */
+ if ((driver_id = H5Pget_driver(fapl)) < 0)
+ TEST_ERROR
+ if (H5FDdriver_query(driver_id, &driver_flags) < 0)
+ TEST_ERROR
+ if(!(driver_flags & H5FD_FEAT_AGGREGATE_METADATA)) TEST_ERROR
+ if(!(driver_flags & H5FD_FEAT_ACCUMULATE_METADATA)) TEST_ERROR
+ if(!(driver_flags & H5FD_FEAT_DATA_SIEVE)) TEST_ERROR
+ if(!(driver_flags & H5FD_FEAT_AGGREGATE_SMALLDATA)) TEST_ERROR
+ if(!(driver_flags & H5FD_FEAT_POSIX_COMPAT_HANDLE)) TEST_ERROR
+ if(!(driver_flags & H5FD_FEAT_SUPPORTS_SWMR_IO)) TEST_ERROR
+ if(!(driver_flags & H5FD_FEAT_DEFAULT_VFD_COMPATIBLE)) TEST_ERROR
+ /* Check for extra flags not accounted for above */
+ if(driver_flags != (H5FD_FEAT_AGGREGATE_METADATA
+ | H5FD_FEAT_ACCUMULATE_METADATA
+ | H5FD_FEAT_DATA_SIEVE
+ | H5FD_FEAT_AGGREGATE_SMALLDATA
+ | H5FD_FEAT_POSIX_COMPAT_HANDLE
+ | H5FD_FEAT_SUPPORTS_SWMR_IO
+ | H5FD_FEAT_DEFAULT_VFD_COMPATIBLE))
+ TEST_ERROR
+
if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
TEST_ERROR;